/* ===================================================
   MPS Premium Design System — CBAY PC
   Dark Enterprise Dashboard Theme
   =================================================== */

/* === CSS Custom Properties === */
:root {
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="dark"] {
    --bg-primary: #0f1117;
    --bg-secondary: #161923;
    --bg-tertiary: #1c1f2e;
    --bg-card: #1a1d2e;
    --bg-card-hover: #1f2337;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-input: #12141f;

    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(99, 134, 255, 0.5);

    --text-primary: #e8eaed;
    --text-secondary: #8b8fa3;
    --text-muted: #5f6377;
    --text-accent: #a0b4ff;

    --sidebar-bg: #0d0f18;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow-blue: 0 0 20px rgba(99, 134, 255, 0.15);
    --shadow-glow-emerald: 0 0 20px rgba(52, 211, 153, 0.15);

    --accent-blue: #6386ff;
    --accent-blue-glow: rgba(99, 134, 255, 0.15);
    --accent-purple: #a475f6;
    --accent-purple-glow: rgba(164, 117, 246, 0.15);
    --accent-emerald: #34d399;
    --accent-emerald-glow: rgba(52, 211, 153, 0.15);
    --accent-amber: #fbbf24;
    --accent-amber-glow: rgba(251, 191, 36, 0.15);
    --accent-rose: #f43f5e;
    --accent-rose-glow: rgba(244, 63, 94, 0.15);
    --accent-cyan: #22d3ee;
    --accent-cyan-glow: rgba(34, 211, 238, 0.15);

    --gradient-blue: linear-gradient(135deg, #6386ff 0%, #4361ee 100%);
    --gradient-purple: linear-gradient(135deg, #a475f6 0%, #7c3aed 100%);
    --gradient-emerald: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --gradient-amber: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --gradient-rose: linear-gradient(135deg, #f43f5e 0%, #dc2626 100%);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-surface: rgba(0, 0, 0, 0.03);
    --bg-input: #ffffff;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --border-focus: rgba(67, 97, 238, 0.3);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-accent: #3b82f6;

    --sidebar-bg: #ffffff;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);
    --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.15);

    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.15);
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.15);
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.15);
    --accent-amber: #f59e0b;
    --accent-amber-glow: rgba(245, 158, 11, 0.15);
    --accent-rose: #ef4444;
    --accent-rose-glow: rgba(239, 68, 68, 0.15);
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.15);

    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-rose: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* === Global Reset === */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

h1:focus { outline: none; }

p { color: var(--text-secondary); }

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-accent);
}

code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8125rem;
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.08);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
}

/* === Page Title === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h4 {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Stat Cards (Dashboard) === */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

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

.stat-card.blue::before { background: var(--gradient-blue); }
.stat-card.purple::before { background: var(--gradient-purple); }
.stat-card.emerald::before { background: var(--gradient-emerald); }
.stat-card.amber::before { background: var(--gradient-amber); }
.stat-card.rose::before { background: var(--gradient-rose); }

.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.stat-card.blue .stat-icon { background: var(--accent-blue-glow); color: var(--accent-blue); }
.stat-card.purple .stat-icon { background: var(--accent-purple-glow); color: var(--accent-purple); }
.stat-card.emerald .stat-icon { background: var(--accent-emerald-glow); color: var(--accent-emerald); }
.stat-card.amber .stat-icon { background: var(--accent-amber-glow); color: var(--accent-amber); }
.stat-card.rose .stat-icon { background: var(--accent-rose-glow); color: var(--accent-rose); }

.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.25rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.stat-card .stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.stat-card .stat-sub .highlight {
    color: var(--accent-emerald);
    font-weight: 600;
}

/* === Data Cards === */
.data-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition-base);
}

.data-card:hover {
    border-color: var(--border-hover);
}

.data-card .data-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

.data-card .data-card-header h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-card .data-card-header h5 i {
    color: var(--text-muted);
    font-size: 1rem;
}

.data-card .data-card-header .badge-count {
    background: var(--accent-blue-glow);
    color: var(--accent-blue);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 134, 255, 0.15);
}

.data-card .data-card-body {
    padding: 0;
    overflow-x: auto;
}

.data-card .data-card-body.with-padding {
    padding: 1.25rem;
}

/* === Premium Table === */
.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.table-premium thead th {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-premium tbody tr {
    transition: background-color var(--transition-fast);
}

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

.table-premium tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8125rem;
    vertical-align: middle;
    color: var(--text-secondary);
}

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

.table-premium tfoot td {
    padding: 0.75rem 1rem;
    border-top: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.table-premium .empty-state {
    text-align: center;
    padding: 2.5rem 1rem !important;
    color: var(--text-muted);
}

.table-premium .empty-state i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.3;
}

