/* ==========================================================================
   Kinetiq — panel konta (konto.html).
   Zmienne i podstawy są te same co na stronie głównej; niżej komponenty panelu.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root{
  --bg: #0A0B0F;
  --bg-elevated: #121319;
  --bg-card: #191B22;
  --border: #262932;
  --border-soft: #1E2027;
  --text: #F3F1EC;
  --text-muted: #9A9CA5;
  --text-faint: #5C606B;
  --accent: #FF5A36;
  --accent-hot: #FF7A52;
  --accent-soft: rgba(255,90,54,0.13);
  --teal: #37F0C2;
  --violet: #8B7CF6;
  --danger: #FF6B6B;
  --warn: #E8B04B;
  --radius: 14px;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*{ margin:0; padding:0; box-sizing:border-box; }

body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
}

a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
button{ font-family:inherit; cursor:pointer; }
input, select, textarea{ font-family:inherit; }

:focus-visible{ outline:2px solid var(--accent-hot); outline-offset:3px; border-radius:4px; }

/* ------------------------------------------------------------- NAV ---- */

header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(10,11,15,0.86);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border-soft);
}
nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:16px 32px;
  max-width:1320px;
  margin:0 auto;
}
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-display);
  font-weight:700;
  font-size:21px;
  letter-spacing:-0.02em;
}
.nav-actions{ display:flex; align-items:center; gap:22px; }
.nav-login{ font-size:14.5px; font-weight:600; color:var(--text-muted); }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 20px;
  border-radius:999px;
  font-weight:600;
  font-size:14.5px;
  border:1px solid transparent;
  color:var(--text);
  background:transparent;
  transition:transform .18s ease, background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
  white-space:nowrap;
}
.btn:active{ transform:scale(0.97); }
.btn svg{ width:16px; height:16px; flex-shrink:0; }
.btn-accent{ background:var(--accent); color:#0A0B0F; }
.btn-accent:hover{ background:var(--accent-hot); }
.btn-outline{ border-color:var(--border); }
.btn-outline:hover{ border-color:var(--text-faint); background:var(--bg-card); }
.btn-ghost{ color:var(--text-muted); padding:8px 14px; }
.btn-ghost:hover{ color:var(--text); background:var(--bg-card); }
.btn-sm{ padding:8px 16px; font-size:13.5px; }
.btn-danger{ border:1px solid rgba(255,107,107,0.3); color:var(--danger); }
.btn-danger:hover{ background:rgba(255,107,107,0.1); }
.btn[disabled]{ opacity:.5; pointer-events:none; }

/* ---------------------------------------------------------- UKŁAD ---- */

.layout{
  display:grid;
  grid-template-columns:262px minmax(0, 1fr);
  gap:34px;
  max-width:1320px;
  margin:0 auto;
  padding:34px 32px 80px;
  align-items:start;
}

/* --------------------------------------------------- MENU BOCZNE ---- */

.side{
  position:sticky;
  top:88px;
  animation:kq-in .5s cubic-bezier(.16,.84,.44,1) both;
}
.side-card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--bg-elevated);
  padding:8px;
}
.side-user{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 12px 16px;
  border-bottom:1px solid var(--border-soft);
  margin-bottom:8px;
}
.side-user-text{ min-width:0; }
.side-user strong{
  display:block;
  font-size:14.5px;
  font-weight:600;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.side-user span{
  display:block;
  font-size:12px;
  color:var(--text-faint);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.side-nav{ display:flex; flex-direction:column; gap:2px; }
.side-link{
  display:flex;
  align-items:center;
  gap:11px;
  width:100%;
  padding:10px 12px;
  border:none;
  border-radius:10px;
  background:transparent;
  color:var(--text-muted);
  font-size:14.5px;
  font-weight:500;
  text-align:left;
  position:relative;
  transition:background .18s ease, color .18s ease, transform .18s ease;
}
.side-link svg{ width:17px; height:17px; flex-shrink:0; }
.side-link:hover{ background:var(--bg-card); color:var(--text); transform:translateX(2px); }
.side-link.active{
  background:var(--accent-soft);
  color:var(--accent-hot);
  font-weight:600;
}
/* Pionowy znacznik aktywnej zakładki. */
.side-link.active::before{
  content:"";
  position:absolute;
  left:-8px;
  top:50%;
  transform:translateY(-50%);
  width:3px;
  height:20px;
  border-radius:0 3px 3px 0;
  background:var(--accent);
}
.side-badge{
  margin-left:auto;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:var(--accent);
  color:#0A0B0F;
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  display:grid;
  place-items:center;
}
.side-badge.quiet{ background:var(--bg-card); color:var(--text-faint); }
.side-badge[hidden]{ display:none; }

/* -------------------------------------------------------- PANELE ---- */

.panels{ min-width:0; }
.panel{ display:none; }
.panel.active{ display:block; animation:kq-in .45s cubic-bezier(.16,.84,.44,1) both; }

@keyframes kq-in{
  from{ opacity:0; transform:translateY(16px); }
  to{ opacity:1; transform:translateY(0); }
}

.panel-head{ margin-bottom:26px; }
.panel-head h1{
  font-family:var(--font-display);
  font-weight:700;
  font-size:clamp(25px, 3.4vw, 33px);
  letter-spacing:-0.03em;
  line-height:1.12;
}
.panel-head p{
  color:var(--text-muted);
  font-size:15px;
  margin-top:7px;
  max-width:620px;
}

.card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--bg-elevated);
  padding:24px;
  margin-bottom:20px;
}
.card-title{
  font-family:var(--font-display);
  font-weight:700;
  font-size:17.5px;
  letter-spacing:-0.015em;
  margin-bottom:5px;
}
.card-sub{
  color:var(--text-muted);
  font-size:13.5px;
  margin-bottom:20px;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:9px;
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:0.08em;
  color:var(--teal);
  background:rgba(55,240,194,0.08);
  border:1px solid rgba(55,240,194,0.25);
  padding:6px 13px;
  border-radius:999px;
}

