:root {
    --bg: #eef3f5;
    --bg-2: #e4ebef;
    --surface: #ffffff;
    --card: #ffffff;
    --card-edge: rgba(11, 26, 34, 0.1);
    --text: #0b1a22;
    --muted: #4a5f6a;
    --accent: #0e7c86;
    --accent-soft: #2aa6b0;
    --accent-deep: #0a5c64;
    --ok: #0f7a5c;
    --ok-bg: rgba(15, 122, 92, 0.1);
    --bad: #c23b3b;
    --bad-bg: rgba(194, 59, 59, 0.1);
    --warn: #b45309;
    --warn-bg: rgba(180, 83, 9, 0.1);
    --phone: #0e7c86;
    --tvpc: #1a6b7a;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(11, 26, 34, 0.04), 0 8px 24px rgba(11, 26, 34, 0.05);
    --font-display: 'Fraunces', Georgia, serif;
    --font-ui: 'Figtree', system-ui, sans-serif;
    --mood-ray: rgba(42, 166, 176, 0.32);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    background-color: var(--bg);
}

body {
    font-family: var(--font-ui);
    color: var(--text);
    min-height: 100vh;
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Сетка: на весь экран, к краям растворяется маской */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 10px,
            rgba(14, 124, 134, 0.045) 10px,
            rgba(14, 124, 134, 0.045) 11px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 39px,
            rgba(14, 124, 134, 0.035) 39px,
            rgba(14, 124, 134, 0.035) 40px
        );
    -webkit-mask-image: radial-gradient(ellipse 95% 70% at 50% 0%, #000 20%, transparent 78%);
    mask-image: radial-gradient(ellipse 95% 70% at 50% 0%, #000 20%, transparent 78%);
}

/* Луч сверху: слой на весь вьюпорт, цвет уходит в прозрачность без обрезки */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 90% 55% at 50% -8%, var(--mood-ray), transparent 68%),
        radial-gradient(ellipse 55% 32% at 50% 0%, rgba(255, 255, 255, 0.5), transparent 70%);
}

body.cab-mood-ok {
    --mood-ray: rgba(42, 166, 176, 0.34);
}
body.cab-mood-soon {
    --mood-ray: rgba(212, 140, 48, 0.28);
}
body.cab-mood-expired {
    --mood-ray: rgba(194, 80, 80, 0.22);
}

.cab-page {
    position: relative;
    z-index: 1;
    max-width: 920px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}

/* ——— Header ——— */
.cab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    animation: cab-in 0.5s ease both;
}

.cab-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.cab-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, var(--accent-soft), var(--accent-deep));
    flex-shrink: 0;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.cab-logo:hover { transform: translateY(-1px); }

.cab-brand {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 2px;
    color: var(--text);
}

.cab-email {
    font-size: 13px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 52vw;
}

