/* InstantNode Hosting Panel - Premium Dark Theme */
/* Complete CSS for hosting control panel with graphs, tables, forms, and more */

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}
.code-gutter {
    white-space: pre;       /* <-- Zeilenumbrüche respektieren */
    display: block;         /* sicherstellen, dass Text blockweise gerendert wird */
}

:root {
    /* Color Palette */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;
    --bg-card: rgba(24, 24, 27, 0.6);
    --bg-card-hover: rgba(24, 24, 27, 0.8);
    
    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.2);
    
    /* Text Colors */
    --text-primary: #f9fafb;
    --text-secondary: #e5e7eb;
    --text-tertiary: #d1d5db;
    --text-muted: #9ca3af;
    --text-subtle: #6b7280;
    --text-disabled: #4b5563;
    
    /* Brand Colors */
    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --accent-tertiary: #c084fc;
    
    /* Status Colors */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 4px 40px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 8px 60px rgba(0, 0, 0, 0.4);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-tertiary);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-secondary) var(--bg-tertiary);
    overflow-x: hidden;
}

/* ============================================
   LAYOUT & STRUCTURE
   ============================================ */

.panel-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.panel-sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(17, 17, 19, 0.95) 0%, rgba(10, 10, 11, 0.95) 100%);
    border-right: 1px solid var(--border-subtle);
    padding: 1.5rem;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.panel-sidebar::-webkit-scrollbar { width: 6px; }
.panel-sidebar::-webkit-scrollbar-track { background: transparent; }
.panel-sidebar::-webkit-scrollbar-thumb { 
    background: var(--border-medium); 
    border-radius: 3px; 
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.1) 0%, rgba(167, 139, 250, 0.05) 100%);
    border: 1px solid var(--border-subtle);
}

.sidebar-brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 700;
}

.sidebar-brand-text h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.sidebar-brand-text p {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.sidebar-nav { margin-top: 1rem; }

.sidebar-nav-section {
    margin-bottom: 2rem;
}

.sidebar-nav-title {
    font-size: 0.7rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: all var(--transition-base);
    position: relative;
}

.sidebar-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    transform: translateX(4px);
}

.sidebar-nav-item.active {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.15) 0%, rgba(167, 139, 250, 0.08) 100%);
    color: var(--accent-secondary);
    border: 1px solid rgba(129, 140, 248, 0.25);
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.1);
}

.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 0 2px 2px 0;
}

.sidebar-nav-badge {
    margin-left: auto;
    background: var(--error);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

/* Main Content Area */
.panel-main {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

/* Top Header */
.panel-header {
    background: rgba(17, 17, 19, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-search {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.header-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem 0.75rem 3rem;
    color: var(--text-primary);
    font-size: 0.925rem;
    transition: all var(--transition-base);
}

.header-search input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.header-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-icon-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.header-icon-btn.has-notification::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

.header-user:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-medium);
}

.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
}

.header-user-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-user-info p {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

/* Content Container */
.panel-content {
    padding: 2rem;
}

.content-header {
    margin-bottom: 2rem;
}

.content-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent-primary) 50%, var(--accent-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ============================================
   CARDS & PANELS
   ============================================ */

.card {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(17, 17, 19, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i {
    color: var(--accent-primary);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-body {
    color: var(--text-tertiary);
}

.panel-sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Volle Höhe */
    overflow-y: auto;
    transition: transform var(--transition-base);
}

/* Sidebar Nav nimmt den verbleibenden Platz ein */
.sidebar-nav {
    flex: 1 1 auto; /* wächst, um den Platz einzunehmen */
    overflow-y: auto;
      -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none; 
}

/* Footer Bereich immer unten */
.sidebar-footer {
    margin-top: auto; /* schiebt den Footer nach unten */
    padding: 1rem;
}


.card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Stats Cards */
.stat-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(17, 17, 19, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    
    height: 150px;
    border-radius: 50%;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.15) 0%, rgba(167, 139, 250, 0.08) 100%);
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--error);
}

.stat-change i {
    font-size: 0.75rem;
}

/* ============================================
   GAME SERVER DETAIL
   ============================================ */

.gs-page {
    display: block;
}

.gs-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gs-hero {
    background: radial-gradient(circle at 15% 15%, rgba(129, 140, 248, 0.18), transparent 55%),
        linear-gradient(145deg, rgba(18, 19, 25, 0.95) 0%, rgba(10, 10, 12, 0.9) 100%);
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gs-hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.gs-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gs-title-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(129, 140, 248, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent-secondary);
    box-shadow: inset 0 0 20px rgba(129, 140, 248, 0.2);
}

.gs-title-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.gs-subtitle {
    color: var(--text-muted);
    margin: 0;
}

.gs-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.gs-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    background: rgba(255, 255, 255, 0.06);
}