/* --------------------------------------------------- PANEL GŁÓWNY ---- */

.hello{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom:8px;
}
.hello h1{
  font-family:var(--font-display);
  font-weight:700;
  font-size:clamp(26px, 3.6vw, 36px);
  letter-spacing:-0.03em;
  line-height:1.1;
}
.hello h1 em{
  font-style:normal;
  background:linear-gradient(100deg, var(--accent) 0%, var(--accent-hot) 55%, var(--teal) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}

/* Baner powitalny — mocny akcent na wejściu do panelu. */
.banner{
  position:relative;
  overflow:hidden;
  border-radius:var(--radius);
  border:1px solid rgba(255,90,54,0.25);
  background:linear-gradient(115deg, #1B1116 0%, #221219 45%, #12191C 100%);
  padding:32px 34px;
  margin:24px 0 26px;
}
.banner::after{
  content:"";
  position:absolute;
  top:-70%;
  right:-8%;
  width:460px;
  height:460px;
  background:radial-gradient(circle, rgba(255,90,54,0.20) 0%, transparent 62%);
  pointer-events:none;
}
/* Pasy przypominające equalizer z logo. */
.banner-bars{
  position:absolute;
  right:36px;
  bottom:0;
  display:flex;
  align-items:flex-end;
  gap:7px;
  height:100%;
  opacity:.5;
  pointer-events:none;
}
.banner-bars i{
  display:block;
  width:9px;
  border-radius:3px 3px 0 0;
  background:linear-gradient(180deg, var(--accent) 0%, transparent 100%);
  animation:bars 2.4s ease-in-out infinite;
}
.banner-bars i:nth-child(1){ height:40%; animation-delay:0s; }
.banner-bars i:nth-child(2){ height:66%; animation-delay:.2s; background:linear-gradient(180deg, var(--teal) 0%, transparent 100%); }
.banner-bars i:nth-child(3){ height:28%; animation-delay:.4s; }
.banner-bars i:nth-child(4){ height:54%; animation-delay:.6s; background:linear-gradient(180deg, var(--violet) 0%, transparent 100%); }
.banner-bars i:nth-child(5){ height:36%; animation-delay:.8s; }
@keyframes bars{
  0%, 100%{ transform:scaleY(1); }
  50%{ transform:scaleY(.55); }
}
.banner-content{ position:relative; z-index:1; max-width:560px; }
.banner h2{
  font-family:var(--font-display);
  font-weight:700;
  font-size:clamp(20px, 2.6vw, 26px);
  letter-spacing:-0.025em;
  margin:14px 0 9px;
}
.banner p{ color:var(--text-muted); font-size:14.5px; margin-bottom:20px; }

.stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
  gap:16px;
  margin-bottom:20px;
}
.stat-card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--bg-elevated);
  padding:20px;
  transition:border-color .2s ease, transform .2s ease;
}
.stat-card:hover{ border-color:var(--text-faint); transform:translateY(-2px); }
.stat-label{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:0.08em;
  color:var(--text-faint);
  display:block;
  margin-bottom:12px;
}
.stat-value{
  font-family:var(--font-display);
  font-weight:700;
  font-size:27px;
  letter-spacing:-0.02em;
  line-height:1;
  display:flex;
  align-items:center;
  gap:9px;
}
.stat-value small{ font-size:14px; font-weight:500; color:var(--text-faint); }
.stat-hint{ font-size:12.5px; color:var(--text-muted); margin-top:9px; }

