/* Earthy Minimal Theme (Theme 2) */
:root {
    --earthy-bg: #ffffff;
    --earthy-primary: #2563eb;
    --earthy-primary-hover: #1d4ed8;
    --earthy-secondary: #0284c7;
    --earthy-secondary-hover: #0369a1;
    --earthy-text: #1e293b;
    --earthy-text-muted: #64748b;
    --earthy-border: #cbd5e1;
    --earthy-card-bg: #ffffff;
    --earthy-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
    --earthy-primary-rgb: 37, 99, 235;
    --earthy-secondary-rgb: 2, 132, 199;
    --theme-clock-bg: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    --theme-clock-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
    --theme-qc-leave: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    --theme-qc-assembly: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --theme-qc-late: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    --theme-qc-student: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

body {
    background-color: var(--earthy-bg) !important;
    color: var(--earthy-text) !important;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6, .text-dark {
    color: var(--earthy-text) !important;
}

.text-muted, .text-secondary {
    color: var(--earthy-text-muted) !important;
}

.text-primary { color: var(--earthy-primary) !important; }
.text-danger, .text-warning { color: var(--earthy-secondary) !important; }
.text-success { color: var(--earthy-primary) !important; } /* Merge success into primary sage green for minimal look */

/* Background Overrides */
.bg-light {
    background-color: var(--earthy-bg) !important;
}
.bg-primary { background-color: var(--earthy-primary) !important; color: white !important; }
.bg-danger, .bg-warning { background-color: var(--earthy-secondary) !important; color: white !important; }
.bg-success { background-color: var(--earthy-primary) !important; color: white !important; }

/* Buttons */
.btn-primary, .btn-success {
    background-color: var(--earthy-primary) !important;
    border-color: var(--earthy-primary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(123, 154, 130, 0.3) !important;
}
.btn-primary:hover, .btn-success:hover {
    background-color: var(--earthy-primary-hover) !important;
    border-color: var(--earthy-primary-hover) !important;
}

.btn-danger, .btn-warning {
    background-color: var(--earthy-secondary) !important;
    border-color: var(--earthy-secondary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(205, 122, 95, 0.3) !important;
}
.btn-danger:hover, .btn-warning:hover {
    background-color: var(--earthy-secondary-hover) !important;
    border-color: var(--earthy-secondary-hover) !important;
}

.btn-outline-primary, .btn-outline-success {
    color: var(--earthy-primary) !important;
    border-color: var(--earthy-primary) !important;
}
.btn-outline-primary:hover, .btn-outline-success:hover {
    background-color: var(--earthy-primary) !important;
    color: white !important;
}

.btn-outline-danger, .btn-outline-warning {
    color: var(--earthy-secondary) !important;
    border-color: var(--earthy-secondary) !important;
}
.btn-outline-danger:hover, .btn-outline-warning:hover {
    background-color: var(--earthy-secondary) !important;
    color: white !important;
}

/* Cards & Containers */
.card, .card-box {
    background-color: var(--earthy-card-bg) !important;
    border: 1px solid var(--earthy-border) !important;
    border-radius: 16px !important;
    box-shadow: var(--earthy-shadow) !important;
}
.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--earthy-border) !important;
}

/* Sidebar Specific (if loaded after dashboard CSS) */
#sidebar {
    background-color: var(--earthy-bg) !important;
    border-right: 1px solid var(--earthy-border) !important;
}
.sidebar-header {
    background-color: var(--earthy-bg) !important;
    border-bottom: 1px solid var(--earthy-border) !important;
}
#sidebar .nav-link {
    color: var(--earthy-text) !important;
}
#sidebar .nav-link:hover, #sidebar .nav-link.active {
    background-color: rgba(123, 154, 130, 0.15) !important;
    color: var(--earthy-primary) !important;
}

/* Top Nav */
#top-nav {
    background-color: var(--earthy-card-bg) !important;
    border-bottom: 1px solid var(--earthy-border) !important;
}

/* Tables */
.table th {
    background-color: var(--earthy-bg) !important;
    color: var(--earthy-text) !important;
    border-bottom: 2px solid var(--earthy-border) !important;
}
.table td {
    border-color: var(--earthy-border) !important;
    color: var(--earthy-text) !important;
}

/* Modals */
.modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}
.modal-header {
    border-bottom: 1px solid var(--earthy-border) !important;
}
.modal-footer {
    border-top: 1px solid var(--earthy-border) !important;
}

/* Badges */
.badge.bg-danger, .badge.bg-warning {
    background-color: var(--earthy-secondary) !important;
}
.badge.bg-primary, .badge.bg-success, .badge.bg-info {
    background-color: var(--earthy-primary) !important;
}

/* Form Controls */
.form-control, .form-select {
    border-color: var(--earthy-border) !important;
    border-radius: 10px !important;
    background-color: #faf9f6 !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--earthy-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(123, 154, 130, 0.25) !important;
}

/* Fix pastel backgrounds from older themes */
.bg-pastel-green, .bg-pastel-red, .bg-pastel-yellow, .bg-pastel-blue {
    background-color: var(--earthy-bg) !important;
    border: 1px solid var(--earthy-border) !important;
}
.bg-pastel-green h3, .bg-pastel-red h3, .bg-pastel-yellow h3, .bg-pastel-blue h3 {
    color: var(--earthy-primary) !important;
}

/* Clock Card Override */
.clock-card {
    background: var(--theme-clock-bg, linear-gradient(135deg, var(--earthy-primary) 0%, var(--earthy-primary-hover) 100%)) !important;
    box-shadow: var(--theme-clock-shadow, 0 8px 25px rgba(var(--earthy-primary-rgb), 0.35)) !important;
}
.clock-card h1, .clock-card p, .clock-card span, .clock-card i {
    color: #ffffff !important;
}
.clock-card .status-badge {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Quick Access Cards (Follow theme) */
.qc-leave { background: var(--theme-qc-leave, linear-gradient(135deg, var(--earthy-secondary) 0%, var(--earthy-secondary-hover) 100%)) !important; color: #fff !important; }
.qc-assembly { background: var(--theme-qc-assembly, linear-gradient(135deg, var(--earthy-primary) 0%, var(--earthy-primary-hover) 100%)) !important; color: #fff !important; }
.qc-late { background: var(--theme-qc-late, linear-gradient(135deg, var(--earthy-secondary) 0%, var(--earthy-primary) 100%)) !important; color: #fff !important; }
.qc-student { background: var(--theme-qc-student, linear-gradient(135deg, var(--earthy-primary) 0%, var(--earthy-secondary) 100%)) !important; color: #fff !important; }