.gs-badge i {
    font-size: 0.45rem;
}

.gs-status-running {
    color: #6ee7b7;
    border-color: rgba(46, 204, 113, 0.4);
    background: rgba(46, 204, 113, 0.12);
}

.gs-status-stopped {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.12);
}

.gs-status-installing,
.gs-status-starting {
    color: #fde68a;
    border-color: rgba(250, 204, 21, 0.4);
    background: rgba(250, 204, 21, 0.12);
}

.gs-status-suspended,
.gs-status-error,
.gs-status-crashed {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.12);
}

.gs-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
}

.gs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
}

.gs-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.gs-kpi {
    background: linear-gradient(145deg, rgba(18, 18, 22, 0.95), rgba(10, 10, 12, 0.9));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
    min-width: 0;
    box-shadow: var(--shadow-sm);
}

.gs-kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-subtle);
    margin-bottom: 0.35rem;
}

.gs-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    word-break: break-word;
}

.gs-kpi-sub {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gs-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.gs-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gs-card {
    position: relative;
}

.gs-console-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    align-self: stretch;
}

.gs-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.gs-card-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.gs-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gs-console-output {
    flex: 1;
    height: auto;
    min-height: 280px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(0, 0, 0, 0.45);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
}

.gs-console-form {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.gs-console-input {
    flex: 1;
}

.gs-meter-list {
    display: grid;
    gap: 0.85rem;
}

.gs-meter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.gs-meter-value {
    color: var(--text-muted);
    font-weight: 600;
}

.gs-meter-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-top: 0.45rem;
}

.gs-meter-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(129, 140, 248, 0.85), rgba(167, 139, 250, 0.85));
}

.gs-meter-fill-alt {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.85), rgba(56, 189, 248, 0.85));
}

.gs-info-list {
    display: grid;
    gap: 0.75rem;
}

.gs-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.gs-info-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.gs-info-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.gs-info-value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
}

.gs-billing-action {
    margin-top: 1rem;
}

@media (max-width: 1100px) {
    .gs-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .gs-hero {
        padding: 1.25rem;
    }

    .gs-title-text {
        font-size: 1.5rem;
    }

    .gs-console-output {
        min-height: 240px;
    }
}

@media (max-width: 540px) {
    .gs-console-output {
        min-height: 200px;
    }

    .gs-actions {
        padding: 0.65rem;
    }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.925rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 4px 14px rgba(129, 140, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(129, 140, 248, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-strong);
}

/* Store selection states */
.js-game-card.active,
.js-egg-card.active,
.js-package-card.selected {
    border: 1px solid rgba(129, 140, 248, 0.6);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.12) 0%, rgba(167, 139, 250, 0.1) 100%);
}

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-danger {
    background: var(--error);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

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

.btn:disabled:hover {
    transform: none;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-label-required::after {
    content: '*';
    color: var(--error);
    margin-left: 0.25rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.925rem;
    font-family: inherit;
    transition: all var(--transition-base);
}

.form-select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) 50%,
        calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.75rem;
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

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

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin-top: 0.5rem;
}