/* ------------------------------------------ OSTRZEŻENIA MODERACJI ---- */
/* Widoczne na górze panelu głównego, dopóki użytkownik ich nie potwierdzi. */

.warning-card{
  display:flex;
  align-items:flex-start;
  gap:15px;
  padding:18px 20px;
  border-radius:var(--radius);
  border:1px solid rgba(232,176,75,0.34);
  background:rgba(232,176,75,0.08);
  margin-bottom:16px;
  animation:kq-in .45s cubic-bezier(.16,.84,.44,1) both;
}
.warning-card.severe{
  border-color:rgba(255,107,107,0.38);
  background:rgba(255,107,107,0.09);
}
.warning-card.info{
  border-color:rgba(55,240,194,0.3);
  background:rgba(55,240,194,0.07);
}

.warning-icon{
  width:38px;
  height:38px;
  border-radius:11px;
  display:grid;
  place-items:center;
  flex-shrink:0;
  background:rgba(232,176,75,0.14);
  color:var(--warn);
}
.warning-card.severe .warning-icon{ background:rgba(255,107,107,0.14); color:var(--danger); }
.warning-card.info .warning-icon{ background:rgba(55,240,194,0.12); color:var(--teal); }
.warning-icon svg{ width:18px; height:18px; }

.warning-body{ flex:1; min-width:0; }
.warning-body strong{
  display:block;
  font-size:15px;
  font-weight:600;
  color:var(--warn);
  margin-bottom:5px;
}
.warning-card.severe .warning-body strong{ color:var(--danger); }
.warning-card.info .warning-body strong{ color:var(--teal); }
.warning-body p{ font-size:14px; line-height:1.5; color:var(--text); }
.warning-meta{
  display:block;
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--text-faint);
  margin-top:8px;
}

/* --------------------------------------------------- POWIADOMIENIA ---- */

.notice-list{ display:flex; flex-direction:column; gap:2px; }
.notice{
  display:flex;
  gap:13px;
  padding:14px 12px;
  border-radius:10px;
  transition:background .18s ease;
}
.notice:hover{ background:var(--bg-card); }
.notice-icon{
  width:34px;
  height:34px;
  border-radius:10px;
  display:grid;
  place-items:center;
  flex-shrink:0;
  background:var(--accent-soft);
  color:var(--accent-hot);
}
.notice-icon svg{ width:16px; height:16px; }
.notice-icon[data-icon="shield"]{ background:rgba(55,240,194,0.10); color:var(--teal); }
.notice-icon[data-icon="wallet"]{ background:rgba(139,124,246,0.12); color:var(--violet); }
.notice-icon[data-icon="crown"]{ background:rgba(232,176,75,0.12); color:var(--warn); }
.notice-body{ min-width:0; flex:1; }
.notice-body strong{ display:block; font-size:14.5px; font-weight:600; }
.notice-body p{ font-size:13px; color:var(--text-muted); margin-top:3px; }
.notice-time{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--text-faint);
  white-space:nowrap;
  padding-top:2px;
}
.notice.unread .notice-body strong::after{
  content:"";
  display:inline-block;
  width:6px; height:6px;
  border-radius:50%;
  background:var(--accent);
  margin-left:8px;
  vertical-align:middle;
}

