/* ==================================================================
   Nabadiganta Adarsha High School — Teacher Attendance System
   style.css  (all base + component styles live here)
   ================================================================== */

:root {
    --primary: #1b3a6b;
    --primary-dark: #132c52;
    --primary-soft: #eaf0f9;
    --accent: #e0a92e;
    --accent-dark: #c4901c;
    --bg: #f4f6fb;
    --surface: #ffffff;
    --text: #1b2433;
    --muted: #6b7488;
    --border: #e3e8f0;
    --success: #2f9e6f;
    --danger: #d65745;
    --sidebar-w: 260px;
    --header-h: 100px;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(27, 36, 51, 0.06);
    --shadow-md: 0 10px 30px -18px rgba(27, 36, 51, 0.45);
}

/* ---------- Base ---------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
.display-font {
    font-family: "Sora", system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

a {
    text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn-brand {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    transition:
        background 0.18s,
        transform 0.18s,
        box-shadow 0.18s;
}
.btn-brand:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-accent {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #2b2300;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    transition:
        background 0.18s,
        transform 0.18s;
}
.btn-accent:hover {
    background: var(--accent-dark);
    color: #2b2300;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ---------- Brand mark ---------- */
.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--primary-dark);
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Logo image (drop a file at public/assets/img/logo.png to use it) */
.brand-logo {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
    padding: 3px;
    flex-shrink: 0;
}
.auth-head .brand-logo {
    display: block;
    margin: 0 auto 0.9rem;
}

/* ==================================================================
   WELCOME PAGE
   ================================================================== */
.welcome-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 0;
}
.welcome-nav .school-name {
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
}

.hero {
    position: relative;
    min-height: 100vh;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            rgba(19, 44, 82, 0.96) 0%,
            rgba(27, 58, 107, 0.92) 100%
        ),
        radial-gradient(110% 120% at 100% 0%, #2a5197 0%, transparent 60%);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.035) 0 1px,
        transparent 1px 30px
    );
    pointer-events: none;
}
.hero-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 0;
    max-width: 720px;
}
.hero-eyebrow {
    display: inline-block;
    background: rgba(224, 169, 46, 0.18);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.2rem;
    width: fit-content;
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.08;
    margin: 0 0 1rem;
}
.hero p.lead {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.12rem;
    max-width: 560px;
    margin-bottom: 2rem;
}
.hero-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}
.feature-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 1.4rem;
    backdrop-filter: blur(4px);
}
.feature-card .icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(224, 169, 46, 0.18);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.feature-card h3 {
    font-size: 1.02rem;
    margin: 0 0 0.3rem;
    color: #fff;
}
.feature-card p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
    margin: 0;
}

.hero-footer {
    position: relative;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    padding: 1.4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================================================================
   LOGIN PAGE
   ================================================================== */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(
            80% 120% at 100% 0%,
            rgba(27, 58, 107, 0.08) 0%,
            transparent 55%
        ),
        var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 2.4rem;
}
.auth-head {
    text-align: center;
    margin-bottom: 1.8rem;
}
.auth-head .brand-badge {
    margin: 0 auto 0.9rem;
}
.auth-head .school {
    font-size: 0.92rem;
    color: var(--muted);
    font-weight: 600;
}
.auth-head h1 {
    font-size: 1.55rem;
    margin: 0.4rem 0 0.2rem;
}
.auth-head p {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

.form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
}
.form-control {
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 0.7rem 0.9rem;
    background: #fbfcfe;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.22rem rgba(27, 58, 107, 0.14);
    background: #fff;
}
.pw-wrap {
    position: relative;
}
.pw-toggle {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
}
.auth-demo {
    margin-top: 1.3rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
}
.back-home {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.88rem;
}

/* ==================================================================
   APP SHELL  (header + sidebar + main)
   ================================================================== */

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.4rem;
    z-index: 1030;
}
.app-header .left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.app-header .school-title {
    font-weight: 700;
    font-size: 1rem;
}
.app-header .school-title small {
    display: block;
    font-weight: 500;
    font-size: 0.72rem;
    color: var(--muted);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 9px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    color: var(--text);
    cursor: pointer;
}

