:root {
    color-scheme: light;
    --page: #f3eee4;
    --paper: #fffdf8;
    --ink: #342e26;
    --muted: #756b5e;
    --line: #e3d8c8;
    --sea: #98744b;
    --sea-dark: #765834;
    --space-blue: #98744b;
    --space-violet: #b49b79;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 12% 8%, rgba(180, 155, 121, .18), transparent 38%),
        radial-gradient(ellipse at 88% 82%, rgba(199, 177, 144, .17), transparent 34%),
        var(--page);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    animation: page-in .3s ease both;
}
body::before,
body::after {
    position: fixed;
    z-index: -1;
    inset: -12%;
    pointer-events: none;
    content: "";
}
body::before {
    opacity: .28;
    background-image:
        radial-gradient(1px 1px at 8% 13%, rgba(128, 104, 73, .42) 50%, transparent 100%),
        radial-gradient(1px 1px at 21% 76%, rgba(164, 137, 101, .38) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 37% 29%, rgba(128, 104, 73, .32) 50%, transparent 100%),
        radial-gradient(1px 1px at 54% 84%, rgba(164, 137, 101, .34) 50%, transparent 100%),
        radial-gradient(1px 1px at 71% 17%, rgba(128, 104, 73, .35) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 88% 63%, rgba(164, 137, 101, .3) 50%, transparent 100%);
    background-size: 290px 260px, 360px 330px, 410px 370px, 330px 310px, 470px 390px, 390px 350px;
    animation: star-drift 85s linear infinite, star-twinkle 7s ease-in-out infinite alternate;
}
body::after {
    opacity: .3;
    background:
        radial-gradient(ellipse at 17% 32%, rgba(183, 151, 105, .13), transparent 34%),
        radial-gradient(ellipse at 79% 28%, rgba(213, 192, 160, .18), transparent 31%),
        radial-gradient(ellipse at 62% 78%, rgba(170, 144, 106, .12), transparent 36%);
    filter: blur(28px);
    animation: nebula-breathe 17s ease-in-out infinite alternate;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.account-wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.account-header {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    animation: header-in .4s ease both;
}
.account-brand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 750; letter-spacing: .025em; }
.account-brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sea); }
.account-brand-name span { color: var(--sea); }
.account-controls { display: flex; align-items: center; gap: 15px; }
.account-identity { display: grid; justify-items: end; gap: 2px; color: var(--muted); font-size: 12px; }
.account-name { max-width: 180px; overflow: hidden; color: #48545a; text-overflow: ellipsis; white-space: nowrap; }
.account-balance { color: var(--ink); font-size: 14px; }
.topup-form, .logout-form { margin: 0; }
.topup-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid #c9d9d3;
    border-radius: 7px;
    background: #edf4f0;
    color: #286044;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.topup-button span { font-weight: 750; }
.topup-button:hover { transform: translateY(-2px); background: #e2efe8; box-shadow: 0 6px 15px rgba(40,96,68,.1); }
.topup-button:active { transform: translateY(0); }
.text-button { padding: 5px 0; border: 0; background: none; color: var(--sea); cursor: pointer; font-size: 13px; transition: color .18s ease; }
.text-button:hover { color: #174e52; }
.account-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: stretch; gap: 32px; padding: 38px 0 70px; }
.account-sidebar {
    display: flex;
    min-height: calc(100vh - 190px);
    flex-direction: column;
    padding: 16px 12px;
    border: 1px solid #e0e1dc;
    border-radius: 10px;
    background: rgba(255,255,255,.62);
    animation: sidebar-in .4s .06s ease both;
}
.sidebar-label { margin: 0 0 12px 10px; color: #87908e; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-nav a, .sidebar-log {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 7px;
    color: #59646a;
    font-size: 13px;
    transition: background .18s ease, color .18s ease;
}
.sidebar-nav a::before { width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 2px; content: ""; transform: rotate(45deg); }
.sidebar-nav a.active, .sidebar-nav a:hover, .sidebar-log:hover { background: #e8ece6; color: var(--sea-dark); }
.sidebar-log { margin-top: auto; border-top: 1px solid #e5e6e1; border-radius: 0; padding-top: 15px; }
.sidebar-log::before { width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 50%; content: ""; }
.log-count { display: inline-flex; min-width: 21px; height: 21px; align-items: center; justify-content: center; margin-left: auto; border-radius: 11px; background: #e8ece6; color: #59646a; font-size: 10px; }
.account-main { min-width: 0; align-self: start; animation: content-in .45s .04s ease both; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-heading h1 { margin: 0 0 7px; font-size: clamp(30px, 4vw, 40px); letter-spacing: -.04em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.primary-button, .quiet-button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.primary-button { background: var(--sea); color: #fff; box-shadow: 0 5px 14px rgba(40,124,130,.14); }
.primary-button:hover { transform: translateY(-2px); background: var(--sea-dark); box-shadow: 0 9px 20px rgba(40,124,130,.2); }
.primary-button:disabled { transform: none; background: #8da7a4; box-shadow: none; cursor: not-allowed; }
.primary-button:active, .quiet-button:active { transform: translateY(0); }
.quiet-button { border-color: var(--line); background: #fff; color: var(--ink); }
.quiet-button:hover { transform: translateY(-2px); border-color: #b7c9c1; background: #fafbf8; }
.bot-list { display: grid; gap: 12px; }
.bot-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    align-items: center;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    animation: card-in .38s both;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.bot-card:hover { transform: translateY(-2px); border-color: #c4d2cc; box-shadow: 0 10px 24px rgba(32,42,50,.06); }
.bot-card.is-over-limit { border-color: #c95d50; box-shadow: 0 0 0 2px rgba(201,93,80,.11); }
.bot-card.is-over-limit:hover { border-color: #b94a3e; box-shadow: 0 8px 20px rgba(185,74,62,.13); }
.bot-card:nth-child(2) { animation-delay: .05s; }
.bot-card:nth-child(3) { animation-delay: .1s; }
.bot-card:nth-child(4) { animation-delay: .15s; }
.bot-card-info { min-width: 0; }
.bot-card h2 { overflow-wrap: anywhere; margin: 0 0 5px; font-size: 17px; }
.bot-username { margin: 0; color: var(--muted); font-size: 13px; }
.bot-usage { margin: 12px 0 0; color: #53645c; font-size: 12px; line-height: 1.55; }
.bot-limit-alert { margin: 5px 0 0; color: #a63e34; font-size: 12px; font-weight: 650; }
.bot-subscription { margin: 6px 0 0; color: #9a5144; font-size: 11px; }
.bot-subscription.is-active { color: #397453; }
.bot-card-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.disabled-button {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #d5d8d2;
    border-radius: 6px;
    background: #f3f3ef;
    color: #7d8587;
    cursor: not-allowed;
    font-size: 12px;
}
.delete-form { margin: 0; }
.delete-button {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #e5c7c2;
    border-radius: 6px;
    background: #fff8f6;
    color: #963f33;
    cursor: pointer;
    font-size: 12px;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.delete-button:hover { transform: translateY(-1px); border-color: #d7a9a1; background: #fff0ed; }
.empty-state {
    padding: 42px 24px;
    border: 1px dashed #cfd2cc;
    border-radius: 9px;
    background: rgba(255,255,255,.5);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    text-align: center;
    animation: card-in .38s ease both;
}
.account-footer { padding: 20px 0; border-top: 1px solid var(--line); color: #7d8587; font-size: 12px; }

.toast-stack { position: fixed; z-index: 20; top: 18px; right: 18px; display: grid; width: min(390px, calc(100vw - 36px)); gap: 10px; }
.toast {
    display: grid;
    grid-template-columns: 8px minmax(0,1fr) 28px;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border: 1px solid #c5ded1;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(25,45,40,.14);
    color: #286044;
    animation: toast-in .28s cubic-bezier(.2,.8,.2,1) both;
}
.toast.error { border-color: #e8c7c2; color: #87392d; }
.toast.info { border-color: #cbd9df; color: #375d6c; }
.toast-marker { width: 8px; height: 8px; border-radius: 50%; background: #4a9b70; }
.toast.error .toast-marker { background: #bc594b; }
.toast.info .toast-marker { background: #56849a; }
.toast-message { margin: 0; font-size: 13px; line-height: 1.5; }
.toast-close { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #73807d; cursor: pointer; font-size: 20px; line-height: 1; transition: background .16s ease, color .16s ease; }
.toast-close:hover { background: #f0f2ed; color: var(--ink); }
.toast.is-leaving { animation: toast-out .2s ease both; }

.bot-modal { width: min(520px, calc(100% - 30px)); max-width: none; max-height: min(90vh, 760px); padding: 0; overflow: auto; border: 1px solid #dedfd9; border-radius: 12px; background: var(--page); color: var(--ink); box-shadow: 0 24px 80px rgba(26,38,38,.22); }
.bot-modal[open] { animation: modal-in .22s ease both; }
.bot-modal::backdrop { background: rgba(23,34,36,.38); backdrop-filter: blur(3px); }
.modal-inner { padding: 25px; }
.modal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-top h2 { margin: 0 0 7px; font-size: 23px; letter-spacing: -.03em; }
.modal-top p { margin: 0 0 19px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.modal-close { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #667176; cursor: pointer; font-size: 21px; transition: background .16s ease, color .16s ease; }
.modal-close:hover { background: #eef0eb; color: var(--ink); }
.token-steps { display: grid; gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: token-step; }
.token-steps li { position: relative; min-height: 28px; padding-left: 37px; color: #4f5c61; font-size: 13px; line-height: 1.55; counter-increment: token-step; }
.token-steps li::before { position: absolute; top: 0; left: 0; display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #e4eeea; color: var(--sea-dark); content: counter(token-step); font-size: 11px; font-weight: 700; }
.token-steps a { color: var(--sea-dark); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.bot-form { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.bot-token { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #cfd2cc; border-radius: 6px; outline: 0; background: #fff; color: var(--ink); font-size: 14px; }
.bot-token:focus { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(40,124,130,.1); }
.modal-footnote { margin: 12px 0 0; color: #7d8587; font-size: 11px; line-height: 1.5; }

.notification-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.notification-row { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: start; gap: 13px; padding: 16px 0; border-bottom: 1px solid #ecece8; animation: card-in .35s ease both; }
.notification-row:first-child { padding-top: 3px; }
.notification-row:last-child { border-bottom: 0; }
.notification-marker { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--sea); }
.notification-row.error .notification-marker { background: #b65b4e; }
.notification-message { margin: 0; color: #39454b; font-size: 13px; line-height: 1.55; }
.notification-time { color: #7b8587; font-size: 11px; white-space: nowrap; }
.notification-empty { padding: 35px 20px; border: 1px dashed #cfd2cc; border-radius: 9px; color: var(--muted); font-size: 14px; text-align: center; }
.tariff-notice { margin: 0 0 16px; padding: 13px 15px; border: 1px solid #e8c7c2; border-radius: 8px; background: #fff8f6; color: #87392d; font-size: 13px; line-height: 1.5; }
.tariff-notice.is-active { border-color: #c9d9d3; background: #edf4f0; color: #286044; }
.tariff-icon-sprite { display: none; }
.tariff-section-title { margin: 0 0 6px; font-size: 16px; letter-spacing: -.01em; }
.tariff-section-title svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: var(--sea); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.tariff-form { display: grid; gap: 11px; }
.tariff-section { padding: 17px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.tariff-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tariff-description { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.tariff-limits-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.tariff-limit { min-width: 0; }
.topup-extension-toggle { display: flex; align-items: center; gap: 10px; color: #39454b; cursor: pointer; font-size: 13px; font-weight: 650; }
.topup-extension-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--sea); }
.topup-extension-fields { max-width: 320px; margin-top: 16px; }
.topup-extension-fields[hidden] { display: none; }
.field-label { display: block; margin: 0 0 7px; color: #465158; font-size: 12px; font-weight: 650; }
.account-input { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #cfd2cc; border-radius: 6px; outline: 0; background: #fff; color: var(--ink); font-size: 14px; }
.account-input:focus { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(40,124,130,.1); }
.tariff-number-wrap { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; }
.tariff-number-wrap > span { min-width: 65px; color: #78827f; font-size: 11px; }
.tariff-hint { margin: 6px 0 0; color: #7b8587; font-size: 10px; line-height: 1.45; }
.feature-list { display: grid; gap: 6px; }
.feature-option { position: relative; display: grid; min-height: 58px; grid-template-columns: 32px minmax(0,1fr) auto 34px; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e5e8e2; border-radius: 6px; background: #fff; color: #39454b; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.feature-option:hover { border-color: #c2d5ce; }
.feature-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.feature-option:focus-within { outline: 3px solid rgba(40,124,130,.16); outline-offset: 2px; }
.feature-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 6px; background: #f0f3ef; color: #788680; transition: background .16s ease, color .16s ease; }
.feature-icon svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.feature-copy { display: grid; min-width: 0; gap: 2px; }
.feature-copy strong { font-size: 12px; font-weight: 700; }
.feature-copy small, .feature-price small { color: #7b8587; font-size: 10px; line-height: 1.3; }
.feature-price { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; color: #53645c; font-size: 11px; font-weight: 700; white-space: nowrap; }
.feature-switch { position: relative; width: 32px; height: 19px; border-radius: 12px; background: #dce1dc; transition: background .16s ease; }
.feature-switch::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); content: ""; transition: transform .16s ease; }
.feature-option.is-enabled { border-color: #b7d0c6; background: #f8fbf8; }
.feature-option.is-enabled .feature-icon { background: #e4efe9; color: var(--sea-dark); }
.feature-option.is-enabled .feature-switch { background: var(--sea); }
.feature-option.is-enabled .feature-switch::after { transform: translateX(13px); }
.tariff-periods { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; }
.tariff-period { position: relative; display: flex; min-height: 102px; flex-direction: column; align-items: stretch; gap: 7px; padding: 11px 10px; border: 1px solid #e0e4de; border-radius: 6px; background: #fff; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.tariff-period:hover { border-color: #b7cfc5; }
.tariff-period.is-selected { border-color: var(--sea); background: #f3f8f5; box-shadow: inset 0 0 0 1px var(--sea); }
.tariff-period input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tariff-period:focus-within { outline: 3px solid rgba(40,124,130,.18); outline-offset: 2px; }
.tariff-period-heading { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.tariff-period strong { color: #354249; font-size: 12px; }
.tariff-period small { color: #7b8587; font-size: 9px; }
.tariff-period b { margin-top: auto; color: #214f38; font-size: 13px; }
.tariff-period em { padding: 3px 5px; border-radius: 4px; background: #f0f3ef; color: #60736a; font-size: 9px; font-style: normal; white-space: nowrap; }
.tariff-period.is-selected em { background: #e2efe8; color: #286044; }
.tariff-summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px 16px; padding: 15px 17px; border: 1px solid #c9d9d3; border-radius: 8px; background: #edf4f0; }
.tariff-summary > div { display: flex; flex-direction: column; gap: 2px; color: #53645c; font-size: 11px; }
.tariff-summary strong { color: #214f38; font-size: 22px; }
.tariff-summary p { grid-column: 1; margin: 0; color: #617169; font-size: 10px; line-height: 1.45; }
.tariff-summary .primary-button { grid-column: 2; grid-row: 1 / span 2; }
.tariff-confirm-dialog { width: min(460px, calc(100% - 30px)); max-width: none; padding: 0; border: 1px solid #dedfd9; border-radius: 10px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px rgba(26,38,38,.22); }
.tariff-confirm-dialog[open] { animation: modal-in .2s ease both; }
.tariff-confirm-dialog::backdrop { background: rgba(23,34,36,.42); backdrop-filter: blur(3px); }
.tariff-confirm-inner { position: relative; padding: 25px; }
.tariff-confirm-close { position: absolute; top: 17px; right: 17px; }
.tariff-confirm-eyebrow { margin: 0 0 7px; color: var(--sea-dark); font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.tariff-confirm-inner h2 { margin: 0 40px 8px 0; font-size: 22px; letter-spacing: -.03em; }
.tariff-confirm-copy { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.tariff-confirm-details { display: grid; gap: 0; margin: 0; padding: 5px 12px; border: 1px solid #e5e8e2; border-radius: 6px; background: #fafbf8; }
.tariff-confirm-details > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #e8eae5; font-size: 12px; }
.tariff-confirm-details > div:last-child { border-bottom: 0; }
.tariff-confirm-details dt { color: var(--muted); }
.tariff-confirm-details dd { margin: 0; color: var(--ink); font-weight: 650; text-align: right; }
.tariff-confirm-details > div:nth-last-child(2) dd { color: #214f38; font-size: 15px; }
.tariff-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.tariff-confirm-actions .primary-button, .tariff-confirm-actions .quiet-button { min-height: 39px; padding: 0 11px; font-size: 11px; }

@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes header-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sidebar-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes content-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes card-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(14px); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 760px) {
    .account-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 25px; }
    .account-sidebar { min-height: 0; padding: 11px; }
    .sidebar-log { margin-top: 10px; }
    .bot-card { display: flex; align-items: flex-start; flex-direction: column; }
    .bot-card-actions { justify-content: flex-start; }
    .account-controls { gap: 9px; }
    .tariff-periods { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .tariff-limits-grid { gap: 12px; }
}
@media (max-width: 480px) {
    .account-wrap { width: calc(100% - 30px); }
    .account-header { min-height: 66px; }
    .account-brand { font-size: 11px; }
    .account-controls { gap: 7px; }
    .account-name { display: none; }
    .account-balance { font-size: 12px; }
    .topup-button { min-height: 34px; padding: 0 7px; font-size: 10px; }
    .topup-button span { display: none; }
    .text-button { font-size: 11px; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .page-heading .primary-button { align-self: flex-start; }
    .toast-stack { top: 10px; right: 10px; width: calc(100vw - 20px); }
    .modal-inner { padding: 20px; }
    .notification-row { grid-template-columns: 9px minmax(0,1fr); }
    .notification-time { grid-column: 2; }
    .tariff-summary { grid-template-columns: 1fr; }
    .tariff-summary p, .tariff-summary .primary-button { grid-column: 1; grid-row: auto; }
    .tariff-periods { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .tariff-limits-grid { grid-template-columns: 1fr; }
    .feature-option { grid-template-columns: 32px minmax(0,1fr) 34px; gap: 8px; padding: 9px; }
    .feature-price { grid-column: 2; grid-row: 2; align-items: flex-start; }
    .feature-switch { grid-column: 3; grid-row: 1; }
    .tariff-confirm-inner { padding: 21px; }
    .tariff-confirm-actions { flex-direction: column-reverse; }
    .tariff-confirm-actions button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.bot-plan-name { margin: 8px 0 0; }
.plan-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.plan-badge-starter { background: #eceeeb; color: #68716d; }
.plan-badge-blue { background: #e8f1fb; color: #2867a2; }
.plan-badge-red { background: #fae9e7; color: #ae4239; }
.tariff-plan-card { display: flex; min-width: 0; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); animation: card-in .35s both; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tariff-plan-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(32,42,50,.07); }
.tariff-plan--starter { --plan-accent: #727b77; --plan-soft: #f0f1ef; }
.tariff-plan--blue { --plan-accent: #3478b7; --plan-soft: #edf5fc; }
.tariff-plan--red { --plan-accent: #c34f43; --plan-soft: #fff0ed; }
.tariff-plan-card.is-current { border-color: var(--plan-accent); box-shadow: inset 0 0 0 1px var(--plan-accent); }
.tariff-plan-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tariff-plan-eyebrow { margin: 0 0 4px; color: var(--plan-accent); font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.tariff-plan-heading h2 { margin: 0; color: var(--ink); font-size: 18px; line-height: 1.3; }
.tariff-current-label { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: var(--plan-soft); color: var(--plan-accent); font-size: 10px; font-weight: 750; }
.tariff-plan-price { margin: 16px 0 12px; color: var(--plan-accent); font-size: 25px; font-weight: 750; letter-spacing: -.03em; }
.tariff-plan-price span { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.tariff-plan-limits { display: grid; gap: 4px; min-height: 48px; margin-bottom: 12px; color: #47544f; font-size: 13px; }
.tariff-plan-limits p { margin: 0; }
.tariff-plan-limits strong { color: var(--ink); }
.tariff-plan-features { display: grid; gap: 8px; margin: 0 0 18px; padding: 13px 0 0; border-top: 1px solid #e8ebe6; list-style: none; }
.tariff-plan-features li { display: flex; align-items: center; gap: 8px; color: #68716d; font-size: 12px; }
.tariff-plan-features li > span { display: grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 800; }
.tariff-plan-features .is-included { color: #344840; }
.tariff-plan-features .is-included > span { background: var(--plan-soft); color: var(--plan-accent); }
.tariff-plan-features .is-excluded > span { background: #f1f2ef; color: #9ba19e; }
.tariff-plan-action { margin-top: auto; }
.tariff-plan-action form { margin: 0; }
.tariff-plan-action .primary-button { width: 100%; min-height: 42px; padding: 0 10px; font-size: 12px; }
.tariff-current-text, .tariff-unavailable-text { display: block; padding: 12px; border-radius: 7px; background: var(--plan-soft, #f0f1ef); color: var(--plan-accent, #68716d); font-size: 12px; font-weight: 700; text-align: center; }
.tariff-unavailable-text { background: #f3f4f1; color: #858d89; }
.tariff-payment-hint { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) {
    .tariff-plan-card { animation: none; transition: none; }
    .tariff-plan-card:hover { transform: none; }
}
.tariff-picker-dialog { width: min(700px, calc(100% - 24px)); max-width: none; max-height: 92vh; padding: 0; overflow: auto; border: 1px solid #dedfd9; border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px rgba(26,38,38,.22); }
.tariff-picker-dialog[open] { animation: modal-in .2s ease both; }
.tariff-picker-dialog::backdrop { background: rgba(23,34,36,.46); backdrop-filter: blur(3px); }
.tariff-picker-inner { padding: 25px; }
.tariff-picker-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.tariff-picker-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.tariff-picker-heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.tariff-picker-eyebrow { margin: 0 0 5px; color: var(--sea-dark); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.tariff-carousel { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 10px; }
.tariff-carousel-viewport { min-width: 0; overflow: hidden; border-radius: 10px; }
.tariff-carousel-track { display: flex; width: 100%; transition: transform .3s cubic-bezier(.2,.7,.25,1); }
.tariff-slide { flex: 0 0 100%; min-width: 0; min-height: 395px; }
.tariff-slide:hover { transform: none; box-shadow: none; }
.tariff-slide .tariff-plan-heading h3 { margin: 0; color: var(--ink); font-size: 18px; line-height: 1.3; }
.tariff-slide .tariff-plan-features { flex: 1; }
.tariff-arrow { display: grid; width: 38px; height: 38px; place-items: center; padding: 0 0 3px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; font-size: 28px; line-height: 1; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.tariff-arrow:hover:not(:disabled) { border-color: var(--sea); background: #edf4f0; color: var(--sea-dark); }
.tariff-arrow:disabled { opacity: .35; cursor: default; }
.tariff-carousel-footer { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 15px; color: var(--muted); font-size: 11px; }
.tariff-carousel-dots { display: flex; align-items: center; gap: 6px; }
.tariff-carousel-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #cbd1cc; cursor: pointer; transition: width .16s ease, background .16s ease; }
.tariff-carousel-dots button.is-active { width: 18px; border-radius: 5px; background: var(--sea); }
.tariff-picker-dialog .tariff-payment-hint { text-align: center; }
@media (max-width: 480px) {
    .tariff-picker-inner { padding: 18px 13px; }
    .tariff-picker-heading { margin: 0 5px 15px; }
    .tariff-picker-heading h2 { font-size: 19px; }
    .tariff-carousel { grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 5px; }
    .tariff-arrow { width: 30px; height: 30px; font-size: 23px; }
    .tariff-slide { min-height: 390px; padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .tariff-picker-dialog[open] { animation: none; }
    .tariff-carousel-track { transition: none; }
    .tariff-carousel-dots button { transition: none; }
}

@keyframes star-drift {
    to { transform: translate3d(-2%, 1.5%, 0); }
}
@keyframes star-twinkle {
    from { opacity: .38; }
    to { opacity: .82; }
}
@keyframes nebula-breathe {
    from { transform: scale(1) rotate(0deg); opacity: .36; }
    to { transform: scale(1.08) rotate(2deg); opacity: .68; }
}
@keyframes blue-glow {
    0%, 100% { box-shadow: 0 0 14px rgba(58, 135, 255, .16); }
    50% { box-shadow: 0 0 24px rgba(58, 135, 255, .3); }
}

.account-header { position: sticky; top: 0; z-index: 40; border-color: var(--line); background: rgba(5, 8, 23, .9); backdrop-filter: blur(14px); }
.account-brand-dot { background: #6bb5ff; box-shadow: 0 0 12px rgba(89, 169, 255, .85); animation: blue-glow 4.5s ease-in-out infinite; }
.account-brand-name span, .text-button { color: #77b8ff; }
.text-button:hover { color: #c6e2ff; }
.account-name { color: #a8b8d5; }
.account-balance { color: #f0f5ff; }
.account-identity { color: #9cafd3; }
.topup-button { border-color: rgba(91, 157, 255, .4); background: rgba(35, 83, 158, .28); color: #b7d8ff; }
.topup-button:hover { background: rgba(52, 111, 201, .38); box-shadow: 0 7px 22px rgba(41, 118, 231, .2); }
.account-sidebar { position: sticky; top: 96px; align-self: start; height: calc(100vh - 120px); min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-color: var(--line); background: linear-gradient(155deg, rgba(15, 27, 57, .88), rgba(8, 15, 34, .78)); box-shadow: 0 18px 46px rgba(0, 0, 0, .18), inset 0 1px rgba(214, 230, 255, .04); backdrop-filter: blur(14px); }
.sidebar-label { color: #8299c2; }
.sidebar-nav a, .sidebar-log { color: #a9bad8; }
.sidebar-nav a.active, .sidebar-nav a:hover, .sidebar-log:hover { background: rgba(68, 132, 242, .16); color: #d7e9ff; }
.sidebar-log { border-color: rgba(133, 166, 245, .16); }
.log-count { background: rgba(67, 123, 224, .2); color: #d6e7ff; }
.page-heading p { color: var(--muted); }
.primary-button { background: linear-gradient(120deg, #317ff0, #5268ea 60%, #7958e8); color: #fff; box-shadow: 0 8px 24px rgba(51, 112, 235, .24); }
.primary-button:hover { background: linear-gradient(120deg, #4998ff, #6379ff 60%, #8a6bf2); box-shadow: 0 11px 30px rgba(64, 130, 255, .34); }
.primary-button:disabled { background: #35486a; color: #a8b8d2; }
.quiet-button { border-color: rgba(133, 166, 245, .24); background: rgba(12, 21, 44, .75); color: #c5d8f6; }
.quiet-button:hover { border-color: rgba(101, 165, 255, .62); background: rgba(36, 65, 118, .45); }
.bot-card { border-color: rgba(133, 166, 245, .18); background: linear-gradient(145deg, rgba(15, 26, 54, .9), rgba(8, 15, 33, .9)); box-shadow: 0 14px 36px rgba(0, 0, 0, .16), inset 0 1px rgba(214, 230, 255, .035); }
.bot-card:hover { border-color: rgba(93, 157, 255, .52); box-shadow: 0 15px 40px rgba(13, 61, 143, .24), inset 0 1px rgba(214, 230, 255, .06); }
.bot-card h2 { color: #eef5ff; }
.bot-username, .bot-usage { color: #a5b8da; }
.bot-subscription { color: #ffaaa9; }
.bot-subscription.is-active { color: #83c6ff; }
.bot-card.is-over-limit { border-color: #fa737b; box-shadow: 0 0 0 1px rgba(250, 115, 123, .34), 0 14px 36px rgba(0, 0, 0, .2); }
.bot-card.is-over-limit:hover { border-color: #ff9298; box-shadow: 0 0 0 2px rgba(250, 115, 123, .24), 0 16px 42px rgba(0, 0, 0, .24); }
.bot-limit-alert { color: #ff9a9f; }
.plan-badge-starter { background: rgba(153, 170, 197, .15); color: #c1cde0; }
.plan-badge-blue { background: rgba(60, 137, 245, .18); color: #9dccff; }
.plan-badge-red { background: rgba(240, 90, 112, .17); color: #ffb1b8; }
.delete-button { border-color: rgba(243, 101, 119, .34); background: rgba(105, 34, 54, .23); color: #ffb1bb; }
.delete-button:hover { border-color: rgba(255, 130, 145, .65); background: rgba(140, 42, 63, .34); }
.disabled-button { border-color: rgba(133, 166, 245, .14); background: rgba(15, 25, 49, .6); color: #899bb9; }
.empty-state { border-color: rgba(133, 166, 245, .28); background: rgba(11, 20, 43, .64); color: #a9bbdc; }
.account-footer { border-color: var(--line); color: #8195b8; }
.toast { border-color: rgba(84, 175, 255, .35); background: rgba(10, 22, 47, .96); box-shadow: 0 14px 40px rgba(0, 0, 0, .36), 0 0 24px rgba(49, 126, 238, .12); color: #b8dcff; backdrop-filter: blur(16px); }
.toast.error { border-color: rgba(255, 112, 129, .42); color: #ffc0c5; }
.toast.info { border-color: rgba(135, 127, 255, .4); color: #d2ccff; }
.toast-marker { background: #55c5ff; box-shadow: 0 0 10px rgba(85, 197, 255, .6); }
.toast.error .toast-marker { background: #ff7182; }
.toast.info .toast-marker { background: #9c8bff; }
.toast-close { color: #aabbd8; }
.toast-close:hover { background: rgba(114, 160, 231, .16); color: #fff; }
.bot-modal, .tariff-picker-dialog, .tariff-confirm-dialog { border-color: rgba(124, 163, 247, .28); background: linear-gradient(155deg, rgba(15, 28, 59, .98), rgba(8, 15, 34, .98)); color: var(--ink); box-shadow: 0 28px 90px rgba(0, 0, 0, .54), 0 0 38px rgba(54, 118, 229, .14); }
.bot-modal::backdrop, .tariff-picker-dialog::backdrop, .tariff-confirm-dialog::backdrop { background: rgba(2, 5, 16, .76); backdrop-filter: blur(9px); }
.modal-close { border-color: rgba(133, 166, 245, .22); background: rgba(30, 48, 86, .7); color: #c6d9f8; }
.modal-close:hover { background: rgba(60, 105, 181, .45); color: #fff; }
.token-steps li, .modal-footnote { color: #aabbd8; }
.token-steps li::before { background: rgba(64, 132, 237, .2); color: #b7dcff; }
.token-steps a { color: #7fc1ff; }
.bot-form { border-color: var(--line); }
.bot-token, .account-input { border-color: rgba(133, 166, 245, .26); background: rgba(5, 12, 28, .82); color: #e8f1ff; }
.bot-token::placeholder, .account-input::placeholder { color: #7185a9; }
.bot-token:focus, .account-input:focus { border-color: #5daaff; box-shadow: 0 0 0 3px rgba(61, 139, 255, .18); }
.notification-row { border-color: rgba(133, 166, 245, .16); }
.notification-message { color: #c8d8f3; }
.notification-time { color: #879bbd; }
.notification-marker { background: #60b4ff; box-shadow: 0 0 9px rgba(96, 180, 255, .45); }
.notification-empty { border-color: rgba(133, 166, 245, .25); color: #9eb2d5; }
.tariff-notice { border-color: rgba(255, 112, 129, .34); background: rgba(89, 29, 47, .28); color: #ffc0c5; }
.tariff-notice.is-active { border-color: rgba(91, 190, 151, .35); background: rgba(25, 82, 72, .24); color: #a4e7ca; }
.tariff-section { border-color: rgba(133, 166, 245, .2); background: linear-gradient(150deg, rgba(15, 27, 57, .88), rgba(8, 15, 34, .82)); }
.tariff-section-title { color: #edf4ff; }
.tariff-section-title svg { stroke: #77b8ff; }
.tariff-description, .tariff-hint, .tariff-number-wrap > span { color: #91a6ca; }
.field-label, .topup-extension-toggle { color: #d3e2fb; }
.feature-option { border-color: rgba(133, 166, 245, .18); background: rgba(7, 16, 36, .72); color: #d3e2fb; }
.feature-option:hover { border-color: rgba(105, 176, 255, .55); }
.feature-option:focus-within, .tariff-period:focus-within { outline-color: rgba(94, 166, 255, .34); }
.feature-icon { background: rgba(75, 110, 169, .2); color: #9bb9e7; }
.feature-copy small, .feature-price small, .tariff-period small { color: #91a6ca; }
.feature-price { color: #b7c9e6; }
.feature-switch { background: #344665; }
.feature-switch::after { background: #e8f1ff; }
.feature-option.is-enabled { border-color: rgba(87, 167, 255, .48); background: rgba(32, 71, 132, .2); }
.feature-option.is-enabled .feature-icon { background: rgba(66, 131, 215, .24); color: #a9d2ff; }
.feature-option.is-enabled .feature-switch { background: #448ff0; }
.tariff-period { border-color: rgba(133, 166, 245, .2); background: rgba(7, 16, 36, .72); }
.tariff-period:hover { border-color: rgba(105, 176, 255, .55); }
.tariff-period.is-selected { border-color: #69b4ff; background: rgba(43, 86, 155, .25); box-shadow: inset 0 0 0 1px #69b4ff, 0 0 18px rgba(61, 139, 255, .12); }
.tariff-period strong { color: #dce9ff; }
.tariff-period b { color: #a9d4ff; }
.tariff-period em, .tariff-period.is-selected em { background: rgba(95, 140, 207, .18); color: #b8d5fa; }
.tariff-summary { border-color: rgba(91, 157, 255, .3); background: linear-gradient(120deg, rgba(32, 72, 137, .28), rgba(62, 55, 134, .2)); }
.tariff-summary > div, .tariff-summary p { color: #a8bbdc; }
.tariff-summary strong { color: #b8dcff; }
.tariff-confirm-details { border-color: rgba(133, 166, 245, .2); background: rgba(5, 12, 28, .54); }
.sidebar-nav a::before, .sidebar-log::before { color: #7bbdff; }
.tariff-plan-card { border-color: rgba(133, 166, 245, .22); background: linear-gradient(155deg, rgba(20, 35, 72, .96), rgba(9, 17, 39, .96)); box-shadow: 0 16px 42px rgba(0, 0, 0, .22), inset 0 1px rgba(224, 237, 255, .05); }
.tariff-plan-card:hover { border-color: rgba(105, 171, 255, .55); box-shadow: 0 18px 48px rgba(20, 73, 162, .25), inset 0 1px rgba(224, 237, 255, .07); }
.tariff-plan--starter { --plan-accent: #a8b7cc; --plan-soft: rgba(164, 185, 218, .14); }
.tariff-plan--blue { --plan-accent: #79baff; --plan-soft: rgba(65, 139, 244, .16); }
.tariff-plan--red { --plan-accent: #ff8497; --plan-soft: rgba(232, 78, 111, .16); }
.tariff-plan-card.is-current { border-color: var(--plan-accent); box-shadow: inset 0 0 0 1px var(--plan-accent), 0 0 28px rgba(83, 144, 255, .16); }
.tariff-plan-heading h2, .tariff-slide .tariff-plan-heading h3 { color: #edf4ff; }
.tariff-plan-eyebrow { color: var(--plan-accent); }
.tariff-current-label { background: var(--plan-soft); color: var(--plan-accent); }
.tariff-plan-price { color: var(--plan-accent); text-shadow: 0 0 20px rgba(96, 159, 255, .2); }
.tariff-plan-price span { color: #9cafd3; }
.tariff-plan-limits { color: #b3c4e1; }
.tariff-plan-limits strong { color: #f0f5ff; }
.tariff-plan-features { border-color: rgba(133, 166, 245, .16); }
.tariff-plan-features li { color: #899dbf; }
.tariff-plan-features .is-included { color: #d1e4ff; }
.tariff-plan-features .is-included > span { background: var(--plan-soft); color: var(--plan-accent); }
.tariff-plan-features .is-excluded > span { background: rgba(142, 160, 192, .12); color: #687b9d; }
.tariff-current-text, .tariff-unavailable-text { background: var(--plan-soft, rgba(164, 185, 218, .14)); color: var(--plan-accent, #a8b7cc); }
.tariff-unavailable-text { background: rgba(128, 147, 177, .1); color: #8092b0; }
.tariff-picker-heading p:last-child, .tariff-payment-hint, .tariff-confirm-copy { color: #9caed0; }
.tariff-picker-eyebrow, .tariff-confirm-eyebrow { color: #82c1ff; }
.tariff-arrow { border-color: rgba(122, 164, 241, .28); background: rgba(23, 39, 77, .88); color: #c9e2ff; box-shadow: 0 0 16px rgba(49, 117, 221, .12); }
.tariff-arrow:hover:not(:disabled) { border-color: #63adff; background: rgba(45, 93, 165, .62); color: #fff; }
.tariff-carousel-dots button { background: #425477; }
.tariff-carousel-dots button.is-active { background: #6db7ff; box-shadow: 0 0 12px rgba(109, 183, 255, .56); }
.tariff-confirm-details { border-color: rgba(133, 166, 245, .2); background: rgba(5, 12, 28, .54); }
.tariff-confirm-details > div { border-color: rgba(133, 166, 245, .12); }
.tariff-confirm-details dt { color: #9cafd3; }
.tariff-confirm-details dd { color: #e5efff; }
.tariff-confirm-details > div:nth-last-child(2) dd { color: #95cdff; }
.tariff-confirm-actions .quiet-button { color: #bdd2f1; }
.tariff-plan-action .primary-button { box-shadow: 0 8px 24px rgba(51, 112, 235, .22); }
.tariff-carousel-track { will-change: transform; }
.bot-error-log {
    display: inline-flex;
    min-height: 36px;
    grid-column: 1 / -1;
    align-items: center;
    justify-self: start;
    padding: 0 12px;
    border: 1px solid rgba(133, 166, 245, .2);
    border-radius: 7px;
    background: rgba(15, 31, 64, .5);
    color: #a9d2ff;
    font-size: 12px;
    font-weight: 650;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.bot-error-log:hover { border-color: rgba(105, 176, 255, .55); background: rgba(37, 76, 138, .34); color: #e0efff; }
.telegram-error-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.telegram-error {
    padding: 17px 19px;
    border: 1px solid rgba(255, 112, 129, .2);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(28, 29, 62, .83), rgba(11, 18, 40, .9));
    box-shadow: inset 0 1px rgba(224, 237, 255, .035);
}
.telegram-error-heading { display: flex; align-items: center; gap: 10px; }
.telegram-error-heading strong { color: #dceaff; font-size: 13px; }
.telegram-error-heading span { padding: 3px 7px; border-radius: 5px; background: rgba(239, 90, 112, .14); color: #ffabb5; font-size: 10px; font-weight: 700; }
.telegram-error-heading .telegram-error-node { background: rgba(67, 133, 225, .18); color: #a9d2ff; }
.telegram-error p { margin: 11px 0; color: #ffc0c5; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.telegram-error-message { display: grid; gap: 5px; margin: 10px 0; padding: 10px 12px; border: 1px solid rgba(133, 166, 245, .14); border-radius: 7px; background: rgba(5, 12, 28, .5); color: #9cafd3; font-size: 11px; line-height: 1.5; }
.telegram-error-message span { color: #d6e5ff; white-space: pre-wrap; overflow-wrap: anywhere; }
.telegram-error time { color: #899dbf; font-size: 11px; }
.telegram-error-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; color: #9cafd3; font-size: 12px; }
.telegram-error-page-controls, .telegram-error-page-numbers { display: flex; align-items: center; gap: 7px; }
.telegram-error-page-numbers a, .telegram-error-page-numbers span { display: grid; min-width: 34px; height: 34px; place-items: center; padding: 0 7px; border: 1px solid rgba(133, 166, 245, .2); border-radius: 7px; color: #b9cde9; }
.telegram-error-page-numbers a:hover { border-color: rgba(105, 176, 255, .55); background: rgba(37, 76, 138, .34); color: #e0efff; }
.telegram-error-page-numbers span.is-current { border-color: #65aaff; background: rgba(55, 112, 205, .28); color: #e7f2ff; }
.telegram-error-pagination .quiet-button { min-height: 36px; }
body.account-scroll-page { display: flex; height: 100vh; min-height: 0; flex-direction: column; overflow: hidden; }
.account-scroll-page .account-header { flex: 0 0 auto; }
.account-layout--scroll-page { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); overflow: hidden; padding-top: 20px; padding-bottom: 20px; }
.account-layout--scroll-page .account-sidebar { position: static; height: 100%; min-height: 0; overflow: hidden; }
.account-main--scrollable { height: 100%; min-height: 0; align-self: stretch; overflow-y: auto; overscroll-behavior: contain; }
.account-scroll-page .account-footer { display: none; }
.tariff-picker-dialog[open], .tariff-confirm-dialog[open], .bot-modal[open] { animation: modal-in .26s cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
    body::before, body::after { animation: none !important; }
    .account-brand-dot { animation: none !important; }
    .tariff-carousel-track { will-change: auto; }
}
@media (max-width: 480px) {
    .telegram-error-pagination { align-items: flex-start; flex-direction: column; }
    .telegram-error-page-controls { flex-wrap: wrap; }
}
@media (max-width: 760px) {
    .account-sidebar { position: static; height: auto; max-height: none; overflow: visible; }
    .account-layout--scroll-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 12px; padding-top: 12px; padding-bottom: 12px; }
    .account-layout--scroll-page .account-sidebar { height: auto; padding: 10px; }
    .account-layout--scroll-page .sidebar-label { display: none; }
    .account-layout--scroll-page .sidebar-log { margin-top: 4px; border-top: 0; padding-top: 8px; }
}
body[data-theme="white"] {
    --page: #faf9f6;
    --paper: #ffffff;
    --ink: #342f28;
    --muted: #756f64;
    --line: #e7e2d9;
    --sea: #98764e;
    --sea-dark: #765a39;
}
body[data-theme="beige"] {
    --page: #f3eee4;
    --paper: #fffdf8;
    --ink: #342e26;
    --muted: #756b5e;
    --line: #e3d8c8;
    --sea: #98744b;
    --sea-dark: #765834;
}
body[data-theme] {
    color-scheme: light;
    background:
        radial-gradient(ellipse at 12% 8%, rgba(180, 155, 121, .16), transparent 38%),
        radial-gradient(ellipse at 88% 82%, rgba(199, 177, 144, .14), transparent 34%),
        var(--page);
    color: var(--ink);
}
body[data-theme]::before {
    opacity: .2;
    background-image:
        radial-gradient(1px 1px at 8% 13%, rgba(128, 104, 73, .42) 50%, transparent 100%),
        radial-gradient(1px 1px at 21% 76%, rgba(164, 137, 101, .38) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 37% 29%, rgba(128, 104, 73, .32) 50%, transparent 100%),
        radial-gradient(1px 1px at 54% 84%, rgba(164, 137, 101, .34) 50%, transparent 100%),
        radial-gradient(1px 1px at 71% 17%, rgba(128, 104, 73, .35) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 88% 63%, rgba(164, 137, 101, .3) 50%, transparent 100%);
}
body[data-theme]::after {
    opacity: .3;
    background:
        radial-gradient(ellipse at 17% 32%, rgba(183, 151, 105, .13), transparent 34%),
        radial-gradient(ellipse at 79% 28%, rgba(213, 192, 160, .18), transparent 31%),
        radial-gradient(ellipse at 62% 78%, rgba(170, 144, 106, .12), transparent 36%);
}
body[data-theme] .account-header {
    border-color: var(--line);
    background: rgba(250, 248, 244, .94);
}
body[data-theme] .account-brand-dot { background: #aa8558; box-shadow: 0 0 12px rgba(170, 133, 88, .42); animation: warm-glow 4.5s ease-in-out infinite; }
body[data-theme] .account-brand-name span,
body[data-theme] .text-button { color: #947149; }
body[data-theme] .text-button:hover { color: #61482c; }
body[data-theme] .account-name { color: #756b5e; }
body[data-theme] .account-balance { color: #342e26; }
body[data-theme] .account-identity { color: #756b5e; }
body[data-theme] .topup-button { border-color: #dfd1bd; background: #f2eadc; color: #684e31; }
body[data-theme] .topup-button:hover { background: #e9dcc8; box-shadow: 0 7px 22px rgba(126, 96, 57, .14); }
body[data-theme] .account-sidebar {
    border-color: var(--line);
    background: linear-gradient(155deg, rgba(255, 253, 248, .96), rgba(244, 238, 227, .94));
    box-shadow: 0 12px 32px rgba(78, 60, 37, .08), inset 0 1px rgba(255, 255, 255, .8);
    backdrop-filter: blur(14px);
}
body[data-theme] .sidebar-label { color: #887a67; }
body[data-theme] .sidebar-nav a,
body[data-theme] .sidebar-log { color: #625846; }
body[data-theme] .sidebar-nav a.active,
body[data-theme] .sidebar-nav a:hover,
body[data-theme] .sidebar-log:hover { background: #ece2d2; color: #634a2e; }
body[data-theme] .sidebar-log { border-color: var(--line); }
body[data-theme] .sidebar-nav a::before,
body[data-theme] .sidebar-log::before { color: #a58154; }
body[data-theme] .log-count { background: #e8dfd1; color: #665741; }
body[data-theme] .page-heading p { color: var(--muted); }
body[data-theme] .primary-button {
    background: linear-gradient(120deg, #a98458, #8b6a43);
    color: #fffdf8;
    box-shadow: 0 7px 20px rgba(133, 99, 56, .17);
}
body[data-theme] .primary-button:hover { background: linear-gradient(120deg, #987448, #765735); box-shadow: 0 10px 24px rgba(133, 99, 56, .22); }
body[data-theme] .primary-button:disabled { background: #d3c9ba; color: #807767; }
body[data-theme] .quiet-button { border-color: #ded4c5; background: rgba(255, 253, 248, .88); color: #5e5344; }
body[data-theme] .quiet-button:hover { border-color: #bda987; background: #f4ecdf; }
body[data-theme] .bot-card,
body[data-theme] .tariff-plan-card {
    border-color: var(--line);
    background: linear-gradient(145deg, var(--paper), #f6f0e6);
    box-shadow: 0 12px 30px rgba(78, 60, 37, .08), inset 0 1px rgba(255, 255, 255, .8);
}
body[data-theme] .bot-card:hover,
body[data-theme] .tariff-plan-card:hover { border-color: #cdbb9e; box-shadow: 0 14px 34px rgba(78, 60, 37, .12); }
body[data-theme] .bot-card h2,
body[data-theme] .tariff-plan-heading h2,
body[data-theme] .tariff-slide .tariff-plan-heading h3 { color: var(--ink); }
body[data-theme] .bot-username,
body[data-theme] .bot-usage,
body[data-theme] .tariff-plan-limits { color: #756b5e; }
body[data-theme] .bot-subscription.is-active { color: #6f7a4b; }
body[data-theme] .plan-badge-blue { background: #eee5d7; color: #745a38; }
body[data-theme] .tariff-plan--blue { --plan-accent: #99764c; --plan-soft: #efe5d6; }
body[data-theme] .plan-badge-starter { background: #eee9df; color: #766d5f; }
body[data-theme] .plan-badge-red { background: #fae9e7; color: #ae4239; }
body[data-theme] .tariff-plan-features { border-color: var(--line); }
body[data-theme] .tariff-plan-features li { color: #766f64; }
body[data-theme] .tariff-plan-features .is-included { color: #4b4338; }
body[data-theme] .tariff-plan-features .is-excluded > span { background: #eee9df; color: #9a9183; }
body[data-theme] .tariff-plan-card.is-current { border-color: var(--plan-accent); box-shadow: inset 0 0 0 1px var(--plan-accent), 0 10px 24px rgba(126, 96, 57, .1); }
body[data-theme] .tariff-plan-price { text-shadow: none; }
body[data-theme] .delete-button { border-color: #e5c7c2; background: #fff8f6; color: #963f33; }
body[data-theme] .delete-button:hover { border-color: #d7a9a1; background: #fff0ed; }
body[data-theme] .disabled-button { border-color: #e1dbd0; background: #f2efe9; color: #898174; }
body[data-theme] .empty-state { border-color: #d9cfbf; background: rgba(255, 253, 248, .72); color: var(--muted); }
body[data-theme] .account-footer { border-color: var(--line); color: #817766; }
body[data-theme] .toast { border-color: #dfd3c0; background: rgba(255, 253, 248, .98); box-shadow: 0 12px 34px rgba(78, 60, 37, .14); color: #604d35; }
body[data-theme] .toast.info { border-color: #ded2bd; color: #6c5739; }
body[data-theme] .toast-marker { background: #9b815b; box-shadow: 0 0 8px rgba(155, 129, 91, .3); }
body[data-theme] .toast.info .toast-marker { background: #ae8c5a; }
body[data-theme] .toast-close { color: #817766; }
body[data-theme] .toast-close:hover { background: #f0e9dd; color: var(--ink); }
body[data-theme] .bot-modal,
body[data-theme] .tariff-picker-dialog,
body[data-theme] .tariff-confirm-dialog {
    border-color: #ded4c5;
    background: linear-gradient(155deg, var(--paper), #f3ede3);
    color: var(--ink);
    box-shadow: 0 24px 72px rgba(66, 51, 32, .2);
}
body[data-theme] .bot-modal::backdrop,
body[data-theme] .tariff-picker-dialog::backdrop,
body[data-theme] .tariff-confirm-dialog::backdrop { background: rgba(54, 45, 33, .32); backdrop-filter: blur(5px); }
body[data-theme] .modal-close { border-color: var(--line); background: #fffdf8; color: #766b5b; }
body[data-theme] .modal-close:hover { background: #eee6d9; color: var(--ink); }
body[data-theme] .token-steps li,
body[data-theme] .modal-footnote { color: #6f6659; }
body[data-theme] .token-steps li::before { background: #eee5d7; color: #765a39; }
body[data-theme] .token-steps a { color: #795b37; }
body[data-theme] .bot-form { border-color: var(--line); }
body[data-theme] .bot-token,
body[data-theme] .account-input { border-color: #ded4c5; background: #fffefa; color: var(--ink); }
body[data-theme] .bot-token::placeholder,
body[data-theme] .account-input::placeholder { color: #9a8f7d; }
body[data-theme] .bot-token:focus,
body[data-theme] .account-input:focus { border-color: #a98458; box-shadow: 0 0 0 3px rgba(169, 132, 88, .15); }
body[data-theme] .notification-row { border-color: var(--line); }
body[data-theme] .notification-message { color: #4c453b; }
body[data-theme] .notification-time { color: #817766; }
body[data-theme] .notification-marker { background: #a98458; box-shadow: 0 0 8px rgba(169, 132, 88, .22); }
body[data-theme] .notification-empty { border-color: #d9cfbf; color: var(--muted); }
body[data-theme] .tariff-section { border-color: var(--line); background: linear-gradient(150deg, var(--paper), #f5efe5); }
body[data-theme] .tariff-section-title { color: var(--ink); }
body[data-theme] .tariff-section-title svg { stroke: #98744b; }
body[data-theme] .tariff-description,
body[data-theme] .tariff-hint,
body[data-theme] .tariff-number-wrap > span { color: #7e7465; }
body[data-theme] .field-label,
body[data-theme] .topup-extension-toggle { color: #51483c; }
body[data-theme] .feature-option,
body[data-theme] .tariff-period { border-color: #e5dbcc; background: #fffdf8; color: #51483c; }
body[data-theme] .feature-option:hover,
body[data-theme] .tariff-period:hover { border-color: #cdbb9e; }
body[data-theme] .feature-option:focus-within,
body[data-theme] .tariff-period:focus-within { outline-color: rgba(169, 132, 88, .24); }
body[data-theme] .feature-icon { background: #f1eadf; color: #8a7354; }
body[data-theme] .feature-copy small,
body[data-theme] .feature-price small,
body[data-theme] .tariff-period small { color: #827868; }
body[data-theme] .feature-price { color: #655943; }
body[data-theme] .feature-option.is-enabled { border-color: #cdbb9e; background: #f7f1e7; }
body[data-theme] .feature-option.is-enabled .feature-icon { background: #eee3d1; color: #765a39; }
body[data-theme] .feature-option.is-enabled .feature-switch { background: #a98458; }
body[data-theme] .feature-switch { background: #d8d0c3; }
body[data-theme] .feature-switch::after { background: #fffdf8; }
body[data-theme] .tariff-period.is-selected { border-color: #a98458; background: #f5eee2; box-shadow: inset 0 0 0 1px #a98458; }
body[data-theme] .tariff-period strong { color: #40382e; }
body[data-theme] .tariff-period b { color: #765a39; }
body[data-theme] .tariff-period em,
body[data-theme] .tariff-period.is-selected em { background: #eee5d7; color: #725a3c; }
body[data-theme] .tariff-summary { border-color: #dfd1bd; background: linear-gradient(120deg, #f3eadc, #eee5d7); }
body[data-theme] .tariff-summary > div,
body[data-theme] .tariff-summary p { color: #716653; }
body[data-theme] .tariff-summary strong { color: #624a2e; }
body[data-theme] .tariff-confirm-details { border-color: var(--line); background: rgba(255, 253, 248, .8); }
body[data-theme] .tariff-confirm-details > div { border-color: #e8dfd2; }
body[data-theme] .tariff-confirm-details dt { color: #756b5e; }
body[data-theme] .tariff-confirm-details dd { color: #40382e; }
body[data-theme] .tariff-confirm-details > div:nth-last-child(2) dd { color: #765a39; }
body[data-theme] .tariff-confirm-actions .quiet-button { color: #5e5344; }
body[data-theme] .tariff-plan-eyebrow,
body[data-theme] .tariff-current-label,
body[data-theme] .tariff-plan-price { color: var(--plan-accent); }
body[data-theme] .tariff-current-label { background: var(--plan-soft); }
body[data-theme] .tariff-current-text,
body[data-theme] .tariff-unavailable-text { background: var(--plan-soft, #eee5d7); color: var(--plan-accent, #765a39); }
body[data-theme] .tariff-unavailable-text { background: #eee9df; color: #817766; }
body[data-theme] .tariff-picker-heading p:last-child,
body[data-theme] .tariff-payment-hint,
body[data-theme] .tariff-confirm-copy { color: #756b5e; }
body[data-theme] .tariff-picker-eyebrow,
body[data-theme] .tariff-confirm-eyebrow { color: #8b6a43; }
body[data-theme] .tariff-arrow { border-color: #ded4c5; background: #fffdf8; color: #68563e; box-shadow: 0 4px 12px rgba(78, 60, 37, .08); }
body[data-theme] .tariff-arrow:hover:not(:disabled) { border-color: #a98458; background: #f1e8da; color: #624a2e; }
body[data-theme] .tariff-carousel-dots button { background: #d4c8b5; }
body[data-theme] .tariff-carousel-dots button.is-active { background: #a98458; box-shadow: 0 0 8px rgba(169, 132, 88, .3); }
body[data-theme] .bot-error-log { border-color: #ded4c5; background: #f4ecdf; color: #725839; }
body[data-theme] .bot-error-log:hover { border-color: #bda987; background: #ece1d0; color: #5b4429; }
body[data-theme] .telegram-error { border-color: #e7d8d1; background: linear-gradient(145deg, #fffdfa, #f7f0e9); box-shadow: 0 5px 18px rgba(78, 60, 37, .06); }
body[data-theme] .telegram-error-heading strong { color: #40382e; }
body[data-theme] .telegram-error-heading span { background: #fae9e7; color: #963f33; }
body[data-theme] .telegram-error-heading .telegram-error-node { background: #eee5d7; color: #725a3c; }
body[data-theme] .telegram-error p { color: #87392d; }
body[data-theme] .telegram-error-message { border-color: #e7ded2; background: #f7f2e9; color: #756b5e; }
body[data-theme] .telegram-error-message span { color: #40382e; }
body[data-theme] .telegram-error time { color: #817766; }
body[data-theme] .telegram-error-pagination { color: #756b5e; }
body[data-theme] .telegram-error-page-numbers a,
body[data-theme] .telegram-error-page-numbers span { border-color: #ded4c5; color: #655943; }
body[data-theme] .telegram-error-page-numbers a:hover { border-color: #bda987; background: #f1e8da; color: #5b4429; }
body[data-theme] .telegram-error-page-numbers span.is-current { border-color: #a98458; background: #eee3d1; color: #624a2e; }
body[data-theme] .settings-card { border-color: var(--line); background: var(--paper); }
body[data-theme] .settings-label { color: #40382e; }
body[data-theme] .settings-description { color: #756b5e; }
body[data-theme] .settings-theme-option { border-color: var(--line); background: #fffdf8; color: var(--ink); }
body[data-theme] .settings-theme-option:has(input:checked) { border-color: #a98458; box-shadow: inset 0 0 0 1px #a98458; }
body[data-theme] .settings-error { border-color: #e6c9c2; background: #fff4f1; color: #87392d; }
body[data-theme] .bot-limit-alert { color: #a64035; }
body[data-theme] .tariff-notice { border-color: #e6c9c2; background: #fff4f1; color: #87392d; }
body[data-theme] .tariff-notice.is-active { border-color: #dfd1bd; background: #f3eadc; color: #6c5739; }
.bot-version { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.bot-version-warning { margin: 6px 0 0; color: #8c483b; font-size: 12px; line-height: 1.5; }
.bot-version-form { margin: 0; }
.bot-version-warning[role="alert"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding: 16px 18px;
    border: 1px solid #e6c9c2;
    border-radius: 10px;
    background: #fff8f5;
    color: #623e35;
}
.bot-version-warning[role="alert"] h2 { margin: 0 0 4px; font-size: 15px; }
.bot-version-warning[role="alert"] p { margin: 0; color: #80685f; font-size: 13px; line-height: 1.5; }
body[data-theme] .bot-version-warning { color: #8c483b; }
body[data-theme] .bot-version-warning[role="alert"] { border-color: #e6c9c2; background: #fff8f5; color: #623e35; }
body[data-theme] .bot-version-warning[role="alert"] p { color: #80685f; }
@media (max-width: 560px) {
    .bot-version-warning[role="alert"] { align-items: flex-start; flex-direction: column; }
}
@keyframes warm-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(169, 132, 88, .22); }
    50% { box-shadow: 0 0 18px rgba(169, 132, 88, .42); }
}
.settings-form { display: grid; max-width: 760px; gap: 14px; }
.settings-card { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.settings-theme-fieldset { min-width: 0; margin: 0; }
.settings-label { display: block; margin: 0; color: var(--ink); font-size: 14px; font-weight: 700; }
.settings-description { margin: 6px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.settings-card > .account-input { max-width: 460px; }
.settings-theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.settings-theme-option { display: grid; min-height: 72px; grid-template-columns: 18px 48px minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.settings-theme-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--sea); }
.settings-theme-option > span:last-child { display: grid; gap: 3px; }
.settings-theme-option strong { color: var(--ink); font-size: 12px; }
.settings-theme-option small { color: var(--muted); font-size: 10px; }
.settings-theme-option:has(input:checked) { border-color: var(--sea); box-shadow: inset 0 0 0 1px var(--sea); }
.theme-swatch { width: 44px; height: 34px; border: 1px solid #dfd5c6; border-radius: 6px; box-shadow: inset 0 0 0 5px rgba(255,255,255,.55); }
.theme-swatch-white { background: linear-gradient(145deg, #fff, #f8f6f1); }
.theme-swatch-beige { background: linear-gradient(145deg, #f3eee4, #dfcfb7); }
.settings-actions { display: flex; justify-content: flex-end; }
.settings-error { padding: 11px 13px; border: 1px solid #e6c9c2; border-radius: 7px; background: #fff4f1; color: #87392d; font-size: 13px; line-height: 1.5; }
@media (max-width: 560px) {
    .settings-theme-options { grid-template-columns: 1fr; }
    .settings-card { padding: 16px; }
}
