/* EnsureSuccess ERP - layout and components (on top of Bootstrap 5.3) */
:root, [data-bs-theme="light"] {
    --surface: #fff;          /* cards, top bar, inputs */
    --surface-2: #f8fafd;     /* table heads, photo boxes, muted panels */
    --line-soft: #eef1f6;     /* row separators */
    --row-hover: #f7f9ff;
    --icon-blue: #e8f0ff; --icon-green: #e5f6ec; --icon-orange: #fff1e0; --icon-red: #fde8e8; --icon-purple: #f0eaff; --icon-teal: #e0f6f6;
    --shadow: rgba(16, 26, 51, .04);
    --brand: #0160fc;
    --brand-600: #0050d6;
    --brand-050: #eef4ff;
    --header-bg: var(--brand-050);   /* card & pop-up header bars: light brand tint */
    --header-ink: #0050d6;           /* their title text */
    --header-line: #d6e4ff;
    --ink: #172036;
    --muted: #64708a;
    --line: #e3e8f2;
    --bg: #f5f7fb;
    --sidebar: #101a33;
    --sidebar-ink: #aeb8d0;
    --radius: 12px;
    --bs-primary: #0160fc;
    --bs-primary-rgb: 1, 96, 252;
    --bs-link-color: #0160fc;
    --bs-link-color-rgb: 1, 96, 252;
    --bs-body-font-family: "Segoe UI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Inside the app (not the login page) everything is a little smaller: every rem scales from this */
html.app-shell { font-size: 14.5px; }
/* ...but secondary text (dates, phone numbers, hints under names) stays easy to read */
html.app-shell small, html.app-shell .small { font-size: .92em; }
body { background: var(--bg); color: var(--ink); font-size: 1rem; }
a { text-decoration: none; }

.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600);
    --bs-btn-hover-border-color: var(--brand-600); --bs-btn-active-bg: var(--brand-600); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand);
    --bs-btn-active-color: #fff; --bs-btn-hover-color: #fff; }
