/* Valuta — личный кабинет и демо-панель. */

.bank-ava.sm { width: 24px; height: 24px; border-radius: 8px; font-size: 9px; }
.bank-ava.sm .flag { display: none; }

.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: grid; grid-template-rows: auto auto 1fr auto; gap: 22px; padding: 22px 16px; border-right: 1px solid var(--line); background: var(--bg); }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; }
.side-nav { display: grid; gap: 2px; align-content: start; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; color: var(--muted); font-weight: 500; transition: background .2s, color .2s; }
.side-nav a:hover { background: var(--inset); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 6px 16px -12px rgba(22, 22, 27, .3); }
.side-nav a[aria-current="page"] .i { color: var(--accent-text); }
.side-nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--warning-soft); color: var(--warning); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.side-user { display: grid; gap: 12px; padding: 14px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.side-user-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ava { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.side-user b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .acts { display: flex; gap: 6px; }
.app-main { min-width: 0; display: grid; grid-template-rows: auto 1fr; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 18px 40px; background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-family: var(--font-display); font-size: 22px; font-weight: 550; letter-spacing: -.04em; }
.topbar .crumbs { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.topbar .crumbs a:hover { color: var(--ink); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.m-only { display: none; }
@media (max-width: 1000px) { .m-only { display: inline-flex; } }
.screen { padding: 8px 40px 120px; display: grid; gap: 24px; align-content: start; max-width: 1360px; width: 100%; }
.tabbar { display: none; }
.m-logo { display: none; }
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 14px 16px; }
  .topbar .rate-chip { display: none; }
  .m-logo { display: inline-flex; }
  .screen { padding: 4px 16px calc(110px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 35; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding: 6px; border-radius: 22px; background: var(--glass-strong); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); border: 1px solid var(--line); box-shadow: var(--lift); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border-radius: 16px; font-size: 10px; color: var(--muted); position: relative; }
  .tabbar a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
  .tabbar a.new { color: var(--on-accent); background: var(--accent); }
  .tabbar .dotb { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 2px var(--paper); }
}

/* ---------- Общие блоки кабинета ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 24px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-family: var(--font-display); font-size: 19px; font-weight: 550; letter-spacing: -.03em; }
.panel-head a, .panel-head .link { font-size: 12px; }
.kv { display: grid; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.kv .num { font-weight: 550; }
.empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .ico { width: 56px; height: 56px; border-radius: 18px; background: var(--inset); border: 1px solid var(--line); display: grid; place-items: center; color: var(--faint); }
.empty h3 { color: var(--ink); font-family: var(--font-display); font-size: 20px; font-weight: 550; letter-spacing: -.03em; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr); gap: 20px; align-items: start; }
@media (max-width: 1180px) { .grid-2 { grid-template-columns: 1fr; } }

.banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--paper); }
.banner .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; }
.banner b { display: block; font-size: 14px; }
.banner p { font-size: 13px; color: var(--muted); }
.banner .btn { margin-left: auto; }
.banner.warn .ico { background: var(--warning-soft); color: var(--warning); }
.banner.acc .ico { background: var(--accent-soft); color: var(--accent-text); }
.banner.ok .ico { background: var(--success-soft); color: var(--success); }
.banner.bad .ico { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 640px) { .banner { flex-wrap: wrap; } .banner .btn { margin-left: 0; width: 100%; } }

/* ---------- Главная кабинета ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px 0 4px; flex-wrap: wrap; }
.hello h2 { font-family: var(--font-display); font-size: clamp(34px, 4vw, 52px); font-weight: 500; letter-spacing: -.055em; line-height: 1; }
.hello p { color: var(--muted); margin-top: 10px; }
.dash-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: stretch; padding: 28px; border-radius: 28px; background: var(--inverse-raised); color: var(--on-inverse); isolation: isolate; }
.dash-hero::after { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; border-radius: 50%; left: -160px; bottom: -260px; border: 1px solid var(--line-inverse); box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 120px rgba(255, 255, 255, .015); }
.dash-hero canvas { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; max-width: none; -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.25) 0%, #000 40%, #000 62%, rgba(0,0,0,.15) 78%); mask-image: linear-gradient(90deg, rgba(0,0,0,.25) 0%, #000 40%, #000 62%, rgba(0,0,0,.15) 78%); }
.dash-stats b span { font: inherit; color: inherit; }
.dash-hero-copy { display: grid; align-content: space-between; gap: 28px; max-width: 460px; }
.dash-hero h3 { font-family: var(--font-display); font-size: 34px; font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.dash-hero p { color: var(--on-inverse-muted); font-size: 14px; margin-top: 12px; }
.dash-hero .eyebrow { color: var(--accent-on-inverse); }
.dash-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 28px; justify-content: start; }
.dash-stats b { display: block; font-family: var(--font-num); font-size: 22px; font-weight: 600; letter-spacing: -.04em; }
.dash-stats span { font-size: 11px; color: var(--on-inverse-muted); }
.dash-hero .calc { background: var(--glass-strong); color: var(--ink); width: 400px; }
@media (max-width: 1180px) { .dash-hero { grid-template-columns: 1fr; } .dash-hero .calc { width: 100%; } .dash-hero canvas { display: none; } }
@media (max-width: 640px) { .dash-hero { padding: 20px 16px 16px; border-radius: 22px; } .dash-stats { gap: 16px; } .dash-stats b { font-size: 17px; } }

.todo { display: grid; gap: 10px; }
.todo-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .3s var(--ease-out), box-shadow .3s; }
.todo-card { border-color: color-mix(in srgb, var(--warning) 30%, var(--line)); }
.todo-card:hover { transform: translateY(-2px); box-shadow: var(--lift); }
.todo-card .ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--warning-soft); color: var(--warning); }
.todo-card b { display: block; font-size: 14px; }
.todo-card small { display: block; font-size: 12px; color: var(--muted); }
.todo-card .timer { font-family: var(--font-num); font-size: 13px; color: var(--warning); font-weight: 600; }

/* Список заявок */
.deals { display: grid; }
.deal-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 12px; border-radius: 16px; transition: background .2s; }
.deal-row + .deal-row { border-top: 1px solid var(--line); border-radius: 0; }
.deal-row:hover { background: var(--inset); border-radius: 16px; }
.deal-row:hover + .deal-row { border-top-color: transparent; }
.deal-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.deal-who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-who small { display: block; font-size: 11.5px; color: var(--muted); }
.deal-dir { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--inset); border: 1px solid var(--line); flex: 0 0 auto; position: relative; }
.deal-dir .flag { width: 20px; height: 20px; }
.deal-dir .flag + .flag { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; box-shadow: 0 0 0 2px var(--paper); }
.deal-amt { display: grid; gap: 2px; }
.deal-amt b { font-family: var(--font-num); font-size: 13.5px; font-weight: 600; letter-spacing: -.02em; }
.deal-amt small { font-size: 11.5px; color: var(--muted); font-family: var(--font-num); }
.deal-row .when { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .deal-row { grid-template-columns: minmax(0, 1fr) auto; } .deal-row .when, .deal-row .deal-amt.from { display: none; } }

