/* ASIA.SHIP — стили сайта.
   Токены в :root, тёмная тема в [data-theme="dark"].
   Брейкпоинты: 640 (планшет) и 1024 (ноутбук). */
:root { --logo-light: url("../assets/logo.png"); --logo-dark: url("../assets/logo-dark.png");
         --logo-white: url("../assets/logo-white.png"); --mark: url("../assets/dragon.png"); }
:root {
  --red: #FF1027; --red-deep: #c90d1f; --blue: #1663B0; --blue-deep: #0f4a86; --tg: #2AABEE;
  --ink: #0d0d0d; --muted: #6f757d; --faint: #a9aeb5;
  --rule: #e4e7ea; --band: #f4f5f7; --paper: #ffffff; --page: #eef0f2;
  --green: #1a8a52; --amber: #b8730f;
  --pill-transit: #fdf1de; --pill-done: #e3f5ea; --pill-new: #eceef1;
  --tint-red: rgba(255,16,39,.09); --tint-blue: rgba(22,99,176,.1);
  --logo-src: var(--logo-light);
}
[data-theme="dark"] {
  --ink: #f2f3f5; --muted: #949aa2; --faint: #5f656d;
  --rule: #2a2e33; --band: #1f2226; --paper: #17191c; --page: #0e1012;
  --green: #34c07a; --amber: #e3a646; --blue: #4a9de8;
  --pill-transit: rgba(227,166,70,.15); --pill-done: rgba(52,192,122,.15); --pill-new: #24282d;
  --tint-red: rgba(255,16,39,.15); --tint-blue: rgba(74,157,232,.15);
  --logo-src: var(--logo-dark);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Manrope', system-ui, sans-serif; background: var(--paper); color: var(--ink);
       font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.page { display: none; }
.page.active { display: block; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }

.logo { width: 128px; height: 36px; background: var(--logo-src) no-repeat left center / contain; flex-shrink: 0; }

/* ── Кнопки ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px;
       padding: 0 20px; border-radius: 12px; font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); }
.btn-line { border: 1.5px solid var(--rule); color: var(--ink); background: var(--paper); }
.btn-line:hover { border-color: var(--faint); }
.btn-tg { background: var(--tg); color: #fff; width: 100%; height: 52px; font-size: 15px; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }

/* ═════════════════════ ЛЕНДИНГ ═════════════════════ */
.lp-head { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.lp-head .wrap { display: flex; align-items: center; height: 66px; gap: 28px; }
.lp-nav { display: none; gap: 28px; margin-left: auto; }
.lp-nav a { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; cursor: pointer; }
.lp-nav a:hover { color: var(--ink); }
.lp-head .btn { margin-left: auto; }
@media (min-width: 1024px) { .lp-nav { display: flex; } .lp-head .btn { margin-left: 0; } }

/* Первый экран: дракон — главный и единственный громкий элемент сайта */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero-dragon { position: absolute; width: 420px; height: 760px; right: -150px; top: -40px;
               background: var(--mark) no-repeat center / contain; opacity: .1; pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 40px; padding-top: 44px; padding-bottom: 52px; }
.hero h1 { font-size: 34px; line-height: 1.06; font-weight: 800; letter-spacing: -.035em; max-width: 12ch; }
.hero-lead { font-size: 15.5px; color: var(--muted); line-height: 1.6; margin-top: 18px; max-width: 46ch; }
.hero-cta { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
@media (max-width: 639px) { .hero-cta .btn { width: 100%; } }

.tracker { position: relative; background: var(--paper); border: 1px solid var(--rule); border-radius: 22px;
           padding: 20px; box-shadow: 0 24px 50px -24px rgba(13,13,13,.28); max-width: 420px; }
.tracker-top { display: flex; align-items: center; justify-content: space-between; }
.tracker-mode { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--red); }
.tracker-mode svg { width: 16px; height: 16px; }
.tracker-num { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tracker-route { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 20px; }
.tracker-route b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.tracker-route span { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.tracker-route .to { text-align: right; }
.tracker-line { flex: 1; height: 2px; margin: 0 14px; background: var(--rule); position: relative; align-self: center; }
.tracker-line::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 58%; background: var(--red); }
.tracker-line i { position: absolute; left: 58%; top: 50%; width: 12px; height: 12px; border-radius: 50%;
                  background: var(--red); transform: translate(-50%, -50%); box-shadow: 0 0 0 5px var(--tint-red); }
.tracker-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 14px; }
.tracker-foot div span { font-size: 11.5px; color: var(--muted); display: block; }
.tracker-foot div b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (min-width: 640px) {
  .hero h1 { font-size: 46px; }
  .hero-dragon { width: 520px; height: 940px; right: -160px; }
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; padding-top: 88px; padding-bottom: 96px; }
  .hero h1 { font-size: 60px; }
  .hero-dragon { width: 640px; height: 1150px; right: -120px; top: -140px; opacity: .12; }
  .tracker { justify-self: end; width: 100%; }
}

.sec { padding: 60px 0; }
.sec + .sec { border-top: 1px solid var(--rule); }
.sec.sec-cta { border-top: 0; padding-top: 0; }
.sec-title { font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; max-width: 22ch; }
.sec-lead { font-size: 15px; color: var(--muted); margin-top: 10px; max-width: 52ch; line-height: 1.6; }
.sec-head { margin-bottom: 32px; }
@media (min-width: 1024px) {
  .sec { padding: 96px 0; }
  .sec-title { font-size: 38px; }
  .sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 48px; }
  .sec-head .sec-lead { margin-top: 0; }
}

