/* Личный кабинет LUMIQ.
   Токены — те же, что на странице скачивания (docs/landing-index.html):
   тёмная тема по умолчанию, светлая — по системе.
   Каркас: на компьютере — боковое меню, на телефоне — нижняя панель из
   четырёх разделов, как в приложении. */
:root{
  --bg:#110F19; --surface:#1A1724; --surface-2:#221E2E; --surface-3:#2A2538; --outline:#2C2739;
  --accent:#7C4DFF; --accent-2:#9D7BFF; --accent-dim:rgba(124,77,255,.14);
  --success:#22C55E; --success-dim:rgba(34,197,94,.12);
  --warn:#EAB308; --warn-dim:rgba(234,179,8,.1);
  --error:#F87171; --error-dim:rgba(239,68,68,.12);
  --on:#EFEDF5; --on-med:#A29DB0; --on-low:#6E6880; --divider:#221E2E;
  --font:'Inter',-apple-system,'Segoe UI',Roboto,sans-serif;
  --mono:ui-monospace,'SF Mono',Consolas,monospace;
  --r:16px; --r-sm:12px;
  color-scheme:dark;
}
@media (prefers-color-scheme: light){
  :root{
    --bg:#F6F4FC; --surface:#FFFFFF; --surface-2:#F1EEF9; --surface-3:#E8E3F5; --outline:#E3DDF0;
    --accent:#7C4DFF; --accent-2:#6B3FE8; --accent-dim:rgba(124,77,255,.10);
    --success:#16A34A; --success-dim:rgba(22,163,74,.10);
    --warn:#B45309; --warn-dim:rgba(217,119,6,.10);
    --error:#DC2626; --error-dim:rgba(220,38,38,.08);
    --on:#191622; --on-med:#5E5870; --on-low:#918AA3; --divider:#EEEAF6;
    color-scheme:light;
  }
}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;
  src:url(/app/fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;
  src:url(/app/fonts/inter-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--on);font-family:var(--font);
  -webkit-font-smoothing:antialiased;font-size:15px;line-height:1.5}
a{color:var(--accent-2);text-decoration:none}
a:hover{text-decoration:underline}
p{margin:0 0 12px}
h1,h2,h3{margin:0;letter-spacing:-.015em}
.ic{width:20px;height:20px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ic-sm{width:16px;height:16px}
.muted{color:var(--on-med)}
.small{font-size:13px;color:var(--on-low)}
.mt{margin-top:12px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* --- Каркас ------------------------------------------------------------- */
.shell{display:grid;grid-template-columns:260px minmax(0,1fr);min-height:100vh}
.side{position:sticky;top:0;height:100vh;overflow-y:auto;padding:22px 14px;border-right:1px solid var(--divider);
  display:flex;flex-direction:column;gap:4px}
.brand{display:flex;align-items:center;gap:10px;color:var(--on);padding:0 10px 18px}
.brand:hover{text-decoration:none}
.mark{width:32px;height:32px;border-radius:9px;background:var(--accent-dim);display:flex;align-items:center;justify-content:center}
.brand-name{font-size:14px;font-weight:700;letter-spacing:.16em;text-transform:uppercase}
.nav-group{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--on-low);padding:16px 12px 6px}
.nav-link{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:10px;color:var(--on-med);font-size:14px;font-weight:500}
.nav-link:hover{background:var(--surface);color:var(--on);text-decoration:none}
.nav-link.on{background:var(--accent-dim);color:var(--on)}
.nav-link.on .ic{color:var(--accent-2)}
.side-foot{margin-top:auto;padding-top:16px}
.side-foot button{width:100%}

.main{min-width:0;padding:40px 48px 64px}
.page{max-width:760px}
.topbar,.tabbar{display:none}

@media (max-width: 899px){
  .shell{display:block}
  .side{display:none}
  .main{padding:8px 16px calc(96px + env(safe-area-inset-bottom))}
  .topbar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px 4px}
  .topbar .brand{padding:0}
  .tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:10;
    background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
    border-top:1px solid var(--divider);padding:6px 6px calc(6px + env(safe-area-inset-bottom))}
  .tab{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 0;border-radius:12px;
    color:var(--on-low);font-size:11px;font-weight:600}
  .tab:hover{text-decoration:none}
  .tab .ic{width:22px;height:22px}
  .tab.on{color:var(--accent-2)}
}

/* Страницы входа — без меню, по центру. */
.auth{max-width:420px;margin:0 auto;padding:48px 16px 40px}
.auth .brand{justify-content:center;padding:0 0 28px}

