/*
 * NATIVE WEB CABINET UI (iOS STYLE) v11.0
 * Pixel-Perfect Screenshot Match: Profile Hero, Custom Subscription Crown Card,
 * Clean Divider Metrics Row, Flat Borderless Action Steps with Sequence Directional Arrows,
 * High-Precision Animated Dropdown Engine, and Tall Vertical Tariffs Action Sheet.
 */

:root {
    --c-text: #ffffff;
    --theme-text: var(--c-text);
    --text-main: var(--c-text);
    --c-text-muted: #8e8e93;
    --c-border: rgba(255, 255, 255, 0.08);

    --c-success: #32d74b;
    --c-warning: #ff9f0a;
    --c-error: #ff453a;

    --spring: cubic-bezier(0.16, 1, 0.3, 1);
    --morph: cubic-bezier(0.16, 1, 0.3, 1);
    --smooth: cubic-bezier(0.16, 1, 0.3, 1);

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

/* VIEWPORT LOCK */
html, body {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100dvh;
    background-color: var(--theme-bg);
    color: var(--c-text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
}

@supports not (height: 100dvh) {
    html, body { height: 100%; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; outline: none; cursor: pointer; background: transparent; }

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    color: currentColor;
}

/* === UTILITIES === */
.d-flex { display: flex; }
.flex-col { flex-direction: column; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-grow { flex-grow: 1; }
.flex-1 { flex: 1; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.min-w-0 { min-width: 0; }
.hidden { display: none !important; }
.opacity-0 { opacity: 0; pointer-events: none; }
.opacity-70 { opacity: 0.7; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'SF Mono', 'JetBrains Mono', monospace; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-base { font-size: 16px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 24px; }
.text-3xl { font-size: 32px; }
.text-muted { color: var(--c-text-muted); }
.text-accent { color: var(--theme-primary); }
.text-success { color: var(--c-success); }
.text-warning { color: var(--c-warning); }
.text-error { color: var(--c-error); }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.5px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }

.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.m-0 { margin: 0; }
.mb-4 { margin-bottom: 4px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.ml-4 { margin-left: 4px; }
.ml-6 { margin-left: 6px; }
.ml-8 { margin-left: 8px; }
.ml-12 { margin-left: 12px; }
.mr-4 { margin-right: 4px; }
.mr-8 { margin-right: 8px; }
.p-0 { padding: 0 !important; }
.p-24 { padding: 24px; }

/* === DEDICATED COMPONENT CLASSES === */
.btn-refresh-pill { width: 36px; height: 36px; }
.days-number { line-height: 1; }
.days-unit { padding-bottom: 4px; }
.devices-icon { font-size: 36px; }
.btn-connect-vpn { padding: 16px 24px; border-radius: 16px; }
.settings-trigger { padding: 18px 16px; }
.tariffs-trigger { padding: 18px 16px; }
.session-logout-btn { width: 32px; height: 32px; }
.session-logout-icon { font-size: 16px; }
.download-btn-custom { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }
.btn-webapp-tool { width: 32px; height: 32px; }

/* === LOADER === */
.launch-screen {
    position: absolute; inset: 0; z-index: 9999;
    background: var(--theme-bg);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.4s var(--smooth), transform 0.4s var(--smooth);
}
.launch-screen.hide { opacity: 0; transform: scale(1.05); pointer-events: none; }

.loader-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--theme-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin: auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === BUTTONS & CHIPS === */
.liquid-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 16px 24px; border-radius: 16px; font-size: 16px; font-weight: 700;
    transition: transform 0.2s var(--spring), opacity 0.2s;
    user-select: none; -webkit-user-select: none; will-change: transform;
}
.liquid-btn:active { transform: scale(0.96); opacity: 0.8; }

.btn-primary { background: var(--theme-primary); color: var(--c-text); }
.btn-tonal { background: var(--theme-surface); color: var(--c-text); border: 1px solid var(--c-border); }
.btn-ghost { background: transparent; color: var(--c-text-muted); }
.btn-error { background: rgba(255,69,58,0.15); color: var(--c-error); }

.icon-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--theme-surface);
    color: var(--c-text);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s var(--spring), opacity 0.2s;
}
.icon-btn:active { transform: scale(0.85); opacity: 0.8; }

/* === NAVIGATION VIEWS === */
.app-root {
    position: absolute; inset: 0; z-index: 10;
    overflow: hidden;
}

.nav-view {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    transition: transform 0.45s var(--spring), opacity 0.35s var(--smooth), visibility 0.45s;
    will-change: transform, opacity; pointer-events: none;
    visibility: hidden;
    opacity: 0;
    box-shadow: none !important;
}
.nav-view.active {
    transform: translate3d(0,0,0);
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
    visibility: visible;
}
.nav-view.left {
    transform: translate3d(-100%,0,0);
    opacity: 0;
    z-index: 1;
    visibility: hidden;
    box-shadow: none !important;
}
.nav-view.right {
    transform: translate3d(100%,0,0);
    opacity: 0;
    z-index: 3;
    visibility: hidden;
    box-shadow: none !important;
}

/* === TOP PILL === */
.top-pill-wrap {
    position: absolute; top: calc(var(--safe-top) + 8px); left: 16px; right: 16px;
    display: flex; justify-content: center; z-index: 2000; pointer-events: none;
    transition: transform 0.4s var(--spring), opacity 0.4s var(--spring);
    will-change: transform, opacity;
}
.top-pill-wrap.hidden-top {
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
}
.liquid-top-pill {
    pointer-events: auto;
    background: var(--theme-surface);
    border-radius: 24px;
    padding: 8px 8px 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    position: relative;
}
.brand-cluster { display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -0.5px; color: var(--c-text); }

.brand-mode-title {
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text);
    margin-left: 8px;
    transition: opacity 0.3s var(--smooth), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.liquid-top-pill.install-mode .brand-mode-title {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pill-right-slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 130px;
    height: 36px;
}

.btn-refresh-pill {
    transition: opacity 0.25s var(--smooth), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    position: absolute;
    right: 0;
    opacity: 1;
    transform: translateY(0);
    color: var(--c-text);
}

.liquid-top-pill.install-mode .btn-refresh-pill {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.header-os-dropdown {
    position: absolute;
    right: 0;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.25s var(--smooth), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    z-index: 2001;
}

.liquid-top-pill.install-mode .header-os-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* === DROPDOWN (ANIMATED) === */
.cab-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: var(--theme-surface);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 6px 12px;
    color: var(--c-text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-radius 0.2s var(--smooth), border-color 0.2s var(--smooth), border-bottom 0.2s var(--smooth);
    user-select: none;
    height: 36px;
    box-sizing: border-box;
}

.header-os-trigger {
    min-width: 125px;
}

.cab-dropdown-trigger:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.cab-dropdown-trigger.open {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-bottom: 1px dashed var(--c-border) !important;
}

.os-trigger-arrow {
    font-size: 18px !important;
    color: var(--c-text);
    opacity: 0.8;
    transition: transform 0.3s var(--smooth);
}

.cab-dropdown-trigger.open .os-trigger-arrow {
    transform: rotate(180deg);
}

.cab-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--theme-surface);
    border: 1px solid var(--c-border);
    border-top: none !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    padding: 4px;
    transform-origin: top center;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s var(--smooth);
    z-index: 2100;
    max-height: 240px;
    overflow-y: auto;
}

.cab-dropdown-menu.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
}

