/* ═══════════════════════════════════════════
   BoS VPN — Dashboard Styles 2026
   Extends style.css design system
   ═══════════════════════════════════════════ */

/* ── Dashboard Variables (extend base) ── */
:root {
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --sidebar-w: 264px;
}

/* ── Body: hidden until JS auth check ── */
body {
    visibility: hidden;
}

/* ── Dashboard Layout ── */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
        position: sticky;
        height: 100vh;
    }
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 992px) {
    .sidebar-overlay {
        display: none;
    }
}

/* ── Sidebar Logo ── */
.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    color: var(--text);
    margin-bottom: 36px;
    padding-left: 4px;
    letter-spacing: -0.01em;
}

.logo-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

/* ── Navigation ── */
.nav-section {
    margin-bottom: 24px;
}

.nav-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 12px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    cursor: pointer;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(248, 250, 252, 0.04);
    color: var(--text);
}

.nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(236, 179, 54, 0.18);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    flex-shrink: 0;
}

/* ── User Card (sidebar bottom) ── */
.user-card {
    margin-top: auto;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    padding: 16px;
    border: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #0F172A;
    flex-shrink: 0;
}

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

.user-email {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--danger);
    color: var(--danger);
}

.logout-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

/* ── Main Content Area ── */
.main {
    flex: 1;
    padding: 20px;
    margin-left: 0;
    max-width: 1100px;
}

@media (min-width: 768px) {
    .main {
        padding: 32px 40px;
    }
}

@media (min-width: 992px) {
    .main {
        margin-left: var(--sidebar-w);
    }
}

/* ── Mobile Header ── */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 992px) {
    .mobile-header {
        display: none;
    }
}

.menu-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.mobile-logo .logo-badge {
    width: 28px;
    height: 28px;
}

/* ── Page Header ── */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 32px;
    }
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
}

/* ── Tab Content ── */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 36px;
}

@media (min-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── Stat Card ── */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .stat-card {
        padding: 24px;
    }
}

.stat-card:hover {
    border-color: rgba(148, 163, 184, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.5;
}

@media (min-width: 768px) {
    .stat-icon svg {
        width: 24px;
        height: 24px;
    }
}

.stat-icon.success {
    background: rgba(34, 197, 94, 0.1);
}

.stat-icon.success svg {
    stroke: var(--success);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
}

.stat-icon.warning svg {
    stroke: var(--warning);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .stat-value {
        font-size: 32px;
    }
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.stat-badge.active {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.stat-badge.warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.stat-badge.danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

/* ── Mini Traffic Bar ── */
.stat-mini-bar {
    height: 6px;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 3px;
    margin-top: 12px;
    overflow: hidden;
}

.stat-mini-bar .fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.stat-mini-bar .fill.accent {
    background: linear-gradient(90deg, var(--accent), #f0be4d);
}

.stat-mini-bar .fill.success {
    background: linear-gradient(90deg, var(--success), #16a34a);
}

.stat-mini-bar .fill.warning {
    background: linear-gradient(90deg, var(--warning), #d97706);
}

.stat-mini-bar .fill.danger {
    background: linear-gradient(90deg, var(--danger), #dc2626);
}

/* ── Device Dots ── */
.device-dots {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.device-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.1);
    transition: var(--transition);
}

.device-dot.used {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.device-dot.available {
    border: 1.5px dashed rgba(148, 163, 184, 0.2);
    background: transparent;
}

/* ── Pulse Dot (VPN status) ── */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.pulse-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulseDot 2s ease-in-out infinite;
}

.pulse-dot.offline {
    background: var(--danger);
    opacity: 0.7;
}

@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 4px var(--success); }
    50% { box-shadow: 0 0 14px var(--success), 0 0 20px rgba(34, 197, 94, 0.3); }
}

/* ── Section ── */
.section {
    margin-bottom: 36px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 20px;
    }
}

/* ── Subscription Card ── */
.subscription-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .subscription-card {
        padding: 32px;
    }
}

.subscription-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(236, 179, 54, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.sub-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
}

.sub-plan {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sub-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .sub-icon {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }
}

.sub-icon svg {
    width: 26px;
    height: 26px;
    fill: #0F172A;
}

@media (min-width: 768px) {
    .sub-icon svg {
        width: 30px;
        height: 30px;
    }
}

.sub-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .sub-name {
        font-size: 26px;
    }
}

.sub-type {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.sub-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.sub-status svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.sub-status.expired {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.sub-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    position: relative;
}

@media (min-width: 768px) {
    .sub-details {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

.sub-detail {
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-sm);
    padding: 16px;
}

@media (min-width: 768px) {
    .sub-detail {
        padding: 20px;
    }
}

.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.detail-value {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    .detail-value {
        font-size: 22px;
    }
}

.detail-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Progress Bar ── */
.progress-bar {
    height: 8px;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 4px;
    margin-top: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #f0be4d);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* ── Devices Grid ── */
.devices-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    .devices-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .devices-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Device Card ── */
.device-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .device-card {
        padding: 20px;
        gap: 16px;
    }
}

.device-card:hover {
    border-color: rgba(148, 163, 184, 0.15);
}

.device-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.device-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--text-secondary);
}

@media (min-width: 768px) {
    .device-icon svg {
        width: 24px;
        height: 24px;
    }
}

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

.device-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .device-name {
        font-size: 15px;
    }
}