/* --------------------------------------------------------- PROFIL ---- */

.profile-head{
  display:flex;
  align-items:center;
  gap:20px;
  padding-bottom:24px;
  margin-bottom:8px;
  border-bottom:1px solid var(--border-soft);
}
.avatar-xl{ width:76px; height:76px; font-size:31px; }

/* Avatar jako przycisk — po najechaniu pokazuje ikonę aparatu. */
.avatar-edit{
  position:relative;
  border:none;
  background:none;
  padding:0;
  border-radius:50%;
  flex-shrink:0;
  line-height:0;
}
.avatar-edit-overlay{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(10,11,15,0.62);
  color:var(--text);
  opacity:0;
  transition:opacity .22s ease;
}
.avatar-edit:hover .avatar-edit-overlay,
.avatar-edit:focus-visible .avatar-edit-overlay{ opacity:1; }
.avatar-edit-overlay svg{ width:24px; height:24px; }

/* Kręcące się kółko na czas wysyłania pliku. */
.avatar-spinner{
  position:absolute;
  inset:-4px;
  border-radius:50%;
  border:2px solid transparent;
  border-top-color:var(--accent);
  border-right-color:var(--accent);
  opacity:0;
  transition:opacity .2s ease;
}
.avatar-edit.busy .avatar-spinner{
  opacity:1;
  animation:avatar-spin .8s linear infinite;
}
.avatar-edit.busy .avatar-edit-overlay{ opacity:1; }
@keyframes avatar-spin{ to{ transform:rotate(360deg); } }

.avatar-actions{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin-top:12px;
}
.profile-head-text h2{
  font-family:var(--font-display);
  font-weight:700;
  font-size:22px;
  letter-spacing:-0.02em;
}
.profile-head-text p{ color:var(--text-muted); font-size:13.5px; margin-top:4px; }

.field-row{
  display:flex;
  align-items:center;
  gap:16px;
  padding:17px 0;
  border-bottom:1px solid var(--border-soft);
}
.field-row:last-child{ border-bottom:none; }
.field-info{ flex:1; min-width:0; }
.field-label{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:0.08em;
  color:var(--text-faint);
  display:block;
  margin-bottom:6px;
}
.field-value{
  font-size:15px;
  font-weight:500;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.field-value.empty{ color:var(--text-faint); font-style:italic; font-weight:400; }
.field-edit{ display:none; gap:10px; align-items:center; }
.field-row.editing .field-edit{ display:flex; }
.field-row.editing .field-static{ display:none; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea{
  width:100%;
  padding:11px 14px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--bg-card);
  color:var(--text);
  font-size:14.5px;
  transition:border-color .2s ease, background .2s ease;
}
input:focus, select:focus, textarea:focus{
  outline:none;
  border-color:var(--accent);
  background:var(--bg-elevated);
}
input::placeholder, textarea::placeholder{ color:var(--text-faint); }
textarea{ resize:vertical; min-height:110px; line-height:1.55; }
select{ cursor:pointer; }

.form-grid{ display:grid; gap:16px; }
.form-field label{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--text-muted);
  margin-bottom:7px;
}
.form-hint{ font-size:12px; color:var(--text-faint); margin-top:6px; }

/* ---------------------------------------------------- SUBSKRYPCJA ---- */

.plan-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(215px, 1fr));
  gap:16px;
}
.plan-card{
  position:relative;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--bg-elevated);
  padding:24px 20px;
  display:flex;
  flex-direction:column;
  transition:border-color .2s ease, transform .2s ease;
}
.plan-card:hover{ transform:translateY(-3px); border-color:var(--text-faint); }
.plan-card.current{
  border-color:var(--accent);
  background:linear-gradient(180deg, rgba(255,90,54,0.06), transparent 60%), var(--bg-elevated);
}
.plan-card-badge{
  position:absolute;
  top:-9px;
  left:20px;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:0.08em;
  padding:4px 10px;
  border-radius:999px;
  background:var(--accent);
  color:#0A0B0F;
  font-weight:600;
}
.plan-card h3{
  font-family:var(--font-display);
  font-weight:700;
  font-size:19px;
  letter-spacing:-0.02em;
}
.plan-card .tagline{ font-size:13px; color:var(--text-muted); margin:6px 0 16px; min-height:38px; }
.plan-card .price{
  font-family:var(--font-display);
  font-weight:700;
  font-size:29px;
  letter-spacing:-0.03em;
  margin-bottom:2px;
}
.plan-card .price span{ font-size:14px; font-weight:500; color:var(--text-faint); }
.plan-card .period{ font-size:12px; color:var(--text-faint); margin-bottom:20px; }
.plan-card .btn{ width:100%; margin-top:auto; }

