/* ============================================================
   National Education Standards Monitoring System
   Ministry of Education, Zambia
   Mobile-first Government-style CSS — v1.0
   ============================================================ */

/* -- CSS Variables ------------------------------------------ */
:root {
    --green-900:  #0d3d1f;
    --green-800:  #14532d;
    --green-700:  #166534;
    --green-600:  #1a7a3d;
    --green-500:  #1f9c4d;
    --green-100:  #dcfce7;
    --green-50:   #f0fdf4;

    --gold-600:   #b45309;
    --gold-500:   #d97706;
    --gold-400:   #f59e0b;
    --gold-100:   #fef3c7;
    --gold-50:    #fffbeb;

    --gray-900:   #111827;
    --gray-800:   #1f2937;
    --gray-700:   #374151;
    --gray-600:   #4b5563;
    --gray-500:   #6b7280;
    --gray-400:   #9ca3af;
    --gray-300:   #d1d5db;
    --gray-200:   #e5e7eb;
    --gray-100:   #f3f4f6;
    --gray-50:    #f9fafb;

    --red-600:    #dc2626;
    --red-100:    #fee2e2;
    --blue-600:   #2563eb;
    --blue-100:   #dbeafe;

    --sidebar-width: 260px;
    --navbar-height: 60px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow-sm:  0 1px 2px rgba(0,0,0,0.06);
    --shadow:     0 1px 6px rgba(0,0,0,0.10);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg:  0 8px 24px rgba(0,0,0,0.14);
    --transition: 0.22s ease;
}

/* -- Reset -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 0.92rem;
    color: var(--gray-800);
    background: var(--gray-100);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-600); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* -- Top Navbar --------------------------------------------- */
.top-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--navbar-height);
    background: var(--green-800);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.navbar-left { display: flex; align-items: center; gap: 0.75rem; }

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-radius: 4px;
}
.sidebar-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.1); }

.brand { display: flex; align-items: center; gap: 0.6rem; }