.cab-logout {
    flex-shrink: 0;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border: 1px solid var(--card-edge);
    border-radius: 12px;
    background: var(--surface);
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.cab-logout:hover {
    color: var(--text);
    border-color: rgba(14, 124, 134, 0.35);
    background: #fff;
}

/* ——— Hero ——— */
.cab-hero {
    position: relative;
    margin-bottom: 22px;
    padding-top: 4px;
    animation: cab-in 0.55s ease 0.04s both;
}
.cab-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(30px, 5.5vw, 42px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 8px;
    color: var(--text);
}
.cab-hero p {
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    max-width: 28em;
    opacity: 0.72;
}

.cab-access {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 18px 20px 18px 22px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: var(--surface);
    box-shadow: var(--shadow);
    animation: cab-in 0.5s ease 0.05s both;
}
.cab-access::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--accent);
}
.cab-access.is-ok {
    border-color: rgba(15, 122, 92, 0.18);
    background:
        linear-gradient(105deg, rgba(15, 122, 92, 0.1) 0%, rgba(15, 122, 92, 0.02) 42%, transparent 70%),
        var(--surface);
}
.cab-access.is-ok::before { background: var(--ok); }
.cab-access.is-soon {
    border-color: rgba(180, 83, 9, 0.22);
    background:
        linear-gradient(105deg, rgba(180, 83, 9, 0.12) 0%, rgba(180, 83, 9, 0.03) 42%, transparent 70%),
        var(--surface);
}
.cab-access.is-soon::before { background: var(--warn); }
.cab-access.is-expired {
    border-color: rgba(194, 59, 59, 0.22);
    background:
        linear-gradient(105deg, rgba(194, 59, 59, 0.1) 0%, rgba(194, 59, 59, 0.02) 42%, transparent 70%),
        var(--surface);
}
.cab-access.is-expired::before { background: var(--bad); }
.cab-access-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}
.cab-access-expiry {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.cab-access-date {
    font-family: var(--font-display);
    font-size: clamp(26px, 4.2vw, 34px);
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text);
}
.cab-access-meta {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}
.cab-access.is-ok .cab-access-meta { color: var(--ok); }
.cab-access.is-soon .cab-access-meta { color: var(--warn); }
.cab-access.is-expired .cab-access-meta { color: var(--bad); }
.cab-access-link {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 650;
    color: var(--accent-deep);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(14, 124, 134, 0.28);
    background: rgba(14, 124, 134, 0.08);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cab-access-link:hover {
    background: rgba(14, 124, 134, 0.14);
    border-color: rgba(14, 124, 134, 0.45);
    color: var(--text);
}
.cab-access.is-soon .cab-access-link,
.cab-access.is-expired .cab-access-link {
    color: var(--text);
    border-color: rgba(11, 26, 34, 0.14);
    background: rgba(255, 255, 255, 0.7);
}

.cab-banner-warn {
    margin: -6px 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(194, 59, 59, 0.25);
    background: var(--bad-bg);
    color: #9f2d2d;
    font-size: 13.5px;
    line-height: 1.45;
}
.cab-banner-warn a {
    color: var(--text);
    font-weight: 650;
    text-decoration: underline;
}
.cab-banner-soon {
    margin: -6px 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(180, 83, 9, 0.28);
    background: var(--warn-bg);
    color: #92400e;
    font-size: 13.5px;
    line-height: 1.45;
}
.cab-banner-soon a {
    color: var(--text);
    font-weight: 650;
    text-decoration: underline;
}

/* ——— Cards grid ——— */
.cab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: stretch;
}

.cab-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px 22px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--card-edge);
    background: var(--card);
    box-shadow: var(--shadow);
    animation: cab-in 0.55s ease both;
}
.cab-card:nth-child(1) { animation-delay: 0.08s; }
.cab-card:nth-child(2) { animation-delay: 0.14s; }

.cab-card.is-phone { border-color: rgba(14, 124, 134, 0.22); }
.cab-card.is-tv_pc { border-color: rgba(26, 107, 122, 0.22); }
.cab-card.is-expired { opacity: 0.78; }

.cab-card-head {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cab-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
}
.cab-card.is-phone .cab-card-icon {
    color: var(--phone);
    background: rgba(14, 124, 134, 0.1);
    box-shadow: inset 0 0 0 1px rgba(14, 124, 134, 0.16);
}
.cab-card.is-tv_pc .cab-card-icon {
    color: var(--tvpc);
    background: rgba(26, 107, 122, 0.1);
    box-shadow: inset 0 0 0 1px rgba(26, 107, 122, 0.16);
}

