/* =========================================================
   Trackly UGC — единая таблица стилей
   Дизайн-система: светлый минимализм, синий + оранжевый акценты
   ========================================================= */

:root{
  /* Цвет */
  --ink:#151A23;
  --ink-soft:#4A5264;
  --muted:#6B7383;
  --faint:#6B7383;
  --paper:#FFFFFF;
  --bg-soft:#F5F7FB;
  --bg-soft-2:#EEF1F8;
  --line:#E3E7EF;
  --line-strong:#CBD2E1;

  --blue-50:#EBF0FF;
  --blue-100:#D7E1FF;
  --blue-500:#2F5AE5;
  --blue-600:#2549C9;
  --blue-700:#1A369A;

  --orange-50:#FFF0E6;
  --orange-100:#FFDEC7;
  --orange-500:#FF7A38;
  --orange-600:#B8430D;
  --orange-700:#C2490D;
  --orange-800:#A8400B;

  --green:#137A4C;
  --green-bg:#E5F7EE;
  --green-line:#BEE7D3;

  --yellow:#8A5F00;
  --yellow-bg:#FFF6DD;
  --yellow-line:#F1DE9F;

  --red:#C7362A;
  --red-bg:#FDEAE8;
  --red-line:#F4C3BC;

  --r-lg:16px;
  --r-md:12px;
  --r-sm:8px;
  --r-pill:999px;

  --shadow-sm:0 1px 2px rgba(21,26,35,.06);
  --shadow-md:0 10px 28px rgba(21,26,35,.08);
  --shadow-lg:0 20px 48px rgba(21,26,35,.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; overflow-x:hidden; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--ink);
  background:var(--paper);
  font-size:16px;
  line-height:1.55;
  overflow-x:hidden;
}
img{ max-width:100%; display:block; }
a{ color:var(--blue-600); text-decoration:none; }
a:hover{ text-decoration:underline; }
h1,h2,h3,h4{ font-weight:800; letter-spacing:-.02em; line-height:1.15; margin:0 0 .5em; color:var(--ink); }
h1{ font-size:clamp(1.9rem, 1.5rem + 2vw, 3.1rem); }
h2{ font-size:clamp(1.5rem, 1.25rem + 1.2vw, 2.2rem); }
h3{ font-size:clamp(1.15rem, 1.05rem + .5vw, 1.5rem); }
p{ margin:0 0 1em; color:var(--ink-soft); }
ul,ol{ margin:0 0 1em; padding-left:1.25em; color:var(--ink-soft); }
b,strong{ color:var(--ink); }
small{ font-size:.85em; }
hr{ border:none; border-top:1px solid var(--line); margin:2em 0; }
button{ font-family:inherit; }
:focus-visible{ outline:3px solid var(--blue-100); outline-offset:2px; border-radius:4px; }
.overflow-wrap{ overflow-wrap:break-word; word-break:break-word; }
* { overflow-wrap:break-word; }

.container{ width:100%; max-width:var(--container); margin:0 auto; padding:0 20px; }
@media (min-width:1280px){ .container{ padding:0 32px; } }

.section{ padding:56px 0; }
.section-sm{ padding:32px 0; }
.section-soft{ background:var(--bg-soft); }
@media (max-width:640px){ .section{ padding:36px 0; } }

.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:.8rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--blue-600); margin-bottom:12px;
}
.lead{ font-size:1.15rem; color:var(--ink-soft); }
.text-center{ text-align:center; }
.muted{ color:var(--muted); }

/* ================= Header ================= */
.site-header{
  position:sticky; top:0; z-index:60;
  background:var(--paper);
  border-bottom:1px solid var(--line);
}
.header-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; min-height:72px;
}
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:1.15rem; color:var(--ink); flex-shrink:0; }
.brand:hover{ text-decoration:none; }
.brand img{ width:36px; height:36px; }
.brand .brand-sub{ display:none; }