.form-text {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-error {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--error);
}

.form-input.success,
.form-select.success,
.form-textarea.success {
    border-color: var(--success);
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-input {
    border-radius: 0;
    border-right: none;
}

.input-group .form-input:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-input:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    border-right: 1px solid var(--border-subtle);
}

.input-group-addon {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.input-group-addon:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-right: none;
}

.input-group-addon:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    border-left: none;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-medium);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: all var(--transition-base);
}

.form-check-input:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-label {
    color: var(--text-tertiary);
    font-size: 0.925rem;
    cursor: pointer;
    user-select: none;
}

/* Toggle Switch */
.form-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.form-switch-input {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.form-switch-input::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.form-switch-input.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-switch-input.active::after {
    left: 24px;
    background: #fff;
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(17, 17, 19, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
}

.table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table td {
    padding: 1.25rem 1.5rem;
    color: var(--text-tertiary);
    font-size: 0.925rem;
}

.table-striped tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.table-action-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
}

.table-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

/* ============================================
   BADGES & LABELS
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-default {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--text-disabled); }
.status-dot.warning { background: var(--warning); }
.status-dot.error { background: var(--error); }

/* ============================================
   PROGRESS BARS
   ============================================ */

.progress {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

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

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.progress-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Circular Progress */
.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 8;
}

.progress-circle-bar {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.925rem;
}

.alert-message {
    font-size: 0.875rem;
    opacity: 0.9;
}

.alert-success {
    background: var(--success-bg);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.alert-warning {
    background: var(--warning-bg);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.alert-error {
    background: var(--error-bg);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.alert-info {
    background: var(--info-bg);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--info);
}

.alert-close {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-base);
    padding: 0;
    font-size: 1.25rem;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.toast {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(17, 17, 19, 0.95) 100%);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   MODALS & DIALOGS
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================
   ACTIVITY LOADING MODAL
   ============================================ */

body.activity-loading-lock {
    overflow: hidden;
}

.activity-loading-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.activity-loading-modal.is-visible {
    display: flex;
}

.activity-loading-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.78);
    backdrop-filter: blur(6px);
}

.activity-loading-dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-medium);
    background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.activity-loading-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem;
    border-radius: 999px;
    border: 4px solid rgba(255, 255, 255, 0.16);
    border-top-color: var(--accent-primary);
    animation: activitySpin 0.9s linear infinite;
}

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

.activity-loading-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
}

.activity-loading-message {
    margin: 0.6rem 0 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.activity-loading-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.activity-loading-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.35s ease;
}

.activity-loading-percent {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   TABS
   ============================================ */

.tabs {
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 2rem;
}

.tabs-nav {
    display: flex;
    gap: 0.5rem;
}

.tab-item {
    padding: 0.875rem 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-base);
    font-weight: 500;
    font-size: 0.925rem;
    position: relative;
}

.tab-item:hover {
    color: var(--text-secondary);
}

.tab-item.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ============================================
   DROPDOWNS
   ============================================ */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-medium);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    z-index: 1000;
    display: none;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    font-size: 0.925rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.5rem 0;
}

/* ============================================
   CHARTS & GRAPHS
   ============================================ */

.chart-container {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(17, 17, 19, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Simple Bar Chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 250px;
    padding: 1rem 0;
}

.bar-chart-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.bar {
    width: 100%;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--transition-base);
    position: relative;
}

.bar:hover {
    opacity: 0.8;
    transform: scaleY(1.02);
}

.bar-value {
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.bar-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Line Chart Grid */
.line-chart {
    position: relative;
    height: 300px;
    padding: 1rem;
}

.chart-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.grid-line {
    height: 1px;
    background: var(--border-subtle);
    position: relative;
}

.grid-label {
    position: absolute;
    left: -3rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-subtle);
}