/* === Status Badges === */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-badge.online {
    background: var(--accent-emerald-glow);
    color: var(--accent-emerald);
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.status-badge.online::before { background: var(--accent-emerald); box-shadow: 0 0 6px var(--accent-emerald); }

.status-badge.offline {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.status-badge.offline::before { background: var(--text-muted); }

.status-badge.warning {
    background: var(--accent-amber-glow);
    color: var(--accent-amber);
    border: 1px solid rgba(251, 191, 36, 0.2);
}
.status-badge.warning::before { background: var(--accent-amber); box-shadow: 0 0 6px var(--accent-amber); }

.status-badge.error {
    background: var(--accent-rose-glow);
    color: var(--accent-rose);
    border: 1px solid rgba(244, 63, 94, 0.2);
}
.status-badge.error::before { background: var(--accent-rose); box-shadow: 0 0 6px var(--accent-rose); }

.status-badge.info {
    background: var(--accent-cyan-glow);
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.2);
}
.status-badge.info::before { background: var(--accent-cyan); }

.status-badge.active {
    background: var(--accent-emerald-glow);
    color: var(--accent-emerald);
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.status-badge.active::before { background: var(--accent-emerald); box-shadow: 0 0 6px var(--accent-emerald); }

.status-badge.passive {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.status-badge.passive::before { background: var(--text-muted); }

.status-badge.pending {
    background: var(--accent-blue-glow);
    color: var(--accent-blue);
    border: 1px solid rgba(99, 134, 255, 0.2);
}
.status-badge.pending::before { background: var(--accent-blue); }

.status-badge.color-badge {
    background: var(--accent-purple-glow);
    color: var(--accent-purple);
    border: 1px solid rgba(164, 117, 246, 0.2);
}
.status-badge.color-badge::before { display: none; }

.status-badge.mono-badge {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.status-badge.mono-badge::before { display: none; }

.status-badge.agent-badge {
    background: var(--accent-blue-glow);
    color: var(--accent-blue);
    border: 1px solid rgba(99, 134, 255, 0.2);
}
.status-badge.agent-badge::before { display: none; }

.status-badge.manual-badge {
    background: var(--accent-amber-glow);
    color: var(--accent-amber);
    border: 1px solid rgba(251, 191, 36, 0.2);
}
.status-badge.manual-badge::before { display: none; }

.status-badge.import-badge {
    background: var(--accent-cyan-glow);
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.2);
}
.status-badge.import-badge::before { display: none; }

/* === Buttons === */
.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-premium.btn-primary-glow {
    background: var(--gradient-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 134, 255, 0.25);
}

.btn-premium.btn-primary-glow:hover {
    box-shadow: 0 4px 16px rgba(99, 134, 255, 0.4);
    transform: translateY(-1px);
}

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

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

.btn-premium.btn-danger-ghost {
    background: transparent;
    color: var(--accent-rose);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-premium.btn-danger-ghost:hover {
    background: var(--accent-rose-glow);
    border-color: rgba(244, 63, 94, 0.4);
}

.btn-premium.btn-success-ghost {
    background: transparent;
    color: var(--accent-emerald);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.btn-premium.btn-success-ghost:hover {
    background: var(--accent-emerald-glow);
    border-color: rgba(52, 211, 153, 0.4);
}

.btn-premium.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

/* === Form Controls === */
.form-premium {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: slideDown var(--transition-slow) ease-out;
}

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

.form-premium .form-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.form-premium .form-header h5 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.form-premium .form-header i {
    color: var(--accent-blue);
}

.form-premium label,
.form-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.375rem;
}

.form-premium .form-control,
.form-premium .form-select,
.form-control,
.form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
    font-size: 0.8125rem !important;
    padding: 0.5rem 0.75rem !important;
    transition: all var(--transition-fast) !important;
}

.form-premium .form-control:focus,
.form-premium .form-select:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px var(--accent-blue-glow) !important;
    outline: none !important;
}

.form-premium .form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-check-input {
    background-color: var(--bg-input) !important;
    border-color: var(--border-color) !important;
}

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

.form-check-label {
    color: var(--text-secondary) !important;
    font-size: 0.8125rem !important;
}

.form-premium .form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* === Filter Bar === */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-bar .filter-group {
    flex: 1;
    min-width: 160px;
}

.filter-bar .filter-group label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.375rem;
    display: block;
}

/* === Loading === */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* === Alert Toast === */
.alert-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--accent-emerald);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideUp var(--transition-slow) ease-out;
}

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

.alert-toast .close-toast {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
    font-size: 1rem;
}

/* === Summary Footer === */
.summary-footer {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* === Override Bootstrap defaults === */
.btn-primary {
    background: var(--gradient-blue) !important;
    border: none !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px var(--accent-blue-glow) !important;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--accent-emerald);
}

.invalid {
    outline: 1px solid var(--accent-rose);
}

.validation-message {
    color: var(--accent-rose);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.blazor-error-boundary {
    background: var(--accent-rose-glow);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem 1rem 1rem 3rem;
    color: var(--accent-rose);
    margin-top: 1rem;
}

.blazor-error-boundary::after {
    content: "Bir hata oluştu.";
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 1.375rem;
    }

    .filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-bar .filter-group {
        min-width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* === Content area padding === */
.content {
    padding-top: 1.1rem;
}

/* === Pulse animation for online indicators === */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse-dot {
    animation: pulse 2s ease-in-out infinite;
}

/* === Bootstrap overrides for dark theme === */
.text-muted {
    color: var(--text-muted) !important;
}

.fw-bold, .fw-semibold {
    color: var(--text-primary);
}

/* === Theme Toggle Icons === */
[data-theme="light"] .theme-icon-dark { display: none !important; }
[data-theme="light"] .theme-icon-light { display: inline-block !important; }

[data-theme="dark"] .theme-icon-dark { display: inline-block !important; }
[data-theme="dark"] .theme-icon-light { display: none !important; }

html {
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* === Premium Modal === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn var(--transition-fast) ease-out;
}

.modal-premium {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    animation: slideUpModal var(--transition-base) cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header-premium h5 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 0;
    display: flex;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body-premium {
    padding: 1.5rem;
}

.modal-footer-premium {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

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

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