/* Вход и личный кабинет */
.page { padding: 56px 0 40px; min-height: 60vh; }
.narrow { max-width: 520px; margin: 0 auto; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 24px; text-align: left; margin-bottom: 6px; }
.panel .sub { font-size: 15px; margin-bottom: 20px; }
.page h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 8px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: 14px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); margin-bottom: 22px; }
.seg button { border: 0; background: none; color: var(--muted); font: 600 15px "Inter", sans-serif; padding: 11px; border-radius: 12px; cursor: pointer; }
.seg button.on { background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }

label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.input { width: 100%; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font: 500 17px "Inter", sans-serif; outline: none; transition: border-color .15s; }
.input:focus { border-color: var(--accent); }
.input.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 1px; }
.field { margin-bottom: 16px; }
.full { width: 100%; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; margin: 22px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.flashes { padding-top: 18px; display: grid; gap: 8px; }
.flash { padding: 14px 18px; border-radius: 14px; font-size: 15px; font-weight: 500; border: 1px solid var(--line2); background: var(--card); }
.flash.ok { border-color: rgba(185,245,63,.45); background: rgba(185,245,63,.08); }
.flash.err { border-color: rgba(255,110,110,.45); background: rgba(255,90,90,.08); }

.number { font: 700 clamp(22px, 5vw, 30px) ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 2px; padding: 20px; border-radius: 18px; text-align: center; background: var(--bg2); border: 1px dashed rgba(185,245,63,.5); margin: 18px 0; word-break: break-all; }
.warnbox { padding: 14px 16px; border-radius: 14px; background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.35); color: #ffe2a3; font-size: 14px; margin-bottom: 18px; }

/* кабинет */
.cab { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }
.cab-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 99px; }
.status.on { background: rgba(185,245,63,.14); color: var(--accent); }
.status.off { background: rgba(255,90,90,.12); color: #ff7a7a; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.kv div { padding: 14px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); }
.kv b { display: block; font-family: var(--display); font-size: 20px; }
.kv span { color: var(--dim); font-size: 13px; }
.link { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line2); }
.link code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--muted); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.qr { background: #fff; border-radius: 18px; padding: 14px; width: 210px; margin: 0 auto 14px; }
.qr svg { width: 100%; height: auto; display: block; }
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.apps a { padding: 11px; border-radius: 12px; border: 1px solid var(--line); text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.apps a:hover { color: var(--text); border-color: var(--line2); }

.dev { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); margin-bottom: 8px; }
.dev .n { flex: 1; font-weight: 600; font-size: 15px; } .dev .n small { display: block; color: var(--dim); font-weight: 500; font-size: 12px; }
.icon-btn { border: 1px solid var(--line2); background: none; color: var(--muted); border-radius: 10px; padding: 7px 10px; cursor: pointer; font: 600 13px "Inter", sans-serif; }
.icon-btn:hover { color: #ff7a7a; border-color: rgba(255,90,90,.5); }

.buy-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: block; padding: 14px 10px; border-radius: 14px; border: 1px solid var(--line2); text-align: center; cursor: pointer; transition: .15s; }
.opt span b { display: block; font-size: 15px; white-space: nowrap; } .opt span small { color: var(--dim); font-size: 12px; }
.opt input:checked + span { border-color: var(--accent); background: rgba(185,245,63,.08); box-shadow: 0 0 0 1px var(--accent) inset; }
.dev-tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.total { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 14px; padding: 16px 18px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); }
.total b { font-family: var(--display); font-size: 26px; }
.total s { color: var(--dim); margin-right: 8px; font-size: 16px; }
.promo { display: inline-block; background: var(--accent); color: var(--ink); font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 99px; margin-left: 8px; vertical-align: middle; }
.balance-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.balance-row b { font-family: var(--display); font-size: 26px; }
.topup { display: flex; gap: 8px; margin-top: 14px; }
.topup .input { flex: 1; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) { .cab { grid-template-columns: 1fr; } .buy-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .page { padding: 32px 0 20px; }
  .panel { padding: 22px; border-radius: 20px; }
  .kv { grid-template-columns: 1fr 1fr 1fr; } .kv b { font-size: 17px; }
  .buy-grid { grid-template-columns: 1fr 1fr; } .dev-tiers { grid-template-columns: 1fr 1fr; }
  .actions, .apps { grid-template-columns: 1fr; }
  .topup { flex-direction: column; } .topup .btn { width: 100%; }
}

/* кнопки-элементы не наследуют цвет и шрифт по умолчанию */
button { font: inherit; color: inherit; cursor: pointer; }
.btn-ghost { color: var(--text); }
button:disabled { opacity: .7; cursor: default; }

/* длинная ссылка не должна растягивать колонки */
.cab > * { min-width: 0; }
.link code { min-width: 0; }
.link .btn { width: auto; flex: 0 0 auto; }