/* ---------- Мастер нового перевода ---------- */
.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
@media (max-width: 1180px) { .wizard { grid-template-columns: 1fr; } }
.stepper { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stepper span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 999px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); background: var(--paper); }
.stepper span i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--inset); font-family: var(--font-num); font-size: 11px; }
.stepper span.on { color: var(--ink); border-color: var(--field-line); }
.stepper span.on i { background: var(--accent); color: var(--on-accent); }
.stepper span.done i { background: var(--success-soft); color: var(--success); }
.stepper .sep { width: 18px; height: 1px; background: var(--line-strong); padding: 0; border: 0; border-radius: 0; }
.w-title { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pick-card { position: relative; display: grid; gap: 10px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); text-align: left; transition: border-color .2s, box-shadow .2s, transform .3s var(--ease-out); }
.pick-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.pick-card[aria-pressed="true"] { border-color: var(--field-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.pick-card[aria-pressed="true"]::after { content: ""; position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 9.5 17 19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.pick-card b { font-size: 14px; }
.pick-card small { font-size: 12px; color: var(--muted); font-family: var(--font-num); }
.pick-card .tag { font-size: 11px; color: var(--muted); }
.pick-new { border-style: dashed; place-items: center; color: var(--accent-text); font-weight: 600; font-size: 13px; min-height: 110px; }
.summary { position: sticky; top: 92px; display: grid; gap: 14px; }
.sum-amts { display: grid; gap: 4px; padding-bottom: 16px; border-bottom: 1px dashed var(--line-strong); }
.sum-amts small { font-size: 12px; color: var(--muted); }
.sum-amts b { font-family: var(--font-num); font-size: 28px; font-weight: 600; letter-spacing: -.05em; }
.sum-amts .to { color: var(--accent-text); }
.method { display: grid; gap: 8px; }
.method label { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.method label:has(input:checked) { border-color: var(--field-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.method label.off { cursor: not-allowed; opacity: .55; border-style: dashed; }
.method input { accent-color: var(--accent); }
.method b { display: block; font-size: 13.5px; }
.method small { display: block; font-size: 12px; color: var(--muted); }
.method .soon { margin-left: auto; font-size: 11px; color: var(--muted); }

/* ---------- Заявка ---------- */
.deal-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; padding-top: 8px; }
.deal-title { display: grid; gap: 12px; }
.deal-title .meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.deal-route { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.deal-route .amt { display: grid; gap: 2px; }
.deal-route .amt b { font-family: var(--font-num); font-size: clamp(28px, 3.6vw, 46px); font-weight: 600; letter-spacing: -.06em; line-height: 1.05; }
.deal-route .amt small { font-size: 12px; color: var(--muted); }
.deal-route .amt.to b { color: var(--accent-text); }
.deal-route .line { position: relative; width: 90px; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 5px, transparent 5px 10px); }
.deal-route .line i { position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); animation: travel 2.4s var(--ease) infinite; }
.deal-route.still .line i { animation: none; left: calc(100% - 5px); }
.deal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 1180px) { .deal-grid { grid-template-columns: 1fr; } .deal-head { grid-template-columns: 1fr; } }

.act { position: relative; overflow: hidden; border-radius: 28px; padding: 28px; background: var(--paper); border: 1px solid var(--line); display: grid; gap: 20px; }
.act.wait { border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); }
.act-title { display: flex; gap: 14px; align-items: flex-start; }
.act-title .ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; flex: 0 0 auto; background: var(--accent-soft); color: var(--accent-text); }
.act.wait .act-title .ico { background: var(--warning-soft); color: var(--warning); }
.act.ok .act-title .ico { background: var(--success-soft); color: var(--success); }
.act.bad .act-title .ico { background: var(--danger-soft); color: var(--danger); }
.act-title h3 { font-family: var(--font-display); font-size: 24px; font-weight: 550; letter-spacing: -.04em; line-height: 1.1; }
.act-title p { color: var(--muted); font-size: 13.5px; margin-top: 6px; max-width: 560px; }
.act-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.deadline { margin-left: auto; text-align: right; flex: 0 0 auto; }
.deadline b { display: block; font-family: var(--font-num); font-size: 30px; font-weight: 600; letter-spacing: -.05em; color: var(--warning); line-height: 1; }
.deadline small { font-size: 11px; color: var(--muted); }

/* Ожидание: концентрические кольца */
.orbit { position: relative; width: 120px; height: 120px; margin: 8px auto 0; }
.orbit span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--field-line); opacity: 0; animation: orbit 2.8s var(--ease) infinite; }
.orbit span:nth-child(2) { animation-delay: .9s; } .orbit span:nth-child(3) { animation-delay: 1.8s; }
.orbit i { position: absolute; inset: 38px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: var(--on-accent); box-shadow: 0 10px 30px -8px var(--accent); }
@keyframes orbit { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .orbit span { animation: none; opacity: .4; } .deal-route .line i { animation: none; left: 45%; } }

