/* ========================================
   CSS Variables
   ======================================== */
:root {
    --bg: #07070d;
    --bg-card: #0e0e18;
    --bg-elevated: #141420;
    --bg-input: #1a1a28;
    
    --text: #f0f0f5;
    --text-secondary: #8b8b9e;
    --text-muted: #5c5c6e;
    
    --accent: #8b5cf6;
    --accent-light: #a78bfa;

    --safe-top: 0px;
    --safe-bottom: 0px;
    --safe-left: 0px;
    --safe-right: 0px;
    --accent-glow: rgba(139, 92, 246, 0.35);
    
    --success: #00d26a;
    --success-glow: rgba(0, 210, 106, 0.2);
    --warning: #fbbf24;
    --danger: #ef4444;
    
    --glow: rgba(251, 191, 36, 0.25);
    --glow-border: rgba(251, 191, 36, 0.35);
    --glow-border-subtle: rgba(251, 191, 36, 0.12);
    
    --border: rgba(255, 255, 255, 0.05);
    --border-glow: rgba(251, 191, 36, 0.18);
    --radius: 18px;
    --radius-sm: 14px;
    --radius-xs: 8px;
    
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(251, 191, 36, 0.08);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
    background-attachment: fixed;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

/* ========================================
   Loader
   ======================================== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s, visibility 0.3s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-ring {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   App Container
   ======================================== */
.app {
    min-height: 100vh;
    padding-bottom: max(var(--safe-bottom), env(safe-area-inset-bottom, 20px));
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    opacity: 0;
    transition: opacity 0.4s;
}

.app.visible {
    opacity: 1;
}

/* ========================================
   Header
   ======================================== */
.app-header {
    padding: calc(var(--safe-top) + 12px) 20px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 8px;
    background: rgba(14, 14, 24, 0.7);
    border-radius: 100px;
    border: 1px solid var(--glow-border-subtle);
    transition: var(--transition);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.profile-btn:active {
    transform: scale(0.97);
    background: var(--bg-elevated);
    border-color: var(--glow-border);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.profile-balance {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    display: none;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 8px 16px;
    background: rgba(20, 20, 32, 0.7);
    border-radius: var(--radius);
    border: 1px solid var(--border-glow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-glow);
}
.status-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}
.status-bar.active .status-icon-sm { background: linear-gradient(135deg, var(--success) 0%, #2ecc71 100%); box-shadow: 0 0 12px rgba(0,209,178,0.3); }
.status-bar.inactive .status-icon-sm { background: linear-gradient(135deg, var(--danger) 0%, #e74c3c 100%); }
.status-bar.frozen .status-icon-sm { background: linear-gradient(135deg, var(--warning) 0%, #f39c12 100%); }
.status-text-sm { font-size: 15px; font-weight: 700; color: var(--text); display: block; }
.status-sub-sm { font-size: 12px; color: var(--text-muted); display: block; margin-top: 1px; }
}

/* ========================================
   Cards
   ======================================== */
.card {
    margin: 0 16px 16px;
    padding: 20px;
    background: rgba(14, 14, 24, 0.7);
    border-radius: var(--radius);
    border: 1px solid var(--border-glow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Connection Card */
.connection-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.connection-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.connection-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.connection-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.connection-value {
    font-weight: 600;
}

/* Stats Card */
.stats-card {
    padding: 16px 20px;
}

.stats-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.stat {
    text-align: center;
    flex: 1;
    padding: 8px 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat.highlight {
    border: 1px solid var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.btn-secondary:active {
    background: var(--bg-input);
}

/* ========================================
   Quick Actions Grid
   ======================================== */
.quick-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 16px;
}

.quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    width: calc(25% - 9px);
    min-width: 72px;
    background: rgba(14, 14, 24, 0.6);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glow-border-subtle);
    transition: var(--transition);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.quick-btn:active {
    transform: scale(0.95);
    background: var(--bg-elevated);
    border-color: var(--glow-border);
    box-shadow: 0 0 12px var(--glow);
}

.quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent-light);
}

.quick-btn span {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}


/* ========================================
   Menu
   ======================================== */
.menu {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    width: 100%;
    background: rgba(14, 14, 24, 0.6);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glow-border-subtle);
    text-align: left;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.menu-item:active {
    background: var(--bg-elevated);
    transform: scale(0.99);
    border-color: var(--glow-border);
}

.menu-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--accent-light);
    flex-shrink: 0;
}

.menu-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-title {
    font-size: 15px;
    font-weight: 600;
}

.menu-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.menu-arrow {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   Bottom Sheet
   ======================================== */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sheet-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    background: rgba(14, 14, 24, 0.95);
    border-radius: 24px 24px 0 0;
    z-index: 101;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glow);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(251, 191, 36, 0.05);
}

.sheet.visible {
    transform: translateY(0);
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border);
}

.sheet-title {
    font-size: 18px;
    font-weight: 700;
}

.sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.sheet-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* ========================================
   Toast
   ======================================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    background: var(--bg-elevated);
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

/* ========================================
   Sheet Content Styles
   ======================================== */

/* Tariffs Grouped */
.tariffs-grouped {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tariff-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.tariff-group-header i {
    font-size: 16px;
}

.tariff-subgroup-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 4px 6px;
    margin-top: 8px;
    border-bottom: 1px solid var(--border);
}

.tariff-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tariff-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: rgba(20, 20, 32, 0.6);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glow-border-subtle);
    transition: var(--transition);
    cursor: pointer;
    gap: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tariff-item:active {
    border-color: var(--accent);
    background: var(--bg-input);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.15);
}

.tariff-info {
    flex: 1;
    min-width: 0;
}

.tariff-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tariff-duration {
    font-size: 13px;
    color: var(--text-muted);
}

.tariff-features {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.tariff-price {
    text-align: right;
    flex-shrink: 0;
}

.tariff-price .amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-light);
}