.device-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.device-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.device-status.offline {
    background: var(--text-muted);
    box-shadow: none;
    opacity: 0.4;
}

.device-remove {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.device-remove:hover {
    opacity: 1;
}

.device-remove svg {
    width: 18px;
    height: 18px;
    stroke: var(--danger);
    fill: none;
    stroke-width: 1.5;
}

/* ── Buttons ── */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
}

.btn:hover {
    background: rgba(248, 250, 252, 0.04);
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

.btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.btn-primary {
    background: var(--accent);
    border: none;
    color: #0F172A;
    font-weight: 600;
}

.btn-primary:hover {
    background: #f0be4d;
    box-shadow: 0 8px 24px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-primary svg {
    stroke: #0F172A;
}

.btn-danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--danger);
}

/* ── Servers Grid ── */
.servers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .servers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .servers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Server Card ── */
.server-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    transition: var(--transition);
    cursor: pointer;
}

.server-card:hover {
    border-color: rgba(148, 163, 184, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.server-card.premium {
    border-color: rgba(245, 158, 11, 0.2);
}

.server-card.premium:hover {
    border-color: rgba(245, 158, 11, 0.4);
}

.server-card.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.server-card.selected::after {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%230F172A' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.server-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.server-flag {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
    flex-shrink: 0;
}

.server-flag img {
    width: 28px;
    height: 21px;
    object-fit: cover;
    border-radius: 3px;
}

.server-name {
    font-weight: 600;
    font-size: 14px;
}

.server-location {
    font-size: 12px;
    color: var(--text-secondary);
}

.server-stats {
    display: flex;
    gap: 16px;
}

.server-stat {
    font-size: 12px;
    color: var(--text-secondary);
}

.server-stat span {
    color: var(--text);
    font-weight: 500;
}

.server-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    margin-top: 10px;
}

.server-badge.free {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.server-badge.premium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* Premium server lock */
.server-card.locked {
    opacity: 0.7;
    cursor: pointer;
    position: relative;
}

.server-card.locked:hover {
    opacity: 0.85;
}

.server-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.server-lock-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.server-lock-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--warning);
    fill: none;
    stroke-width: 2;
}

/* ── Payment History ── */
.payment-history {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.payment-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 15px;
}

.payment-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 24px;
}

.payment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}

.payment-item:last-child {
    border-bottom: none;
}

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

.payment-desc {
    font-size: 14px;
    font-weight: 500;
}

.payment-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.payment-amount {
    font-size: 16px;
    font-weight: 600;
    color: var(--success);
}