/* Реквизиты для оплаты */
.pay { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 18px; align-items: start; }
.pay .kv > div { padding: 12px 0; }
.pay .kv b { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.pay-big b { font-family: var(--font-num); font-size: 20px; letter-spacing: -.03em; }
.qr { width: 168px; padding: 12px; border-radius: 18px; background: #fff; border: 1px solid var(--line); display: grid; gap: 8px; justify-items: center; }
.qr canvas { width: 144px; height: 144px; image-rendering: pixelated; }
.qr small { color: #6d6d76; font-size: 10px; text-align: center; }
@media (max-width: 640px) { .pay { grid-template-columns: 1fr; } .qr { justify-self: center; } }
.drop { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; border: 1.5px dashed var(--line-strong); background: var(--inset); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--field-line); background: var(--accent-soft); }
.drop .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent-text); flex: 0 0 auto; }
.drop b { display: block; font-size: 13px; }
.drop small { display: block; font-size: 12px; color: var(--muted); }
.drop input { display: none; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--success-soft); color: var(--success); font-size: 12px; font-weight: 600; }

/* Готово */
.done-check { width: 72px; height: 72px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; }
.done-check svg { width: 34px; height: 34px; stroke-width: 2.4; }
.done-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .7s .15s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .done-check path { animation: none; stroke-dashoffset: 0; } }