/* смена количества устройств */
details.more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
details.more summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 15px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: " ▾"; }
details.more[open] summary { color: var(--text); margin-bottom: 6px; }
.opt-btn { width: 100%; padding: 12px 8px; border-radius: 14px; border: 1px solid var(--line2); background: none; text-align: center; transition: .15s; }
.opt-btn:hover { border-color: var(--accent); background: rgba(185,245,63,.06); }
.opt-btn b { display: block; font-size: 17px; } .opt-btn small { color: var(--dim); font-size: 12px; }

/* документы и инструкция */
.doc { max-width: 800px; }
.doc h3 { font-size: 19px; margin: 28px 0 10px; }
.doc p, .doc li { color: var(--muted); margin-bottom: 10px; }
.doc ul { padding-left: 20px; }
.doc a, .howto a { color: var(--accent); }
.seg4 { grid-template-columns: repeat(4, 1fr); }
.howto { padding-left: 22px; display: grid; gap: 14px; }
.howto li { color: var(--muted); padding-left: 6px; } .howto li b { color: var(--text); }
.tips { list-style: none; display: grid; gap: 10px; margin-top: 10px; }
.tips li { color: var(--muted); } .tips li b { color: var(--text); }
@media (max-width: 640px) { .seg4 { grid-template-columns: 1fr 1fr; } }
footer nav { flex-wrap: wrap; }
.seg3 { grid-template-columns: repeat(3, 1fr); }

/* аккаунт: сворачиваемый блок */
details.acc { padding: 28px; }
details.acc summary { padding: 0; align-items: center; }
details.acc summary h2 { margin: 0; }
details.acc[open] summary { margin-bottom: 18px; }
@media (max-width: 640px) { details.acc { padding: 22px; } }

/* «Изменить количество устройств»: убираем стили FAQ-карточки, оставляем лёгкую строку со стрелкой */
details.more { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 0; margin-top: 18px; }
details.more[open] { border-color: var(--line); }
details.more summary { display: block; padding: 0; font-size: 15px; }
details.more summary::after { content: " ▾"; color: var(--muted); font-size: inherit; line-height: inherit; transform: none; transition: none; }
details.more[open] summary::after { content: " ▴"; transform: none; }
details.more p { padding: 0; }