.cab-dropdown-item {
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s var(--smooth), color 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cab-dropdown-item:hover, .cab-dropdown-item:active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--theme-primary);
}

.cab-dropdown-item.active {
    color: var(--theme-primary);
    background: rgba(var(--c-primary-rgb), 0.12);
}

/* === SCROLL AREAS === */
.safe-scroll-area {
    position: relative; z-index: 10; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: calc(var(--safe-top) + 72px) 16px calc(var(--safe-bottom) + 110px) 16px;
    max-width: 600px; width: 100%; margin: 0 auto;
    overscroll-behavior-y: contain;
}
.safe-scroll-area::-webkit-scrollbar { display: none; }

/* === PROFILE / DASHBOARD HERO === */
.profile-hero-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 4px 20px 4px;
}

.profile-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(var(--c-primary-rgb), 0.14);
    color: var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar-circle .material-symbols-rounded {
    font-size: 32px;
    color: var(--theme-primary);
}

.profile-info-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.profile-role-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--c-text-muted);
}

.profile-user-name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--c-text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-user-id {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-muted);
}

.shot-sub-card {
    position: relative;
    background: var(--theme-surface);
    border-radius: 20px;
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.shot-sub-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 4px;
}

.shot-sub-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-crown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-primary);
}

.shot-sub-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--c-text-muted);
}