/* Donut Chart */
.donut-chart {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.donut-chart-visual {
    position: relative;
    width: 200px;
    height: 200px;
}

.donut-chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-chart-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.donut-chart-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.donut-chart-legend {
    flex: 1;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.donut-legend-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.donut-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.donut-legend-label {
    color: var(--text-tertiary);
    font-size: 0.925rem;
}

.donut-legend-value {
    font-weight: 700;
    color: var(--text-primary);
}

.donut-legend-percent {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* ============================================
   LISTS
   ============================================ */

.list-group {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(17, 17, 19, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.list-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-base);
}

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

.list-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.list-item-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.15) 0%, rgba(167, 139, 250, 0.08) 100%);
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: var(--accent-secondary);
    flex-shrink: 0;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.list-item-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.list-item-action {
    color: var(--text-subtle);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color var(--transition-base);
}

.list-item-action:hover {
    color: var(--text-primary);
}

/* ============================================
   CONTAINERS
   ============================================ */

.container-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 1.5rem;
}

.container-card {
    padding: 0;
    position: relative;
    overflow: hidden;
}

.container-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(520px 220px at 90% -20%, rgba(129, 140, 248, 0.2), transparent 60%);
    opacity: 0.8;
    pointer-events: none;
}

.container-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.12) 0%, rgba(167, 139, 250, 0.08) 100%);
    position: relative;
    z-index: 1;
}

.container-card__title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.container-card__icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(129, 140, 248, 0.16);
    border: 1px solid rgba(129, 140, 248, 0.25);
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.container-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.container-card__badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.container-card__body {
    padding: 1.25rem 1.5rem;
    position: relative;
    z-index: 1;
}

.container-ip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
}

.container-ip__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.code-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.container-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.metric-card {
    padding: 0.85rem 0.75rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    text-align: center;
}

.metric-label {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.metric-label i {
    color: var(--accent-primary);
}

.metric-value {
    font-weight: 700;
    color: var(--text-primary);
}

.container-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(10, 10, 12, 0.6);
    position: relative;
    z-index: 1;
}

.container-cost__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

.container-cost__value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.container-cost__cycle {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 0.35rem;
}

.container-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.container-cycle-badge {
    text-transform: capitalize;
}

/* ============================================
   CONTAINER PURCHASE
   ============================================ */

.purchase-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.purchase-header .content-title i {
    color: var(--accent-primary);
    margin-right: 0.5rem;
}

.create-vps-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 2rem;
    align-items: start;
}

.config-column,
.billing-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.purchase-card {
    position: relative;
    overflow: hidden;
}

.purchase-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(520px 220px at 90% -20%, var(--purchase-glow), transparent 60%);
    opacity: 0.7;
    pointer-events: none;
}

.purchase-card > * {
    position: relative;
    z-index: 1;
}

.purchase-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.purchase-section-title i {
    color: var(--accent-primary);
}

.form-row-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.resource-sliders-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.resource-slider-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: all var(--transition-base);
}

.resource-slider-group:hover {
    border-color: var(--border-medium);
    box-shadow: 0 6px 24px rgba(129, 140, 248, 0.15);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.resource-label {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.resource-label i {
    color: var(--accent-primary);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.resource-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
}

.resource-value small {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.styled-slider {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    margin: 0.75rem 0;
}

.styled-slider::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--accent-primary) 0%, rgba(255, 255, 255, 0.08) 0%);
}

.styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: grab;
    margin-top: -6px;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 4px 16px rgba(129, 140, 248, 0.4);
}

.styled-slider::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.styled-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: grab;
    border: 2px solid var(--bg-secondary);
}

.styled-slider::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    background: var(--accent-primary);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.slider-labels span:nth-child(2) {
    color: var(--accent-primary);
    font-weight: 600;
}

.billing-cycle-options-vertical {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.billing-cycle-options-vertical .cycle-option input {
    display: none;
}

.billing-cycle-options-vertical .cycle-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    background: rgba(255, 255, 255, 0.02);
    gap: 0.3rem;
}