.cab-card-titles {
    flex: 1;
    min-width: 0;
}
.cab-card-titles h2 {
    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 4px;
}
.cab-card-for {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.35;
}
.cab-card-profiles {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 650;
    color: var(--text, #1a1a1a);
    font-variant-numeric: tabular-nums;
}
.cab-card-profiles.is-empty {
    font-weight: 500;
    color: var(--muted);
}
.cab-panel-copy .cab-card-profiles {
    margin-top: 6px;
}
.cab-card-flags {
    position: relative;
    margin-top: 10px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 10px;
    padding: 8px 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.12),
        rgba(255, 255, 255, 0.04)
    );
}
.cab-card-flags::before,
.cab-card-flags::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36px;
    z-index: 1;
    pointer-events: none;
}
.cab-card-flags::before {
    left: 0;
    background: linear-gradient(90deg, var(--card) 0%, transparent 100%);
}
.cab-card-flags::after {
    right: 0;
    width: 48px;
    background: linear-gradient(270deg, var(--card) 35%, transparent 100%);
}
.cab-card-flags-track {
    display: flex;
    width: max-content;
    gap: 0;
}
.cab-card-flags:not(.is-scrolling) .cab-card-flags-set[aria-hidden="true"] {
    display: none;
}
.cab-card-flags.is-scrolling .cab-card-flags-track {
    animation: cab-flags-marquee var(--cab-flags-duration, 40s) linear infinite;
    will-change: transform;
}
.cab-card-flags.is-scrolling:hover .cab-card-flags-track {
    animation-play-state: paused;
}
.cab-card-flags-set {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 8px;
    flex-shrink: 0;
}
.cab-card-flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
    opacity: 0.88;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.cab-card-flags:hover .cab-card-flag {
    opacity: 1;
}
@keyframes cab-flags-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .cab-card-flags.is-scrolling .cab-card-flags-track {
        animation: none;
    }
    .cab-card-flags.is-scrolling .cab-card-flags-set[aria-hidden="true"] {
        display: none;
    }
}

.cab-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0;
    border-radius: 0;
    background: transparent;
}
.cab-status.ok {
    color: var(--ok);
    background: transparent;
}
.cab-status.warn {
    color: var(--warn);
    background: transparent;
}
.cab-status.bad {
    color: var(--bad);
    background: transparent;
}
.cab-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.cab-status.ok .cab-status-dot {
    animation: cab-status-breathe 2.4s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(15, 122, 92, 0.35);
}
.cab-status.warn .cab-status-dot {
    animation: cab-status-pulse-warn 1.8s ease-in-out infinite;
}
.cab-status.bad .cab-status-dot {
    opacity: 0.85;
}

/* ——— Steps ——— */
.cab-steps {
    position: relative;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(14, 124, 134, 0.04);
    border: 1px solid rgba(14, 124, 134, 0.1);
}
.cab-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.4;
    color: #334e5a;
}
.cab-steps li span {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
}
.cab-card.is-phone .cab-steps li span {
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
}
.cab-card.is-tv_pc .cab-steps li span {
    background: linear-gradient(135deg, var(--tvpc), var(--accent-deep));
}

/* ——— QR ——— */
.cab-qr-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 2px 0 0;
}
.cab-qr-caption {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 500;
}
.cab-qr-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: inherit;
    font: inherit;
    padding: 0;
}
.cab-qr {
    display: block;
    width: 132px;
    height: 132px;
    border-radius: 14px;
    background: #fff;
    padding: 8px;
    border: 1px solid var(--card-edge);
    transition: transform 0.2s ease;
}
.cab-qr-btn:hover .cab-qr,
.cab-qr-btn:focus-visible .cab-qr {
    transform: scale(1.03);
}
.cab-qr-hint {
    font-size: 11.5px;
    color: var(--muted);
}

