/* Portal shell, on top of Extended Day's stylesheet (css/ed.css, unchanged so its pages look exactly as before). */

/* ---- the coloured top bar: one colour per view (Extended Day's sign-in page backgrounds) */
.pbar { display: flex; align-items: center; gap: 1.25rem; padding: .7rem 2rem; color: #fff; position: sticky; top: 0; z-index: 20;
        background: #0f172a; }
.pbar-parent { background: linear-gradient(100deg, #312e81, #0f172a 70%); }
.pbar-staff  { background: linear-gradient(100deg, #166534, #052e16 70%); }
.pbar-admin  { background: linear-gradient(100deg, #a16207, #111111 70%); }
.pbar-student { background: linear-gradient(100deg, #0e7490, #082f49 70%); }   /* not from Extended Day: students never had a sign-in there */
.pbar .brand { color: #fff; font-weight: 750; display: flex; align-items: center; gap: .6rem; white-space: nowrap; }
.pbar .brand:hover { text-decoration: none; }
.pbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.pbar .btn-ghost { background: transparent; color: #e2e8f0; border-color: rgba(255,255,255,.25); }
.pbar .btn-ghost:hover { background: rgba(255,255,255,.1); }

/* which view: a label that is always there, plus a switch when there is more than one */
.view-picker { position: relative; display: flex; align-items: center; gap: .6rem; }
.view-label { font: inherit; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff;
              padding: .3rem .7rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.14); }
.view-label:disabled { cursor: default; opacity: 1; }
.view-label .caret { display: none; }
.view-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.28); }
.view-switch button { font: inherit; font-size: .85rem; font-weight: 650; color: #e2e8f0; background: transparent; border: 0;
                      padding: .3rem .85rem; border-radius: 999px; cursor: pointer; }
.view-switch button:hover { color: #fff; background: rgba(255,255,255,.1); }
.view-switch button.active { background: #fff; color: #0f172a; }
.view-menu { position: absolute; top: calc(100% + .5rem); left: 0; min-width: 190px; background: #fff; color: var(--ink);
             border-radius: 12px; box-shadow: var(--shadow), 0 12px 32px rgba(15,23,42,.25); padding: .35rem; z-index: 30; }
.view-menu button { display: flex; align-items: center; gap: .55rem; width: 100%; font: inherit; font-weight: 600; text-align: left;
                    padding: .65rem .75rem; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.view-menu button:hover { background: var(--bg); }
.dot-view { width: 12px; height: 12px; border-radius: 50%; }
.dot-parent { background: #312e81; } .dot-staff { background: #166534; } .dot-admin { background: #a16207; } .dot-student { background: #0e7490; }

/* ---- section tabs (Extended Day | Lunch | Attendance | Classroom), underlined in the view's colour */
.sections { --accent: #4f46e5; display: flex; gap: .25rem; padding: 0 2rem; background: #fff; border-bottom: 1px solid var(--line);
            overflow-x: auto; scrollbar-width: none; }
.sections::-webkit-scrollbar { display: none; }
.sections-staff { --accent: #16a34a; }
.sections-admin { --accent: #ca8a04; }
.sections-student { --accent: #0891b2; }
.sections a { padding: .85rem 1rem .7rem; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.sections a:hover { color: var(--ink); text-decoration: none; }
.sections a.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ---- the section's own tabs (Extended Day's admin pages): smaller, second row */
.subtabs { display: flex; gap: .15rem; padding: .45rem 2rem; background: var(--bg); border-bottom: 1px solid var(--line);
           overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { padding: .35rem .75rem; border-radius: 8px; font-size: .9rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.subtabs a:hover { background: var(--line); text-decoration: none; }
.subtabs a.active { background: var(--ink); color: #fff; }

.coming-soon { max-width: 640px; margin: 2rem auto; text-align: center; }
.login-alt { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* ---- which install is this? (bottom-right on every page) */
.version-badge { position: fixed; right: 8px; bottom: 8px; font: 11px/1 ui-monospace, monospace; padding: 4px 7px; border-radius: 4px;
                 background: rgba(15,23,42,.06); color: var(--muted); pointer-events: none; z-index: 5; }
.version-badge.is-dev { background: #fef3c7; color: #b45309; border: 1px solid #d97706; font-weight: 700; }
/* Dev banner stays on screen when scrolling (owner, 2026-11-09): pinned above the (also pinned) top bar. One line, fixed
   height, so the top bar knows where to sit; on a narrow screen the text is cut with "…". */
.dev-strip { background: repeating-linear-gradient(-45deg, #dc2626 0 18px, #b91c1c 18px 36px); color: #fff; padding: 0 16px;
  font-size: .9rem; text-align: center; letter-spacing: .02em; border-bottom: 3px solid #fde047;
  position: sticky; top: 0; z-index: 30; height: 38px; line-height: 35px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.dev-site .pbar { top: 38px; }
.dev-strip b { font-weight: 900; margin-right: .5rem; }
.dev-strip a { color: #fde047; font-weight: 800; }
.dev-pill { background: #dc2626; color: #fff; font-weight: 900; font-size: .8rem; letter-spacing: .08em; padding: 3px 9px;
  border-radius: 6px; border: 2px solid #fde047; margin-left: .25rem; }
/* Dev: a red frame round every page, so even a cropped screenshot shows it. */
body.dev-site { box-shadow: inset 0 0 0 5px #dc2626; min-height: 100vh; }
.update-banner { display: flex; align-items: center; justify-content: center; gap: .75rem; background: #dbeafe; color: #1e3a8a;
                 padding: .5rem 1rem; font-size: .9rem; border-bottom: 1px solid #93c5fd; }

@media (max-width: 900px) {
  .pbar { padding: .6rem 1rem; gap: .75rem; }
  .sections, .subtabs { padding-left: .75rem; padding-right: .75rem; }
}
@media (max-width: 700px) {
  .pbar .brand-name, .pbar .topbar-user, .pbar a.btn { display: none; }
  .view-switch { display: none; }                    /* phones: the label itself opens the view menu */
  .view-label .caret { display: inline; }
  .view-label:not(:disabled) { cursor: pointer; }
  .sections a { padding: .75rem .8rem .6rem; }
}
@media print { .pbar, .sections, .subtabs, .dev-strip, .version-badge { display: none !important; } }

/* ---- Lunch */
.text-green { color: var(--green); } .text-amber { color: var(--amber); }
tr.voided td, .list-row.voided { text-decoration: line-through; opacity: .55; }
.scan-hint { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
/* A small ID card beside "Scan an ID card" (tills, station lock). Drawn small rather than scaled: ed.css's float animation
   sets transform, which cancelled a scale() and left the full-size card hanging over the text and the name box. */
.scan-hint { min-height: 52px; }
.scan-hint .card-icon { flex: none; width: 58px; height: 38px; padding: 6px 7px; border-radius: 7px; margin: 4px 4px 4px 2px;
                        box-shadow: 0 3px 10px rgba(15, 23, 42, .18); animation: card-bob 3s ease-in-out infinite; }
.scan-hint .card-chip { width: 12px; height: 9px; border-radius: 2px; }
.scan-hint .card-lines span { height: 3px; border-radius: 2px; margin-top: 5px; }
.scan-hint .card-lines span + span { margin-top: 3px; }
.scan-hint b { font-size: 1.05rem; }
@keyframes card-bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-3px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .scan-hint .card-icon { animation: none; transform: rotate(-6deg); } }
.lunch-search { width: 100%; max-width: none; font-size: 1.15rem; padding: .8rem 1rem; }
.lunch-pick { display: flex; align-items: center; gap: .6rem; width: 100%; font: inherit; text-align: left; padding: .9rem 1rem; margin-top: .5rem;
              border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.lunch-pick:hover { border-color: var(--primary); }
.lunch-who { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; flex-wrap: wrap; }
.lunch-avail { text-align: right; padding: .5rem .9rem; border-radius: 12px; }
.lunch-avail b { display: block; font-size: 1.7rem; }
.lunch-avail small { display: block; color: var(--muted); }
.lunch-avail.ok { background: var(--green-l); } .lunch-avail.ok b { color: var(--green); }
.lunch-avail.none { background: var(--red-l); } .lunch-avail.none b { color: var(--red); }
.lunch-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; }
.lunch-item { position: relative; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.lunch-item.on { border-color: var(--primary); background: var(--primary-l); }
.lunch-item-main { display: flex; flex-direction: column; gap: .2rem; width: 100%; min-height: 84px; padding: .9rem; font: inherit; text-align: left;
                   border: 0; background: transparent; cursor: pointer; }
.lunch-item-main span { color: var(--muted); }
/* Picked: the right quarter of the tile becomes a column — top half the count, bottom half the minus (owner, 2026-11-11), built
   into the tile in its own colours; the tile stays the same size (the name wraps in the left three quarters). */
.lunch-item { overflow: hidden; }
.lunch-item.on .lunch-item-main { padding-right: calc(25% + .6rem); }
.lunch-qty { position: absolute; top: 0; right: 0; bottom: 0; width: 25%; display: flex; flex-direction: column; }
.lunch-qty b, .lunch-qty button { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff;
                                  font-weight: 800; line-height: 1; }
.lunch-qty b { order: 1; font-size: 1.5rem; }
.lunch-qty button { order: 2; padding: 0; border: 0; border-top: 2px solid rgba(255, 255, 255, .7); font-size: 2rem; cursor: pointer;
                    touch-action: manipulation; }
.lunch-qty button:active { filter: brightness(.8); }
.lunch-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.lunch-total { font-size: 1.1rem; }
.lunch-balance b { display: block; font-size: 2.2rem; margin: .1rem 0; }
.lunch-amounts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.lunch-amounts input { max-width: 9rem; }
.lunch-menu-row { align-items: flex-end; } .lunch-menu-row .field { margin-bottom: .5rem; }
.inactive { opacity: .6; }

/* ---- Classroom */
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }
.cr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.cr-card { display: block; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); color: var(--ink); }
.cr-card:hover { text-decoration: none; transform: translateY(-1px); }
.cr-card-top { background: linear-gradient(120deg, #1e3a8a, #4f46e5); color: #fff; padding: 1rem 1.1rem 1.4rem; min-height: 84px; }
.cr-card-top b { display: block; font-size: 1.15rem; } .cr-card-top span { opacity: .85; font-size: .9rem; }
.cr-card-body { padding: .8rem 1.1rem; }
.cr-banner { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; padding: 1.4rem 1.5rem; margin-bottom: 1rem;
             border-radius: 16px; color: #fff; background: linear-gradient(120deg, #1e3a8a, #4f46e5); }
.cr-banner h1 { color: #fff; margin: 0 0 .2rem; } .cr-banner span { opacity: .9; }
.cr-banner-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-light { background: #fff; color: #1e3a8a; border-color: #fff; }
.cr-tabs { margin-bottom: 1rem; }
.cr-share, .cr-textarea { width: 100%; min-height: 90px; font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.cr-share-foot { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.cr-post-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.cr-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: .4rem 0; }
.cr-answer { white-space: pre-wrap; overflow-wrap: anywhere; padding: .7rem .8rem; background: var(--bg); border-radius: 10px; margin-bottom: .6rem; }
.cr-notice { padding: .75rem 1rem; }
.cr-notice-link, .cr-work-row, .cr-due-row { display: flex; align-items: center; gap: .7rem; color: var(--ink); flex-wrap: wrap; }
.cr-notice-link:hover, .cr-work-row:hover, .cr-due-row:hover { text-decoration: none; }
.cr-work-row { padding: .8rem 1rem; background: #fff; border-radius: 12px; margin-bottom: .45rem; box-shadow: var(--shadow); }
.panel-flush .cr-work-row { box-shadow: none; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; }
.cr-work-title { display: flex; flex-direction: column; min-width: 0; }
.cr-due-row { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.cr-due-row b { flex: 1 1 auto; }
.cr-kind { width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary-l); display: grid; place-items: center; flex: none; }
.cr-topic { margin: 1.5rem 0 .6rem; padding-bottom: .3rem; border-bottom: 2px solid var(--primary); font-size: 1.15rem; }
.cr-atts { display: flex; flex-direction: column; gap: .35rem; margin: .6rem 0; }
.cr-att { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; flex-wrap: wrap; }
.cr-att a { overflow-wrap: anywhere; }
.cr-add { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.cr-add input[type=text], .cr-add input:not([type]) { max-width: 16rem; }
.cr-comments { margin-top: .7rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.cr-comment { padding: .35rem 0; } .cr-comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.cr-comment-form { display: flex; gap: .4rem; margin-top: .4rem; } .cr-comment-form input { flex: 1; }
.cr-post-title { display: flex; gap: .8rem; align-items: flex-start; } .cr-post-title h1 { margin: 0 0 .2rem; }
.cr-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin: .8rem 0; padding: .6rem .8rem; background: var(--bg); border-radius: 10px; font-weight: 600; }
.cr-post-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.cr-mywork-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.cr-mywork-head h2 { margin: 0; }
.cr-grade { font-size: 1.6rem; margin: .5rem 0; }
.cr-grade-input { width: 5rem; }
.cr-sw-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.cr-sw-head h2 { margin: 0; }
.cr-gradebook { overflow-x: auto; }
.cr-gradebook .table { min-width: max-content; }
.cr-gb-col { min-width: 7.5rem; max-width: 10rem; white-space: normal; font-weight: 600; }
.cr-gb-cell { text-align: center; }
.cr-gb-cell.cr-missing { background: var(--red-l); }
.cr-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; }
.cr-week-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cr-day { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: .6rem; min-height: 140px; }
.cr-day.today { outline: 2px solid var(--primary); }
.cr-day-head { margin-bottom: .4rem; }
.cr-day-item { display: flex; flex-direction: column; padding: .45rem .55rem; border-radius: 8px; margin-bottom: .35rem; background: var(--blue-l); color: var(--ink); font-size: .88rem; }
.cr-day-item:hover { text-decoration: none; filter: brightness(.97); }
.cr-day-item.cr-missing { background: var(--red-l); } .cr-day-item.cr-turned_in, .cr-day-item.cr-returned { background: var(--green-l); }
.cr-child h2 { margin-top: 0; }
@media (max-width: 900px) {
  .cr-post-grid { grid-template-columns: 1fr; }
  .cr-week, .cr-week-7 { grid-template-columns: 1fr; }
  .cr-day { min-height: 0; }
}
/* Classroom quizzes */
.cr-qb-q { border: 1px solid var(--line); border-radius: 12px; padding: .8rem; margin-bottom: .8rem; background: #fff; }
.cr-qb-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.cr-qb-prompt { min-height: 60px; }
.cr-qb-choice { display: flex; align-items: center; gap: .5rem; margin: .3rem 0; }
.cr-qb-choice input:not([type]) { flex: 1; }
.cr-quiz-q { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.cr-quiz-prompt { margin-bottom: .5rem; white-space: pre-wrap; }
.cr-quiz-choice { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border-radius: 8px; cursor: pointer; }
.cr-quiz-choice:hover { background: var(--bg); }
.cr-qr { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .8rem; }
.cr-qr-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.cr-qr-q { padding: .55rem .6rem; border-left: 4px solid var(--line); margin: .4rem 0; background: var(--bg); border-radius: 6px; }
.cr-qr-q.cr-right { border-left-color: var(--green); } .cr-qr-q.cr-part { border-left-color: var(--amber); } .cr-qr-q.cr-wrong { border-left-color: var(--red); }
.cr-qr-a { white-space: pre-wrap; overflow-wrap: anywhere; }
/* ed.css makes every input full width: radios/checkboxes in quizzes stay their own size, beside their text */
.cr-qb-choice input[type=radio], .cr-qb-choice input[type=checkbox],
.cr-quiz-choice input[type=radio], .cr-quiz-choice input[type=checkbox] { width: auto; flex: none; margin: 0; }
.cr-qb-choice input:not([type]) { flex: 1 1 auto; width: auto; min-width: 0; }
.cr-quiz-choice { justify-content: flex-start; }
.cr-child-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cr-child-head h2 { margin: 0 0 .5rem; }

/* People (Admin view): role chips in the view colours, and the Access ticks */
.role-chip { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; margin: 0 .25rem .2rem 0; color: #fff; }
.role-admin { background: #a16207; } .role-staff, .role-teacher { background: #166534; } .role-parent { background: #312e81; } .role-student { background: #0e7490; }
.role-pick { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.panel > h2 + .role-pick { border-top: 0; }
.role-pick input { width: auto; margin-top: .2rem; flex: none; }
.role-pick > span { display: block; }
.role-pick b { display: block; }
.role-fixed { cursor: default; }
.role-fixed-mark { width: 1rem; text-align: center; flex: none; font-weight: 700; }
.role-pick .dot-view { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .2rem; vertical-align: middle; }
.off-tag { display: inline-block; margin-left: .35rem; padding: 0 .35rem; border-radius: 4px; font-size: .65rem; font-weight: 700;
           text-transform: uppercase; letter-spacing: .04em; background: #e5e7eb; color: #4b5563; vertical-align: middle; }
/* Student ledger (Extended Day) */
.row-muted td { color: var(--muted, #6b7280); }
.field-inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.field-inline span { margin: 0; }
.ledger-range { display: flex; gap: 1rem; flex-wrap: wrap; }
/* Sign-ups: the teacher's shift bar — impossible to miss when they're not on shift (owner, 2026-11-06) */
.shift-bar.shift-off { background: #fffbeb; border: 2px solid #f59e0b; }
.shift-bar.shift-off .shift-title { color: #92400e; font-size: 1.2rem; }
.shift-bar.shift-off .dot { width: 14px; height: 14px; background: #f59e0b; }
.shift-bar.shift-on { background: #f0fdf4; border: 2px solid #86efac; }
.shift-bar.shift-on .shift-title { color: #166534; font-size: 1.05rem; }
.btn-shift-start { background: #16a34a; border-color: #16a34a; color: #fff; font-weight: 700; font-size: 1.1rem; padding: .8rem 1.6rem;
                   box-shadow: 0 4px 14px rgba(22, 163, 74, .35); }
.btn-shift-start:hover { background: #15803d; border-color: #15803d; color: #fff; }
/* Ship to live (dev Settings) */
.ship-panel { border: 2px solid #a16207; }
.ship-bar { height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin: .5rem 0 1rem; }
.ship-bar > div { height: 100%; background: #16a34a; transition: width .6s; }
.ship-log, .ship-notes { max-height: 260px; overflow: auto; background: #0f172a; color: #e2e8f0; padding: .75rem; border-radius: 8px;
                         font-size: .75rem; white-space: pre-wrap; }
.ship-notes { background: #f8fafc; color: inherit; border: 1px solid var(--line); }
.ship-confirm { margin-top: 1rem; }
.import-panel { border: 2px solid #0e7490; }
.lunch-shops > span:last-child { display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.lunch-shops .check { margin: 0; white-space: nowrap; }
.lunch-menu-row + .lunch-menu-row { border-top: 1px solid var(--line); padding-top: .75rem; }
/* Food & Store station tablets (#!/station) */
.station-page { max-width: 1200px; }
.station-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: #0e7490; color: #fff; padding: .75rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-size: 1.1rem; }
.station-bar .muted { color: #cffafe; }
.station-bar .btn { background: #fff; color: #0e7490; margin-left: .75rem; }
.station-lock, .station-off { text-align: center; padding: 2rem 1rem; }
.station-lock .scan-hint { justify-content: center; }
.station-helpers { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1rem; }
.pin-pad h2 { margin-bottom: 1rem; }
.pin-dots { display: flex; gap: .75rem; justify-content: center; margin-bottom: 1.25rem; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #0e7490; }
.pin-dots span.on { background: #0e7490; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 84px); gap: .75rem; justify-content: center; }
.pin-keys button { height: 72px; font-size: 1.6rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.pin-keys button.pin-cancel { font-size: 1rem; color: var(--muted, #64748b); }
.helper-shops { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .35rem 0 .75rem; }
.helper-shops .check { margin: 0; }
.pin-show { font-size: 1.4rem; letter-spacing: .2em; }
.station-row + .station-row { border-top: 1px solid var(--line); padding-top: .75rem; }
.lunch-cash-btn { margin-top: 1rem; width: 100%; }
.lunch-cash { margin-top: 1rem; }
.lunch-change { font-size: 1.15rem; padding-bottom: .5rem; }
.lunch-addfunds { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.lunch-addfunds input { max-width: 7rem; }
.lunch-rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.lunch-rule-row .check { margin: 0; }
.lunch-rule-name { min-width: 6rem; }
.lunch-rule-limit { display: flex; align-items: center; gap: .35rem; }
.lunch-rule-limit input { width: 6rem; }
.drawer-close { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.drawer-close h3 { margin-top: 0; }
.drawer-off td { background: #fef3c7; }
.helper-balances { margin-left: auto; flex: none; }
.lunch-alert h3 { margin-top: 0; }
.lunch-alert-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1.25rem; margin-bottom: .4rem; }
.lunch-alert-form .field { margin: 0; }
.lunch-alert-form .switch { padding-bottom: .55rem; }
.switch.is-off { opacity: .45; cursor: default; }
.lunch-parent { max-width: 1250px; }
.preorder-offer { display: flex; flex-direction: column; gap: .35rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px;
                  max-height: 14rem; overflow-y: auto; }
.preorder-offer .check { margin: 0; }
tr.drawer-todo td { background: #fffbeb; }
.rev-off b { color: var(--red); }
.rev-ok b { color: var(--green); }
.rev-left { display: flex; justify-content: space-between; align-items: center; background: var(--sec-l, var(--bg)); border-radius: 12px; padding: .7rem .9rem; margin: .5rem 0; }
.rev-left b { font-size: 1.4rem; }
.drawer-left { display: block; font-size: 1.25rem; padding-top: .45rem; }
.menu-toolbar { justify-content: space-between; }
/* fieldset only groups an item's inputs (so an archived item's are disabled together); it adds no box */
.lunch-menu-fields { display: contents; border: 0; margin: 0; padding: 0; min-width: 0; }
.lunch-menu-row.archived .lunch-menu-fields > *, .lunch-menu-row.archived > .tag, .lunch-menu-row.archived > .muted { opacity: .55; }
.lunch-menu-row.archived input { background: var(--bg); }
.preorder-offer-field { flex-basis: 100%; }
.lunch-parent-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .lunch-parent-cols { display: block; } }
.switch input:disabled { cursor: default; }
.lunch-balance ~ lunch-alert > .lunch-alert { margin: 1rem 0 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
/* An on/off switch: <label class="switch">Text <input type="checkbox" role="switch"></label> — text first, switch on its right. */
.switch { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.switch input { appearance: none; -webkit-appearance: none; position: relative; flex: none; box-sizing: border-box; width: 2.6rem; height: 1.5rem;
                min-height: 0; margin: 0; padding: 0; border: 0; transform: none;   /* (ed.css scales every checkbox 1.2×) */
                border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: background .15s; }
.switch input::before { content: ''; position: absolute; top: 3px; left: 3px; width: calc(1.5rem - 6px); height: calc(1.5rem - 6px);
                        border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked { background: var(--sec, var(--primary)); }
.switch input:checked::before { transform: translateX(1.1rem); }
.switch input:focus { box-shadow: none; border: 0; }
.switch input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.move-day { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; width: 100%; padding: .5rem 0 .25rem; }
.move-day input { width: auto; }
.row-actions { margin-left: auto; display: flex; gap: .4rem; flex-shrink: 0; }
.row-actions:empty { display: none; }
/* In a row with buttons, the name side gives way (its tags wrap under the name), so the buttons stay on the name's line. */
.list-row:has(> .row-actions) > div:first-child { flex: 1 1 8rem; min-width: 0; }
/* Children's notes to confirm (Sign-ups) */
.alert-ack h2 { margin: .5rem 0 1rem; }
.alert-ack-item { background: #fef3c7; border-left: 4px solid #d97706; border-radius: 8px; padding: .65rem .85rem; margin-bottom: .6rem; text-align: left; }
.alert-ack-item div { color: #78350f; font-weight: 600; }
.alert-ack-check { margin: 1rem 0 .25rem; font-weight: 600; text-align: left; }
.badge-amber { background: #d97706; color: #fff; box-shadow: 0 0 0 10px #fef3c7; }
/* Student helper's sale confirmation (till) */
.sale-confirm h2 { margin-top: 0; }
.sale-confirm .table td { padding: .55rem .5rem; font-size: 1.05rem; }
.sale-qty { width: 3.5rem; font-weight: 700; white-space: nowrap; }
.sale-total td { border-top: 2px solid var(--line); font-size: 1.2rem !important; }
/* Till → Today: fixed columns so amounts and Undo buttons line up even when a row's items wrap */
.recent-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 4.5rem; gap: .25rem .75rem; align-items: center;
  padding: .55rem 0; border-bottom: 1px solid #f1f5f9; }
.recent-row:last-child { border-bottom: 0; }
.recent-row.voided .recent-what, .recent-row.voided .right { text-decoration: line-through; opacity: .6; }
.recent-what { min-width: 0; overflow-wrap: anywhere; }
.recent-act { justify-self: end; }

/* ---- Sections are easy to tell apart (owner, 2026-11-11): each has its own colour and icon on its tab, its tab row
   (tinted, with the section's name and icon first) and a coloured line under the rows. The top bar keeps the VIEW colour. */
.sec-ed { --sec: #7c3aed; --sec-l: #f5f3ff; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 2'/%3E%3C/svg%3E"); }
.sec-lunch { --sec: #ea580c; --sec-l: #fff7ed; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1.2 12.2a1 1 0 0 1-1 .8H7.2a1 1 0 0 1-1-.8z'/%3E%3Cpath d='M9 8V6.5a3 3 0 0 1 6 0V8'/%3E%3C/svg%3E"); }
.sec-attendance { --sec: #0284c7; --sec-l: #f0f9ff; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2'/%3E%3Cpath d='M9 3h6v3H9z'/%3E%3Cpath d='M9 13l2 2 4-4'/%3E%3C/svg%3E"); }
.sec-classroom { --sec: #059669; --sec-l: #ecfdf5; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H20v15H6.5A2.5 2.5 0 0 0 4 20.5z'/%3E%3Cpath d='M4 20.5A2.5 2.5 0 0 0 6.5 23H20v-5'/%3E%3C/svg%3E"); }
.sec-banking { --sec: #be185d; --sec-l: #fdf2f8; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10l9-6 9 6'/%3E%3Cpath d='M5 10v8M9.5 10v8M14.5 10v8M19 10v8'/%3E%3Cpath d='M3 21h18'/%3E%3C/svg%3E"); }
.sec-people { --sec: #475569; --sec-l: #f1f5f9; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E"); }
.sec-settings { --sec: #475569; --sec-l: #f1f5f9; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E"); }
.sec-import { --sec: #475569; --sec-l: #f1f5f9; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E"); }
.sec-dev { --sec: #475569; --sec-l: #f1f5f9; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E"); }

.sec-icon { display: inline-block; width: 1.05em; height: 1.05em; margin-right: .4em; vertical-align: -.15em; background: var(--sec, currentColor);
  -webkit-mask: var(--sec-icon) center / contain no-repeat; mask: var(--sec-icon) center / contain no-repeat; }
.sections a.sec-tab.active { border-bottom-color: var(--sec); color: var(--sec); }
.sections a.sec-tab:hover { color: var(--sec); }
.subtabs { background: var(--sec-l, var(--bg)); border-bottom: 3px solid var(--sec, var(--line)); overflow: visible; flex-wrap: wrap; align-items: center; }
.subtabs a.active, .subtabs .subtab-btn.active { background: var(--sec, var(--ink)); color: #fff; }
.subtab-label { font-weight: 800; color: var(--sec); margin-right: .6rem; white-space: nowrap; font-size: .95rem; }
.subtab-item { position: relative; }
.subtab-btn { padding: .35rem .75rem; border-radius: 8px; font-size: .9rem; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  background: none; border: 0; cursor: pointer; font-family: inherit; }
.subtab-btn:hover, .subtab-btn.open:not(.active) { background: var(--line); }
.subtab-current { font-weight: 700; }
.tab-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 12rem; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(15,23,42,.18); padding: .35rem; display: flex; flex-direction: column; }
.tab-menu a { padding: .55rem .75rem; border-radius: 7px; color: var(--ink); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.tab-menu a:hover { background: var(--sec-l, var(--bg)); text-decoration: none; }
.tab-menu a.active { background: var(--sec, var(--ink)); color: #fff; }
.tab-menu-right { left: auto; right: 0; }
.admin-menu { position: relative; }
.admin-menu .btn.active { background: rgba(255,255,255,.25); }
/* No section-coloured line atop the page, on any page (owner, 2026-11-11): it sat just under the tab row's own coloured
   edge and looked like a collision. The tinted tab row marks the section. */
@media (max-width: 640px) {
  .subtab-label { width: 100%; margin-bottom: .2rem; }
  .tab-menu { position: fixed; left: .75rem; right: .75rem; top: auto; min-width: 0; }
}
/* Phones: the section row fits without scrolling (owner, 2026-11-11) — like an app's tab bar: equal columns, the icon
   above a smaller name. */
@media (max-width: 640px) {
  .sections { padding: 0 .25rem; overflow: visible; }
  .sections a.sec-tab { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .2rem;
    padding: .55rem .15rem .45rem; font-size: .72rem; line-height: 1.15; text-align: center; white-space: normal; }
  .sections a.sec-tab .sec-icon { width: 1.5rem; height: 1.5rem; margin: 0; }
  .sections a.sec-tab .off-tag { margin: 0; font-size: .58rem; }
}

/* Phones: each tab row fits on one line (owner, 2026-11-11): no section name (the section row above shows it), smaller
   tabs, short names (.t-short), and an open menu's page shown on its own. */
.t-short { display: none; }
@media (max-width: 640px) {
  .t-full { display: none; }
  .t-short { display: inline; }
  .subtabs { flex-wrap: nowrap; justify-content: space-between; gap: 0; padding: .35rem .3rem; }
  .subtab-label { display: none; }
  .subtabs a, .subtab-btn { padding: .35rem .45rem; font-size: .8rem; }
}
@media (max-width: 360px) {   /* the smallest phones (iPhone SE): a little tighter still */
  .subtabs a, .subtab-btn { padding: .35rem .32rem; font-size: .76rem; }
}
/* Plain tabs and menu buttons sit on the same line. */
.subtab-item { display: flex; align-items: center; }
.subtabs a, .subtab-btn { display: inline-block; line-height: 1.3; }
/* Pre-orders */
/* A campaign row opens its orders (owner, 2026-11-11: it wasn't obvious it was clickable). */
a.preorder-row { color: inherit; margin: 0 -.75rem; padding-left: .75rem; padding-right: .75rem; border-radius: 10px; text-decoration: none; }
a.preorder-row:hover { background: var(--bg); text-decoration: none; }
a.preorder-row .preorder-title { color: var(--primary); }
a.preorder-row:hover .preorder-title { text-decoration: underline; }
.preorder-row-end { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
a.preorder-row:hover .preorder-go { filter: brightness(1.1); }
.preorder-items { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.preorder-items .field { width: 11rem; }
.print-box { display: none; font-size: 1.2rem; }
@media print { .print-box { display: inline; } .sections, .subtabs, .pbar, .dev-strip { display: none !important; } }
/* Menu: an item not shown on the tills — only its details fade (Save and Remove look and work as normal) */
.lunch-menu-row.not-sold .field input { opacity: .55; }
.preorder-limits { margin: .4rem 0 0; display: flex; gap: .4rem; flex-wrap: wrap; }
.field-md { flex: 0 1 15rem; }
/* <date-pick>: a tap-a-day calendar instead of scrolling date wheels */
.date-pick { position: relative; display: block; }
.date-pick-btn { width: 100%; text-align: left; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; cursor: pointer; white-space: nowrap; }
.date-pick-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 45; width: 17.5rem; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 14px 34px rgba(15,23,42,.2); padding: .6rem; }
.date-pick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.date-pick-head button { border: 0; background: none; font-size: 1.4rem; width: 2.4rem; height: 2.2rem; border-radius: 8px; cursor: pointer; }
.date-pick-head button:hover:not(:disabled) { background: var(--bg); }
.date-pick-head button:disabled { opacity: .25; cursor: default; }
.date-pick-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.date-pick-grid .dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); padding: .2rem 0; }
.date-pick-grid button { height: 2.3rem; border: 0; border-radius: 8px; background: none; font: inherit; font-size: .95rem; cursor: pointer; }
.date-pick-grid button:hover:not(:disabled) { background: var(--bg); }
.date-pick-grid button.other { color: var(--muted); }
.date-pick-grid button.today { font-weight: 800; box-shadow: inset 0 0 0 1px var(--line); }
.date-pick-grid button.sel { background: var(--sec, #4f46e5); color: #fff; }
.date-pick-grid button:disabled { opacity: .25; cursor: default; }
.date-pick-foot { text-align: right; margin-top: .35rem; }
@media (max-width: 640px) { .date-pick-pop { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 20rem; } }
.redate-form { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .3rem; }
.redate-form .date-pick { display: inline-block; min-width: 0; }
.redate-form .date-pick-btn { width: auto; }
/* inside a sideways-scrolling table panel: an absolute pop-up would be clipped, so centre it on screen */
.redate-form .date-pick-pop { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 20rem; }
.redate-form .date-pick-btn { padding: .3rem .55rem; font-size: .85rem; }
.redate-form input[type=time] { width: auto; padding: .3rem .4rem; font-size: .85rem; }

/* ---- Sidebar navigation (owner, 2026-11-11): the default on computers/tablets; "Use tabs" switches a device back. */
.nav-mode-btn { margin-left: auto; align-self: center; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .3rem .6rem;
                font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.nav-mode-btn:hover { background: var(--bg); }
body.nav-side main[ng-view], body.nav-side .update-banner { margin-left: 240px; }
body.nav-side.nav-side-narrow main[ng-view], body.nav-side.nav-side-narrow .update-banner { margin-left: 64px; }
.sidenav { position: fixed; left: 0; top: var(--chrome-top, 100px); bottom: 0; width: 240px; z-index: 15; display: flex; flex-direction: column;
           background: #fff; border-right: 1px solid var(--line); }
body.dev-site .sidenav { left: 6px; bottom: 6px; }   /* inside the dev site's red frame */
.nav-side-narrow .sidenav { width: 64px; }
.sidenav-scroll { flex: 1; overflow-y: auto; padding: .6rem .5rem; }
.sidenav-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .65rem; border-radius: 10px; font-weight: 700; color: var(--ink);
                text-decoration: none; }
.sidenav-head:hover { background: var(--bg); text-decoration: none; }
.sidenav-head .sec-icon { flex: none; width: 20px; height: 20px; background: var(--sec); -webkit-mask: var(--sec-icon) center / contain no-repeat;
                          mask: var(--sec-icon) center / contain no-repeat; }
.sidenav-sec.current > .sidenav-head { background: var(--sec-l); color: var(--sec); }
.sn-caret { margin-left: auto; font-size: 1.1rem; line-height: 1; color: var(--muted); transition: transform .15s; }
.sn-caret.open { transform: rotate(90deg); }
.sidenav-items { margin: .15rem 0 .5rem 1.4rem; padding-left: .55rem; border-left: 2px solid var(--sec-l); display: flex; flex-direction: column; gap: 1px; }
.sidenav-items a, .sidenav-group { display: flex; align-items: center; width: 100%; padding: .42rem .6rem; border-radius: 8px; font: inherit; font-size: .92rem;
                                  font-weight: 600; color: var(--ink-2); text-decoration: none; background: none; border: 0; text-align: left; cursor: pointer; }
.sidenav-items a:hover, .sidenav-group:hover { background: var(--bg); text-decoration: none; }
.sidenav-items a.active { background: var(--sec); color: #fff; }
.sidenav-group.has-active { color: var(--sec); }
.sidenav-group.active { background: var(--sec); color: #fff; }
.sidenav-group.active .sn-caret { color: #fff; }
/* A group's page of buttons */
.group-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.group-tile { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.15rem; background: #fff; border-radius: 14px; box-shadow: var(--shadow);
              border: 2px solid transparent; font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.group-tile:hover { border-color: var(--sec); text-decoration: none; }
.group-tile .sec-icon { flex: none; width: 22px; height: 22px; background: var(--sec); -webkit-mask: var(--sec-icon) center / contain no-repeat;
                        mask: var(--sec-icon) center / contain no-repeat; }
.group-tile b { margin-left: auto; color: var(--sec); font-size: 1.3rem; }
.sidenav-sub { display: flex; flex-direction: column; gap: 1px; margin: 1px 0 .25rem .75rem; }
.sidenav-sub a { font-weight: 500; font-size: .88rem; }
.sidenav-foot { display: flex; gap: .4rem; padding: .5rem; border-top: 1px solid var(--line); }
.sidenav-btn { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .4rem .5rem; font: inherit; font-size: .8rem;
               font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.sidenav-btn:hover { background: var(--bg); }
.nav-side-narrow .sn-text { display: none; }
.nav-side-narrow .sidenav-head { justify-content: center; padding: .6rem 0; }
@media print { .sidenav, .nav-mode-btn { display: none !important; } body.nav-side main[ng-view] { margin-left: 0 !important; } }

/* Banking (owner, 2026-11-11) */
.bank-stats { margin-bottom: .75rem; }
.bank-places { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0 0 1rem; font-weight: 700; }
.bank-place { display: inline-flex; align-items: center; gap: .4rem; }
.place-tag { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.place-ed { background: #f5f3ff; color: #6d28d9; }
.place-office { background: #fff7ed; color: #c2410c; }
.place-lunch, .place-bites, .place-foundry { background: #ffedd5; color: #9a3412; }
.place-preorder { background: #fdf2f8; color: #be185d; }
.bank-tick { width: 2.5rem; }
tr.bank-off td { opacity: .45; }
.bank-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .5rem; }
.bank-summary > div { background: var(--bg); border-radius: 12px; padding: .6rem .8rem; }
.bank-summary span { display: block; font-size: .8rem; color: var(--muted); }
.bank-summary b { font-size: 1.3rem; }
.bank-summary-total { background: var(--sec-l, var(--bg)) !important; }
.bank-dep-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.bank-dep-total { text-align: right; }
.bank-dep-total b { display: block; font-size: 1.6rem; }
.bank-dep-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.bank-items { margin-top: .75rem; }
@media print { .bank-dep { box-shadow: none; border: 1px solid #ccc; } }
.dev-only-panel { border: 2px dashed #dc2626; background: #fef2f2; }
.dev-only-panel > b { display: block; color: #b91c1c; margin-bottom: .5rem; }
/* Every pop-up's buttons sit at the bottom right (owner, 2026-11-11); centred pop-ups (.modal.text-center) stay centred. */
.modal-actions { justify-content: flex-end; }
.producer-row { display: flex; align-items: center; gap: .75rem; padding: .4rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.producer-row input:not([type=checkbox]) { flex: 1 1 14rem; max-width: 22rem; }
.producer-row.producer-off input:not([type=checkbox]) { opacity: .5; }
.inline-field { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem; }
.inline-field input { width: auto; }
.income-caret { display: inline-block; width: 1rem; color: var(--muted); transition: transform .15s; }
.income-caret.open { transform: rotate(90deg); }
tr.income-producer td { background: var(--bg); padding-left: 2rem; }
tr.income-item td { padding-left: 3.5rem; font-size: .92rem; }
tr.income-total td { border-top: 2px solid var(--line); }
.stat-amber { border-color: #f59e0b; }   /* (used for low balances and Cash at Point of Sale; was never defined) */
.menu-table td { padding-top: .5rem; padding-bottom: .5rem; }
.menu-table tr:not(.menu-archived) { cursor: default; }
.menu-table tr:not(.menu-archived):hover td { background: var(--bg); }
.menu-table .tag { margin: 1px 2px 1px 0; }
tr.menu-archived td { opacity: .55; }
tr.menu-archived td:last-child { opacity: 1; }
.menu-page { max-width: 1100px; }
.menu-toolbar-end { display: flex; gap: .6rem; align-items: center; }
.bulk-menu { position: relative; }
/* Add / edit item window: two even columns */
.item-form { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; align-items: start; margin-bottom: .5rem; }
.item-form .field { margin: 0; min-width: 0; }
.item-form .field > span { white-space: nowrap; }
.item-form .item-wide { grid-column: 1 / -1; }
.item-form .field-hint { display: block; margin-top: .25rem; font-size: .78rem; color: var(--muted); }
.item-places { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem 1rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.item-places .check { margin: 0; }
@media (max-width: 480px) { .item-form { grid-template-columns: 1fr; } }
.menu-search { flex: 1 1 14rem; max-width: 22rem; margin: 0; }
.lunch-amounts .inline-form { margin: 0; }
.lunch-other { width: 10.5rem; min-width: 10.5rem; }
.mode-zero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.add-money-target { scroll-margin-top: 1rem; }
.amount-rule { transition: background .15s, color .15s; border-radius: 4px; }
.amount-rule-off { background: var(--red-l); color: var(--red); font-weight: 700; padding: .05rem .3rem; }
/* The whole Add money section pulses when the divide-funds prompt points to it */
@keyframes label-pulse { 0%, 100% { box-shadow: 0 0 0 0 transparent; background: transparent; }
                         50% { box-shadow: 0 0 0 8px var(--sec-l, #fff7ed), 0 0 0 10px var(--sec, #ea580c); background: var(--sec-l, #fff7ed); } }
.pulse-label { animation: label-pulse .9s ease-in-out 3; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .pulse-label { animation: none; box-shadow: 0 0 0 3px var(--sec, #ea580c); } }
/* Tap-a-letter picker at the tills (owner, 2026-11-12) */
.abc { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; margin-bottom: .75rem; }
.abc button { min-height: 3.1rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 1.3rem; font-weight: 700;
              color: var(--ink); cursor: pointer; touch-action: manipulation; }
.abc button:disabled { opacity: .25; cursor: default; }
.abc button.on { background: var(--sec, var(--primary)); border-color: var(--sec, var(--primary)); color: #fff; }
.abc .abc-staff { grid-column: span 2; font-size: 1rem; }
.name-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.name-tile { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; min-height: 4rem; padding: .7rem .85rem; text-align: left;
             border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; touch-action: manipulation; }
.name-tile b { font-size: 1.15rem; }
.name-tile span { color: var(--muted); font-size: .9rem; }
.name-tile:active { border-color: var(--sec, var(--primary)); background: var(--sec-l, var(--bg)); }
.scan-hint-sm { min-height: 0; margin-bottom: .5rem; }
.scan-hint-sm .card-icon { transform: none; width: 40px; height: 26px; padding: 4px 5px; }
.scan-hint-sm .card-chip { width: 8px; height: 6px; }
.scan-hint-sm .card-lines span { height: 2px; margin-top: 3px; }
.lunch-search { scroll-margin-top: .75rem; }
.item-max { font-size: .78rem; font-weight: 700; color: var(--amber, #b45309); }
.lunch-item-main.item-maxed { opacity: .45; }
/* Spending controls per child (owner, 2026-11-12): places with their own daily limit, then all places daily/weekly */
.rule-card { border-top: 1px solid var(--line); padding: .8rem 0; }
.rule-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.rule-head b { font-size: 1.05rem; }
.rule-grid { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; gap: .35rem .75rem; align-items: center; }
.rule-col { text-transform: uppercase; letter-spacing: .03em; font-size: .72rem; }
.rule-shop { margin: 0; display: flex; flex-direction: column; gap: .2rem; font-weight: 600; font-size: .92rem; }
.rule-shop select { width: 100%; max-width: 13rem; padding: .35rem .5rem; font-weight: 400; }   /* Balance or cash / Cash only / Not at all (2026-11-19) */
.rule-grid > .rule-money { align-self: end; }
.rule-money { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .9rem; }
.rule-money input { width: 6.5rem; padding: .4rem .5rem; }
.rule-money.off { opacity: .4; }
.rule-all { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .6rem 0 .3rem; padding-top: .55rem; border-top: 1px dashed var(--line); }
.rule-all > .muted { flex-basis: 100%; text-transform: uppercase; letter-spacing: .03em; font-size: .72rem; }
.order-kind { margin-bottom: .75rem; }
select.mark-paid { width: auto; padding: .2rem .4rem; font-size: .8rem; margin-left: .3rem; }
/* Pre-order: the add / change order window (owner, 2026-11-12) */
.preorder-head-btns { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.order-modal { max-width: 600px; max-height: calc(100vh - 32px); overflow-y: auto; }
.order-modal h2 { margin-top: 0; }
.order-modal .order-kind { display: flex; width: 100%; margin-bottom: 1rem; }
.order-modal .order-kind button { flex: 1; }
.order-modal .field { margin: 0 0 .9rem; }
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.order-found { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: -.4rem 0 .9rem; }
.order-found-row { display: flex; justify-content: space-between; width: 100%; padding: .6rem .8rem; border: 0; border-bottom: 1px solid var(--line);
                   background: #fff; font: inherit; text-align: left; cursor: pointer; }
.order-found-row:last-child { border-bottom: 0; }
.order-found-row:hover { background: var(--bg); }
.order-chip { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; margin-bottom: .9rem; border-radius: 10px; background: var(--sec-l, var(--bg)); }
.order-chip b { flex: 1; }
.order-items { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.order-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .5rem .5rem .8rem; border-bottom: 1px solid var(--line); }
.order-item:last-child { border-bottom: 0; }
.order-item.on { background: var(--sec-l, var(--bg)); }
.order-item-name { display: flex; flex-direction: column; font-weight: 600; }
.order-item-name small { color: var(--muted); font-weight: 400; }
.qty-step { display: inline-flex; align-items: center; gap: .35rem; flex: none; }
.qty-step button { width: 2.4rem; height: 2.4rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 1.35rem;
                   font-weight: 700; line-height: 1; cursor: pointer; touch-action: manipulation; }
.qty-step button:disabled { opacity: .3; cursor: default; }
.qty-step b { min-width: 1.6rem; text-align: center; font-size: 1.1rem; }
.order-total { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; border-radius: 10px; background: var(--bg); }
.order-total-amt { font-size: 1.4rem; }
@media (max-width: 520px) { .order-grid { grid-template-columns: 1fr; } }
.order-bal { font-weight: 700; white-space: nowrap; }
.order-found-row { align-items: center; gap: .75rem; }
.tx-totals { margin-bottom: 1rem; }
tr.menu-off td:not(:nth-child(1)):not(:nth-child(3)):not(:last-child) { opacity: .5; }
/* Import from Alma (owner, 2026-11-12) */
.import-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.import-head h2 { font-size: 1.1rem; }
.import-row { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.import-row input { margin-top: .3rem; flex: none; }
.import-row.off { opacity: .55; }
.import-old { text-decoration: line-through; color: var(--muted); }
.import-new { font-weight: 700; color: var(--green, #15803d); }
.import-apply { position: sticky; bottom: 0; display: flex; gap: 1rem; align-items: center; padding: .75rem 0; background: var(--bg); }

/* People center (owner, 2026-11-13): its own tab row in the page, the + Add menu, the directory list */
.people-nav { margin-bottom: 1rem; flex-wrap: wrap; }
.segmented a { padding: .45rem .9rem; border-radius: 8px; font-size: .88rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.segmented a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.add-menu { position: relative; }
.add-menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border-radius: 10px;
                 box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: .35rem; min-width: 220px; }
.add-menu-list a { display: block; padding: .55rem .8rem; border-radius: 6px; color: var(--ink); font-weight: 550; text-decoration: none; }
.add-menu-list a:hover { background: #f1f5f9; }
.people-table td { vertical-align: middle; }
.toolbar .chips { margin-bottom: 0; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.role-teacher { background: #6d28d9; }
.section-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.plain-link { color: inherit; text-decoration: none; } .plain-link:hover { text-decoration: underline; }
.people-toolbar .search { width: 320px; max-width: 100%; flex: none; }
.people-table .people-status { width: 9rem; }
.people-table tr.inactive td { opacity: .6; }

/* Food & Store: pick an item to see who bought it (owner, 2026-11-13) */
.item-pick { border: 1px solid #bfdbfe; background: var(--blue-l, #dbeafe); color: #1e40af; border-radius: 999px; padding: .25rem .7rem;
             font: inherit; font-size: .8rem; font-weight: 650; margin: 0 .35rem .35rem 0; cursor: pointer; }
.item-pick:hover { border-color: #1e40af; }
.item-pick.on { background: #1e40af; color: #fff; border-color: #1e40af; }
.item-pick.off { opacity: .55; }
.item-banner { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.item-hit { font-weight: 700; background: #fef3c7; border-radius: 4px; padding: 0 .2rem; }
.item-select { width: auto; min-width: 160px; max-width: 240px; flex: none; }
.item-select.on { border-color: var(--primary); font-weight: 600; }
.banner-info { background: var(--blue-l, #dbeafe); color: #1e3a8a; }
.tag-purple { background: var(--purple-l); color: #5b21b6; }
.helper-focus { background: #fef9c3; border-radius: 10px; box-shadow: 0 0 0 2px #facc15; }
.role-row { display: flex; gap: 1rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--line); }
.role-row .grow > b { display: block; }
.role-row .dot-view { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .2rem; vertical-align: middle; }
.role-volunteer { background: #be185d; }
.section-title { font-size: 1.05rem; margin: 1.5rem 0 .6rem; }
.pin-form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.radio-row { display: flex; gap: .65rem; align-items: flex-start; padding: .6rem 0; cursor: pointer; }
.radio-row input { width: auto; margin-top: .25rem; flex: none; }
.charge-sum { margin: .5rem 0 .9rem; } .charge-sum td, .charge-sum th { padding: .35rem .5rem; }   /* Unbooked care → Charge window */
.table.charge-sum th { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--ink); background: none; border-top: 2px solid var(--line); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { filter: brightness(.95); }
/* Any-shop station: where are you working? */
.station-choose { text-align: center; padding: 2.5rem 1.5rem; }
.station-choose h1 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.station-shops { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.station-shop { min-width: 12rem; padding: 1.4rem 1.6rem; font-size: 1.2rem; font-weight: 700; color: #fff; background: var(--primary); border: 0; border-radius: 14px; }
.station-shop.shop-lunch { background: #ea580c; } .station-shop.shop-bites { background: #0e7490; } .station-shop.shop-foundry { background: #7c3aed; }
/* Help (owner, 2026-11-16) */
.help-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.help-card { display: block; color: inherit; text-decoration: none; margin: 0; border: 1px solid transparent; }
.help-card:hover { border-color: var(--primary); }
.help-card b { display: block; font-size: 1.1rem; margin-bottom: .3rem; color: var(--primary); }
.help-card span { color: var(--muted); font-size: .92rem; }
.help-toc { display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.help-toc b { margin-right: .5rem; }
.help-guide dt { font-weight: 700; margin-top: .75rem; }
.help-guide dd { margin: .15rem 0 0; }
.help-guide section { scroll-margin-top: 5rem; }
@media print { .help-guide .panel { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; } }
/* Help center: a card per module, in the module's colour and icon */
.help-module { border-top: 4px solid var(--sec); position: relative; padding-top: 1.1rem; }
.help-module b { color: var(--sec); }
.help-module .sec-icon { display: inline-block; width: 1.6rem; height: 1.6rem; background: var(--sec); -webkit-mask: var(--sec-icon) center / contain no-repeat; mask: var(--sec-icon) center / contain no-repeat; margin-bottom: .4rem; }
.help-module em { display: block; margin-top: .6rem; font-style: normal; font-weight: 600; font-size: .9rem; color: var(--sec); }
.help-account dt { font-weight: 700; margin-top: .7rem; }
.help-account dd { margin: .15rem 0 0; }
/* Add money to separate balances: one line per child, one payment (owner, 2026-11-17) */
.split-line { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.split-amount { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.split-amount input { width: 6.5rem; text-align: right; }
.split-total { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 0 .25rem; font-size: 1.05rem; }
.input-bad { border-color: var(--red) !important; }
/* Food & Store parent page, condensed (owner, 2026-11-17): family panel with Add money, then a panel per child */
.family-panel .add-money { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.child-panel > h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.child-panel .lunch-rules.rules-bare { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.rules-bare h3 { font-size: 1rem; }
.give-form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .6rem 0; }
.give-form input { width: 6rem; }
.give-name { min-width: 4.5rem; }
/* Family balance breakdown (owner, 2026-11-17): the Parent's balance and each child's share, clearly */
.balance-split { width: 100%; border-collapse: collapse; margin: .75rem 0 0; font-size: 1.05rem; }
.balance-split td { padding: .55rem 0; border-top: 1px solid var(--line); vertical-align: top; }
.balance-split td.right { font-weight: 700; white-space: nowrap; padding-left: 1rem; }
.balance-split .split-parent td { border-top: 0; }
/* Spending controls inside a child's panel: no line under the description, Save bottom right (owner, 2026-11-17) */
.rules-bare .rule-card { border-top: 0; padding-top: .3rem; padding-bottom: 0; }
.rule-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