.payment-status {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

/* ── Profile Form ── */
.profile-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 24px;
}

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

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

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ── Settings ── */
.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

.settings-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.settings-item-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ── Toggle Switch ── */
.toggle {
    width: 48px;
    height: 26px;
    border-radius: var(--radius-full);
    background: rgba(148, 163, 184, 0.15);
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle.active {
    background: var(--accent);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle.active::after {
    left: 25px;
}

/* ── Support Card ── */
.support-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.support-card:hover {
    border-color: rgba(148, 163, 184, 0.15);
    transform: translateY(-2px);
}

.support-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.support-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.5;
}

.support-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.support-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ── Plans Grid (Payment Tab) ── */
.plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 36px;
}

@media (min-width: 600px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .plans-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Plan Card ── */
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    transition: var(--transition);
}

.plan-card:hover {
    border-color: rgba(148, 163, 184, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.plan-card.popular {
    border-color: var(--accent);
}

.plan-card.popular::before {
    content: 'Популярный';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: #0F172A;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.plan-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.plan-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.plan-price {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.plan-price span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.plan-features {
    list-style: none;
    margin: 24px 0;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.plan-features li svg {
    width: 16px;
    height: 16px;
    stroke: var(--success);
    fill: none;
    stroke-width: 2.5;
    flex-shrink: 0;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

@media (min-width: 768px) {
    .empty-state {
        padding: 64px 20px;
    }
}

.empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 1.5;
}

.empty-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ── Loading / Spinner ── */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.spinner {
    width: 36px;
    height: 36px;
    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); }
}

/* ── Skeleton Loading ── */
.skeleton {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(236, 179, 54, 0.03), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skeleton-line {
    height: 14px;
    background: rgba(148, 163, 184, 0.06);
    border-radius: 8px;
    margin-bottom: 10px;
}

.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.thick { height: 32px; margin-bottom: 14px; }

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.06);
    margin-bottom: 16px;
}

/* ── Toast Notification ── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
    backdrop-filter: blur(12px);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    backdrop-filter: blur(12px);
}

.toast.info {
    border-color: rgba(148, 163, 184, 0.2);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
}

/* ── Modal (Delete Device) ── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 420px;
    width: 100%;
    transform: translateY(12px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

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

.modal-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ── Tariff Modal (Premium Servers) ── */
.tariff-modal .modal-content {
    max-width: 720px;
    padding: 36px;
}

.tariff-modal .modal-title {
    font-size: 22px;
    text-align: center;
    margin-bottom: 6px;
}

.tariff-modal .modal-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}

.tariff-plans {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .tariff-plans {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tariff-plan {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.tariff-plan:hover {
    border-color: rgba(148, 163, 184, 0.15);
    transform: translateY(-4px);
}

.tariff-plan.recommended {
    border-color: var(--accent);
}

.tariff-plan.recommended::before {
    content: 'Популярный';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 12px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: #0F172A;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.tariff-plan-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.tariff-plan-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tariff-plan-price {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.tariff-plan-price span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.tariff-plan-features {
    list-style: none;
    text-align: left;
    margin: 20px 0;
}

.tariff-plan-features li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tariff-plan-features li svg {
    width: 14px;
    height: 14px;
    stroke: var(--success);
    fill: none;
    stroke-width: 2.5;
    flex-shrink: 0;
}

.tariff-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.tariff-close:hover {
    opacity: 1;
}

.tariff-close svg {
    width: 24px;
    height: 24px;
    stroke: var(--text);
    fill: none;
    stroke-width: 1.5;
}

/* ── Loading text pulse ── */
@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-text {
    animation: textPulse 1.5s infinite;
}

/* ── CSS Variables used by JS inline styles ── */
/* These must match what dashboard.js expects */
:root {
    --card: var(--bg-card);
    --card-b: var(--bg-surface);
    --text-s: var(--text-secondary);
    --text-m: var(--text-muted);
    --accent-d: #C9962E;
    --accent-g: var(--accent-glow);
}
