/* ==========================================================================
   UMURONGO SMART - UNILAK  |  one design system for every page
   Load order: vendor/bootstrap.min.css -> vendor/bootstrap-icons -> this file
   ========================================================================== */

@font-face { font-family: "Public Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("vendor/fonts/PublicSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("vendor/fonts/PublicSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("vendor/fonts/PublicSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("vendor/fonts/PublicSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url("vendor/fonts/PublicSans-ExtraBold.woff2") format("woff2"); }

:root {
    /* brand - taken from the UNILAK crest */
    --navy: #10284A;
    --navy-2: #173660;
    --brand: #1C4FB0;
    --brand-600: #163F8D;
    --brand-50: #EDF2FB;
    --brand-100: #D9E4F7;
    --flame: #E89A12;
    --flame-600: #B97606;
    --flame-50: #FDF4E2;

    /* surfaces */
    --paper: #F3F5F8;
    --surface: #FFFFFF;
    --line: #DDE3EA;
    --line-soft: #EBEFF4;
    --ink: #13263F;
    --text: #23344D;
    --muted: #5A6779;
    --faint: #8A95A5;

    /* status */
    --ok: #1E8752;     --ok-50: #E6F4EC;
    --bad: #B4372A;    --bad-50: #FBEAE8;
    --pend: #6A4BC4;   --pend-50: #F0ECFB;
    --wait: #B97606;   --wait-50: #FDF4E2;
    --serve: #1C4FB0;  --serve-50: #EDF2FB;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --side-w: 252px;
    --top-h: 64px;
    --focus: 0 0 0 3px rgba(28, 79, 176, .28);

    /* bootstrap hooks */
    --bs-body-font-family: "Public Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --bs-body-color: var(--text);
    --bs-body-bg: var(--paper);
    --bs-primary: #1C4FB0;
    --bs-primary-rgb: 28, 79, 176;
    --bs-link-color: #1C4FB0;
    --bs-link-color-rgb: 28, 79, 176;
    --bs-link-hover-color: #163F8D;
    --bs-border-color: #DDE3EA;
    --bs-border-radius: 6px;
    --bs-border-radius-lg: 10px;
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--bs-body-font-family);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.375rem; } h3 { font-size: 1.125rem; } h4, h5, h6 { font-size: 1rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); text-decoration: underline; text-underline-offset: 2px; }
a.btn:hover, .side-nav a:hover, .tabs a:hover, .tile:hover { text-decoration: none; }
::selection { background: var(--brand-100); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
table, .num, .ticket, .stat-value, .chip { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted) !important; }
.faint { color: var(--faint) !important; }
.small-note { font-size: 13px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
img { max-width: 100%; }

/* ==========================================================================
   APP SHELL  (sidebar + top bar)
   ========================================================================== */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }

.side {
    position: sticky; top: 0; height: 100vh;
    background: var(--navy); color: #C9D5E6;
    display: flex; flex-direction: column;
    overflow-y: auto;
    z-index: 1040;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 16px 20px 12px; color: #fff; }
.side-brand:hover { color: #fff; text-decoration: none; }
.side-brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; padding: 2px; object-fit: contain; }
.side-brand b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.side-brand small { display: block; font-size: 12px; color: #9FB0C8; }

.side-campus {
    margin: 2px 16px 10px; padding: 9px 12px; border-radius: var(--r-md);
    background: rgba(255,255,255,.06); font-size: 13px; color: #DCE5F2;
    display: flex; align-items: center; gap: 8px;
}
.side-campus i { color: var(--flame); }

.side-group { padding: 2px 12px; }
.side-group > span { display: block; padding: 10px 10px 4px; font-size: 12px; font-weight: 600; color: #7F92AE; }
.side-nav a {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 7px 10px; margin: 1px 0; border-radius: var(--r-sm);
    color: #C9D5E6; font-size: 14.5px; font-weight: 500;
}
.side-nav a i { font-size: 17px; width: 20px; text-align: center; color: #8FA4C2; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a:hover i { color: #fff; }
.side-nav a.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.side-nav a.active i { color: var(--flame); }
.side-nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--flame); }

.side-foot { margin-top: auto; padding: 12px 16px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.side-user { display: flex; align-items: center; gap: 10px; }
.avatar {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-100); color: var(--brand-600); font-weight: 700; font-size: 14px;
}
.side .avatar { background: rgba(255,255,255,.12); color: #fff; }
.side-user b { display: block; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.2; }
.side-user small { color: #9FB0C8; font-size: 12px; }
.side-logout { margin-top: 8px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: #C9D5E6; font-size: 14px; }
.side-logout:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 1030;
    height: var(--top-h);
    display: flex; align-items: center; gap: 14px;
    padding: 0 28px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(1.4) blur(6px);
}
.topbar h1 { margin: 0; font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb { font-size: 13px; color: var(--muted); white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
    width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line);
    background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--paper); }
.menu-btn { display: none; }

.content { width: 100%; max-width: 1280px; padding: 26px 28px 48px; }
.content-wide { max-width: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h2 { margin: 0; font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.side-scrim { display: none; }

/* ==========================================================================
   BUILDING BLOCKS
   ========================================================================== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.panel + .panel, .panel + .grid, .grid + .panel, .stats + .panel, .stats + .grid, .panel + .stats { margin-top: 20px; }
.panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 14px 20px; border-bottom: 1px solid var(--line-soft);
}
.panel-head h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.panel-head h3 i { color: var(--brand); }
.panel-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.panel-body { padding: 20px; }
.panel-body.tight { padding: 0; }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }

/* panels inside a grid line up on top */
.grid > .panel, .grid > .panel + .panel { margin-top: 0; }

/* one strip of numbers instead of many identical cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.stat { padding: 16px 20px; border-left: 1px solid var(--line-soft); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1.15; margin-top: 4px; }
.stat-note { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.dot.wait { background: var(--flame); } .dot.serve { background: var(--brand); } .dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); } .dot.pend { background: var(--pend); }

/* status chips */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; line-height: 1.5; white-space: nowrap;
    background: var(--paper); color: var(--muted); border: 1px solid transparent;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip-waiting, .chip-wait { background: var(--wait-50); color: var(--wait); }
.chip-serving { background: var(--serve-50); color: var(--serve); }
.chip-served, .chip-ok, .chip-active, .chip-open, .chip-verified { background: var(--ok-50); color: var(--ok); }
.chip-missed, .chip-bad, .chip-blocked, .chip-rejected, .chip-inactive { background: var(--bad-50); color: var(--bad); }
.chip-pending { background: var(--pend-50); color: var(--pend); }
.chip-role { background: var(--brand-50); color: var(--brand-600); }

/* tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
    text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted);
    padding: 10px 14px; background: #F8FAFC; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--text); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FAFBFD; }
.tbl .id { color: var(--faint); width: 1%; }
.tbl .strong { font-weight: 600; color: var(--ink); }
.tbl .actions { white-space: nowrap; text-align: right; }
.tbl tr.is-current td { background: var(--flame-50); }

/* bootstrap table look-alike */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: #FAFBFD; font-size: 14px; margin-bottom: 0; }
.table > thead th { font-weight: 600; font-size: 12.5px; color: var(--muted); background: #F8FAFC; border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: 0; }
.table > :not(caption) > * > * { padding: 11px 14px; border-color: var(--line-soft); }

/* toolbar above lists */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 36px !important; }

/* empty states */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty i { font-size: 30px; color: var(--faint); display: block; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* pagination */
.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pager a, .pager span {
    min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--text); font-size: 14px;
}
.pager a:hover { background: var(--paper); text-decoration: none; }
.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .off { color: var(--faint); background: var(--paper); }

/* tabs */
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-md); background: #E7EBF1; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: var(--r-sm); color: var(--muted); font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.tabs a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16,40,74,.12); }
.tabs a .count { font-size: 12px; background: var(--paper); border-radius: 999px; padding: 0 7px; }

/* menu tiles (portal home) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; color: var(--text);
}
.tile:hover { border-color: var(--brand); color: var(--text); }
.tile i { flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; }
.tile b { display: block; color: var(--ink); font-size: 15px; }
.tile small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 2px; }
.tile.danger i { background: var(--bad-50); color: var(--bad); }

/* key/value lists */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; word-break: break-word; }

/* notes / callouts */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-600); font-size: 14px; border: 1px solid var(--brand-100); }
.note i { font-size: 18px; line-height: 1.3; }
.note.ok { background: var(--ok-50); color: var(--ok); border-color: #CBE8D8; }
.note.bad { background: var(--bad-50); color: var(--bad); border-color: #F2CFCA; }
.note.warn { background: var(--flame-50); color: var(--flame-600); border-color: #F5DEB0; }
.note + .panel, .note + .stats, .note + .grid, .note + form { margin-top: 16px; }

/* ==========================================================================
   THE TICKET  - the one signature element (queue numbers)
   ========================================================================== */
.ticket {
    --notch: 14px;
    position: relative;
    display: grid; grid-template-columns: minmax(130px, auto) 1fr;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    overflow: hidden;
}
.ticket-stub {
    position: relative;
    padding: 20px 26px;
    background: var(--navy); color: #fff;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.ticket-stub small { font-size: 12.5px; color: #A9B9D0; font-weight: 500; }
.ticket-no { font-size: 56px; line-height: 1; font-weight: 800; color: var(--flame); letter-spacing: -.02em; margin: 4px 0 2px; }
.ticket-no.sm { font-size: 40px; }
.ticket-stub .meta { font-size: 12.5px; color: #C9D5E6; }
/* perforation between the stub and the body */
.ticket-stub::after {
    content: ""; position: absolute; top: 10px; bottom: 10px; right: -1px; width: 0;
    border-right: 2px dashed rgba(255,255,255,.0);
}
.ticket-body {
    position: relative; padding: 18px 22px 18px 28px;
    border-left: 2px dashed var(--line);
    display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0;
}
.ticket-body::before, .ticket-body::after {
    content: ""; position: absolute; left: calc(var(--notch) / -2 - 1px); width: var(--notch); height: var(--notch);
    border-radius: 50%; background: var(--paper); border: 1px solid var(--line);
}
.ticket-body::before { top: calc(var(--notch) / -2 - 1px); }
.ticket-body::after { bottom: calc(var(--notch) / -2 - 1px); }
.ticket-body h3 { margin: 0; font-size: 18px; }
.ticket-body p { margin: 0; color: var(--muted); font-size: 14px; }
.ticket.is-turn .ticket-stub { background: var(--ok); }
.ticket.is-turn .ticket-no { color: #fff; }
.ticket.light .ticket-stub { background: var(--flame-50); color: var(--ink); }
.ticket.light .ticket-stub small, .ticket.light .ticket-stub .meta { color: var(--muted); }
.ticket.light .ticket-no { color: var(--flame-600); }

/* ==========================================================================
   BOOTSTRAP + PLAIN ELEMENT OVERRIDES (so old markup matches too)
   ========================================================================== */
.btn {
    --bs-btn-font-weight: 600; --bs-btn-font-size: 14px; --bs-btn-padding-y: 8px; --bs-btn-padding-x: 14px;
    --bs-btn-border-radius: var(--r-sm);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-sm { --bs-btn-padding-y: 5px; --bs-btn-padding-x: 10px; --bs-btn-font-size: 13px; gap: 6px; }
.btn-lg { --bs-btn-padding-y: 11px; --bs-btn-padding-x: 20px; --bs-btn-font-size: 15.5px; }
.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); --bs-btn-active-border-color: var(--brand-600); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand-100); --bs-btn-hover-bg: var(--brand-50); --bs-btn-hover-color: var(--brand-600); --bs-btn-hover-border-color: var(--brand-100); --bs-btn-active-bg: var(--brand-100); --bs-btn-active-color: var(--brand-600); }
.btn-light, .btn-ghost { --bs-btn-bg: #fff; --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--paper); --bs-btn-hover-border-color: var(--line); --bs-btn-hover-color: var(--ink); }
.btn-success { --bs-btn-bg: var(--ok); --bs-btn-border-color: var(--ok); --bs-btn-hover-bg: #176B41; --bs-btn-hover-border-color: #176B41; }
.btn-danger { --bs-btn-bg: var(--bad); --bs-btn-border-color: var(--bad); --bs-btn-hover-bg: #93291F; --bs-btn-hover-border-color: #93291F; }
.btn-outline-danger { --bs-btn-color: var(--bad); --bs-btn-border-color: #F2CFCA; --bs-btn-hover-bg: var(--bad-50); --bs-btn-hover-color: var(--bad); --bs-btn-hover-border-color: #F2CFCA; }
.btn-warning, .btn-flame { --bs-btn-bg: var(--flame); --bs-btn-color: #2A1A00; --bs-btn-border-color: var(--flame); --bs-btn-hover-bg: #D48A06; --bs-btn-hover-border-color: #D48A06; --bs-btn-hover-color: #2A1A00; }
.btn-secondary { --bs-btn-bg: #fff; --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--paper); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: var(--line); }
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--paper); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: var(--line); --bs-btn-active-bg: var(--line-soft); --bs-btn-active-color: var(--ink); background: #fff; }
.btn-dark { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy-2); --bs-btn-hover-border-color: var(--navy-2); }

.form-label, .lbl { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; display: block; }
.form-text, .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.form-control, .form-select {
    font-size: 15px; padding: 9px 12px; border-radius: var(--r-sm); border-color: var(--line); color: var(--ink); background-color: #fff;
}
.form-control::placeholder { color: var(--faint); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: var(--focus); }
.form-control-sm, .form-select-sm { font-size: 13.5px; padding: 6px 10px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon > .form-control, .input-icon > .form-select { padding-left: 38px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 6px; }

.card { --bs-card-border-color: var(--line); --bs-card-border-radius: var(--r-md); --bs-card-cap-bg: #fff; box-shadow: none; }
.card-header { font-weight: 600; color: var(--ink); }
.badge { font-weight: 600; letter-spacing: 0; border-radius: 999px; padding: .4em .7em; }
.alert { border-radius: var(--r-md); font-size: 14px; }
.alert-success { --bs-alert-bg: var(--ok-50); --bs-alert-color: var(--ok); --bs-alert-border-color: #CBE8D8; }
.alert-danger { --bs-alert-bg: var(--bad-50); --bs-alert-color: var(--bad); --bs-alert-border-color: #F2CFCA; }
.alert-warning { --bs-alert-bg: var(--flame-50); --bs-alert-color: var(--flame-600); --bs-alert-border-color: #F5DEB0; }
.alert-info, .alert-primary { --bs-alert-bg: var(--brand-50); --bs-alert-color: var(--brand-600); --bs-alert-border-color: var(--brand-100); }
.modal-content { border-radius: var(--r-lg); border-color: var(--line); }
.dropdown-menu { border-color: var(--line); border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(16,40,74,.14); font-size: 14px; }

/* ==========================================================================
   SIGN-IN / STANDALONE PAGES
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.auth-side {
    position: relative; background: var(--navy); color: #DCE5F2;
    padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.auth-side .brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.auth-side .brand img { width: 52px; height: 52px; border-radius: 50%; background: #fff; padding: 3px; }
.auth-side .brand b { font-size: 18px; display: block; }
.auth-side .brand small { color: #9FB0C8; font-size: 13px; }
.auth-side h1 { color: #fff; font-size: 34px; line-height: 1.2; margin: 0 0 14px; max-width: 16ch; }
.auth-side p { color: #B8C7DC; max-width: 44ch; margin: 0; font-size: 16px; }
.auth-side .ticket { max-width: 380px; margin-top: 34px; border-color: transparent; }
.auth-side .ticket-body::before, .auth-side .ticket-body::after { background: var(--navy); border-color: var(--navy); }
.auth-side .foot { font-size: 13px; color: #7F92AE; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-size: 26px; margin: 0 0 6px; }
.auth-box > p { color: var(--muted); margin: 0 0 26px; }
.auth-box .btn-lg { width: 100%; }
.auth-box .alt { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }

.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--paper); }
.center-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; }
.center-card .logo { width: 56px; height: 56px; border-radius: 50%; display: block; margin-bottom: 18px; }

/* ==========================================================================
   PUBLIC SITE
   ========================================================================== */
.site-top { position: sticky; top: 0; z-index: 1030; background: #fff; border-bottom: 1px solid var(--line); }
.site-top .in { max-width: 1180px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; gap: 24px; }
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.site-brand:hover { color: var(--ink); text-decoration: none; }
.site-brand img { width: 40px; height: 40px; border-radius: 50%; }
.site-brand small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--text); font-weight: 500; font-size: 15px; }
.site-nav a:hover, .site-nav a.active { background: var(--paper); text-decoration: none; color: var(--ink); }
.site-menu-btn { display: none; margin-left: auto; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head h2 { font-size: 28px; margin: 0 0 8px; }
.section-head p { color: var(--muted); margin: 0; font-size: 16px; }
.site-foot { background: var(--navy); color: #B8C7DC; padding: 40px 0 28px; font-size: 14px; }
.site-foot a { color: #DCE5F2; }
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-foot h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-foot .legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #7F92AE; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
    .grid-main { grid-template-columns: minmax(0, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .side {
        position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw);
        transform: translateX(-102%); transition: transform .22s ease;
    }
    body.side-open .side { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.3); }
    body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(16,40,74,.45); z-index: 1035; }
    .menu-btn { display: inline-flex; }
    .topbar { padding: 0 14px; gap: 10px; }
    .topbar .crumb { display: none; }
    .content { padding: 18px 16px 40px; }
    .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-side { padding: 28px 22px; }
    .auth-side h1 { font-size: 24px; }
    .auth-side .ticket, .auth-side .foot { display: none; }
    .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
    .site-top.open .site-nav { display: flex; }
    .site-menu-btn { display: inline-flex; }
    .site-foot .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
    body { font-size: 15px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat:nth-child(odd) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
    .panel-head, .panel-body, .toolbar { padding-left: 16px; padding-right: 16px; }
    .ticket { grid-template-columns: minmax(0, 1fr); }
    .ticket-body { border-left: 0; border-top: 2px dashed var(--line); padding: 18px 20px; }
    .ticket-body::before { top: calc(var(--notch) / -2 - 1px); left: calc(var(--notch) / -2 - 1px); }
    .ticket-body::after { top: calc(var(--notch) / -2 - 1px); bottom: auto; left: auto; right: calc(var(--notch) / -2 - 1px); }
    .ticket-no { font-size: 48px; }
    .topbar h1 { font-size: 17px; }
    input, select, textarea { font-size: 16px !important; }
    .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .kv dd { margin-bottom: 10px; }
    .page-head h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
    .side, .topbar, #umsBell, #umsPanel, #umsToasts { display: none !important; }
    .app { display: block; }
    .panel { border-color: #ccc; }
}

/* sample ticket on the sign-in side panel */
.auth-side .ticket-body h3 { color: var(--ink); }
.auth-side .ticket-body p { color: var(--muted); font-size: 14px; }