.user-menu .user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 999px;
    padding: 0.3rem 0.35rem 0.3rem 0.9rem;
    cursor: pointer;
}
.user-menu .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}
.user-menu .uname {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Sidebar */
.app-sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--primary);
    color: #fff;
    padding: 1.2rem 0.9rem;
    overflow-y: auto;
    z-index: 1020;
    transition: transform 0.25s ease;
}
.sidebar-section {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    padding: 0.8rem 0.8rem 0.4rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}
.sidebar-link .ic {
    width: 20px;
    text-align: center;
    opacity: 0.9;
}
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.sidebar-link.active {
    background: var(--accent);
    color: var(--primary-dark);
    font-weight: 700;
}
.sidebar-link.disabled {
    opacity: 0.45;
    pointer-events: none;
}
.sidebar-link .soon {
    margin-left: auto;
    font-size: 0.62rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1015;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}
.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Main */
.app-main {
    margin-left: var(--sidebar-w);
    padding: calc(var(--header-h) + 1.6rem) 1.8rem 2rem;
    min-height: 100vh;
}

.page-title {
    font-size: 1.5rem;
    margin: 0;
}
.page-sub {
    color: var(--muted);
    margin: 0.2rem 0 0;
}

/* Cards */
.card-soft {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.stat-card {
    padding: 1.3rem;
}
.stat-card .label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}
.stat-card .value {
    font-family: "Sora", sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    margin-top: 0.3rem;
}
.stat-card .pill {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.placeholder-panel {
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    background: #fbfcfe;
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--muted);
}
.placeholder-panel .big-ic {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 1rem;
}
.placeholder-panel h3 {
    color: var(--text);
    margin-bottom: 0.3rem;
}

/* Utility */
.fade-up {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.5s ease forwards;
}
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: none;
    }
}

/* ===== TEACHERS MODULE ===== */
.breadcrumb-mini {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.2rem;
}
.breadcrumb-mini a {
    color: var(--primary);
    font-weight: 600;
}
.breadcrumb-mini i {
    font-size: 0.7rem;
}

.search-box {
    position: relative;
    max-width: 320px;
    width: 100%;
}
.search-box i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.9rem;
}
.search-box .form-control {
    padding-left: 2.3rem;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.avatar-initial {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.82rem;
    flex-shrink: 0;
}
.avatar-initial.lg {
    width: 110px;
    height: 110px;
    font-size: 2rem;
    border-radius: 18px;
}

.desig-pill,
.status-pill {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
    font-size: 0.82rem;
}
.btn-edit {
    color: var(--accent-dark);
    border-color: #f0e2c2;
    background: #fdf7ea;
}
.btn-edit:hover {
    background: var(--accent);
    color: #2b2300;
}
.btn-del {
    color: var(--danger);
    border-color: #f3d3cd;
    background: #fdeeeb;
}
.btn-del:hover {
    background: var(--danger);
    color: #fff;
}

.photo-uploader .photo-preview {
    width: 100px;
    height: 120px;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 0.8rem;
    border: 1px solid var(--border);
    background: #fbfcfe;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-uploader .photo-preview img {
    width: 100%;
    height: 100%;
    object-position: top;
    object-fit: cover;
}

.pagination {
    margin: 0;
}
.pagination .page-link {
    color: var(--primary);
    border-color: var(--border);
    border-radius: 9px;
    margin: 0 2px;
    min-width: 38px;
    text-align: center;
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pagination .page-link:focus {
    box-shadow: none;
}
/* ===== MONTHLY ATTENDANCE GRID ===== */
/* ===================== MONTHLY REPORT SHEET ===================== */
.report-sheet {
    background: #fff;
    color: #111;
    font-size: 12px;
}

/* Header */
.report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 6px 10px 10px;
}
.report-head .rh-month,
.report-head .rh-year {
    font-size: 14px;
    padding-top: 18px;
    white-space: nowrap;
}
.report-head .rh-center {
    text-align: center;
    flex: 1;
}
.report-head .rh-school {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    border-bottom: 3px double #111;
    display: inline-block;
    padding: 0 14px 4px;
}
.report-head .rh-title {
    font-size: 18px;
    font-weight: 700;
    margin: 6px 0 0;
}

/* Grid */
.report-grid-wrap {
    overflow-x: auto;
}
.report-grid {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}
.report-grid th,
.report-grid td {
    border: 0.5px solid #c9c9c9;
    text-align: center;
    vertical-align: middle;
    padding: 2px;
}
.report-grid thead th {
    background: #fff;
    font-weight: 600;
    font-size: 11px;
}
.report-grid .c-sl {
    width: 26px;
}
.report-grid .c-name {
    width: 118px;
    text-align: left;
    padding-left: 6px;
}
.report-grid .c-day {
    width: 30px;
    position: relative;
    line-height: 1.15;
}
.report-grid .c-tot {
    width: 40px;
    font-weight: 700;
    font-size: 13px;
}

.report-grid .c-day.wknd {
    color: #d11;
}
.report-grid .c-day.io {
    font-size: 8.5px;
}
.report-grid .io-in {
    color: #1a7f4b;
    margin-right: 3px;
}
.report-grid .io-out {
    color: #c0392b;
}

.report-grid .tn-name {
    font-weight: 600;
    font-size: 12px;
}
.report-grid .tn-desig {
    font-size: 10px;
    color: #666;
}

.report-grid .t-in {
    color: #1a7f4b;
    font-weight: 600;
}
.report-grid .t-out {
    color: #1b3a6b;
    font-weight: 600;
}
.report-grid .t-late {
    color: #c0392b;
    font-weight: 700;
    font-size: 9px;
}
.report-grid .mk-a {
    color: #c0392b;
    font-weight: 700;
}
.report-grid .mk-lv {
    color: #1d4ed8;
    font-weight: 700;
}
.report-grid .mk-e {
    color: #bbb;
}
.report-grid .tp {
    color: #1a7f4b;
}
.report-grid .ta {
    color: #c0392b;
}
.report-grid .tl {
    color: #c98a00;
}

/* Header tint for off blocks */
.report-grid th.hol-head {
    background: #fdeceb;
    color: #c0392b;
}
.report-grid th.wo-head {
    background: #f1f1f4;
    color: #5f6470;
}

/* Merged off cells + centered vertical label */
.report-grid td.offcell {
    padding: 0;
    overflow: visible;
}
.report-grid .vlabel-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    pointer-events: none;
}
.report-grid .vlabel {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: 700;
    white-space: nowrap;
}
.report-grid .vlabel.hol {
    color: #c0392b;
    font-size: 11px;
}
.report-grid .vlabel.wo {
    color: #5f6470;
    font-size: 10px;
}