/* Таймлайн */
.tl { list-style: none; margin: 0; padding: 0; display: grid; }
.tl li { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; }
.tl li::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl li.done::before { background: var(--accent); opacity: .5; }
.tl .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1.5px solid var(--line-strong); color: var(--faint); font-family: var(--font-num); font-size: 10px; }
.tl li.done .dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tl li.now .dot { border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl li.now.client .dot { border-color: var(--warning); color: var(--warning); box-shadow: 0 0 0 5px var(--warning-soft); }
.tl li.bad .dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.tl b { display: block; font-size: 13px; font-weight: 600; padding-top: 3px; }
.tl li.todo b { color: var(--muted); font-weight: 500; }
.tl small { display: block; font-size: 11.5px; color: var(--muted); }
.tl .who { display: inline-block; margin-top: 4px; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: var(--inset); color: var(--muted); }
.tl li.now.client .who { background: var(--warning-soft); color: var(--warning); }

/* ---------- История ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); min-width: 240px; color: var(--muted); }
.search input { all: unset; flex: 1; font-size: 13px; color: var(--ink); }
.search:focus-within { border-color: var(--field-line); box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 640px) { .search { min-width: 0; width: 100%; } }

/* ---------- Получатели ---------- */
.rcp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rcp { display: grid; gap: 18px; padding: 20px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); transition: box-shadow .3s, transform .3s var(--ease-out); }
.rcp:hover { box-shadow: var(--lift); transform: translateY(-2px); }
.rcp-top { display: flex; gap: 12px; align-items: center; }
.rcp-top b { display: block; font-size: 14px; }
.rcp-top small { display: block; font-size: 12px; color: var(--muted); }
.rcp .acc { font-family: var(--font-num); font-size: 12.5px; color: var(--muted); letter-spacing: -.01em; overflow-wrap: anywhere; }
.rcp-acts { display: flex; gap: 8px; }