.tariff-price .per-month {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.tariff-arrow {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Payment Methods */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.payment-btn {
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.payment-btn:active {
    border-color: var(--accent);
}

.payment-btn i {
    font-size: 24px;
    color: var(--accent-light);
}

.payment-btn span {
    font-size: 13px;
    font-weight: 500;
}

.payment-btn--primary {
    border-color: var(--success, #00d26a);
    background: rgba(0, 210, 106, 0.12);
}

.payment-btn--primary i {
    color: var(--success, #00d26a);
}

/* Input */
.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    color: var(--text);
    outline: none;
    transition: var(--transition);
}

.input:focus {
    border-color: var(--accent);
}

.input::placeholder {
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}


/* ========================================
   Subscription Carousel
   ======================================== */
.subscription-carousel {
    margin: 0 16px 16px;
    position: relative;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 12px;
    padding: 4px;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.subscription-card {
    flex: 0 0 calc(100% - 8px);
    scroll-snap-align: center;
    background: rgba(14, 14, 24, 0.7);
    border-radius: var(--radius);
    border: 1px solid var(--border-glow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: calc(100% - 8px);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.subscription-card.active {
    border-color: rgba(0, 210, 106, 0.4);
    box-shadow: 0 0 20px rgba(0, 210, 106, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.subscription-card.frozen {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.subscription-card.expired {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-name {
    font-size: 18px;
    font-weight: 700;
}

.sub-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.sub-status.active {
    background: rgba(0, 210, 106, 0.15);
    color: var(--success);
}

.sub-status.frozen {
    background: rgba(255, 193, 7, 0.15);
    color: var(--warning);
}

.sub-status.expired {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
}

.sub-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.sub-row .label {
    color: var(--text-secondary);
}

.sub-row .value {
    font-weight: 500;
}

.sub-actions {
    display: flex;
    gap: 10px;
}

.sub-actions .btn-primary,
.sub-actions .btn-secondary {
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--accent);
    width: 20px;
    border-radius: 4px;
}

/* No subscription state */
.no-subscription {
    text-align: center;
    padding: 32px 20px;
    background: rgba(14, 14, 24, 0.7);
    border-radius: var(--radius);
    border: 1px solid var(--border-glow);
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-glow);
}

.no-subscription i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.no-subscription h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.no-subscription p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}


/* ========================================
   App Selection Grid
   ======================================== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.app-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.app-btn:active {
    transform: scale(0.97);
    border-color: var(--accent);
}

.app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.app-icon.happ {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

.app-icon.v2raytun {
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
}

.app-name {
    font-size: 15px;
    font-weight: 600;
}

.app-desc {
    font-size: 11px;
    color: var(--text-muted);
}


/* ========================================
   Key Selection List
   ======================================== */
.keys-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.key-select-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: left;
    transition: var(--transition);
    width: 100%;
}

.key-select-item:active {
    border-color: var(--accent);
    background: var(--bg-input);
}

.key-select-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.key-select-name {
    font-size: 15px;
    font-weight: 600;
}

.key-select-expiry {
    font-size: 12px;
    color: var(--text-muted);
}

.key-select-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.key-select-status.active {
    background: rgba(0, 210, 106, 0.15);
    color: var(--success);
}

.key-select-status.frozen {
    background: rgba(255, 193, 7, 0.15);
    color: var(--warning);
}

.key-select-status.expired {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
}


/* ========================================
   Settings
   ======================================== */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.setting-icon {
    color: var(--accent-light);
    width: 20px;
    text-align: center;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-input);
    border-radius: 28px;
    transition: var(--transition);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background-color: var(--accent);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Language Selection */
.lang-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: left;
    transition: var(--transition);
    width: 100%;
}

.lang-item:active {
    background: var(--bg-input);
}

.lang-item.active {
    border-color: var(--accent);
    background: rgba(108, 92, 231, 0.1);
}

.lang-flag {
    font-size: 24px;
}

.lang-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.lang-check {
    color: var(--accent);
    font-size: 16px;
}


/* ========================================
   Support Chat
   ======================================== */
.support-chat {
    display: flex;
    flex-direction: column;
    height: 400px;
    max-height: 60vh;
}

.support-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.support-welcome {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.support-welcome i {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 16px;
    opacity: 0.7;
}

.support-welcome p {
    font-size: 14px;
    line-height: 1.6;
}

.support-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.support-msg-user {
    align-self: flex-end;
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.support-msg-admin {
    align-self: flex-start;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.support-msg-text {
    word-break: break-word;
}

.support-msg-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.support-input-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.support-input {
    flex: 1;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: var(--transition);
}

.support-input:focus {
    border-color: var(--accent);
}

.support-input::placeholder {
    color: var(--text-muted);
}

.support-send-btn {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.support-send-btn:active {
    transform: scale(0.95);
}

.support-attach-btn {
    width: 48px;
    height: 48px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.support-attach-btn:active {
    transform: scale(0.95);
    color: var(--accent);
}

.support-file-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.support-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
}

.support-media-img {
    max-width: 100%;
    max-height: 240px;
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    object-fit: cover;
}

.support-media-video {
    max-width: 100%;
    max-height: 240px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.support-media-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 8px;
    color: var(--accent);
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 4px;
}

.media-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-fullscreen-img {
    max-width: 85%;
    max-height: 70%;
    object-fit: contain;
    border-radius: 8px;
}

.media-fullscreen-wrap {
    position: relative;
    display: inline-block;
}

.media-fullscreen-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.support-close-btn {
    margin-top: 16px;
    width: 100%;
}

/* Extend range slider */
.extend-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-card);
    outline: none;
    cursor: pointer;
}
.extend-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.15s;
}
.extend-range::-webkit-slider-thumb:active {
    transform: scale(1.15);
}
.extend-range::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
}
.extend-range::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-card);
}

/* ========================================
   Tariff Configurator
   ======================================== */
.cfg-header {
    text-align: center;
    padding: 8px 0 20px;
}
.cfg-header .cfg-icon {
    font-size: 44px;
    margin-bottom: 8px;
}
.cfg-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}
.cfg-header .cfg-duration {
    font-size: 13px;
    color: var(--text-muted);
}
.cfg-section {
    margin-bottom: 16px;
}
.cfg-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cfg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cfg-chip {
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.cfg-chip:active {
    transform: scale(0.95);
}
.cfg-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 2px 12px var(--accent-glow, rgba(0,122,255,0.3));
}
.cfg-breakdown {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.cfg-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}
.cfg-row.total {
    border-top: 1px solid var(--border);
    margin-top: 6px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.cfg-row .cfg-val {
    font-weight: 600;
}
.cfg-row.total .cfg-val {
    color: var(--accent);
}
.cfg-price-anim {
    transition: opacity 0.15s ease;
}


/* ========================================
   Nodes Status
   ======================================== */
.nodes-header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(14, 14, 24, 0.7);
    border-radius: 100px;
    border: 1px solid var(--glow-border-subtle);
    transition: var(--transition);
    max-width: 55%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.nodes-header-btn:active {
    transform: scale(0.97);
    background: var(--bg-elevated);
    border-color: var(--glow-border);
}
.nodes-header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 0;
}
.nodes-header-sub {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
}
.nodes-header-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.nodes-header-arrow {
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.nodes-banner {
    margin: 0 20px 16px;
    padding: 14px 16px;
    background: rgba(14, 14, 24, 0.7);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow-glow);
}
.nodes-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--success) 0%, #00b85c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}
.nodes-banner-text {
    flex: 1;
    min-width: 0;
}
.nodes-banner-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nodes-banner-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
.nodes-banner-btn {
    padding: 6px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}
.nodes-banner-btn:active {
    transform: scale(0.97);
    background: var(--bg-card);
}

.node-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-xs);
}
.node-list-item + .node-list-item {
    margin-top: 8px;
}
.node-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.node-status-dot.online { background: var(--success); box-shadow: 0 0 8px var(--success-glow); }
.node-status-dot.warning { background: var(--warning); box-shadow: 0 0 8px rgba(245, 158, 11, 0.3); }
.node-status-dot.offline { background: var(--danger); }
.node-status-dot.disabled { background: var(--text-muted); }
.node-info {
    flex: 1;
    min-width: 0;
}
.node-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.node-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.node-meta.online { color: var(--success); }
.node-meta.warning { color: var(--warning); }
.node-meta.offline { color: var(--danger); }
.node-online-badge {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0, 210, 106, 0.1);
    color: var(--success);
    flex-shrink: 0;
}

