/* Ovium ERP — interface theme (Bootstrap 5.3 layer)
   Ink navy shell, signal blue for action, school-bus saffron for the things that need a look. */
@font-face { font-family: "Lexend"; src: url("../fonts/lexend-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Sans Devanagari"; src: url("../fonts/noto-sans-devanagari-devanagari-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Noto Sans Kannada"; src: url("../fonts/noto-sans-kannada-kannada-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0C80-0CF3, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Tamil"; src: url("../fonts/noto-sans-tamil-tamil-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0B82-0BFA, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Telugu"; src: url("../fonts/noto-sans-telugu-telugu-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0C00-0C7F, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Malayalam"; src: url("../fonts/noto-sans-malayalam-malayalam-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0D00-0D7F, U+200C-200D, U+25CC; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

:root {
  --ov-ink: #101b3b;
  --ov-ink-2: #1a2853;
  --ov-blue: #2456e6;
  --ov-blue-dark: #1b44bd;
  --ov-saffron: #f2a01e;
  --ov-paper: #f3f5fa;
  --ov-line: #e2e6f0;
  --ov-text: #1a2238;
  --ov-muted: #5e6880;
  --ov-green: #12855a;
  --ov-red: #c8372d;
  --ov-violet: #6a4bd8;
  --ov-teal: #0e8a94;
  --ov-sidebar: 256px;
  --bs-primary: #2456e6;
  --bs-primary-rgb: 36, 86, 230;
  --bs-body-font-family: "Source Sans 3", "Noto Sans Devanagari", "Noto Sans Kannada", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Malayalam", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: 1rem;
  --bs-body-color: #1a2238;
  --bs-border-color: #e2e6f0;
  --bs-link-color: #2456e6;
  --bs-link-color-rgb: 36, 86, 230;
  --bs-link-hover-color: #1b44bd;
  --bs-border-radius: .5rem;
  --bs-success: #12855a; --bs-success-rgb: 18, 133, 90;
  --bs-danger: #c8372d; --bs-danger-rgb: 200, 55, 45;
  --bs-warning: #f2a01e; --bs-warning-rgb: 242, 160, 30;
}

body { -webkit-font-smoothing: antialiased; background: var(--ov-paper); }
h1, h2, h3, h4, h5, h6, .display-font, .navbar-brand, .stat-value { font-family: "Lexend", "Noto Sans Devanagari", "Noto Sans Kannada", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Malayalam", system-ui, sans-serif; letter-spacing: -.01em; }
h1, .h1 { font-size: 1.6rem; font-weight: 600; }
h2, .h2 { font-size: 1.3rem; font-weight: 600; }
h3, .h3 { font-size: 1.1rem; font-weight: 600; }
h4, .h4, h5, .h5, h6, .h6 { font-size: 1rem; font-weight: 600; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn, .nav-link, .dropdown-item, .page-link, .side-link, a.card { text-decoration: none !important; }
.text-muted, .text-secondary { color: var(--ov-muted) !important; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid rgba(36, 86, 230, .45); outline-offset: 2px; }

/* Buttons */
.btn { font-weight: 600; border-radius: .5rem; padding: .45rem .95rem; white-space: nowrap; }
.btn-sm { padding: .28rem .65rem; font-size: .9rem; }
.btn-primary { --bs-btn-bg: var(--ov-blue); --bs-btn-border-color: var(--ov-blue); --bs-btn-hover-bg: var(--ov-blue-dark); --bs-btn-hover-border-color: var(--ov-blue-dark); --bs-btn-active-bg: #173a9f; --bs-btn-active-border-color: #173a9f; --bs-btn-disabled-bg: var(--ov-blue); --bs-btn-disabled-border-color: var(--ov-blue); }
.btn-outline-primary { --bs-btn-color: var(--ov-blue); --bs-btn-border-color: #b9c8f6; --bs-btn-hover-bg: var(--ov-blue); --bs-btn-hover-border-color: var(--ov-blue); --bs-btn-active-bg: var(--ov-blue-dark); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--ov-line); --bs-btn-hover-bg: #eef1f8; --bs-btn-hover-border-color: #cfd6e6; }
.btn-accent { background: var(--ov-saffron); border-color: var(--ov-saffron); color: #2b1c00; }
.btn-accent:hover { background: #dd8f12; border-color: #dd8f12; color: #2b1c00; }
.btn-icon { width: 2.1rem; height: 2.1rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--ov-sidebar); background: var(--ov-ink); color: #c6cee6; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1040; transition: transform .2s ease; }
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: 1.05rem 1.15rem; color: #fff; font-family: "Lexend", sans-serif; font-weight: 600; font-size: 1.15rem; text-decoration: none !important; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.sidebar-school { margin: 0 .85rem .6rem; padding: .6rem .75rem; border-radius: .5rem; background: var(--ov-ink-2); font-size: .9rem; line-height: 1.25; }
.sidebar-school strong { color: #fff; display: block; font-weight: 600; }
.sidebar-nav { overflow-y: auto; flex: 1; padding: .25rem .65rem 1rem; scrollbar-width: thin; scrollbar-color: #33427a transparent; }
.side-group { font-size: .78rem; color: #8492bd; padding: .9rem .55rem .3rem; font-weight: 600; }
.side-link { display: flex; align-items: center; gap: .7rem; padding: .48rem .65rem; border-radius: .45rem; color: #c6cee6; font-size: .97rem; margin-bottom: 1px; }
.side-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; color: #8fa0d6; }
.side-link:hover { background: rgba(36, 86, 230, .38); color: #fff; }
.side-link:hover i { color: #fff; }
.side-link.active { background: var(--ov-blue); color: #fff; font-weight: 600; }
.side-link.active i { color: #fff; }
.side-link .badge { margin-left: auto; }
.sidebar-foot { padding: .7rem 1.15rem; font-size: .78rem; color: #7f8cb8; border-top: 1px solid #22305f; }
.main { flex: 1; margin-left: var(--ov-sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: #fff; border-bottom: 1px solid var(--ov-line); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; position: sticky; top: 0; z-index: 1020; }
.topbar-title { font-family: "Lexend", sans-serif; font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { padding: 1.4rem 1.5rem 2rem; flex: 1; }
.page-foot { padding: .9rem 5.5rem .9rem 1.5rem; color: var(--ov-muted); font-size: .88rem; border-top: 1px solid var(--ov-line); background: #fff; display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: space-between; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ov-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .85rem; font-family: "Lexend", sans-serif; flex: none; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-soft { background: #e4eaff; color: var(--ov-blue-dark); }
.child-switch { min-width: 9.5rem; max-width: 13rem; padding-right: 2rem; text-overflow: ellipsis; }
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(16, 27, 59, .35); }
  .sidebar.open + .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(16, 27, 59, .45); z-index: 1035; }
  .main { margin-left: 0; }
  .content { padding: 1rem .9rem 1.5rem; }
  .topbar { padding: 0 .8rem; }
  .child-switch { min-width: 0; max-width: 8.2rem; }
  .page-head .actions { margin-left: 0; }
  .page-foot { padding: .8rem .9rem; }
}

/* Page head */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: 1.1rem; }
.page-head h1 { margin: 0; }
.page-head .lead-note { color: var(--ov-muted); margin: .15rem 0 0; }
.page-head .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; }

/* Panels */
.card { border: 1px solid var(--ov-line); border-radius: .7rem; box-shadow: 0 1px 2px rgba(16, 27, 59, .04); }
.card-header { background: #fff; border-bottom: 1px solid var(--ov-line); padding: .8rem 1.1rem; font-family: "Lexend", sans-serif; font-weight: 600; border-radius: .7rem .7rem 0 0 !important; display: flex; align-items: center; gap: .6rem; }
.card-header .btn, .card-header a.small { margin-left: auto; font-family: "Source Sans 3", sans-serif; }
.card-body { padding: 1.1rem; }

/* Greeting banner with the school-day ruler */
.daybar { background: var(--ov-ink); color: #fff; border-radius: .9rem; padding: 1.35rem 1.5rem 1.15rem; margin-bottom: 1.25rem; position: relative; overflow: hidden; }
.daybar h1 { color: #fff; font-size: 1.5rem; margin: 0 0 .2rem; }
.daybar p { color: #b9c4e8; margin: 0; }
.daybar .trial-chip { background: var(--ov-saffron); color: #2b1c00; border-radius: 2rem; padding: .2rem .8rem; font-weight: 600; font-size: .9rem; display: inline-block; }
.ruler { margin-top: 1.1rem; }
.ruler-track { position: relative; height: 38px; border-radius: .45rem; background: #1b2a5a; overflow: hidden; }
.ruler-slot { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--ov-ink); background: #2a3d7e; color: #dfe6ff; font-size: .82rem; padding: 0 .45rem; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.ruler-slot.now { background: var(--ov-blue); color: #fff; font-weight: 600; }
.ruler-slot.break { background: #1b2a5a; color: #8492bd; }
.ruler-now { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--ov-saffron); border-radius: 2px; z-index: 2; }
.ruler-scale { display: flex; justify-content: space-between; font-size: .78rem; color: #8492bd; margin-top: .3rem; font-variant-numeric: tabular-nums; }

/* Stat tiles */
.stat { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--ov-line); border-radius: .7rem; padding: .95rem 1.05rem; height: 100%; color: inherit; }
a.stat:hover { border-color: #b9c8f6; }
.stat-icon { width: 46px; height: 46px; border-radius: .6rem; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex: none; background: #e4eaff; color: var(--ov-blue); }
.stat-label { color: var(--ov-muted); font-size: .92rem; line-height: 1.2; }
.stat-value { font-size: 1.45rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-note { font-size: .85rem; color: var(--ov-muted); }
.tone-green .stat-icon { background: #dcf3e9; color: var(--ov-green); }
.tone-saffron .stat-icon { background: #fdeccd; color: #9a5f00; }
.tone-red .stat-icon { background: #fbe2df; color: var(--ov-red); }
.tone-violet .stat-icon { background: #e9e3fb; color: var(--ov-violet); }
.tone-teal .stat-icon { background: #d8f0f2; color: var(--ov-teal); }

/* Quick actions */
.quick { display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; border: 1px solid var(--ov-line); border-radius: .6rem; background: #fff; color: var(--ov-text); font-weight: 600; height: 100%; text-decoration: none !important; }
.quick i { font-size: 1.2rem; color: var(--ov-blue); }
.quick:hover { border-color: var(--ov-blue); color: var(--ov-blue-dark); background: #f6f8ff; }

/* Tables */
.table { --bs-table-bg: transparent; margin: 0; }
.table > thead th { font-size: .88rem; font-weight: 600; color: var(--ov-muted); background: #f8f9fc; border-bottom: 1px solid var(--ov-line); white-space: nowrap; padding: .6rem .9rem; }
.table > tbody td { padding: .65rem .9rem; vertical-align: middle; border-color: #edf0f6; }
.table > tbody tr:last-child td { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f7f9ff; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions form { display: inline; }

/* Forms */
.form-label { font-weight: 600; font-size: .95rem; margin-bottom: .3rem; }
.form-control, .form-select { border-color: #cfd6e6; border-radius: .5rem; padding: .48rem .75rem; }
.form-control:focus, .form-select:focus { border-color: var(--ov-blue); box-shadow: 0 0 0 .2rem rgba(36, 86, 230, .18); }
.form-text { color: var(--ov-muted); }
.form-check-input:checked { background-color: var(--ov-blue); border-color: var(--ov-blue); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filters .form-control, .filters .form-select { width: auto; min-width: 150px; }

/* Badges */
.badge { font-weight: 600; font-size: .8rem; padding: .32em .6em; border-radius: .4rem; }
.b-green { background: #dcf3e9; color: #0b6a47; }
.b-red { background: #fbe2df; color: #a22a21; }
.b-saffron { background: #fdeccd; color: #8a5500; }
.b-blue { background: #e4eaff; color: #1b44bd; }
.b-grey { background: #eceff5; color: #4a5470; }
.b-violet { background: #e9e3fb; color: #4f35b0; }

/* Empty states */
.empty { text-align: center; padding: 2.6rem 1rem; color: var(--ov-muted); }
.empty i { font-size: 2.2rem; color: #b3bdd6; display: block; margin-bottom: .5rem; }
.empty strong { display: block; color: var(--ov-text); font-family: "Lexend", sans-serif; font-weight: 600; margin-bottom: .2rem; }

/* Attendance marking */
.att-options { display: inline-flex; gap: .25rem; flex-wrap: wrap; }
.att-options input { position: absolute; opacity: 0; pointer-events: none; }
.att-options label { border: 1px solid #cfd6e6; border-radius: .45rem; padding: .22rem .6rem; font-size: .9rem; font-weight: 600; cursor: pointer; color: var(--ov-muted); background: #fff; }
.att-options input:focus-visible + label { outline: 3px solid rgba(36, 86, 230, .45); }
.att-options input:checked + label.a-present { background: var(--ov-green); border-color: var(--ov-green); color: #fff; }
.att-options input:checked + label.a-absent { background: var(--ov-red); border-color: var(--ov-red); color: #fff; }
.att-options input:checked + label.a-late { background: var(--ov-saffron); border-color: var(--ov-saffron); color: #2b1c00; }
.att-options input:checked + label.a-half_day { background: var(--ov-violet); border-color: var(--ov-violet); color: #fff; }
.att-options input:checked + label.a-leave { background: #5e6880; border-color: #5e6880; color: #fff; }

/* Timetable grid */
.tt { table-layout: fixed; min-width: 760px; }
.tt th, .tt td { text-align: center; border: 1px solid var(--ov-line); padding: .45rem .35rem !important; }
.tt .tt-cell { background: #f6f8ff; border-radius: .4rem; padding: .35rem .3rem; line-height: 1.2; }
.tt .tt-cell strong { display: block; font-size: .93rem; }
.tt .tt-cell span { font-size: .8rem; color: var(--ov-muted); display: block; }

/* Ticket thread */
.reply { border: 1px solid var(--ov-line); border-radius: .7rem; padding: .85rem 1rem; background: #fff; margin-bottom: .7rem; }
.reply.staff { border-left: 4px solid var(--ov-blue); }
.reply.internal { background: #fff8e8; border-left: 4px solid var(--ov-saffron); }
.reply-meta { font-size: .88rem; color: var(--ov-muted); margin-bottom: .3rem; }

/* AI assistant */
.ai-fab { position: fixed; right: 1.2rem; bottom: 1.2rem; width: 56px; height: 56px; border-radius: 50%; background: var(--ov-blue); color: #fff; border: 0; font-size: 1.45rem; box-shadow: 0 8px 24px rgba(36, 86, 230, .4); z-index: 1050; }
.ai-fab:hover { background: var(--ov-blue-dark); }
.ai-panel { position: fixed; right: 1.2rem; bottom: 5.4rem; width: min(380px, calc(100vw - 1.6rem)); height: min(540px, calc(100vh - 7rem)); background: #fff; border: 1px solid var(--ov-line); border-radius: .9rem; box-shadow: 0 18px 50px rgba(16, 27, 59, .25); z-index: 1050; display: none; flex-direction: column; overflow: hidden; }
.ai-panel.open { display: flex; }
.ai-head { background: var(--ov-ink); color: #fff; padding: .8rem 1rem; display: flex; align-items: center; gap: .6rem; font-family: "Lexend", sans-serif; font-weight: 600; }
.ai-head small { display: block; font-family: "Source Sans 3", sans-serif; font-weight: 400; color: #b9c4e8; }
.ai-body { flex: 1; overflow-y: auto; padding: .9rem; background: var(--ov-paper); display: flex; flex-direction: column; gap: .55rem; }
.ai-msg { max-width: 88%; padding: .55rem .75rem; border-radius: .8rem; white-space: pre-wrap; word-wrap: break-word; font-size: .97rem; line-height: 1.4; }
.ai-msg.bot { background: #fff; border: 1px solid var(--ov-line); align-self: flex-start; border-bottom-left-radius: .2rem; }
.ai-msg.me { background: var(--ov-blue); color: #fff; align-self: flex-end; border-bottom-right-radius: .2rem; }
.ai-src { font-size: .75rem; color: var(--ov-muted); margin-top: .25rem; display: block; }
.ai-chips { display: flex; flex-wrap: wrap; gap: .35rem; padding: .5rem .9rem 0; background: var(--ov-paper); }
.ai-chips button { border: 1px solid #b9c8f6; background: #fff; color: var(--ov-blue-dark); border-radius: 2rem; padding: .15rem .65rem; font-size: .85rem; }
.ai-form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--ov-line); background: var(--ov-paper); }

/* Public pages */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-side { background: var(--ov-ink); color: #fff; padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { font-size: 2rem; line-height: 1.2; color: #fff; font-weight: 600; max-width: 14ch; }
.auth-side p { color: #b9c4e8; max-width: 38ch; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.2rem; background: #fff; }
.auth-card { width: 100%; max-width: 420px; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }
.plan-card { border: 1px solid var(--ov-line); border-radius: .9rem; background: #fff; padding: 1.4rem; height: 100%; display: flex; flex-direction: column; }
.plan-card.current { border: 2px solid var(--ov-blue); }
.plan-price { font-family: "Lexend", sans-serif; font-size: 1.9rem; font-weight: 600; }
.plan-card ul { list-style: none; padding: 0; margin: 1rem 0; flex: 1; }
.plan-card li { padding: .22rem 0 .22rem 1.6rem; position: relative; }
.plan-card li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: var(--ov-green); }

/* Print: receipts, report cards, certificates, payslips */
.sheet { background: #fff; border: 1px solid var(--ov-line); border-radius: .7rem; padding: 2rem; max-width: 860px; margin: 0 auto; }
.sheet-head { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid var(--ov-ink); padding-bottom: .9rem; margin-bottom: 1.1rem; }
.sheet-head h2 { margin: 0; font-size: 1.35rem; }
.sheet table { width: 100%; }
@media print {
  .sidebar, .topbar, .page-foot, .ai-fab, .ai-panel, .no-print, .page-head .actions { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; }
  body { background: #fff !important; }
  .sheet { border: 0; padding: 0; max-width: none; }
  .card { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }


/* ===== 1.1 — dark top bar, gradient banner and tiles, quick actions ===== */
.sidebar { background: #0e1436; }
.sidebar-brand { padding: 1rem 1.15rem .9rem; line-height: 1.1; }
.sidebar-brand .brand-tile { width: 40px; height: 40px; border-radius: .7rem; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center; flex: none; }
.sidebar-brand .brand-tile .brand-mark { width: 28px; height: 28px; }
.sidebar-brand small { display: block; font-family: "Source Sans 3", sans-serif; font-weight: 400; font-size: .8rem; color: #8e9ac4; margin-top: .15rem; }
.side-group { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: #7c88b5; padding-top: 1.1rem; }
.side-link { padding: .55rem .75rem; border-radius: .6rem; font-size: 1rem; }
.side-link.active { background: linear-gradient(90deg, #2f6fed, #3b82f6); box-shadow: 0 6px 16px rgba(47, 111, 237, .35); }
.side-link:hover { background: rgba(59, 130, 246, .32); }
.side-link.active:hover { background: linear-gradient(90deg, #2f6fed, #3b82f6); }
.sidebar-foot { padding: .85rem 1.15rem 1rem; font-size: .92rem; color: #fff; }
.sidebar-foot strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-chip { display: inline-block; margin-top: .3rem; background: rgba(245, 158, 11, .18); color: #fbbf5a; border-radius: 2rem; padding: .1rem .65rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.topbar { height: 68px; background: linear-gradient(90deg, #171d49, #1c2560); border-bottom: 0; color: #fff; }
.topbar-title { color: #fff; font-size: 1.15rem; }
.topbar .btn-light { --bs-btn-bg: rgba(255, 255, 255, .08); --bs-btn-border-color: transparent; --bs-btn-color: #fff; --bs-btn-hover-bg: rgba(255, 255, 255, .16); --bs-btn-hover-border-color: transparent; --bs-btn-hover-color: #fff; --bs-btn-active-bg: rgba(255, 255, 255, .2); --bs-btn-active-color: #fff; --bs-btn-active-border-color: transparent; }
.topbar .btn-light .text-muted { color: #aeb9e4 !important; }
.topbar .bi-bell-fill { color: #fbbf24; }
.topbar .avatar { background: linear-gradient(135deg, #f59e0b, #ef6c1a); }
.topbar .child-switch { background-color: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.topbar .child-switch option { color: var(--ov-text); }
.top-search { display: flex; align-items: center; background: rgba(255, 255, 255, .09); border-radius: .5rem; padding: 0 .7rem; width: min(250px, 30vw); }
.top-search i { color: #c9d2f3; }
.top-search input { background: transparent; border: 0; color: #fff; padding: .45rem .6rem; width: 100%; outline: 0; }
.top-search input::placeholder { color: #aeb9e4; }
.top-search:focus-within { background: rgba(255, 255, 255, .16); outline: 2px solid rgba(255, 255, 255, .35); }
@media (max-width: 767.98px) { .top-search { display: none; } .topbar { height: 60px; } }

.daybar { background: linear-gradient(100deg, #1a2050 0%, #232a6b 45%, #5a5fd8 100%); border-radius: 1.1rem; padding: 1.7rem 1.8rem 1.6rem; box-shadow: 0 10px 28px rgba(26, 32, 80, .22); }
.daybar::after { content: ""; position: absolute; right: -70px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.daybar > * { position: relative; z-index: 1; }
.daybar h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: .3rem; }
.daybar p { color: #d5dbf7; }
.daybar .trial-chip { background: rgba(255, 255, 255, .16); color: #fff; }
.btn-cta { background: #fbb124; border-color: #fbb124; color: #2b1c00; font-size: 1.05rem; padding: .55rem 1.1rem; border-radius: .65rem; }
.btn-cta:hover, .btn-cta:focus-visible { background: #f09c06; border-color: #f09c06; color: #2b1c00; }

/* Dashboard cards (1.6): white card, soft icon chip, a tone-coloured edge. --tone and --tone-soft come from the tile-* class. */
.tile { --tone: #2456e6; --tone-soft: #e4ecff; position: relative; display: flex; align-items: center; gap: .95rem; background: #fff; border: 1px solid var(--ov-line); border-radius: 1rem; padding: 1.05rem 1.3rem 1.05rem 1.1rem; color: var(--ov-text); height: 100%; min-width: 0; overflow: hidden; text-decoration: none !important; box-shadow: 0 1px 2px rgba(16, 27, 59, .04), 0 8px 20px rgba(16, 27, 59, .05); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.tile::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 4px; background: var(--tone); }
a.tile:hover { color: var(--ov-text); transform: translateY(-2px); border-color: var(--tone); box-shadow: 0 2px 4px rgba(16, 27, 59, .05), 0 12px 26px rgba(16, 27, 59, .1); }
a.tile:focus-visible { outline: 3px solid var(--tone); outline-offset: 2px; }
.tile > span:last-child { min-width: 0; flex: 1; }
.tile-icon { width: 50px; height: 50px; border-radius: .85rem; background: var(--tone-soft); color: var(--tone); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex: none; }
.tile-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ov-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-value { font-family: "Lexend", sans-serif; font-size: clamp(1.25rem, 1.05rem + .55vw, 1.6rem); font-weight: 700; line-height: 1.2; color: var(--ov-ink); display: block; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-note { font-size: .86rem; color: var(--ov-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-blue { --tone: #2456e6; --tone-soft: #e4ecff; }
.tile-orange { --tone: #c96a07; --tone-soft: #fdecd2; }
.tile-purple { --tone: #6a4bd8; --tone-soft: #ece6fc; }
.tile-green { --tone: #12855a; --tone-soft: #dcf3e9; }
.tile-red { --tone: #c8372d; --tone-soft: #fbe2df; }
.tile-teal { --tone: #0e8a94; --tone-soft: #d8f0f2; }
@media print { .tile { box-shadow: none; } }

.quick-card { background: #fff; border: 1px solid var(--ov-line); border-radius: 1rem; padding: 1.1rem 1.2rem 1.2rem; }
.quick-card h2 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; margin-bottom: .85rem; }
.quick-card h2 i { color: #f59e0b; }
.quick-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.quick-row .quick { height: auto; padding: .5rem .95rem; border-radius: .7rem; font-size: .98rem; gap: .5rem; }
.quick-row .quick i { font-size: 1rem; color: #3b47c9; }

/* Class cards under Students */
.class-card { display: block; background: #fff; border: 1px solid var(--ov-line); border-radius: 1.1rem; padding: 1.15rem 1.2rem 1.2rem; color: inherit; text-decoration: none !important; height: 100%; transition: border-color .12s ease, box-shadow .12s ease; }
.class-card:hover, .class-card:focus-visible { border-color: #9fb4f5; box-shadow: 0 8px 22px rgba(36, 86, 230, .12); color: inherit; }
.class-card h2 { font-size: 1.2rem; font-weight: 600; margin: 0; }
.class-card .sub { color: var(--ov-muted); font-size: .92rem; }
.board-chip { background: #e6e9ff; color: #3b47c9; border-radius: 2rem; padding: .12rem .65rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.class-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .9rem; }
.class-stats div { background: #f4f6fb; border: 1px solid #e3e7f2; border-radius: .9rem; padding: .7rem .3rem .6rem; text-align: center; }
.class-stats b { display: block; font-family: "Lexend", sans-serif; font-size: 1.2rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.class-stats span { font-size: .78rem; color: var(--ov-muted); }
.v-good { color: #0f9d6b; } .v-warn { color: #e39a0b; } .v-bad { color: #e0425a; }

/* Student photo */
.photo-box { width: 108px; height: 108px; border-radius: 1rem; background: #eef1fb; border: 1px solid #d9dff0; display: flex; align-items: center; justify-content: center; color: #7f8bb3; font-size: 2.4rem; overflow: hidden; flex: none; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box.sm { width: 40px; height: 40px; border-radius: 50%; font-size: 1rem; font-family: "Lexend", sans-serif; font-weight: 600; color: var(--ov-blue-dark); background: #e4eaff; border: 0; }
.form-section { color: #d98a00; font-family: "Lexend", sans-serif; font-weight: 600; font-size: 1rem; margin: 0 0 .9rem; }
.login-box { background: #f4f6fb; border: 1px solid #e3e7f2; border-radius: .9rem; padding: 1rem; height: 100%; }

/* Sign-in screen */
.auth-wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); background: #fff; }
.auth-side { background: linear-gradient(150deg, #0e1436 0%, #1c2560 55%, #4a4fc9 100%); padding: 2.4rem 2.8rem; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.auth-side::after { content: ""; position: absolute; right: 60px; top: -90px; width: 220px; height: 220px; border-radius: 50%; background: rgba(251, 177, 36, .12); }
.auth-side > * { position: relative; z-index: 1; }
.auth-side h2 { font-size: clamp(1.8rem, 2.6vw, 2.5rem); max-width: 16ch; line-height: 1.15; font-weight: 700; }
.auth-side p.lede { color: #cfd6f6; font-size: 1.1rem; max-width: 44ch; }
.auth-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; max-width: 560px; }
.auth-points li { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); border-radius: .9rem; padding: .8rem .9rem; display: flex; gap: .7rem; align-items: flex-start; }
.auth-points i { color: #fbb124; font-size: 1.25rem; line-height: 1.2; }
.auth-points strong { display: block; font-weight: 600; color: #fff; }
.auth-points span { color: #c3cbef; font-size: .9rem; line-height: 1.3; display: block; }
.auth-foot { color: #a9b3df; font-size: .9rem; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.auth-foot a { color: #fff; }
.auth-main { background: #f6f7fc; }
.auth-card { max-width: 440px; background: #fff; border: 1px solid var(--ov-line); border-radius: 1.2rem; padding: 2rem; box-shadow: 0 16px 40px rgba(16, 27, 59, .08); }
.auth-card h1 { font-size: 1.6rem; font-weight: 700; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #7f8bb3; pointer-events: none; }
.input-icon .form-control { padding-left: 2.5rem; height: 48px; }
.input-icon .toggle-pass { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #7f8bb3; width: 2.4rem; height: 2.4rem; border-radius: .5rem; }
.input-icon .toggle-pass:hover { color: var(--ov-blue); background: #eef1fb; }
.role-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.role-row div { text-align: center; background: #f4f6fb; border-radius: .7rem; padding: .55rem .2rem; font-size: .82rem; color: var(--ov-muted); }
.role-row i { display: block; font-size: 1.15rem; color: #3b47c9; }
.demo-list button { border: 1px solid var(--ov-line); background: #fff; border-radius: .6rem; padding: .3rem .65rem; font-size: .88rem; font-weight: 600; color: var(--ov-text); }
.demo-list button:hover { border-color: var(--ov-blue); color: var(--ov-blue-dark); }
@media (max-width: 860px) { .auth-main { padding: 1.2rem .9rem; } .auth-card { padding: 1.4rem; } }
@media (max-width: 1100px) { .auth-points { grid-template-columns: 1fr; } }


/* ===== 1.2 — staff and class cards ===== */
.group-head { display: flex; align-items: center; gap: .5rem; font-family: "Lexend", sans-serif; font-weight: 600; font-size: 1.05rem; margin: 1.2rem 0 .7rem; }
.group-head i { color: #e39a0b; font-size: 1.15rem; }
.group-head .count { background: #fdeccd; color: #8a5500; border-radius: 2rem; padding: 0 .55rem; font-size: .82rem; }
.group-head.alt i { color: #2f6fed; } .group-head.alt .count { background: #e4eaff; color: #1b44bd; }
.person-card { background: #fff; border: 1px solid var(--ov-line); border-radius: 1.1rem; padding: 1.1rem 1.15rem; height: 100%; display: flex; flex-direction: column; }
.person-card.off { background: #fafbfe; }
.person-card.off .who, .person-card.off .facts { opacity: .6; }
.person-card .who { display: flex; gap: .8rem; align-items: center; }
.person-card .who .avatar { width: 46px; height: 46px; font-size: 1rem; background: #fdeccd; color: #b06f00; }
.person-card .who strong { display: block; font-weight: 600; line-height: 1.2; }
.person-card .who strong { font-size: 1.05rem; }
.person-card .who span span { color: var(--ov-muted); font-size: .88rem; }
.person-card .facts { list-style: none; padding: 0; margin: .85rem 0; flex: 1; }
.person-card .facts li { display: flex; gap: .65rem; align-items: center; padding: .22rem 0; font-size: .95rem; min-width: 0; }
.person-card .facts li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-card .facts i { color: #8a94b5; width: 1.1rem; text-align: center; flex: none; }
.person-card .foot { border-top: 1px solid var(--ov-line); padding-top: .8rem; display: flex; gap: .4rem; align-items: center; }
.person-card .foot form:last-child { margin-left: auto; }
.section-card { background: #fff; border: 1px solid var(--ov-line); border-radius: 1.1rem; padding: 1.15rem 1.2rem; height: 100%; display: flex; flex-direction: column; }
.section-card h2 { font-size: 1.2rem; font-weight: 600; margin: 0; }
.section-card h2 a { color: inherit; text-decoration: none; }
.section-card h2 a:hover { color: var(--ov-blue); }
.section-card .sub { color: var(--ov-muted); font-size: .92rem; }
.section-card .teacher { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; line-height: 1.15; }
.section-card .teacher .avatar { width: 30px; height: 30px; font-size: .75rem; background: #fdeccd; color: #b06f00; }
.section-card .teacher small { display: block; color: var(--ov-muted); font-size: .78rem; }
.section-card .class-stats { grid-template-columns: repeat(2, 1fr); }
.section-card .st-head { display: flex; align-items: center; justify-content: space-between; margin-top: .9rem; font-weight: 600; font-size: .95rem; }
.st-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; flex: 1; align-content: flex-start; }
.st-chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid #dfe3f1; background: #f6f7fc; border-radius: .5rem; padding: .15rem .25rem .15rem .55rem; font-size: .85rem; }
.st-chip b { font-weight: 600; } .st-chip span { color: var(--ov-muted); }
.st-chip button { border: 0; background: transparent; color: #d0455a; padding: 0 .25rem; line-height: 1; border-radius: .3rem; }
.st-chip button:hover { background: #fbe2df; }
.section-card .foot { border-top: 1px solid var(--ov-line); margin-top: .9rem; padding-top: .8rem; display: flex; gap: .4rem; align-items: center; }
.section-card .foot form:last-child { margin-left: auto; }
.add-panel { background: #fff; border: 1.5px solid #f2b13a; border-radius: 1.1rem; padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.class-card.mine { border-color: #9fb4f5; box-shadow: inset 0 0 0 1px #9fb4f5; }


/* ===== 1.3 — calendar, examinations, library ===== */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.cal-head { text-align: center; font-size: .85rem; font-weight: 600; color: #7c88b5; padding: .2rem 0 .4rem; }
.cal-day { min-height: 84px; border: 1px solid #dfe3f1; border-radius: .6rem; padding: .35rem .45rem; background: #fff; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cal-day .num { font-weight: 700; font-size: .92rem; }
.cal-day.wk { background: #f1f3f8; color: #8a94b5; }
.cal-day.hol { background: #fde8ec; border-color: #f5b5c2; }
.cal-day.wrk { background: #e6f6ee; border-color: #a9dcc3; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--ov-blue); }
.cal-add { color: #9aa4c4; line-height: 1; border-radius: .3rem; opacity: 0; }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { color: var(--ov-blue); background: #e4eaff; }
.cal-chip { display: block; font-size: .72rem; font-weight: 700; border-radius: .3rem; padding: .08rem .35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.cal-chip.hol, .cal-badge.hol, .cal-key.hol { background: #e0425a; }
.cal-chip.evt, .cal-badge.evt, .cal-key.evt { background: #1a8fd6; }
.cal-chip.wrk, .cal-badge.wrk, .cal-key.wrk { background: #12855a; }
.cal-key { display: inline-block; width: .7rem; height: .7rem; border-radius: .2rem; margin-right: .35rem; vertical-align: baseline; flex: none; }
.cal-key.wk { background: #cfd5e6; }
.cal-item { border: 1px solid #e3e7f2; background: #f6f7fc; border-radius: .8rem; padding: .7rem .8rem; }
.cal-badge { width: 26px; height: 26px; border-radius: .45rem; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; flex: none; }
@media (max-width: 575.98px) { .cal-day { min-height: 58px; padding: .25rem; } .cal-chip { font-size: .62rem; padding: 0 .2rem; } .cal-grid { gap: .2rem; } }

.hub-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--ov-line); padding-bottom: .6rem; margin-bottom: 1rem; }
.hub-tabs a, .hub-tabs .dropdown-toggle { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: .5rem; color: var(--ov-text); text-decoration: none; font-size: .96rem; border: 0; background: transparent; }
.hub-tabs a:hover, .hub-tabs .dropdown-toggle:hover { background: #eef1fb; }
.hub-tabs a.active { background: #e0edff; color: #1b44bd; font-weight: 600; }
.kpi { background: #fff; border: 1px solid var(--ov-line); border-radius: .9rem; padding: .9rem 1rem; height: 100%; display: flex; gap: .8rem; align-items: flex-start; }
.kpi > i { font-size: 1.15rem; margin-top: .15rem; }
.kpi .k-label { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ov-muted); }
.kpi .k-value { font-family: "Lexend", sans-serif; font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.kpi .k-note { font-size: .85rem; }
.kpi.edge-blue { border-left: 3px solid #1a8fd6; } .kpi.edge-red { border-left: 3px solid #e0425a; }
.bar-row { margin-bottom: .7rem; }
.bar-row .progress { height: 6px; background: #e3e7f2; }
.guide-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.guide-steps li { counter-increment: step; position: relative; padding: 0 0 1.1rem 3rem; }
.guide-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%; background: #e0edff; color: #1b44bd; font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: "Lexend", sans-serif; }
.guide-steps li:not(:last-child)::after { content: ""; position: absolute; left: .97rem; top: 2.2rem; bottom: .2rem; width: 2px; background: #e3e7f2; }
.admit { border: 1.5px solid var(--ov-ink); border-radius: .6rem; padding: 1.1rem 1.3rem; margin: 0 auto 1.2rem; max-width: 860px; background: #fff; break-inside: avoid; }
.page-break { break-after: page; }
.book-cover { width: 44px; height: 60px; border-radius: .3rem; background: linear-gradient(160deg, #e4eaff, #f3e9ff); border: 1px solid #d9dff0; display: flex; align-items: center; justify-content: center; color: #7f8bb3; overflow: hidden; flex: none; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover.lg { width: 150px; height: 205px; border-radius: .6rem; font-size: 2.6rem; }
.book-cover.md { width: 96px; height: 132px; border-radius: .45rem; font-size: 1.8rem; }
.shelf-code { width: 28px; height: 28px; border-radius: .4rem; background: var(--ov-saffron); color: #2b1c00; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; flex: none; }
.cover-drop { cursor: pointer; margin: 0; }
.cover-drop small { font-size: .8rem; font-family: "Source Sans 3", sans-serif; }
.hub-tabs .dropdown-toggle.active { background: #e0edff; color: #1b44bd; font-weight: 600; }
.hub-tabs .dropdown-item.active { background: #e0edff; color: #1b44bd; }
.report-card .photo-box, .admit .photo-box { border-radius: .4rem; }
@media print { .report-card, .admit { box-shadow: none; } .admit { margin-bottom: .8rem; } .hub-tabs { display: none !important; } }


/* ===== 1.4 — academic years, PTM, front office ===== */
.year-switch { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #fff; height: 38px; white-space: nowrap; }
.year-switch:hover, .year-switch:focus-visible, .year-switch.show { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .3); }
.year-switch.other { background: var(--ov-saffron); border-color: var(--ov-saffron); color: #2b1c00; font-weight: 600; }
.year-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; background: #fff6e0; border: 1px solid #f2cf7e; color: #5c3d00; border-radius: .8rem; padding: .55rem .9rem; margin-bottom: 1rem; }
.year-banner form { margin-left: auto; }
.accordion-button { font-size: 1rem; gap: .2rem; flex-wrap: wrap; }
.accordion-button:not(.collapsed) { background: #f1f5ff; color: inherit; box-shadow: none; }
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; }
.pipeline a { display: block; background: #fff; border: 1px solid var(--ov-line); border-radius: .8rem; padding: .6rem .7rem; text-decoration: none; color: inherit; border-top: 3px solid #c9d2ee; }
.pipeline a.active, .pipeline a:hover { border-color: #9fb4f5; box-shadow: 0 6px 16px rgba(36, 86, 230, .1); }
.pipeline b { display: block; font-family: "Lexend", sans-serif; font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.pipeline span { font-size: .82rem; color: var(--ov-muted); }
.pipeline .p-new { border-top-color: #2f6fed; } .pipeline .p-contacted { border-top-color: #1a8fd6; } .pipeline .p-visit { border-top-color: #7a4fe0; }
.pipeline .p-application { border-top-color: #e39a0b; } .pipeline .p-admitted { border-top-color: #12855a; } .pipeline .p-lost { border-top-color: #8a94b5; }
@media (max-width: 767.98px) { .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid #e3e7f2; }
.timeline li { position: relative; padding: 0 0 1rem .9rem; }
.timeline li::before { content: ""; position: absolute; left: -1.52rem; top: .3rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--ov-blue); box-shadow: 0 0 0 3px #fff; }
.pass-slip { border: 1.5px dashed var(--ov-ink); border-radius: .6rem; padding: 1rem 1.2rem; max-width: 520px; margin: 0 auto 1rem; background: #fff; break-inside: avoid; }
.slot-chip { display: inline-block; white-space: nowrap; font-variant-numeric: tabular-nums; background: #e4eaff; color: #1b44bd; border-radius: .4rem; padding: 0 .4rem; font-size: .85rem; font-weight: 600; }
.stars { color: #e39a0b; letter-spacing: .05em; white-space: nowrap; }
.rate-row input { position: absolute; opacity: 0; }
.rate-row label { cursor: pointer; font-size: 1.5rem; color: #cfd5e6; padding: 0 .1rem; }
.rate-row input:checked ~ label, .rate-row label:hover, .rate-row label:hover ~ label { color: #e39a0b; }
.rate-row { display: inline-flex; flex-direction: row-reverse; position: relative; }
.rate-row input:focus-visible + label { outline: 2px solid var(--ov-blue); border-radius: .2rem; }
.remark-box { background: #f6f7fc; border: 1px solid #e3e7f2; border-radius: .7rem; padding: .7rem .8rem; }


/* ===== 1.5 — school codes, finance & fees ===== */
.school-id { display: flex; align-items: center; gap: .8rem; background: #f4f6fb; border: 1px solid #e3e7f2; border-radius: .9rem; padding: .7rem .9rem; }
.school-id strong { display: block; font-family: "Lexend", sans-serif; font-weight: 600; line-height: 1.2; }
.school-id span { color: var(--ov-muted); font-size: .9rem; }
.school-id .avatar { width: 44px; height: 44px; font-size: 1.1rem; flex: none; }
.login-link { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; background: #fff; border: 1px solid var(--ov-line); border-left: 3px solid var(--ov-blue); border-radius: .8rem; padding: .7rem 1rem; margin-bottom: 1rem; }
.login-link > i { font-size: 1.5rem; color: var(--ov-blue); }
.fin-tabs a { border: 1px solid var(--ov-line); background: #fff; font-size: .92rem; padding: .32rem .7rem; }
.fin-tabs a.active { background: #fdeccd; border-color: #f2cf7e; color: #8a5500; }
.kpi.edge-green { border-left: 3px solid #12855a; } .kpi.edge-saffron { border-left: 3px solid #e39a0b; }
.fin-kpis .k-value { font-size: 1.3rem; white-space: nowrap; }
.cycle-step { display: block; text-align: center; border: 1px solid var(--ov-line); border-radius: .9rem; padding: .9rem .5rem; text-decoration: none; color: inherit; height: 100%; }
.cycle-step:hover { border-color: #9fb4f5; box-shadow: 0 6px 16px rgba(36, 86, 230, .1); color: inherit; }
.cycle-step i { font-size: 1.3rem; display: block; margin-bottom: .4rem; }
.cycle-step strong { display: block; font-weight: 600; font-size: .95rem; } .cycle-step span { color: var(--ov-muted); font-size: .8rem; }
.tip-box { display: flex; gap: .7rem; border: 1.5px dashed #cfd5e6; border-radius: .9rem; padding: .8rem 1rem; background: #fff; }
.tip-box > i { color: #e39a0b; font-size: 1.2rem; }
.challan-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: 1080px; margin: 0 auto; background: #fff; border: 1px solid var(--ov-ink); }
.challan { padding: .8rem .9rem; border-right: 1.5px dashed var(--ov-ink); }
.challan:last-child { border-right: 0; }
@media (max-width: 767.98px) { .challan-row { grid-template-columns: 1fr; } .challan { border-right: 0; border-bottom: 1.5px dashed var(--ov-ink); } }
.sheet.is-cancelled { position: relative; }
.sheet.is-cancelled::after { content: "CANCELLED"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: "Lexend", sans-serif; font-size: 4rem; font-weight: 700; color: rgba(200, 55, 45, .16); transform: rotate(-18deg); pointer-events: none; }
@media print { .challan-row { max-width: none; } @page { margin: 10mm; } }

/* ---------- 1.6: Accounts & Bookkeeping ---------- */
.acc-tabs { display: flex; flex-wrap: wrap; gap: 0 1.15rem; border-bottom: 1px solid var(--ov-line); margin-bottom: 1.1rem; }
.acc-tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .1rem; color: var(--ov-muted); text-decoration: none; font-size: .95rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.acc-tabs a:hover { color: var(--ov-text); }
.acc-tabs a.active { color: var(--ov-ink); border-bottom-color: var(--ov-ink); font-weight: 700; }
.soft-icon { width: 40px; height: 40px; border-radius: .7rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; flex: none; background: #e8ebf3; color: var(--ov-ink); }
.soft-icon.sm { width: 28px; height: 28px; border-radius: .5rem; font-size: .9rem; vertical-align: middle; }
.soft-icon.lg { width: 52px; height: 52px; border-radius: .9rem; font-size: 1.45rem; }
.si-blue { background: #e4ecff; color: var(--ov-blue); } .si-green { background: #dcf3e9; color: var(--ov-green); } .si-red { background: #fbe2df; color: var(--ov-red); }
.si-violet { background: #ece6fc; color: var(--ov-violet); } .si-ink { background: #e8ebf3; color: var(--ov-ink); }
.thead-ink th { background: var(--ov-ink) !important; color: #fff !important; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.vch-cancelled td { color: var(--ov-muted); }
.vch-cancelled td.num, .vch-cancelled td .num, .vch-cancelled td .fw-semibold { text-decoration: line-through; }
.acc-hero { border-radius: 1.1rem; padding: 1.5rem 1.6rem 1.6rem; color: #fff; background: radial-gradient(circle at 96% 18%, rgba(54, 211, 173, .55), transparent 34%), linear-gradient(105deg, #101b3b 0%, #1b44bd 52%, #0f8a68 100%); box-shadow: 0 14px 30px rgba(16, 27, 59, .18); }
.acc-hero h1 { color: #fff; font-size: clamp(1.35rem, 1rem + 1.6vw, 2rem); margin: .85rem 0 .55rem; }
.acc-hero h1 em { font-style: normal; color: #ffc857; }
.acc-hero p { max-width: 60rem; margin-bottom: 1.05rem; color: rgba(255, 255, 255, .94); }
.hero-pill { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .1); border-radius: 99px; padding: .2rem .8rem; font-size: .8rem; font-weight: 600; }
.hero-pill i { color: #ffc857; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-facts div { border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); border-radius: .7rem; padding: .5rem .95rem; min-width: 7.6rem; }
.hero-facts strong { display: block; font-family: "Lexend", sans-serif; font-size: 1.15rem; line-height: 1.25; }
.hero-facts span { font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .9); }
.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; background: #eef1f8; border-radius: 99px; padding: .3rem .85rem; font-size: .9rem; }
.chip i { color: var(--ov-blue); }
.where-row { display: flex; align-items: flex-start; gap: .8rem; padding: .5rem 0; color: inherit; text-decoration: none; }
.where-row:hover { color: inherit; } .where-row:hover strong { color: var(--ov-blue); }
.good-box { background: #eaf4ff; border: 1px solid #c5ddf8; border-radius: .9rem; padding: 1rem 1.1rem; }
.good-box .bi-lightbulb-fill { color: #1a8fd6; }
.good-box li + li { margin-top: .35rem; }
.coa-group, .coa-ledger { display: flex; align-items: center; padding: .5rem 1rem .5rem calc(1rem + var(--depth, 0) * 1.4rem); border-top: 1px solid var(--ov-line); min-height: 2.9rem; }
.coa > :first-child { border-top: 0; }
.coa-group { background: #f8f9fd; }
.coa-ledger a:not(.btn) { text-decoration: none; }
.coa-ledger a:not(.btn):hover { text-decoration: underline; }
.rep-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.rep-pick a { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--ov-line); background: #fff; border-radius: .7rem; padding: .5rem .95rem; color: var(--ov-text); text-decoration: none; font-weight: 500; }
.rep-pick a:hover { border-color: #b9c8f6; }
.rep-pick a.active { background: var(--ov-ink); border-color: var(--ov-ink); color: #fff; }
.rep-table thead th { border-bottom: 2px solid var(--ov-ink); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.rep-table .rep-head td { font-weight: 700; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ov-muted); padding-top: .85rem; border-bottom-color: transparent; }
.rep-table .rep-total td { font-weight: 700; border-top: 2px solid var(--ov-ink); border-bottom: 3px double var(--ov-ink); }
.rep-table .rep-balancing td { font-weight: 600; font-style: italic; }
.step-no { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ov-muted); }
.vch-sheet.is-cancelled { position: relative; }
.vch-sheet.is-cancelled::after { content: "CANCELLED"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: "Lexend", sans-serif; font-size: 3.6rem; font-weight: 700; letter-spacing: .1em; color: rgba(200, 55, 45, .16); transform: rotate(-18deg); pointer-events: none; }
.vch-sign { border-top: 1px solid var(--ov-line); }
a.kpi:hover { border-color: #b9c8f6; }
@media print { .acc-tabs, .rep-pick { display: none !important; } .rep-sheet, .vch-sheet { border: 0 !important; box-shadow: none !important; } .daybook td, .daybook th { font-size: .82rem; padding: .3rem .4rem; } }

/* ---------- 1.7: Human Resource ---------- */
.acc-tabs .dropdown-toggle { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .1rem; color: var(--ov-muted); background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .95rem; font-weight: 500; }
.acc-tabs .dropdown-toggle:hover { color: var(--ov-text); }
.acc-tabs .dropdown-toggle.active { color: var(--ov-ink); border-bottom-color: var(--ov-ink); font-weight: 700; }
.acc-tabs .dropdown-item.active { background: #e0edff; color: #1b44bd; }
.avatar.sm { width: 32px; height: 32px; font-size: .78rem; background: #e4eaff; color: var(--ov-blue-dark); }
.hr-hero { background: radial-gradient(circle at 95% 15%, rgba(54, 211, 173, .55), transparent 32%), linear-gradient(105deg, #1d1b4f 0%, #4f46e5 55%, #0f8a68 100%); }
.feature-card { display: flex; gap: .8rem; align-items: flex-start; border: 1px solid var(--ov-line); border-radius: .9rem; padding: .9rem 1rem; height: 100%; color: inherit; text-decoration: none; background: #fff; transition: border-color .12s ease, box-shadow .12s ease; }
.feature-card:hover { color: inherit; border-color: #b9c8f6; box-shadow: 0 6px 16px rgba(36, 86, 230, .08); }
.feature-card.star { background: linear-gradient(180deg, #effaf5, #eef3ff); border-color: #9fdcc1; }
.quote-box { display: flex; gap: .7rem; align-items: center; background: #effaf5; border: 1px solid #bfe7d4; border-radius: .8rem; padding: .8rem 1rem; font-weight: 500; }
.quote-box i { color: var(--ov-green); font-size: 1.3rem; }
.note-box { display: flex; gap: .7rem; background: #fff8e6; border: 1px solid #f2d58c; border-radius: .8rem; padding: .8rem 1rem; }
.note-box > i { color: #c98a00; font-size: 1.1rem; }
.step-badge { display: inline-flex; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #4f46e5; color: #fff; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; margin-right: .5rem; font-family: "Lexend", sans-serif; }
.flow { display: flex; align-items: stretch; gap: .5rem; flex-wrap: wrap; }
.flow-step { flex: 1 1 9rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; border: 1px solid var(--ov-line); border-radius: .8rem; padding: .9rem .6rem; text-decoration: none; color: inherit; background: #fff; }
.flow-step:hover { color: inherit; border-color: #b9c8f6; }
.flow-step strong { font-size: .92rem; font-weight: 600; } .flow-step span:not(.soft-icon) { font-size: .78rem; color: var(--ov-muted); }
.flow-arrow { align-self: center; color: #b8c0d4; }
@media (max-width: 767.98px) { .flow-arrow { display: none; } .flow-step { flex-basis: 45%; } }
.thead-violet th { background: #4f46e5 !important; color: #fff !important; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.hr-feed { list-style: none; margin: 0; padding: .4rem 1rem; }
.hr-feed li { display: flex; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--ov-line); }
.hr-feed li:last-child { border-bottom: 0; }
.staff-tile { display: flex; align-items: center; gap: .85rem; background: #fff; border: 1px solid var(--ov-line); border-radius: .9rem; padding: .85rem 1rem; color: inherit; text-decoration: none; height: 100%; transition: border-color .12s ease, box-shadow .12s ease; }
.staff-tile:hover { color: inherit; border-color: #b9c8f6; box-shadow: 0 6px 16px rgba(16, 27, 59, .06); }
.staff-tile.off { opacity: .7; }
.staff-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; font-size: 1rem; }
.profile-photo { width: 84px; height: 84px; border-radius: 1rem; object-fit: cover; font-size: 1.6rem; }
.profile-tabs { display: flex; flex-wrap: wrap; gap: .3rem; }
.profile-tabs a { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .75rem; border-radius: 99px; border: 1px solid var(--ov-line); background: #fff; color: var(--ov-text); text-decoration: none; font-size: .9rem; }
.profile-tabs a:hover { border-color: #b9c8f6; }
.profile-tabs a.active { background: var(--ov-ink); border-color: var(--ov-ink); color: #fff; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .9rem 1.4rem; }
.fact span { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ov-muted); }
.fact strong { font-weight: 600; }
.leave-pill { display: flex; flex-direction: column; border-radius: .8rem; padding: .7rem .9rem; }
.leave-pill span { font-size: .85rem; font-weight: 600; } .leave-pill strong { font-family: "Lexend", sans-serif; font-size: 1.6rem; line-height: 1.15; } .leave-pill small { font-size: .78rem; opacity: .85; }
.signature-preview { max-height: 56px; max-width: 100%; border: 1px dashed var(--ov-line); border-radius: .4rem; padding: .2rem; background: #fff; }
.career { list-style: none; margin: 0; padding: 0; position: relative; }
.career li { display: flex; gap: .8rem; padding: 0 0 1.1rem; position: relative; }
.career li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 0; width: 2px; background: var(--ov-line); }
.career li:last-child::before { display: none; }
.grade-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; height: 1.7rem; padding: 0 .45rem; border-radius: .5rem; background: #ece6fc; color: #4d33b0; font-weight: 700; font-family: "Lexend", sans-serif; font-size: .85rem; }
.grade-chip.sm { min-width: 1.7rem; height: 1.35rem; font-size: .74rem; }
.grade-chip.lg { min-width: 3.4rem; height: 2.6rem; font-size: 1.35rem; border-radius: .8rem; }
.att-grid th, .att-grid td { padding: .3rem .25rem; font-size: .8rem; }
.att-grid th.off, .att-grid td.off { background: #f5f6fa; }
.att-grid .sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 12rem; padding-left: .8rem; }
.att { display: inline-flex; align-items: center; justify-content: center; min-width: 1.45rem; height: 1.45rem; border-radius: .35rem; font-size: .7rem; font-weight: 700; }
.att-p { background: #dcf3e9; color: var(--ov-green); } .att-u { color: #9ccdb6; } .att-l { background: #fdeccd; color: #9a5f00; } .att-a { background: #fbe2df; color: var(--ov-red); }
.att-h { background: #fff1c7; color: #8a6400; } .att-v { background: #e4eaff; color: var(--ov-blue-dark); } .att-off { color: #c3c9d6; }
.pick-list { max-height: 15rem; overflow: auto; border: 1px solid var(--ov-line); border-radius: .6rem; padding: .4rem .7rem; }
.pick-list.wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); max-height: 18rem; }
.payslip-days { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; border: 1px solid var(--ov-line); border-radius: .5rem; padding: .5rem .8rem; background: #f8f9fd; }
.cred-slip { border: 1.5px dashed #b8c0d4; border-radius: .7rem; padding: .7rem .9rem; font-size: .9rem; height: 100%; }
.id-sheet { display: grid; grid-template-columns: repeat(auto-fill, 85mm); gap: 6mm; }
.id-card { width: 85mm; height: 54mm; border-radius: 3mm; overflow: hidden; border: 1px solid #c9cfdd; background: #fff; display: flex; flex-direction: column; box-shadow: 0 4px 12px rgba(16, 27, 59, .08); }
.id-top { background: linear-gradient(105deg, #101b3b, #2456e6); color: #fff; display: flex; align-items: center; gap: 2mm; padding: 2mm 3mm; font-weight: 600; font-size: 9pt; font-family: "Lexend", sans-serif; }
.id-top svg, .id-top img { width: 6mm; height: 6mm; }
.id-body { display: flex; gap: 3mm; padding: 2.5mm 3mm; flex: 1; align-items: center; }
.id-photo { width: 20mm; height: 24mm; border-radius: 2mm; object-fit: cover; flex: none; border: 1px solid var(--ov-line); }
.id-initials { display: flex; align-items: center; justify-content: center; background: #e4eaff; color: var(--ov-blue-dark); font-weight: 700; font-size: 14pt; }
.id-text { display: flex; flex-direction: column; font-size: 7.5pt; line-height: 1.35; min-width: 0; }
.id-text strong { font-size: 10pt; font-family: "Lexend", sans-serif; }
.id-foot { display: flex; justify-content: space-between; background: #f2a01e; color: #2b1d00; font-size: 6.5pt; font-weight: 600; padding: 1mm 3mm; }
@media print {
  .id-sheet { gap: 4mm; } .id-card { box-shadow: none; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cred-slips .col-md-6 { width: 50%; } .cred-slip { break-inside: avoid; }
  .att-grid .sticky-col { position: static; } .profile-tabs { display: none !important; }
}
.card-sign { max-height: 40px; max-width: 140px; }

/* ---------- 1.7: Question Paper Generator ---------- */
.qp-hero { background: radial-gradient(circle at 95% 15%, rgba(255, 200, 87, .45), transparent 32%), linear-gradient(105deg, #101b3b 0%, #2456e6 55%, #6a4bd8 100%); }
.mix-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #eef1f8; }
.mix-bar span { display: block; height: 100%; }
.mx-easy { background: #2fae7a; } .mx-medium { background: #f2a01e; } .mx-hard { background: #d64545; }
.mx-key { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; vertical-align: middle; margin-right: .25rem; }
.q-list { display: grid; gap: .8rem; }
.q-card { background: #fff; border: 1px solid var(--ov-line); border-radius: .9rem; padding: .9rem 1.1rem; }
.q-card.off { opacity: .65; }
.q-meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.q-text { margin: .55rem 0 .3rem; font-size: 1.02rem; }
.q-image { max-width: 100%; max-height: 220px; display: block; margin: .4rem 0; border-radius: .4rem; }
.q-options { margin: .3rem 0 0; padding-left: 1.6rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem 1.2rem; }
.q-options li.correct { color: var(--ov-green); font-weight: 600; }
.q-options li.correct::after { content: " ✓"; }
.q-options.inline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 767.98px) { .q-options, .q-options.inline { grid-template-columns: 1fr; } }
.q-answer summary { cursor: pointer; color: var(--ov-blue); font-size: .9rem; }
.q-foot { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; }
.paper-items { list-style: none; margin: 0; padding: .4rem 1rem; }
.paper-item { display: flex; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--ov-line); }
.paper-items > li:last-child { border-bottom: 0; }
.paper-item .qn { width: 2rem; flex: none; font-weight: 700; }
.paper-item .marks { flex: none; font-weight: 600; color: var(--ov-muted); }
.or-row { text-align: center; list-style: none; }
.or-row span { display: inline-block; font-weight: 700; font-size: .85rem; letter-spacing: .1em; color: var(--ov-muted); padding: .1rem .8rem; border: 1px dashed #c3c9d6; border-radius: 99px; }
/* the printable paper */
.paper-page { background: #eef1f6; }
.paper-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .7rem 1rem; background: #fff; border-bottom: 1px solid var(--ov-line); position: sticky; top: 0; z-index: 5; }
.paper { max-width: 210mm; margin: 1.2rem auto; background: #fff; padding: 14mm 15mm; box-shadow: 0 6px 24px rgba(16, 27, 59, .1); font-family: "Source Serif 4", Georgia, "Times New Roman", serif; font-size: 11.5pt; color: #111; position: relative; }
.paper.is-draft::before { content: "DRAFT"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 96pt; font-weight: 700; color: rgba(200, 55, 45, .07); transform: rotate(-24deg); pointer-events: none; font-family: "Lexend", sans-serif; }
.paper-head { text-align: center; border-bottom: 2px solid #111; padding-bottom: 3mm; margin-bottom: 4mm; }
.paper-head .school { font-size: 16pt; font-weight: 700; font-family: "Lexend", sans-serif; }
.paper-head .exam { font-size: 13pt; font-weight: 700; margin-top: 1mm; }
.paper-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1mm 6mm; margin-top: 2mm; font-size: 10.5pt; }
.set-box { border: 1.5px solid #111; padding: 0 3mm; font-weight: 700; }
.roll { margin-top: 2mm; font-size: 10pt; text-align: right; }
.roll-boxes { display: inline-flex; margin-left: 2mm; } .roll-boxes i { width: 6mm; height: 6mm; border: 1px solid #111; border-left-width: 0; display: inline-block; } .roll-boxes i:first-child { border-left-width: 1px; }
.key-title { margin-top: 2mm; font-weight: 700; font-size: 12pt; text-transform: uppercase; letter-spacing: .06em; }
.paper-instructions { font-size: 10.5pt; border: 1px solid #999; padding: 2.5mm 4mm; margin-bottom: 4mm; }
.paper-section h2 { font-size: 12pt; font-weight: 700; text-align: center; margin: 5mm 0 1mm; font-family: "Lexend", sans-serif; }
.paper-section h2 span { display: block; font-size: 9.5pt; font-weight: 400; font-style: italic; font-family: inherit; }
.sec-note { text-align: center; font-size: 10pt; font-style: italic; margin-bottom: 2mm; }
.paper-list { list-style: none; padding: 0; margin: 0; }
.paper-q { display: flex; gap: 3mm; padding: 1.6mm 0; break-inside: avoid; }
.paper-q .qn { width: 8mm; flex: none; font-weight: 700; }
.paper-q .qbody { flex: 1; }
.paper-q .marks { flex: none; width: 8mm; text-align: right; font-weight: 700; }
.q-options.print { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 6mm; }
.key-q { font-size: 9.5pt; color: #555; }
.key-a { margin-top: .5mm; }
.paper-end { text-align: center; margin-top: 8mm; font-size: 10pt; letter-spacing: .1em; }
@media print {
  .paper-page { background: #fff; } .paper { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  @page { size: A4; margin: 14mm 15mm; }
}


/* ------------------------------------------------------------------
   1.8: Roles, audit log, security, messaging hub, backups, languages
   ------------------------------------------------------------------ */
.role-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--ov-muted); vertical-align: middle; }
.role-admin { background: var(--ov-blue); } .role-accountant { background: var(--ov-green); } .role-teacher { background: var(--ov-saffron); } .role-receptionist { background: var(--ov-violet); }
.perm-grid thead th { position: sticky; top: 0; background: #fff; z-index: 1; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ov-muted); }
.perm-grid .perm-group th { background: var(--ov-paper); font-family: "Lexend", sans-serif; font-size: .85rem; color: var(--ov-ink); }
.perm-grid td, .perm-grid th { padding: .45rem .6rem; }
.perm-cell { display: inline-flex; align-items: center; gap: .25rem; cursor: pointer; margin: 0; }
.perm-cell .std { font-size: .55rem; color: transparent; width: .6rem; }
.perm-cell .std.on { color: var(--ov-blue); }
.audit-table td { vertical-align: top; }
.audit-table details summary { cursor: pointer; color: var(--ov-blue); }
.audit-table .diff th { width: 34%; font-size: .8rem; }
.audit-table .diff del { background: #fde8e6; color: #9c2a22; text-decoration: line-through; padding: 0 .2rem; border-radius: .2rem; margin-right: .3rem; }
.audit-table .diff ins { background: #dcf3e9; color: #0b6a47; text-decoration: none; padding: 0 .2rem; border-radius: .2rem; }
.recovery-box { border: 1.5px solid #f2d18a; background: #fff8e8; border-radius: .8rem; padding: .9rem 1rem; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .35rem; }
.recovery-codes code { background: #fff; border: 1px solid var(--ov-line); border-radius: .4rem; padding: .3rem .5rem; font-size: .95rem; color: var(--ov-ink); text-align: center; }
.setup-box { border: 1px solid var(--ov-line); border-radius: .8rem; padding: 1rem; background: #fbfcfe; }
.qr-holder { width: 190px; height: 190px; flex: 0 0 190px; background: #fff; border: 1px solid var(--ov-line); border-radius: .6rem; padding: .4rem; }
.qr-holder svg { width: 100%; height: 100%; }
.otp-input { letter-spacing: .35em; font-family: "Lexend", monospace; font-size: 1.2rem; max-width: 220px; text-align: center; }
.login-history .list-group-item { padding: .55rem .9rem; }
.spark-bars { display: flex; align-items: flex-end; gap: 4px; height: 64px; }
.spark-bars span { flex: 1; background: linear-gradient(180deg, #5b84f0, var(--ov-blue)); border-radius: 3px 3px 0 0; min-height: 3px; }
.mini-stat { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--ov-line); border-radius: .7rem; padding: .6rem .7rem; background: #fff; }
.mini-stat > i { font-size: 1.3rem; color: var(--ov-blue); }
.msg-bubble { background: #e7f7ee; border-radius: .9rem .9rem .9rem .2rem; padding: .7rem .9rem; white-space: pre-line; min-height: 3rem; color: #12352a; }
.inbox { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 1rem; }
.inbox-list { align-self: start; }
.inbox-list .list-group { max-height: 62vh; overflow: auto; }
.inbox-thread { min-height: 420px; display: flex; flex-direction: column; }
.thread { flex: 1; overflow: auto; max-height: 56vh; padding: 1rem; background: #f4f7f2; display: flex; flex-direction: column; gap: .5rem; }
.thread .bubble { max-width: 75%; padding: .55rem .8rem; border-radius: .9rem; background: #fff; box-shadow: 0 1px 0 rgba(16, 27, 59, .06); }
.thread .bubble.out { align-self: flex-end; background: #dcf8c6; border-bottom-right-radius: .2rem; }
.thread .bubble.in { align-self: flex-start; border-bottom-left-radius: .2rem; }
.thread .bubble .meta { font-size: .72rem; color: var(--ov-muted); margin-top: .2rem; }
@media (max-width: 991.98px) { .inbox { grid-template-columns: 1fr; } }
.steps { display: flex; gap: .5rem; list-style: none; padding: 0; counter-reset: step; flex-wrap: wrap; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: .45rem; padding: .35rem .8rem .35rem .4rem; border-radius: 2rem; background: #fff; border: 1px solid var(--ov-line); color: var(--ov-muted); font-size: .9rem; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--ov-paper); font-weight: 600; font-size: .8rem; }
.steps li.active { border-color: var(--ov-blue); color: var(--ov-ink); font-weight: 600; }
.steps li.active::before { background: var(--ov-blue); color: #fff; }
.steps li.done::before { content: "✓"; background: #dcf3e9; color: #0b6a47; }
.lang-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; color: var(--ov-muted); }
.lang-pick button { border: 1px solid var(--ov-line); background: #fff; border-radius: 2rem; padding: .15rem .7rem; font-size: .9rem; color: var(--ov-text); }
.lang-pick button.active { border-color: var(--ov-blue); color: var(--ov-blue); font-weight: 600; }
@media print { .recovery-box { border-color: #000; background: #fff; } }
/* Indian languages: the Latin brand fonts have no Indic letters, so the bundled Noto fonts (2.8) take over, with the device's fonts behind them. */
:lang(kn), :lang(hi), :lang(ta), :lang(te), :lang(ml), :lang(mr) { letter-spacing: normal; }
:lang(kn) body, :lang(kn) h1, :lang(kn) h2, :lang(kn) h3, :lang(kn) .display-font { font-family: "Lexend", "Noto Sans Kannada", "Nirmala UI", "Tunga", system-ui, sans-serif; }
:lang(hi) body, :lang(hi) h1, :lang(hi) h2, :lang(hi) h3, :lang(hi) .display-font, :lang(mr) body, :lang(mr) h1, :lang(mr) h2, :lang(mr) h3, :lang(mr) .display-font { font-family: "Lexend", "Noto Sans Devanagari", "Nirmala UI", "Mangal", system-ui, sans-serif; }
:lang(ta) body, :lang(ta) h1, :lang(ta) h2, :lang(ta) h3, :lang(ta) .display-font { font-family: "Lexend", "Noto Sans Tamil", "Nirmala UI", "Latha", system-ui, sans-serif; }
:lang(te) body, :lang(te) h1, :lang(te) h2, :lang(te) h3, :lang(te) .display-font { font-family: "Lexend", "Noto Sans Telugu", "Nirmala UI", "Gautami", system-ui, sans-serif; }
:lang(ml) body, :lang(ml) h1, :lang(ml) h2, :lang(ml) h3, :lang(ml) .display-font { font-family: "Lexend", "Noto Sans Malayalam", "Nirmala UI", "Kartika", system-ui, sans-serif; }

/* v1.9 — admissions, certificates, website */
.print-only { display: none; }
@media print { th.print-only, td.print-only { display: table-cell; } div.print-only { display: block; } }
.builder-row { padding: 6px; border-radius: 8px; background: #f8fafc; }
.merit-cut td { border-bottom: 2px dashed #16a34a !important; }
.lottery-seed { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.cert-preview { font-family: Georgia, 'Times New Roman', serif; white-space: pre-line; line-height: 1.7; background: #fffdf7; border: 1px solid #eadfc4; border-radius: 8px; padding: 18px; min-height: 160px; }
.site-check li { display: flex; gap: 10px; align-items: flex-start; }
.site-check .bi-check-circle-fill { color: #16a34a; }
.site-check .bi-circle { color: #94a3b8; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.thumb-grid figure { margin: 0; position: relative; }
.thumb-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
.thumb-grid figure form { position: absolute; top: 4px; right: 4px; }
.dns-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 12px 14px; font-size: .85rem; word-break: break-all; }
.brand-tile.brand-logo { background: #fff; padding: 3px; overflow: hidden; }
.brand-tile.brand-logo img { width: 100%; height: 100%; object-fit: contain; }

/* v2.0 — learning & online tests */
.learning-note { line-height: 1.75; max-width: 75ch; }
.learning-note table { border-collapse: collapse; margin: .5rem 0; } .learning-note td, .learning-note th { border: 1px solid var(--ov-line); padding: .35rem .6rem; }
.q-card { border: 1px solid var(--ov-line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; background: #fff; }
.q-card .q-no { font-weight: 700; color: var(--ov-blue); margin-right: .35rem; }
.q-card .q-text { white-space: pre-line; }
.q-option { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--ov-line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; cursor: pointer; }
.q-option:hover { background: #f6f8fd; }
.q-option input { margin-top: 3px; }
.q-option.chosen { border-color: var(--ov-blue); background: #eef3ff; }
.q-option.right { border-color: #16a34a; background: #ecfdf3; }
.q-option.wrong { border-color: #dc2626; background: #fef2f2; }
.test-bar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--ov-line); padding: 10px 0; margin-bottom: 14px; }
.test-timer { font: 700 1.35rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.test-timer.low { color: #dc2626; }
.q-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.q-nav a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--ov-line); text-decoration: none; color: inherit; font-size: .85rem; }
.q-nav a.done { background: var(--ov-blue); border-color: var(--ov-blue); color: #fff; }
.bar-mini { height: 8px; background: #eef1f7; border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar-mini span { display: block; height: 100%; background: var(--ov-blue); }
.gradebook th, .gradebook td { white-space: nowrap; font-size: .85rem; }
.gradebook th.rot { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }

/* ---- 2.6: AI drafts, KaTeX */
.q-card.is-draft { border-color: #f0c27a; background: #fffaf2; }
.katex { font-size: 1.05em; }
.paper .katex { font-size: 1em; }
.card-band { background: #eef1f6; border-left: 3px solid var(--ov-blue, #2456e6); padding: .25rem .6rem; font-weight: 600; font-size: .85rem; margin: .8rem 0 .4rem; }
.board-card .table-sm td, .board-card .table-sm th, .hpc-card .table-sm td, .hpc-card .table-sm th { padding: .3rem .45rem; }
.hpc-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; border: 1.5px solid #2456e6; margin: 0 .08rem; vertical-align: middle; }
.hpc-dot.on { background: #2456e6; }
.hpc-legend { display: flex; gap: 1.2rem; justify-content: flex-end; color: #555; margin-bottom: .3rem; }
.hpc-dl dt { font-weight: 600; color: #555; margin-top: .3rem; }
.hpc-dl dd { margin: 0 0 .2rem; }
.hpc-pick { display: inline-flex; gap: .15rem; }
.hpc-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hpc-pick label { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1px solid var(--ov-line); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; cursor: pointer; background: #fff; }
.hpc-pick input:checked + label { background: #2456e6; color: #fff; border-color: #2456e6; }
.hpc-pick input:focus-visible + label { outline: 2px solid #e8820c; outline-offset: 1px; }
@media print { .card-band { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .hpc-dot.on { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.house-board li { display: flex; gap: .8rem; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--ov-line); }
.house-board li:last-child { border-bottom: 0; }
.house-rank { font-weight: 700; font-size: 1.1rem; width: 1.4rem; text-align: center; color: #555; }
.house-swatch { width: 1.4rem; height: 1.4rem; border-radius: .35rem; flex-shrink: 0; }
.house-swatch.sm { width: .9rem; height: .9rem; margin-top: .2rem; }
.house-bar { height: .5rem; background: #eef1f6; border-radius: 4px; margin: .3rem 0 .2rem; overflow: hidden; }
.house-bar span { display: block; height: 100%; border-radius: 4px; }
.risk-score { display: inline-block; min-width: 2.4rem; padding: .2rem .4rem; border-radius: 999px; font-weight: 700; background: #fff4e5; color: #8a4b00; }
.risk-score.mid { background: #ffe1cc; color: #8a3300; }
.risk-score.high { background: #fbdcda; color: #9b1c14; }
.si-saffron { background: #fdeccd; color: #8a5500; }
.consent-bar { display: flex; height: .45rem; background: #eef1f6; border-radius: 4px; overflow: hidden; gap: 2px; }
.consent-bar .yes { background: #12855a; } .consent-bar .no { background: #c8372d; }
.omr-fix { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: .3rem; max-height: 26rem; overflow: auto; }
.omr-fix label { display: flex; align-items: center; gap: .25rem; padding: .15rem .3rem; border-radius: .35rem; border: 1px solid var(--ov-line); font-size: .8rem; }
.omr-fix label span { width: 1.6rem; text-align: right; color: #555; }
.omr-fix select { border: 0; background: transparent; font-weight: 600; }
.omr-fix .right { background: #dcf3e9; } .omr-fix .wrong { background: #fbe2df; } .omr-fix .multi { background: #fdeccd; } .omr-fix .blank { background: #f3f4f6; }
.omr-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.2rem, 1fr)); gap: .25rem; }
.omr-items span { border: 1px solid var(--ov-line); border-radius: .35rem; padding: .15rem; text-align: center; font-size: .72rem; line-height: 1.2; }
.omr-items span b { display: block; font-size: .85rem; } .omr-items span i { font-style: normal; color: #555; }
.omr-items span.low { background: #fbe2df; border-color: #f1b4ae; }

/* ---- 2.7 */
.budget-bar { position: relative; height: .45rem; background: #eef1f6; border-radius: 4px; overflow: visible; margin-bottom: .15rem; }
.budget-bar span { display: block; height: 100%; border-radius: 4px; background: #2456e6; }
.budget-bar span.over { background: #c8372d; }
.budget-bar span.ahead { background: #12855a; }
.budget-bar i { position: absolute; top: -3px; width: 2px; height: calc(100% + 6px); background: #101b3b; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .6rem; }
.pos-item { border: 1px solid var(--ov-line); border-radius: .6rem; padding: .55rem .65rem; }
.veg-dot { display: inline-block; width: .7rem; height: .7rem; border: 1.5px solid #12855a; border-radius: 2px; position: relative; vertical-align: middle; margin-left: .2rem; }
.veg-dot::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: #12855a; }
.veg-dot.nonveg { border-color: #8a3a1a; } .veg-dot.nonveg::after { background: #8a3a1a; }

/* v2.8 — report cards in the family's language, offline sync, face check-in, message translations */
.rc-en { font-size: .78em; color: var(--ov-muted, #5e6880); font-weight: 400; white-space: nowrap; }
.rc-bilingual th .rc-en, .rc-bilingual .card-band .rc-en { display: block; line-height: 1.1; }
.rc-bilingual .sheet-head .rc-en { display: block; font-size: .7em; }
@media print { .rc-en { color: #444; } }
.lang-cover { height: .35rem; border-radius: 3px; background: #eef1f6; overflow: hidden; }
.lang-cover span { display: block; height: 100%; background: #12855a; }
.tr-grid td, .tr-grid th { vertical-align: top; }
.tr-cell { min-width: 6rem; }
.tr-side { background: #f6f7fb; border-radius: .5rem; padding: .75rem; white-space: pre-wrap; font-size: .92rem; }
.sms-count { font-variant-numeric: tabular-nums; }
.face-pair { display: flex; gap: .5rem; }
.face-pair img, .face-pair .ph { width: 96px; height: 120px; object-fit: cover; border-radius: .5rem; background: #eef1f6; display: flex; align-items: center; justify-content: center; color: #8a93a8; }
.score-chip { font-variant-numeric: tabular-nums; font-weight: 600; }
.window-code { font-family: "Lexend", sans-serif; font-size: 4.5rem; letter-spacing: .4rem; font-weight: 700; line-height: 1; color: var(--ov-ink, #101b3b); }
.conflict-arrow { color: #8a93a8; }

/* ===== 2.9 — parents and engagement ===== */
.min-w-0 { min-width: 0; }
a.chip { color: var(--ov-text); text-decoration: none; } a.chip.active { background: var(--ov-blue); color: #fff; }
/* chat */
.chat-shell { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 15rem); min-height: 28rem; overflow: hidden; }
.chat-list { border-right: 1px solid var(--ov-line); overflow-y: auto; }
.chat-item { display: flex; gap: .6rem; align-items: center; padding: .65rem .75rem; border-bottom: 1px solid var(--ov-line); color: var(--ov-text); text-decoration: none; }
.chat-item:hover { background: #f6f8fc; color: var(--ov-text); } .chat-item.active { background: #e9effd; }
.chat-avatar { width: 2.3rem; height: 2.3rem; border-radius: 50%; background: #e4ecff; color: var(--ov-blue); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-pane > .empty { margin: auto; }
.chat-head { display: flex; gap: .6rem; align-items: center; padding: .65rem .9rem; border-bottom: 1px solid var(--ov-line); }
.chat-msgs { flex: 1; overflow-y: auto; padding: .9rem; background: #f6f8fc; display: flex; flex-direction: column; gap: .35rem; }
.chat-day { align-self: center; font-size: .75rem; color: var(--ov-muted); background: #fff; border: 1px solid var(--ov-line); border-radius: 99px; padding: .1rem .7rem; margin: .4rem 0; }
.chat-msg { display: flex; } .chat-msg.mine { justify-content: flex-end; }
.chat-msg .bubble { max-width: min(75%, 34rem); background: #fff; border: 1px solid var(--ov-line); border-radius: .9rem .9rem .9rem .25rem; padding: .45rem .7rem; }
.chat-msg.mine .bubble { background: #dfe8fd; border-color: #c9d7fb; border-radius: .9rem .9rem .25rem .9rem; }
.chat-msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg .who { font-size: .75rem; font-weight: 600; color: var(--ov-blue); }
.chat-msg .file { display: block; font-size: .9rem; margin-top: .15rem; }
.chat-msg .meta { font-size: .72rem; color: var(--ov-muted); text-align: right; margin-top: .1rem; }
.chat-msg .meta .read { color: var(--ov-blue); }
.chat-compose { display: flex; gap: .5rem; align-items: flex-end; padding: .6rem .75rem; border-top: 1px solid var(--ov-line); }
.chat-compose textarea { resize: none; max-height: 8rem; }
@media (max-width: 991.98px) { .chat-shell { grid-template-columns: 1fr; height: auto; min-height: 0; } .chat-list { border-right: 0; max-height: none; } .chat-pane { height: calc(100vh - 12rem); min-height: 26rem; } }
/* gallery */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.album-card { color: var(--ov-text); text-decoration: none; overflow: hidden; transition: transform .12s ease; } .album-card:hover { transform: translateY(-2px); color: var(--ov-text); }
.album-cover { aspect-ratio: 4 / 3; background: #eef1f6; display: flex; align-items: center; justify-content: center; color: #8a93a8; font-size: 2rem; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .75rem; }
.gallery-tile { overflow: hidden; }
.gallery-media { aspect-ratio: 1; background: #10162b; display: flex; align-items: center; justify-content: center; }
.gallery-media img, .gallery-media video, .gallery-media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.gallery-media a { display: block; width: 100%; height: 100%; }
.gallery-link { color: #fff; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-decoration: none; } .gallery-link i { font-size: 2.4rem; }
/* events */
.event-date { width: 3.2rem; text-align: center; border: 1px solid var(--ov-line); border-radius: .6rem; overflow: hidden; flex: none; line-height: 1.1; }
.event-date span { display: block; background: var(--ov-blue); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; padding: .1rem 0; }
.event-date strong { display: block; font-size: 1.3rem; padding: .15rem 0; }
/* surveys — thin bars, rounded ends, a 2px gap between parts; numbers always shown beside the bar */
.meter { height: .45rem; background: #eef1f6; border-radius: 4px; overflow: hidden; } .meter span { display: block; height: 100%; background: var(--ov-blue); border-radius: 4px; }
.hbar { display: grid; grid-template-columns: minmax(3rem, 9rem) 1fr auto; gap: .6rem; align-items: center; margin: .25rem 0; font-size: .9rem; }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ov-muted); }
.hbar-track { height: .6rem; background: #eef1f6; border-radius: 4px; overflow: hidden; } .hbar-track span { display: block; height: 100%; background: var(--ov-blue); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nps-bar { display: flex; height: .7rem; background: #eef1f6; border-radius: 4px; overflow: hidden; gap: 2px; }
.nps-bar .pro { background: #12855a; } .nps-bar .pas { background: #9aa3b5; } .nps-bar .det { background: #c8372d; }
.survey-texts { list-style: none; padding: 0; margin: 0; max-height: 22rem; overflow-y: auto; } .survey-texts li { border-left: 3px solid var(--ov-line); padding: .3rem .6rem; margin-bottom: .35rem; background: #f8f9fc; font-size: .92rem; }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: .2rem; } .rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-input label { font-size: 1.9rem; color: #cfd5e2; cursor: pointer; line-height: 1; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--ov-saffron); }
.rating-input input:focus-visible + label { outline: 2px solid var(--ov-blue); outline-offset: 2px; border-radius: 4px; }
.nps-input { display: flex; flex-wrap: wrap; gap: .25rem; } .nps-input .btn { min-width: 2.4rem; }
/* instalments */
.instalment-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .5rem; }
.instalment-step { border: 1px solid var(--ov-line); border-left: 4px solid var(--ov-blue); border-radius: .5rem; padding: .5rem .65rem; background: #fff; }
.instalment-step.done { border-left-color: var(--ov-green); background: #f3fbf7; } .instalment-step.late { border-left-color: var(--ov-red); background: #fdf4f3; }

/* ===== 3.0 — smart campus and insights ===== */
/* line chart: 2px line, 9px markers, recessive grid, threshold dashed */
.line-chart svg { display: block; overflow: visible; }
.lc-grid { stroke: #e7eaf2; stroke-width: 1; }
.lc-axis { fill: var(--ov-muted); font-size: 11px; }
.lc-line { fill: none; stroke: var(--ov-blue); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lc-dot { fill: var(--ov-blue); stroke: #fff; stroke-width: 2; }
.lc-threshold { stroke: var(--ov-red); stroke-width: 1; stroke-dasharray: 4 4; opacity: .7; }
/* bus duty */
.bus-row.state-on_bus { background: #eef3ff; } .bus-row.state-dropped { background: #f1faf5; } .bus-row.state-absent { background: #fdf3f2; }
.bus-row .btn { min-width: 4.5rem; }
/* mastery */
.mastery-table th { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.mastery-cell { display: inline-block; min-width: 2.4rem; padding: .1rem .3rem; border-radius: 4px; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mastery-cell.strong { background: #dcf3e9; color: #0b6a47; } .mastery-cell.fair { background: #fdecd2; color: #8a5500; } .mastery-cell.weak { background: #fbe2df; color: #a22a21; } .mastery-cell.none { color: #9aa3b5; }
.hbar-track .lvl-strong { background: #12855a; } .hbar-track .lvl-fair { background: #c96a07; } .hbar-track .lvl-weak { background: #c8372d; } .hbar-track .lvl-unknown { background: #9aa3b5; }
/* early warning */
.risk-score { display: inline-block; min-width: 2.2rem; text-align: center; border-radius: 4px; padding: .1rem .35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.risk-score.r1 { background: #fdecd2; color: #8a5500; } .risk-score.r2 { background: #fbd9c7; color: #923a12; } .risk-score.r3 { background: #fbe2df; color: #a22a21; }
/* rooms */
.room-day { display: flex; flex-wrap: wrap; gap: .3rem; }
.room-slot { font-size: .78rem; border-radius: 4px; padding: .1rem .45rem; background: #eef1f8; }
.room-slot.period { background: #f3f4f6; color: #4a5470; } .room-slot.booking { background: #e4ecff; color: #1b44bd; } .room-slot.exam { background: #fdecd2; color: #8a5500; }
/* seating */
.seat-grid { display: grid; gap: 4px; }
.seat { border: 1px solid var(--ov-line); border-radius: 6px; padding: .25rem .35rem; min-height: 3.6rem; font-size: .74rem; line-height: 1.2; background: #fff; overflow: hidden; }
.seat strong { display: block; font-size: .78rem; } .seat span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .seat small { color: var(--ov-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat.empty { border-style: dashed; color: #b3bdd6; background: transparent; }
.seat.c0 { border-left: 4px solid #2456e6; } .seat.c1 { border-left: 4px solid #12855a; } .seat.c2 { border-left: 4px solid #c96a07; } .seat.c3 { border-left: 4px solid #6a4bd8; } .seat.c4 { border-left: 4px solid #0e8a94; } .seat.c5 { border-left: 4px solid #c8372d; }
.chat-msg audio.voice { display: block; max-width: 16rem; height: 2.2rem; margin-top: .15rem; }

/* ---- 3.1 campus care: wellbeing check-ins, digest preview, visit slots ---- */
.mood-btn { display: inline-flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 5.2rem; padding: .55rem .6rem; }
.mood-face { font-size: 1.9rem; line-height: 1; }
.mood-chip { display: inline-flex; flex-direction: column; align-items: center; padding: .3rem .45rem; border: 1px solid var(--bs-border-color, #e2e6f0); border-radius: .6rem; font-size: 1.3rem; line-height: 1.1; }
.mood-chip small { font-size: .68rem; color: var(--bs-secondary-color, #5e6880); }
.wb-row.wb-alert { border-left: 4px solid #d92d20; background: rgba(217, 45, 32, .04); }
.digest-preview { background: #f3f5fa; padding: 1rem; border-radius: .7rem; overflow-x: auto; }
.visit-slots .btn-sm { min-width: 5.5rem; }

/* ---- 3.1.1: sign-in on phones (one column; the later two-column rule used to win) ---- */
@media (max-width: 860px) {
    .auth-wrap { grid-template-columns: minmax(0, 1fr); min-height: 100svh; }
    .auth-side { display: none; }
    .auth-main { align-items: flex-start; padding: 1rem .75rem 1.5rem; }
    .auth-card { max-width: 480px; margin: 0 auto; padding: 1.25rem 1.1rem; border-radius: 1rem; }
    .auth-card h1 { font-size: 1.45rem; }
    .role-row { gap: .35rem; }
    .role-row div { font-size: .74rem; padding: .45rem .1rem; }
    .lang-pick button { padding: .15rem .55rem; font-size: .85rem; }
    .auth-card .form-control { font-size: 16px; } /* no zoom on focus in iOS Safari */
}

/* ---- 3.1.1: timetable breaks ---- */
.tt .tt-break th, .tt .tt-break td { background: #fff8e6; border-top: 1px dashed #f3c76b; border-bottom: 1px dashed #f3c76b; padding-top: .35rem; padding-bottom: .35rem; }
.tt .tt-break-lunch th, .tt .tt-break-lunch td { background: #eaf7ef; border-color: #8fd3a8; }
.tt .tt-break td { text-align: center; letter-spacing: .25em; text-transform: uppercase; font-size: .78rem; font-weight: 600; color: #8a6100; }
.tt .tt-break-lunch td { color: #19723f; }
.tt-break-col { width: 1.6rem; min-width: 1.6rem; padding: .2rem !important; text-align: center; color: #8a6100; background: repeating-linear-gradient(45deg, #fff8e6, #fff8e6 6px, #fdeec6 6px, #fdeec6 12px); }
td.tt-break-lunch.tt-break-col, th.tt-break-col:has(.bi-egg-fried) { background: repeating-linear-gradient(45deg, #eaf7ef, #eaf7ef 6px, #d3efdd 6px, #d3efdd 12px); color: #19723f; }
[data-theme="dark"] .tt .tt-break th, [data-theme="dark"] .tt .tt-break td { background: rgba(243, 199, 107, .12); }
[data-theme="dark"] .tt .tt-break-lunch th, [data-theme="dark"] .tt .tt-break-lunch td { background: rgba(143, 211, 168, .12); }

/* ---- 3.1.1: module picker ---- */
.mod-row { cursor: pointer; border-bottom: 1px solid rgba(0,0,0,.05); }
.mod-row:last-child { border-bottom: 0; }
.mod-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .2rem; vertical-align: middle; }
.mod-dot.plan { background: #2f5bea; } .mod-dot.add { background: #1f9d55; } .mod-dot.off { background: #d64545; }

/* ---- 3.1.1: student profile ---- */
.sp-stat { position: relative; overflow: hidden; border-radius: 1rem; padding: 1.1rem 1.25rem; color: #fff; min-height: 118px; display: flex; flex-direction: column; justify-content: center; box-shadow: 0 10px 24px rgba(16, 27, 59, .14); }
.sp-stat > i { position: absolute; right: -.4rem; bottom: -1rem; font-size: 5.2rem; opacity: .18; }
.sp-stat-label { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; opacity: .9; }
.sp-stat-value { font-family: "Lexend", sans-serif; font-size: clamp(1.3rem, 1.05rem + .7vw, 1.8rem); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-stat-value small { font-size: .55em; opacity: .8; margin-left: .15rem; }
.sp-stat-note { font-size: .84rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-blue { background: linear-gradient(135deg, #2456e6, #5b7cf5); }
.sp-green { background: linear-gradient(135deg, #0f7a52, #22b07d); }
.sp-red { background: linear-gradient(135deg, #c8372d, #ef6a5b); }
.sp-orange { background: linear-gradient(135deg, #d9780b, #f2a01e); }
.sp-card { border-radius: 1.1rem; overflow: hidden; position: sticky; top: 84px; }
.sp-card-head { background: radial-gradient(120% 140% at 100% 0%, #2c3f7c 0%, var(--ov-ink) 60%); color: #fff; text-align: center; padding: 1.6rem 1rem 1.2rem; }
.sp-avatar { position: relative; width: 96px; height: 96px; border-radius: 50%; margin: 0 auto .7rem; background: linear-gradient(135deg, var(--ov-saffron), #f6c15b); display: flex; align-items: center; justify-content: center; font-family: "Lexend", sans-serif; font-size: 2rem; font-weight: 700; color: var(--ov-ink); border: 4px solid rgba(255,255,255,.18); }
.sp-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.sp-avatar.sm { width: 46px; height: 46px; font-size: 1rem; margin: 0; border-width: 2px; flex: none; }
.sp-dot { position: absolute; right: 4px; bottom: 6px; width: 16px; height: 16px; border-radius: 50%; background: #9aa3b8; border: 3px solid var(--ov-ink); }
.sp-dot.on { background: #22c55e; }
.sp-photo-btn { position: absolute; left: -4px; bottom: 0; }
.sp-photo-btn label { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--ov-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .9rem; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.sp-name { font-family: "Lexend", sans-serif; font-size: 1.25rem; font-weight: 700; margin: 0 0 .45rem; color: #fff; }
.sp-pill { display: inline-block; padding: .2rem .7rem; border-radius: 99px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); font-size: .82rem; font-weight: 600; }
.sp-pill-violet { background: rgba(106,75,216,.45); }
.sp-donut { --p: 0; --c: #12855a; width: 92px; height: 92px; border-radius: 50%; flex: none; background: conic-gradient(var(--c) calc(var(--p) * 1%), #fbe1dd 0); display: grid; place-items: center; }
.sp-donut > span { width: 70%; height: 70%; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.sp-donut strong { font-family: "Lexend", sans-serif; font-size: 1.05rem; }
.sp-donut small { font-size: .66rem; color: var(--ov-muted); }
.sp-donut.lg { width: 118px; height: 118px; }
.sp-donut.lg strong { font-size: 1.3rem; }
.sp-donut-green { --c: #12855a; background: conic-gradient(var(--c) calc(var(--p) * 1%), #e4e8f1 0); }
.sp-donut-row { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--ov-line); margin-bottom: .8rem; }
.sp-key { display: inline-block; width: .65rem; height: .65rem; border-radius: 3px; margin-right: .35rem; }
.sp-key.paid { background: #12855a; } .sp-key.due { background: #f2b5ad; }
.sp-facts { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0 0 1rem; }
.sp-facts dt { font-weight: 500; color: var(--ov-muted); font-size: .9rem; }
.sp-facts dt i { margin-right: .4rem; color: var(--ov-blue); }
.sp-facts dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.sp-box .sp-facts dd { text-align: left; }
.sp-actions { display: grid; gap: .5rem; }
.sp-actions form { margin: 0; }
.sp-actions .btn { width: 100%; font-weight: 600; border: 0; color: #fff; border-radius: .65rem; padding: .55rem .8rem; }
.sp-btn-orange { background: linear-gradient(135deg, #e07d10, #f2a01e); }
.sp-btn-blue { background: linear-gradient(135deg, #2456e6, #4a73f0); }
.sp-btn-violet { background: linear-gradient(135deg, #6a4bd8, #8b70ea); }
.sp-btn-yellow { background: linear-gradient(135deg, #f2b705, #f8d24a); color: #3c2c00 !important; }
.sp-btn-teal { background: linear-gradient(135deg, #0e8a94, #22b3bd); }
.sp-btn-green { background: linear-gradient(135deg, #0f7a52, #22b07d); }
.sp-actions .btn:hover { filter: brightness(1.06); }
.sp-barcode { text-align: center; margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed var(--ov-line); overflow: hidden; }
.sp-barcode svg { max-width: 100%; height: auto; }
.sp-tabs-card { border-radius: 1.1rem; overflow: hidden; }
.sp-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: .25rem; padding: .55rem .6rem 0; border-bottom: 1px solid var(--ov-line); background: #f7f8fc; scrollbar-width: thin; }
.sp-tabs .nav-link { white-space: nowrap; border: 0; border-bottom: 3px solid transparent; border-radius: .5rem .5rem 0 0; color: var(--ov-muted); font-weight: 600; padding: .6rem .85rem; background: none; }
.sp-tabs .nav-link:hover { color: var(--ov-ink); background: #eef1f9; }
.sp-tabs .nav-link.active { color: var(--ov-blue); border-bottom-color: var(--ov-blue); background: #fff; }
.sp-section { margin-bottom: 1.5rem; }
.sp-section h3, .sp-box h3 { font-family: "Lexend", sans-serif; font-size: 1rem; font-weight: 700; color: var(--ov-ink); margin: 0 0 .8rem; display: flex; align-items: center; gap: .5rem; }
.sp-section h3 i, .sp-box h3 i { width: 30px; height: 30px; border-radius: .55rem; background: #e4ecff; color: var(--ov-blue); display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.sp-grid > div { background: #f7f8fc; border: 1px solid var(--ov-line); border-radius: .7rem; padding: .55rem .8rem; min-width: 0; }
.sp-grid > div.sp-wide { grid-column: 1 / -1; }
.sp-grid > div > span { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ov-muted); font-weight: 600; }
.sp-grid > div > strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.sp-parent { display: flex; gap: .8rem; align-items: flex-start; border: 1px solid var(--ov-line); border-left: 4px solid var(--tone, #2456e6); border-radius: .8rem; padding: .85rem 1rem; height: 100%; background: #fff; }
.sp-parent-blue { --tone: #2456e6; } .sp-parent-violet { --tone: #6a4bd8; } .sp-parent-teal { --tone: #0e8a94; } .sp-parent-red { --tone: #c8372d; }
.sp-parent-icon { width: 38px; height: 38px; border-radius: 50%; background: #eef1f9; color: var(--tone, var(--ov-blue)); display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 1.1rem; }
.min-w-0 { min-width: 0; }
.sp-sibling { display: flex; align-items: center; gap: .8rem; border: 1px solid var(--ov-line); border-radius: .9rem; padding: .75rem .9rem; color: inherit; text-decoration: none; background: #fff; }
.sp-sibling:hover { border-color: var(--ov-blue); box-shadow: 0 4px 14px rgba(36,86,230,.1); }
.sp-mini { border-radius: .8rem; padding: .6rem .8rem; background: var(--soft, #eef1f9); border: 1px solid transparent; }
.sp-mini span { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--tone, var(--ov-muted)); }
.sp-mini strong { font-family: "Lexend", sans-serif; font-size: 1.1rem; color: var(--ov-ink); white-space: nowrap; }
.sp-mini-blue { --tone: #2456e6; --soft: #e4ecff; } .sp-mini-green { --tone: #12855a; --soft: #dff5ea; } .sp-mini-teal { --tone: #0e8a94; --soft: #dcf3f4; }
.sp-mini-orange { --tone: #c96a07; --soft: #fdecd2; } .sp-mini-red { --tone: #c8372d; --soft: #fde3e0; } .sp-mini-violet { --tone: #6a4bd8; --soft: #ece6fc; }
.sp-progress { height: 14px; border-radius: 99px; background: #fde3e0; }
.sp-progress .progress-bar { background: linear-gradient(90deg, #0f7a52, #22b07d); font-size: .7rem; font-weight: 700; }
.sp-feegroup { border: 1px solid var(--ov-line); border-radius: .9rem; overflow: hidden; margin-bottom: 1rem; }
.sp-feegroup-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .65rem .9rem; background: linear-gradient(90deg, #eef2ff, #f7f8fc); border-bottom: 1px solid var(--ov-line); }
.sp-feegroup tfoot td { background: #f7f8fc; }
.sp-upload { background: #f7f8fc; border: 1px dashed #c7cfe3; border-radius: .9rem; padding: .9rem 1rem; }
.sp-docs { display: grid; gap: .5rem; }
.sp-doc { display: flex; align-items: center; gap: .75rem; border: 1px solid var(--ov-line); border-radius: .8rem; padding: .6rem .85rem; }
.sp-doc > i { font-size: 1.5rem; color: var(--ov-blue); }
.sp-doc form { margin: 0; }
.sp-cred { border: 1px solid var(--ov-line); border-radius: .9rem; padding: 1rem; height: 100%; }
.sp-cred-user { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
.sp-cred-user code { background: #eef1f9; padding: .2rem .5rem; border-radius: .4rem; color: var(--ov-ink); }
.sp-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.sp-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.sp-cal-dn { text-align: center; font-size: .74rem; font-weight: 700; color: var(--ov-muted); text-transform: uppercase; }
.sp-cal-day { aspect-ratio: 1.25; border-radius: .6rem; border: 1px solid var(--ov-line); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; background: #fff; }
.sp-cal-day span { font-weight: 600; }
.sp-cal-day small { font-size: .66rem; font-weight: 700; }
.sp-cal-day.sun { background: #f7f8fc; color: var(--ov-muted); }
.sp-cal-day.today { outline: 2px solid var(--ov-blue); outline-offset: 1px; }
.st-present { background: #dff5ea !important; border-color: #9fdcbf !important; color: #0f6b47; }
.st-absent { background: #fde3e0 !important; border-color: #f2b5ad !important; color: #a12a21; }
.st-late { background: #fdecd2 !important; border-color: #f6cf8f !important; color: #8a4b00; }
.st-half_day { background: #ece6fc !important; border-color: #cbbdf5 !important; color: #4f35b0; }
.st-leave { background: #dcf3f4 !important; border-color: #9fd8dc !important; color: #0b6b73; }
.sp-legend span { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; border: 1px solid; margin: 0 .25rem 0 .7rem; vertical-align: -1px; }
.sp-legend span:first-child { margin-left: 0; }
.sp-timeline { position: relative; padding-left: .3rem; }
.sp-tl-item { display: flex; gap: .8rem; padding: .55rem 0; border-bottom: 1px dashed var(--ov-line); }
.sp-tl-dot { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sp-tl-item.merit .sp-tl-dot { background: #dff5ea; color: #12855a; }
.sp-tl-item.demerit .sp-tl-dot { background: #fde3e0; color: #c8372d; }
.sp-box { border: 1px solid var(--ov-line); border-radius: .9rem; padding: 1rem 1.1rem; height: 100%; }
.sp-pass code { background: rgba(255,255,255,.7); padding: .1rem .4rem; border-radius: .3rem; }
@media (max-width: 991.98px) { .sp-card { position: static; } }
@media (max-width: 575.98px) {
    .sp-stat { min-height: 100px; padding: .9rem; } .sp-stat > i { font-size: 4rem; }
    .sp-cal { gap: .2rem; } .sp-cal-day { aspect-ratio: 1; border-radius: .45rem; } .sp-cal-day small { display: none; }
    .sp-grid { grid-template-columns: 1fr 1fr; }
}
[data-theme="dark"] .sp-tabs { background: rgba(255,255,255,.03); }
[data-theme="dark"] .sp-tabs .nav-link.active, [data-theme="dark"] .sp-parent, [data-theme="dark"] .sp-sibling, [data-theme="dark"] .sp-cal-day, [data-theme="dark"] .sp-donut > span { background: var(--bs-body-bg, #141b2d); }
[data-theme="dark"] .sp-grid > div, [data-theme="dark"] .sp-upload, [data-theme="dark"] .sp-feegroup-head, [data-theme="dark"] .sp-feegroup tfoot td { background: rgba(255,255,255,.04); }
@media print { .sp-actions, .sp-tabs, .sp-photo-btn { display: none !important; } }
.af-photo { width: 110px; height: 135px; border: 1px dashed #9aa3b8; display: flex; align-items: center; justify-content: center; color: #9aa3b8; font-size: .8rem; flex: none; }
.af-photo img { width: 100%; height: 100%; object-fit: cover; }
.af-h { font-size: .95rem; font-weight: 700; background: #eef1f9; padding: .35rem .6rem; margin: .5rem 0; border-left: 4px solid var(--ov-blue); }
@media print { .af-h { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .sp-print .photo-box img { max-height: 116px; } }
@media (min-width: 992px) { .sp-tabs { flex-wrap: wrap; overflow: visible; } .sp-cal-day { aspect-ratio: 1.9; } }
/* five tiles in one row: smaller icon and figure so amounts stay whole */
.tiles-tight .tile { padding: .9rem 1rem .9rem .9rem; gap: .7rem; }
.tiles-tight .tile-icon { width: 40px; height: 40px; font-size: 1.15rem; border-radius: .7rem; }
.tiles-tight .tile-value { font-size: clamp(1.1rem, .95rem + .4vw, 1.35rem); }
.tiles-tight .tile-label { letter-spacing: .04em; font-size: .68rem; }
.tiles-tight .tile-note { font-size: .8rem; }
.tiles-tight { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.tt-break-edit { border: 1px dashed var(--ov-line); border-radius: .75rem; padding: .55rem .7rem .7rem; margin-bottom: .6rem; background: #fafbfe; }
.tt-break-edit.tt-break-short { background: #fff8e6; border-color: #f0d9a0; }
.tt-break-edit.tt-break-lunch { background: #e9f7ef; border-color: #b5e0c6; }
[data-theme="dark"] .tt-break-edit { background: rgba(255,255,255,.03); }
.sig-canvas { width: 100%; max-width: 520px; height: auto; aspect-ratio: 520 / 160; background: #fff; border: 1px dashed #9aa6c2; border-radius: .6rem; touch-action: none; cursor: crosshair; display: block; }

/* ===== 3.1.2 — printed letterhead on every page printed from the app ===== */
.print-letterhead { display: none; }
@media print {
  .print-letterhead { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid #1d2b5c; padding-bottom: 8px; margin-bottom: 12px; }
  .print-letterhead img { max-height: 58px; max-width: 150px; object-fit: contain; }
  .print-letterhead > div:not(.pl-date) { flex: 1; }
  .print-letterhead .pl-name { font-family: "Lexend", sans-serif; font-size: 1.25rem; font-weight: 700; color: #101b3b; }
  .print-letterhead .pl-meta { font-size: .8rem; color: #4b5563; }
  .print-letterhead .pl-date { font-size: .75rem; color: #6b7280; white-space: nowrap; }
  /* documents that already print their own letterhead */
  .content:has(.sheet-head, .challan, .report-card, .no-letterhead) .print-letterhead { display: none; }
}
.doc-logo { max-height: 56px; max-width: 150px; object-fit: contain; }

/* ===== 3.1.2 — accordion side menu ===== */
.side-accordion .side-section { margin-bottom: 2px; }
.side-toggle { display: flex; align-items: center; gap: .4rem; width: 100%; background: none; border: 0; border-radius: .5rem; cursor: pointer; padding: .62rem .6rem .5rem; margin-top: .15rem; }
.side-toggle:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.side-toggle:focus-visible { outline: 2px solid #7aa2ff; outline-offset: 1px; }
.side-count { font-size: .66rem; letter-spacing: 0; background: rgba(255, 255, 255, .08); color: #9fb0e0; border-radius: 1rem; padding: .05rem .45rem; font-weight: 600; }
.side-chev { font-size: .75rem; transition: transform .2s ease; color: #7c88b5; }
.side-section.open > .side-toggle { color: #dfe6ff; }
.side-section.open > .side-toggle .side-chev { transform: rotate(180deg); }
.side-section.has-active > .side-toggle { color: #fff; }
.side-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.side-items > div { overflow: hidden; min-height: 0; }
.side-section.open > .side-items { grid-template-rows: 1fr; }
.side-find { position: relative; margin: 0 .6rem .4rem; }
.side-find i { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: #7c88b5; font-size: .85rem; }
.side-find input { width: 100%; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: #e6ebff; border-radius: .55rem; padding: .42rem .6rem .42rem 1.9rem; font-size: .88rem; }
.side-find input::placeholder { color: #8090c0; }
.side-find input:focus { outline: none; border-color: #5d82f0; background: rgba(255, 255, 255, .1); }
.side-accordion.finding .side-items { grid-template-rows: 1fr; }
.side-accordion .side-link.find-hide, .side-accordion .side-section.find-hide { display: none; }
@media (prefers-reduced-motion: reduce) { .side-items, .side-chev { transition: none; } }

/* ===== 3.1.3 — knowledge base & user manual ===== */
.kb-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-end; justify-content: space-between; padding: 2.2rem 2.2rem 2rem; border-radius: 1.25rem; margin-bottom: 1.5rem; color: #fff;
  background: radial-gradient(1200px 300px at 110% -40%, rgba(242,160,30,.35), transparent 60%), linear-gradient(120deg, #101b3b 0%, #1c3a9e 55%, #2456e6 100%); }
.kb-hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.06); }
.kb-hero h1 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); margin: .3rem 0 .4rem; }
.kb-hero p { color: #c9d4f5; max-width: 56ch; margin-bottom: 1.1rem; }
.kb-hero-text { flex: 1 1 520px; position: relative; z-index: 1; }
.kb-eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #ffd28a; }
.kb-search { display: flex; align-items: center; gap: .5rem; background: #fff; border-radius: .9rem; padding: .35rem .35rem .35rem 1rem; max-width: 640px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.kb-search i { color: #6b7896; }
.kb-search input { flex: 1; border: 0; outline: none; font-size: 1.02rem; padding: .45rem 0; min-width: 0; color: #101b3b; }
.kb-hero-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: .7rem; }
.kb-stat { text-align: right; } .kb-stat strong { display: block; font-family: "Lexend", sans-serif; font-size: 2.4rem; line-height: 1; } .kb-stat span { color: #c9d4f5; font-size: .85rem; }
.kb-hit { display: flex; gap: .9rem; padding: .9rem 1.2rem; border-top: 1px solid var(--ov-line); color: inherit; text-decoration: none; }
.kb-hit:hover { background: #f5f7fd; } .kb-hit > i { color: var(--ov-blue); font-size: 1.3rem; } .kb-hit p { margin: .2rem 0 0; color: var(--ov-muted); font-size: .9rem; }
.kb-cat { margin-left: .5rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ov-muted); }
.kb-path { background: #fff; border: 1px solid var(--ov-line); border-radius: 1.1rem; padding: 1.3rem 1.4rem; }
.kb-path-head { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: baseline; margin-bottom: .8rem; } .kb-path-head h2 { font-size: 1.2rem; margin: 0; }
.kb-path-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .6rem; counter-reset: none; }
.kb-path-list a { display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; border-radius: .8rem; background: #f6f8fd; border: 1px solid transparent; color: inherit; text-decoration: none; height: 100%; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.kb-path-list a:hover { transform: translateY(-2px); border-color: #c9d6fb; background: #fff; }
.kb-path-list small { display: block; color: var(--ov-muted); font-size: .8rem; line-height: 1.35; }
.kb-path-list .bi-arrow-right { margin-left: auto; color: var(--ov-blue); }
.kb-path-n { flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ov-blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: "Lexend", sans-serif; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.kb-cat-card { --tone: #2456e6; --tone-soft: #e4ecff; background: #fff; border: 1px solid var(--ov-line); border-radius: 1.1rem; padding: 1.1rem 1.2rem; border-top: 4px solid var(--tone); }
.kb-cat-card.tone-green { --tone: #12855a; --tone-soft: #dcf3e9; } .kb-cat-card.tone-orange { --tone: #c96a07; --tone-soft: #fdecd2; } .kb-cat-card.tone-purple { --tone: #6a4bd8; --tone-soft: #ece6fc; }
.kb-cat-card.tone-red { --tone: #c8372d; --tone-soft: #fbe2df; } .kb-cat-card.tone-teal { --tone: #0e8a94; --tone-soft: #d8f0f2; }
.kb-cat-card header { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; } .kb-cat-card h2 { font-size: 1.05rem; margin: 0; flex: 1; }
.kb-cat-icon { width: 2.3rem; height: 2.3rem; border-radius: .7rem; background: var(--tone-soft); color: var(--tone); display: grid; place-items: center; font-size: 1.1rem; }
.kb-cat-card ul { list-style: none; padding: 0; margin: 0; }
.kb-cat-card li a { display: flex; gap: .55rem; align-items: baseline; padding: .38rem 0; color: var(--ov-text); text-decoration: none; border-bottom: 1px dashed #edf0f7; }
.kb-cat-card li:last-child a { border-bottom: 0; } .kb-cat-card li a:hover { color: var(--tone); } .kb-cat-card li i { color: var(--tone); font-size: .9rem; }
.kb-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 220px; gap: 1.5rem; align-items: start; }
.kb-nav, .kb-toc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; font-size: .9rem; }
.kb-nav-search { position: relative; margin-bottom: .7rem; } .kb-nav-search i { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: #8a95b0; }
.kb-nav-search input { width: 100%; border: 1px solid var(--ov-line); border-radius: .6rem; padding: .4rem .6rem .4rem 1.9rem; background: #fff; }
.kb-nav details { margin-bottom: .3rem; } .kb-nav summary { cursor: pointer; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ov-muted); padding: .35rem 0; }
.kb-nav details a { display: block; padding: .3rem .6rem; border-radius: .5rem; color: var(--ov-text); text-decoration: none; border-left: 2px solid transparent; }
.kb-nav details a:hover { background: #eef2fc; } .kb-nav details a.active { background: #e4ecff; color: var(--ov-blue); font-weight: 600; border-left-color: var(--ov-blue); }
.kb-article { background: #fff; border: 1px solid var(--ov-line); border-radius: 1.1rem; padding: 1.8rem 2.2rem; min-width: 0; }
.kb-crumbs { font-size: .82rem; color: var(--ov-muted); display: flex; gap: .4rem; align-items: center; margin-bottom: .8rem; } .kb-crumbs i { font-size: .7rem; }
.kb-article-head { display: flex; gap: 1rem; align-items: flex-start; padding-bottom: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--ov-line); }
.kb-article-head h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: 0 0 .3rem; }
.kb-article-icon { flex: none; width: 3.2rem; height: 3.2rem; border-radius: 1rem; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, #2456e6, #6a4bd8); box-shadow: 0 8px 18px rgba(36,86,230,.25); }
.kb-body { font-size: 1.02rem; line-height: 1.7; color: #26304d; }
.kb-body h2 { font-size: 1.3rem; margin: 2rem 0 .7rem; scroll-margin-top: 90px; padding-top: .2rem; }
.kb-body h3 { font-size: 1.08rem; margin: 1.4rem 0 .5rem; }
.kb-body code { background: #f1f4fb; color: #1d3a8f; padding: .1rem .35rem; border-radius: .35rem; font-size: .9em; }
.kb-body ul { padding-left: 1.3rem; } .kb-body li { margin-bottom: .3rem; }
ol.kb-steps { list-style: none; counter-reset: kbstep; padding-left: 0; margin: 1rem 0 1.2rem; }
ol.kb-steps > li { counter-increment: kbstep; position: relative; padding: .55rem 0 .7rem 3rem; margin: 0; border-left: 2px solid #e1e7f6; margin-left: 1rem; padding-left: 2rem; }
ol.kb-steps > li:last-child { border-left-color: transparent; }
ol.kb-steps > li::before { content: counter(kbstep); position: absolute; left: -1rem; top: .45rem; width: 2rem; height: 2rem; border-radius: 50%; background: #fff; border: 2px solid var(--ov-blue); color: var(--ov-blue); font-weight: 700; display: grid; place-items: center; font-family: "Lexend", sans-serif; font-size: .9rem; }
ol.kb-steps ul, ol.kb-steps ol { margin-top: .35rem; }
.kb-go { display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .6rem; border-radius: 2rem; background: #e8eefe; color: var(--ov-blue); font-weight: 600; font-size: .9em; text-decoration: none; white-space: nowrap; vertical-align: baseline; transition: background .15s; }
.kb-go:hover { background: var(--ov-blue); color: #fff; } .kb-go i { font-size: .8em; }
.kb-go-text { color: #1d3a8f; }
.kb-box { display: flex; gap: .8rem; padding: .85rem 1rem; border-radius: .8rem; margin: 1rem 0; border: 1px solid; }
.kb-box > i { font-size: 1.2rem; margin-top: .1rem; } .kb-box p { margin: 0 0 .3rem; display: inline; } .kb-box strong:first-child { margin-right: .2rem; }
.kb-tip { background: #effaf4; border-color: #bfe6cf; } .kb-tip > i { color: #12855a; }
.kb-note { background: #eef3ff; border-color: #c9d6fb; } .kb-note > i { color: #2456e6; }
.kb-warn { background: #fff6e8; border-color: #f4d39c; } .kb-warn > i { color: #c96a07; }
.kb-example { background: #f6f3ff; border-color: #d9cdf7; } .kb-example > i { color: #6a4bd8; }
.kb-table { font-size: .93rem; } .kb-table th { background: #f4f6fb; }
.kb-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--ov-line); }
.kb-pager a { flex: 1; max-width: 48%; padding: .8rem 1rem; border: 1px solid var(--ov-line); border-radius: .8rem; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.kb-pager a:hover { border-color: var(--ov-blue); transform: translateY(-1px); } .kb-pager small { display: block; color: var(--ov-muted); } .kb-pager span { font-weight: 600; color: var(--ov-blue); }
.kb-toc-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ov-muted); font-weight: 700; margin-bottom: .4rem; }
.kb-toc a { display: block; padding: .28rem .6rem; border-left: 2px solid #e1e7f6; color: var(--ov-muted); text-decoration: none; }
.kb-toc a:hover, .kb-toc a.on { color: var(--ov-blue); border-left-color: var(--ov-blue); }
@media (max-width: 1199.98px) { .kb-layout { grid-template-columns: 220px minmax(0, 1fr); } .kb-toc { display: none; } }
@media (max-width: 991.98px) { .kb-layout { grid-template-columns: 1fr; } .kb-nav { position: static; max-height: none; } .kb-nav details:not([open]) { display: none; } .kb-article { padding: 1.3rem 1.1rem; } .kb-hero { padding: 1.5rem 1.2rem; } .kb-hero-side { align-items: flex-start; } }
@media print { .kb-layout { display: block; } .kb-article { border: 0; padding: 0; } .kb-go { background: none; padding: 0; color: #1d3a8f; } }