.current-plan{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}
.current-plan-info{ display:flex; align-items:center; gap:16px; }
.plan-crown{
  width:52px; height:52px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(55,240,194,0.10);
  color:var(--teal);
}
.plan-crown[data-plan="plus"]{ background:var(--accent-soft); color:var(--accent-hot); }
.plan-crown[data-plan="ultra"]{ background:rgba(139,124,246,0.12); color:var(--violet); }
.plan-crown svg{ width:24px; height:24px; }

/* -------------------------------------------------------- PORTFEL ---- */

.balance-hero{
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:linear-gradient(125deg, #14161C 0%, #191B22 60%, #17181F 100%);
  padding:30px 28px;
  margin-bottom:20px;
  position:relative;
  overflow:hidden;
}
.balance-hero::after{
  content:"";
  position:absolute;
  top:-60%; right:-10%;
  width:380px; height:380px;
  background:radial-gradient(circle, rgba(139,124,246,0.16) 0%, transparent 65%);
  pointer-events:none;
}
.balance-amount{
  font-family:var(--font-display);
  font-weight:700;
  font-size:clamp(38px, 6vw, 52px);
  letter-spacing:-0.035em;
  line-height:1;
  margin:12px 0 8px;
  position:relative;
  z-index:1;
}
.balance-note{ font-size:13.5px; color:var(--text-muted); position:relative; z-index:1; }

.amount-chips{ display:flex; flex-wrap:wrap; gap:9px; margin-bottom:18px; }
.amount-chip{
  padding:9px 17px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--bg-card);
  color:var(--text-muted);
  font-family:var(--font-mono);
  font-size:13.5px;
  font-weight:600;
  transition:border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}
.amount-chip:hover{ border-color:var(--text-faint); color:var(--text); transform:translateY(-1px); }
.amount-chip.selected{
  border-color:var(--accent);
  background:var(--accent-soft);
  color:var(--accent-hot);
}

.method-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap:11px;
  margin-bottom:20px;
}
.method{
  display:flex;
  align-items:center;
  gap:11px;
  padding:14px;
  border-radius:11px;
  border:1px solid var(--border);
  background:var(--bg-card);
  color:var(--text-muted);
  font-size:14px;
  font-weight:600;
  transition:border-color .18s ease, color .18s ease, background .18s ease;
}
.method svg{ width:19px; height:19px; }
.method:hover{ border-color:var(--text-faint); color:var(--text); }
.method.selected{ border-color:var(--teal); color:var(--teal); background:rgba(55,240,194,0.07); }

/* ---------------------------------------------------- TRANSAKCJE ---- */

.tx-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
  gap:16px;
  margin-bottom:20px;
}

.tx-list{ display:flex; flex-direction:column; }
.tx{
  display:flex;
  align-items:center;
  gap:15px;
  padding:15px 12px;
  border-radius:10px;
  border-bottom:1px solid var(--border-soft);
  transition:background .18s ease;
}
.tx:last-child{ border-bottom:none; }
.tx:hover{ background:var(--bg-card); }
.tx-icon{
  width:38px; height:38px;
  border-radius:11px;
  display:grid;
  place-items:center;
  flex-shrink:0;
  background:rgba(55,240,194,0.10);
  color:var(--teal);
}
.tx-icon svg{ width:17px; height:17px; }
.tx-icon.out{ background:var(--accent-soft); color:var(--accent-hot); }
.tx-body{ flex:1; min-width:0; }
.tx-body strong{ display:block; font-size:14.5px; font-weight:600; }
.tx-meta{
  font-family:var(--font-mono);
  font-size:11.5px;
  color:var(--text-faint);
  margin-top:3px;
}
.tx-amount{
  font-family:var(--font-mono);
  font-size:15px;
  font-weight:600;
  white-space:nowrap;
  color:var(--teal);
}
.tx-amount.out{ color:var(--accent-hot); }
.tx-balance{
  font-family:var(--font-mono);
  font-size:11.5px;
  color:var(--text-faint);
  text-align:right;
  margin-top:3px;
}