.billing-cycle-options-vertical .cycle-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
}

.billing-cycle-options-vertical .cycle-option input:checked + .cycle-card {
    border-color: rgba(129, 140, 248, 0.4);
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.12) 0%, rgba(167, 139, 250, 0.12) 100%);
    box-shadow: 0 6px 18px rgba(129, 140, 248, 0.2);
}

.billing-cycle-options-vertical .cycle-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.billing-cycle-options-vertical .cycle-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.billing-cycle-options-vertical .cycle-discount {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
}

.summary-details {
    margin-top: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    align-items: center;
    color: var(--text-secondary);
}

.summary-row.total {
    border-top: 1px solid var(--border-subtle);
    margin-top: 0.75rem;
    padding-top: 1rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.summary-row.total strong {
    color: var(--accent-primary);
    font-size: 1.4rem;
}

.voucher-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    position: relative;
}

.voucher-input {
    flex: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.voucher-input.valid {
    border-color: var(--success);
}

.voucher-input.invalid {
    border-color: var(--error);
}

#voucher-status {
    position: static;
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

#voucher-status.valid { color: var(--success); }
#voucher-status.invalid { color: var(--error); }
#voucher-status.loading { color: var(--text-secondary); }

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-item {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 500;
}

.page-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.page-item.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(129, 140, 248, 0.3);
}

.page-item:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-base);
}

.breadcrumb-item:hover {
    color: var(--text-primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--text-subtle);
}

/* ============================================
   TOOLTIPS
   ============================================ */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    background: rgba(17, 17, 19, 0.98);
    color: var(--text-primary);
    text-align: center;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-medium);
    position: absolute;
    z-index: 1001;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.8rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(17, 17, 19, 0.98);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ============================================
   LOADING STATES
   ============================================ */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.15) 0%, rgba(167, 139, 250, 0.08) 100%);
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-secondary);
    margin: 0 auto 1.5rem;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   UTILITIES
   ============================================ */

