:root {
    --nrc-navy: #003366;
    --nrc-green: #2E8B57;
    --nrc-bg: #F4F4F4;
    --nrc-sidebar: #04382f;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--nrc-bg);
    color: #212529;
}

a { text-decoration: none; }

.text-primary-nrc { color: var(--nrc-navy); }

.btn-nrc {
    background-color: var(--nrc-green);
    border-color: var(--nrc-green);
    color: #fff;
}
.btn-nrc:hover, .btn-nrc:focus {
    background-color: #256e46;
    border-color: #256e46;
    color: #fff;
}

/* ---------------------------------------------------------------- */
/* Auth pages (login / verify / register)                            */
/* ---------------------------------------------------------------- */
.auth-page { background: var(--nrc-bg); }

.auth-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(rgba(0,51,102,.55), rgba(0,51,102,.55)),
        url('https://images.unsplash.com/photo-1500534623283-312aade485b7?q=80&w=1600&auto=format&fit=crop') center/cover no-repeat;
}
.auth-hero-wide { align-items: flex-start; background: var(--nrc-bg); }
.auth-hero-wide .card { background: #fff; }

.auth-card-wrap { width: 100%; max-width: 420px; }
.auth-card { border-radius: 16px; }
.auth-footer-note { text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* OTP boxes */
.otp-input-group { display: flex; gap: 10px; justify-content: center; }
.otp-box {
    width: 48px; height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 1px solid #ced4da;
    border-radius: 10px;
}
.otp-box:focus { border-color: var(--nrc-green); box-shadow: 0 0 0 .2rem rgba(46,139,87,.2); outline: none; }

/* Step indicator (register wizard) */
.step-indicator { display: flex; align-items: center; justify-content: center; }
.step-dot {
    width: 32px; height: 32px; border-radius: 50%;
    background: #e9ecef; color: #6c757d;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .9rem;
}
.step-dot.active { background: var(--nrc-green); color: #fff; }
.step-line { width: 40px; height: 2px; background: #e9ecef; }

/* Deployment map picker */
.deployment-map { height: 320px; border-radius: 10px; border: 1px solid #dee2e6; z-index: 0; }

/* ---------------------------------------------------------------- */
/* Signature (bundled Great Vibes - works offline on XAMPP)           */
/* ---------------------------------------------------------------- */
@font-face {
    font-family: 'Great Vibes';
    src: url('../fonts/GreatVibes-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.signature {
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    font-size: 1.45rem;
    line-height: 1.15;
    color: #24406b;
    letter-spacing: 0;
    padding: 1px 0;
    display: inline-block;
    transform: rotate(-2deg);
}
.signature-sm { font-size: 1.1rem; }

/* Register cells */
.cell-tag { font-size: .68rem; font-weight: 600; letter-spacing: .5px; }
.cell-absent { color: #b02a37; }
.cell-excused { color: #6c757d; }
.register-scroll th, .register-scroll td { white-space: nowrap; }
.register-scroll td.sig-cell { min-width: 130px; white-space: normal; text-align: center; }

/* ---------------------------------------------------------------- */
/* App shell (logged-in pages)                                       */
/* ---------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: 250px;
    background: var(--nrc-sidebar);
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    overflow-y: auto;
    z-index: 1030;
    transition: transform .2s ease;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    font-size: .85rem;
    line-height: 1.2;
}
.sidebar-brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; padding: 2px; }

.sidebar-nav { display: flex; flex-direction: column; padding: 12px 0; }
.sidebar-nav a {
    color: rgba(255,255,255,.85);
    padding: 11px 20px;
    display: flex; align-items: center; gap: 10px;
    font-size: .92rem;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: var(--nrc-green); color: #fff; font-weight: 600; }

.app-main { flex: 1; margin-left: 250px; display: flex; flex-direction: column; min-height: 100vh; }

.app-topbar {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 14px 24px;
    display: flex; align-items: center; gap: 14px;
    position: sticky; top: 0; z-index: 1020;
}
.topbar-title { font-weight: 700; font-size: 1.05rem; color: var(--nrc-navy); flex: 1; }

.app-content { padding: 24px; flex: 1; }
.app-footer { padding: 14px 24px; text-align: center; background: #fff; border-top: 1px solid #e9ecef; }

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
}

/* ---------------------------------------------------------------- */
/* Stat / dashboard cards                                             */
/* ---------------------------------------------------------------- */
.stat-card {
    border: none;
    border-radius: 14px;
    color: #fff;
    padding: 18px 20px;
}
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; }
.stat-card .stat-label { font-size: .85rem; opacity: .9; }
.stat-card-navy { background: var(--nrc-navy); }
.stat-card-green { background: var(--nrc-green); }
.stat-card-orange { background: #d97706; }
.stat-card-purple { background: #6d28d9; }

.chart-card { background: #fff; border-radius: 14px; padding: 20px; border: 1px solid #eef0f2; }

/* Report header (shared between screen print + PDF) */
.report-header { text-align: center; margin-bottom: 15px; }
.report-header img { height: 90px; }
.report-header h2 { font-size: 20px; font-weight: bold; margin: 8px 0 2px; letter-spacing: .5px; }
.report-header h3 { font-size: 15px; margin: 4px 0; font-weight: 600; }
.report-date-range { font-size: 13px; margin-top: 6px; }
.date-blank { display: inline-block; min-width: 90px; border-bottom: 1px solid #333; text-align: center; }

.table-report th, .table-report td { vertical-align: middle; }