/* ========================================
   Skeleton Loading
   ======================================== */
@keyframes shimmer {
    to { background-position: -200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-input) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-xs);
}
.skeleton-card {
    height: 180px;
    border-radius: var(--radius);
    margin: 0 16px 16px;
}
.skeleton-stat {
    height: 48px;
    width: 60px;
    border-radius: var(--radius-xs);
}
.skeleton-row {
    display: flex;
    justify-content: space-around;
    padding: 16px 20px;
}

/* ========================================
   Sheet Content Transition
   ======================================== */
.sheet-body.fade-out {
    opacity: 0;
    transition: opacity 75ms ease-out;
}
.sheet-body.fade-in {
    opacity: 1;
    transition: opacity 75ms ease-in;
}

/* ========================================
   Extracted Inline Styles
   ======================================== */
.center-pad { text-align: center; padding: 10px 0 20px; }
.icon-48 { font-size: 48px; margin-bottom: 12px; }
.icon-40 { font-size: 40px; margin-bottom: 12px; }
.sheet-subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.sheet-desc-sm { color: var(--text-secondary); margin-bottom: 16px; font-size: 13px; }
.sheet-desc-center { color: var(--text-secondary); margin-bottom: 20px; text-align: center; }
.info-block { background: var(--bg-elevated); padding: 16px; border-radius: 12px; margin-bottom: 16px; }
.info-block-sm { background: var(--bg-elevated); padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; }
.info-row { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-secondary); }
.info-value { font-weight: 600; }
.info-value-success { font-weight: 600; color: var(--success); }
.info-value-warning { font-weight: 600; color: var(--warning); }
.info-value-lg { font-size: 18px; font-weight: 700; }
.info-value-xl { font-size: 24px; font-weight: 700; color: var(--success); }
.info-list { background: rgba(20, 20, 32, 0.7); border-radius: 14px; overflow: hidden; border: 1px solid var(--glow-border-subtle); }
.mt-20 { margin-top: 20px; }
.mt-12 { margin-top: 12px; }
.mt-10 { margin-top: 10px; }
.flex-gap-8 { display: flex; gap: 8px; margin-bottom: 20px; }
.flex-gap-10 { display: flex; gap: 10px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.btn-back { margin-top: 12px; width: 100%; opacity: 0.7; }
.btn-success { background: linear-gradient(135deg, var(--success) 0%, #00b85c 100%); box-shadow: 0 4px 16px var(--success-glow); }
.btn-danger-bg { background: var(--danger, #ef4444); }
.step-circle { min-width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.step-circle-active { background: var(--accent); color: white; }
.step-circle-inactive { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-muted); }
.step-row { display: flex; align-items: flex-start; gap: 14px; }
.step-title { font-weight: 600; margin-bottom: 4px; }
.step-desc { color: var(--text-secondary); font-size: 13px; margin-bottom: 10px; }
.step-content { flex: 1; }
.steps-container { display: flex; flex-direction: column; gap: 16px; padding: 8px 0; }
.history-item { display: flex; justify-content: space-between; padding: 12px; background: var(--bg-elevated); border-radius: 8px; }
.history-label { font-weight: 500; }
.history-date { font-size: 12px; color: var(--text-muted); }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.referral-count { font-size: 24px; font-weight: 700; color: var(--accent); }
.referral-count-label { font-size: 13px; color: var(--text-muted); }
.app-icon-plain { background: var(--bg-card); border: 1px solid var(--border); }
.app-icon-plain i { color: var(--text); font-size: 26px; }
.confirm-icon { font-size: 48px; color: var(--warning, #f59e0b); margin-bottom: 16px; }
.confirm-text { margin-bottom: 20px; }
.text-center { text-align: center; }
.pad-16 { padding: 16px 0; }
.pad-8 { padding: 8px 0; }
.tv-input { width: 100%; padding: 14px 16px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 24px; text-align: center; letter-spacing: 8px; text-transform: uppercase; margin-bottom: 16px; }
.extend-info-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.extend-price-lg { font-size: 22px; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.extend-price-unit { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.extend-slider-row { margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.extend-slider-label { color: var(--text-secondary); font-size: 13px; }
.extend-slider-value { font-weight: 700; font-size: 16px; }
.extend-range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.extend-total-row { display: flex; justify-content: space-between; font-size: 14px; }
.extend-total-value { font-weight: 700; font-size: 18px; }
.extend-period-value { font-weight: 500; }
.warning-text { color: var(--warning); font-size: 13px; margin-bottom: 12px; }
.no-webapp-screen { display: flex; align-items: center; justify-content: center; height: 100vh; text-align: center; padding: 20px; color: #888; }
.menu-no-pad { padding: 0; }
.device-item { display: flex; align-items: center; justify-content: space-between; }
.device-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.device-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.device-delete-btn { background: none; border: none; color: var(--text-muted); padding: 8px; cursor: pointer; font-size: 16px; flex-shrink: 0; }
.payment-desc { color: var(--text-secondary); margin-bottom: 16px; font-size: 14px; }
.payment-choose { color: var(--text-secondary); margin-bottom: 16px; font-size: 13px; }
.tariff-name-lg { margin-bottom: 8px; }
.balance-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.balance-label { color: var(--text-muted); }
.balance-value { font-weight: 600; }
.chevron-muted { color: var(--text-muted); font-size: 12px; }
.lang-label { color: var(--text-muted); font-size: 13px; margin-right: 8px; }

/* ========================================
   Traffic Bar
   ======================================== */
.sub-traffic { margin-top: 8px; }
.traffic-bar-wrap { padding: 0; }
.traffic-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.traffic-label i { margin-right: 4px; font-size: 10px; }
.traffic-value { font-weight: 600; color: var(--text-secondary); font-size: 12px; }
.traffic-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.traffic-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.traffic-fill.traffic-ok { background: linear-gradient(90deg, var(--success), #00f5a0); }
.traffic-fill.traffic-warning { background: linear-gradient(90deg, var(--warning), #ffda44); }
.traffic-fill.traffic-danger { background: linear-gradient(90deg, var(--danger), #ff6b81); }

/* ========================================
   Coupon
   ======================================== */
.coupon-row { margin: 12px 0; }
.coupon-input-row { display: flex; gap: 8px; align-items: center; }
.coupon-input { flex: 1; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 10px 14px; color: var(--text); font-size: 14px; outline: none; transition: border-color var(--transition); }
.coupon-input:focus { border-color: var(--accent); }
.coupon-input::placeholder { color: var(--text-muted); }
.coupon-apply-btn { width: 42px; height: 42px; border-radius: var(--radius-xs); background: var(--accent); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: opacity var(--transition); }
.coupon-apply-btn:active { opacity: 0.7; }
.coupon-success { margin-top: 8px; font-size: 13px; color: var(--success); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.coupon-error { margin-top: 8px; font-size: 13px; color: var(--danger); display: flex; align-items: center; gap: 6px; }
.coupon-loading { margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.coupon-old-price { text-decoration: line-through; color: var(--text-muted); }
.coupon-bonus { background: var(--success); color: #000; font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }

/* ========================================
   Tab Navigation
   ======================================== */
.tab-page { display: none; padding-bottom: 72px; min-height: 100vh; position: relative; }
.tab-page.active { display: block; animation: tabFadeIn 0.2s ease; }
@keyframes tabFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.tab-page-header { padding: calc(var(--safe-top, 0px) + 16px) 20px 12px; }
.tab-page-header h1 { font-size: 28px; font-weight: 800; color: var(--text); }
.tab-content { padding: 0 16px; }

.tab-bar { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: rgba(10, 10, 18, 0.88); border-top: 1px solid var(--border-glow); padding: 6px 0 calc(var(--safe-bottom, 0px) + 6px); z-index: 50; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); will-change: transform; }
.tab-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; background: none; border: none; color: var(--text-muted); font-size: 10px; font-family: inherit; cursor: pointer; transition: color var(--transition); }
.tab-bar-item i { font-size: 20px; transition: transform var(--transition); }
.tab-bar-item.active { color: var(--accent); }
.tab-bar-item.active i { transform: scale(1.1); }

/* Wallet */
.wallet-balance-card { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%); border-radius: var(--radius); padding: 28px 24px; text-align: center; margin-bottom: 16px; box-shadow: 0 8px 32px rgba(139, 92, 246, 0.25); }
.wallet-balance-label { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.wallet-balance-value { font-size: 36px; font-weight: 800; color: #fff; margin-bottom: 16px; }
.wallet-balance-card .btn-primary { background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.3); }

/* Profile card */
.profile-card { text-align: center; padding: 24px 0 20px; }
.profile-card .profile-avatar-lg { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 32px; color: #fff; box-shadow: 0 4px 24px rgba(139, 92, 246, 0.35); overflow: hidden; }
.profile-avatar-lg { overflow: hidden; }
.profile-card .profile-name { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.profile-card .profile-username { font-size: 14px; color: var(--text-muted); }

/* Profile info list in tab */
#tab-profile .tab-content { display: flex; flex-direction: column; gap: 16px; }
#tab-profile .profile-card { margin-bottom: 0; }
#tab-profile .footer { margin-top: 8px; }

/* Tariffs inline (not in sheet) */
.tariffs-grouped { padding: 0; }

/* Servers tab */
.server-best-card { display: flex; align-items: center; gap: 14px; background: rgba(139, 92, 246, 0.08); border: 1px solid rgba(139, 92, 246, 0.2); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 20px rgba(139, 92, 246, 0.06); }
.server-best-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.server-best-label { font-size: 12px; color: var(--text-muted); }
.server-best-name { font-size: 16px; font-weight: 700; color: var(--text); margin-top: 2px; }
.server-stats-row { display: flex; gap: 12px; margin-bottom: 16px; }
.server-stat { flex: 1; background: var(--bg-elevated); border-radius: var(--radius); padding: 16px; text-align: center; }
.server-stat-value { display: block; font-size: 24px; font-weight: 800; color: var(--text); }
.server-stat-label { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.servers-list { background: var(--bg-elevated); border-radius: var(--radius); overflow: hidden; }
.server-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.server-item:last-child { border-bottom: none; }
.server-name { font-size: 15px; font-weight: 600; color: var(--text); }
.server-load { font-size: 12px; margin-top: 2px; }
.server-load.online { color: var(--success); }
.server-load.warning { color: var(--warning); }
.server-load.offline { color: var(--danger); }