.btn-sub-manage-tariff {
    position: absolute;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--c-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--smooth);
    user-select: none;
}

.btn-sub-manage-tariff .material-symbols-rounded {
    color: var(--c-text);
}

.btn-sub-manage-tariff:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.12);
}

.sub-days-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.sub-days-number {
    font-size: 42px;
    font-weight: 600;
    line-height: 1;
    font-family: var(--font-mono);
    color: var(--c-text);
}

.sub-days-unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-text-muted);
}

.sub-tariff-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--c-text);
    margin-top: 4px;
}

.metrics-split-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
}

.metric-block {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.metric-divider {
    width: 0.8px;
    height: 32px;
    border-radius: 1000px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 16px;
    flex-shrink: 0;
}

.device-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-primary);
    flex-shrink: 0;
}

.device-icon-box .material-symbols-rounded {
    font-size: 38px;
    color: var(--theme-primary);
}

.metric-info-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.metric-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.6px;
    color: var(--c-text-muted);
}

.metric-value-line {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--c-text);
    line-height: 1.15;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.metric-unit {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text-muted);
}

.metric-subtext {
    font-size: 12px;
    color: var(--c-text-muted);
    font-weight: 500;
}

.metric-block.metric-devices {
    cursor: pointer;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    transition: opacity 0.2s ease, transform 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}
.metric-block.metric-devices:active {
    opacity: 0.7;
    transform: scale(0.97);
}

.ios-nav-list {
    display: flex;
    flex-direction: column;
}

.ios-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 4px;
    cursor: pointer;
    transition: opacity 0.2s var(--smooth);
    user-select: none;
    color: var(--c-text);
}

.ios-nav-row:active {
    opacity: 0.6;
}

.ios-nav-row .material-symbols-rounded {
    color: var(--c-text);
    opacity: 0.85;
}

.ios-nav-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-text);
}

/* === INSTALL SCREEN === */
.install-scroll-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.install-app-slot {
    width: 100%;
    margin-bottom: 3px;
}

.install-app-dropdown-wrap {
    position: relative;
    width: 100%;
}

.install-app-static-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 14px;
    padding: 10px 14px;
    color: var(--c-text);
}

.install-steps-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.install-step-card {
    position: relative;
    background: var(--theme-surface);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    color: var(--c-text);
}

.install-step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: -4px 0;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.install-step-arrow .material-symbols-rounded {
    color: var(--c-text);
    opacity: 0.6;
    font-size: 28px;
    line-height: 1;
}

.step-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.step-number-circle {
    position: absolute;
    right: 5px;
    top: 0;
    width: 24px;
    height: 40%;
    border-radius: 50%;
    opacity: 0.08;
    filter: blur(6px);
    rotate: -10deg;
    color: var(--c-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    font-weight: 200;
    flex-shrink: 0;
    box-shadow: none !important;
    text-shadow: none !important;
}

.step-header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.step-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--c-text);
    line-height: 1.25;
    margin-bottom: 10px;
}

.step-desc {
    font-size: 12px;
    color: var(--c-text-muted);
    line-height: 1.4;
}

.download-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
}

.btn-download-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--c-text);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s var(--smooth);
}

.btn-download-item .material-symbols-rounded {
    color: var(--c-text);
}

.btn-download-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.16);
}

.btn-add-vpn-action {
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 4px;
    color: var(--c-text);
}

.btn-add-vpn-action .material-symbols-rounded {
    color: var(--c-text);
}

.usage-instruction-box {
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--c-text-muted);
    font-size: 12px;
    line-height: 1.4;
    border: 1px dashed rgb(255 255 255 / 7%);
    margin-top: 4px;
}