/* Услуги — список с разделителями, а не сетка одинаковых карточек */
.svc-list { display: grid; }
.svc { display: flex; gap: 16px; padding: 20px 0; border-top: 1px solid var(--rule); }
.svc-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--tint-red); color: var(--red);
          display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.svc-ic svg { width: 20px; height: 20px; }
.svc h3 { font-size: 16px; font-weight: 700; }
.svc p { font-size: 14px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
@media (min-width: 768px) { .svc-list { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
@media (min-width: 1024px) { .svc-list { grid-template-columns: repeat(3, 1fr); } }

/* Два способа доставки — крупные цветные панели, цвет = тип доставки во всём продукте */
.modes { display: grid; gap: 14px; }
.mode { position: relative; overflow: hidden; border-radius: 26px; padding: 30px 26px 28px; color: #fff; min-height: 300px;
        display: flex; flex-direction: column; }
.mode.truck { background: var(--red); }
.mode.air { background: #1663B0; }
.mode-big { position: absolute; right: -36px; bottom: -44px; width: 230px; height: 230px; opacity: .16; }
.mode-big svg { width: 100%; height: 100%; }
.mode-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; opacity: .9; }
.mode-tag svg { width: 17px; height: 17px; }
.mode h3 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; margin-top: 14px; }
.mode p { font-size: 14.5px; line-height: 1.6; opacity: .9; margin-top: 8px; max-width: 34ch; }
.mode ul { list-style: none; margin-top: auto; padding-top: 22px; display: grid; gap: 8px; position: relative; }
.mode li { display: flex; gap: 9px; font-size: 14px; font-weight: 600; }
.mode li svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; opacity: .85; }
@media (min-width: 768px) { .modes { grid-template-columns: 1fr 1fr; } .mode { padding: 36px 34px 34px; min-height: 340px; } }

/* Как работаем — это реальная последовательность, поэтому номера и линия */
.steps { display: grid; gap: 0; position: relative; }
.step { position: relative; padding: 0 0 28px 48px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 0; width: 2px; background: var(--rule); }
.step:last-child::before { display: none; }
.step-n { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
          background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 800;
          display: flex; align-items: center; justify-content: center; }
.step:last-child .step-n { background: var(--red); color: #fff; }
.step h3 { font-size: 16px; font-weight: 700; padding-top: 5px; }
.step p { font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.55; max-width: 38ch; }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .step { padding: 50px 0 0; }
  .step::before { left: 34px; right: -28px; top: 15px; bottom: auto; width: auto; height: 2px; }
  .step-n { top: 0; }
}

.cta { position: relative; overflow: hidden; border-radius: 26px; background: var(--ink); color: var(--paper);
       padding: 34px 26px; display: grid; gap: 22px; }
[data-theme="dark"] .cta { background: var(--band); color: var(--ink); }
.cta-dragon { position: absolute; right: -60px; top: -80px; width: 260px; height: 470px;
              background: var(--mark) no-repeat center / contain; opacity: .22; }
.cta h2 { position: relative; font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; max-width: 18ch; }
.cta p { position: relative; font-size: 14.5px; opacity: .72; margin-top: 8px; max-width: 40ch; }
.cta .btn { position: relative; justify-self: start; }
@media (min-width: 1024px) { .cta { grid-template-columns: 1fr auto; align-items: center; padding: 52px 56px; }
                             .cta h2 { font-size: 34px; } }

.lp-foot { border-top: 1px solid var(--rule); padding: 32px 0 40px; }
.lp-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.socials { display: flex; gap: 18px; flex-wrap: wrap; }
.social { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.social svg { width: 22px; height: 22px; color: var(--red); }
.copy { font-size: 12.5px; color: var(--faint); width: 100%; }
@media (min-width: 1024px) { .socials { margin-left: auto; } .copy { width: auto; } }

/* ═════════════════════ ВХОД ═════════════════════ */
.login { min-height: 100vh; display: grid; background: var(--page); }
.login-brand { display: none; position: relative; overflow: hidden; background: var(--red); }
.login-brand .dr { position: absolute; right: -120px; bottom: -120px; width: 520px; height: 940px;
                   background: var(--mark) no-repeat center / contain; opacity: .13; filter: brightness(0) invert(1); }
.login-brand .lg { position: absolute; left: 56px; top: 52px; width: 190px; height: 54px;
                   background: var(--logo-white) no-repeat left center / contain; }
.login-brand h2 { position: absolute; left: 56px; bottom: 60px; right: 56px; color: #fff;
                  font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.08; max-width: 13ch; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 28px 20px; }
.login-card { width: 100%; max-width: 400px; background: var(--paper); border: 1px solid var(--rule);
              border-radius: 24px; padding: 34px 26px 28px; }
.login-card .logo { margin: 0 auto 26px; background-position: center; }
.login-card h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; text-align: center; }
.login-card .lead { font-size: 14px; color: var(--muted); text-align: center; margin: 8px auto 26px; max-width: 30ch; line-height: 1.55; }
.login-note { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--band);
              font-size: 13px; color: var(--muted); line-height: 1.55; }