/* --- Заголовок страницы ------------------------------------------------- */
.ph{margin:0 0 20px}
.ph h1{font-size:26px;font-weight:700;line-height:1.2}
.ph p{margin:6px 0 0;color:var(--on-med)}
.back{display:inline-flex;align-items:center;gap:4px;font-size:13px;color:var(--on-med);margin-bottom:10px}
@media (max-width: 899px){ .ph{margin-top:10px} .ph h1{font-size:23px} }

/* --- Блоки --------------------------------------------------------------- */
.panel{background:var(--surface);border:1px solid var(--outline);border-radius:var(--r);padding:20px;margin-bottom:14px}
.panel > h2{font-size:16px;font-weight:650;margin-bottom:6px}
.panel > h2 + p{color:var(--on-med)}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.panel-head h2{font-size:16px;font-weight:650}
.section-title{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--on-low);margin:26px 4px 10px}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
@media (max-width: 640px){ .grid-2{grid-template-columns:1fr} }

/* Главный блок: статус подписки. */
.hero{position:relative;overflow:hidden;border-radius:20px;padding:24px;margin-bottom:14px;border:1px solid var(--outline);
  background:radial-gradient(120% 140% at 100% 0%,rgba(124,77,255,.28),transparent 55%),var(--surface)}
.hero.off{background:var(--surface)}
.hero-top{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.big{font-size:44px;font-weight:700;line-height:1;letter-spacing:-.03em}
.big span{font-size:18px;font-weight:600;color:var(--on-med);letter-spacing:0;margin-left:6px}
.hero .sub{color:var(--on-med);margin-top:8px}
.hero .actions{margin-top:20px}
.hero h1{font-size:24px;font-weight:700;margin-bottom:6px}

/* Строки: ключ — значение, ссылки-пункты, элементы списков. */
.list{background:var(--surface);border:1px solid var(--outline);border-radius:var(--r);margin-bottom:14px;overflow:hidden}
.item{display:flex;align-items:center;gap:14px;padding:14px 16px;color:var(--on);border-top:1px solid var(--divider);min-height:60px}
.item:first-child{border-top:0}
a.item:hover,button.item:hover{background:var(--surface-2);text-decoration:none}
button.item{width:100%;background:none;border:0;border-top:1px solid var(--divider);font:inherit;text-align:left;cursor:pointer;color:inherit}
form:first-child > button.item{border-top:0}
.item-ic{width:38px;height:38px;border-radius:11px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--on-med);flex:0 0 auto}
.item-ic.accent{background:var(--accent-dim);color:var(--accent-2)}
.item-ic.danger{background:var(--error-dim);color:var(--error)}
.item-body{flex:1 1 auto;min-width:0}
.item-title{display:block;font-weight:600;font-size:15px}
.item-meta{display:block;font-size:13px;color:var(--on-low);margin-top:1px}
.item-end{flex:0 0 auto;display:flex;align-items:center;gap:8px;color:var(--on-med);font-size:14px;text-align:right}
.chev{color:var(--on-low)}
.item.current{background:var(--accent-dim)}

.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
@media (max-width: 640px){ .tiles{grid-template-columns:repeat(2,minmax(0,1fr))} }
.tile{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:var(--r);background:var(--surface);border:1px solid var(--outline);color:var(--on);font-weight:600;font-size:14px;line-height:1.3}
.tile:hover{background:var(--surface-2);text-decoration:none}
.tile .item-ic{width:36px;height:36px}

/* --- Кнопки и поля ------------------------------------------------------ */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;
  border-radius:12px;font-size:14px;font-weight:600;cursor:pointer;font-family:inherit;border:1px solid transparent;
  white-space:nowrap;background:var(--surface-2);color:var(--on);text-decoration:none}
.btn:hover{text-decoration:none}
.btn-primary{background:var(--accent);color:#fff}
.btn-secondary{background:transparent;border-color:var(--outline)}
.btn-ghost{background:transparent;color:var(--on-med);padding:0 10px;min-height:36px}
.btn-danger{background:var(--error-dim);color:var(--error)}
.btn-sm{min-height:36px;padding:0 14px;font-size:13px;border-radius:10px}
.btn-block{width:100%}
.btn:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--accent-2);outline-offset:2px}
.btn:disabled{opacity:.45;cursor:default}
@media (hover: hover){
  .btn-primary:hover{filter:brightness(1.1)}
  .btn-secondary:hover,.btn-ghost:hover{background:var(--surface-2);color:var(--on)}
}
.actions{display:flex;flex-wrap:wrap;gap:10px}
.actions.mt{margin-top:16px}
@media (max-width: 480px){ .actions.stack > *{flex:1 1 100%} .actions.stack form > .btn{width:100%} }