.text-brand { color: var(--brand) !important; }
.form-control:focus, .form-select:focus { border-color: #7aa8ff; box-shadow: 0 0 0 .2rem rgba(1, 96, 252, .15); }

/* ---------- shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 260px; flex-shrink: 0; background: var(--sidebar); color: var(--sidebar-ink); position: sticky; top: 0;
    height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { display: flex; align-items: center; gap: .65rem; padding: 1.1rem 1.1rem 1rem; color: #fff; }
.sidebar .brand img { width: 36px; height: 36px; }
.sidebar .brand strong { display: block; font-size: .98rem; line-height: 1.1; }
.sidebar .brand small { color: var(--sidebar-ink); font-size: .78rem; }
.sidebar .menu-label { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #6c7894;
    padding: 1rem 1.25rem .35rem; }
.sidebar a.menu { display: flex; align-items: center; gap: .7rem; color: var(--sidebar-ink); padding: .55rem 1.25rem;
    margin: 1px .6rem; border-radius: 8px; font-size: .97rem; }
.sidebar a.menu i { font-size: 1.05rem; width: 1.1rem; text-align: center; }
.sidebar a.menu:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar a.menu.active { background: var(--brand); color: #fff; }
.sidebar .foot { margin-top: auto; padding: 1rem 1.25rem; font-size: .75rem; color: #6c7894; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: .6rem 1.5rem; display: flex; align-items: center;
    gap: 1rem; position: sticky; top: 0; z-index: 10; }
.topbar .page-title { font-weight: 600; font-size: 1.05rem; margin: 0; }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-050); color: var(--brand); display: grid;
    place-items: center; font-weight: 600; }
.content { padding: 1.5rem; }
.menu-toggle { display: none; }

@media (max-width: 991px) {
    .sidebar { position: fixed; left: -260px; z-index: 30; transition: left .2s; }
    .sidebar.open { left: 0; }
    .menu-toggle { display: inline-flex; }
    .content { padding: 1rem; }
}

/* ---------- cards & tables ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px var(--shadow); --bs-card-bg: var(--surface); }
/* Header bars of cards and pop-ups: light brand tint with a blue title; solid blue is kept for buttons and links */
.card-header { background: var(--header-bg); color: var(--header-ink); border-bottom: 1px solid var(--header-line);
    font-weight: 600; padding: .8rem 1rem; border-radius: var(--radius) var(--radius) 0 0 !important; }
.modal-header { background: var(--header-bg); color: var(--header-ink); border-bottom: 1px solid var(--header-line); }
.modal-header .modal-title { color: var(--header-ink); font-weight: 600; }
.table { margin: 0; --bs-table-hover-bg: var(--row-hover); }
.table thead th { font-size: .84rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
    background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
.table td { vertical-align: middle; border-color: var(--line-soft); }
.table-card { overflow-x: auto; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.small-label { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.badge { font-weight: 500; }

.stat { padding: 1rem 1.1rem; display: flex; flex-direction: row; gap: .9rem; align-items: center; height: 100%; }
.stat .icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0; }
.stat .value { font-size: 1.45rem; font-weight: 700; line-height: 1.15; }
.stat .label { font-size: .92rem; color: var(--muted); }
.i-blue { background: var(--icon-blue); color: var(--brand); }
.i-green { background: var(--icon-green); color: #198754; }
.i-orange { background: var(--icon-orange); color: #d9730d; }
.i-red { background: var(--icon-red); color: #dc3545; }
.i-purple { background: var(--icon-purple); color: #6f42c1; }
.i-teal { background: var(--icon-teal); color: #0d9488; }

.bar-chart { display: flex; align-items: flex-end; gap: .75rem; height: 170px; padding-top: .5rem; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-chart .fill { width: 100%; max-width: 46px; background: linear-gradient(180deg, #3d84ff, var(--brand)); border-radius: 6px 6px 0 0;
    min-height: 3px; }
.bar-chart .amt { font-size: .76rem; color: var(--muted); margin-bottom: .25rem; white-space: nowrap; }
.bar-chart .lbl { font-size: .78rem; color: var(--muted); margin-top: .35rem; white-space: nowrap; }

.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: 1rem; }
.filters .form-control, .filters .form-select { font-size: .95rem; }
.section-title { font-size: .86rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); font-weight: 600;
    margin: 1.25rem 0 .75rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.section-title:first-child { margin-top: 0; }
.required::after { content: " *"; color: #dc3545; }
.dl-grid { display: grid; grid-template-columns: 150px 1fr; gap: .45rem 1rem; margin: 0; }
.dl-grid dt { color: var(--muted); font-weight: 500; }
.dl-grid dd { margin: 0; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.5rem; border-left: 2px solid var(--line); margin-left: .4rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .2rem; width: 12px; height: 12px; border-radius: 50%;
    background: var(--surface); border: 3px solid var(--brand); }

.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.empty i { font-size: 2rem; display: block; margin-bottom: .5rem; color: #b8c2d6; }

/* ---------- login ---------- */
.login-body { background: #fff; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art { position: relative; overflow: hidden; color: #fff; padding: 2.75rem 3.25rem; display: flex; flex-direction: column;
    background: linear-gradient(150deg, #0b2a7a 0%, #0150e0 48%, #0160fc 70%, #2f86ff 100%); }
.login-grid { position: absolute; inset: 0; opacity: .12; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%); }
.login-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.login-glow.g1 { width: 420px; height: 420px; background: #5fb0ff; top: -120px; right: -80px; }
.login-glow.g2 { width: 360px; height: 360px; background: #1b3fb8; bottom: -140px; left: -100px; }
.login-brand, .login-hero, .login-foot { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: .85rem; }
.login-logo { width: 54px; height: 54px; border-radius: 14px; background: #fff; display: grid; place-items: center;
    box-shadow: 0 8px 24px rgba(0, 20, 80, .25); }
.login-logo img { width: 40px; height: 40px; }
.login-brand strong { display: block; font-size: 1.25rem; letter-spacing: .01em; }
.login-brand small { opacity: .8; font-size: .9rem; }
.login-hero { margin: auto 0; max-width: 560px; padding: 2.5rem 0; }
.login-chip { display: inline-flex; align-items: center; font-size: .85rem; padding: .35rem .85rem; border-radius: 999px;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(4px); }
.login-hero h1 { font-size: 2.45rem; line-height: 1.18; font-weight: 800; margin: 1.1rem 0 .9rem; letter-spacing: -.01em; }
.login-hero h1 span { color: #bfe0ff; }
.login-hero p { font-size: 1.15rem; opacity: .88; margin-bottom: 2rem; }
.login-features { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.login-features .lf { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-radius: 14px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.login-features .lf i { width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center;
    background: rgba(255,255,255,.18); font-size: 1.25rem; }
.login-features .lf b { display: block; font-size: 1rem; }
.login-features .lf span { font-size: .85rem; opacity: .8; }
.login-foot { font-size: .85rem; opacity: .7; }

.login-form { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 2rem 2.5rem 1.25rem;
    background: linear-gradient(160deg, #f5f8ff 0%, #eef3fc 55%, #e8effb 100%); }
.login-dots { position: absolute; inset: 0; opacity: .5; pointer-events: none;
    background-image: radial-gradient(#c9d6ee 1.2px, transparent 1.2px); background-size: 22px 22px;
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.login-blob { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.login-blob.b1 { width: 320px; height: 320px; background: rgba(1, 96, 252, .14); top: -80px; right: -90px; }
.login-blob.b2 { width: 280px; height: 280px; background: rgba(47, 134, 255, .12); bottom: -60px; left: -80px; }
.login-center { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; }
.login-card { width: 100%; max-width: 480px; background: #fff; border-radius: 22px; padding: 2.4rem 2.6rem 2rem;
    border: 1px solid #e1e8f5; box-shadow: 0 24px 60px rgba(16, 42, 110, .12), 0 2px 6px rgba(16, 42, 110, .05);
    position: relative; }
.login-card::before { content: ""; position: absolute; left: 2.6rem; right: 2.6rem; top: 0; height: 4px; border-radius: 0 0 6px 6px;
    background: linear-gradient(90deg, #0b2a7a, #0160fc, #4ea2ff); }
.login-card-head { display: flex; align-items: center; gap: .85rem; padding-bottom: 1.4rem; margin-bottom: 1.5rem;
    border-bottom: 1px dashed #dbe3f1; }
.login-card-logo { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
    background: linear-gradient(145deg, #eef4ff, #dce8ff); border: 1px solid #d3e0fb; }
.login-card-logo img { width: 38px; height: 38px; }
.login-card-head strong { display: block; font-size: 1.35rem; color: var(--ink); line-height: 1.15; }
.login-card-head span { font-size: .88rem; color: var(--muted); }
.login-greeting { display: inline-flex; align-items: center; font-size: .9rem; font-weight: 600; color: var(--brand);
    background: var(--brand-050); border-radius: 999px; padding: .25rem .8rem; margin-bottom: .75rem; }
.login-card h2 { font-size: 2.15rem; font-weight: 800; margin-bottom: .3rem; color: var(--ink); letter-spacing: -.01em; }
.login-card .wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out 1; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.login-card .lead-sub { color: var(--muted); font-size: 1.08rem; margin-bottom: 1.6rem; }
.login-card .form-label { font-weight: 600; font-size: .98rem; margin-bottom: .45rem; color: #2a3550; }
.login-alert { display: flex; gap: .75rem; align-items: flex-start; border-radius: 14px; padding: .85rem 1rem; margin-bottom: 1.25rem;
    font-size: .95rem; border: 1px solid; }
.login-alert i { font-size: 1.3rem; line-height: 1.2; }
.login-alert b { display: block; }
.login-alert.error { background: #fff3f3; border-color: #f6c9cc; color: #a3222c; }
.login-alert.success { background: #effaf3; border-color: #bfe6cd; color: #146c3a; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%); color: #8a96b0; font-size: 1.2rem; pointer-events: none; }
.input-icon .form-control { padding-left: 3rem; border-radius: 13px; font-size: 1.08rem; height: 58px; background: #f7f9fd; border: 1.5px solid #dfe5f0; }
.input-icon .form-control:focus { background: #fff; border-color: #6ea2ff; box-shadow: 0 0 0 .25rem rgba(1, 96, 252, .12); }
.input-icon:focus-within > i { color: var(--brand); }
.input-icon .pw-toggle { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent;
    color: #8a96b0; font-size: 1.2rem; padding: .4rem .65rem; border-radius: 9px; }
.input-icon .pw-toggle:hover { color: var(--brand); background: var(--brand-050); }
.input-icon:has(.pw-toggle) .form-control { padding-right: 3.2rem; }
.caps-warn { display: none; font-size: .82rem; color: #b45309; font-weight: 600; }
.caps-warn.on { display: inline; }
.login-btn { height: 58px; border-radius: 13px; font-weight: 700; font-size: 1.12rem; margin-top: 1.6rem; letter-spacing: .01em;
    background: linear-gradient(135deg, #0150e0, #0160fc 55%, #2f86ff); border: 0; box-shadow: 0 12px 26px rgba(1, 96, 252, .32);
    transition: transform .12s, box-shadow .12s; }
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(1, 96, 252, .38); }
.login-roles { margin-top: 1.6rem; text-align: center; }
.login-roles .lr-title { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #8a96b0;
    font-weight: 600; margin-bottom: .6rem; }
.login-roles .lr-list { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.login-roles .lr-list span { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 600; color: #3a4766;
    background: #f3f6fc; border: 1px solid #e3e9f4; border-radius: 999px; padding: .35rem .85rem; }
.login-roles .lr-list i { color: var(--brand); }
.login-help { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1.4rem; padding: .85rem 1rem; border-radius: 13px;
    background: #f6f8fc; color: #55617d; font-size: .92rem; }
.login-help i { color: var(--brand); font-size: 1.05rem; line-height: 1.3; }
.login-credit { position: relative; z-index: 1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem;
    margin-top: 1.5rem; font-size: .86rem; color: #6c7894; }
.login-credit a { color: #4a5677; }
.login-credit a:hover { color: var(--brand); }
.login-mobile-brand { display: none; }
@media (max-width: 991px) {
    .login-wrap { grid-template-columns: 1fr; }
    .login-art { display: none; }
    .login-form { padding: 1.25rem 1rem 1rem; }
    .login-card { padding: 2rem 1.4rem 1.6rem; border-radius: 18px; }
    .login-card::before { left: 1.4rem; right: 1.4rem; }
    .login-credit { justify-content: center; text-align: center; }
    .login-card h2 { font-size: 1.75rem; }
}
@media (min-width: 992px) and (max-width: 1200px) {
    .login-hero h1 { font-size: 2.1rem; }
    .login-features { grid-template-columns: 1fr; }
}

/* ---------- printable documents ---------- */
.doc { background: var(--surface); color: var(--ink); max-width: 820px; margin: 1.5rem auto; padding: 2rem 2.25rem; border: 1px solid var(--line);
    border-radius: 8px; }
.doc-head { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid var(--brand); padding-bottom: .9rem; }
.doc-head img { width: 64px; height: 64px; }
.doc-head h2 { margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--brand); }
.doc-head .meta { font-size: .84rem; color: var(--muted); line-height: 1.4; }
.doc-title { text-align: center; font-weight: 800; letter-spacing: .16em; margin: 1.1rem 0 1rem; font-size: 1.3rem;
    text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.doc-title-row { position: relative; }
.doc-title-row .doc-title { margin-bottom: .75rem; }
.doc-title-stamp { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.doc table td, .doc table th { padding: .4rem .6rem; }
.doc .total-row { background: var(--brand-050); font-weight: 700; }
.doc .sign { margin-top: 3rem; display: flex; justify-content: space-between; font-size: .85rem; }
.doc .sign > div { border-top: 1px solid #999; padding-top: .3rem; min-width: 180px; text-align: center; }
.stamp-cancelled { border: 3px solid #dc3545; color: #dc3545; font-weight: 800; letter-spacing: .2em; padding: .3rem 1rem;
    display: inline-block; transform: rotate(-8deg); }
.print-bar { max-width: 820px; margin: .5rem auto 1.25rem; display: flex; gap: .5rem; justify-content: flex-end; }

/* Online exams: question paper, answers, student portal */
.question-item { padding: .85rem 0; border-bottom: 1px solid var(--line-soft); }
.question-item:last-child { border-bottom: 0; }
.question-text { white-space: pre-wrap; }
.option-list { list-style: none; padding: 0; margin: .5rem 0 .25rem; }
.option-list li { padding: .3rem .6rem; border-radius: 8px; margin-bottom: .2rem; }
.option-list li.correct { background: rgba(25, 135, 84, .09); font-weight: 600; }
.written-answer { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin: .4rem 0; }
.portal { background: var(--bg); }
.portal-bar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20; }
.portal-brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.portal-brand img { width: 36px; height: 36px; }
.portal-brand small { display: block; color: var(--muted); font-size: .78rem; }
.portal-main { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }
.exam-card { transition: box-shadow .15s; }
.exam-card:hover { box-shadow: 0 4px 14px var(--shadow); }
.exam-top { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .8rem 1.1rem; margin-bottom: 1rem; position: sticky; top: 64px; z-index: 10; box-shadow: 0 2px 8px var(--shadow); }
.exam-timer { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand); }
.exam-option { display: flex; align-items: center; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .4rem;
    cursor: pointer; background: var(--surface); }
.exam-option:hover { border-color: var(--brand); }
.exam-option:has(input:checked) { border-color: var(--brand); background: var(--brand-050); }
.result-hero.pass { border-left: 5px solid #198754; }
.result-hero.fail { border-left: 5px solid #dc3545; }

/* Exams: marksheet photo, course certificate (A4 landscape) */
.ms-photo { width: 92px; height: 112px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
.certificate { background: #fff; color: #1d2a44; max-width: 1060px; margin: 1.5rem auto; padding: 14px; border: 10px solid var(--brand);
    font-family: Georgia, "Times New Roman", serif; }
.cert-inner { border: 2px solid #c9a227; padding: 2rem 3rem 1.5rem; text-align: center; position: relative; }
.cert-top { display: flex; align-items: center; gap: 1rem; text-align: left; }
.cert-top img:first-child { width: 72px; height: 72px; }
.cert-top > div { flex-grow: 1; }
.cert-institute { font-size: 1.7rem; font-weight: 700; color: var(--brand); letter-spacing: .02em; }
.cert-tagline { font-size: .85rem; color: #5b6478; font-family: system-ui, sans-serif; }
.cert-photo { width: 90px; height: 110px; object-fit: cover; border: 2px solid #c9a227; border-radius: 4px; }
.cert-title { font-size: 2.3rem; color: #9a7b14; margin: 1.1rem 0 .6rem; letter-spacing: .04em; font-style: italic; }
.cert-line { margin: .35rem 0; font-size: 1.05rem; }
.cert-name { font-size: 2rem; font-weight: 700; margin: .2rem 0 .3rem; border-bottom: 1px solid #c9a227; display: inline-block; padding: 0 2.5rem .2rem; }
.cert-course { font-size: 1.45rem; font-weight: 700; color: var(--brand); margin: .3rem 0; }
.cert-meta { display: flex; justify-content: center; gap: 2.2rem; margin: 1.3rem 0 .4rem; font-family: system-ui, sans-serif; font-size: .82rem; }
.cert-meta span { display: block; color: #5b6478; text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; }
.cert-sign { display: flex; justify-content: space-between; margin-top: 3.2rem; font-family: system-ui, sans-serif; font-size: .85rem; }
.cert-sign div { border-top: 1px solid #1d2a44; padding-top: .3rem; width: 26%; }
.cert-foot { margin-top: 1.2rem; font-size: .72rem; color: #5b6478; font-family: system-ui, sans-serif; }

@page { size: A4; margin: 12mm; }
@media print {
    body { background: #fff; }
    .certificate { margin: 0; max-width: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .no-print, .print-bar, .sidebar, .topbar { display: none !important; }
    .doc { border: 0; margin: 0; padding: 0; max-width: none; }
    .content { padding: 0; }
}

/* ---------- page header & misc ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.45rem; font-weight: 700; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 1rem; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; border-top: 1px solid var(--line);
    font-size: .92rem; color: var(--muted); }
.att-options .btn { min-width: 74px; }
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.progress-thin { height: 6px; }
.char-counter { font-size: .8rem; color: var(--muted); text-align: right; margin-top: .2rem; }
.char-counter.low { color: #d9730d; font-weight: 600; }
.char-counter.none { color: #dc3545; }
.report-card { display: block; color: inherit; transition: transform .1s, box-shadow .1s; }
.report-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16, 26, 51, .08); color: inherit; }
.backdrop { display: none; }
@media (max-width: 991px) { .sidebar.open + .backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 25; } }
.followup-today { border-left: 4px solid #d9730d; }
.followup-today .card-body > .me-auto { flex: 1 1 380px; min-width: 0; }
.followup-today .icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 1.25rem; }
.fu-num { text-align: center; min-width: 84px; }
.fu-num b { display: block; font-size: 1.5rem; line-height: 1.1; }
.fu-num span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sidebar a.menu .badge { font-size: .7rem; }

/* ---------- help / user guide ---------- */
.guide { max-width: 980px; line-height: 1.6; }
.guide h1 { font-size: 1.6rem; font-weight: 700; }
.guide h2 { font-size: 1.3rem; font-weight: 700; margin-top: 2rem; padding-top: .5rem; border-top: 1px solid var(--line); color: var(--brand); }
.guide h3 { font-size: 1.05rem; font-weight: 700; margin-top: 1.4rem; }
.guide img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; margin: .5rem 0 1rem; box-shadow: 0 2px 8px rgba(16, 26, 51, .06); }
.guide pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; font-size: .85rem; }
.guide code { color: #0b3d91; }
.guide table { width: auto; }
.guide hr { display: none; }
.guide h1, .guide h2, .guide h3 { scroll-margin-top: 72px; }

/* ---------- searchable selects, uploads, checkout ---------- */
.ts-wrapper.form-select { padding: 0; }
.ts-control { border-radius: var(--bs-border-radius); min-height: 38px; }
.ts-dropdown { z-index: 1060; }
.photo-box { width: 132px; height: 160px; border: 1px dashed #b8c2d6; border-radius: 10px; display: grid; place-items: center;
    overflow: hidden; background: var(--surface-2); color: var(--muted); font-size: .8rem; text-align: center; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.student-photo { width: 96px; height: 116px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.student-photo.sm { width: 48px; height: 58px; }
.doc-list .doc-item { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }
.doc-list .doc-item:last-child { border-bottom: 0; }
.doc-list .doc-item i { font-size: 1.4rem; color: var(--brand); }
.steps { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.steps .step { display: flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border-radius: 999px; background: var(--surface);
    border: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.steps .step b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--line-soft); font-size: .75rem; }
.steps .step.done { color: #198754; } .steps .step.done b { background: #d1f0dc; }
.steps .step.now { color: var(--brand); border-color: var(--brand); font-weight: 600; } .steps .step.now b { background: var(--brand); color: #fff; }
.pay-option { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; }
.pay-option.disabled { opacity: .6; background: var(--surface-2); }

.dl-grid dd { overflow-wrap: anywhere; }
.dl-grid.compact { grid-template-columns: 110px 1fr; }

/* ---------- academy name: always Times New Roman ---------- */
.brand-name { font-family: "Times New Roman", Times, "Liberation Serif", "Nimbus Roman", serif !important; letter-spacing: .01em; }
.sidebar .brand strong.brand-name { font-size: 1.12rem; font-weight: 700; line-height: 1.15; }
.login-brand strong.brand-name { font-size: 1.45rem; }
.doc-head h2.brand-name { font-size: 1.6rem; }
.sidebar .foot.brand-name { font-size: .85rem; }
.confirm-card { border-width: 2px; border-radius: 12px; box-shadow: 0 4px 14px rgba(25, 135, 84, .12); }

/* "FEE PAID" round rubber stamp on receipts (prints in colour; on black-and-white printers it prints grey) */
.doc .sign { position: relative; min-height: 120px; align-items: flex-end; }
.paid-stamp { position: absolute; left: 50%; bottom: -.4rem; width: 148px; height: 148px; margin-left: -74px;
    transform: rotate(-12deg); opacity: .9; mix-blend-mode: multiply; pointer-events: none;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.paid-stamp svg { width: 100%; height: 100%; stroke: #08703c; fill: #08703c; }
.paid-stamp text { stroke: none; text-anchor: middle; font-family: "Times New Roman", Times, "Liberation Serif", serif; font-weight: 700; }
.paid-stamp .ring { font-size: 15.5px; letter-spacing: .5px; text-anchor: start; }
.paid-stamp .big { font-size: 28px; letter-spacing: 3px; }
.paid-stamp .star { font-size: 13px; }
.paid-stamp .small { font-size: 12.5px; font-family: Arial, sans-serif; letter-spacing: .5px; }
.paid-stamp .tiny { font-size: 8.5px; font-family: Arial, sans-serif; }

/* Footer printed at the bottom of every printed page (reports, sheets, lists). Receipts and payslips have their own line. */
.print-footer { display: none; }
@media print {
    .print-footer { display: block; margin-top: 1.5rem; padding-top: .5rem; border-top: 1px solid #ccc; text-align: center;
        font-size: .8rem; color: #555; }
    body:has(.doc) .print-footer { display: none; }
}

/* "Developed by" credit */
.app-credit { margin-top: 2rem; padding: 1rem 0 .25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap;
    justify-content: space-between; gap: .5rem; font-size: .85rem; color: var(--muted); }
.app-credit a { color: var(--muted); }
.app-credit a:hover { color: var(--brand); }

/* Settings → States & cities */
.place-states, .place-cities { max-height: 70vh; overflow-y: auto; position: relative; }
.place-cities thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.place-states .list-group-item { padding: .45rem .9rem; font-size: .95rem; }

/* =====================================================================
   Dark theme — <html data-bs-theme="dark"> (set by the theme switch in the top bar / on the login page).
   Bootstrap 5.3 darkens its own components; this block re-colours the ERP's own parts.
   Receipts and payslips keep data-bs-theme="light" so they look like paper and print the same.
   ===================================================================== */
[data-bs-theme="dark"] {
    --surface: #161f33;
    --surface-2: #1b2640;
    --line-soft: #243150;
    --row-hover: #1d2945;
    --icon-blue: rgba(77, 141, 255, .18); --icon-green: rgba(46, 184, 114, .18); --icon-orange: rgba(255, 159, 67, .18);
    --icon-red: rgba(255, 99, 112, .18); --icon-purple: rgba(167, 139, 250, .18); --icon-teal: rgba(45, 212, 191, .16);
    --shadow: rgba(0, 0, 0, .25);
    --brand: #3d84ff;
    --brand-600: #2a73f5;
    --brand-050: rgba(61, 132, 255, .14);
    --header-ink: #9cc0ff;
    --header-line: rgba(61, 132, 255, .3);
    --ink: #e3e8f4;
    --muted: #93a0bd;
    --line: #2a3756;
    --bg: #0d1424;
    --sidebar: #0a1020;
    --bs-body-bg: #0d1424;
    --bs-body-color: #e3e8f4;
    --bs-secondary-bg: #1b2640;
    --bs-tertiary-bg: #161f33;
    --bs-border-color: #2a3756;
    --bs-primary: #3d84ff;
    --bs-primary-rgb: 61, 132, 255;
    --bs-link-color: #6aa1ff;
    --bs-link-color-rgb: 106, 161, 255;
    --bs-link-hover-color: #8fb8ff;
    color-scheme: dark;
}
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text { background-color: #111a2d; border-color: var(--line); color: var(--ink); }
[data-bs-theme="dark"] .form-control:disabled, [data-bs-theme="dark"] .form-control[readonly] { background-color: #18223a; }
[data-bs-theme="dark"] .form-control::placeholder { color: #6f7c99; }
[data-bs-theme="dark"] .input-group-text.bg-white { background-color: #111a2d !important; }
[data-bs-theme="dark"] .btn-light { --bs-btn-bg: #1d2945; --bs-btn-border-color: #2a3756; --bs-btn-color: var(--ink);
    --bs-btn-hover-bg: #26345a; --bs-btn-hover-border-color: #34446e; --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #2b3a63; --bs-btn-active-color: #fff; }
[data-bs-theme="dark"] .table { --bs-table-bg: transparent; --bs-table-color: var(--ink); }
[data-bs-theme="dark"] .text-bg-light { background-color: #26345a !important; color: var(--ink) !important; }
[data-bs-theme="dark"] .bg-light { background-color: var(--surface-2) !important; }
[data-bs-theme="dark"] .bg-white { background-color: var(--surface) !important; }
[data-bs-theme="dark"] .alert-light { --bs-alert-bg: var(--surface-2); --bs-alert-color: var(--ink); --bs-alert-border-color: var(--line); }
[data-bs-theme="dark"] .empty i { color: #4a5878; }
[data-bs-theme="dark"] .guide code { color: #8fb8ff; }
[data-bs-theme="dark"] .photo-box { border-color: #3a4a70; }
[data-bs-theme="dark"] .bar-chart .fill { background: linear-gradient(180deg, #5d9bff, #2a73f5); }
[data-bs-theme="dark"] .steps .step.done b { background: rgba(46, 184, 114, .25); }
[data-bs-theme="dark"] .steps .step.done { color: #4cc38a; }
[data-bs-theme="dark"] .followup-today { border-left-color: #ff9f43; }
[data-bs-theme="dark"] .sidebar { border-right: 1px solid #1a2440; }
/* Tom Select (searchable drop-downs) */
[data-bs-theme="dark"] .ts-wrapper .ts-control, [data-bs-theme="dark"] .ts-wrapper.single .ts-control,
[data-bs-theme="dark"] .ts-dropdown, [data-bs-theme="dark"] .ts-control input { background: #111a2d !important; color: var(--ink) !important; border-color: var(--line) !important; }
[data-bs-theme="dark"] .ts-dropdown .option { color: var(--ink); }
[data-bs-theme="dark"] .ts-dropdown .active { background: #26345a; color: #fff; }
[data-bs-theme="dark"] .ts-dropdown .optgroup-header { background: var(--surface-2); color: var(--muted); }
/* Login page: the right-hand form panel */
[data-bs-theme="dark"] .login-body { background: var(--bg); }
[data-bs-theme="dark"] .login-form { background: linear-gradient(160deg, #0f182c 0%, #0d1526 55%, #0b1322 100%); }
[data-bs-theme="dark"] .login-dots { background-image: radial-gradient(#26345a 1.2px, transparent 1.2px); }
[data-bs-theme="dark"] .login-card { background: #141d31; border-color: #26345a; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
[data-bs-theme="dark"] .login-card .form-label { color: #c9d2e6; }
[data-bs-theme="dark"] .login-greeting { background: linear-gradient(145deg, rgba(61,132,255,.18), rgba(61,132,255,.08)); border-color: #2c4170; }
[data-bs-theme="dark"] .input-icon .form-control { background: #0f1729; border-color: #2a3756; }
[data-bs-theme="dark"] .input-icon .form-control:focus { background: #111a2d; border-color: #4d8dff; }
[data-bs-theme="dark"] .login-roles .lr-list span { background: #1b2640; border-color: #2a3756; color: #c9d2e6; }
[data-bs-theme="dark"] .login-help { background: #18223a; color: #a5b1cc; }
[data-bs-theme="dark"] .login-credit, [data-bs-theme="dark"] .login-credit a { color: #8a96b0; }
[data-bs-theme="dark"] .login-alert.error { background: rgba(220, 53, 69, .12); border-color: rgba(220, 53, 69, .35); color: #ff9aa4; }
[data-bs-theme="dark"] .login-alert.success { background: rgba(25, 135, 84, .14); border-color: rgba(25, 135, 84, .4); color: #7fe0a8; }
[data-bs-theme="dark"] .login-card-head { border-bottom-color: #2a3756; }

/* Theme switch */
.theme-switch .dropdown-item.active { background: var(--brand-050); color: var(--brand); font-weight: 600; }
.theme-switch .dropdown-item.active::after { content: "\F26E"; font-family: bootstrap-icons; float: right; margin-left: 1rem; }
.login-theme { position: absolute; top: 1rem; right: 1rem; z-index: 3; }
.login-theme .btn { border-radius: 999px; }
[data-bs-theme="dark"] .login-card-logo { background: linear-gradient(145deg, #1d2a4a, #17223d); border-color: #2c3d66; }

/* Leave */
.leave-days { background: var(--brand-050); color: var(--brand); border-radius: 10px; padding: .55rem .85rem; font-size: 1rem; }

/* Login: ten feature tiles — a little more compact so the panel still fits one screen */
.login-hero { max-width: 620px; }
.login-hero h1 { font-size: 2.2rem; margin: .9rem 0 .7rem; }
.login-hero p { margin-bottom: 1.4rem; }
.login-features { gap: .6rem; }
.login-features .lf { padding: .6rem .8rem; border-radius: 12px; gap: .7rem; }
.login-features .lf i { width: 36px; height: 36px; border-radius: 10px; font-size: 1.05rem; }
.login-features .lf b { font-size: .95rem; line-height: 1.2; }
.login-features .lf span { font-size: .8rem; line-height: 1.25; display: block; }
@media (max-height: 760px) and (min-width: 992px) { .login-features .lf span { display: none; } }