/* ——— Copy CTA ——— */
.cab-cta-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cab-open-happ,
.cab-copy {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.cab-open-happ {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 55%, var(--accent-deep) 100%);
    box-shadow: 0 10px 24px rgba(14, 124, 134, 0.22);
}
.cab-card.is-tv_pc .cab-open-happ {
    background: linear-gradient(135deg, #2a8f9c 0%, var(--tvpc) 60%, var(--accent-deep) 100%);
    box-shadow: 0 10px 24px rgba(26, 107, 122, 0.2);
}
.cab-open-happ:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(14, 124, 134, 0.28); }
.cab-open-happ:active { transform: translateY(0); }
.cab-copy {
    border: 1px solid var(--card-edge);
    color: var(--text);
    background: #f7fafb;
    box-shadow: none;
}
.cab-card.is-tv_pc .cab-copy {
    border-color: rgba(26, 107, 122, 0.22);
}
.cab-copy:hover {
    border-color: rgba(14, 124, 134, 0.4);
    background: rgba(14, 124, 134, 0.06);
    transform: translateY(-1px);
}
.cab-card.is-tv_pc .cab-copy:hover {
    border-color: rgba(26, 107, 122, 0.4);
    background: rgba(26, 107, 122, 0.07);
}
.cab-copy:active { transform: translateY(0); }
.cab-copy.copied {
    border-color: rgba(15, 122, 92, 0.35) !important;
    background: var(--ok-bg) !important;
    color: var(--ok);
}
.cab-happ-hint {
    margin: -2px 0 0;
    font-size: 12.5px;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}
.cab-happ-hint a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.cab-happ-hint a:hover { text-decoration: underline; }

.cab-card-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    margin-top: 2px;
}
.cab-howto,
.cab-url-toggle {
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
}
.cab-howto:hover,
.cab-url-toggle:hover { text-decoration: underline; }
.cab-url-toggle { color: var(--muted); }
.cab-url-panel { width: 100%; }
.cab-url-panel[hidden] { display: none; }

.cab-url {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px dashed rgba(14, 124, 134, 0.22);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(14, 124, 134, 0.04);
    cursor: pointer;
    font: inherit;
    color: var(--muted);
    transition: border-color 0.15s, background 0.15s;
}
.cab-url:hover,
.cab-url:focus-visible {
    border-color: rgba(14, 124, 134, 0.45);
    background: rgba(14, 124, 134, 0.08);
}
.cab-url-text {
    display: block;
    font-size: 11.5px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cab-card-foot {
    margin-top: auto;
    padding-top: 2px;
    font-size: 12.5px;
    color: var(--muted);
    text-align: center;
}

.cab-slot-empty {
    padding: 28px 12px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}
.cab-slot-empty-sub {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.9;
}

.cab-footer {
    margin-top: 28px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    animation: cab-in 0.5s ease 0.2s both;
}
.cab-footer a {
    color: var(--accent);
    text-decoration: none;
}
.cab-footer a:hover { text-decoration: underline; }

.cab-site-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid var(--card-edge);
    font-size: 12.5px;
}
@media (max-width: 760px) {
    .cab-site-legal {
        margin-bottom: 8px;
        justify-content: center;
        text-align: center;
    }
}
.cab-site-legal a {
    color: var(--muted);
    text-decoration: none;
}
.cab-site-legal a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.cab-legal {
    max-width: 42em;
    font-size: 15px;
    line-height: 1.6;
    color: #334e5a;
    margin-bottom: 8px;
}
.cab-legal h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--text);
    margin-bottom: 8px;
}
.cab-legal-meta {
    color: var(--muted);
    margin-bottom: 20px;
}
.cab-legal h2 {
    font-family: var(--font-ui);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 22px 0 8px;
    letter-spacing: -0.02em;
}
.cab-legal p { margin-bottom: 10px; }
.cab-legal a,
.cab-legal-list a {
    color: var(--accent);
    text-decoration: none;
}
.cab-legal a:hover { text-decoration: underline; }
.cab-legal-list {
    margin: 0 0 12px;
    padding-left: 1.2em;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ——— Nav ——— */
.cab-nav {
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 28px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--card-edge);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    animation: cab-in 0.5s ease 0.03s both;
}
.cab-nav-item {
    position: relative;
    flex: 1;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color 0.18s, background 0.18s;
}
.cab-nav-item svg {
    flex-shrink: 0;
    opacity: 0.8;
}
.cab-nav-item:hover {
    color: var(--text);
    background: rgba(14, 124, 134, 0.06);
}
.cab-nav-item.is-active {
    color: var(--accent-deep);
    background: rgba(14, 124, 134, 0.1);
}
.cab-nav-item.is-active::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform-origin: center;
    animation: cab-nav-line 0.28s ease both;
}
.cab-nav-item.is-active svg { opacity: 1; color: var(--accent); }

