﻿/* assets/css/style.css */
/* ============================================================
   THEME SYSTEM â€” 3 Predefined Color Palettes
   ============================================================ */

/* === DEFAULT THEME (Emirates Green & White) === */
:root,
[data-theme="default"] {
    --ec-green: #007A33;
    --ec-gold: #D4AF37;
    --ec-dark: #1a1a1a;
    --ec-light: #f8f9fa;

    --theme-body-bg: #f8f9fa;
    --theme-text: #212529;
    --theme-text-muted: #6c757d;
    --theme-card-bg: #ffffff;
    --theme-card-border: #e9ecef;
    --theme-card-shadow: rgba(0,0,0,0.06);
    --theme-table-bg: #ffffff;
    --theme-table-stripe: #f8f9fa;
    --theme-table-border: #dee2e6;
    --theme-table-hover: #f1f5f1;
    --theme-input-bg: #ffffff;
    --theme-input-border: #ced4da;
    --theme-input-text: #212529;
    --theme-badge-muted-bg: #e9ecef;
    --theme-badge-muted-text: #495057;
    --theme-heading: #1a1a1a;
    --theme-border: #dee2e6;
    --theme-footer-bg: #f8f9fa;
    --theme-footer-text: #6c757d;
    --theme-modal-bg: #ffffff;
    --theme-stat-card-bg: #ffffff;
}

/* === DARK THEME (Premium Night Mode) === */
[data-theme="dark"] {
    --ec-green: #00b34a;
    --ec-gold: #e6c44d;
    --ec-dark: #0d1117;
    --ec-light: #161b22;

    --theme-body-bg: #0d1117;
    --theme-text: #e6edf3;
    --theme-text-muted: #8b949e;
    --theme-card-bg: #161b22;
    --theme-card-border: #30363d;
    --theme-card-shadow: rgba(0,0,0,0.3);
    --theme-table-bg: #161b22;
    --theme-table-stripe: #1c2128;
    --theme-table-border: #30363d;
    --theme-table-hover: #1f2933;
    --theme-input-bg: #0d1117;
    --theme-input-border: #30363d;
    --theme-input-text: #e6edf3;
    --theme-badge-muted-bg: #30363d;
    --theme-badge-muted-text: #c9d1d9;
    --theme-heading: #f0f6fc;
    --theme-border: #30363d;
    --theme-footer-bg: #0d1117;
    --theme-footer-text: #8b949e;
    --theme-modal-bg: #161b22;
    --theme-stat-card-bg: #161b22;
}

/* === SOFT THEME (Gentle & Low Eye Strain) === */
[data-theme="soft"] {
    --ec-green: #2e7d5b;
    --ec-gold: #c5a44e;
    --ec-dark: #2d3748;
    --ec-light: #eef2f7;

    --theme-body-bg: #eef2f7;
    --theme-text: #374151;
    --theme-text-muted: #6b7280;
    --theme-card-bg: #ffffff;
    --theme-card-border: #e2e8f0;
    --theme-card-shadow: rgba(0,0,0,0.04);
    --theme-table-bg: #ffffff;
    --theme-table-stripe: #f5f7fa;
    --theme-table-border: #e2e8f0;
    --theme-table-hover: #edf2f7;
    --theme-input-bg: #ffffff;
    --theme-input-border: #cbd5e1;
    --theme-input-text: #374151;
    --theme-badge-muted-bg: #e2e8f0;
    --theme-badge-muted-text: #4a5568;
    --theme-heading: #1a202c;
    --theme-border: #e2e8f0;
    --theme-footer-bg: #eef2f7;
    --theme-footer-text: #6b7280;
    --theme-modal-bg: #ffffff;
    --theme-stat-card-bg: #ffffff;
}

/* ============================================================
   THEME APPLICATION â€” Global Element Overrides
   ============================================================ */

