:root {
  --navy: #0b3c6e;
  --navy-2: #0e4f8f;
  --band: #0f4c86;
  --nav: #26282b;
  --accent: #1a7fd4;
  --accent-dark: #0f63ab;
  --ink: #1f2933;
  --muted: #5f6b7a;
  --line: #dde3ea;
  --bg: #f1f3f6;
  --card: #ffffff;
  --green: #1e8a4c;
  --amber: #b26a00;
  --red: #c0392b;
  --radius: 4px;
  font-family: "Segoe UI", "Open Sans", system-ui, -apple-system, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; min-height: 100vh; display: flex; flex-direction: column; }
body > main.wrap { flex: 1 0 auto; width: 100%; }
body > .footer { flex-shrink: 0; margin-top: auto; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 18px; padding-bottom: 30px; min-height: 60vh; }

/* Header */
.topbar { background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 8px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark { background: #6abf4b; color: #fff; font-weight: 800; font-style: italic; padding: 4px 8px; border-radius: 3px; letter-spacing: .5px; }
.brand-text strong { display: block; font-size: 17px; letter-spacing: .3px; font-style: italic; text-transform: uppercase; }
.brand-text small { display: block; font-size: 11px; opacity: .8; }
.userbox details { position: relative; }
.userbox summary { list-style: none; cursor: pointer; }
.userbox summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--accent); }
.menu { position: absolute; right: 0; top: 42px; background: #fff; color: var(--ink); min-width: 200px; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.2); z-index: 50; overflow: hidden; }
.menu a { display: block; padding: 9px 14px; color: var(--ink); }
.menu a:hover { background: var(--bg); text-decoration: none; }
.menu-head { padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.menu-head small { display: block; color: var(--muted); font-weight: 400; }

.mainnav { background: var(--nav); }
.navwrap { max-width: 1240px; margin: 0 auto; padding: 0 12px; display: flex; flex-wrap: wrap; }
.mainnav a { color: #e9edf2; padding: 10px 11px; font-size: 13px; border-bottom: 3px solid transparent; }
.mainnav a:hover { background: #33363a; text-decoration: none; }
.mainnav a.on { border-bottom-color: var(--accent); color: #fff; }

.titleband { background: var(--band); color: #fff; padding: 12px 0; }
.titleband h1 { margin: 0; font-size: 20px; font-weight: 600; }
.titleband .crumb { font-size: 12px; opacity: .8; }

/* Cards */
.card { background: var(--card); border-top: 3px solid var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.08); margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.card-body { padding: 14px 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* Forms */
label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 4px; color: #33404d; }
label .req { color: var(--red); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date],
input[type=time], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid #c4ccd6; border-radius: var(--radius); font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9fcbf1; border-color: var(--accent); }
.field { margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline .field { margin-bottom: 0; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.check input { width: auto; }
.hint { color: var(--muted); font-size: 12px; margin-top: 3px; }

.btn { display: inline-block; border: 1px solid var(--accent-dark); background: var(--accent-dark); color: #fff; padding: 7px 14px; border-radius: var(--radius); font: inherit; font-size: 13px; cursor: pointer; line-height: 1.3; }
.btn:hover { background: #0b528f; text-decoration: none; }
.btn-outline { background: #fff; color: var(--accent-dark); }
.btn-outline:hover { background: #eef5fc; }
.btn-green { background: var(--green); border-color: var(--green); }
.btn-red { background: var(--red); border-color: var(--red); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-lg { padding: 12px 22px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { background: #3a4048; color: #fff; text-align: left; padding: 8px; font-weight: 600; white-space: nowrap; }
table.data td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:nth-child(even) td { background: #fafbfc; }
table.data td.num, table.data th.num { text-align: right; }
table.data tr.group td { background: #eef3f9; border-top: 14px solid #fff; border-bottom: 1px solid #d5e0ec; padding: 9px 8px; }
table.data tr.group:first-of-type td, table.data tr:nth-child(2).group td { border-top-width: 0; }
.grp-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-right: 6px; }
.grp-value { font-weight: 700; font-size: 14px; color: var(--navy); }
.grp-count { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 10px; background: #fff; border: 1px solid #d5e0ec; color: var(--muted); font-size: 11.5px; }
.grp-agg { margin-left: 10px; color: var(--muted); font-size: 12px; }
.grp-agg strong { color: var(--ink); }
table.data tr.subtotal td { background: #fff; border-top: 1px solid #c9d3de; border-bottom: none; font-weight: 600; color: #33404d; }
table.data tr.subtotal .tot-label { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
table.data tr.grand td { background: #e7eef6; font-weight: 700; border-top: 2px solid var(--navy); border-bottom: 2px solid var(--navy); padding-top: 10px; padding-bottom: 10px; color: var(--navy); }
table.data tr.grand .tot-label { text-transform: uppercase; letter-spacing: .5px; }
.tot-note { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 4px; }
.tot-fn { display: block; font-size: 10.5px; font-weight: 400; color: var(--muted); text-transform: lowercase; }
.empty { text-align: center; color: var(--muted); padding: 18px; }

/* Badges & alerts */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; }
.badge-blue { background: #e1effb; color: #0f5ea3; }
.badge-green { background: #e0f3e8; color: #17703c; }
.badge-amber { background: #fdf0db; color: #8a5300; }
.badge-red { background: #fbe3e0; color: #a3291c; }
.badge-gray { background: #eceff3; color: #4b5563; }
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; border-left: 4px solid; background: #fff; }
.alert-success { border-color: var(--green); background: #eef8f2; }
.alert-error { border-color: var(--red); background: #fdf0ee; }
.alert-info { border-color: var(--accent); background: #eef5fc; }
.alert-warn { border-color: var(--amber); background: #fff7ea; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--ink); border: 1px solid transparent; border-bottom: none; border-radius: 4px 4px 0 0; }
.tabs a.on { border-color: var(--line); border-top: 3px solid var(--accent); background: #fff; margin-bottom: -1px; font-weight: 600; }

/* Course results */
.course { border: 1px solid var(--line); border-left: 4px solid #7b3fa0; background: #fff; margin-bottom: 14px; }
.course-top { display: flex; gap: 12px; padding: 12px 14px; align-items: center; flex-wrap: wrap; }
.course-type { background: #7b3fa0; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 3px; }
.course-title { font-size: 16px; font-weight: 600; }
.course-desc { padding: 0 14px 10px; color: #3b4652; }
.course-meta { padding: 0 14px 10px; color: var(--muted); font-size: 12.5px; display: flex; gap: 16px; flex-wrap: wrap; }
.sections-list { border-top: 1px solid var(--line); background: #fafbfc; padding: 8px 14px; }
.section-row { display: grid; grid-template-columns: 2fr 1.4fr 1.3fr 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.section-row:last-child { border-bottom: none; }
@media (max-width: 860px) { .section-row { grid-template-columns: 1fr; } }
.taglist a { display: block; padding: 3px 0; }
.chips a, .chip { display: inline-block; background: #eef2f6; border-radius: 12px; padding: 2px 10px; margin: 2px; font-size: 12px; color: var(--ink); }
.chips a.on { background: var(--accent-dark); color: #fff; }

.stat { background: #fff; border: 1px solid var(--line); padding: 12px 14px; }
.stat .n { font-size: 26px; font-weight: 700; color: var(--navy); }
.stat .l { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.right { text-align: right; }
.pager { display: flex; gap: 4px; margin-top: 12px; flex-wrap: wrap; }
.pager a, .pager span { padding: 4px 9px; border: 1px solid var(--line); background: #fff; }
.pager a.on { background: var(--accent-dark); color: #fff; }
.footer { color: var(--muted); font-size: 12px; padding: 16px 20px 30px; text-align: center; width: 100%; }
body.kiosk .footer { color: #9fb3c8; }
/* Sign-in pages with a custom color or picture: the copyright sits on a dark pill so it reads on any background */
body.auth-custom .footer-text { display: inline-block; background: rgba(12, 22, 34, .72); color: #fff; padding: 5px 14px; border-radius: 999px; text-shadow: none; }
body.auth .footer { padding-bottom: 18px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.preview-banner { background: #fff7d6; color: #6b5200; text-align: center; padding: 6px 12px; font-size: 13px; }
.brand-logo { max-height: 40px; max-width: 240px; height: auto; width: auto; display: block; flex: none; }
.brand-logo-plate { background: #fff; padding: 3px 8px; border-radius: 4px; box-sizing: content-box; }

/* Auth pages */
.auth-wrap { max-width: 900px; margin: 50px auto; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.auth-wrap .pane { padding: 28px; }
.auth-wrap .side { background: #f6f8fb; border-left: 1px solid var(--line); color: #3b4652; }
@media (max-width: 760px) { .auth-wrap { grid-template-columns: 1fr; margin: 20px; } }

/* Check-in kiosk */
body.kiosk { background: #0d2a4a; }
.kiosk-head { color: #fff; text-align: center; padding: 18px 10px 4px; }
.kiosk-head h1 { margin: 0; font-size: 26px; }
.kiosk-head .sub { opacity: .8; }
.kiosk-progress { max-width: 520px; height: 10px; background: rgba(255,255,255,.2); border-radius: 5px; margin: 12px auto 0; overflow: hidden; }
.kiosk-progress div { height: 100%; background: #6abf4b; }
.kiosk-search { max-width: 520px; margin: 16px auto; }
.kiosk-search input { font-size: 18px; padding: 12px; }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; max-width: 1200px; margin: 0 auto; padding: 0 16px 30px; }
.name-tile { background: #fff; border: none; border-radius: 8px; padding: 16px 12px; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; text-align: center; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.name-tile small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 3px; }
.name-tile:hover { outline: 3px solid #6abf4b; }
.name-tile.done { background: #d8f0dd; color: #17703c; cursor: default; }
.name-tile.done:hover { outline: none; }
.name-tile.done::before { content: "✓ "; }
.kiosk-alert { max-width: 640px; margin: 14px auto 0; font-size: 18px; text-align: center; }
.kiosk-foot { text-align: center; padding-bottom: 24px; }
.kiosk-foot details { display: inline-block; color: #cfd9e5; }
.kiosk-foot summary { cursor: pointer; font-size: 12px; }
.kiosk-foot form { background: #fff; padding: 12px; border-radius: 6px; margin-top: 8px; color: var(--ink); }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 10px; max-width: 420px; width: 100%; padding: 22px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.modal h2 { margin: 0 0 4px; }
.modal input[type=tel] { font-size: 26px; text-align: center; letter-spacing: 2px; padding: 12px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.keypad button { font-size: 22px; padding: 12px; border-radius: 8px; border: 1px solid #c4ccd6; background: #f6f8fb; cursor: pointer; }
.keypad button:active { background: #dfe7f0; }

/* Report builder */
.rb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rb-list { border: 1px solid var(--line); height: 300px; overflow-y: auto; background: #fff; }
.rb-list div { padding: 6px 9px; border-bottom: 1px solid #eef1f4; display: flex; justify-content: space-between; align-items: center; gap: 6px; cursor: pointer; }
.rb-list div:hover { background: #eef5fc; }
.rb-list .t { font-size: 11px; color: var(--muted); }
.rb-list .ctl button { border: 1px solid var(--line); background: #fff; cursor: pointer; padding: 1px 6px; border-radius: 3px; }
.rb-row { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 860px) { .rb-row, .rb-cols { grid-template-columns: 1fr; } }
.report-title { text-align: center; margin: 4px 0 14px; }
.report-title h2 { margin: 0; font-size: 20px; }
.report-title .sub { color: var(--muted); }
.chart-box { max-width: 820px; margin: 0 auto 18px; }

/* Certificate */
.certificate { background: #fff; max-width: 1000px; margin: 20px auto; padding: 50px 60px; border: 14px double var(--navy); text-align: center; }
.certificate h1 { font-family: Georgia, serif; font-size: 40px; color: var(--navy); margin: 0 0 8px; }
.certificate .name { font-family: Georgia, serif; font-size: 34px; border-bottom: 1px solid #999; display: inline-block; padding: 0 40px 4px; margin: 14px 0; }
.certificate .sig { display: flex; justify-content: space-around; margin-top: 50px; }
.certificate .sig div { border-top: 1px solid #333; padding-top: 4px; min-width: 240px; }

.no-print {}
@media print {
  body { background: #fff; display: block; min-height: 0; }
  .topbar, .mainnav, .no-print, .pager, .tabs { display: none !important; }
  /* copyright pinned to the bottom of every printed page (browsers repeat fixed elements on each page) */
  body > .footer { display: none; } /* printed pages use the print frame header/footer instead */
  .titleband { background: none; color: #000; padding: 0; }
  body.print-report .titleband { display: none !important; } /* reports print their own centered title */
  .card { box-shadow: none; border: none; }
  .card-head { background: none; }
  table.data th { background: #ddd !important; color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  main.wrap { max-width: none; padding: 0; }
  .certificate { margin: 0 auto; }
  /* margin 0 stops the browser adding its own date / title / URL header and footer; the print frame supplies ours */
  @page { margin: 0; }
  main.wrap { padding: 0 12mm !important; }
  .print-frame { display: table; width: 100%; border-collapse: collapse; }
  .print-frame > thead { display: table-header-group; }
  .print-frame > tfoot { display: table-footer-group; }
  .print-frame > tbody { display: table-row-group; }
  .print-frame > * > tr { display: table-row; }
  .print-frame > * > tr > td { display: table-cell; padding: 0; }
  .pf-space-top { height: 20mm; }
  .pf-space-bottom { height: 16mm; }
  .pf-head { display: block; position: fixed; top: 8mm; left: 12mm; right: 12mm; text-align: right; font-size: 10.5pt; font-weight: 700; color: #0b3c6e; line-height: 1.25; }
  .pf-head span { display: block; font-size: 8.5pt; font-weight: 400; color: #5f6b7a; }
  .pf-foot { display: block; position: fixed; bottom: 7mm; left: 12mm; right: 12mm; text-align: center; font-size: 9pt; color: #5f6b7a; }
  .pf-foot .pf-date { position: absolute; right: 0; top: 0; font-size: 8.5pt; } /* run / printed date, bottom right */
  .pf-foot .pf-date.pf-left { right: auto; left: 0; } /* transcripts: printed date bottom left */
}
@media print { body.landscape { } }

/* Prerequisite course picker */
.cp-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; min-height: 28px; align-items: center; }
.cp-chip { display: inline-flex; align-items: center; gap: 6px; background: #e1effb; color: #0b3c6e; border: 1px solid #b9d7f1; border-radius: 16px; padding: 4px 4px 4px 12px; font-size: 13px; max-width: 100%; }
.cp-chip.cp-inactive { background: #eceff3; color: #4b5563; border-color: #d3d9e0; }
.cp-chip button { border: none; background: rgba(11, 60, 110, .12); color: inherit; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; flex: none; }
.cp-chip button:hover { background: #c0392b; color: #fff; }
.cp-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cp-inputwrap { position: relative; flex: 1; min-width: 260px; }
.cp-results { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 2px); background: #fff; border: 1px solid #c4ccd6; border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.15); max-height: 340px; overflow-y: auto; }
.cp-opt { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid #eef1f4; }
.cp-opt:last-child { border-bottom: none; }
.cp-opt.cp-active { background: #e1effb; }
.cp-opt.cp-taken { opacity: .55; cursor: default; }
.cp-opt mark { background: #fff1a8; padding: 0; }
.cp-num { font-weight: 700; color: var(--navy); }
.cp-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.cp-empty { padding: 9px 10px; color: var(--muted); font-size: 13px; }

.tot-first { margin-left: 4px; }
.tot-first .tot-fn { display: inline; margin-left: 3px; font-size: 11.5px; }

/* Print frame (see page_header): invisible on screen */
@media screen {
  .print-frame, .print-frame > tbody, .print-frame > tbody > tr, .print-frame > tbody > tr > td { display: block; width: 100%; padding: 0; border: 0; }
  .print-frame > thead, .print-frame > tfoot, .pf-head, .pf-foot { display: none; }
}

/* Roles & Permissions */
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 14px; }
.perm-box { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); background: #fff; padding: 8px 10px; border-radius: 4px; cursor: pointer; font-weight: normal; }
.perm-box input { margin-top: 3px; width: auto; }
.perm-box small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.perm-box.perm-admin { grid-column: 1 / -1; background: #f6f8fb; }
@media (max-width: 760px) { .perm-grid { grid-template-columns: 1fr; } }
.meeting-box { margin: 8px 0 4px; padding: 8px 12px; background: #eef6ff; border-left: 4px solid #1a7fd4; font-size: 13.5px; }
.meeting-box .btn { margin: 0 6px; }
.loc-details td { border-top: 0 !important; padding-top: 0 !important; padding-bottom: 12px !important; background: #fafbfc; }

/* Signature previews: the same transparent signature over white and over a cream/checkered card, so it's clear the paper is gone */
.sig-preview{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 8px}
.sig-preview img{height:64px;max-width:240px;object-fit:contain;padding:6px 10px;border:1px solid var(--line);border-radius:4px;background:#fff}
.sig-preview img+img{background:#f3ead6 repeating-conic-gradient(#e9dfc8 0% 25%, transparent 0% 50%) 0 0/16px 16px}

/* ---------- Help: floating button, slide-out panel and Help page ---------- */
.help-fab { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px 9px 14px;
  background: #fff; color: #1f2933; border: 1px solid rgba(0,0,0,.08); border-radius: 999px; font: 600 15px/1 inherit; font-family: inherit;
  box-shadow: 0 4px 14px rgba(0,0,0,.22); cursor: pointer; }
.help-fab:hover { box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.help-fab:focus-visible { outline: 3px solid #1a7fd4; outline-offset: 2px; }
.help-q { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #c8102e; color: #fff; font-size: 13px; font-weight: 800; }
body.help-open .help-fab { display: none; }
.help-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 430px; max-width: 100%; z-index: 950; background: #fff; box-shadow: -6px 0 24px rgba(0,0,0,.25);
  display: flex; flex-direction: column; }
.help-drawer[hidden] { display: none; }
.help-drawer-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--navy, #0b3c6e); color: #fff; }
.help-drawer-head strong { font-size: 17px; flex: 1; }
.help-drawer-head .help-full { color: #fff; font-size: 13px; opacity: .9; }
.help-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.help-drawer-body { overflow-y: auto; padding: 14px 16px 30px; flex: 1; }
.help-search { width: 100%; margin-bottom: 8px; }
.help-sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #5f6b7a); margin: 16px 0 4px; }
.help-topic { border-bottom: 1px solid var(--line, #e3e8ee); }
.help-topic > summary { cursor: pointer; padding: 8px 2px; font-weight: 600; color: #0b3c6e; list-style-position: outside; }
.help-topic[open] > summary { color: #1f2933; }
.help-text { font-size: 14px; line-height: 1.55; }
.help-text ul, .help-text ol { padding-left: 20px; margin: 6px 0 10px; }
.help-text li { margin: 3px 0; }
.help-text code { background: #f1f3f6; padding: 1px 5px; border-radius: 3px; font-size: 12.5px; }
.help-topic .help-text { padding: 0 2px 10px; }
.help-page { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
.help-page-public { max-width: 1100px; margin: 20px auto; }
.help-nav h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #5f6b7a); margin: 14px 0 4px; }
.help-nav ul { list-style: none; padding: 0; margin: 0; }
.help-nav li a { display: block; padding: 4px 6px; border-radius: 4px; font-size: 14px; }
.help-nav li a.on { background: #e1effb; font-weight: 600; }
.help-nav input { width: 100%; }
@media (max-width: 800px) { .help-page { grid-template-columns: 1fr; } .help-fab { right: 12px; bottom: 12px; } }
@media print { .help-fab, .help-drawer { display: none !important; } }

/* Session-timeout warning */
.to-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(12, 22, 34, .55); display: grid; place-items: center; padding: 16px; }
.to-overlay[hidden] { display: none; }
.to-card { background: #fff; border-radius: 8px; max-width: 420px; width: 100%; padding: 22px 24px; box-shadow: 0 12px 40px rgba(0,0,0,.35); border-top: 4px solid #c8102e; }
.to-card h2 { margin: 0 0 8px; font-size: 20px; color: #0b3c6e; }
.to-card p { margin: 0 0 16px; line-height: 1.5; }
#toLeft { font-variant-numeric: tabular-nums; color: #c8102e; }
@media print { .to-overlay { display: none !important; } }

/* Buttons in a card header (Course Materials, View as Teacher, Roster & Sessions) */
.head-btns { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.head-btns .btn { white-space: nowrap; }

/* Course delete (cancel) dialog */
.cancel-dlg { border: 0; border-radius: 8px; padding: 22px 24px; max-width: 520px; width: calc(100% - 32px); box-shadow: 0 12px 40px rgba(0,0,0,.35); border-top: 4px solid #c8102e; }
.cancel-dlg::backdrop { background: rgba(12, 22, 34, .55); }
.cancel-dlg h2 { margin: 0 0 4px; color: #a3291c; font-size: 20px; }
.cancel-dlg .cd-title { margin: 0 0 12px; font-weight: 600; }
.cancel-dlg textarea { width: 100%; }

/* Profile photos */
.avatar-photo { padding: 0; overflow: hidden; background: #fff; }
.avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.ph-wrap { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.ph-current { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; flex: none; background: var(--accent, #1a7fd4); display: grid; place-items: center;
  color: #fff; font-size: 40px; font-weight: 700; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line, #dfe5ec); }
.ph-current img { width: 100%; height: 100%; object-fit: cover; }
.ph-stage { position: relative; width: 280px; max-width: 100%; aspect-ratio: 1; background: #1f2933; border-radius: 6px; overflow: hidden; touch-action: none; }
.ph-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.ph-stage canvas:active { cursor: grabbing; }
.ph-stage canvas:focus-visible { outline: 3px solid #1a7fd4; outline-offset: -3px; }
.ph-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(15, 23, 32, .55); outline: 2px solid rgba(255,255,255,.9); outline-offset: -2px; }
.ph-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.ph-zoom { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.ph-zoom input { width: 150px; }
.ph-name { display: flex; align-items: center; gap: 10px; }
.ph-thumb { flex: none; border-radius: 50%; overflow: hidden; padding: 0; border: 1px solid var(--line, #dfe5ec); background: #eceff3; cursor: zoom-in; display: inline-grid; place-items: center; }
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-thumb:hover { box-shadow: 0 0 0 2px #1a7fd4; }
.ph-none { cursor: default; color: #5f6b7a; font-size: 11px; font-weight: 700; }
.ph-none:hover { box-shadow: none; }
.ph-lightbox { position: fixed; inset: 0; z-index: 1900; background: rgba(12, 22, 34, .75); display: grid; place-items: center; padding: 16px; }
.ph-lightbox[hidden] { display: none; }
.ph-lightbox figure { position: relative; margin: 0; background: #fff; padding: 12px 12px 8px; border-radius: 8px; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.ph-lightbox img { width: min(360px, 80vw); height: min(360px, 80vw); object-fit: cover; border-radius: 6px; display: block; }
.ph-lightbox figcaption { margin-top: 8px; font-weight: 600; }
.ph-lb-close { position: absolute; top: -14px; right: -14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #c8102e; color: #fff; font-size: 20px; cursor: pointer; }
@media print { .ph-thumb { display: none !important; } }

/* ---------- Session Calendar ---------- */
.cal-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 12px; }
.cal-bar .tabs { margin: 0; }
.cal-nav { display: flex; gap: 6px; align-items: center; }
.cal-nav input[type=date] { width: auto; padding: 4px 6px; }
.cal-export { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cal-filters { margin-bottom: 14px; }
.cal-filters > summary { cursor: pointer; list-style: none; }
.cal-filters > summary::-webkit-details-marker { display: none; }
.cal-filters > summary h2::before { content: '▸ '; color: var(--muted, #5f6b7a); }
.cal-filters[open] > summary h2::before { content: '▾ '; }
.cal-filter-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; }
.cal-checks { display: flex; flex-direction: column; gap: 4px; justify-content: end; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line, #dfe5ec); border-top: 1px solid var(--line, #dfe5ec); }
.cal-dow { background: #3a4048; color: #fff; font-size: 12px; font-weight: 700; text-align: center; padding: 5px 2px; border-right: 1px solid #3a4048; }
.cal-day { min-height: 108px; border-right: 1px solid var(--line, #dfe5ec); border-bottom: 1px solid var(--line, #dfe5ec); padding: 3px 4px 4px; background: #fff; overflow: hidden; }
.cal-day.cal-we { background: #fafbfc; }
.cal-day.cal-out { background: #f3f5f8; }
.cal-day.cal-today { box-shadow: inset 0 0 0 2px #1a7fd4; }
.cal-num { display: block; text-align: right; font-weight: 700; font-size: 12.5px; color: #1f2933; text-decoration: none; }
.cal-today .cal-num { color: #1a7fd4; }
.cal-hol.cal-federal { background: #fde8e8 !important; }
.cal-hol.cal-closure { background: #fef0de !important; }
.cal-hol.cal-observance { background: #f3eefc !important; }
.cal-holname { font-size: 11px; font-weight: 700; color: #a81e1e; line-height: 1.2; margin-bottom: 3px; }
.cal-chip { display: block; font-size: 11.5px; line-height: 1.25; padding: 2px 4px 2px 6px; margin: 2px 0; border-radius: 3px; background: #f1f5fa;
  border-left: 3px solid var(--c, #1a7fd4); color: #1f2933; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip:hover { background: #e1effb; }
.cal-chip .cal-t { font-weight: 700; color: #0b3c6e; }
.cal-chip.cal-cancel { opacity: .55; text-decoration: line-through; }
.cal-chip.cal-clash { outline: 2px solid #c8102e; outline-offset: -1px; }
.cal-meta { display: block; white-space: normal; color: var(--muted, #5f6b7a); font-size: 11px; margin-top: 2px; }
.cal-more { font-size: 11px; font-weight: 700; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line, #dfe5ec); }
.cal-wday { border-right: 1px solid var(--line, #dfe5ec); padding: 0 5px 8px; min-height: 320px; background: #fff; }
.cal-wday:last-child { border-right: 0; }
.cal-wday-head { display: block; margin: 0 -5px 6px; padding: 6px; background: #3a4048; color: #fff; text-align: center; text-decoration: none; font-size: 12.5px; }
.cal-wday.cal-today .cal-wday-head { background: #1a7fd4; }
.cal-wday .cal-chip { white-space: normal; padding: 4px 6px; }
.cal-empty { color: #b7c0cb; text-align: center; padding-top: 10px; }
.cal-year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 22px; }
.cal-mini-title { display: block; font-weight: 700; color: #0b3c6e; margin-bottom: 4px; text-decoration: none; }
.cal-mini .cal-dow { font-size: 10.5px; padding: 3px 0; }
.cal-mini .cal-day { min-height: 0; aspect-ratio: 1; display: grid; place-items: center; font-size: 11.5px; position: relative; padding: 0; color: #1f2933; text-decoration: none; }
.cal-mini .cal-day.cal-has { font-weight: 700; color: #0b3c6e; box-shadow: inset 0 0 0 2px #7fb5e6; }
.cal-mini .cal-day.cal-today { box-shadow: inset 0 0 0 2px #1a7fd4; }
.cal-mini .cal-day i { position: absolute; top: 1px; right: 2px; font-style: normal; font-size: 8.5px; color: #1a7fd4; }
.cal-h3 { margin: 22px 0 8px; font-size: 15px; }
.cal-hol-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 18px; font-size: 13.5px; }
.cal-hol-list > div { padding: 3px 8px; border-radius: 3px; }
.cal-hol-list .cal-federal { background: #fde8e8; } .cal-hol-list .cal-closure { background: #fef0de; } .cal-hol-list .cal-observance { background: #f3eefc; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, #1a7fd4); vertical-align: middle; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12.5px; color: var(--muted, #5f6b7a); }
.cal-key { display: inline-block; width: 14px; height: 10px; vertical-align: middle; border: 1px solid #d4dae2; }
.cal-key.cal-federal { background: #fde8e8; } .cal-key.cal-closure { background: #fef0de; } .cal-key.cal-observance { background: #f3eefc; }
@media (max-width: 900px) { .cal-year { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cal-week { grid-template-columns: 1fr; } .cal-wday { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line, #dfe5ec); } .cal-day { min-height: 70px; } .cal-chip .cal-n { display: none; } }
@media print { .cal-day { min-height: 90px; } .cal-chip { font-size: 9.5px; } body.landscape { } }
/* month chips: up to two lines so titles are readable */
.cal-month .cal-chip { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Name tag / tent card options (roster) */
.tag-opts { margin: -4px 0 14px; }
.tag-opts-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 8px; }
.tag-opts-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; }
.tag-opts-row select, .tag-opts-row input[type=number] { width: auto; }

/* Kiosk: choose phone number or Employee ID */
.kiosk-toggle { display: flex; gap: 0; margin: 4px 0 12px; border: 1px solid #c4ccd6; border-radius: 10px; overflow: hidden; }
.kiosk-toggle button { flex: 1; font-size: 17px; padding: 12px 8px; border: 0; background: #f6f8fb; color: #334155; cursor: pointer; font-weight: 600; }
.kiosk-toggle button + button { border-left: 1px solid #c4ccd6; }
.kiosk-toggle button.on { background: var(--navy); color: #fff; }

/* Sign-in page: quote of the week */
.login-quote { margin: 18px 0 14px; padding: 12px 14px; border-left: 4px solid var(--accent); background: rgba(26,127,212,.06); border-radius: 0 6px 6px 0; }
.login-quote blockquote { margin: 0; font-style: italic; font-size: 15px; line-height: 1.5; color: var(--ink); }
.login-quote figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: right; }

/* School/College Attendance Summary chart */
.sc-chart { width: 100%; height: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.sc-chart text { font-family: inherit; }