/* ——— Panels ——— */
.cab-panel-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: cab-in 0.5s ease 0.06s both;
}
.cab-panel {
    padding: 20px 20px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--card-edge);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.cab-panel.is-phone { border-color: rgba(14, 124, 134, 0.2); }
.cab-panel.is-tv_pc { border-color: rgba(26, 107, 122, 0.2); }
.cab-panel h2 {
    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.cab-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.cab-panel-head h2 { margin-bottom: 0; }
.cab-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
}
.cab-panel.is-phone .cab-panel-icon {
    color: var(--phone);
    background: rgba(14, 124, 134, 0.1);
}
.cab-panel.is-tv_pc .cab-panel-icon {
    color: var(--tvpc);
    background: rgba(26, 107, 122, 0.1);
}
.cab-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.cab-panel-copy { min-width: 0; }
.cab-panel-title h2,
.cab-panel-copy h2 {
    margin: 0 0 2px;
    font-size: 20px;
}
.cab-panel-copy .cab-card-for { margin: 0; }
.cab-panel-text {
    font-size: 14.5px;
    color: #334e5a;
    line-height: 1.55;
}
.cab-panel-text a,
.cab-guide-steps a,
.cab-guide-list a,
.cab-panel-note a,
.cab-kv a {
    color: var(--accent);
    text-decoration: none;
}
.cab-panel-text a:hover,
.cab-guide-steps a:hover,
.cab-guide-list a:hover,
.cab-panel-note a:hover,
.cab-kv a:hover {
    color: var(--accent-deep);
    text-decoration: underline;
}
.cab-panel-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}
.cab-devices-summary {
    margin: -6px 0 16px;
    font-size: 14px;
    color: var(--muted);
}
.cab-devices-summary strong { color: var(--text); }
.cab-devices-count {
    margin-left: auto;
    flex-shrink: 0;
    min-width: 28px;
    height: 28px;
    padding: 0 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    background: rgba(14, 124, 134, 0.1);
    color: var(--accent);
    border: 1px solid rgba(14, 124, 134, 0.18);
}
.cab-panel.is-tv_pc .cab-devices-count {
    background: rgba(26, 107, 122, 0.1);
    color: var(--tvpc);
    border-color: rgba(26, 107, 122, 0.18);
}
.cab-devices-count.is-full,
.cab-panel.is-tv_pc .cab-devices-count.is-full {
    background: var(--bad-bg);
    color: var(--bad);
    border-color: rgba(194, 59, 59, 0.28);
}
.cab-panel.is-limit-full {
    border-color: rgba(194, 59, 59, 0.28);
}
.cab-limit-note {
    margin: -4px 0 10px;
    color: #9f2d2d;
}
.cab-limit-note a { color: var(--text); font-weight: 650; }
.cab-devices-empty-card h2 { margin-bottom: 8px; }
.cab-devices-slots-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.cab-devices-slot-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 8px;
    border-radius: 12px;
    border: 1px solid var(--card-edge);
    background: #f7fafb;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.cab-devices-slot-chip .cab-panel-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}