.main-nav{ display:flex; align-items:center; gap:28px; }
.main-nav a{ color:var(--ink-soft); font-weight:600; font-size:.95rem; white-space:nowrap; }
.main-nav a:hover{ color:var(--blue-600); text-decoration:none; }
.main-nav a.active{ color:var(--blue-600); }

.header-actions{ display:flex; align-items:center; gap:10px; flex-shrink:0; }

.burger{
  display:none; width:44px; height:44px; border:1px solid var(--line);
  border-radius:var(--r-sm); background:var(--paper); align-items:center; justify-content:center;
  cursor:pointer; flex-shrink:0;
}
.burger span, .burger span::before, .burger span::after{
  content:""; display:block; width:20px; height:2px; background:var(--ink); position:relative; transition:.2s;
}
.burger span::before{ position:absolute; top:-6px; }
.burger span::after{ position:absolute; top:6px; }
.burger[aria-expanded="true"] span{ background:transparent; }
.burger[aria-expanded="true"] span::before{ top:0; transform:rotate(45deg); }
.burger[aria-expanded="true"] span::after{ top:0; transform:rotate(-45deg); }

.nav-auth-mobile{ display:none; }

@media (max-width:1023px){
  .burger{ display:inline-flex; }
  .main-nav{
    position:fixed; inset:72px 0 0 0; background:var(--paper); flex-direction:column; align-items:flex-start;
    padding:24px 20px; gap:4px; overflow-y:auto; transform:translateX(100%); transition:transform .25s ease;
    box-shadow:var(--shadow-lg);
  }
  .main-nav.open{ transform:translateX(0); }
  .main-nav a{ width:100%; padding:14px 6px; border-bottom:1px solid var(--line); font-size:1.05rem; }
  .header-actions{ position:relative; }
  .header-actions .btn{ display:none; }
  .header-actions.show-mobile .btn{ display:inline-flex; }
  .nav-auth-mobile{ display:flex; gap:10px; width:100%; margin-top:16px; }
  .nav-auth-mobile .btn{ flex:1; }
}