label{display:block;font-size:13px;font-weight:600;margin:14px 0 6px;color:var(--on-med)}
label:first-of-type{margin-top:4px}
input[type=text],input[type=email],input[type=password],textarea{width:100%;min-height:46px;padding:11px 14px;border-radius:12px;
  border:1px solid var(--outline);background:var(--surface-2);color:var(--on);font-family:inherit;font-size:15px}
input:focus,textarea:focus{border-color:var(--accent);outline:none}
textarea{resize:none;min-height:46px}
.check{display:flex;gap:10px;align-items:flex-start;font-weight:500;font-size:14px;color:var(--on-med);margin:16px 0 4px}
.check input{margin-top:3px;width:16px;height:16px;accent-color:var(--accent)}
.inline{display:flex;gap:8px}
.inline input{flex:1;min-width:0}

/* Поле с кнопкой «Копировать». */
.copy{display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1px solid var(--outline);border-radius:12px;padding:5px 5px 5px 14px}
.copy input{flex:1;min-width:0;min-height:36px;border:0;background:none;padding:0;font-family:var(--mono);font-size:13px;color:var(--on)}
.copy input:focus{outline:none}

/* --- Сообщения, метки --------------------------------------------------- */
.toast{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:12px;margin-bottom:16px;font-size:14px}
.toast.ok{background:var(--success-dim);color:var(--success)}
.toast.error{background:var(--error-dim);color:var(--error)}
.note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:12px;font-size:14px;background:var(--warn-dim);color:var(--warn);margin-bottom:14px}
.note.info{background:var(--accent-dim);color:var(--on)}
.note .ic{margin-top:1px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600;background:var(--surface-2);color:var(--on-med)}
.chip.ok{background:var(--success-dim);color:var(--success)}
.chip.ok::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.chip.warn{background:var(--warn-dim);color:var(--warn)}
.chip.off{background:var(--error-dim);color:var(--error)}
.chip.accent{background:var(--accent-dim);color:var(--accent-2)}

/* --- Подключение -------------------------------------------------------- */
.code-big{font-family:var(--mono);font-size:34px;font-weight:700;letter-spacing:.18em;margin:6px 0 4px}
.apps{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 14px}
details.qr-box{margin-top:12px}
details > summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:8px;font-weight:600;font-size:14px;color:var(--accent-2)}
details > summary::-webkit-details-marker{display:none}
.qr{display:block;width:200px;height:200px;margin-top:12px;border-radius:14px;background:#fff;padding:6px}

/* --- Переписка ---------------------------------------------------------- */
.chat-wrap{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--outline);border-radius:var(--r);overflow:hidden}
.chat{display:flex;flex-direction:column;gap:6px;padding:16px;min-height:260px;max-height:62vh;overflow-y:auto}
.bubble{max-width:80%;padding:9px 13px;border-radius:16px;font-size:15px;line-height:1.45}
.bubble .text{white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}
.bubble.in{align-self:flex-start;background:var(--surface-2);border-bottom-left-radius:6px}
.bubble.out{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:6px}
.bubble.out a{color:#fff;text-decoration:underline}
.bubble time{display:block;font-size:11px;margin-top:3px;opacity:.65;text-align:right}
.bubble .file{display:inline-flex;align-items:center;gap:6px;font-weight:600}
.day{align-self:center;font-size:12px;color:var(--on-low);margin:8px 0 2px}
.chat-empty{margin:auto;text-align:center;color:var(--on-low);padding:30px 10px}
.composer{display:flex;align-items:flex-end;gap:8px;padding:10px;border-top:1px solid var(--divider);background:var(--surface)}
.composer textarea{flex:1;max-height:160px;border-radius:22px;padding:11px 16px}
.icon-btn{width:46px;height:46px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:0;cursor:pointer;background:var(--surface-2);color:var(--on-med)}
.icon-btn.primary{background:var(--accent);color:#fff}
.attach input{position:absolute;width:1px;height:1px;opacity:0}
.attach:focus-within{outline:2px solid var(--accent-2);outline-offset:2px}
.attached{font-size:12px;color:var(--on-med);padding:0 14px 8px;display:none}
.attached.on{display:block}

/* --- Тарифы ------------------------------------------------------------- */
.plans{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:14px}
.plan{background:var(--surface);border:1px solid var(--outline);border-radius:var(--r);padding:18px}
.plan h3{font-size:15px;font-weight:600;color:var(--on-med)}
.price{font-size:30px;font-weight:700;letter-spacing:-.02em;margin:8px 0 2px}
.price s{font-size:15px;color:var(--on-low);font-weight:500;margin-left:6px}

/* --- Инструкции --------------------------------------------------------- */
.seg{display:flex;gap:4px;padding:4px;background:var(--surface);border:1px solid var(--outline);border-radius:12px;margin-bottom:16px;overflow-x:auto}
.seg a{flex:1;text-align:center;padding:8px 12px;border-radius:9px;color:var(--on-med);font-size:14px;font-weight:600;white-space:nowrap}
.seg a:hover{text-decoration:none;color:var(--on)}
.seg a.on{background:var(--surface-3);color:var(--on)}
.steps{counter-reset:step;list-style:none;margin:0;padding:0}
.steps li{counter-increment:step;position:relative;padding:0 0 18px 46px}
.steps li::before{content:counter(step);position:absolute;left:0;top:-2px;width:30px;height:30px;border-radius:50%;
  background:var(--accent-dim);color:var(--accent-2);font-weight:700;font-size:14px;display:flex;align-items:center;justify-content:center}
.steps li:last-child{padding-bottom:0}
.steps img{max-width:100%;border-radius:12px;margin-top:10px;border:1px solid var(--outline)}
.faq details{padding:14px 0;border-top:1px solid var(--divider)}
.faq details:first-child{border-top:0;padding-top:4px}
.faq summary{color:var(--on);width:100%;justify-content:space-between}
.faq details[open] summary .ic{transform:rotate(90deg)}
.faq details p{margin:8px 0 0;color:var(--on-med)}

.empty{text-align:center;padding:28px 16px;color:var(--on-low)}
.foot{margin-top:32px;font-size:12px;color:var(--on-low)}
.foot a{color:var(--on-low)}
.divider{display:flex;align-items:center;gap:12px;color:var(--on-low);font-size:13px;margin:20px 0}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--outline)}
.terms{line-height:1.6}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
.center{text-align:center}
.icon-center{margin:4px auto 14px}
.panel.center h1{font-size:22px}
.gap-b{margin-bottom:12px}