/* Footer blocks */
.report-foot {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.rf-legend {
    flex: 1;
    border: 1px solid #c9c9c9;
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.rf-summary {
    flex: 1.2;
    border: 1px solid #c9c9c9;
    display: flex;
}
.rf-summary > div {
    flex: 1;
    border-left: 1px solid #c9c9c9;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-weight: 600;
}
.rf-summary > div:first-child {
    border-left: none;
}
.rf-summary b {
    font-size: 18px;
}

.report-pct {
    display: flex;
    border: 1px solid #c9c9c9;
    margin-top: 8px;
}
.report-pct > div {
    flex: 1;
    border-left: 1px solid #c9c9c9;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.report-pct > div:first-child {
    border-left: none;
}
.report-pct b {
    font-size: 18px;
}

/* .report-sign {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    padding: 0 6px;
}
.report-sign .sign-line {
    display: inline-block;
    width: 220px;
    border-bottom: 1px solid #111;
} */
.report-sign {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 24px;
}
.report-sign .sig-box {
    flex: 1;
    text-align: center;
}
.report-sign .sig-space {
    height: 46px; /* blank room to sign */
}
.report-sign .sig-label {
    border-top: 1px solid #000;
    padding-top: 6px;
    font-size: 13px;
}

/* ===================== PRINT: A4 landscape, fit 2 pages ===================== */
@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }
    body {
        background: #fff;
    }
    .app-sidebar,
    .app-header,
    .menu-toggle,
    .no-print,
    .sidebar-backdrop {
        display: none !important;
    }
    .app-main {
        margin: 0 !important;
        padding: 0 !important;
    }
    .report-sheet {
        font-size: 9px;
    }
    .report-head .rh-school {
        font-size: 24px;
    }
    .report-head .rh-title {
        font-size: 15px;
    }
    .report-grid th,
    .report-grid td {
        padding: 1px;
    }
    .report-grid .c-day {
        width: auto;
    }
    .report-grid .tn-name {
        font-size: 9px;
    }
    .report-grid .tn-desig {
        font-size: 7.5px;
    }
    .report-grid .t-late,
    .report-grid .io {
        font-size: 7px;
    }
    /* keep the table from splitting awkwardly */
    .report-grid {
        page-break-inside: auto;
    }
    .report-grid tr {
        page-break-inside: avoid;
    }
    .report-foot,
    .report-pct,
    .report-sign {
        page-break-inside: avoid;
    }
}
/* show/hide by medium */
.print-only {
    display: none;
}
@media screen {
    .screen-only {
        display: block;
    }
}