.btn-close-install {
    padding: 12px;
    font-size: 14px;
    border-radius: 14px;
    color: var(--c-text);
}

.btn-close-install .material-symbols-rounded {
    color: var(--c-text);
}

/* === NAVIGATION TAB BAR === */
.bottom-tab-pill {
    position: absolute; bottom: calc(var(--safe-bottom) + 16px);
    left: 50%; transform: translateX(-50%) translateY(0);
    display: flex; gap: 4px; padding: 6px;
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.05); border-radius: 999px;
    z-index: 1000;
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s var(--smooth);
}

.bottom-tab-pill.hidden-bar {
    transform: translateX(-50%) translateY(140px);
    opacity: 0;
    pointer-events: none;
}

.tab-item {
    padding: 10px; border-radius: 999px; display: flex; align-items: center; gap: 6px;
    cursor: pointer; transition: all 0.3s var(--spring); color: var(--c-text-muted);
}
.tab-item.active { background: rgba(255,255,255,0.1); color: var(--theme-primary); padding: 10px 20px; }
.tab-icon { font-size: 24px; transition: transform 0.2s var(--spring); color: inherit; }
.tab-item:active .tab-icon { transform: scale(0.85); }
.tab-label { font-size: 13px; font-weight: 700; max-width: 0; overflow: hidden; opacity: 0; transition: all 0.3s var(--spring); white-space: nowrap; }
.tab-item.active .tab-label { max-width: 100px; opacity: 1; }

.tab-item:not(.active) .tab-icon {
    color: var(--c-text);
    opacity: 0.65;
}

/* === GENERAL CABINET CARDS === */
.ios-card {
    background: var(--theme-surface);
    border-radius: 20px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 1px solid var(--c-border);
}

.ios-list {
    display: flex;
    flex-direction: column;
}

.ios-list-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--c-border);
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}

.ios-list-item:last-child {
    border-bottom: none;
}

.ios-list-item:active {
    opacity: 0.6;
}

.ios-list-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--theme-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2px;
    flex-shrink: 0;
    overflow: hidden;
    color: var(--c-text);
}

.ios-list-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ios-list-content {
    flex: 1;
    min-width: 0;
}