.login-note b { color: var(--ink); font-weight: 700; }
.login-back { display: block; text-align: center; margin-top: 20px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.nf-ic { width: 60px; height: 60px; border-radius: 18px; background: var(--tint-red); color: var(--red);
         display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.nf-ic svg { width: 28px; height: 28px; }
.nf-who { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -8px auto 24px;
          font-size: 14px; font-weight: 700; padding: 9px 16px; border-radius: 100px; background: var(--band); width: fit-content; }
.nf-who svg { width: 16px; height: 16px; color: var(--tg); }
.stack { display: grid; gap: 10px; }
.stack .btn { width: 100%; }
@media (min-width: 1024px) {
  .login { grid-template-columns: 1fr 1fr; }
  .login-brand { display: block; }
  .login-card { border: 0; background: transparent; padding: 0; }
  .login-side { background: var(--paper); }
  .login-card .logo { display: none; }
  .login-card h1, .login-card .lead { text-align: left; margin-left: 0; }
  .nf-ic, .nf-who { margin-left: 0; }
  .login-back { text-align: left; }
}

/* ═════════════════════ ОБОЛОЧКА КАБИНЕТА И АДМИНКИ ═════════════════════ */
.shell { min-height: 100vh; display: flex; background: var(--page); }
.side { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
          height: 62px; padding: 0 16px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.topbar .logo { width: 112px; height: 32px; }
.topbar h1 { display: none; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--band); color: var(--muted);
      display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; flex-shrink: 0; }
.av.red { background: var(--red); color: #fff; }
.admin-pill { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 100px; background: var(--ink); color: var(--paper); }

.tnav { display: none; gap: 4px; padding: 0 24px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.tnav a { display: flex; align-items: center; gap: 8px; padding: 13px 14px; font-size: 14px; font-weight: 600;
          color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tnav a svg { width: 17px; height: 17px; }
.tnav a.on { color: var(--ink); border-bottom-color: var(--red); }

.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; background: var(--paper);
        border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
.bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 12px;
          color: var(--faint); font-size: 10.5px; font-weight: 700; cursor: pointer; }
.bnav a svg { width: 22px; height: 22px; }
.bnav a.on { color: var(--red); }

.content { padding: 18px 16px 100px; width: 100%; max-width: 1200px; }
.content-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.content-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }

@media (min-width: 640px) {
  .tnav { display: flex; }
  .bnav { display: none; }
  .topbar { padding: 0 24px; }
  .content { padding: 26px 24px 48px; }
}
@media (min-width: 1024px) {
  .side { display: flex; flex-direction: column; width: 256px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
          padding: 22px 16px; background: var(--paper); border-right: 1px solid var(--rule); }
  .side .logo { margin: 2px 10px 30px; }
  .side-sec { font-size: 12px; font-weight: 700; color: var(--faint); padding: 0 12px; margin: 6px 0 8px; }
  .side a { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 12px; font-size: 14.5px;
            font-weight: 600; color: var(--muted); cursor: pointer; }
  .side a svg { width: 19px; height: 19px; }
  .side a:hover { color: var(--ink); }
  .side a.on { background: var(--band); color: var(--ink); }
  .side a.on svg { color: var(--red); }
  .side-user { margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 14px 12px 4px; border-top: 1px solid var(--rule); }
  .side-user b { display: block; font-size: 13.5px; font-weight: 700; }
  .side-user span { display: block; font-size: 12px; color: var(--muted); }
  .tnav { display: none; }
  .topbar { height: 72px; padding: 0 40px; }
  .topbar .logo { display: none; }
  .topbar h1 { display: block; }
  .content { padding: 32px 40px 56px; }
}

.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 18px; }
.panel-pad { padding: 20px; }
@media (min-width: 1024px) { .panel-pad { padding: 26px; } }
.panel-title { font-size: 15px; font-weight: 700; }
.panel-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Кабинет: баннер с кодом ── */
.code-banner { position: relative; overflow: hidden; border-radius: 20px; padding: 20px 22px; color: #fff; margin-bottom: 18px;
               background: linear-gradient(135deg, var(--red), var(--red-deep)); display: grid; gap: 18px; }
.code-banner .dr { position: absolute; right: -30px; top: -34px; width: 130px; height: 235px;
                   background: var(--mark) no-repeat center / contain; opacity: .18; filter: brightness(0) invert(1); }
.code-banner .lbl { font-size: 12.5px; font-weight: 600; opacity: .85; }
.code-banner .val { font-size: 30px; font-weight: 800; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.code-banner .who { font-size: 13px; opacity: .85; }
.code-stats { display: none; position: relative; }
.code-stats div span { display: block; font-size: 12px; opacity: .8; }
.code-stats div b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) {
  .code-banner { grid-template-columns: 1fr auto; align-items: end; padding: 26px 30px; }
  .code-stats { display: flex; gap: 36px; }
  .code-banner .dr { opacity: .1; }
}
@media (min-width: 1024px) { .code-banner .dr { right: auto; left: 44%; opacity: .18; } }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 100px; border: 1px solid var(--rule);
        color: var(--muted); background: var(--paper); cursor: pointer; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px;
          border: 1px solid var(--rule); background: var(--paper); color: var(--muted); font-size: 13.5px; min-width: 220px; }
.search svg { width: 16px; height: 16px; }

/* Таблица на широких экранах, карточки на узких */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: left; padding: 13px 18px;
          border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tbl td { padding: 15px 18px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--band); }