.brand-logo {
    width: 36px; height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gold-400);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-shield {
    font-weight: 700; font-size: 1rem;
    color: var(--green-900); display: none;
}
.brand-logo img[style*="display:none"] ~ .brand-shield { display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 0.95rem; font-weight: 700; color: #fff; }
.brand-sub  { font-size: 0.68rem; color: rgba(255,255,255,0.7); }

/* User Dropdown */
.navbar-right { display: flex; align-items: center; }

.user-dropdown { position: relative; }

.user-btn {
    display: flex; align-items: center; gap: 0.5rem;
    background: none; border: none; cursor: pointer;
    padding: 6px 10px; border-radius: var(--border-radius);
    transition: var(--transition);
    color: #fff;
}
.user-btn:hover { background: rgba(255,255,255,0.1); }

.user-avatar {
    width: 34px; height: 34px;
    background: var(--gold-400);
    color: var(--green-900);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.user-info { display: none; flex-direction: column; text-align: left; }
.user-name  { font-size: 0.82rem; font-weight: 600; color: #fff; }
.user-role  { font-size: 0.7rem; color: rgba(255,255,255,0.7); }
.dropdown-arrow { width: 16px; color: rgba(255,255,255,0.7); display: none; }

.dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: #fff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    border: 1px solid var(--gray-200);
    display: none; flex-direction: column;
    overflow: hidden; z-index: 2000;
}
.dropdown-menu.open { display: flex; }

.dropdown-header {
    padding: 0.85rem 1rem;
    background: var(--green-50);
    display: flex; flex-direction: column;
}
.dropdown-header strong { font-size: 0.88rem; color: var(--gray-800); }
.dropdown-header small  { font-size: 0.75rem; color: var(--gray-500); }
.dropdown-divider { height: 1px; background: var(--gray-200); }

.dropdown-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.7rem 1rem; color: var(--gray-700);
    font-size: 0.875rem; transition: var(--transition);
}
.dropdown-item svg { width: 16px; flex-shrink: 0; }
.dropdown-item:hover { background: var(--gray-50); color: var(--green-700); }
.dropdown-item-danger { color: var(--red-600); }
.dropdown-item-danger:hover { background: var(--red-100); color: var(--red-600); }

/* -- Sidebar ------------------------------------------------ */
.sidebar {
    position: fixed;
    top: var(--navbar-height); left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--green-900);
    z-index: 900;
    display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden;
    transform: translateX(-100%);
    transition: transform var(--transition);
    scrollbar-width: thin;
    scrollbar-color: var(--green-700) transparent;
}
.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 850;
}
.sidebar-overlay.show { display: block; }

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.sidebar-logo {
    display: flex; align-items: center; gap: 0.6rem;
}
.sidebar-logo-icon {
    background: var(--gold-400);
    color: var(--green-900);
    font-weight: 700; font-size: 0.75rem;
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sidebar-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-logo-text span { font-size: 0.88rem; font-weight: 600; color: #fff; }
.sidebar-logo-text small { font-size: 0.68rem; color: rgba(255,255,255,0.55); }

/* Sidebar Nav */
.sidebar-nav { flex: 1; padding: 0.5rem 0; }

.nav-section { margin-bottom: 0.25rem; }

.nav-section-title {
    font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    padding: 0.75rem 1rem 0.25rem;
}

.nav-list { list-style: none; }

.nav-item { position: relative; }

.nav-link {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.65rem 1rem;
    color: rgba(255,255,255,0.75);
    font-size: 0.875rem;
    border-radius: 0;
    transition: var(--transition);
    cursor: pointer;
    border: none; background: none; width: 100%; text-align: left;
}
.nav-link:hover, .nav-item.active > .nav-link {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.nav-item.active > .nav-link {
    border-left: 3px solid var(--gold-400);
    padding-left: calc(1rem - 3px);
}

.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.submenu-arrow {
    width: 14px; margin-left: auto;
    transition: transform var(--transition);
}
.nav-item.submenu-open > .nav-link .submenu-arrow { transform: rotate(180deg); }

.submenu {
    display: none; list-style: none;
    background: rgba(0,0,0,0.2);
}
.submenu.open { display: block; }
.submenu li a {
    display: block;
    padding: 0.55rem 1rem 0.55rem 2.8rem;
    color: rgba(255,255,255,0.65);
    font-size: 0.835rem;
    transition: var(--transition);
}
.submenu li a:hover, .submenu li a.active {
    color: #fff; background: rgba(255,255,255,0.08);
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 0.5rem 0;
    flex-shrink: 0;
}
.logout-link { color: rgba(255,255,255,0.6) !important; }
.logout-link:hover { background: rgba(220,38,38,0.2) !important; color: #fca5a5 !important; }

/* -- Main Layout -------------------------------------------- */
.main-wrapper {
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
    transition: margin-left var(--transition);
    display: flex; flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 1.25rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* -- Page Header -------------------------------------------- */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}
.page-title {
    font-size: 1.35rem; font-weight: 700;
    color: var(--green-800); margin-bottom: 0.25rem;
}
.breadcrumb {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.8rem; color: var(--gray-500);
}
.breadcrumb a { color: var(--green-600); }
.breadcrumb-sep { color: var(--gray-400); }

/* -- App Footer --------------------------------------------- */
.app-footer {
    background: var(--green-900);
    color: rgba(255,255,255,0.6);
    font-size: 0.78rem;
    padding: 0.8rem 1.25rem;
}
.footer-inner {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 0.5rem;
    max-width: 1400px; margin: 0 auto;
}
.footer-version { color: var(--gold-400); }

/* -- Dashboard Cards ---------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    display: flex; flex-direction: column; gap: 0.35rem;
    position: relative; overflow: hidden;
    transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--green-600);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}
.stat-card.gold::before { background: var(--gold-500); }
.stat-card.blue::before  { background: var(--blue-600); }
.stat-card.red::before   { background: var(--red-600); }

.stat-label { font-size: 0.78rem; color: var(--gray-500); font-weight: 500; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--gray-900); line-height: 1; }
.stat-icon  {
    position: absolute; top: 1rem; right: 1rem;
    color: var(--gray-200);
}
.stat-icon svg { width: 36px; height: 36px; }
.stat-sub { font-size: 0.75rem; color: var(--gray-400); }

/* -- Cards / Panels ----------------------------------------- */
.card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.card-header {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--gray-50);
}
.card-title {
    font-size: 0.95rem; font-weight: 600; color: var(--gray-800);
}
.card-body { padding: 1.25rem; }

/* -- Tables ------------------------------------------------- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
    width: 100%; border-collapse: collapse;
    font-size: 0.85rem;
}
.table th {
    background: var(--green-800);
    color: #fff;
    padding: 0.7rem 0.9rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
    color: var(--gray-700);
}
.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr:last-child td { border-bottom: none; }
.table-striped tbody tr:nth-child(even) { background: var(--gray-50); }

.no-data {
    text-align: center; padding: 3rem 1rem;
    color: var(--gray-400); font-size: 0.9rem;
}
.no-data svg { width: 48px; margin-bottom: 0.75rem; color: var(--gray-300); }

/* -- Buttons ------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem; font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer; transition: var(--transition);
    text-decoration: none; white-space: nowrap;
    line-height: 1.4;
}
.btn svg { width: 16px; flex-shrink: 0; }

.btn-primary   { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.btn-primary:hover { background: var(--green-800); border-color: var(--green-800); color: #fff; }

.btn-secondary { background: var(--gray-600); color: #fff; border-color: var(--gray-600); }
.btn-secondary:hover { background: var(--gray-700); color: #fff; }

.btn-gold    { background: var(--gold-500); color: #fff; border-color: var(--gold-500); }
.btn-gold:hover { background: var(--gold-600); color: #fff; }

.btn-danger  { background: var(--red-600); color: #fff; border-color: var(--red-600); }
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-outline  { background: transparent; color: var(--green-700); border-color: var(--green-700); }
.btn-outline:hover { background: var(--green-700); color: #fff; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* -- Forms -------------------------------------------------- */
.form-section {
    background: #fff;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.form-section-header {
    background: var(--green-800);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem; font-weight: 600;
    display: flex; align-items: center; gap: 0.5rem;
}
.form-section-body { padding: 1.25rem; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

.form-label {
    font-size: 0.825rem; font-weight: 600;
    color: var(--gray-700);
}
.form-label .required { color: var(--red-600); margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.875rem; color: var(--gray-800);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}
.form-control:focus {
    outline: none;
    border-color: var(--green-600);
    box-shadow: 0 0 0 3px rgba(26, 122, 61, 0.12);
}
.form-control::placeholder { color: var(--gray-400); }
.form-control:disabled { background: var(--gray-100); cursor: not-allowed; }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 16px; padding-right: 2.5rem; }

.form-text { font-size: 0.75rem; color: var(--gray-500); }
.form-error { font-size: 0.75rem; color: var(--red-600); }
.form-control.is-invalid { border-color: var(--red-600); }

/* Monitor officers row */
.monitor-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    margin-bottom: 0.75rem;
    position: relative;
}
.monitor-row-number {
    font-size: 0.75rem; font-weight: 700;
    color: var(--gray-500); margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* -- Alerts ------------------------------------------------- */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex; align-items: flex-start; gap: 0.6rem;
    font-size: 0.875rem;
    position: relative;
    border-left: 4px solid;
}
.alert-success { background: var(--green-50);  color: #166534; border-color: var(--green-600); }
.alert-danger  { background: var(--red-100);   color: #991b1b; border-color: var(--red-600);   }
.alert-warning { background: var(--gold-50);   color: #92400e; border-color: var(--gold-500);  }
.alert-info    { background: var(--blue-100);  color: #1e40af; border-color: var(--blue-600);  }
.alert-close {
    margin-left: auto; background: none; border: none;
    font-size: 1.2rem; cursor: pointer; color: inherit;
    opacity: 0.6; line-height: 1; padding: 0;
}
.alert-close:hover { opacity: 1; }

/* -- Badges ------------------------------------------------- */
.badge {
    display: inline-flex; align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-success { background: var(--green-100); color: #166534; }
.badge-danger  { background: var(--red-100);   color: #991b1b; }
.badge-warning { background: var(--gold-100);  color: #92400e; }
.badge-info    { background: var(--blue-100);  color: #1e40af; }
.badge-gray    { background: var(--gray-200);  color: var(--gray-700); }

/* -- Search / Filter Bar ------------------------------------ */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #fff;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.filter-bar .form-control { max-width: 200px; }
.filter-bar .btn { align-self: flex-end; }

/* -- Pagination --------------------------------------------- */
.pagination-nav { display: flex; justify-content: center; margin-top: 1.5rem; }
.pagination { display: flex; gap: 0.25rem; list-style: none; flex-wrap: wrap; }
.pagination li a, .pagination li span {
    display: flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 0.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-300);
    font-size: 0.825rem; color: var(--gray-700);
    transition: var(--transition);
}
.pagination li a:hover { background: var(--green-50); border-color: var(--green-600); color: var(--green-700); }
.pagination li.active a { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* -- Login Page --------------------------------------------- */
.login-wrapper {
    min-height: 100vh;
    display: flex; flex-direction: column;
    background: var(--gray-100);
}
.login-header-bar {
    background: var(--green-900);
    padding: 0.75rem 1.25rem;
    display: flex; align-items: center; gap: 0.6rem;
}
.login-header-bar .brand-name { color: #fff; font-size: 0.9rem; font-weight: 700; }
.login-header-bar .brand-sub  { color: rgba(255,255,255,0.65); font-size: 0.72rem; }

.login-body {
    flex: 1; display: flex;
    align-items: center; justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%; max-width: 420px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.login-card-header {
    background: var(--green-800);
    padding: 2rem 1.75rem 1.5rem;
    text-align: center;
}
.login-emblem {
    width: 70px; height: 70px;
    margin: 0 auto 1rem;
    background: var(--gold-400);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 900; color: var(--green-900);
    border: 3px solid rgba(255,255,255,0.3);
}
.login-title { color: #fff; font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.login-subtitle { color: rgba(255,255,255,0.7); font-size: 0.78rem; margin-top: 0.35rem; }

.login-card-body { padding: 1.75rem; }

.login-form-title {
    font-size: 0.9rem; font-weight: 600;
    color: var(--gray-700); margin-bottom: 1.25rem;
    text-align: center;
}

.login-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 0.85rem 1.25rem;
    text-align: center;
    font-size: 0.75rem; color: var(--gray-500);
}

/* -- Utility ------------------------------------------------ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--gray-500); }
.text-small  { font-size: 0.8rem; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* -- Install Page ------------------------------------------- */
.install-wrapper {
    min-height: 100vh; background: var(--gray-100);
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
}
.install-card {
    background: #fff; max-width: 560px; width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg); overflow: hidden;
    border: 1px solid var(--gray-200);
}
.install-header {
    background: var(--green-800); color: #fff;
    padding: 1.5rem; text-align: center;
}
.install-header h1 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.install-header p { font-size: 0.8rem; opacity: 0.75; }
.install-body { padding: 1.5rem; }
.install-step {
    display: flex; gap: 0.75rem; align-items: flex-start;
    padding: 0.75rem; border-radius: var(--border-radius);
    margin-bottom: 0.5rem; border: 1px solid var(--gray-200);
}
.step-icon {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.8rem; font-weight: 700;
}
.step-ok   { background: var(--green-100); color: #166534; }
.step-fail { background: var(--red-100);   color: #991b1b; }
.step-text strong { font-size: 0.85rem; display: block; }
.step-text small  { font-size: 0.75rem; color: var(--gray-500); }

/* ============================================================
   RESPONSIVE — Tablet (min-width: 768px)
   ============================================================ */
@media (min-width: 768px) {
    .user-info, .dropdown-arrow { display: flex; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .form-grid  { grid-template-columns: repeat(2, 1fr); }
    .monitor-row { grid-template-columns: 1fr 1fr; }
    .filter-bar .form-control { max-width: 180px; }
}

/* ============================================================
   RESPONSIVE — Desktop (min-width: 1024px)
   ============================================================ */
@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0); /* always visible on desktop */
    }
    .main-wrapper { margin-left: var(--sidebar-width); }
    .sidebar-overlay { display: none !important; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .form-grid  { grid-template-columns: repeat(3, 1fr); }
    .form-grid-2 { grid-template-columns: repeat(2, 1fr); }
    .monitor-row { grid-template-columns: repeat(4, 1fr); }
    .main-content { padding: 1.75rem 2rem; }
}

@media (min-width: 1280px) {
    .stats-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ============================================================
   Print styles
   ============================================================ */
@media print {
    .top-navbar, .sidebar, .sidebar-overlay, .btn, .app-footer,
    .filter-bar, .pagination-nav { display: none !important; }
    .main-wrapper { margin-left: 0; }
    .main-content { padding: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}