/* Screen grid scrolls; sticky first columns */
.report-grid-wrap {
    overflow-x: auto;
}
.report-grid {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
}
.report-grid th,
.report-grid td {
    border: 0.5px solid #c9c9c9;
    text-align: center;
    vertical-align: middle;
    padding: 4px 3px;
}
.report-grid thead th {
    background: #f7f9fc;
    font-weight: 600;
    font-size: 11px;
}
.report-grid .c-sl {
    width: 34px;
}
.report-grid .c-name {
    width: 180px;
    text-align: left;
    padding-left: 10px;
}
.report-grid .c-day {
    width: 46px;
}
.report-grid .c-tot {
    width: 54px;
    font-weight: 700;
}
.report-grid .c-day.wknd {
    color: #d11;
}
.report-grid .tn-name {
    font-weight: 600;
    font-size: 12px;
}
.report-grid .tn-desig {
    font-size: 10px;
    color: #666;
}
.report-grid .t-in {
    color: #1a7f4b;
    font-weight: 600;
}
.report-grid .t-out {
    color: #1b3a6b;
    font-weight: 600;
}
.report-grid .t-late {
    color: #c0392b;
    font-weight: 700;
    font-size: 9px;
}
.report-grid .mk-a {
    color: #c0392b;
    font-weight: 700;
}
.report-grid .mk-lv {
    color: #1d4ed8;
    font-weight: 700;
}
.report-grid .mk-e {
    color: #cbd2dd;
}
.report-grid .tp {
    color: #1a7f4b;
}
.report-grid .ta {
    color: #c0392b;
}
.report-grid .tl {
    color: #c98a00;
}

/* sticky teacher columns (screen) */
.report-grid .c-sl,
.report-grid .c-name {
    position: sticky;
    background: #fff;
    z-index: 2;
}
.report-grid thead .c-sl,
.report-grid thead .c-name {
    z-index: 3;
    background: #f7f9fc;
}
.report-grid .c-sl {
    left: 0;
}
.report-grid .c-name {
    left: 34px;
}