.tbl .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .m { color: var(--muted); }
.tbl-scroll { overflow-x: auto; }
.mode-ic { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.mode-ic svg { width: 17px; height: 17px; }

.wide { display: none; }
.narrow { display: grid; gap: 8px; }
@media (min-width: 768px) { .wide { display: block; } .narrow { display: none; } }

.card { display: flex; align-items: center; gap: 12px; padding: 13px; background: var(--paper);
        border: 1px solid var(--rule); border-radius: 14px; cursor: pointer; }
.card-ic { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-ic svg { width: 19px; height: 19px; }
.card-ic.t { background: var(--tint-red); color: var(--red); }
.card-ic.a { background: var(--tint-blue); color: var(--blue); }
.card-body { flex: 1; min-width: 0; }
.card-body b { display: block; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card-body span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }

.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 100px; white-space: nowrap; }
.pill.transit { background: var(--pill-transit); color: var(--amber); }
.pill.done { background: var(--pill-done); color: var(--green); }
.pill.new { background: var(--pill-new); color: var(--muted); }

/* ── Детали отправления ── */
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted);
        margin-bottom: 16px; cursor: pointer; }
.back svg { width: 18px; height: 18px; }
.detail { display: grid; gap: 14px; }
@media (min-width: 1024px) { .detail { grid-template-columns: 1fr 380px; align-items: start; gap: 20px; } }
.d-mode { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--red); }
.d-mode svg { width: 17px; height: 17px; }
.d-sum { font-size: 36px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.d-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.d-meta b { color: var(--ink); font-weight: 700; }

.track { margin-top: 26px; display: grid; }
.tr-step { display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; position: relative; padding-bottom: 20px; }
.tr-step:last-child { padding-bottom: 0; }
.tr-step::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--rule); }
.tr-step.done::before { background: var(--green); }
.tr-step:last-child::before { display: none; }
.tr-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
          background: var(--paper); border: 2px solid var(--rule); position: relative; z-index: 1; }
