/* Токены FitStars (skills/fitstars-dashboard-design): белые карточки с границами, без теней, веса 600/700/800. */
:root{
  --brand:#ef16b0; --brand-light:#ff90df;
  --sur-primary:#ffffff; --sur-secondary:#f8f8f8; --sur-tertiary:#f3f3f6;
  --txt-primary:#181d31; --txt-secondary:#414657; --txt-tertiary:#7a8096; --txt-passive:#a7aab7; --txt-inverted:#ffffff;
  --bord-primary:#d3d5da; --bord-secondary:#e7e7ec;
  --positive:#08c408; --warned:#fe434c; --interactive:#007aff; --gold:#d5910b;
  --lred:#FCEBEB; --lamber:#FAEEDA; --lgreen:#EAF3DE; --lblue:#E6F1FB;
  --dark:#181d31; --dark-bord:#2d3244;
  --r-xs:6px; --r-s:8px; --r-m:12px; --r-l:16px; --r-xl:24px; --r-pill:50px;
  --font:"Gilroy","Manrope",system-ui,-apple-system,sans-serif;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{-webkit-font-smoothing:antialiased; -webkit-text-size-adjust:100%;}
body{font-family:var(--font); background:var(--sur-tertiary); color:var(--txt-primary); line-height:1.5; min-height:100vh; font-size:16px; font-weight:600;}
a{color:var(--interactive);}
[hidden]{display:none !important;}
button,input,textarea,select{font:inherit; color:inherit;}

.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:52px; padding:0 24px; border:0; border-radius:var(--r-m); background:var(--brand); color:#fff; font-weight:800; font-size:16px; cursor:pointer; text-decoration:none;}
.btn:hover{filter:brightness(1.06);}
.btn:disabled{opacity:.55; cursor:default;}
.btn.ghost{background:var(--sur-primary); color:var(--txt-primary); border:1px solid var(--bord-primary);}
.btn.small{min-height:36px; padding:0 14px; font-size:13px; border-radius:var(--r-s);}
.btn.danger{background:var(--sur-primary); color:var(--warned); border:1px solid var(--bord-primary);}
.btn:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible{outline:3px solid var(--brand-light); outline-offset:2px;}

.field{display:block; margin-bottom:14px;}
.field > span{display:block; font-size:13px; font-weight:700; color:var(--txt-secondary); margin-bottom:6px;}
.field > small{display:block; font-size:12px; color:var(--txt-tertiary); margin-top:5px; font-weight:600;}
input[type=text],input[type=tel],input[type=password],input[type=number],input[type=date],textarea{width:100%; min-height:52px; padding:12px 14px; border:1px solid var(--bord-primary); border-radius:var(--r-m); background:var(--sur-primary); font-size:16px; font-weight:600;}
textarea{min-height:92px; resize:vertical; line-height:1.45;}
input::placeholder,textarea::placeholder{color:var(--txt-passive);}

.card{background:var(--sur-primary); border:1px solid var(--bord-secondary); border-radius:var(--r-l); padding:20px;}
.card + .card{margin-top:12px;}
.error{background:var(--lred); border-radius:var(--r-m); padding:12px 14px; font-size:14px; color:#a3202a; margin-bottom:14px;}
.note{font-size:13px; color:var(--txt-tertiary);}

/* ── Страница покупателя ───────────────────────────────────────────── */
.hero{background:var(--dark); color:var(--txt-inverted); padding:28px 20px 76px; position:relative; overflow:hidden;}
.hero::before{content:""; position:absolute; top:0; right:0; width:300px; height:300px; background:radial-gradient(circle,var(--brand) 0%,transparent 70%); opacity:.35; transform:translate(35%,-40%); pointer-events:none;}
.hero-in{max-width:560px; margin:0 auto; position:relative;}
.logo{font-weight:800; font-size:17px; letter-spacing:.2px; color:#fff; text-decoration:none;}
.logo b{color:var(--brand-light); font-weight:800;}
.hero h1{font-size:32px; font-weight:800; letter-spacing:-.4px; line-height:1.12; margin:22px 0 8px;}
.hero p{font-size:15px; color:#c9cbd6; max-width:440px;}
.shell{max-width:560px; margin:-52px auto 0; padding:0 16px 48px; position:relative;}
.banner{background:var(--lamber); border-radius:var(--r-m); padding:14px 16px; font-size:14px; color:#6b4a06; margin-bottom:12px; white-space:pre-line;}

.status{border-top:3px solid var(--brand);}
.status.good{border-top-color:var(--positive);}
.status.warn{border-top-color:var(--gold);}
.status.bad{border-top-color:var(--warned);}
.status .num{font-size:13px; color:var(--txt-tertiary); font-weight:700;}
.status h2{font-size:26px; font-weight:800; letter-spacing:-.3px; line-height:1.15; margin:4px 0 8px;}
.status .msg{font-size:15px; color:var(--txt-secondary);}
.eta{margin-top:16px; padding-top:16px; border-top:1px solid var(--bord-secondary);}
.eta .big{font-size:19px; font-weight:800; line-height:1.25;}
.eta .sub{font-size:15px; color:var(--txt-secondary); margin-top:4px;}
.eta .note{margin-top:8px;}

.delay{border-left:3px solid var(--gold); background:var(--lamber); border-color:var(--lamber); border-left-color:var(--gold);}
.delay .cap{font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; color:#8a5e07;}
.delay h3{font-size:18px; font-weight:800; margin:4px 0 6px; line-height:1.25;}
.delay p{font-size:15px; color:#4d3a10; white-space:pre-line;}
.delay .note{margin-top:8px; color:#8a6b2a;}

.card h3.t{font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; color:var(--txt-tertiary); margin-bottom:14px;}
.steps{list-style:none;}
/* Кружок 22px с центром на 11px, линия 2px на 10–12px: рамка внутри размера (у ::before/::after свой box-sizing,
   `*` на псевдоэлементы не действует — из-за этого текущий кружок раньше раздувался до 32px и наезжал на текст). */
.steps li{position:relative; padding:0 0 20px 38px; font-size:16px; font-weight:700; line-height:24px; color:var(--txt-passive);}
.steps li:last-child{padding-bottom:0;}
.steps li::before,.steps li::after{content:""; position:absolute; box-sizing:border-box;}
.steps li::before{left:0; top:1px; width:22px; height:22px; border-radius:50%; border:2px solid var(--bord-primary); background:var(--sur-primary); z-index:1;}
.steps li::after{left:10px; top:23px; bottom:-1px; width:2px; background:var(--bord-secondary);}
.steps li:last-child::after{display:none;}
.steps li.done{color:var(--txt-primary);}
.steps li.done::before{border-color:var(--positive); background:var(--positive) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;}
.steps li.done::after{background:var(--positive);}
.steps li.current{color:var(--txt-primary);}
.steps li.current::before{border-color:var(--brand); background:var(--brand); box-shadow:inset 0 0 0 4px var(--sur-primary), 0 0 0 4px rgba(239,22,176,.14);}
.steps li small{display:block; font-size:13px; font-weight:600; line-height:18px; margin-top:2px; color:var(--txt-tertiary);}
.steps li.current small{color:var(--brand);}

.rows{list-style:none;}
.rows li{display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--bord-secondary); font-size:15px;}
.rows li:last-child{border-bottom:0; padding-bottom:0;}
.rows li:first-child{padding-top:0;}
.rows li span:last-child{color:var(--txt-tertiary); white-space:nowrap;}
.kv{font-size:15px; color:var(--txt-secondary);}
.kv b{display:block; color:var(--txt-primary); font-weight:800;}
.kv + .kv{margin-top:10px;}
.track-num{font-size:20px; font-weight:800; letter-spacing:.3px; margin:2px 0 12px; word-break:break-all;}
.actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:16px;}
.actions .btn{flex:1 1 180px;}
#support{margin-top:12px;}
.support a{font-weight:800;}
.foot{text-align:center; font-size:12px; color:var(--txt-passive); margin-top:24px;}

/* ── Админка ──────────────────────────────────────────────────────── */
.admin{max-width:1080px; margin:0 auto; padding:24px 20px 60px;}
.admin-top{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:20px;}
.admin-top h1{font-size:24px; font-weight:800; letter-spacing:-.3px;}
.admin-top .who{font-size:13px; color:var(--txt-tertiary); display:flex; align-items:center; gap:10px;}
.tabs{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:18px;}
.tabs button{border:1px solid var(--bord-primary); background:var(--sur-primary); border-radius:var(--r-pill); padding:9px 16px; font-size:14px; font-weight:700; cursor:pointer;}
.tabs button.on{background:var(--dark); color:#fff; border-color:var(--dark);}
.login{max-width:400px; margin:12vh auto 0; padding:0 16px;}
.login h1{font-size:24px; font-weight:800; margin-bottom:6px;}
.login p{font-size:14px; color:var(--txt-tertiary); margin-bottom:18px;}
.head{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px;}
.head h2{font-size:20px; font-weight:800;}
.head p{font-size:13px; color:var(--txt-tertiary); flex:1 1 100%;}
.admin input[type=text],.admin input[type=number],.admin input[type=date],.admin input[type=password]{min-height:44px; padding:9px 12px; font-size:15px;}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:0 14px;}
.grid4{display:grid; grid-template-columns:repeat(4,1fr); gap:0 14px;}
@media (max-width:720px){ .grid2,.grid4{grid-template-columns:1fr 1fr;} }
fieldset{border:1px solid var(--bord-secondary); border-radius:var(--r-m); padding:14px 14px 2px; margin-bottom:14px;}
legend{font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; color:var(--txt-tertiary); padding:0 6px;}
fieldset > p{font-size:13px; color:var(--txt-tertiary); margin-bottom:12px;}
.check{display:flex; align-items:center; gap:8px; font-size:14px; font-weight:700; margin-bottom:14px;}
.check input{width:18px; height:18px;}
.notice{border-left:3px solid var(--gold);}
.notice.off{border-left-color:var(--bord-primary); opacity:.7;}
.notice.stale{border-left-color:var(--warned);}
.notice h3{font-size:17px; font-weight:800; line-height:1.25;}
.notice .txt{font-size:14px; color:var(--txt-secondary); margin-top:4px; white-space:pre-line;}
.notice .meta{display:flex; gap:6px; flex-wrap:wrap; margin-top:10px;}
.notice .by{font-size:12px; color:var(--txt-passive); margin-top:10px;}
.notice .ops{display:flex; gap:8px; margin-top:12px;}
.badge{display:inline-block; font-size:12px; font-weight:700; padding:3px 9px; border-radius:var(--r-pill); background:var(--sur-tertiary); color:var(--txt-secondary);}
.badge.good{background:var(--lgreen); color:#2f6b0a;}
.badge.warn{background:var(--lred); color:#a3202a;}
.badge.gold{background:var(--lamber); color:#8a5e07;}
.badge.blue{background:var(--lblue); color:#1c5a96;}
.card.flush{padding:0; overflow-x:auto;}
table{width:100%; border-collapse:collapse;}
th{font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--txt-tertiary); text-align:left; padding:10px 14px; border-bottom:1px solid var(--bord-secondary); font-weight:700; white-space:nowrap;}
td{font-size:13px; padding:10px 14px; border-bottom:1px solid var(--bord-secondary); vertical-align:middle;}
tr:last-child td{border-bottom:0;}
td.r,th.r{text-align:right; white-space:nowrap;}
td .sku{display:block; font-size:11px; color:var(--txt-passive);}
.strip{display:flex; gap:28px; flex-wrap:wrap; margin-bottom:14px;}
.strip div{font-size:12px; color:var(--txt-tertiary); font-weight:700; text-transform:uppercase; letter-spacing:.4px;}
.strip b{display:block; font-size:26px; font-weight:800; color:var(--txt-primary); line-height:1.1; letter-spacing:0; text-transform:none;}
.empty{font-size:14px; color:var(--txt-tertiary);}
td.empty{padding:16px 14px;}
.preview{max-width:560px;}
.inline{display:flex; gap:10px; align-items:flex-start; flex-wrap:wrap; margin-bottom:14px;}
.inline input{flex:1 1 180px; max-width:260px;}
.inline .btn{min-height:44px;}
.saved{font-size:13px; color:#2f6b0a; font-weight:700;}

/* ── Оформленный текст (жирный, ссылки, шрифт) ─────────────────────
   Вес 500, а не 600 страницы: у Manrope 500 не загружен, браузер рисует тем же 600, но <b> даёт 700, а редактор
   не считает весь текст уже жирным (порог жирного у браузера — 600). */
.rich{font-weight:500;}
.rich b{display:inline; font-weight:700; color:inherit;}
.rich a{color:var(--interactive); text-decoration:underline; font-weight:inherit;}
.kv.rich{white-space:pre-line;}
.f-serif, .rich font[face="PT Serif"]{font-family:"PT Serif",Georgia,serif;}
.f-hand, .rich font[face="Caveat"]{font-family:"Caveat",cursive; font-size:1.3em; line-height:1.1;}
.f-mono, .rich font[face="PT Mono"]{font-family:"PT Mono",ui-monospace,monospace; font-size:.92em;}

/* ── Редактор текста в админке ──────────────────────────────────── */
.rte{border:1px solid var(--bord-primary); border-radius:var(--r-m); background:var(--sur-primary); overflow:hidden;}
.rte:focus-within{border-color:var(--brand-light); box-shadow:0 0 0 2px var(--brand-light);}
.rte-bar{display:flex; gap:4px; flex-wrap:wrap; align-items:center; padding:6px; border-bottom:1px solid var(--bord-secondary); background:var(--sur-secondary);}
.rte-btn{min-width:34px; height:34px; padding:0 10px; border:1px solid transparent; border-radius:var(--r-s); background:transparent; font-size:15px; font-weight:700; cursor:pointer;}
.rte-btn:hover{background:var(--sur-primary); border-color:var(--bord-primary);}
.rte-btn[aria-pressed="true"], .rte-btn.on{background:var(--dark); border-color:var(--dark); color:#fff;}
.rte-btn.wide{font-size:13px;}
.rte-font{height:34px; padding:0 8px; margin-left:4px; border:1px solid var(--bord-primary); border-radius:var(--r-s); background:var(--sur-primary); font-size:13px; font-weight:700; cursor:pointer;}
.rte-link{display:flex; gap:6px; flex-wrap:wrap; align-items:center; padding:8px; border-bottom:1px solid var(--bord-secondary); background:var(--lblue);}
.admin .rte-link input.rte-url{flex:1 1 260px; width:auto; min-height:36px; padding:6px 10px; font-size:14px; border-radius:var(--r-s);}
.rte-err{flex:1 1 100%; font-size:12px; color:#a3202a;}
.rte-err:empty{display:none;}
.rte-area{position:relative; min-height:150px; max-height:520px; overflow-y:auto; padding:12px 14px; font-size:16px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; outline:none;}
.rte-area.empty::before{content:attr(data-placeholder); position:absolute; left:14px; right:14px; color:var(--txt-passive); pointer-events:none;}
.rte .rte-count{display:block; text-align:right; padding:0 10px 6px; font-size:12px; font-weight:600; color:var(--txt-tertiary);}
.rte .rte-count.over{color:var(--warned); font-weight:800;}