/* -------------------------------------------------------- ZAKUPY ---- */

.purchase-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));
  gap:18px;
}
.purchase{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--bg-elevated);
  overflow:hidden;
  transition:transform .2s ease, border-color .2s ease;
}
.purchase:hover{ transform:translateY(-3px); border-color:var(--text-faint); }
.purchase-cover{
  position:relative;
  aspect-ratio:16 / 10;
  display:grid;
  place-items:center;
  background:linear-gradient(150deg,#3a1f1a,#FF5A36);
}
.purchase-cover[data-tone="2"]{ background:linear-gradient(150deg,#12312c,#37F0C2); }
.purchase-cover[data-tone="3"]{ background:linear-gradient(150deg,#241a3d,#8B7CF6); }
.purchase-cover[data-tone="4"]{ background:linear-gradient(150deg,#2a2416,#E8B04B); }
.purchase-cover[data-tone="5"]{ background:linear-gradient(150deg,#1c2438,#5B7FE0); }
.purchase-cover img{ width:100%; height:100%; object-fit:cover; }
.purchase-cover::after{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.5) 100%);
}
.purchase-kind{
  position:absolute;
  top:10px; left:10px;
  z-index:1;
  font-family:var(--font-mono);
  font-size:9.5px;
  letter-spacing:0.07em;
  padding:4px 8px;
  border-radius:5px;
  background:rgba(0,0,0,0.45);
  color:rgba(255,255,255,0.9);
}
.purchase-body{ padding:15px 16px 17px; }
.purchase-body h3{
  font-family:var(--font-display);
  font-weight:700;
  font-size:15.5px;
  letter-spacing:-0.015em;
  line-height:1.25;
  margin-bottom:9px;
}
.purchase-expiry{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12.5px;
  color:var(--teal);
}
.purchase-expiry svg{ width:13px; height:13px; }
.purchase-expiry.soon{ color:var(--warn); }
.purchase-expiry.gone{ color:var(--text-faint); }
.purchase.expired .purchase-cover{ filter:grayscale(.85) brightness(.65); }

/* ------------------------------------------------ BEZPIECZEŃSTWO ---- */

.toggle-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:18px 0;
  border-bottom:1px solid var(--border-soft);
}
.toggle-row:last-of-type{ border-bottom:none; }
.toggle-text{ flex:1; }
.toggle-text strong{ display:block; font-size:15px; font-weight:600; margin-bottom:5px; }
.toggle-text p{ font-size:13.5px; color:var(--text-muted); max-width:460px; }

.switch{
  position:relative;
  width:46px;
  height:26px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--bg-card);
  flex-shrink:0;
  transition:background .25s ease, border-color .25s ease;
}
.switch::after{
  content:"";
  position:absolute;
  top:3px; left:3px;
  width:18px; height:18px;
  border-radius:50%;
  background:var(--text-faint);
  transition:transform .28s cubic-bezier(.34,1.4,.64,1), background .25s ease;
}
.switch.on{ background:rgba(55,240,194,0.15); border-color:var(--teal); }
.switch.on::after{ transform:translateX(20px); background:var(--teal); }
.switch.busy{ opacity:.5; pointer-events:none; }

.method-choice{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin-top:16px;
  padding-top:16px;
  border-top:1px dashed var(--border);
}

.event-log{ display:flex; flex-direction:column; }
.event{
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px;
  border-radius:9px;
  transition:background .18s ease;
}
.event:hover{ background:var(--bg-card); }
.event-dot{
  width:8px; height:8px;
  border-radius:50%;
  background:var(--teal);
  flex-shrink:0;
  box-shadow:0 0 8px rgba(55,240,194,.5);
}
.event-dot.warn{ background:var(--warn); box-shadow:0 0 8px rgba(232,176,75,.5); }
.event-dot.danger{ background:var(--danger); box-shadow:0 0 8px rgba(255,107,107,.5); }
.event-body{ flex:1; min-width:0; }
.event-body strong{ font-size:14px; font-weight:500; }
.event-body span{ display:block; font-size:12px; color:var(--text-faint); margin-top:2px; }
.event-time{ font-family:var(--font-mono); font-size:11px; color:var(--text-faint); white-space:nowrap; }

/* -------------------------------------------------------- SUPORT ---- */

.ticket{
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg-elevated);
  margin-bottom:12px;
  overflow:hidden;
}
.ticket-head{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  padding:16px 18px;
  border:none;
  background:transparent;
  color:var(--text);
  text-align:left;
  transition:background .18s ease;
}
.ticket-head:hover{ background:var(--bg-card); }
.ticket-head-text{ flex:1; min-width:0; }
.ticket-head strong{ display:block; font-size:14.5px; font-weight:600; }
.ticket-head span{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--text-faint);
}
.ticket-chevron{
  width:15px; height:15px;
  color:var(--text-faint);
  transition:transform .28s cubic-bezier(.4,0,.2,1);
}
.ticket.open .ticket-chevron{ transform:rotate(180deg); }

.ticket-thread{
  display:none;
  padding:4px 18px 18px;
  border-top:1px solid var(--border-soft);
}
.ticket.open .ticket-thread{ display:block; animation:kq-in .3s ease both; }

.message{
  padding:13px 15px;
  border-radius:11px;
  margin-top:12px;
  font-size:14px;
  line-height:1.55;
  max-width:88%;
}
.message.user{
  background:var(--accent-soft);
  border:1px solid rgba(255,90,54,0.2);
  margin-left:auto;
}
.message.support{
  background:var(--bg-card);
  border:1px solid var(--border);
}
.message-meta{
  font-family:var(--font-mono);
  font-size:10.5px;
  color:var(--text-faint);
  margin-bottom:6px;
  letter-spacing:0.05em;
}
.ticket-reply{ display:flex; gap:10px; margin-top:16px; align-items:flex-start; }
.ticket-reply textarea{ min-height:52px; }

.status-chip{
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:0.07em;
  padding:4px 10px;
  border-radius:999px;
  white-space:nowrap;
  border:1px solid;
}
.status-chip[data-status="open"],
.status-chip[data-status="pending"]{
  color:var(--teal); border-color:rgba(55,240,194,0.3); background:rgba(55,240,194,0.08);
}
.status-chip[data-status="waiting"],
.status-chip[data-status="review"]{
  color:var(--warn); border-color:rgba(232,176,75,0.3); background:rgba(232,176,75,0.08);
}
.status-chip[data-status="closed"],
.status-chip[data-status="rejected"]{
  color:var(--text-faint); border-color:var(--border); background:var(--bg-card);
}
.status-chip[data-status="accepted"]{
  color:var(--violet); border-color:rgba(139,124,246,0.32); background:rgba(139,124,246,0.1);
}

/* ----------------------------------------------------- APLIKACJE ---- */

.role-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
  margin-bottom:20px;
}
.role-card{
  padding:18px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--bg-card);
  text-align:left;
  color:var(--text-muted);
  transition:border-color .2s ease, transform .2s ease, color .2s ease;
}
.role-card:hover{ transform:translateY(-2px); border-color:var(--text-faint); color:var(--text); }
.role-card.selected{
  border-color:var(--accent);
  background:var(--accent-soft);
  color:var(--text);
}
.role-icon{
  width:34px; height:34px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:var(--bg-elevated);
  margin-bottom:12px;
  color:var(--accent-hot);
}
.role-card.selected .role-icon{ background:rgba(255,90,54,0.18); }
.role-icon svg{ width:17px; height:17px; }
.role-card strong{ display:block; font-size:14.5px; font-weight:600; color:var(--text); }
.role-card p{ font-size:12.5px; margin-top:5px; line-height:1.45; }

.application{
  display:flex;
  align-items:flex-start;
  gap:15px;
  padding:17px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg-elevated);
  margin-bottom:12px;
}
.application-body{ flex:1; min-width:0; }
.application-body strong{ display:block; font-size:15px; font-weight:600; }
.application-body p{ font-size:13.5px; color:var(--text-muted); margin-top:6px; line-height:1.5; }
.application-meta{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--text-faint);
  margin-top:9px;
}

