/* THEMES SYSTEM - EXTENDED FOR PREMIUM EXPERIENCE */

/* 1. BLUEPRINT (Technical/Dark) */
body.theme-blueprint {
    --primary-color: #3b82f6;
    /* Technical Blue (Blue 500) */
    --secondary-color: #1e40af;
    /* Deep Blue (Blue 800) */
    --accent-color: #06b6d4;
    /* Technical Cyan */
    --accent-hover: #0891b2;
    --text-color: #f1f5f9;
    --text-light: #ffffff;
    --bg-color: #0f172a;
    /* Slate 950 */
    --white: #1e293b;
    /* Slate 800 */
    --border-color: #334155;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.4);

    /* Technical design system overrides */
    --tech-bg: #0f172a;
    --tech-card: #1e293b;
    --tech-border: #334155;
    --tech-accent: #3b82f6;
    --tech-label: #94a3b8;
    --tech-text: #f1f5f9;
    --tech-input-bg: #0f172a;
}

body.theme-blueprint ::-webkit-scrollbar {
    width: 10px;
    background: #0f172a;
}

body.theme-blueprint ::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

body.theme-blueprint ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

body.theme-blueprint .card,
body.theme-blueprint .sidebar,
body.theme-blueprint .form-control {
    border-color: var(--border-color);
}

body.theme-blueprint .form-control {
    background-color: var(--tech-input-bg);
    color: #fff;
}

body.theme-blueprint table tr:hover td {
    background-color: rgba(59, 130, 246, 0.1);
}

/* 2. ECO (Field/Nature) */
body.theme-eco {
    --primary-color: #1b4332;
    --secondary-color: #2d6a4f;
    --accent-color: #bc6c25;
    --accent-hover: #a6611f;
    --text-color: #2f3e46;
    --bg-color: #f1faee;
    --border-color: #d8f3dc;
    --white: #ffffff;

    /* Technical design system overrides */
    --tech-bg: #f1faee;
    --tech-card: #ffffff;
    --tech-border: #d8f3dc;
    --tech-accent: #2d6a4f;
    --tech-label: #52796f;
    --tech-text: #2f3e46;
    --tech-input-bg: #ffffff;
}

/* 3. INDUSTRIAL (Safety/Engineering) */
body.theme-industrial {
    --primary-color: #212529;
    --secondary-color: #343a40;
    --accent-color: #fbbf24;
    /* Amber 400 */
    --accent-hover: #f59e0b;
    --text-color: #1f2937;
    --bg-color: #f3f4f6;
    /* Gray 100 */
    --border-color: #d1d5db;
    --white: #ffffff;

    /* Technical design system overrides */
    --tech-bg: #f3f4f6;
    --tech-card: #ffffff;
    --tech-border: #d1d5db;
    --tech-accent: #212529;
    --tech-label: #6b7280;
    --tech-text: #111827;
    --tech-input-bg: #ffffff;
}

/* 4. PREMIUM GRAPHITE (High-End Dark) */
body.theme-graphite {
    --primary-color: #e2e8f0;
    /* Silver Gray */
    --secondary-color: #94a3b8;
    --accent-color: #fbbf24;
    /* Engineering Gold */
    --accent-hover: #f59e0b;
    --text-color: #f8fafc;
    --bg-color: #09090b;
    /* Zinc 950 */
    --white: #18181b;
    /* Zinc 900 */
    --border-color: #27272a;
    --text-light: #ffffff;
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.7);

    /* Technical design system overrides */
    --tech-bg: #09090b;
    --tech-card: #18181b;
    --tech-border: #27272a;
    --tech-accent: #fbbf24;
    --tech-label: #71717a;
    --tech-text: #f8fafc;
    --tech-input-bg: #09090b;
}

body.theme-graphite ::-webkit-scrollbar {
    width: 10px;
    background: #09090b;
}

body.theme-graphite ::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 5px;
}

body.theme-graphite ::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

body.theme-graphite .card,
body.theme-graphite .sidebar,
body.theme-graphite .form-control,
body.theme-graphite table {
    border-color: var(--border-color);
}

body.theme-graphite .form-control {
    background-color: var(--tech-input-bg);
    color: #fff;
    border: 1px solid var(--border-color);
}

body.theme-graphite .sidebar {
    background: #000000;
    border-right: 1px solid var(--border-color);
}

body.theme-graphite table tr:hover td {
    background-color: rgba(251, 191, 36, 0.05);
    /* Very subtle gold highlight */
}

body.theme-graphite .btn-primary {
    background: var(--tech-accent);
    color: #000;
    font-weight: 700;
}