.ios-list-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ios-list-desc {
    font-size: 13px;
    color: var(--c-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-badge {
    background: var(--theme-primary);
    color: var(--c-text);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
}

.traffic-progress-wrap {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}
.circular-chart-ios { display: block; width: 100%; height: 100%; }
.circle-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 4.5; }
.circle { fill: none; stroke-width: 4.5; stroke-linecap: round; transition: stroke-dasharray 1s var(--spring); }
.stroke-primary { stroke: var(--theme-primary); }
.stroke-warn { stroke: var(--c-warning); }
.stroke-error { stroke: var(--c-error); }

/* === ACTION SHEETS & TARIFFS === */
.action-sheet-overlay {
    position: absolute; inset: 0; z-index: 3000;
    background: rgba(0,0,0,0.5);
    display: flex; flex-direction: column; justify-content: flex-end;
    opacity: 0; pointer-events: none; transition: opacity 0.3s var(--smooth);
}
.action-sheet-overlay.active { opacity: 1; pointer-events: auto; }

.action-sheet {
    background: var(--theme-bg);
    padding: 12px 16px calc(24px + var(--safe-bottom)) 16px; border-radius: 28px 28px 0 0;
    transform: translateY(100%); transition: transform 0.4s var(--spring);
    width: 100%; max-width: 600px; margin: 0 auto;
    will-change: transform;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -12px 36px rgba(0,0,0,0.4);
    position: relative;
}
.action-sheet-overlay.active .action-sheet { transform: translateY(0); }

.action-sheet.action-sheet-tariffs {
    height: 85vh;
    height: 85dvh;
    max-height: 88dvh;
    display: flex;
    flex-direction: column;
    padding: 12px 16px calc(16px + var(--safe-bottom)) 16px;
}

.sheet-handle-wrap {
    padding: 8px 0 14px 0;
    min-height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    flex-shrink: 0;
}
.sheet-handle {
    width: 44px;
    height: 5px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    transition: background 0.2s;
}
.sheet-handle-wrap:active .sheet-handle {
    background: rgba(255,255,255,0.5);
}

.sheet-header-spacing {
    margin-bottom: 16px;
    text-align: center;
    flex-shrink: 0;
}

.sheet-title {
    font-size: 19px;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.3px;
    color: var(--c-text);
    margin-bottom: 6px;
}
.sheet-subtitle {
    font-size: 13px;
    color: var(--c-text-muted);
    text-align: center;
    margin: 0 auto;
    max-width: 90%;
    line-height: 1.4;
}

.tariffs-vertical-wrap {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tariffs-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 16px 2px;
    overscroll-behavior-y: contain;
}

.tariffs-vertical-list::-webkit-scrollbar {
    display: none;
}

.bot-tariffs-vertical {
    width: 100%;
    margin: 8px 0 12px 0;
    max-height: none !important;
    overflow: visible !important;
    flex: none !important;
}

.bot-tariffs-vertical .tariffs-vertical-list {
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior-y: auto !important;
    padding: 2px 2px 8px 2px;
    flex: none !important;
}

.tariff-card-vertical {
    width: 100%;
    background: var(--theme-surface);
    border-radius: 18px;
    padding: 16px 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s var(--spring), border-color 0.2s var(--smooth), box-shadow 0.2s;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
    border: 1px solid var(--c-border);
}

.tariff-card-vertical:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.tariff-card-vertical:hover {
    border-color: var(--theme-primary);
}

.tariff-card-vertical.is-current-tariff {
    border-color: var(--theme-primary) !important;
    background: rgba(var(--c-primary-rgb), 0.12) !important;
    box-shadow: 0 0 0 1px var(--theme-primary), 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

.tcv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tcv-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tcv-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.tcv-desc {
    font-size: 13px;
    color: var(--c-text-muted);
    line-height: 1.4;
}

.tcv-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tcv-price {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 600;
    color: var(--theme-primary);
    line-height: 1;
}

.tcv-price-unit {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-muted);
    margin-left: 4px;
}

.tcv-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-primary);
    background: rgba(var(--c-primary-rgb), 0.1);
    padding: 6px 14px;
    border-radius: 10px;
    transition: background 0.2s, transform 0.2s;
}

.tcv-action-btn .material-symbols-rounded {
    color: inherit;
}

.tariff-card-vertical:hover .tcv-action-btn {
    background: var(--theme-primary);
    color: var(--c-text);
}

.tc-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tc-badge-chip {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: var(--c-text-muted);
}

.tc-badge-discount {
    background: rgba(255,69,58,0.2);
    color: var(--c-error);
    font-weight: 700;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 8px;
}

.tc-badge-current {
    background: var(--theme-primary);
    color: var(--c-text);
    font-weight: 700;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tc-badge-current .material-symbols-rounded {
    color: var(--c-text);
}

.tariffs-carousel-wrap {
    position: relative;
    width: 100%;
    margin: 16px 0 20px 0;
    overflow: hidden;
}

.tariffs-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0 16px 0;
    overscroll-behavior-x: contain;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.tariffs-carousel.is-dragging {
    cursor: grabbing !important;
}

.tariffs-carousel::-webkit-scrollbar {
    display: none;
}

.tariffs-carousel.mask-right {
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 48px), transparent 100%);
}

.tariffs-carousel.mask-left {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 48px, #000 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 48px, #000 100%);
}

.tariffs-carousel.mask-both {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 40px, #000 calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.tariffs-carousel.mask-none {
    -webkit-mask-image: none !important;
    mask-image: none !important;
}

.tariff-card-slide {
    flex: 0 0 230px;
    min-width: 230px;
    max-width: 250px;
    background: var(--theme-surface);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    padding: 18px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 145px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    transition: transform 0.2s var(--spring), border-color 0.2s var(--smooth), box-shadow 0.2s;
}

.tariff-card-slide:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.tariff-card-slide:hover {
    border-color: var(--theme-primary);
}