/* Правки после просмотра на телефоне и компьютере. */
.side-foot button{justify-content:flex-start;padding:0 12px}
.actions.scroll-x{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-left:-2px;padding:2px}
.actions.scroll-x::-webkit-scrollbar{display:none}
.actions.scroll-x > *{flex:0 0 auto}
.qr{width:180px;height:180px}
@media (max-width: 640px){
  .plans{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .plan{padding:14px 12px}
  .plan h3{font-size:13px}
  .price{font-size:22px}
  .plan .small{font-size:12px}
  .btn-block-m{width:100%}
}
.panel-head h2{display:inline-flex;align-items:center;gap:8px}
.panel > :last-child,.panel form > :last-child{margin-bottom:0}

/* Документы и тарифы — публичные страницы для покупателей и банка. */
.doc{line-height:1.65}
.doc h1{font-size:24px;margin-bottom:4px}
.doc h2{font-size:16px;font-weight:650;margin:22px 0 8px}
.doc p{margin:0 0 10px}
.doc ul{margin:0 0 10px;padding-left:22px}
.doc li{margin-bottom:4px}
.prices{width:100%;border-collapse:collapse;margin:14px 0 6px}
.prices th,.prices td{text-align:left;padding:10px 8px;border-top:1px solid var(--divider);vertical-align:top}
.prices th{color:var(--on-low);font-size:12.5px;font-weight:600;border-top:0}
.prices .num{text-align:right;white-space:nowrap}

.verify{color:var(--on-low);font-size:11px}

/* Документы, цены, инструкции без входа — шире формы входа: это текст для
   чтения, в колонке 420 px соглашение превращалось в простыню коротких строк. */
.auth.wide{max-width:780px}
.auth.wide .brand{justify-content:flex-start}

/* Подвал: ссылки через «·», ровными строками; на страницах без меню — по центру. */
.legal-links{display:flex;flex-wrap:wrap;gap:4px 0;line-height:1.7}
.legal-links a{white-space:nowrap}
.legal-links a + a::before{content:"·";margin:0 8px;color:var(--on-low)}
.auth .foot{text-align:center}
.auth .foot .legal-links{justify-content:center}
.auth.wide .foot{text-align:left}
.auth.wide .foot .legal-links{justify-content:flex-start}
.verify{margin:6px 0 0}
.legal-links a + a::before{display:inline-block;text-decoration:none}
/* В документе все абзацы одного цвета: правило «подзаголовок под h2 — серый»
   из кабинета красило каждый первый абзац раздела. */
.doc h2 + p{color:var(--on)}
/* На узком экране ссылки переносятся, и «·» оказывались в начале строки. */
@media (max-width: 640px){
  .legal-links{gap:2px 16px}
  .legal-links a + a::before{display:none}
}
.doc h1{line-height:1.2}
/* Разделители «·» убраны везде: при любом переносе они оказывались в начале
   строки. Ссылки разделяет отступ. */
.legal-links{gap:2px 18px}
.legal-links a + a::before{display:none}