.cab-devices-slot-chip.is-phone .cab-panel-icon {
    color: var(--phone);
    background: rgba(14, 124, 134, 0.1);
}
.cab-devices-slot-chip.is-tv_pc .cab-panel-icon {
    color: var(--tvpc);
    background: rgba(26, 107, 122, 0.1);
}
.cab-device-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.cab-device-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--card-edge);
    background: #f7fafb;
}
.cab-device-main { min-width: 0; flex: 1; }
.cab-device-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.cab-device-name {
    font-size: 14.5px;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.3;
    min-width: 0;
}
.cab-device-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.cab-device-edit:hover {
    color: var(--accent);
    border-color: rgba(14, 124, 134, 0.25);
    background: rgba(14, 124, 134, 0.06);
}
.cab-device-item.is-renaming .cab-device-name-row,
.cab-device-item.is-renaming [data-device-meta] {
    display: none;
}
.cab-device-rename-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
}
.cab-device-rename-form[hidden] { display: none; }
.cab-device-name-input {
    flex: 1 1 140px;
    min-width: 0;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(14, 124, 134, 0.35);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
}
.cab-device-name-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 124, 134, 0.15);
}
.cab-device-rename-save,
.cab-device-rename-cancel {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}
.cab-device-rename-save {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
}
.cab-device-rename-cancel {
    color: var(--muted);
    background: #fff;
    border-color: var(--card-edge);
}
.cab-device-auto { color: var(--muted); }
.cab-device-meta {
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.35;
}
.cab-devices-slot-cap {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}
.cab-device-remove-form {
    margin: 0;
    flex-shrink: 0;
}
.cab-device-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(194, 59, 59, 0.22);
    background: var(--bad-bg);
    color: var(--bad);
    cursor: pointer;
}
.cab-device-remove:hover {
    background: rgba(194, 59, 59, 0.16);
    border-color: rgba(194, 59, 59, 0.4);
}
.cab-device-remove:disabled {
    opacity: 0.55;
    cursor: wait;
}
.cab-devices-empty {
    margin: 0;
    padding-top: 2px;
}

.cab-guide-steps {
    margin: 0;
    padding-left: 1.2em;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14.5px;
    line-height: 1.45;
    color: #334e5a;
}
.cab-guide-list {
    margin: 0;
    padding-left: 1.15em;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14.5px;
    line-height: 1.45;
    color: #334e5a;
}
.cab-guide-sub {
    margin: 16px 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.cab-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cab-quick {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--card-edge);
    background: #f7fafb;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.cab-quick:hover {
    border-color: rgba(14, 124, 134, 0.4);
    color: var(--accent);
}
.cab-kv {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cab-kv > div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px;
    align-items: baseline;
}
.cab-kv dt {
    font-size: 13px;
    color: var(--muted);
}
.cab-kv dd {
    font-size: 14.5px;
    font-weight: 600;
    word-break: break-word;
}
.cab-kv a { font-weight: 600; }
.cab-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.cab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s, background 0.15s, border-color 0.15s;
}
.cab-btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    box-shadow: 0 8px 20px rgba(14, 124, 134, 0.2);
}
.cab-btn.primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}
.cab-btn.secondary {
    color: var(--text);
    background: #fff;
    border-color: var(--card-edge);
}
.cab-btn.secondary:hover { border-color: rgba(14, 124, 134, 0.35); }
.cab-btn.danger {
    color: var(--bad);
    background: var(--bad-bg);
    border-color: rgba(194, 59, 59, 0.25);
}
.cab-btn.danger:hover { background: rgba(194, 59, 59, 0.16); }

.cab-flash {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.45;
    animation: cab-in 0.35s ease both;
}
.cab-flash-ok {
    color: var(--ok);
    background: var(--ok-bg);
    border: 1px solid rgba(15, 122, 92, 0.25);
}
.cab-flash-err {
    color: #9f2d2d;
    background: var(--bad-bg);
    border: 1px solid rgba(194, 59, 59, 0.25);
}

.cab-form {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cab-form-danger {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--card-edge);
}
.cab-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 6px;
}
.cab-form .cab-input { margin-bottom: 14px; }
.cab-form .cab-actions { margin-top: 4px; }
.cab-form .cab-btn {
    width: auto;
    min-width: 160px;
}

.cab-pay-date {
    font-size: clamp(26px, 4vw, 32px);
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 6px 0 4px;
    font-family: var(--font-display);
}
.cab-pay-status.is-expired-panel {
    border-color: rgba(194, 59, 59, 0.28);
}
.cab-pay-status.is-soon-panel {
    border-color: rgba(180, 83, 9, 0.3);
}