/* --------------------------------------------- STANY I KOMUNIKATY ---- */

.empty{
  text-align:center;
  padding:56px 24px;
  border:1px dashed var(--border);
  border-radius:var(--radius);
  background:var(--bg-elevated);
}
.empty-icon{
  width:56px; height:56px;
  border-radius:16px;
  display:grid;
  place-items:center;
  margin:0 auto 18px;
  background:var(--bg-card);
  color:var(--text-faint);
}
.empty-icon svg{ width:25px; height:25px; }
.empty h3{
  font-family:var(--font-display);
  font-weight:700;
  font-size:17px;
  letter-spacing:-0.02em;
  margin-bottom:8px;
}
.empty p{ color:var(--text-muted); font-size:14px; max-width:400px; margin:0 auto 20px; }
.empty p:last-child{ margin-bottom:0; }

.skeleton{
  height:15px;
  border-radius:6px;
  background:linear-gradient(90deg, var(--bg-card) 25%, var(--border-soft) 50%, var(--bg-card) 75%);
  background-size:200% 100%;
  animation:shimmer 1.4s linear infinite;
  margin-bottom:11px;
}
.skeleton:nth-child(2){ width:72%; }
.skeleton:nth-child(3){ width:54%; }
@keyframes shimmer{
  from{ background-position:200% 0; }
  to{ background-position:-200% 0; }
}