/* Text */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-info { color: var(--info); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

/* Spacing */
.m-0 { margin: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Borders */
.border { border: 1px solid var(--border-subtle); }
.border-top { border-top: 1px solid var(--border-subtle); }
.border-bottom { border-bottom: 1px solid var(--border-subtle); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

/* Misc */
.cursor-pointer { cursor: pointer; }
.user-select-none { user-select: none; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .create-vps-grid {
        grid-template-columns: 1fr;
    }

    .pricing-summary-card {
        position: static;
    }
}

@media (max-width: 900px) {
    .resource-sliders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .container-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .panel-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
    }
    
    .panel-sidebar.open {
        transform: translateX(0);
    }
    
    .panel-main {
        margin-left: 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .panel-content {
        padding: 1.5rem;
    }
    
    .panel-header {
        padding: 1rem;
    }
    
    .content-title {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .modal {
        margin: 1rem;
    }
    
    .donut-chart {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    :root {
        font-size: 14px;
    }
    
    .header-search {
        display: none;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .resource-sliders-grid {
        grid-template-columns: 1fr;
    }

    .container-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .container-card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .container-actions {
        width: 100%;
        justify-content: space-between;
    }

    .container-manage-btn {
        width: 100%;
        justify-content: center;
    }

}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .panel-sidebar,
    .panel-header,
    .no-print {
        display: none !important;
    }
    
    .panel-main {
        margin-left: 0;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card,
    .table-container {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}


/* ============================================
   MOBILE HEADER
   ============================================ */

.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1200;
    background: rgba(17,17,19,0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
}

.mobile-header .logo {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.mobile-header .hamburger {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Sidebar Overlay */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}


/* ============================================
   MOBILE RESPONSIVE LAYOUT
   ============================================ */

@media (max-width: 1024px) {

    .mobile-header {
        display: flex;
    }

    .panel-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        position: fixed;
        z-index: 1200;
    }

    .panel-sidebar.open {
        transform: translateX(0);
    }

    .panel-main {
        margin-left: 0;
    }

    .panel-header {
        display: none;
    }
}


/* ============================================
   MOBILE GRID FIXES
   ============================================ */

@media (max-width: 768px) {

    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
    }

    .card {
        padding: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .content-title {
        font-size: 1.4rem;
    }

    .gs-kpis {
        grid-template-columns: 1fr;
    }

    .gs-main-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   MOBILE TABLES
   ============================================ */

@media (max-width: 768px) {

    .table-container {
        overflow-x: auto;
    }

    .table th,
    .table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}


/* ============================================
   TOUCH FRIENDLY BUTTONS
   ============================================ */

@media (max-width: 640px) {

    .btn {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
    }

    .header-icon-btn {
        width: 48px;
        height: 48px;
    }
}

/* ============================================
   LAYOUT QUALITY PASS (DESKTOP + MOBILE)
   ============================================ */

:root {
    --sidebar-width: 280px;
}

.panel-sidebar {
    width: var(--sidebar-width);
}

.panel-main {
    margin-left: var(--sidebar-width);
}

.panel-content {
    width: min(100%, 1560px);
    margin: 0 auto;
    padding: clamp(1rem, 2vw, 2rem);
}

.mobile-header-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.mobile-header-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 8px;
}

.mobile-header-logo-fallback {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    flex-shrink: 0;
}

.mobile-header .logo {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.container-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0 0 1.5rem;
}

.container-buy-btn {
    min-width: 170px;
}

.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 1600px) {
    .container-grid {
        grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
    }
}

@media (max-width: 1366px) {
    :root {
        --sidebar-width: 250px;
    }

    .panel-content {
        padding: 1.25rem;
    }

    .container-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    }

    .content-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 1024px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .panel-sidebar {
        width: min(88vw, 340px);
        max-width: 340px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    }

    .panel-main {
        margin-left: 0;
        width: 100%;
    }

    .panel-content {
        padding: 1rem;
    }

    .content-header {
        margin-bottom: 1.25rem;
    }

    .container-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .table {
        min-width: 720px;
    }

    .container-card__header,
    .container-card__body,
    .container-card__footer {
        padding: 1rem;
    }

    .container-ip {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .container-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .container-buy-btn,
    .empty-state-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .empty-state-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================================
   DEDICATED PAGE
   ============================================ */

.dedicated-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dedicated-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0;
}

.dedicated-header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dedicated-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dedicated-info-card {
    padding: 1.25rem;
}

.dedicated-info-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

.dedicated-note {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.16), rgba(167, 139, 250, 0.08));
    color: var(--text-secondary);
}

.dedicated-note i {
    color: var(--accent-primary);
}

.dedicated-family {
    padding: 1.25rem;
}

.dedicated-family-header {
    margin-bottom: 1.1rem;
}

.dedicated-family-pills {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.dedicated-family-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.dedicated-family-group {
    margin-top: 1rem;
}

.dedicated-family-group:first-of-type {
    margin-top: 0;
}

.dedicated-family-group-title {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.dedicated-family-group-title i {
    color: var(--accent-secondary);
}

.dedicated-cpu-group {
    margin-bottom: 1rem;
}

.dedicated-cpu-group:last-child {
    margin-bottom: 0;
}

.dedicated-cpu-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
}

.dedicated-cpu-group-header h4 {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.dedicated-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.dedicated-plan-card {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(17, 17, 19, 0.95), rgba(10, 10, 12, 0.9));
    padding: 1rem;
    min-width: 0;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.dedicated-plan-card:hover {
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.dedicated-plan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.dedicated-plan-head h3 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin: 0;
    letter-spacing: -0.01em;
}

.dedicated-plan-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.dedicated-spec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.52rem;
    margin: 0;
    padding: 0;
}

.dedicated-spec-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.dedicated-spec-row i {
    color: var(--accent-secondary);
    margin-top: 0.12rem;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.dedicated-plan-footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.dedicated-price {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.dedicated-price span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.dedicated-price strong {
    color: var(--text-primary);
    font-size: 1.4rem;
    line-height: 1;
    letter-spacing: -0.02em;
}

.dedicated-price small {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.dedicated-faq {
    padding: 1.25rem;
}

.dedicated-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dedicated-faq-item {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    padding: 0.8rem 0.9rem;
}

.dedicated-faq-item summary {
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 600;
    list-style: none;
}

.dedicated-faq-item summary::-webkit-details-marker {
    display: none;
}

.dedicated-faq-item summary::after {
    content: '+';
    float: right;
    color: var(--accent-primary);
}

.dedicated-faq-item[open] summary::after {
    content: '-';
}

.dedicated-faq-item p {
    margin-top: 0.65rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

@media (max-width: 1080px) {
    .dedicated-header {
        flex-direction: column;
        align-items: stretch;
    }

    .dedicated-header-actions {
        width: 100%;
    }

    .dedicated-header-actions .btn {
        flex: 1 1 240px;
    }
}

@media (max-width: 768px) {
    .dedicated-family,
    .dedicated-faq {
        padding: 1rem;
    }

    .dedicated-plan-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dedicated-header-actions {
        flex-direction: column;
    }

    .dedicated-header-actions .btn {
        width: 100%;
        flex: 1 1 auto;
    }

    .dedicated-note {
        align-items: flex-start;
    }

    .dedicated-price strong {
        font-size: 1.25rem;
    }
}

/* ============================================
   FAQ STANDALONE PAGE
   ============================================ */

.faq-standalone {
    min-height: 100vh;
    padding: 1rem clamp(0.75rem, 2vw, 1.5rem) 2rem;
}

.faq-topbar {
    max-width: 1360px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(17, 17, 19, 0.85) 100%);
    box-shadow: var(--shadow-md);
}

.faq-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
}

.faq-brand img,
.faq-brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: contain;
}

.faq-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
}

.faq-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.faq-main-content {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-hero-card {
    padding: 1.25rem;
}

.faq-anchor-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.faq-anchor-card {
    display: block;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 0.85rem 0.95rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base);
}

.faq-anchor-card:hover {
    border-color: rgba(129, 140, 248, 0.35);
    background: rgba(129, 140, 248, 0.08);
    transform: translateY(-1px);
}

.faq-anchor-card h3 {
    margin: 0 0 0.35rem;
    color: var(--text-primary);
    font-size: 0.98rem;
}

.faq-anchor-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.faq-section-card {
    padding: 1.1rem;
}

.faq-section-description {
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
    font-size: 0.92rem;
}

.faq-details-list {
    gap: 0.6rem;
}

@media (max-width: 900px) {
    .faq-topbar {
        padding: 0.8rem;
    }

    .faq-hero-card,
    .faq-section-card {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .faq-topbar {
        align-items: stretch;
    }

    .faq-topbar-actions {
        width: 100%;
    }

    .faq-topbar-actions .btn {
        flex: 1 1 auto;
    }
}

/* ============================================
   MOBILE SIDEBAR STABILITY FIX
   ============================================ */

@media (max-width: 1024px) {
    .panel-wrapper {
        display: block;
    }

    .mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 64px;
        padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 1rem 0.75rem;
        z-index: 1300;
    }

    .mobile-header .hamburger {
        flex-shrink: 0;
    }

    .panel-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100dvh;
        width: min(86vw, 320px);
        max-width: 320px;
        transform: translateX(-105%);
        z-index: 1310;
        overflow-y: auto;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    }

    .panel-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1305;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .panel-main {
        margin-left: 0;
        width: 100%;
        min-width: 0;
        padding-top: calc(64px + env(safe-area-inset-top, 0px));
    }

    .panel-header {
        display: none;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

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

    .sidebar-overlay {
        display: none;
    }

    .panel-main {
        padding-top: 0;
    }
}