/* ——— Lightbox ——— */
.cab-lightbox[hidden] { display: none; }
.cab-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
}
.cab-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(11, 26, 34, 0.45);
    backdrop-filter: blur(6px);
    cursor: pointer;
}
.cab-lightbox-panel {
    position: relative;
    width: min(100%, 340px);
    padding: 22px 20px 18px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--card-edge);
    box-shadow: 0 16px 40px rgba(11, 26, 34, 0.18);
    text-align: center;
    animation: cab-pop 0.22s ease both;
}
.cab-lightbox-title {
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.cab-lightbox-img {
    width: min(72vw, 260px);
    height: auto;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    border: 1px solid var(--card-edge);
}
.cab-lightbox-close {
    margin-top: 16px;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--card-edge);
    border-radius: 12px;
    background: #f7fafb;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ——— Toast ——— */
.cab-toast[hidden] { display: none; }
.cab-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 110;
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--accent-deep);
    color: #ecfeff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(11, 26, 34, 0.2);
    animation: cab-pop 0.2s ease both;
}

@keyframes cab-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes cab-pop {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes cab-nav-line {
    from { transform: scaleX(0.4); opacity: 0; }
    to { transform: scaleX(1); opacity: 1; }
}
@keyframes cab-status-breathe {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(15, 122, 92, 0.35);
    }
    50% {
        opacity: 0.75;
        transform: scale(0.92);
        box-shadow: 0 0 0 6px rgba(15, 122, 92, 0);
    }
}
@keyframes cab-status-pulse-warn {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.88); }
}

@media (prefers-reduced-motion: reduce) {
    .cab-header, .cab-hero, .cab-card, .cab-footer,
    .cab-lightbox-panel, .cab-toast, .cab-qr, .cab-copy, .cab-open-happ,
    .cab-nav-item.is-active::after,
    .cab-status-dot {
        animation: none !important;
        transition: none !important;
    }
    .cab-copy:hover,
    .cab-open-happ:hover,
    .cab-btn.primary:hover { transform: none; }
}