.tariff-card-slide.is-current-tariff {
    border-color: var(--theme-primary) !important;
    background: rgba(var(--c-primary-rgb), 0.12) !important;
    box-shadow: 0 0 0 1px var(--theme-primary), 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

.tc-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--c-text);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-desc {
    font-size: 12px;
    color: var(--c-text-muted);
    line-height: 1.4;
    margin-bottom: 14px;
}

.tc-footer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 1px solid var(--c-border);
    padding-top: 12px;
}

.tc-price {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 800;
    color: var(--theme-primary);
    line-height: 1;
}

.tc-price-unit {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-muted);
    margin-left: 2px;
}

.tc-action-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--theme-primary);
    display: flex;
    align-items: center;
}

.tc-action-label .material-symbols-rounded {
    color: inherit;
}

/* === WEB APP ENGINE (IFRAME) === */
.webapp-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--theme-bg);
    display: flex; flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s var(--spring);
    will-change: transform;
}
.webapp-overlay.active { transform: translateY(0); }
.webapp-header {
    height: calc(56px + var(--safe-top));
    padding: var(--safe-top) 16px 0 16px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--theme-surface);
    border-bottom: 1px solid var(--c-border);
    flex-shrink: 0;
    color: var(--c-text);
}
.webapp-title { font-weight: 600; font-size: 16px; flex-grow: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; color: var(--c-text); }
.webapp-iframe { flex-grow: 1; width: 100%; border: none; background: var(--theme-bg); }

/* === TOAST === */
.cab-toast {
    position: absolute; top: calc(24px + var(--safe-top)); left: 50%;
    transform: translate(-50%, -100px) scale(0.9);
    background: var(--theme-surface);
    padding: 12px 20px; border-radius: 999px;
    display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10000; opacity: 0; pointer-events: none; transition: all 0.4s var(--spring);
}
.cab-toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.cab-toast.success .toast-icon { color: var(--c-success); }
.cab-toast.error .toast-icon { color: var(--c-error); }
.toast-msg { font-size: 14px; font-weight: 600; color: var(--c-text); }

/* === BOT VIEW STYLES & PAYMENT METHOD BUTTONS === */
.bot-container { width: 100%; max-width: 600px; height: 100%; margin: 0 auto; position: relative; display: flex; flex-direction: column; }
.bot-header {
    height: calc(64px + var(--safe-top)); padding-top: var(--safe-top); padding-left: 20px; padding-right: 20px;
    display: flex; justify-content: space-between; align-items: center;
    position: absolute; top: 0; left: 0; right: 0; z-index: 50;
    background: var(--theme-bg);
}
.bot-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.5px; color: var(--c-text); }

.bot-scroll-area {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding-top: calc(64px + var(--safe-top) + 20px);
    padding-left: 16px; padding-right: 16px;
    position: relative; z-index: 10; transition: padding-bottom 0.4s var(--spring);
    overscroll-behavior-y: contain;
}
.bot-scroll-area::-webkit-scrollbar { display: none; }

.elastic-outer { overflow: hidden; transition: height 0.5s var(--spring); will-change: height; position: relative; }
.elastic-inner { display: flex; flex-direction: column; transition: opacity 0.3s var(--smooth), transform 0.4s var(--spring); will-change: opacity, transform; }

.bot-media-wrap {
    margin-bottom: 24px; border-radius: 20px; overflow: hidden;
    background: var(--theme-surface);
    transition: opacity 0.3s var(--spring), transform 0.3s var(--spring);
}
.bot-media-wrap img { width: 100%; height: auto; max-height: 400px; object-fit: contain; display: block; }

.bot-text-content {
    font-size: 15px; line-height: 1.5; background: var(--theme-surface);
    padding: 20px; border-radius: 20px;
    margin-bottom: 24px; transition: opacity 0.3s var(--spring), transform 0.3s var(--spring);
    color: var(--c-text);
}
.bot-text-content p { margin-bottom: 1em; }
.bot-text-content p:last-child { margin-bottom: 0; }
.bot-text-content blockquote { border-left: 3px solid var(--theme-primary); padding: 10px 14px; margin: 16px 0; background: var(--theme-bg); border-radius: 0 12px 12px 0; color: var(--c-text); }
.bot-text-content code { background: var(--theme-bg); padding: 4px 8px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.9em; color: var(--theme-primary); }
.bot-text-content a { color: var(--theme-primary); text-decoration: underline; }

