/* Cleverbees attendance shell, based on the local KosherPilotBackend portal. */
:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #1f2328;
  background: #f6f7f9;
  --ink: #1f2328;
  --muted: #656e78;
  --line: #e4e7eb;
  --paper: #fff;
  --deep: #151a22;
  --green: #187436;
  --amber: #855e00;
  --red: #bd3221;
  --blue: #1667d9;
  --blue-dark: #1256b8;
  --blue-tint: #e8f1fd;
  --side-text: #aeb7c2;
  --side-line: #232a35;
}

body { background: #f6f7f9; color: var(--ink); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* The same simple rail/content proportions as the Kosher Pilot PHP portal. */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 236px; min-width: 236px; min-height: 100vh; height: 100vh; position: sticky; top: 0; overflow-y: auto; padding: 0; background: #151a22; color: var(--side-text); }
.brand { gap: 11px; min-height: 76px; margin: 0; padding: 16px 18px; border-bottom: 1px solid var(--side-line); color: #fff; font: 700 15px/1.25 "Space Grotesk", Inter, "Segoe UI", sans-serif; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-symbol { width: 34px; height: 34px; flex: none; border: 1px solid #51627c; border-radius: 8px; background: #263349; color: #aaccff; font: 700 18px/1 "Space Grotesk", Inter, sans-serif; }
.brand small { margin-top: 3px; color: #858f9e; font: 500 11px/1.2 Inter, "Segoe UI", sans-serif; letter-spacing: 0; text-transform: none; }
.main-nav { display: flex; flex-direction: column; gap: 2px; padding: 15px 12px; }
.nav-item { justify-content: flex-start; align-items: center; width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--side-text); font-size: 13.5px; font-weight: 500; line-height: 1.3; text-decoration: none; transition: background-color .14s, color .14s; }
.nav-item:hover { background: #1e2530; color: #fff; text-decoration: none; }
.nav-item.active { background: #263349; color: #fff; font-weight: 600; }
.nav-arrow { display: none; }
.sidebar-bottom { padding: 14px 18px; border-top: 1px solid var(--side-line); gap: 4px; font-size: 12px; color: #e6eaef; }
.sidebar-bottom #identity { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sidebar-bottom a { color: #858f9e; font-size: 12px; }
.sidebar-bottom a:hover { color: #fff; }
.main { flex: 1; min-width: 0; }
.topbar { height: 54px; padding: 0 32px; background: #fff; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 500; }
.topbar-right { color: #8a929b; font-size: 12px; }
.content { max-width: none; padding: 28px 32px 70px; }

/* Portal typography, sheets, and controls. */
.page-heading { margin-bottom: 22px; }
.page-heading h1 { font: 700 26px/1.25 "Space Grotesk", Inter, "Segoe UI", sans-serif; letter-spacing: -.02em; }
.eyebrow { color: #77818d; font-size: 10px; font-weight: 600; letter-spacing: .07em; }
.session-heading h2, .section-heading h3, .whole-heading h2, .report-card h2, .whole-auth h2 { font-family: "Space Grotesk", Inter, "Segoe UI", sans-serif; letter-spacing: -.01em; color: var(--ink); font-weight: 700; }
.session-heading h2, .whole-heading h2 { font-size: 21px; }
.section-heading h3 { font-size: 17px; }
.report-card h2 { font-size: 22px; }
.whole-auth h2 { font-size: 18px; }
.muted { color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; text-decoration: none; }
.button:hover { text-decoration: none; }
.button.primary { background: var(--blue); border-color: var(--blue-dark); color: #fff; box-shadow: 0 1px 2px #1256b840; }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary, .button.quiet { background: #fff; border-color: #d5dae0; color: var(--ink); box-shadow: 0 1px 2px #17202e0d; }
.button.secondary:hover, .button.quiet:hover { background: #f0f2f5; }
.session-bar, .whole-controls, .whole-auth, .report-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px #17202e0a, 0 10px 28px #17202e12; }
.session-bar { margin-bottom: 24px; padding: 20px 22px; }
.whole-controls { padding: 20px 22px; }
.whole-auth { max-width: 470px; padding: 24px; }
.whole-auth p { margin-bottom: 19px; }
.session-bar label, .whole-selects label, .report-student-label { color: #4e5864; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.session-bar select, .session-bar input, .whole-selects select, .whole-selects input, .report-student-label select, .whole-toolbar input, .search-label input, .picker-search, .detail-fields input[type=number], .detail-fields textarea { background: #fff; border: 1px solid #d5dae0; border-radius: 9px; color: var(--ink); font-weight: 400; }
.session-bar select, .session-bar input, .whole-selects select, .whole-selects input, .report-student-label select { min-height: 38px; }
.session-bar :is(select, input):focus, .whole-selects :is(select, input):focus, .report-student-label select:focus { border-color: var(--blue); }

/* A compact summary row keeps the roster and map as the focus. */
.stat-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 0; padding: 0; margin: 0 0 24px; }
.stat-card { display: inline-flex; flex: none; flex-direction: row; align-items: baseline; gap: 5px; width: auto; min-height: 0; margin: 0; padding: 0 13px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--muted); }
.stat-card + .stat-card::before { content: "·"; color: #b1b8c0; margin-right: 8px; }
.stat-card span { font-size: 13px; font-weight: 400; }
.stat-card strong { margin: 0; color: var(--ink); font: 700 13px/1.5 Inter, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
.stat-card small { display: none; }
button.stat-card:hover { color: var(--blue); border: 0; box-shadow: none; text-decoration: underline; }
.stat-card:nth-child(2) strong { color: var(--amber); }
.stat-card:nth-child(3) strong { color: var(--red); }
.stat-card.marked strong { color: var(--green); }
.stat-card[aria-pressed=true] { color: var(--blue); text-decoration: underline; }

.view-switch { background: #edf0f3; border-radius: 9px; }
.view-switch button, .filter-row button { color: #596575; font-weight: 600; }
.view-switch button[aria-pressed=true], .filter-row button[aria-pressed=true] { color: #0f4fa8; }
.whole-group-head button, .whole-clear-filter, .whole-detail-link, .whole-clear, .detail summary, .dialog-secondary button { color: var(--blue); }
.whole-group { background: #f6f7f9; border-color: #e4e7eb; color: #4e5864; }
.whole-group:has(input:checked) { background: var(--blue-tint); border-color: #bbd4f5; color: #0f4fa8; }
.whole-group input { accent-color: var(--blue); }
.whole-groups { border-color: var(--line); }
.whole-person, .student, .period-card, .map-workspace { background: #fff; border-color: var(--line); border-radius: 10px; }
.whole-person:hover, .student:hover, .period-card:hover { border-color: #bfd4ee; }
.period-card b, .map-topline b { font-family: "Space Grotesk", Inter, "Segoe UI", sans-serif; font-size: 16px; font-weight: 700; }
.period-card span { color: var(--muted); }
.attention-person { border-color: var(--line); }
.attention-person:hover { border-color: #a6c5eb; }
.whole-person.dirty, .student.dirty { border-color: #d9bb73; background: #fffcf4; }
.mark { background: #f8f9fb; border-color: #d5dae0; color: #495665; }
.mark.present[aria-pressed=true] { background: var(--green); border-color: var(--green); }
.mark.late[aria-pressed=true] { background: var(--amber); border-color: var(--amber); }
.mark.absent[aria-pressed=true] { background: var(--red); border-color: var(--red); }
.report-card { padding: 24px; }
.range-grid button { min-height: 64px; background: #f8f9fb; border: 1px solid var(--line); border-radius: 10px; color: #0f4fa8; font: 600 14px/1.3 Inter, "Segoe UI", sans-serif; }
.range-grid button:hover { background: var(--blue-tint); border-color: #bbd4f5; }
.report-card p:not(.eyebrow) { color: var(--muted); }
.save-bar { background: #fff; border-color: #c9d6e7; box-shadow: 0 8px 30px #17202e1f; color: var(--ink); }
.error { background: #fbe9e6; border-color: #e8c0b9; color: var(--red); }

/* Keep the floor plan precise and readable within the portal shell. */
.map-topline, .chart-bar { border-color: var(--line); }
.map-scroll { background: #eef1f5; }
.zal-room { background: #fff; box-shadow: 0 2px 16px #17202e16; }
.room-walls path { stroke: #8794a3; }
.room-label { color: #8995a3; }
.zal-table { border-color: #8794a3; background: #fff; }
.zal-seat { border-color: #c4cbd3; color: #465362; }
.zal-seat:hover { background: var(--blue-tint); }
.zal-seat .seat-num { color: #909ba7; }
.zal-seat.reference { background: #f6f7f9; color: #9aa4af; }
.zal-seat.present { background: #ddf2e4; color: #187436; }
.zal-seat.late { background: #faf0cf; color: #855e00; }
.zal-seat.absent { background: #fbe9e6; color: #bd3221; }
.zal-seat.unmarked { background: #fff; color: #465362; }
.zal-seat.search-match { outline-color: var(--blue); }
.zal-staff, .zal-bima, .zal-fixture { background: #edf1f6; border-color: #9ca7b4; color: #596777; font-family: Inter, "Segoe UI", sans-serif; }
.zal-bima { background: #e5eaf1; }
.zal-fixture { background: #f0f3f7; }
.map-help { background: var(--blue-tint); color: #0f4fa8; }
.zoom-button { color: #4e5864; border-color: #d5dae0; }
.outside-list button { background: var(--blue-tint); border-color: #c8dcf5; color: #0f4fa8; }

.dialog-backdrop { background: #101827bd; }
.seat-dialog { border-radius: 14px; box-shadow: 0 20px 60px #10182742; }
.dialog-head h2 { font: 700 21px/1.3 "Space Grotesk", Inter, "Segoe UI", sans-serif; }
.icon-button { background: #edf0f3; color: #4e5864; }
.dialog-actions button, .picker-list button { background: #f8f9fb; color: #3d4a58; }
.dialog-actions button:hover, .picker-list button:hover { background: var(--blue-tint); }

@media (max-width: 920px) {
  .app-shell { flex-direction: column; }
  .sidebar { position: static; width: 100%; min-width: 0; min-height: 0; height: auto; overflow: visible; }
  .brand { min-height: 0; padding: 12px 16px 8px; border-bottom: 0; font-size: 14px; }
  .brand-symbol { width: 29px; height: 29px; font-size: 15px; }
  .main-nav { flex-direction: row; gap: 3px; overflow-x: auto; padding: 0 10px 10px; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-item { width: auto; flex: none; min-height: 34px; padding: 7px 10px; white-space: nowrap; font-size: 12px; }
  .sidebar-bottom { display: none; }
  .topbar { height: 44px; padding: 0 18px; }
  .topbar-right { display: block; }
  .content { padding: 20px 18px 56px; }
}
@media (max-width: 700px) {
  .app-shell { display: flex; }
  .sidebar { z-index: auto; bottom: auto; left: auto; right: auto; padding: 0; }
  .brand { display: flex; }
  .main-nav { display: flex; height: auto; }
  .nav-item { justify-content: center; }
  .topbar-right { font-size: 12px; }
  .content { padding: 18px 14px 48px; }
  .page-heading h1 { font-size: 23px; }
  .session-bar, .whole-controls { padding: 16px; }
  .stat-grid { gap: 3px 0; margin-bottom: 20px; }
  .stat-card { padding-right: 8px; }
  .stat-card + .stat-card::before { margin-right: 4px; }
  .stat-card span, .stat-card strong { font-size: 12px; }
  .map-scroll { max-height: 65vh; }
  .save-bar { bottom: 10px; }
}

/* Phone tab bar: one row however many sections a page lists. */
@media (max-width: 700px) { .main-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow-x: auto; } .nav-item { font-size: 11px; } }

/* Grouped sidebar: section labels and a divider before Lights Out and Settings. */
.nav-section { margin: 14px 10px 4px; color: #6f7a88; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-divider { display: block; height: 1px; margin: 12px 4px; background: var(--side-line); }
.sidebar-bottom #identity { color: #aeb7c2; }
@media (max-width: 920px) { .nav-section, .nav-divider { display: none; } }
@media (min-width: 921px) { .main-nav { padding-top: 10px; } .main-nav .nav-item { min-height: 34px; padding: 6px 10px; } .nav-section { margin-top: 10px; } .nav-divider { margin: 8px 4px; } }
.nav-item[hidden] { display: none; }

/* Sidebar icons. */
.nav-item { display: flex; gap: 10px; }
.nav-icon { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav-item.active .nav-icon { opacity: 1; }
@media (max-width: 920px) { .nav-item { gap: 6px; } .nav-icon { width: 15px; height: 15px; } }

/* Colored sidebar icons. */
.nav-icon { stroke: var(--icon, currentColor); opacity: 1; }
.nav-item:not(.active) .nav-icon { opacity: .9; }
