/* ===================================================================
   Digital Doctors Solutions Ltd: Dark Theme Design System
   =================================================================== */

[data-theme='dark'] {
    /* ---- Brand ---- */
    --color-primary: #9b5cf6;
    --color-primary-light: #b78af7;
    --color-primary-dark: #7b2df0;
    --color-primary-50: #1a1533;
    --color-primary-100: #261b4d;
    --color-primary-200: #38246e;
    --color-primary-500: #9b5cf6;
    --color-primary-600: #8b47f0;
    --color-primary-700: #7b2df0;

    /* ---- Neutrals ---- */
    --color-bg: #0b0f19;
    --color-bg-card: #111827;
    --color-bg-secondary: #161f36;
    --color-bg-soft: #141b2d;
    --color-bg-hover: #1e293b;
    --color-border: #1f293d;
    --color-border-light: #162033;
    --color-text: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-ink: #f8fafc;
    --color-ink-2: #e2e8f0;

    /* ---- Sidebar ---- */
    --sidebar-bg: #0d121f;
    --sidebar-hover: #161e33;
    --sidebar-active: #1f2847;
    --sidebar-text: #94a3b8;
    --sidebar-text-strong: #f8fafc;
    --sidebar-text-active: #c084fc;

    /* ---- Elevation ---- */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow: 0 2px 8px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 8px 24px 0 rgb(0 0 0 / 0.6);
    --shadow-lg: 0 16px 40px 0 rgb(0 0 0 / 0.7);
    --shadow-focus: 0 0 0 3px rgba(155, 92, 246, 0.35);

    /* ---- Claymorphism Tokens ---- */
    --clay-card-bg: #111827;
    --clay-card-border: #1f293d;
    --clay-card-shadow: 0 14px 28px -4px rgb(0 0 0 / 0.55), 0 4px 10px -2px rgb(0 0 0 / 0.3), inset 1px 1px 2px rgb(255 255 255 / 0.05), inset -1.5px -1.5px 3px rgb(0 0 0 / 0.4);
    --clay-card-shadow-hover: 0 18px 36px -4px rgb(0 0 0 / 0.7), 0 6px 14px -2px rgb(0 0 0 / 0.4), inset 1px 1px 2px rgb(255 255 255 / 0.08), inset -2px -2px 4px rgb(0 0 0 / 0.45);

    --clay-input-bg: #0b0f19;
    --clay-input-border: #1f293d;
    --clay-input-shadow: inset 2px 2px 4px rgb(0 0 0 / 0.5), inset -1px -1px 2px rgb(255 255 255 / 0.03), 0 1px 2px rgb(0 0 0 / 0.2);
    --clay-input-focus-bg: #111827;
    --clay-input-focus-border: #9b5cf6;
    --clay-input-focus-shadow: inset 1px 1px 2px rgb(155 92 246 / 0.15), 0 0 0 4px rgb(155 92 246 / 0.25);

    --clay-btn-secondary-bg: linear-gradient(135deg, #171f33 0%, #111827 100%);
    --clay-btn-secondary-border: #1f293d;
    --clay-btn-secondary-shadow: 0 4px 12px rgb(0 0 0 / 0.4), inset 1px 1px 2px rgb(255 255 255 / 0.06), inset -1.5px -1.5px 3px rgb(0 0 0 / 0.4);

    --clay-toolbar-end-bg: #141b2d;
}

/* Theme toggle icon display */
.theme-icon-sun {
    display: none;
}
.theme-icon-moon {
    display: inline-block;
}
[data-theme='dark'] .theme-icon-sun {
    display: inline-block !important;
}
[data-theme='dark'] .theme-icon-moon {
    display: none !important;
}

/* Dark mode specific component overrides */
[data-theme='dark'] .table-toolbar {
    background: linear-gradient(180deg, var(--color-bg-card) 0%, var(--clay-toolbar-end-bg) 100%);
}

[data-theme='dark'] .form-hero {
    background: linear-gradient(135deg, var(--color-primary-50) 0%, var(--color-bg-card) 100%);
}

[data-theme='dark'] .form-section-header {
    background: linear-gradient(180deg, var(--color-bg-soft) 0%, var(--color-bg) 100%);
}

[data-theme='dark'] .data-table thead {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

[data-theme='dark'] .data-table tr:hover {
    background: var(--color-bg-hover);
}

[data-theme='dark'] .topbar-currency-select {
    background-color: var(--color-bg);
    color: var(--color-text);
    border-color: var(--color-border);
}

[data-theme='dark'] select option {
    background: #111827;
    color: #f1f5f9;
}