body {
    background-color: var(--theme-body-bg) !important;
    color: var(--theme-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Cards */
.card, .stat-card {
    background-color: var(--theme-card-bg) !important;
    border-color: var(--theme-card-border) !important;
    box-shadow: 0 2px 8px var(--theme-card-shadow);
    color: var(--theme-text);
}

/* Tables */
.table { color: var(--theme-text); }
.table > :not(caption) > * > * {
    background-color: var(--theme-table-bg);
    border-bottom-color: var(--theme-table-border);
    color: var(--theme-text);
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--theme-table-stripe);
    color: var(--theme-text);
}
.table-hover > tbody > tr:hover > * {
    background-color: var(--theme-table-hover) !important;
}

/* Form Controls */
.form-control, .form-select {
    background-color: var(--theme-input-bg) !important;
    border-color: var(--theme-input-border) !important;
    color: var(--theme-input-text) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--ec-green) !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 122, 51, 0.25);
}

/* Modals */
.modal-content {
    background-color: var(--theme-modal-bg) !important;
    color: var(--theme-text);
    border-color: var(--theme-card-border) !important;
}
.modal-header, .modal-footer {
    border-color: var(--theme-border) !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6 { color: var(--theme-heading); }

/* Borders and Dividers */
.border, .border-top, .border-bottom {
    border-color: var(--theme-border) !important;
}
hr { border-color: var(--theme-border); opacity: 0.3; }

/* Dropdowns */
.dropdown-menu {
    background-color: var(--theme-card-bg) !important;
    border-color: var(--theme-card-border) !important;
}
.dropdown-item { color: var(--theme-text) !important; }
.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--theme-table-hover) !important;
}
.dropdown-divider { border-color: var(--theme-border) !important; }

/* Text utility overrides */
.text-muted { color: var(--theme-text-muted) !important; }

/* Badges */
.badge.bg-light, .badge.bg-secondary {
    background-color: var(--theme-badge-muted-bg) !important;
    color: var(--theme-badge-muted-text) !important;
}

/* Alerts */
.alert { border-color: var(--theme-border); }

/* Footer */
footer.bg-light {
    background-color: var(--theme-footer-bg) !important;
    border-color: var(--theme-border) !important;
}
footer .text-muted, footer small {
    color: var(--theme-footer-text) !important;
}

/* ============================================================
   DARK THEME â€” Special Overrides
   ============================================================ */
[data-theme="dark"] .navbar-custom { background-color: #161b22; }
[data-theme="dark"] .bg-white { background-color: var(--theme-card-bg) !important; }
[data-theme="dark"] .bg-light { background-color: #1c2128 !important; }
[data-theme="dark"] .list-group-item {
    background-color: var(--theme-card-bg);
    border-color: var(--theme-card-border);
    color: var(--theme-text);
}
[data-theme="dark"] .breadcrumb { color: var(--theme-text-muted); }
[data-theme="dark"] .page-link {
    background-color: var(--theme-card-bg);
    border-color: var(--theme-card-border);
    color: var(--theme-text);
}
[data-theme="dark"] .nav-tabs .nav-link {
    color: var(--theme-text-muted);
    border-color: transparent;
}
[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--theme-card-bg);
    border-color: var(--theme-card-border);
    color: var(--ec-green);
}
[data-theme="dark"] .text-dark { color: var(--theme-text) !important; }

/* ============================================================
   ORIGINAL STYLES (Unchanged)
   ============================================================ */

/* ØªÙ†Ø³ÙŠÙ‚ Ø¨Ø·Ø§Ù‚Ø© ØªØ³Ø¬ÙŠÙ„ Ø§Ù„Ø¯Ø®ÙˆÙ„ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--ec-green) 0%, #004d20 100%);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    border-top: 5px solid var(--ec-gold);
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.btn-ec-primary {
    background-color: var(--ec-green);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-ec-primary:hover {
    background-color: #005c26;
    color: var(--ec-gold);
}

.bilingual-text {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2px;
}

/* --- Ø¥ØµÙ„Ø§Ø­ Ø¸Ù‡ÙˆØ± Ø§Ù„ØªØ§Ø±ÙŠØ® ÙˆØ§Ù„ÙˆÙ‚Øª ÙÙŠ Ø§Ù„ÙˆØ§Ø¬Ù‡Ø© Ø§Ù„Ø¹Ø±Ø¨ÙŠØ© --- */
input[type="date"],
input[type="time"] {
    direction: ltr;
    text-align: right;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    margin-left: 10px;
}

/* Mobile styles â†’ assets/css/mobile.css */