/* Модальное окно */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(12, 12, 18, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .25s; }
.modal-box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 26px; padding: 26px; display: grid; gap: 18px; box-shadow: var(--float); animation: rise .45s var(--ease-out); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h2 { font-family: var(--font-display); font-size: 24px; font-weight: 550; letter-spacing: -.04em; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Верификация ---------- */
.kyc { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .kyc { grid-template-columns: 1fr; } }
.doc-drop { display: grid; place-items: center; gap: 12px; text-align: center; min-height: 220px; padding: 24px; border-radius: 22px; border: 1.5px dashed var(--line-strong); background: var(--inset); cursor: pointer; transition: border-color .2s, background .2s; position: relative; overflow: hidden; }
.doc-drop:hover { border-color: var(--field-line); background: var(--accent-soft); }
.doc-drop .ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); color: var(--accent-text); }
.doc-drop input { display: none; }
.doc-drop.has { border-style: solid; border-color: var(--success); background: var(--success-soft); }
.doc-drop.has .ico { color: var(--success); }
.selfie-frame { width: 150px; height: 190px; border-radius: 50% / 45%; border: 2px dashed var(--field-line); display: grid; place-items: center; color: var(--faint); }

/* ---------- Чат ---------- */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: min(720px, calc(100vh - 180px)); min-height: 460px; padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat-head b { display: block; font-size: 14px; }
.chat-head small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.chat-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.chat-list { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: min(520px, 80%); padding: 11px 14px; border-radius: 18px; font-size: 13.5px; line-height: 1.45; animation: rise .35s var(--ease-out); }
.msg small { display: block; font-size: 10.5px; opacity: .65; margin-top: 4px; }
.msg.op { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.msg.sys { align-self: center; background: transparent; color: var(--muted); font-size: 12px; padding: 4px; }
.typing { display: inline-flex; gap: 4px; padding: 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: pulse 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--paper); }
.chat-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; height: 44px; background: var(--bg); outline: none; }
.chat-form input:focus { border-color: var(--field-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px 12px; background: var(--bg); }

/* ---------- Профиль ---------- */
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .25s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--ease-out); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-size: 13.5px; font-weight: 600; }
.set-row small { display: block; font-size: 12px; color: var(--muted); }