/* Кабинет: главная, устройства и профиль */
.cabinet-body { background: #080a09; }
.cabinet-body .bg-grid, .cabinet-body > footer { display: none; }
.cabinet-body > header { background: #080a09; border-bottom: 0; }
.cabinet-body > header .wrap { max-width: 760px; }
.cabinet-body .flashes { max-width: 760px; }
.cabinet-body .logo { font-family: Inter, sans-serif; font-weight: 800; letter-spacing: 1px; }
.cabinet-body .page { padding: 20px 0 calc(112px + env(safe-area-inset-bottom, 0px)); }
.cabinet-wrap { max-width: 760px; }
.cabinet-app [hidden] { display: none !important; }
.cab-settings { width: 44px; height: 44px; display: grid; place-items: center; color: #a8adaa; border: 1px solid transparent; border-radius: 14px; }
.cab-settings svg { width: 26px; height: 26px; }
.cab-settings:hover { border-color: var(--line2); color: var(--accent); }
.cabinet-app .panel { border-radius: 24px; background: linear-gradient(130deg, #151917, #0e1110); border-color: #2b302d; }
.cabinet-app h1, .cabinet-app h2 { font-family: Inter, sans-serif; letter-spacing: -.6px; }
.cabinet-app h1 { margin: 0 0 24px; font-weight: 700; }
.cabinet-app h2 { font-size: 22px; margin-bottom: 14px; }
.cab-greeting { color: #a8adaa; font-size: 14px; margin: 0 0 16px 2px; }
.subscription-card { padding: 30px; }
.subscription-card .status { padding: 0; background: none; font-size: 16px; }
.days-hero { margin-top: 20px; color: #f6f8f6; line-height: 1; letter-spacing: -3px; }
.days-hero b { font-size: clamp(64px, 15vw, 100px); font-weight: 750; }
.days-hero span { font-size: clamp(36px, 8vw, 56px); font-weight: 650; }
.expiry { color: #a8adaa; font-size: 17px; margin-top: 12px; }
.subscription-meta { display: flex; justify-content: space-between; gap: 14px; margin: 24px 0; padding-top: 18px; border-top: 1px solid #2b302d; color: #a8adaa; font-size: 13px; }
.subscription-card h1 { margin-top: 24px; line-height: 1.25; }
.cabinet-app .btn { border-radius: 15px; font-family: Inter, sans-serif; text-align: center; }
.cabinet-app .btn-main { background: linear-gradient(110deg, #d2ff50, #baf53f); box-shadow: none; color: #0a1000; }
.connect-primary { min-height: 60px; font-size: 19px; font-weight: 750; display: flex; justify-content: center; gap: 12px; }
.renew-primary { min-height: 56px; margin: 16px 0 20px; border: 1px solid #89918c; font-size: 18px; font-weight: 650; }
.cab-shortcuts { display: grid; gap: 12px; margin: 20px 0; }
.cab-row { display: flex; align-items: center; gap: 15px; padding: 20px; border: 1px solid #262d28; border-radius: 18px; background: linear-gradient(120deg, #141916, #101411); min-height: 78px; transition: border-color .15s; }
.cab-row:hover { border-color: #77836f; }
.cab-row > svg { width: 25px; height: 25px; flex-shrink: 0; color: #a6afa8; }
.cab-row > span:not(.chevron) { flex: 1; font-size: 17px; font-weight: 600; }
.cab-row b { font-size: 17px; font-weight: 650; white-space: nowrap; }
.chevron { color: #98a09a; font-size: 28px; font-weight: 300; }
.cab-help { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 2px; color: #a8adaa; font-size: 13px; }
.cab-help span { color: var(--accent); }
.cab-tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 760px); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; z-index: 50; background: rgba(12,16,13,.97); border: 1px solid #303a32; border-bottom: none; border-radius: 22px 22px 0 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); backdrop-filter: blur(18px); }
.cab-tabs a { display: flex; align-items: center; flex-direction: column; gap: 6px; min-height: 54px; justify-content: center; color: #aab1ac; border-radius: 13px; font-size: 12px; font-weight: 600; }
.cab-tabs a svg { width: 25px; height: 25px; }
.cab-tabs a.active { color: #c5fc42; background: rgba(185,245,63,.055); }
.cab-back { display: inline-block; margin-bottom: 20px; padding: 8px 0; color: #b3beb5; font-size: 14px; }
.cab-back:hover { color: var(--accent); }
.cabinet-app .profile-card { text-align: center; }
.profile-card h2 { text-align: center; margin-top: 16px; overflow-wrap: anywhere; }
.profile-avatar { display: grid; place-items: center; margin: auto; width: 64px; height: 64px; border-radius: 22px; color: var(--accent); background: rgba(185,245,63,.08); }
.profile-avatar svg { width: 30px; height: 30px; }
.profile-card p { overflow-wrap: anywhere; }
.cab-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; font-size: 12px; color: #9ba79e; margin-top: 28px; }
.cabinet-app .dev .n { min-width: 0; overflow-wrap: anywhere; }
.cabinet-app .input { min-width: 0; }
.cabinet-app .opt input:focus-visible + span, .cabinet-app a:focus-visible, .cabinet-body .cab-tabs a:focus-visible, .cabinet-body button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.cabinet-app .payment-wait { margin-bottom: 20px; border-color: rgba(185,245,63,.4); }
.payment-wait p { margin-top: 10px; }
.cabinet-app .dev-tiers form { min-width: 0; }
@media (min-width: 1000px) { .cabinet-body .page { padding-top: 30px; } .cabinet-body > header .wrap { padding-top: 14px; padding-bottom: 14px; } }
@media (max-width: 640px) {
 .cabinet-body > header .wrap { padding: 14px 20px; }
 .cabinet-body .page { padding-top: 8px; }
 .cabinet-app .panel { padding: 22px; border-radius: 22px; }
 .cabinet-app .subscription-card { padding: 24px; }
 .subscription-meta { font-size: 12px; gap: 8px; }
 .cab-row { padding: 18px 16px; min-height: 72px; gap: 12px; }
 .cab-row > span:not(.chevron), .cab-row b { font-size: 15px; }
 .cabinet-app .dev-tiers { grid-template-columns: repeat(2, minmax(0,1fr)); }
 .cabinet-app .actions { grid-template-columns: 1fr; }
 .cabinet-app .link .btn { padding: 10px; font-size: 12px; }
 .cabinet-app .qr { max-width: 100%; }
 .cab-tabs { border-left: 0; border-right: 0; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .cabinet-app *, .cab-tabs * { transition: none !important; } }
.cabinet-body { --accent: #c5fc42; --accent-2: #b9f53f; }
.cabinet-body > header .logo { font-size: 24px; gap: 12px; }
.cabinet-app .cab-screen { padding: 0; }
.cabinet-app .days-hero { display: flex; align-items: baseline; gap: 10px; }
.cabinet-app .days-hero span { letter-spacing: -1px; }
.cabinet-app .device-change { padding: 28px; }
@media (max-width: 640px) { .cabinet-app .device-change { padding: 22px; } }

/* Карточка срока — типографика и сегменты выбранного макета. */
.cabinet-app .subscription-card { padding: 28px 24px 24px; }
.cabinet-app .subscription-card .status { font-size: 17px; }
.cabinet-app .days-hero { margin-top: 26px; gap: 12px; font-size: clamp(60px, 16vw, 104px); letter-spacing: -3px; line-height: 1.05; font-weight: 750; }
.cabinet-app .days-hero b, .cabinet-app .days-hero span { font-size: inherit; font-weight: inherit; letter-spacing: inherit; }
.cabinet-app .days-hero-long { font-size: clamp(45px, 12vw, 88px); }
.cabinet-app .expiry { font-size: clamp(20px, 5vw, 28px); color: #a5a7a6; margin-top: 5px; line-height: 1.25; }
.subscription-meter { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin: 24px 0; }
.subscription-meter > span { height: 8px; background: #454a47; border-radius: 4px; overflow: hidden; }
.subscription-meter i { display: block; height: 100%; background: linear-gradient(110deg, #d2ff50, #baf53f); border-radius: inherit; }
.cabinet-app .connect-primary { min-height: 58px; font-size: 19px; }

/* Настройки: компактные строки, редактирование по нажатию. */
.cabinet-app .settings-screen h1 { margin-bottom: 6px; }
.settings-intro { color: #98a39c; font-size: 14px; margin-bottom: 28px; }
.settings-label { color: #8b978f; font-size: 11px; font-weight: 650; letter-spacing: 1.1px; text-transform: uppercase; padding: 0 5px; margin: 24px 0 10px; }
.settings-group { border: 1px solid #29332c; border-radius: 20px; overflow: hidden; background: linear-gradient(120deg, #151b17, #101511); }
.setting-row { display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 20px; width: 100%; }
.setting-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 13px; background: #202923; color: #b2bdb5; }
.setting-icon svg { width: 22px; height: 22px; }
.setting-copy { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.setting-name { font-size: 15px; font-weight: 600; color: #f3f6f4; }
.setting-value { color: #97a59b; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.setting-tag { font-size: 11px; color: #9aaba0; white-space: nowrap; }
.setting-tag.connected { color: #b9e980; }
.setting-action { color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
.setting-chevron { color: #8d9c91; font-size: 22px; }
.cabinet-app details.setting-editor { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
.settings-group > * + * { border-top: 1px solid #28312b; }
.cabinet-app .setting-editor summary.setting-row { list-style: none; display: flex; padding: 20px; font-size: inherit; }
.cabinet-app .setting-editor summary::after { content: none; }
.cabinet-app .setting-editor summary::-webkit-details-marker { display: none; }
.setting-editor summary:hover, a.setting-row:hover { background: rgba(197,252,66,.025); }
.setting-editor[open] .setting-chevron { transform: rotate(90deg); }
.setting-form-wrap { padding: 0 20px 22px 74px; }
.setting-form { display: grid; gap: 10px; }
.setting-form label { margin: 6px 0 -2px; font-size: 12px; color: #aab9af; }
.setting-form .input { font-size: 15px; background: #0b100d; padding: 13px 15px; }
.setting-form .pwbox { width: 100%; min-width: 0; }
.setting-form .pwbox .input { padding-right: 48px; }
.setting-form .pweye { width: 42px; }
.setting-form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.setting-form-actions .btn { flex: 1; padding: 13px 16px; font-size: 13px; }
.cabinet-app .setting-note { padding: 0; color: #99a99e; font-size: 13px; line-height: 1.6; margin: 0 0 16px; }
.setting-note b { color: #d0dbd4; overflow-wrap: anywhere; }
.settings-support { margin-top: 24px; }
.settings-support .setting-row { min-height: 78px; }
.settings-logout { margin-top: 20px; }
.settings-logout button { width: 100%; padding: 18px; border: 1px solid #49302e; background: rgba(160,64,55,.05); color: #dc948e; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; }
.settings-logout svg { width: 19px; height: 19px; }
.settings-logout button:hover { background: rgba(160,64,55,.12); }
@media (max-width: 640px) {
 .setting-row, .cabinet-app .setting-editor summary.setting-row { padding: 17px 15px; gap: 11px; min-height: 82px; }
 .setting-icon { width: 34px; height: 38px; border-radius: 11px; }
 .setting-tag { max-width: 82px; text-align: right; white-space: normal; line-height: 1.5; }
 .setting-form-wrap { padding: 0 16px 20px; }
 .setting-name { font-size: 14px; }
 .setting-value { font-size: 12px; }
 .setting-action { font-size: 11px; }
}
.cab-header-actions{display:flex;align-items:center;gap:12px}.cab-ai-link{color:var(--accent);font-size:13px;font-weight:600;padding:10px 13px;border:1px solid #465b30;border-radius:12px}.cab-ai-link:hover{background:#24341c}