body.theme-graphite h1,
body.theme-graphite h2,
body.theme-graphite h3,
body.theme-graphite h4,
body.theme-graphite .tech-sheet-title {
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 5. MODERN (Default) - Standard Light */
body.theme-modern {
    /* Uses :root from style.css but explicit for clarity */
    --bg-color: #f8fafc;
    --white: #ffffff;
    --text-color: #334155;

    --tech-bg: #fafafa;
    --tech-card: #ffffff;
    --tech-border: #e4e4e7;
    --tech-accent: #18181b;
    --tech-label: #71717a;
    --tech-text: #27272a;
    --tech-input-bg: #ffffff;
}

/* 6. AUTOCAD DARK - Inspired by AutoCAD's classic dark interface */
body.theme-autocad {
    --primary-color: #00aeef;
    /* AutoCAD Cyan */
    --secondary-color: #0078d4;
    /* AutoCAD Blue */
    --accent-color: #00c8ff;
    --accent-hover: #00aeef;
    --text-color: #d4d4d4;
    --text-light: #ffffff;
    --bg-color: #1e1e1e;
    /* AutoCAD Model Space black */
    --white: #252526;
    /* AutoCAD Panel background */
    --border-color: #3c3c3c;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.6);

    --tech-bg: #1e1e1e;
    --tech-card: #252526;
    --tech-border: #3c3c3c;
    --tech-accent: #00aeef;
    --tech-label: #808080;
    --tech-text: #d4d4d4;
    --tech-input-bg: #1e1e1e;
}

body.theme-autocad ::-webkit-scrollbar {
    width: 10px;
    background: #1e1e1e;
}

body.theme-autocad ::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    border-radius: 3px;
}

body.theme-autocad ::-webkit-scrollbar-thumb:hover {
    background: #555;
}

body.theme-autocad .card,
body.theme-autocad .sidebar,
body.theme-autocad .form-control {
    border-color: var(--border-color);
}

body.theme-autocad .form-control {
    background-color: var(--tech-input-bg);
    color: var(--text-color);
}

body.theme-autocad .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
    font-weight: 700;
}

body.theme-autocad table tr:hover td {
    background-color: rgba(0, 174, 239, 0.08);
}

body.theme-autocad h1,
body.theme-autocad h2,
body.theme-autocad h3,
body.theme-autocad h4 {
    color: #ffffff;
}

body.theme-autocad .sidebar {
    background: #252526;
    border-right: 1px solid #3c3c3c;
}

/* 7. ESRI ARCGIS - Inspired by Esri ArcGIS Online dark portal */
body.theme-arcgis {
    --primary-color: #2d7d9a;
    /* ArcGIS Teal */
    --secondary-color: #1e6685;
    --accent-color: #e07b39;
    /* Esri Orange accent */
    --accent-hover: #c96f2e;
    --text-color: #cdd3de;
    --text-light: #ffffff;
    --bg-color: #1a1c2a;
    /* ArcGIS Dark Navy */
    --white: #22253a;
    /* ArcGIS Panel */
    --border-color: #343750;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.5);

    --tech-bg: #1a1c2a;
    --tech-card: #22253a;
    --tech-border: #343750;
    --tech-accent: #2d7d9a;
    --tech-label: #7b84a0;
    --tech-text: #cdd3de;
    --tech-input-bg: #1a1c2a;
}

body.theme-arcgis ::-webkit-scrollbar {
    width: 10px;
    background: #1a1c2a;
}

body.theme-arcgis ::-webkit-scrollbar-thumb {
    background: #343750;
    border-radius: 3px;
}

body.theme-arcgis ::-webkit-scrollbar-thumb:hover {
    background: #454863;
}

body.theme-arcgis .card,
body.theme-arcgis .sidebar,
body.theme-arcgis .form-control {
    border-color: var(--border-color);
}

body.theme-arcgis .form-control {
    background-color: var(--tech-input-bg);
    color: var(--text-color);
}

body.theme-arcgis .btn-primary {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    font-weight: 700;
}

body.theme-arcgis table tr:hover td {
    background-color: rgba(45, 125, 154, 0.1);
}

body.theme-arcgis h1,
body.theme-arcgis h2,
body.theme-arcgis h3,
body.theme-arcgis h4 {
    color: #ffffff;
}

body.theme-arcgis .sidebar {
    background: #22253a;
    border-right: 1px solid #343750;
}

/* 8. PASTEL (Soft Colors) */
body.theme-pastel {
    --primary-color: #93c5fd; /* Pastel Blue */
    --secondary-color: #fdba74; /* Pastel Orange */
    --accent-color: #86efac; /* Pastel Green */
    --accent-hover: #fca5a5; /* Pastel Red */
    --text-color: #334155;
    --text-light: #ffffff;
    --bg-color: #fefcfb;
    --white: #ffffff;
    --border-color: #fbcfe8; /* Pastel Pinkish */

    --tech-bg: #fefcfb;
    --tech-card: #ffffff;
    --tech-border: #fbcfe8;
    --tech-accent: #93c5fd;
    --tech-label: #fdba74;
    --tech-text: #334155;
    --tech-input-bg: #ffffff;
}

body.theme-pastel ::-webkit-scrollbar {
    width: 10px;
    background: #fefcfb;
}

body.theme-pastel ::-webkit-scrollbar-thumb {
    background: #93c5fd;
    border-radius: 5px;
}

body.theme-pastel .card,
body.theme-pastel .sidebar,
body.theme-pastel .form-control {
    border-color: var(--border-color);
}

body.theme-pastel .form-control {
    background-color: var(--tech-input-bg);
    color: var(--text-color);
}

body.theme-pastel .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #1e3a8a;
    font-weight: 700;
}

body.theme-pastel .sidebar {
    background: #eff6ff; /* light blue */
    border-right: 1px solid #bfdbfe;
}

body.theme-pastel table tr:hover td {
    background-color: #dcfce7; /* light green */
}