/* AURA — кабинет. Дизайн-язык «Editorial» (выбор Влада, вариант 2):
   тёплая бумага + белые панели, серифные заголовки (Georgia), тонкие линейки,
   один акцент teal, mono-метки. Заказы — список, статусы — точка+капс, поля —
   подчёркивание. Всё светлое (сайдбар тоже). Перекрывает style.css. */

:root {
  --paper:   #f4f2ec;   /* фон страницы */
  --panel:   #ffffff;   /* карточки/панели */
  --sidebar: #faf9f5;   /* сайдбар — чуть темнее бумаги */
  --ink:     #16191b;   /* основной текст */
  --ink-soft:#3a4045;   /* вторичный текст */
  --muted:   #6a7075;   /* приглушённый */
  --dim:     #9a958b;   /* бледный */
  --hair:    #e4e0d6;   /* линейки/границы */
  --hair-2:  #cfc9bb;   /* граница на hover */
  --field:   #faf9f5;   /* фон утопленных полей (когда нужен) */
  --teal:    #0f6b60;   /* акцент */
  --teal-d:  #0d5c52;   /* акцент hover */
  --warm:    #b8552f;   /* тёплый — точечно */
  --amber:   #b8862f;   /* ожидание */
  --green:   #3f8f5e;   /* готово */
  --place:   #a9a49a;   /* плейсхолдеры */
  --serif: Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
/* кабинет чуть компактнее сайта (Влад: −15% от zoom 1.2) */
html { zoom: 1.02; scroll-behavior: smooth; }
[hidden] { display: none !important; }
.full { width: 100%; justify-content: center; }

.app-body {
  min-height: 100vh; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}
.app-body ::selection { background: rgba(15,107,96,.16); }

/* базовые перекрытия style.css */
.app-body .btn { font-family: var(--sans); border-radius: 4px; font-weight: 600; letter-spacing: 0; }
/* логотип — единый бренд-знак с основным сайтом: без засечек, жирный, широкий трекинг */
.app-body .logo { font-family: var(--sans); letter-spacing: .26em; font-weight: 700; color: var(--ink); }
.app-body .logo span { color: var(--teal); }

/* кнопки в едином стиле */
.btn.p { background: var(--teal); color: #fff; border: 1px solid var(--teal); padding: 12px 18px; font-size: 14px; }
.btn.p:hover { background: var(--teal-d); border-color: var(--teal-d); }
.btn.s { background: transparent; color: var(--ink); border: 1px solid var(--hair); padding: 11px 16px; font-size: 14px; }
.btn.s:hover { border-color: var(--teal); color: var(--teal); }

/* eyebrow — mono + teal-точка, как на основном сайте (сближение типографики) */
.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--teal); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.app-body .eyebrow::before { display: inline-block; content: ""; width: 6px; height: 6px; border-radius: 999px;
  background: var(--teal); box-shadow: 0 0 0 3px rgba(15,107,96,.12); }

/* ===================== AUTH ===================== */
.auth-wrap { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 40px 22px;
  background:
    radial-gradient(58% 48% at 12% -8%, rgba(15,107,96,.13), transparent 56%),
    radial-gradient(46% 42% at 102% 2%, rgba(45,212,191,.11), transparent 60%),
    var(--paper); }
/* точечная текстура основного сайта, но teal на светлом и мягко замаскированная */
.app-body .auth-bg { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(15,107,96,.06) 1px, transparent 1.6px); background-size: 23px 23px;
  -webkit-mask-image: radial-gradient(78% 66% at 50% 0%, #000 14%, transparent 72%);
  mask-image: radial-gradient(78% 66% at 50% 0%, #000 14%, transparent 72%); }
.auth-glow { display: none; }
.auth-card { position: relative; z-index: 2; width: 100%; max-width: 440px;
  background: var(--panel); border: 1px solid var(--hair); border-radius: 6px; padding: 44px 40px 34px;
  box-shadow: 0 1px 2px rgba(22,25,27,.03), 0 24px 48px -32px rgba(22,25,27,.22); }
.auth-card .logo.big { display: inline-block; font-size: 30px; letter-spacing: .24em; margin-bottom: 10px; }
.auth-sub { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.auth-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--hair); margin-bottom: 26px; }
.atab { font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: transparent; border: 0;
  border-bottom: 2px solid transparent; padding: 0 0 12px; margin-bottom: -1px; cursor: pointer; transition: .15s; }
.atab:hover { color: var(--ink); }
.atab.on { color: var(--ink); border-bottom-color: var(--teal); }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.fld { display: flex; flex-direction: column; gap: 8px; }
.fld > span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fld input { width: 100%; border: 0; border-bottom: 1px solid var(--hair); background: transparent;
  padding: 9px 2px; font: inherit; font-size: 15px; color: var(--ink); transition: .15s; }
.fld input::placeholder { color: var(--place); }
.fld input:focus { outline: none; border-bottom-color: var(--teal); }
.form-err { color: var(--warm); font-size: 13px; }
.or { display: flex; align-items: center; gap: 14px; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.btn.google { background: transparent; color: var(--ink); border: 1px solid var(--hair); }
.btn.google:hover { border-color: var(--hair-2); }
.btn.google .g { font-family: var(--serif); font-weight: 700; color: var(--teal); }
.soon { color: var(--muted); font-size: 12.5px; text-align: center; }
.reg-step { display: flex; flex-direction: column; gap: 20px; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.reg-q { font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: -.01em; }
.goals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.goal { text-align: left; font: inherit; cursor: pointer; background: var(--panel); border: 1px solid var(--hair);
  border-radius: 4px; padding: 13px; transition: .15s; display: flex; gap: 11px; align-items: center; }
.goal:hover { border-color: var(--hair-2); }
.goal.on { border-color: var(--teal); }
.goal .gi { width: 34px; height: 34px; flex: none; border-radius: 4px; display: grid; place-items: center;
  border: 1px solid var(--hair); color: var(--muted); transition: .15s; }
.goal .gi svg { width: 18px; height: 18px; }
.goal.on .gi { border-color: var(--teal); color: var(--teal); }
.goal b { font-size: 13.5px; font-weight: 600; display: block; }
.reg-nav { display: flex; gap: 12px; }
.reg-nav .btn { flex: 1; justify-content: center; }
.auth-lang { margin: 26px auto 0; width: max-content; }

/* ===================== APP SHELL ===================== */
.app-shell { min-height: 100vh; background: var(--paper); }
/* сайдбар несёт градиенты/цвет основного сайта (teal-свечения + точки), но остаётся светлым */
.side { position: fixed; top: 0; left: 0; width: 232px; height: calc(100vh / 1.02); overflow-y: auto; z-index: 40;
  background:
    radial-gradient(88% 26% at 0% 0%, rgba(15,107,96,.15), transparent 60%),
    radial-gradient(64% 20% at 100% 7%, rgba(45,212,191,.13), transparent 62%),
    radial-gradient(rgba(15,107,96,.05) 1px, transparent 1.6px) 0 0 / 22px 22px,
    linear-gradient(180deg, #ecf3f0 0%, #f2f6f3 46%, #f4f7f4 100%);
  border-right: 1px solid rgba(15,107,96,.13);
  display: flex; flex-direction: column; gap: 26px; padding: 26px 22px 40px; }
.side .logo { font-size: 21px; padding: 0 2px 2px; }
.side-cta { display: flex; align-items: center; gap: 9px; justify-content: flex-start; margin: 0;
  padding: 11px 14px; border-radius: 4px; background: linear-gradient(135deg, #18917f, #0d5c52); color: #fff;
  font-size: 13px; font-weight: 600; transition: .15s; box-shadow: 0 8px 18px -10px rgba(13,92,82,.7); }
.side-cta:hover { background: linear-gradient(135deg, #1c9d89, #0f6b60); transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(13,92,82,.78); }
.side-cta svg { width: 14px; height: 14px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; padding: 16px 2px 8px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 9px; padding: 8px 0 8px 20px;
  color: var(--muted); font-size: 14px; font-weight: 500; transition: color .15s; }
.side-nav a:hover { color: var(--ink); }
.side-nav a.on { color: var(--ink); font-weight: 600; }
.side-nav a.on::before { content: ""; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 999px; background: var(--teal); box-shadow: 0 0 0 3px rgba(15,107,96,.12); }
.side-nav a svg.ni { width: 16px; height: 16px; flex: none; color: var(--muted); transition: color .15s; }
.side-nav a:hover svg.ni, .side-nav a.on svg.ni { color: var(--teal); }

/* низ сайдбара — редакторский: юзер по линейке, ссылки + язык в строку */
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.user-chip { display: flex; align-items: center; gap: 11px; padding-top: 18px; border-top: 1px solid var(--hair); }
.ava { width: 34px; height: 34px; border-radius: 4px; flex: none;
  background: linear-gradient(135deg, #18917f, #0d5c52); color: #fff;
  font-family: var(--serif); font-size: 16px; font-weight: 400; display: grid; place-items: center; }
.who { overflow: hidden; min-width: 0; }
.who b { font-size: 13px; font-weight: 600; color: var(--ink); display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.who small { font-family: var(--mono); font-size: 11px; color: var(--muted); display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.uc-arrow { width: 14px; height: 14px; color: var(--dim); margin-left: auto; flex: none; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-links { display: flex; align-items: center; gap: 14px; }
.foot-link { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; color: var(--muted);
  background: transparent; border: 0; cursor: pointer; padding: 0; transition: color .15s; }
.foot-link svg { width: 13px; height: 13px; color: var(--muted); }
.foot-link:hover { color: var(--ink); }
.foot-link:hover svg { color: var(--ink); }
.foot-link.danger:hover, .foot-link.danger:hover svg { color: var(--warm); }
.side-lang { display: flex; align-items: center; gap: 10px; }
.sl-lab { display: none; }

/* сегментный язык → редакторский подчёркнутый */
.langsw { display: inline-flex; background: transparent; border: 0; padding: 0; gap: 2px; }
.langsw::before { display: none !important; }
.langsw button { font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: transparent;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 4px 8px; cursor: pointer; transition: .15s; }
.langsw button:hover { color: var(--ink); }
.langsw button.on { color: var(--ink); border-bottom-color: var(--teal); background: transparent; }
.langsw.small button { padding: 4px 8px; font-size: 12px; }

.app-main { margin-left: 232px; padding: clamp(28px, 4vw, 52px) clamp(24px, 5vw, 64px); max-width: 1560px;
  background: var(--paper); min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; }
.side-toggle { display: none; }

/* футер кабинета — контент/ссылки как на основном сайте, но в светлом Editorial-стиле */
.cab-foot { margin-top: auto; }
.cf-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; margin-top: 60px; padding-top: 36px; border-top: 1px solid var(--hair); }
.cf-brand .logo { font-size: 20px; }
.cf-tag { color: var(--muted); font-size: 13.5px; margin-top: 12px; max-width: 32ch; }
.cf-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.cf-col h5 { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 15px; }
.cf-col a { display: block; color: var(--ink-soft); font-size: 13.5px; margin-bottom: 11px; transition: color .15s; }
.cf-col a:hover { color: var(--teal); }
.cf-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 42px; padding: 22px 0 6px;
  border-top: 1px solid var(--hair); color: var(--muted); font-family: var(--mono); font-size: 12px; }
.view { animation: viewIn .34s cubic-bezier(.2,.7,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.view-head .eyebrow { margin-bottom: 12px; }
.view-title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 40px); line-height: 1.02; letter-spacing: -.018em; margin-top: 0; }
.back-link { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; transition: color .15s; }
.back-link:hover { color: var(--teal); }

/* ---------- orders — список по линейкам ---------- */
.orders-list { border-top: 1px solid var(--hair); }
.order-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; cursor: pointer;
  padding: 22px 4px; border-bottom: 1px solid var(--hair); background: transparent; transition: background .15s; animation: none; }
.order-card:hover { background: var(--sidebar); transform: none; border-color: var(--hair); }
.oc-ic { display: none; }
.oc-main b { font-family: var(--serif); font-size: 20px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.oc-main .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 8px; }
.oc-arrow { display: none; }

/* статус — точка + капс-подпись */
.pill { display: inline-flex; align-items: center; gap: 9px; font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); background: transparent;
  border: 0; padding: 0; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.pill.wait::before { background: var(--amber); }
.pill.work::before { background: var(--teal); }
.pill.done::before { background: var(--green); }
.pill.dead::before { background: var(--dim); }

.empty { text-align: center; padding: 70px 20px; border: 1px solid var(--hair); border-radius: 6px; background: var(--panel); }
.empty-ic { font-size: 34px; color: var(--dim); }
.empty p { color: var(--muted); margin: 14px auto 22px; max-width: 42ch; }

/* ---------- new order ---------- */
.mini-steps { display: flex; align-items: center; gap: 16px; list-style: none; margin: 0 0 8px; flex-wrap: wrap; counter-reset: ms; }
.mini-steps li { font-size: 13px; color: var(--muted); padding-bottom: 9px; border-bottom: 2px solid transparent; counter-increment: ms; display: inline-flex; align-items: baseline; gap: 8px; }
.mini-steps li::before { content: "0" counter(ms); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.mini-steps li.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--teal); }
.mini-steps li.on::before { color: var(--teal); }
.new-body { margin-top: 30px; }
.grp-t { font-family: var(--serif); font-size: 21px; font-weight: 400; letter-spacing: -.01em; color: var(--ink); margin-bottom: 18px; }
.svc-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 34px; }
.svc-opt { position: relative; text-align: left; font: inherit; cursor: pointer; background: var(--panel); border: 1px solid var(--hair);
  border-radius: 4px; padding: 16px 15px; transition: border-color .15s; min-height: 118px; display: flex; flex-direction: column; }
.svc-opt:hover { border-color: var(--hair-2); transform: none; }
.svc-opt.on { border-color: var(--teal); background: var(--panel); }
.svc-opt .si { width: 34px; height: 34px; border-radius: 4px; display: grid; place-items: center; border: 1px solid var(--hair); color: var(--muted); transition: .15s; }
.svc-opt .si svg { width: 19px; height: 19px; }
.svc-opt.on .si { border-color: var(--teal); color: var(--teal); }
.svc-opt b { font-family: var(--serif); font-size: 16px; font-weight: 500; letter-spacing: -.01em; margin: 14px 0 auto; display: block; }
.svc-opt .price { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px;
  padding: 0; border: 0; border-radius: 0; background: transparent; }
.svc-opt .tick { position: absolute; top: 13px; right: 13px; width: 18px; height: 18px; border-radius: 50%; background: var(--teal);
  color: #fff; display: none; place-items: center; font-size: 11px; font-weight: 700; }
.svc-opt.on .tick { display: grid; }
.fld.big { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.fld.big > span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fld.big input, .fld.big textarea { width: 100%; border: 0; border-bottom: 1px solid var(--hair); background: transparent;
  padding: 9px 2px; font: inherit; font-size: 15px; color: var(--ink); resize: vertical; transition: .15s; }
.fld.big input::placeholder, .fld.big textarea::placeholder { color: var(--place); }
.fld.big input:focus, .fld.big textarea:focus { outline: none; border-bottom-color: var(--teal); }
.fld.big textarea { min-height: 96px; }
/* баннер оценки из конструктора */
.calc-est { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border: 1px solid var(--hair);
  border-left: 2px solid var(--teal); border-radius: 4px; background: var(--panel); padding: 15px 20px; margin-bottom: 26px; }
.ce-badge { font-family: var(--sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); font-weight: 600; }
.ce-nums { display: flex; gap: 26px; margin-left: auto; }
.ce-nums div { display: flex; flex-direction: column; }
.ce-nums b { font-family: var(--sans); font-size: 21px; font-weight: 600; letter-spacing: -.005em; font-variant-numeric: tabular-nums lining-nums; }
.ce-nums small { font-size: 11.5px; color: var(--muted); }

/* ---------- order detail ---------- */
.od-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.od-head-l { min-width: 0; }
.od-title-row { display: flex; align-items: baseline; gap: 12px; }
.od-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.016em; }
.od-edit { flex: none; width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--hair); color: var(--muted); transition: .15s; align-self: center; }
.od-edit:hover { border-color: var(--teal); color: var(--teal); }
.od-edit svg { width: 14px; height: 14px; }
.od-title-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ot-in { font-family: var(--serif); font-size: clamp(24px, 3vw, 30px); font-weight: 400; letter-spacing: -.016em; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--teal); padding: 4px 2px; min-width: 240px; }
.ot-in:focus { outline: none; }
.ot-save { padding: 9px 15px; font-size: 13px; }
.ot-cancel { font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 0; cursor: pointer; padding: 9px 6px; }
.ot-cancel:hover { color: var(--ink); }
.od-sub { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 10px; }

.od-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; align-items: start; }
.od-main { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.od-main .od-est { margin: 0; }
.od-side { position: sticky; top: 26px; }

.od-brief-card { border: 1px solid var(--hair); border-radius: 6px; background: var(--panel); overflow: hidden; }
.obc-head { display: flex; align-items: center; gap: 11px; padding: 14px 22px; border-bottom: 1px solid var(--hair);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600;
  background: linear-gradient(90deg, color-mix(in srgb, var(--teal) 6%, transparent), transparent 55%); }
.obc-ic { width: 26px; height: 26px; flex: none; border-radius: 5px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--teal) 11%, transparent); color: var(--teal); }
.obc-ic svg { width: 14px; height: 14px; }
.od-brief { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; padding: 20px 22px; }
.ob-line { margin: 0 0 12px; }
.ob-line:last-child { margin-bottom: 0; }
.ob-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 2px 0 16px; }
.ob-list:last-child { margin-bottom: 0; }
.ob-list li { position: relative; padding-left: 26px; color: var(--ink); }
.ob-list li::before { content: ""; position: absolute; left: 0; top: 11px; width: 14px; height: 2px; border-radius: 2px; background: var(--teal); }
.ob-list:not(.static) li { animation: obIn .5s both cubic-bezier(.2,.7,.2,1); }
@keyframes obIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.ob-note { margin: 16px 0 0; padding: 13px 16px; background: var(--sidebar); border-left: 2px solid var(--teal); border-radius: 4px;
  font-size: 13.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums lining-nums; }
.ob-note:first-child { margin-top: 0; }
.od-est { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px solid var(--hair); border-radius: 5px; padding: 14px 18px; background: var(--panel); }
.oe-lab { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.oe-nums { display: flex; align-items: baseline; gap: 12px; margin-left: auto; }
.oe-nums b { font-family: var(--sans); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.oe-nums small { color: var(--muted); font-size: 12px; }
.oe-nums i { color: var(--dim); font-style: normal; }

.card { border: 1px solid var(--hair); border-radius: 5px; background: var(--panel); padding: 26px 28px; }
.card > h3 { font-family: var(--serif); font-size: 19px; font-weight: 400; letter-spacing: -.01em; margin-bottom: 22px; display: flex; align-items: center; gap: 11px; }
.card > h3 .dot { width: 6px; height: 6px; border-radius: 0; background: var(--teal); box-shadow: none; }

/* timeline */
.timeline { display: flex; flex-direction: column; }
.phase { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding-bottom: 22px; position: relative; }
.phase:last-child { padding-bottom: 0; }
.phase::before { content: ""; position: absolute; left: 14px; top: 24px; bottom: -4px; width: 1px; background: var(--hair); }
.phase:last-child::before { display: none; }
.ph-dot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--hair); background: var(--panel);
  display: grid; place-items: center; font-size: 12px; color: var(--dim); z-index: 1; transition: .25s; }
.phase.done .ph-dot { border-color: var(--teal); background: var(--teal); color: #fff; }
.phase.done::before { background: var(--teal); }
.phase.current .ph-dot { border-color: var(--teal); color: var(--teal); background: var(--panel); box-shadow: 0 0 0 4px rgba(15,107,96,.1); }
.ph-body { padding-top: 4px; }
.ph-body b { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.phase:not(.done):not(.current) .ph-body b { color: var(--muted); font-weight: 500; }
.phase.current .ph-body b { color: var(--teal); }

/* панель действия внутри узла */
.ph-panel { margin-top: 14px; animation: fade .3s ease; }
.ph-panel .pay-note { margin: 0 0 14px; }
.approve-panel, .wait-panel { padding: 18px; border: 1px solid var(--hair); border-radius: 5px; background: var(--sidebar); }
.approve-panel { border-color: var(--teal); }
.approve-panel .btn.p { width: 100%; justify-content: center; }
.tp-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 0 12px; margin: 0 0 12px; border-bottom: 1px solid var(--hair); }
.tp-price-l { color: var(--muted); font-size: 13px; }
.tp-price b { font-family: var(--sans); font-size: 26px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.paybox .amt-quote { color: var(--muted); }
.wait-panel { display: flex; align-items: center; gap: 12px; }
.wait-panel p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.5; }
.pay-note { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }

/* payment */
.pay-nets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; margin-bottom: 4px; }
.net { text-align: left; font: inherit; cursor: pointer; background: var(--panel); border: 1px solid var(--hair); border-radius: 4px; padding: 14px; transition: border-color .15s; }
.net:hover { border-color: var(--hair-2); }
.net.on { border-color: var(--teal); }
.net b { font-size: 13.5px; display: block; }
.net small { color: var(--muted); font-size: 11.5px; font-family: var(--mono); }
.pay-panel { border: 1px solid var(--hair); border-radius: 5px; background: var(--sidebar); padding: 22px; }
.pp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.pay-amt { font-family: var(--sans); font-size: 30px; font-weight: 600; letter-spacing: -.005em; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.pay-amt span { font-size: 15px; color: var(--muted); font-weight: 500; }
.pay-timer { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pay-timer .pt-lab { font-size: 10px; color: var(--muted); font-family: var(--sans); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.pay-timer b { font-family: var(--mono); font-size: 20px; font-weight: 500; color: var(--teal); }
.pay-timer.expired b { color: var(--warm); }
.pay-addr-l, .addr-row { }
.addr-row { display: flex; gap: 10px; align-items: stretch; margin: 14px 0; }
.addr { flex: 1; font-family: var(--mono); font-size: 12.5px; color: var(--teal); background: var(--panel);
  border: 1px solid var(--hair); border-radius: 4px; padding: 12px 14px; word-break: break-all; }
.copy { font: inherit; font-size: 13px; font-weight: 600; padding: 0 16px; border-radius: 4px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--hair); color: var(--ink); transition: .15s; white-space: nowrap; }
.copy:hover, .copy.done { border-color: var(--teal); color: var(--teal); }
.pay-warn { color: var(--amber); font-size: 13px; background: var(--panel); border: 1px solid var(--hair); border-left: 2px solid var(--amber); border-radius: 4px; padding: 12px 14px; margin-bottom: 14px; }
.pay-agree { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; line-height: 1.5; cursor: pointer; margin: 4px 0 2px; }
.pay-agree input[type="checkbox"] { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--teal); cursor: pointer; }
.pay-agree a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.pay-agree a:hover { text-decoration: none; }
.pay-reveal[hidden] { display: none; }
.pay-txid { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--hair); padding: 10px 2px; margin: 12px 0 18px; }
.pay-txid::placeholder { color: var(--place); }
.pay-txid:focus { outline: none; border-bottom-color: var(--teal); }
.pay-ok { display: flex; align-items: center; gap: 9px; color: var(--green); font-size: 15px; font-weight: 600; }

/* блокчейн-прогресс */
.chain { display: flex; flex-direction: column; }
.chain-step { display: grid; grid-template-columns: 28px 1fr; gap: 13px; align-items: center; padding: 10px 0; position: relative; }
.chain-step::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: -3px; width: 1px; background: var(--hair); }
.chain-step:last-child::before { display: none; }
.chain-step .cs-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--hair); background: var(--panel); color: var(--dim); font-size: 12px; font-weight: 700; transition: .25s; }
.chain-step .cs-t { font-size: 14px; color: var(--muted); }
.chain-step .cs-t b { font-family: var(--mono); color: var(--teal); }
.chain-step.done .cs-ic { border-color: var(--teal); background: var(--teal); color: #fff; }
.chain-step.done::before { background: var(--teal); }
.chain-step.done .cs-t, .chain-step.run .cs-t { color: var(--ink); }
.chain-step.run .cs-ic { border-color: var(--teal); }
.chain-step .cs-ic .spin { width: 14px; height: 14px; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(15,107,96,.22); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* chat */
.chat-card { display: flex; flex-direction: column; height: calc(100vh - 52px); max-height: 760px; padding: 24px; }
.chat-card > h3 { margin-bottom: 16px; }
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-log { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; margin-bottom: 14px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 5px; font-size: 14px; line-height: 1.5; animation: fade .28s ease; }
.msg .m-who { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-bottom: 5px; letter-spacing: .04em; }
.msg .m-tx { white-space: pre-wrap; word-break: break-word; }
.msg.client { align-self: flex-end; background: var(--teal); color: #fff; }
.msg.client .m-who { color: rgba(255,255,255,.72); }
.msg.manager { align-self: flex-start; background: var(--sidebar); border: 1px solid var(--hair); color: var(--ink-soft); }
.m-media { display: block; margin-bottom: 6px; border-radius: 4px; overflow: hidden; max-width: 230px; }
.m-media img, .m-media video { display: block; width: 100%; height: auto; }
.m-file { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 4px; margin-bottom: 4px; background: rgba(255,255,255,.14); }
.msg.manager .m-file { background: var(--panel); border: 1px solid var(--hair); }
.mf-ic { width: 28px; height: 28px; flex: none; border-radius: 3px; display: grid; place-items: center; background: rgba(255,255,255,.2); }
.msg.manager .mf-ic { background: transparent; border: 1px solid var(--hair); color: var(--teal); }
.mf-ic svg { width: 14px; height: 14px; }
.mf-tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mf-tx b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.mf-tx small { font-size: 11px; opacity: .72; font-family: var(--mono); }
.chat-empty { color: var(--muted); font-size: 13.5px; text-align: center; padding: 24px; margin: auto 0; }
.up-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.up-track { flex: 1; height: 5px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.up-fill { height: 100%; width: 0; background: var(--teal); transition: width .15s; }
.up-txt { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.chat-form { display: flex; gap: 8px; align-items: center; }
.chat-attach { flex: none; width: 40px; height: 40px; border-radius: 4px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--hair); color: var(--muted); transition: .15s; }
.chat-attach:hover { border-color: var(--teal); color: var(--teal); }
.chat-attach svg { width: 18px; height: 18px; }
.chat-form input[data-chat-in] { flex: 1; min-width: 0; font: inherit; font-size: 14px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--hair); border-radius: 4px; padding: 11px 14px; transition: .15s; }
.chat-form input[data-chat-in]:focus { outline: none; border-color: var(--teal); }
.chat-send { flex: none; height: 40px; padding: 0 16px; }

/* profile */
.profile-grid { display: grid; grid-template-columns: minmax(0,1.5fr) 1fr; gap: 0; align-items: start; }
.profile-grid .pf-card:first-child { padding-right: 46px; border: 0; border-radius: 0; background: transparent; }
.pf-col { display: flex; flex-direction: column; gap: 34px; border-left: 1px solid var(--hair); padding-left: 46px; }
.pf-card { background: transparent; border: 0; border-radius: 0; padding: 0; }
.pf-card-h { font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: -.01em; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.pf-card-h .dot { display: none; }
.pf-idrow { display: flex; align-items: center; gap: 15px; margin-bottom: 28px; }
.pf-ava { width: 48px; height: 48px; border-radius: 5px; flex: none; background: var(--ink); color: var(--paper);
  font-family: var(--serif); font-size: 22px; font-weight: 400; display: grid; place-items: center; }
.pf-id b { font-family: var(--serif); font-size: 21px; font-weight: 400; letter-spacing: -.01em; display: block; }
.pf-id small { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.pf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 34px; margin-bottom: 28px; }
.pf-fields-1 { grid-template-columns: 1fr; }
.pf-fld { display: flex; flex-direction: column; gap: 9px; }
.pf-fld-full { grid-column: 1 / -1; }
.pf-fld > span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.pf-fld input, .pf-fld textarea { font: inherit; font-size: 15px; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; padding: 8px 2px; resize: vertical; transition: .15s; }
.pf-fld input::placeholder, .pf-fld textarea::placeholder { color: var(--place); }
.pf-fld input:focus, .pf-fld textarea:focus { outline: none; border-bottom-color: var(--teal); box-shadow: none; }
.pf-block { margin-bottom: 28px; }
.pf-block-l { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.pf-goals { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-goal { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--hair); border-radius: 4px; padding: 8px 14px; color: var(--ink-soft); transition: .15s; }
.pf-goal svg { width: 15px; height: 15px; color: var(--muted); transition: .15s; }
.pf-goal:hover { border-color: var(--hair-2); }
.pf-goal.on { border-color: var(--teal); color: var(--teal); }
.pf-goal.on svg { color: var(--teal); }
.pf-langsw { width: max-content; }
.pf-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hair); font-size: 13px; }
.pf-meta:first-of-type { border-top: 1px solid var(--hair); }
.pf-meta:last-child { }
.pf-meta span { color: var(--muted); }
.pf-meta b { font-weight: 600; color: var(--ink); text-align: right; word-break: break-word; }
.pf-role { color: var(--teal); }
.pf-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--hair); cursor: pointer; }
.pf-toggle:first-of-type { border-top: 1px solid var(--hair); }
.pf-tg-tx b { font-size: 14px; font-weight: 600; color: var(--ink); display: block; }
.pf-tg-tx small { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.switch { width: 38px; height: 22px; border-radius: 999px; background: var(--paper); border: 1px solid var(--hair); position: relative; flex: none; transition: .15s; cursor: pointer; }
.switch i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(22,25,27,.22); transition: .15s; }
.switch.on { background: var(--teal); border-color: var(--teal); }
.switch.on i { left: 18px; }
.pf-card .btn.p, .pf-card .btn.s { width: 100%; justify-content: center; }
.pf-logout { width: 100%; justify-content: center; color: var(--warm); border-color: var(--hair); }
.pf-logout:hover { border-color: var(--warm); color: var(--warm); }

/* toast / loading */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; padding: 12px 20px; border-radius: 4px;
  box-shadow: 0 20px 50px -15px rgba(22,25,27,.4); z-index: 100; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loading { display: grid; place-items: center; padding: 80px; color: var(--dim); }

/* ===================== responsive ===================== */
@media (max-width: 900px) {
  .app-main { margin-left: 0; }
  .side { transform: translateX(-100%); transition: transform .28s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .side-toggle { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 4px;
    background: var(--panel); border: 1px solid var(--hair); color: var(--ink); font-size: 18px; cursor: pointer; margin-bottom: 20px; }
}
/* ===================== V3 «Поток + правый рельс» ===================== */
.od3 { display: grid; grid-template-columns: minmax(0, 1.7fr) 336px; gap: 22px; align-items: start; }
.od3-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.od3-rail { position: sticky; top: 22px; display: flex; flex-direction: column; gap: 14px; }
.od3-main .chat-card { height: auto; max-height: none; min-height: 440px; }
.od3 .od-head { margin-bottom: 2px; }

/* виджет-карта */
.w { background: var(--panel); border: 1px solid var(--hair); border-radius: 10px; padding: 18px 20px; }
.w-lab { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }

/* прогресс-кольцо */
.ring { display: flex; align-items: center; gap: 16px; }
.ring svg { width: 74px; height: 74px; flex: none; transform: rotate(-90deg); }
.ring .rbg { fill: none; stroke: var(--hair); stroke-width: 8; }
.ring .rfg { fill: none; stroke: var(--teal); stroke-width: 8; stroke-linecap: round; }
.ring .rnum { font-family: var(--serif); font-size: 29px; line-height: 1; }
.ring .rsub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* дедлайн */
.deadline .big { font-family: var(--serif); font-size: 31px; line-height: 1; margin: 2px 0 4px; }
.deadline .sub { font-size: 13px; color: var(--muted); }
.deadline .date { font-family: var(--mono); font-size: 12px; color: var(--teal); margin-top: 8px; }
.dl-soft { font-family: var(--serif); font-size: 18px; color: var(--ink-soft); }

/* следующий шаг */
.next .nrow { display: flex; align-items: center; gap: 12px; }
.next .nic { width: 36px; height: 36px; border-radius: 9px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--teal) 12%, transparent); color: var(--teal); }
.next .nic svg { width: 18px; height: 18px; }
.next b { font-size: 15px; display: block; }
.next small { font-size: 12.5px; color: var(--muted); }