.bot-keyboard-panel {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 20;
    padding: 16px 16px calc(110px + var(--safe-bottom)) 16px;
    background: var(--theme-surface);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
    max-height: 75vh;
    max-height: 75dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.bot-keyboard-grid { display: flex; flex-direction: column; gap: 8px; width: 100%; }

#cabDynamicArea:not(:empty) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.cab-btn-row {
    display: flex; gap: 8px; width: 100%; overflow: hidden;
    transition: max-height 0.4s var(--spring), opacity 0.4s var(--spring), transform 0.4s var(--spring), margin-top 0.4s var(--spring);
    max-height: 280px; opacity: 1; transform: translateY(0); margin-top: 0;
}
.row-enter { max-height: 0; opacity: 0; transform: translateY(15px); margin-top: -8px; }
.row-leave { max-height: 0; opacity: 0; transform: translateY(20px); margin-top: -8px; }

.btn-bot {
    background: var(--theme-bg);
    color: var(--c-text);
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 14px;
    flex: 1 1 0%;
    min-width: 0;
    max-width: 1000px;
    transition: transform 0.2s var(--spring), opacity 0.3s var(--spring), max-width 0.4s var(--spring), flex 0.4s var(--spring), padding 0.4s var(--spring), margin 0.4s var(--spring);
    overflow: hidden;
    opacity: 1;
    transform: scale(1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-bot .material-symbols-rounded {
    color: var(--c-text);
}
.btn-bot:active { opacity: 0.8; transform: scale(0.96); }

.btn-enter { flex: 0 0 0%; max-width: 0; opacity: 0; padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; transform: scale(0.8); }
.btn-leave { flex: 0 0 0%; max-width: 0; opacity: 0; padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; transform: scale(0.8); border: none; overflow: hidden; margin: 0; }

.btn-text-content { display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: opacity 0.3s var(--smooth), transform 0.3s var(--spring); white-space: nowrap; color: inherit; }

.btn-smart-pay {
    background: var(--theme-primary);
    color: var(--c-text);
}

.btn-recurr-cancel {
    background: rgba(255, 69, 58, 0.15);
    color: var(--c-error);
}

.payment-methods-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-bottom: 8px;
}

.payment-method-btn {
    width: 100%;
    min-height: 48px;
    background: var(--theme-bg);
    border: 1px solid var(--c-border);
    border-radius: 14px;
    color: var(--c-text);
    font-size: 15px;
    font-weight: 600;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s var(--spring);
    cursor: pointer;
}
.payment-method-btn .material-symbols-rounded {
    color: var(--c-text);
}
.payment-method-btn .material-symbols-rounded.text-accent {
    color: var(--theme-primary);
}
.payment-method-btn .material-symbols-rounded.text-muted {
    color: var(--c-text-muted);
}
.payment-method-btn:hover {
    border-color: var(--theme-primary);
}
.payment-method-btn:active {
    transform: scale(0.97);
    opacity: 0.85;
}

.is-loading .bot-text-content,
.is-loading .bot-media-wrap,
.is-loading .btn-bot,
.is-loading .tariff-card-slide,
.is-loading .tariff-card-vertical,
.is-loading .payment-method-btn {
    opacity: 0.5 !important;
    pointer-events: none;
}

/* === EMOJI GLYPHS === */
.cabinet-emoji-node {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    height: 1.25em;
    min-width: 1.25em;
    min-height: 1.25em;
    max-width: 1.25em;
    max-height: 1.25em;
    vertical-align: -0.22em;
    margin: 0 0.12em;
    padding: 0;
    line-height: 1;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.cabinet-emoji-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border: none;
    outline: none;
    background: transparent;
}

.cabinet-emoji-canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    vertical-align: text-bottom;
}