.cab-tariff-lead { margin: 0 0 16px; }
.cab-tariff-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 4px;
}
.cab-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 18px 16px;
    border-radius: 14px;
    border: 1px solid var(--card-edge);
    background: #f7fafb;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s;
}
.cab-plan input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.cab-plan.is-featured {
    border-color: rgba(14, 124, 134, 0.3);
    background: linear-gradient(165deg, rgba(14, 124, 134, 0.08), #f7fafb 55%);
}
.cab-plan.is-selected,
.cab-plan:has(input:checked) {
    border-color: rgba(14, 124, 134, 0.55);
    background: #fff;
    box-shadow: 0 0 0 1px rgba(14, 124, 134, 0.2), 0 10px 24px rgba(14, 124, 134, 0.1);
}
.cab-plan.is-current {
    outline: 1px dashed rgba(15, 122, 92, 0.45);
}
.cab-plan-ribbon,
.cab-plan-current {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 8px;
}
.cab-plan-ribbon {
    background: rgba(14, 124, 134, 0.12);
    color: var(--accent);
}
.cab-plan-current {
    top: auto;
    bottom: 14px;
    right: 14px;
    background: var(--ok-bg);
    color: var(--ok);
}
.cab-plan-name {
    font-family: var(--font-ui);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.cab-plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}
.cab-plan-amount {
    font-family: var(--font-ui);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text);
}
.cab-plan-currency {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--muted);
}
.cab-plan-period {
    font-size: 0.85rem;
    color: var(--muted);
    margin-left: 2px;
}
.cab-plan-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}
.cab-plan-coffee {
    margin: 0;
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.4;
    color: var(--ok);
    background: var(--ok-bg);
    border-radius: 10px;
    padding: 8px 10px;
}
.cab-perks {
    background: linear-gradient(180deg, #fff 0%, #f7fafb 100%);
}
.cab-perks-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cab-perks-list li {
    position: relative;
    padding: 8px 12px 8px 32px;
    border-radius: 10px;
    background: #f7fafb;
    font-size: 14px;
    line-height: 1.45;
}
.cab-perks-list li::before {
    content: "✓";
    position: absolute;
    left: 12px;
    top: 8px;
    font-weight: 700;
    color: var(--ok);
}
.cab-btn-pay {
    background: linear-gradient(135deg, #2bb673, #0f7a5c) !important;
    box-shadow: 0 8px 20px rgba(15, 122, 92, 0.22) !important;
}
.cab-btn-pay:hover {
    filter: brightness(1.04);
}
.cab-btn-apply {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    border: none;
    min-width: 118px;
}
.cab-plan-features {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cab-plan-features li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    padding-top: 8px;
    border-top: 1px solid rgba(11, 26, 34, 0.08);
}
.cab-plan-feat-label { color: var(--muted); }
.cab-plan-feat-value { font-weight: 600; color: var(--text); }
.cab-plan-select {
    margin-top: auto;
    text-align: center;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(14, 124, 134, 0.08);
}
.cab-plan:has(input:checked) .cab-plan-select {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
}
.cab-pay-summary-card {
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--card-edge);
    background: #f7fafb;
}
.cab-pay-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    padding: 6px 0;
    color: var(--muted);
}
.cab-pay-summary-row strong { color: var(--text); font-weight: 600; text-align: right; }
.cab-pay-summary-row.is-total {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(11, 26, 34, 0.08);
    font-size: 15px;
    color: #334e5a;
}
.cab-pay-summary-row.is-total strong {
    color: var(--accent);
    font-size: 1.15rem;
}
.cab-promo-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.cab-promo-reveal-wrap {
    margin: 0 0 12px;
}
.cab-promo-reveal-wrap a {
    font-size: 0.92rem;
}
.cab-promo-row .cab-input {
    flex: 1;
    min-width: 0;
}
.cab-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(11, 26, 34, 0.14);
    background: #fff;
    color: inherit;
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cab-input:focus {
    outline: none;
    border-color: rgba(14, 124, 134, 0.55);
    box-shadow: 0 0 0 3px rgba(14, 124, 134, 0.14);
}
.cab-input::placeholder {
    color: rgba(90, 109, 120, 0.7);
}

@media (max-width: 640px) {
    .cab-tariff-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .cab-grid { grid-template-columns: 1fr; gap: 14px; }
    .cab-page { padding: 20px 14px calc(88px + env(safe-area-inset-bottom, 0px)); }
    .cab-card { padding: 20px 16px 16px; }
    .cab-qr { width: 148px; height: 148px; }
    .cab-brand { font-size: 20px; }
    .cab-access {
        flex-wrap: wrap;
        align-items: flex-start;
        padding: 16px 16px 16px 18px;
    }
    .cab-access-link {
        margin-left: auto;
    }

    .cab-nav {
        position: fixed;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        z-index: 50;
        width: min(100%, 920px);
        margin: 0;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--card-edge);
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 -8px 24px rgba(11, 26, 34, 0.06);
        animation: none;
    }
    .cab-nav-item {
        flex-direction: column;
        gap: 4px;
        min-height: 52px;
        padding: 6px 4px;
        font-size: 11px;
        border-radius: 12px;
    }
    .cab-nav-item.is-active {
        color: var(--accent-deep);
        background: rgba(14, 124, 134, 0.1);
        box-shadow: none;
    }
    .cab-nav-item.is-active::after { display: none; }
}

@media (max-width: 420px) {
    .cab-card-icon {
        width: 46px;
        height: 46px;
    }
    .cab-nav-item { font-size: 10.5px; }
    .cab-kv > div { grid-template-columns: 1fr; gap: 2px; }
}