/* Кабинетная шапка */
.cabinet-shell{ display:flex; min-height:100vh; flex-direction:column; }
.cabinet-header{ position:sticky; top:0; z-index:60; background:var(--paper); border-bottom:1px solid var(--line); }
.cabinet-header .header-row{ min-height:64px; }
.cabinet-nav{ display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.cabinet-nav a{
  color:var(--ink-soft); font-weight:600; font-size:.92rem; padding:8px 12px; border-radius:var(--r-pill);
  white-space:nowrap;
}
.cabinet-nav a:hover{ background:var(--bg-soft); text-decoration:none; }
.cabinet-nav a.active{ background:var(--blue-50); color:var(--blue-600); }
.user-box{ display:flex; align-items:center; gap:14px; flex-shrink:0; }
.user-name{ font-weight:700; font-size:.92rem; }
.user-role{ font-size:.78rem; color:var(--muted); display:block; }

.bell{
  position:relative; width:44px; height:44px; border-radius:var(--r-pill); border:1px solid var(--line);
  background:var(--paper); display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
}
.bell svg{ width:20px; height:20px; stroke:var(--ink); }
.bell .bell-count{
  position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 4px; border-radius:var(--r-pill);
  background:var(--orange-700); color:#fff; font-size:.68rem; font-weight:800; display:flex; align-items:center; justify-content:center;
}
.bell .bell-count[data-zero="true"]{ display:none; }

@media (max-width:1023px){
  .cabinet-nav{
    position:fixed; inset:64px 0 0 0; background:var(--paper); flex-direction:column; align-items:stretch;
    padding:16px 20px; gap:2px; overflow-y:auto; transform:translateX(100%); transition:transform .25s ease; box-shadow:var(--shadow-lg);
  }
  .cabinet-nav.open{ transform:translateX(0); }
  .cabinet-nav a{ border-radius:var(--r-sm); padding:14px 12px; border-bottom:1px solid var(--line); }
  .user-box .user-name-wrap{ display:none; }
}

/* ================= Footer ================= */
.site-footer{ background:var(--ink); color:#C9CEDB; margin-top:auto; }
.site-footer a{ color:#C9CEDB; }
.site-footer a:hover{ color:#fff; }
.footer-top{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; padding:48px 0 32px; }
.footer-brand{ display:flex; align-items:center; gap:10px; font-weight:800; color:#fff; font-size:1.1rem; margin-bottom:12px; }
.footer-brand img{ width:32px; height:32px; }
.footer-col h4{ color:#fff; font-size:.85rem; text-transform:uppercase; letter-spacing:.05em; margin-bottom:14px; }
.footer-col ul{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; font-size:.92rem; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.12); padding-top:20px; padding-bottom:20px; font-size:.82rem; color:#9AA1B4; }
.footer-bottom .req{ line-height:1.6; }
.footer-meta-note{ font-size:.78rem; color:#82899C; margin-top:8px; }
@media (max-width:900px){
  .footer-top{ grid-template-columns:1fr 1fr; }
}
@media (max-width:560px){
  .footer-top{ grid-template-columns:1fr; padding:36px 0 24px; }
}

/* ================= Buttons ================= */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 22px; border-radius:var(--r-pill); font-weight:700; font-size:.95rem;
  border:1px solid transparent; cursor:pointer; min-height:44px; white-space:nowrap;
  transition:.15s background,.15s border-color,.15s color,.15s transform;
  text-decoration:none;
}
.btn:hover{ text-decoration:none; }
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--blue-600); color:#fff; }
.btn-primary:hover{ background:var(--blue-700); }
.btn-secondary{ background:var(--orange-700); color:#fff; }
.btn-secondary:hover{ background:var(--orange-800); }
.btn-outline{ background:var(--paper); color:var(--ink); border-color:var(--line-strong); }
.btn-outline:hover{ border-color:var(--blue-500); color:var(--blue-600); }
.btn-ghost{ background:transparent; color:var(--ink-soft); }
.btn-ghost:hover{ background:var(--bg-soft); color:var(--ink); }
.btn-danger{ background:var(--red-bg); color:var(--red); }
.btn-danger:hover{ background:var(--red-line); }
.btn-sm{ padding:8px 16px; min-height:36px; font-size:.85rem; }
.btn-block{ width:100%; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }
.btn-group{ display:flex; gap:10px; flex-wrap:wrap; }

/* ================= Forms ================= */
.form-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:18px 20px; }
.form-grid .field.full{ grid-column:1 / -1; }
@media (max-width:720px){ .form-grid{ grid-template-columns:1fr; } }

.field{ display:flex; flex-direction:column; gap:6px; margin-bottom:18px; }
.form-grid .field{ margin-bottom:0; }
.field label{ font-weight:700; font-size:.9rem; color:var(--ink); }
.field .hint{ font-size:.8rem; color:var(--muted); }
.field .error-msg{ font-size:.82rem; color:var(--red); }

input[type=text],input[type=email],input[type=password],input[type=tel],
input[type=number],input[type=date],input[type=url],input[type=search],
select, textarea{
  width:100%; padding:12px 14px; border:1px solid var(--line-strong); border-radius:var(--r-md);
  font-family:inherit; font-size:1rem; color:var(--ink); background:var(--paper); min-height:48px;
}
textarea{ min-height:104px; resize:vertical; }
input:focus, select:focus, textarea:focus{ outline:none; border-color:var(--blue-500); box-shadow:0 0 0 4px var(--blue-50); }
input::placeholder, textarea::placeholder{ color:var(--faint); }

.checkbox-row, .radio-row{ display:flex; align-items:flex-start; gap:10px; font-size:.92rem; color:var(--ink-soft); }
.checkbox-row input, .radio-row input{ width:20px; height:20px; margin-top:2px; flex-shrink:0; accent-color:var(--blue-600); }
.radio-group{ display:flex; flex-direction:column; gap:10px; }
.radio-cards{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
@media (max-width:560px){ .radio-cards{ grid-template-columns:1fr; } }
.radio-card{
  border:1.5px solid var(--line-strong); border-radius:var(--r-md); padding:14px 16px; cursor:pointer;
  display:flex; gap:10px; align-items:flex-start;
}
.radio-card input{ margin-top:3px; accent-color:var(--blue-600); }
.radio-card:has(input:checked){ border-color:var(--blue-500); background:var(--blue-50); }
.radio-card strong{ display:block; font-size:.95rem; }
.radio-card span.desc{ font-size:.82rem; color:var(--muted); }

.file-drop{
  border:2px dashed var(--line-strong); border-radius:var(--r-md); padding:28px 16px; text-align:center;
  color:var(--muted); cursor:pointer; background:var(--bg-soft);
}
.file-drop.dragover{ border-color:var(--blue-500); background:var(--blue-50); }
.file-drop input[type=file]{ display:none; }
.file-preview{ margin-top:10px; display:flex; flex-wrap:wrap; gap:8px; }
.file-preview .chip{
  display:flex; align-items:center; gap:6px; background:var(--bg-soft); border:1px solid var(--line);
  border-radius:var(--r-pill); padding:6px 12px; font-size:.82rem;
}

.repeat-row{ display:flex; gap:10px; align-items:flex-start; margin-bottom:10px; }
.repeat-row > *{ flex:1; }
.repeat-row .btn{ flex:0 0 auto; margin-top:0; }
.tag-select{ display:flex; flex-wrap:wrap; gap:8px; }
.tag-select label{
  display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border:1.5px solid var(--line-strong);
  border-radius:var(--r-pill); font-size:.85rem; font-weight:600; color:var(--ink-soft); cursor:pointer;
}
.tag-select input{ accent-color:var(--blue-600); }
.tag-select label:has(input:checked){ border-color:var(--blue-500); background:var(--blue-50); color:var(--blue-700); }

.form-card{ background:var(--paper); border:1px solid var(--line); border-radius:var(--r-lg); padding:28px; box-shadow:var(--shadow-sm); }
@media (max-width:560px){ .form-card{ padding:20px; } }
.form-narrow{ max-width:480px; margin:0 auto; }
.form-actions{ display:flex; gap:12px; flex-wrap:wrap; margin-top:24px; }

/* ================= Cards ================= */
.card{ background:var(--paper); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow-sm); }
.card-pad{ padding:24px; }
.grid{ display:grid; gap:20px; }
.grid-2{ grid-template-columns:repeat(2,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-4{ grid-template-columns:repeat(4,1fr); }
.grid-6{ grid-template-columns:repeat(6,1fr); }
@media (max-width:1023px){ .grid-4{ grid-template-columns:repeat(2,1fr); } .grid-6{ grid-template-columns:repeat(3,1fr); } .grid-3{ grid-template-columns:repeat(2,1fr);} }
@media (max-width:640px){ .grid-2,.grid-3,.grid-4,.grid-6{ grid-template-columns:1fr; } }
@media (min-width:641px){
  .grid-2-task{ grid-template-columns:1.6fr .9fr; }
  .grid-2-finance{ grid-template-columns:.9fr 1.2fr; }
  .grid-2-dashboard{ grid-template-columns:1.3fr .9fr; }
}

/* ---- task card ---- */
.task-card{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--r-lg); padding:20px;
  box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:12px; transition:.15s box-shadow,.15s transform;
}
.task-card:hover{ box-shadow:var(--shadow-md); transform:translateY(-2px); }
.task-card-top{ display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.task-card h3{ font-size:1.05rem; margin-bottom:4px; }
.task-brand{ display:flex; align-items:center; gap:8px; font-size:.85rem; color:var(--muted); }
.stars{ color:var(--orange-600); font-size:.85rem; letter-spacing:1px; white-space:nowrap; }
.task-badges{ display:flex; flex-wrap:wrap; gap:6px; }
.task-stats{ display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; font-size:.86rem; padding:12px 0; border-top:1px dashed var(--line); border-bottom:1px dashed var(--line); }
.task-stats .stat-label{ color:var(--muted); display:block; font-size:.76rem; }
.task-stats .stat-val{ font-weight:800; color:var(--ink); }
.task-card-foot{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.slots{ font-size:.82rem; color:var(--muted); }

/* ================= Badges ================= */
.badge{
  display:inline-flex; align-items:center; gap:5px; padding:5px 11px; border-radius:var(--r-pill);
  font-size:.76rem; font-weight:700; white-space:nowrap; line-height:1.3;
}
.badge-blue{ background:var(--blue-50); color:var(--blue-700); }
.badge-orange{ background:var(--orange-50); color:var(--orange-600); }
.badge-gray{ background:var(--bg-soft-2); color:var(--ink-soft); }
.badge-green{ background:var(--green-bg); color:var(--green); }
.badge-yellow{ background:var(--yellow-bg); color:var(--yellow); }
.badge-red{ background:var(--red-bg); color:var(--red); }
.badge-outline{ background:transparent; border:1px solid var(--line-strong); color:var(--ink-soft); }
.platform-badge{ display:inline-flex; align-items:center; gap:6px; font-size:.8rem; font-weight:600; color:var(--ink-soft); }
.platform-badge svg{ width:16px; height:16px; flex-shrink:0; }

/* ================= Показатель с цветовой зоной (meter) ================= */
.meter{
  display:flex; align-items:center; gap:14px; padding:16px; border:1px solid var(--line); border-radius:var(--r-md);
  background:var(--paper);
}
.meter-ring{
  --pct:75; --zc: var(--green);
  width:56px; height:56px; border-radius:50%; flex-shrink:0; position:relative;
  background: conic-gradient(var(--zc) calc(var(--pct)*1%), var(--line) 0);
}
.meter-ring::after{
  content:""; position:absolute; inset:6px; border-radius:50%; background:var(--paper);
}
.meter-body{ min-width:0; }
.meter-value{ font-weight:800; font-size:1.15rem; color:var(--ink); }
.meter-name{ font-size:.82rem; color:var(--muted); margin-bottom:2px; }
.meter-zone{ display:inline-block; margin:4px 0 2px; }
.meter-explain{ font-size:.8rem; color:var(--ink-soft); margin:0; }
.meter.zone-green .meter-ring{ --zc:var(--green); }
.meter.zone-yellow .meter-ring{ --zc:var(--yellow); }
.meter.zone-red .meter-ring{ --zc:var(--red); }

.meter-list{ display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
@media (max-width:900px){ .meter-list{ grid-template-columns:1fr; } }

/* ================= KPI stat tiles (dashboards) ================= */
.stat-tile{ background:var(--paper); border:1px solid var(--line); border-radius:var(--r-lg); padding:20px; box-shadow:var(--shadow-sm); }
.stat-tile .stat-num{ font-size:1.7rem; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; }
.stat-tile .stat-label{ font-size:.85rem; color:var(--muted); margin-top:4px; }
.stat-tile.link{ display:block; }
.stat-tile.link:hover{ box-shadow:var(--shadow-md); text-decoration:none; }
.stat-tile .stat-flag{ margin-top:10px; }

/* ================= Флеш-сообщения ================= */
.flash{ border-radius:var(--r-md); padding:14px 18px; margin-bottom:20px; font-size:.92rem; display:flex; gap:10px; align-items:flex-start; }
.flash-success{ background:var(--green-bg); color:var(--green); border:1px solid var(--green-line); }
.flash-error{ background:var(--red-bg); color:var(--red); border:1px solid var(--red-line); }
.flash-warn{ background:var(--yellow-bg); color:var(--yellow); border:1px solid var(--yellow-line); }

/* ================= Таблицы ================= */
.table-wrap{ width:100%; overflow-x:auto; border:1px solid var(--line); border-radius:var(--r-lg); background:var(--paper); }
table{ width:100%; border-collapse:collapse; min-width:640px; }
table th, table td{ padding:14px 16px; text-align:left; font-size:.88rem; border-bottom:1px solid var(--line); white-space:nowrap; }
table th{ color:var(--muted); font-weight:700; font-size:.78rem; text-transform:uppercase; letter-spacing:.03em; background:var(--bg-soft); }
table td.wrap{ white-space:normal; }
table tr:last-child td{ border-bottom:none; }
table tr:hover td{ background:var(--bg-soft); }

@media (max-width:760px){
  .table-cards thead{ display:none; }
  .table-cards table{ display:block; width:100%; min-width:0; }
  .table-cards tbody, .table-cards tr, .table-cards td{ display:block; width:100%; }
  .table-cards .table-wrap{ border:none; background:none; }
  .table-cards tr{
    background:var(--paper); border:1px solid var(--line); border-radius:var(--r-md); margin-bottom:12px; padding:12px 14px;
    box-shadow:var(--shadow-sm);
  }
  .table-cards td{ display:flex; justify-content:space-between; gap:12px; border:none; padding:8px 0; white-space:normal; text-align:right; }
  .table-cards td::before{ content:attr(data-label); font-weight:700; color:var(--muted); font-size:.78rem; text-transform:uppercase; text-align:left; }
}

/* ================= Tabs ================= */
.tabs-nav{ display:flex; gap:6px; border-bottom:1px solid var(--line); overflow-x:auto; margin-bottom:24px; }
.tabs-nav button{
  background:none; border:none; padding:12px 18px; font-weight:700; font-size:.92rem; color:var(--muted);
  cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; min-height:44px;
}
.tabs-nav button.active{ color:var(--blue-600); border-color:var(--blue-600); }
.tab-panel{ display:none; }
.tab-panel.active{ display:block; }

/* ================= Accordion ================= */
.accordion-item{ border:1px solid var(--line); border-radius:var(--r-md); margin-bottom:12px; overflow:hidden; background:var(--paper); }
.accordion-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px; cursor:pointer;
  font-weight:700; background:var(--paper); border:none; width:100%; text-align:left; font-size:1rem; min-height:44px;
}
.accordion-head .step-num{
  display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%;
  background:var(--blue-50); color:var(--blue-600); font-size:.85rem; margin-right:10px; flex-shrink:0;
}
.accordion-head .chevron{ transition:transform .2s; flex-shrink:0; }
.accordion-item.open .chevron{ transform:rotate(180deg); }
.accordion-body{ display:none; padding:0 20px 22px; }
.accordion-item.open .accordion-body{ display:block; }

/* ================= Modal ================= */
.modal-backdrop{
  position:fixed; inset:0; background:rgba(15,18,25,.5); display:none; align-items:center; justify-content:center;
  z-index:200; padding:20px;
}
.modal-backdrop.open{ display:flex; }
.modal{ background:var(--paper); border-radius:var(--r-lg); padding:28px; max-width:480px; width:100%; box-shadow:var(--shadow-lg); max-height:90vh; overflow-y:auto; }
.modal-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.modal-close{ background:none; border:none; font-size:1.4rem; cursor:pointer; color:var(--muted); width:44px; height:44px; }

/* ================= Stepper ================= */
.stepper{ display:flex; gap:0; margin-bottom:28px; flex-wrap:wrap; }
.stepper .step{ flex:1; min-width:120px; text-align:center; position:relative; padding-top:34px; font-size:.82rem; color:var(--muted); font-weight:600; }
.stepper .step::before{
  content:""; position:absolute; top:10px; left:50%; transform:translateX(-50%); width:22px; height:22px; border-radius:50%;
  background:var(--bg-soft-2); border:2px solid var(--line-strong);
}
.stepper .step::after{ content:""; position:absolute; top:20px; left:calc(50% + 14px); right:calc(-50% + 14px); height:2px; background:var(--line-strong); }
.stepper .step:last-child::after{ display:none; }
.stepper .step.done{ color:var(--green); }
.stepper .step.done::before{ background:var(--green); border-color:var(--green); }
.stepper .step.done::after{ background:var(--green); }
.stepper .step.current{ color:var(--blue-600); }
.stepper .step.current::before{ background:var(--blue-600); border-color:var(--blue-600); }

@media (max-width:760px){
  .stepper{ flex-direction:column; flex-wrap:nowrap; gap:0; }
  .stepper .step{
    flex:none; min-width:0; width:100%; text-align:left; padding:6px 0 6px 44px; min-height:44px;
    display:flex; align-items:center;
  }
  .stepper .step::before{ top:6px; left:11px; transform:none; }
  .stepper .step::after{
    top:28px; left:21px; right:auto; width:2px; height:calc(100% - 6px); background:var(--line-strong);
  }
  .stepper .step.done::after{ background:var(--green); }
}

/* ================= Progress bar ================= */
.progress{ height:10px; border-radius:var(--r-pill); background:var(--bg-soft-2); overflow:hidden; }
.progress > span{ display:block; height:100%; background:var(--blue-500); border-radius:var(--r-pill); }
.progress.warn > span{ background:var(--orange-500); }
.progress.danger > span{ background:var(--red); }

/* ================= Timers / countdown ================= */
.deadline-timer{ display:inline-flex; align-items:center; gap:6px; font-weight:700; font-size:.85rem; color:var(--ink); }
.deadline-timer.urgent{ color:var(--red); }

/* ================= Sparkline ================= */
.sparkline{ width:100%; height:56px; display:block; }
.sparkline path.fill{ fill:var(--blue-50); }
.sparkline path.line{ fill:none; stroke:var(--blue-500); stroke-width:2; }

/* ================= Rating stars input ================= */
.star-input{ display:flex; gap:4px; font-size:1.6rem; }
.star-input label{ cursor:pointer; color:var(--line-strong); }
.star-input input{ display:none; }
.star-input input:checked ~ label{ color:var(--line-strong); }

/* ================= Pagination ================= */
.pagination{ display:flex; justify-content:center; gap:8px; margin-top:32px; flex-wrap:wrap; }
.pagination a, .pagination span{
  min-width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:var(--r-md); border:1px solid var(--line); font-weight:700; font-size:.9rem; color:var(--ink-soft);
}
.pagination a:hover{ border-color:var(--blue-500); color:var(--blue-600); text-decoration:none; }
.pagination .current{ background:var(--blue-600); color:#fff; border-color:var(--blue-600); }

/* ================= Hero ================= */
.hero{ padding:64px 0 40px; }
.hero-grid{ display:grid; grid-template-columns:1.1fr .9fr; gap:40px; align-items:center; }
.hero-media img{ border-radius:var(--r-lg); box-shadow:var(--shadow-md); width:100%; aspect-ratio:16/10; object-fit:cover; }
.hero-cta{ display:flex; gap:14px; flex-wrap:wrap; margin-top:26px; }
@media (max-width:1023px){ .hero-grid{ grid-template-columns:1fr; } .hero{ padding:40px 0 24px; } }

/* ================= Steps / how it works ================= */
.steps-cols{ display:grid; grid-template-columns:1fr 1fr; gap:32px; }
@media (max-width:900px){ .steps-cols{ grid-template-columns:1fr; } }
.steps-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:18px; }
.steps-list li{ display:flex; gap:14px; align-items:flex-start; }
.steps-list .num{
  flex-shrink:0; width:34px; height:34px; border-radius:50%; background:var(--blue-50); color:var(--blue-600);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:.95rem;
}
.steps-list p{ margin:0; color:var(--ink-soft); }
.steps-list strong{ display:block; margin-bottom:2px; color:var(--ink); }

/* ================= Platforms strip ================= */
.platform-strip{ display:flex; flex-wrap:wrap; gap:14px; justify-content:center; }
.platform-chip{
  display:flex; align-items:center; gap:8px; padding:12px 18px; border:1px solid var(--line); border-radius:var(--r-pill);
  font-weight:700; font-size:.9rem; background:var(--paper); box-shadow:var(--shadow-sm);
}
.platform-chip svg{ width:20px; height:20px; }

/* ================= Achievements ================= */
.achv-card{ display:flex; gap:14px; padding:18px; border:1px solid var(--line); border-radius:var(--r-md); background:var(--paper); }
.achv-card.locked{ opacity:.5; }
.achv-icon{ width:44px; height:44px; border-radius:50%; background:var(--orange-50); color:var(--orange-600); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.achv-icon svg{ width:22px; height:22px; }

/* ================= Review / case cards ================= */
.review-card{ border:1px solid var(--line); border-radius:var(--r-md); padding:18px; background:var(--paper); }
.review-head{ display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:8px; }

/* ================= Sidebar filters ================= */
.catalog-layout{ display:grid; grid-template-columns:260px 1fr; gap:28px; align-items:flex-start; }
@media (max-width:900px){ .catalog-layout{ grid-template-columns:1fr; } }
.filters{ background:var(--paper); border:1px solid var(--line); border-radius:var(--r-lg); padding:20px; position:sticky; top:88px; }
@media (max-width:900px){ .filters{ position:static; } }
.filters .field{ margin-bottom:16px; }
.filters h3{ font-size:1rem; margin-bottom:14px; }

/* ================= Misc utility ================= */
.flex{ display:flex; }
.flex-between{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.flex-wrap{ flex-wrap:wrap; }
.gap-8{ gap:8px; } .gap-12{ gap:12px; } .gap-16{ gap:16px; } .gap-24{ gap:24px; }
.mt-8{margin-top:8px;} .mt-16{margin-top:16px;} .mt-24{margin-top:24px;} .mt-32{margin-top:32px;}
.mb-0{margin-bottom:0;} .mb-8{margin-bottom:8px;} .mb-16{margin-bottom:16px;} .mb-24{margin-bottom:24px;}
.center{ text-align:center; }
.section-title{ max-width:640px; margin:0 auto 40px; }
.section-title.left{ margin:0 0 32px; }
.divider-line{ border-top:1px dashed var(--line); margin:20px 0; }
.empty-state{ text-align:center; padding:48px 20px; color:var(--muted); }
.empty-state svg{ width:56px; height:56px; margin:0 auto 16px; color:var(--faint); }
.kv-list{ display:flex; flex-direction:column; gap:10px; }
.kv-list .kv{ display:flex; justify-content:space-between; gap:12px; font-size:.92rem; padding-bottom:10px; border-bottom:1px dashed var(--line); }
.kv-list .kv span:first-child{ color:var(--muted); }
.kv-list .kv span:last-child{ font-weight:700; }

.legal h2{ margin-top:1.8em; }
.legal ul{ padding-left:1.4em; }
.legal .legal-meta{ color:var(--muted); font-size:.9rem; margin-bottom:2em; }

.meta-footnote{ font-size:.78rem; color:var(--muted); margin-top:12px; }

.auth-shell{ min-height:100vh; display:flex; flex-direction:column; }
.auth-main{ flex:1; display:flex; align-items:center; padding:40px 0; background:var(--bg-soft); }

.error-shell{ min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:40px 20px; }
.error-shell .code{ font-size:6rem; font-weight:800; color:var(--blue-100); line-height:1; }

@media (max-width:640px){
  .grid-2, .catalog-layout{ grid-template-columns:1fr; }
}