.cabinet-emoji-lottie {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-emoji-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3em;
    height: 1.3em;
    min-width: 1.3em;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.cms-premium-emoji-node {
    display: inline-flex;
    vertical-align: -0.22em;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    height: 1.25em;
    min-width: 1.25em;
    min-height: 1.25em;
    max-width: 1.25em;
    max-height: 1.25em;
    line-height: 1;
    margin: 0 0.12em;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.cms-premium-emoji-node img,
.cms-premium-emoji-node video,
.cms-premium-emoji-node canvas,
.cms-premium-emoji-node div,
.cms-premium-emoji-node span {
    width: 100% !important;
    height: 100% !important;
    max-width: 1.25em !important;
    max-height: 1.25em !important;
    object-fit: contain;
    vertical-align: text-bottom;
    display: block;
}

/* === PAYMENT AWAITING OVERLAY === */
.payment-overlay-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--smooth);
}

.payment-overlay-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.payment-waiting-card {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 36px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.4s var(--spring);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    color: var(--c-text);
}

.payment-overlay-backdrop.visible .payment-waiting-card {
    transform: scale(1) translateY(0);
}

.payment-icon-slot {
    width: 72px;
    height: 72px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.payment-spinner-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s var(--smooth), transform 0.4s var(--spring);
}

.payment-spinner-svg {
    width: 60px;
    height: 60px;
    animation: payment-spinner-rotate 1.6s linear infinite;
    background: transparent;
    display: block;
}

.payment-spinner-path {
    stroke: var(--c-text);
    stroke-linecap: round;
    animation: payment-spinner-dash 1.4s ease-in-out infinite;
}

@keyframes payment-spinner-rotate {
    100% { transform: rotate(360deg); }
}

@keyframes payment-spinner-dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

.payment-success-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.65);
    pointer-events: none;
    transition: opacity 0.4s var(--smooth), transform 0.45s var(--spring);
}

.payment-success-svg {
    width: 68px;
    height: 68px;
    display: block;
}

.payment-success-circle {
    stroke: #32d74b;
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
    transition: stroke-dashoffset 0.6s var(--spring) 0.1s;
}

.payment-success-check {
    stroke: #32d74b;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    transition: stroke-dashoffset 0.4s var(--spring) 0.35s;
}

.payment-waiting-card.is-success .payment-spinner-wrap {
    opacity: 0;
    transform: scale(0.65);
    pointer-events: none;
}

.payment-waiting-card.is-success .payment-success-wrap {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.payment-waiting-card.is-success .payment-success-circle {
    stroke-dashoffset: 0;
}

.payment-waiting-card.is-success .payment-success-check {
    stroke-dashoffset: 0;
}

.payment-text-slot {
    width: 100%;
    margin-bottom: 28px;
}

.payment-modal-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--c-text);
    margin-bottom: 8px;
    line-height: 1.25;
    transition: color 0.3s;
}

.payment-modal-subtitle {
    font-size: 14px;
    color: var(--c-text-muted);
    line-height: 1.5;
    margin: 0 auto;
    max-width: 90%;
    transition: color 0.3s;
}

.payment-actions-slot {
    position: relative;
    width: 100%;
    height: 48px;
}

.payment-action-btn {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.3s var(--smooth), transform 0.3s var(--spring);
}

.payment-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #8e8e93;
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 1;
    transform: scale(1);
}

.payment-btn-cancel:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.12);
}

.payment-btn-ok {
    background: var(--theme-primary);
    color: var(--c-text);
    border: none;
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.payment-btn-ok:active {
    transform: scale(0.97);
    opacity: 0.85;
}

.payment-waiting-card.is-success .payment-btn-cancel {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.payment-waiting-card.is-success .payment-btn-ok {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.payment-confirm-card {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 28px 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85);
    transform: scale(0.92);
    transition: transform 0.35s var(--spring);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--c-text);
}

.payment-overlay-backdrop.visible .payment-confirm-card {
    transform: scale(1);
}

.confirm-actions-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 20px;
}

/* === MINIMALIST SPLASH SCREEN (BORDERLESS BLACK) === */
.cabinet-minimal-splash {
    background-color: #000000 !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100dvh;
    margin: 0;
    padding: 24px;
    user-select: none;
    -webkit-user-select: none;
}

.minimal-splash-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.minimal-splash-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    display: block;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.minimal-splash-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: #ffffff;
    margin: 0;
}