.tr-dot svg { width: 14px; height: 14px; color: #fff; }
.tr-step.done .tr-dot { background: var(--green); border-color: var(--green); }
.tr-step.now .tr-dot { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 5px var(--pill-transit); }
.tr-step.now .tr-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.tr-step b { font-size: 14.5px; font-weight: 700; display: block; padding-top: 3px; }
.tr-step span { font-size: 13px; color: var(--muted); }
.tr-step.later b { color: var(--muted); font-weight: 600; }
.tr-date { font-size: 13px; color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }

.items { display: grid; }
.item { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.item span:first-child { color: var(--muted); }
.item span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item.total { border-bottom: 0; padding-top: 14px; font-size: 16px; }
.item.total span { color: var(--ink); font-weight: 800; }

/* ── Профиль ── */
.prof { display: flex; align-items: center; gap: 16px; }
.prof .av { width: 60px; height: 60px; font-size: 19px; background: var(--red); color: #fff; }
.prof b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.prof span { display: block; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.stat { background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; padding: 16px 18px; }
.stat > span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat > b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat i { display: block; font-style: normal; font-size: 12px; color: var(--faint); margin-top: 1px; }
.stat > b.up { color: var(--green); }
.level-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.level-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.level-name svg { width: 19px; height: 19px; color: var(--red); }
.soon { font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--band); padding: 4px 10px; border-radius: 100px; }
.bar { height: 8px; border-radius: 100px; background: var(--band); margin-top: 16px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 62%; border-radius: 100px; background: var(--red); }
.level-note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.rows a { display: flex; align-items: center; gap: 13px; padding: 15px 20px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.rows a + a { border-top: 1px solid var(--rule); }
.rows a svg { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.rows a .end { margin-left: auto; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.gap { display: grid; gap: 14px; }
@media (min-width: 1024px) { .gap { gap: 20px; } .two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; } }

/* ── Админка ── */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 190px; margin-top: 22px; }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.col i { width: 100%; max-width: 46px; border-radius: 8px 8px 4px 4px; background: var(--rule); }
.col.cur i { background: var(--red); }
.col span { font-size: 12px; color: var(--muted); font-weight: 600; }
.col.cur span { color: var(--ink); }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sel { height: 32px; padding: 0 30px 0 12px; border-radius: 9px; border: 1px solid var(--rule); background: var(--paper);
       color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; appearance: none;
       background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
       background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px; background-repeat: no-repeat; }
.yes { color: var(--green); font-weight: 700; }
.no { color: var(--faint); font-weight: 600; }
.margin { color: var(--green); font-weight: 700; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1; }
@media (min-width: 768px) { .toolbar .search { flex: 0 1 300px; } .toolbar .btn { margin-left: auto; } }

.card-adm { display: grid; grid-template-columns: 40px 1fr; align-items: start; }
.card-adm .sel { grid-column: 1 / -1; width: 100%; height: 38px; background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; }
.card-adm .card-body span.sum { color: var(--ink); font-weight: 700; margin-top: 4px; }
.stat i b { display: inline; font-size: inherit; font-weight: 700; color: var(--ink); }

/* ═════════════════════ Из доработанного приложения ═════════════════════ */
/* На телефоне фон плоский белый, как в Mini App; панели держатся на рамках */
@media (max-width: 639px) { .shell { background: var(--paper); } }

/* Полоса объявления над шапкой лендинга */
.ann-bar { background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600; }
.ann-bar .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; text-align: center; }
.ann-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.ann-bar span { opacity: .7; font-weight: 500; }
.ann-bar b { font-weight: 600; }
.ann-bar a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.ann-bar .wrap { flex-wrap: wrap; column-gap: 8px; }
[data-theme="dark"] .ann-bar { background: var(--band); color: var(--ink); }

.greet { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
@media (min-width: 1024px) { .greet { font-size: 26px; margin-bottom: 18px; } }

/* Объявления в кабинете */
.anns { display: grid; gap: 10px; margin-bottom: 18px; }
@media (min-width: 768px) { .anns { grid-template-columns: 1fr 1fr; } }
.ann { position: relative; background: var(--tint-red); border-radius: 16px; padding: 15px 44px 15px 18px; }
.ann b { display: block; font-size: 15px; font-weight: 700; }
.ann p { font-size: 13.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.ann a { display: inline-block; margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--red); cursor: pointer; }
.ann-x { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 8px;
         display: flex; align-items: center; justify-content: center; color: var(--muted); }
.ann-x svg { width: 15px; height: 15px; }

.pill.accepted { background: var(--pill-transit); color: var(--amber); }
.pill.revoked { background: var(--pill-new); color: var(--faint); text-decoration: line-through; }
.pay { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pay.ok { color: var(--green); }
.pay.wait { color: var(--red); }
.row-revoked td { opacity: .5; }

/* Отзывы — скриншоты переписок из канала */
.rv-grid { display: grid; gap: 12px; }
@media (min-width: 768px) { .rv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rv-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.rv { border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; background: var(--paper); }
.rv img { display: block; width: 100%; height: auto; background: var(--band); }
.rv-foot { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; font-size: 12.5px; color: var(--muted); }
.rv-foot a { font-weight: 700; color: var(--ink); cursor: pointer; }
.sec-foot { margin-top: 22px; }

/* Выбор темы в профиле */
.seg { display: inline-flex; background: var(--band); border-radius: 10px; padding: 3px; }
.seg button { font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 8px; color: var(--muted); }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* ── Сводка владельца ── */
.stat .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.approx { color: var(--faint); font-weight: 700; margin-right: 1px; }
.three { display: grid; gap: 14px; }
@media (min-width: 768px) { .three { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .three { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.chart .col .bstack { width: 100%; max-width: 46px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 8px 8px 4px 4px; overflow: hidden; }
.chart .col .bstack u { display: block; text-decoration: none; flex: none; }
.chart .col .bstack u.t { background: var(--red); opacity: .35; }
.chart .col .bstack u.a { background: var(--blue); opacity: .35; }
.chart .col.cur .bstack u { opacity: 1; }
.key { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 9px; height: 9px; border-radius: 3px; }

.kv { display: grid; }
.kv-row { display: flex; align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { flex: 1; }
.kv-row .x { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kv-row .v { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv-row.sum { font-weight: 700; }

.hb { display: grid; gap: 12px; margin-top: 16px; }
.hb-row { display: grid; grid-template-columns: 88px 1fr 34px; align-items: center; gap: 10px; font-size: 13.5px; }
.hb-row span:first-child { color: var(--muted); font-weight: 600; }
.hb-track { height: 10px; border-radius: 100px; background: var(--band); overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: 100px; background: var(--ink); }
.hb-row b { text-align: right; font-variant-numeric: tabular-nums; }
.big-num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 10px; }
.big-num small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.split { display: flex; height: 10px; border-radius: 100px; overflow: hidden; margin-top: 12px; }
.split i { display: block; }
.fx-note { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.fx-note b { color: var(--ink); font-weight: 700; }

/* ── Карточка клиента ── */
.cl-head { display: grid; gap: 16px; }
@media (min-width: 1024px) { .cl-head { grid-template-columns: 1fr auto; align-items: center; } }
.cl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-top: 18px; }
@media (min-width: 1024px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.facts b { display: block; font-size: 14.5px; font-weight: 700; margin-top: 2px; }
.facts b.yes { color: var(--green); }

/* ── Настройки ── */
.set-grid { display: grid; gap: 14px; }
@media (min-width: 1024px) { .set-grid { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; } }
.set-desc { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.fields { display: grid; gap: 12px; margin-top: 16px; }
.field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; font-size: 14px; }
.field > span { font-weight: 600; }
.field > span small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.inp { display: inline-flex; align-items: center; gap: 4px; height: 36px; min-width: 84px; padding: 0 12px; border-radius: 9px;
       border: 1px solid var(--rule); background: var(--paper); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; justify-content: flex-end; }
.inp em { font-style: normal; color: var(--faint); font-weight: 600; }
.tiers { display: grid; gap: 8px; margin-top: 14px; }
.tier { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--band); font-size: 14px; }
.tier span { font-weight: 600; }
.svc-rows { display: grid; margin-top: 12px; }
.svc-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.svc-row:last-child { border-bottom: 0; }
.svc-row b { font-weight: 700; }
.svc-row small { display: block; font-size: 12px; color: var(--muted); }
.svc-row .inp { min-width: 72px; }
.tog { display: inline-block; vertical-align: middle; width: 42px; height: 24px; border-radius: 100px; background: var(--rule); position: relative; flex-shrink: 0; cursor: pointer; }
.tog::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.tog.on { background: var(--green); }
.tog.on::after { transform: translateX(18px); }
.save-bar { position: sticky; bottom: 0; margin-top: 20px; padding: 14px 0; display: flex; justify-content: flex-end; gap: 10px;
            background: linear-gradient(to top, var(--page) 70%, transparent); }
@media (max-width: 639px) { .save-bar { bottom: 64px; background: linear-gradient(to top, var(--paper) 70%, transparent); } .save-bar .btn { width: 100%; } }

.svc-row.svc-head { padding: 0 0 6px; border-bottom: 0; }
.svc-row.svc-head small { font-size: 11.5px; font-weight: 700; color: var(--faint); text-align: right; min-width: 72px; }
.svc-row .inp { min-width: 92px; }
.svc-row.svc-head small { min-width: 92px; }
.ann { background: #ffe8eb; }
[data-theme="dark"] .ann { background: rgba(255,16,39,.13); }

.rv { display: flex; flex-direction: column; }
.rv img { flex: 1; object-fit: cover; }
.rv-text { flex: 1; background: #eceff1; padding: 24px; display: flex; align-items: center; }
[data-theme="dark"] .rv-text { background: var(--band); }
.rv-text p { background: #fff; color: #0d0d0d; font-size: 14px; line-height: 1.5; padding: 12px 16px;
             border-radius: 14px 14px 14px 4px; border: 1px solid #e3e6ea; max-width: 92%; }
.rv-foot { border-top: 1px solid var(--rule); }
.rv img { object-fit: contain; background: #eceff1; }
[data-theme="dark"] .rv img { background: var(--band); }
@media (max-width: 639px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
}

/* ── Условия доставки на лендинге. Значения приходят из /api/site → terms ── */
.mode-facts { position: relative; display: flex; gap: 28px; margin-top: 18px; }
.mode-facts span { display: block; font-size: 12.5px; font-weight: 600; opacity: .75; }
.mode-facts b { display: block; font-size: 16px; font-weight: 800; margin-top: 1px; }
.terms { display: grid; gap: 14px; margin-top: 14px; }
@media (min-width: 640px) { .terms { grid-template-columns: 1fr 1fr; } }
.terms > div { padding: 16px 20px; border-radius: 18px; background: var(--band); }
.terms span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.terms b { display: block; font-size: 15px; font-weight: 700; margin-top: 2px; }

/* ── Админка, экран «Сайт»: ссылки с переходами ── */
.links { display: grid; margin-top: 12px; }
.link-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.link-row:last-child { border-bottom: 0; }
.link-row b { font-weight: 700; }
.link-row small { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.link-row .inp { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; line-height: 34px; }
.link-row .inp.empty { color: var(--faint); }
.link-clicks { text-align: right; font-variant-numeric: tabular-nums; }
.link-clicks b { font-size: 18px; font-weight: 800; }
.link-row.off b, .link-row.off .link-clicks { color: var(--faint); }

/* ── Вход: кнопку рисует сам Telegram в iframe, мы только даём ей место ── */
.tg-widget { min-height: 48px; display: flex; justify-content: center; align-items: center; }
.tg-widget iframe { max-width: 100%; }
.login-err { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: var(--red); text-align: center; }

/* ── Кабинет на живых данных ── */
.empty { padding: 28px 8px; text-align: center; font-size: 14px; color: var(--muted); line-height: 1.55; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.ph-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--band); display: block; }

/* ── Админка: живые поля ввода внутри .inp ── */
.inp input, .inp select { border: 0; background: none; font: inherit; color: inherit; width: 64px; text-align: right; outline: none; padding: 0; -moz-appearance: textfield; }
.inp input::-webkit-outer-spin-button, .inp input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.inp select { width: auto; text-align: left; cursor: pointer; }
.inp:focus-within { border-color: var(--ink); }
.inp .w-sm, .tier .inp { min-width: 0; }
.tier > span:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tier > span:first-child .inp { height: 30px; padding: 0 8px; }
.tier > span:first-child .inp input { width: 44px; }
.inp-text { min-width: 0; width: min(260px, 52vw); justify-content: flex-start; }
.inp-text input { width: 100%; text-align: left; font-weight: 600; }
.link-row .inp.inp-wide { display: flex; line-height: normal; }
.link-row .inp-wide input { width: 100%; text-align: left; font-weight: 600; }
.link-on { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.save-msg { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--red); text-align: right; }
.save-msg.ok { color: var(--green); }
button.pay { cursor: pointer; font-family: inherit; background: none; border: 0; padding: 0; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: inherit; color: var(--ink); outline: none; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { border-color: var(--ink); }
.card-body button.pay { align-self: flex-start; padding: 0; background: none; font-size: 12.5px; font-weight: 700; }
.view-as { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px;
           padding: 8px 16px; background: var(--ink); color: var(--paper); font-size: 13.5px; text-align: center; }
.view-as .btn { height: 30px; }

/* ── «Смотреть как…» в шапке админки ── */
.view-sel { max-width: 170px; }
@media (max-width: 639px) { .view-sel { max-width: 130px; } .topbar .admin-pill { display: none; } }
.view-as .sel { height: 30px; background: var(--paper); color: var(--ink); }