/* ---------- Демо-панель ---------- */
.demo-fab { position: fixed; z-index: 60; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--line-inverse); background: var(--inverse-raised); color: var(--on-inverse); font-size: 12px; font-weight: 650; box-shadow: var(--lift); transition: transform .3s var(--ease-out); }
.demo-fab:hover { transform: translateY(-2px); }
.demo-fab .i { color: var(--accent-on-inverse); }
@media (max-width: 1000px) { .app ~ .demo-fab, body.in-app .demo-fab { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }
.drawer { position: fixed; z-index: 80; top: 10px; right: 10px; bottom: 10px; width: min(400px, calc(100% - 20px)); background: var(--inverse-raised); color: var(--on-inverse); border-radius: 26px; border: 1px solid var(--line-inverse); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); display: grid; grid-template-rows: auto 1fr; overflow: hidden; animation: slide .45s var(--ease-out); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line-inverse); }
.drawer-head b { font-family: var(--font-display); font-size: 18px; font-weight: 550; letter-spacing: -.03em; }
.drawer-head small { display: block; font-size: 11px; color: var(--on-inverse-muted); }
.drawer-body { overflow-y: auto; padding: 18px 20px 28px; display: grid; gap: 22px; align-content: start; }
.drawer h4 { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-on-inverse); margin: 0 0 10px; font-weight: 700; }
.drawer .muted { color: var(--on-inverse-muted); font-size: 12px; }
.drawer .btn { background: rgba(255, 255, 255, .06); color: var(--on-inverse); border-color: var(--line-inverse); justify-content: flex-start; }
.drawer .btn:hover { border-color: rgba(255, 255, 255, .25); }
.drawer .btn-primary { background: var(--accent); border-color: transparent; justify-content: center; }
.drawer .btn-icon { justify-content: center; }
.drawer .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.drawer select { width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--line-inverse); background: rgba(255, 255, 255, .06); color: var(--on-inverse); padding: 0 12px; }
.drawer select option { color: #16161b; }
.drawer .set-row { border-color: var(--line-inverse); }
.drawer .set-row small { color: var(--on-inverse-muted); }
.drawer input[type="range"] { width: 100%; accent-color: var(--accent-on-inverse); }
.drawer .cur-state { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; }
.drawer .status { background: var(--tag-on-inverse); color: var(--tag-ink); border-color: transparent; }

@media (max-width: 640px) {
  .topbar .crumbs { display: none; }
  .act { padding: 20px; border-radius: 22px; }
  .act-title { flex-wrap: wrap; }
  .act-title h3 { font-size: 21px; }
  .deadline { margin-left: 60px; text-align: left; }
  .deal-route .line { width: 48px; }
  .deal-head .act-actions .btn { flex: 1; }
}
@media (max-width: 1000px) { .demo-fab { width: 44px; padding: 0; justify-content: center; } .demo-fab span { display: none; } }

/* ---------- Дорожка заявки ---------- */
.track { border-radius: 28px; padding: 26px 28px 30px; background: var(--paper); border: 1px solid var(--line); display: grid; gap: 8px; overflow: hidden; position: relative; isolation: isolate; }
.track-ends { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.track .end { display: flex; align-items: center; gap: 14px; }
.track .end .flag { width: 40px; height: 40px; box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--line); }
.track .end small { display: block; font-size: 12px; color: var(--muted); }
.track .end b { display: block; font-family: var(--font-num); font-size: clamp(26px, 3.4vw, 44px); font-weight: 600; letter-spacing: -.055em; line-height: 1.05; }
.track .end.to { text-align: right; }
.track .end.to b { color: var(--accent-text); }
.rail { position: relative; height: 2px; margin: 44px 30px 46px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }
.rail-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 2px; transition: width 1.1s var(--ease-out); }
.st { position: absolute; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; }
.st i { width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line-strong); transition: background .4s, border-color .4s; }
.st.done i { background: var(--accent); border-color: var(--accent); }
.st.now i { border-color: var(--accent); }
.track.mine .st.now i { border-color: var(--warning); }
.st em { position: absolute; top: 22px; font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.st.done em { color: var(--ink); }
.st.now em { color: var(--ink); font-weight: 650; }
.marker { position: absolute; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-ring), 0 8px 24px -4px var(--accent); transition: left 1.1s var(--ease-out); z-index: 2; }
.marker::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--accent); animation: ping 1.8s var(--ease) infinite; }
.track.mine .marker { background: var(--warning); box-shadow: 0 0 0 6px var(--warning-soft), 0 8px 24px -4px var(--warning); }
.track.mine .marker::after { border-color: var(--warning); }
.track.side .marker { background: var(--danger); box-shadow: 0 0 0 6px var(--danger-soft); }
.track.side .marker::after, .track.done .marker::after { display: none; }
.track.done .marker { background: var(--success); box-shadow: 0 0 0 6px var(--success-soft); }
.marker-tip { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 650; padding: 6px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: var(--lift); }
.marker-tip::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; background: var(--ink); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.marker-tip.start { left: -6px; transform: none; } .marker-tip.start::after { left: 18px; }
.marker-tip.end { left: auto; right: -6px; transform: none; } .marker-tip.end::after { left: auto; right: 14px; transform: rotate(45deg); }
@keyframes ping { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .marker, .rail-fill { transition: none; } .marker::after { animation: none; } }
@media (max-width: 760px) {
  .track { padding: 20px 18px 24px; }
  .track .end .flag { width: 30px; height: 30px; }
  .track-ends { display: grid; gap: 14px; }
  .track .end.to { justify-self: end; }
  .rail { margin: 52px 14px 40px; }
  .st em { display: none; }
  .st.now em { display: block; }
  .st:first-of-type.now em { left: -8px; }
}
