html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

/* ── Stat card link hover ── */
.stat-card-link {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
}
a:has(.stat-card-link) { color: inherit; }

/* ── Technician card hover ── */
.tech-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tech-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30,58,95,0.18) !important;
}

/* ===================== SIDEBAR ===================== */
body { background: #f0f2f5; }

#wrapper { min-height: 100vh; }

#sidebar-wrapper {
    min-height: 100vh;
    width: 260px;
    min-width: 260px;
    background: #1e3a5f;
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

#wrapper.toggled #sidebar-wrapper { margin-left: -260px; }

.sidebar-heading {
    padding: 20px 18px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    background: #162d4a;
    letter-spacing: 0.5px;
}

#sidebar-wrapper .list-group-item {
    background: transparent;
    color: #b0c4de;
    border: none;
    padding: 13px 20px;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

#sidebar-wrapper .list-group-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: #2ecc71;
}

#sidebar-wrapper .list-group-item.active {
    background: rgba(46,204,113,0.15);
    color: #2ecc71;
    border-left-color: #2ecc71;
    font-weight: 600;
}

.sidebar-divider {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 8px 0;
}

#page-content-wrapper { flex: 1; min-width: 0; }

/* ===================== CARDS ===================== */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.stat-card .stat-icon {
    width: 56px; height: 56px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { color: #6c757d; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===================== STATUS BADGES ===================== */
.badge-pending    { background: #fff3cd; color: #856404; }
.badge-inprogress { background: #cfe2ff; color: #084298; }
.badge-completed  { background: #d1e7dd; color: #0a3622; }
.badge-approved   { background: #d4edda; color: #155724; }

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================== TABLES ===================== */
.table-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
}
.table-card .card-header {
    background: #fff;
    border-bottom: 2px solid #f0f2f5;
    padding: 16px 20px;
    font-weight: 600;
    color: #1e3a5f;
}
.table > thead { background: #f8f9fa; }
.table > thead th { border-bottom: 2px solid #dee2e6; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; color: #6c757d; }

/* ===================== LOGIN PAGE ===================== */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a5f 0%, #2980b9 100%);
    display: flex; align-items: center; justify-content: center;
}
.login-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}
.login-card .login-header {
    background: #1e3a5f;
    padding: 30px;
    text-align: center;
    color: #fff;
}
.login-card .login-header h2 { margin: 0; font-weight: 700; }
.login-card .login-body { padding: 30px; }

/* ===================== JOB DETAILS ===================== */
.job-step-badge {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #1e3a5f;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700;
}
.photo-preview { max-height: 200px; border-radius: 8px; object-fit: cover; }
.tab-pane { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.priority-low    { color: #198754; }
.priority-normal { color: #0d6efd; }
.priority-high   { color: #fd7e14; }
.priority-urgent { color: #dc3545; }

/* ===================== TIMER ===================== */
#jobTimer { font-size: 2.2rem; font-weight: 700; color: #1e3a5f; font-variant-numeric: tabular-nums; }

/* ===================== CHARTS ===================== */
.chart-card { border: none; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}