.alert{
  display:none;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  border-radius:10px;
  font-size:13.5px;
  line-height:1.45;
  margin-bottom:16px;
  border:1px solid rgba(255,107,107,0.3);
  background:rgba(255,107,107,0.09);
  color:var(--danger);
}
.alert.show{ display:flex; animation:kq-in .3s ease both; }
.alert.ok{
  border-color:rgba(55,240,194,0.3);
  background:rgba(55,240,194,0.08);
  color:var(--teal);
}
.alert svg{ width:16px; height:16px; flex-shrink:0; margin-top:1px; }

/* Toast potwierdzający zapis — pojawia się w prawym dolnym rogu. */
.toast{
  position:fixed;
  right:26px;
  bottom:26px;
  z-index:200;
  display:flex;
  align-items:center;
  gap:11px;
  padding:14px 20px;
  border-radius:12px;
  border:1px solid rgba(55,240,194,0.3);
  background:var(--bg-elevated);
  box-shadow:0 20px 50px rgba(0,0,0,.5);
  color:var(--teal);
  font-size:14px;
  font-weight:600;
  opacity:0;
  transform:translateY(18px);
  pointer-events:none;
  transition:opacity .3s ease, transform .35s cubic-bezier(.34,1.4,.64,1);
}
.toast.show{ opacity:1; transform:translateY(0); }
.toast svg{ width:17px; height:17px; }
.toast.error{ border-color:rgba(255,107,107,0.32); color:var(--danger); }

/* ---------------------------------------------------------- RWD ---- */

@media (max-width:940px){
  .layout{ grid-template-columns:1fr; gap:22px; padding:22px 20px 60px; }
  .side{ position:static; }
  .side-user{ display:none; }
  .side-card{ padding:6px; }
  /* Na wąskim ekranie zakładki jadą poziomo. */
  .side-nav{
    flex-direction:row;
    overflow-x:auto;
    gap:4px;
    scrollbar-width:none;
  }
  .side-nav::-webkit-scrollbar{ display:none; }
  .side-link{ white-space:nowrap; padding:10px 14px; }
  .side-link.active::before{ display:none; }
  nav{ padding:14px 20px; }
  .banner-bars{ display:none; }
  .banner{ padding:26px 22px; }
}

@media (max-width:560px){
  .field-row{ flex-direction:column; align-items:stretch; gap:12px; }
  .field-edit{ flex-direction:column; align-items:stretch; }
  .profile-head{ flex-direction:column; text-align:center; }
  .toast{ left:20px; right:20px; bottom:20px; justify-content:center; }
  .message{ max-width:100%; }
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}