/* off-blocks: one tall+wide cell with single centered vertical label */
.report-grid td.offcell {
    padding: 0;
    vertical-align: middle;
    text-align: center;
}
.report-grid td.hol-block {
    background: #fdeceb;
}
.report-grid td.wo-block {
    background: #f1f1f4;
}
.report-grid th.hol-head {
    background: #fdeceb;
    color: #c0392b;
}
.report-grid th.wo-head {
    background: #f1f1f4;
    color: #5f6470;
}
.report-grid .vlabel {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.report-grid .vlabel.hol {
    color: #c0392b;
    font-size: 13px;
}
.report-grid .vlabel.wo {
    color: #5f6470;
    font-size: 12px;
}

/* header / footer blocks */
.report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 4px 8px 8px;
}
.report-head .rh-month,
.report-head .rh-year {
    font-size: 13px;
    padding-top: 14px;
    white-space: nowrap;
}
.report-head .rh-center {
    text-align: center;
    flex: 1;
}
.report-head .rh-school {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    border-bottom: 3px double #111;
    display: inline-block;
    padding: 0 12px 3px;
}
.report-head .rh-title {
    font-size: 15px;
    font-weight: 700;
    margin: 5px 0 0;
}
.report-foot {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.rf-legend {
    flex: 1;
    border: 1px solid #c9c9c9;
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
.rf-summary {
    flex: 1.2;
    border: 1px solid #c9c9c9;
    display: flex;
}
.rf-summary > div {
    flex: 1;
    border-left: 1px solid #c9c9c9;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}
.rf-summary > div:first-child {
    border-left: none;
}
.rf-summary b {
    font-size: 16px;
}
.report-pct {
    display: flex;
    border: 1px solid #c9c9c9;
    margin-top: 6px;
}
.report-pct > div {
    flex: 1;
    border-left: 1px solid #c9c9c9;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.report-pct > div:first-child {
    border-left: none;
}
.report-pct b {
    font-size: 16px;
}
.report-sign {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding: 0 6px;
}
.report-sign .sign-line {
    display: inline-block;
    width: 220px;
    border-bottom: 1px solid #111;
}

/* ===== PRINT ===== */
@media print {
    @page {
        size: landscape;
        margin: 8mm;
    }

    .app-sidebar,
    .app-header,
    .menu-toggle,
    .no-print,
    .screen-only,
    .sidebar-backdrop {
        display: none !important;
    }
    .app-main {
        margin: 0 !important;
        padding: 0 !important;
    }
    .print-only {
        display: block !important;
    }

    .print-page {
        page-break-after: always;
        display: flex;
        flex-direction: column;
        min-height: 188mm;
    }
    .print-page:last-child {
        page-break-after: auto;
    }

    .print-bottom {
        margin-top: auto;
        width: 100% !important;
    }
    .print-pageno {
        width: 100% !important;
        text-align: center !important;
        font-size: 12px;
        color: #111;
    }

    .report-sign {
        display: flex;
        justify-content: space-between;
        padding: 0 6px;
        margin-top: 100px;
        margin-bottom: 6px;
    }
    .report-sign .sign-line {
        display: inline-block;
        width: 240px;
        border-bottom: 1px solid #111;
    }
    .print-pageno {
        text-align: center;
        font-size: 12px;
        color: #111;
    }

    .report-head-print {
        text-align: center;
        margin-bottom: 10px;
    }
    .report-head-print .rhp-school {
        font-size: 20px;
        font-weight: 800;
        margin: 0;
        color: #111;
    }
    .report-head-print .rhp-title {
        font-size: 15px;
        font-weight: 600;
        margin: 2px 0 0;
        color: #111;
    }
    .report-head-print .rhp-meta {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        margin-top: 10px;
        color: #111;
    }

    /* ---- PRINT GRID (self-contained) ---- */
    .print-grid {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
    }
    .print-grid th,
    .print-grid td {
        border: 0.5px solid #999;
        padding: 4px 2px;
        text-align: center;
        vertical-align: middle;
        overflow: hidden;
    }
    .print-grid .c-name {
        text-align: left;
        padding-left: 8px;
    }
    .print-grid thead th {
        background: #f3f4f6;
        font-weight: 700;
        font-size: 12px;
    }
    .print-grid .c-sl {
        font-size: 12px;
    }
    .print-grid .c-tot {
        font-weight: 700;
        font-size: 12px;
    }
    .print-grid .tn-name {
        font-weight: 700;
        font-size: 10px;
    }
    .print-grid .tn-desig {
        font-size: 10px;
        color: #444;
    }
    .print-grid .t-in {
        color: #1a7f4b;
        font-weight: 600;
        font-size: 10px;
    }
    .print-grid .t-out {
        color: #c0392b;
        font-weight: 600;
        font-size: 10px;
    }
    .print-grid .t-late {
        color: #c98a00;
        font-weight: 700;
        font-size: 10px;
    }
    .print-grid .mk-a {
        color: #c0392b;
        font-weight: 700;
    }
    .print-grid .mk-lv {
        color: #1d4ed8;
        font-weight: 700;
    }
    .print-grid .mk-e {
        color: #bbb;
    }
    .print-grid .tp {
        color: #1a7f4b;
    }
    .print-grid .ta {
        color: #c0392b;
    }
    .print-grid .tl {
        color: #c98a00;
    }

    .print-grid td.offcell {
        padding: 0;
    }
    .print-grid td.hol-block {
        background: #fdeceb;
        border: 0.5px solid #e8a89f;
    }
    .print-grid td.wo-block {
        background: #f1f1f4;
        border: 0.5px solid #cdced4;
    }
    .print-grid th.hol-head {
        background: #fdeceb;
        color: #c0392b;
    }
    .print-grid th.wo-head {
        background: #f1f1f4;
        color: #5f6470;
    }
    .print-grid .vlabel {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        font-weight: 700;
        white-space: nowrap;
    }
    .print-grid .vlabel.hol {
        color: #c0392b;
        font-size: 13px;
    }
    .print-grid .vlabel.wo {
        color: #5f6470;
        font-size: 12px;
    }
}

/* teacher  */
.form-control,
.form-select {
    background-color: #f8fafc;
    border: 1px solid #e6e9f0;
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    min-height: 44px;
    font-size: 0.95rem;
    color: #1b3a6b;
}
.form-control:focus,
.form-select:focus {
    background-color: #fff;
    border-color: #1b3a6b;
    box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.12);
    outline: none;
}