/* виджет оплаты */
.paybox .amt { font-family: var(--sans); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.paybox .pw-mo { font-size: 14px; color: var(--muted); font-weight: 500; }
.paybox .pw-mo2 { font-size: 13px; color: var(--muted); margin-top: 3px; }
.paybox .pw-st { font-size: 12px; font-weight: 600; margin-top: 8px; }
.paybox .pw-st.paid { color: var(--green); }
.paybox .pw-st.due { color: var(--amber); }

/* календарь */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-head b { font-family: var(--serif); font-size: 16px; font-weight: 400; }
.cal-head span { font-family: var(--mono); font-size: 11px; color: var(--teal); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-grid .dow { font-family: var(--mono); font-size: 9.5px; color: var(--dim); text-align: center; padding-bottom: 4px; }
.cal-grid .cell { aspect-ratio: 1; display: grid; place-items: center; font-size: 12px; border-radius: 7px; color: var(--ink-soft); position: relative; }
.cal-grid .cell.mute { color: var(--dim); opacity: .5; }
.cal-grid .cell.dot::after { content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 999px; background: var(--teal); }
.cal-grid .cell.today { background: var(--field); font-weight: 600; box-shadow: inset 0 0 0 1px var(--hair); }
.cal-grid .cell.deliver { background: var(--teal); color: #fff; font-weight: 600; }
.cal-grid .cell.deliver.dot::after { background: #fff; }

/* приложенные файлы */
.fcount { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; }
.od-files { display: flex; flex-direction: column; }
.od-file { display: flex; align-items: center; gap: 13px; padding: 12px 2px; border-bottom: 1px solid var(--hair); }
.od-file:last-child { border-bottom: 0; padding-bottom: 2px; }
.od-file .of-ic { width: 38px; height: 38px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--field); border: 1px solid var(--hair); color: var(--teal); }
.od-file .of-ic svg { width: 18px; height: 18px; }
.od-file .of-meta { min-width: 0; flex: 1; }
.od-file .of-meta b { font-size: 14px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-file .of-meta small { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.od-file .of-date { font-family: var(--mono); font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.od-file .of-get { width: 32px; height: 32px; border-radius: 8px; flex: none; display: grid; place-items: center; border: 1px solid var(--hair); color: var(--muted); transition: .15s; }
.od-file .of-get:hover { border-color: var(--teal); color: var(--teal); }
.od-file .of-get svg { width: 15px; height: 15px; }

/* горизонтальный статус-степпер */
.tl-h { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.tl-h .st { flex: 1; min-width: 72px; text-align: center; }
.tl-h .st .d { width: 26px; height: 26px; border-radius: 999px; margin: 0 auto 10px; display: grid; place-items: center; font-size: 12px;
  border: 2px solid var(--hair); background: var(--panel); color: transparent; position: relative; }
.tl-h .st.done .d, .tl-h .st.current .d { background: var(--teal); border-color: var(--teal); color: #fff; }
.tl-h .st.current .d { box-shadow: 0 0 0 4px rgba(15,107,96,.14); }
.tl-h .st .d::after { content: ""; position: absolute; left: 26px; top: 50%; width: calc(100% - 22px); height: 2px; background: var(--hair); }
.tl-h .st:last-child .d::after { display: none; }
.tl-h .st.done .d::after { background: var(--teal); }
.tl-h .st small { font-size: 11px; color: var(--muted); display: block; line-height: 1.25; }
.tl-h .st.current small { color: var(--ink); font-weight: 600; }

/* карточка действия текущей фазы */
.od-action .dot.warn { background: var(--amber); }

@media (max-width: 1080px) {
  .od3 { grid-template-columns: 1fr; }
  .od3-rail { position: static; grid-row: 2; }
  .od-layout { grid-template-columns: 1fr; }
  .od-side { position: static; }
  .chat-card { height: auto; max-height: none; }
  .chat-log { max-height: 360px; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-grid .pf-card:first-child { padding-right: 0; }
  .pf-col { border-left: 0; padding-left: 0; padding-top: 34px; margin-top: 8px; border-top: 1px solid var(--hair); }
}
@media (max-width: 520px) {
  .goals { grid-template-columns: 1fr; }
  .pf-fields { grid-template-columns: 1fr; }
  .order-card { grid-template-columns: 1fr; gap: 12px; }
}
