@font-face {
  font-family: Gotham;
  src: url('assets/fonts/gotham-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #292126;
  --muted: #6c5e65;
  --wine: #651d3b;
  --border: #ded7da;
  --background: #f5f4f2;
  --green: #246447;
  --red: #97384a;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); font: 17px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; }
button, input, select, a { font: inherit; }
button, input { color: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #95546e; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.3; }
h1, h2 { font-family: Gotham, 'Segoe UI', Arial, sans-serif; font-weight: 700; letter-spacing: -.035em; }
input:not([type=checkbox]) { width: 100%; min-width: 0; min-height: 54px; border: 1px solid #aaa0a6; border-radius: 6px; padding: 12px 14px; background: white; font-size: 18px; }
input:focus { border-color: var(--wine); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: 6px; text-decoration: none; font-size: 16px; font-weight: 600; }
.primary { background: var(--wine); color: white; }
.primary:hover { background: #4f142c; }
.secondary { background: white; border-color: #aaa0a6; }
.secondary:hover { background: #f3eff1; }
.danger { background: #ac2e46; color: white; }
.error { padding: 14px 16px; border: 1px solid #e6b4c0; border-radius: 6px; background: #fff0f3; color: #8e213c; font-size: 16px; }
.ui-icon { display: block; flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dropdown-control { display: block; min-height: 48px; padding: 10px 44px 10px 14px; border: 1px solid #aaa0a6; border-radius: 6px; background: white; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5; cursor: pointer; }
.dropdown-control:hover { border-color: #80616f; }
.dropdown-control:focus-visible { border-color: var(--wine); }
.select-control { position: relative; display: inline-grid; vertical-align: middle; min-width: 0; }
.select-control select { width: 100%; appearance: none; -webkit-appearance: none; }
.dropdown-chevron { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.mobile-filter .select-control { display: grid; width: 100%; }

/* A single, familiar sign-in form. */
.login-layout { min-height: 100svh; display: flex; flex-direction: column; }
.login-header, .topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; padding: 16px max(32px, calc((100% - 1376px) / 2)); background: #481329; color: white; }
.login-header img, .brand img { display: block; width: 176px; height: auto; }
.login-header > span { color: #eddae2; font-size: 16px; }
.login-side { flex: 1; display: grid; place-items: center; padding: 48px 24px; }
.login-card { width: min(100%, 480px); padding: 38px 40px; border: 1px solid var(--border); border-radius: 10px; background: white; box-shadow: 0 4px 18px #25131d06; }
.login-card h1 { font-size: 30px; margin-bottom: 12px; }
.login-card > p { color: var(--muted); font-size: 17px; line-height: 1.6; margin-bottom: 28px; }
.login-card label:not(.remember), .delete-dialog label { display: block; margin: 22px 0 8px; font-size: 17px; font-weight: 600; }
.password-field { position: relative; }
.password-field input { padding-right: 76px; }
.password-field button { position: absolute; right: 5px; top: 5px; min-height: 44px; min-width: 64px; padding: 8px; border: 0; border-radius: 4px; background: none; color: var(--wine); font-size: 15px; font-weight: 600; }
.password-field button:hover { background: #f5eef1; }
.remember { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 20px 0; font-size: 16px; cursor: pointer; }
.remember input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--wine); }
.login-submit { width: 100%; min-height: 54px; font-size: 18px; }
.login-card .login-help { margin: 24px 0 0; padding-top: 22px; border-top: 1px solid var(--border); font-size: 15px; }
.login-card .error { color: #8e213c; margin-bottom: 18px; }

/* Header and overview. */
.header-brand, .topbar-right { display: flex; align-items: center; gap: 24px; }
.header-section { padding-left: 24px; border-left: 1px solid #ffffff4d; color: #f4e5eb; font-size: 17px; }
.topbar-right form { margin: 0; }
.staff-name { color: #f4e5eb; font-size: 16px; }
.signout { min-height: 44px; padding: 9px 16px; border: 1px solid #ffffff85; border-radius: 6px; background: none; color: white; font-size: 16px; }
.signout:hover { background: #ffffff12; }
.dashboard { width: 100%; max-width: 1440px; margin: auto; padding: 28px 32px 20px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-heading h1 { font-size: 34px; margin-bottom: 10px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 18px; }
.live-box { display: grid; flex-shrink: 0; gap: 6px; text-align: right; }
.live-status { color: #296443; font-size: 16px; }
.live-status:before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: currentColor; }
.live-status.offline { color: #8d5a16; }
.uk-clock { color: var(--muted); font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 24px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: white; }
.stat { display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat:first-child { background: #f5e9ee; }
.stat > span { display: block; color: #5e4d57; font-size: 16px; }
.stat strong { display: block; order: -1; flex-shrink: 0; font-size: 34px; font-weight: 650; line-height: 1.25; }
.stat:nth-child(2) strong { color: var(--green); }
.stat:nth-child(3) strong { color: var(--red); }

/* Queue controls and generously sized review rows. */
.queue-section { padding: 26px 28px 12px; border: 1px solid var(--border); border-radius: 8px; background: white; }
.queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; margin-bottom: 18px; }
.queue-heading h2 { margin: 0 0 8px; font-size: 23px; }
.queue-heading p { margin: 0; color: var(--muted); font-size: 16px; }
.queue-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.tabs { display: flex; gap: 4px; }
.mobile-filter { display: none; }
.tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 14px; border: 1px solid transparent; border-radius: 6px; background: none; color: #61505b; font-size: 16px; white-space: nowrap; }
.tabs button:hover { background: #f6f3f4; }
.tabs button[aria-selected=true] { border-color: #cba6b6; background: #f5e9ee; color: #5e1835; font-weight: 600; }
.tabs button span { min-width: 25px; padding: 1px 6px; border-radius: 4px; background: #ebdbe2; color: #5b2940; text-align: center; font-size: 14px; }
.search { position: relative; width: min(100%, 390px); min-width: 260px; }
.search svg { position: absolute; left: 14px; top: 16px; width: 21px; height: 21px; color: #6f6068; pointer-events: none; }
.search input { min-height: 52px; padding-left: 44px; font-size: 16px; }
.results-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin: 20px 0 8px; color: var(--muted); font-size: 15px; }
.results-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.queue-sort { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; }
.cards { display: flex; flex-direction: column; }
.card { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) 244px; align-items: center; gap: 28px; min-width: 0; padding: 22px 0; border-bottom: 1px solid var(--border); }
.card:last-child { border-bottom: 0; }
.entry-main { min-width: 0; }
.card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.entry-id { color: var(--muted); font-size: 14px; }
.badge { padding: 3px 9px; border: 1px solid transparent; border-radius: 5px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.badge.pending { border-color: #ebd5a8; background: #fff7e7; color: #805c18; }
.badge.approved { border-color: #c0dacb; background: #edf7f1; color: var(--green); }
.badge.rejected { border-color: #eac3cd; background: #fdf0f3; color: var(--red); }
.card h3 { margin: 12px 0 10px; font-family: Gotham, 'Segoe UI', Arial, sans-serif; font-size: 24px; font-weight: 700; letter-spacing: -.025em; overflow-wrap: anywhere; }
.name-amp { margin: 0 2px; color: #876474; font-weight: 500; }
.entry-time { margin: 0; color: var(--muted); font-size: 15px; }
.message-box { min-width: 0; padding-left: 28px; border-left: 1px solid #e9e3e6; }
.message-box > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 15px; }
.message { margin: 0; font-size: 18px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qr-copy-choice { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.qr-copy-label { margin-right: 4px; color: var(--muted); font-size: 15px; }
.qr-copy-option { position: relative; display: block; cursor: pointer; }
.qr-copy-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.qr-copy-option span { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #bba0ad; border-radius: 8px; background: white; color: #5e1835; font-size: 17px; font-weight: 600; transition: background .15s, color .15s; }
.qr-copy-option input:checked + span { border-color: #6b2745; background: #6b2745; color: white; }
.qr-copy-option input:focus-visible + span { outline: 2px solid #6b2745; outline-offset: 3px; }
.qr-copy-choice:disabled { opacity: .6; }.qr-copy-choice:disabled label { cursor: default; }
.actions button { min-width: 0; min-height: 50px; padding: 12px 10px; border: 1px solid #af7181; border-radius: 6px; background: white; color: var(--red); font-size: 17px; font-weight: 600; }
.actions .reject:hover:not(:disabled) { background: #fff0f3; }
.actions .approve { border-color: var(--green); background: var(--green); color: white; }
.actions .approve:hover:not(:disabled) { background: #194d35; }
.decision-note { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.decision-summary { display: grid; gap: 8px; min-width: 0; }
.print-status { font-size: 14px; }.print-status[data-error="true"] { color: var(--red); }
.entry-receipt-actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; gap: 10px; }
.entry-receipt-actions .receipt-action { min-height: 44px; padding: 10px 14px; font-size: 15px; gap: 9px; }
.copy-link-dialog { width: min(500px,calc(100% - 32px)); padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: white; color: var(--ink); }
.copy-link-dialog::backdrop { background: #20111b99; }
.copy-link-dialog h2 { margin-top: 0; }.copy-link-dialog input { width: 100%; min-height: 48px; margin-bottom: 20px; padding: 12px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.empty { padding: 48px 20px; text-align: center; }
.empty h3 { margin-bottom: 10px; font-size: 23px; }
.empty p { margin: 0; color: var(--muted); font-size: 17px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 22px 0 10px; }
.pagination > span { color: var(--muted); font-size: 16px; }
.toast { margin: 0; color: var(--green); font-size: 17px; }
.toast:not(:empty) { padding: 14px 18px; margin-bottom: 20px; border: 1px solid #c0dacb; border-radius: 6px; background: #edf7f1; }
.dashboard-footer { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0 10px; color: var(--muted); font-size: 14px; }

/* Administrator tools use the same readable controls. */
.admin-tools { position: relative; }
.admin-tools summary { position: relative; display: flex; align-items: center; list-style: none; white-space: nowrap; }
.admin-tools summary::-webkit-details-marker { display: none; }
.admin-tools[open] > summary .dropdown-chevron { transform: translateY(-50%) rotate(180deg); }
.tools-menu { position: absolute; right: 0; top: 56px; z-index: 4; width: 292px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: white; box-shadow: 0 8px 24px #2813201c; }
.menu-label { display: block; padding: 6px 10px 12px; color: var(--muted); font-size: 14px; }
.tool-link, .danger-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; width: 100%; padding: 10px; border: 0; border-radius: 4px; background: none; text-align: left; text-decoration: none; font-size: 16px; cursor: pointer; }
.tool-link:hover, .danger-link:hover { background: #f6f0f3; }
.menu-item-label { display: inline-flex; align-items: center; gap: 12px; }
.tool-link > .file-type { color: var(--muted); font-size: 14px; }
.danger-link { color: var(--red); }
.delete-dialog { width: min(560px, calc(100% - 32px)); padding: 32px; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); }
.delete-dialog::backdrop { background: #21141abd; }
.delete-dialog form { margin: 0; }
.delete-dialog .eyebrow { color: var(--red); font-size: 15px; }
.delete-dialog h2 { margin: 14px 0 18px; font-size: 27px; }
.delete-dialog p { color: var(--muted); font-size: 17px; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }

@media (max-width: 1120px) {
  .queue-toolbar { align-items: stretch; flex-direction: column; gap: 16px; }
  .search { width: 100%; }
  .card { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px 28px; }
  .actions, .decision-note, .decision-summary { grid-column: 1 / -1; justify-self: end; width: 244px; }
}
@media (max-width: 760px) {
  .login-header, .topbar { min-height: 78px; padding: 18px 22px; }
  .login-header img, .brand img { width: 152px; }
  .header-section { display: none; }
  .dashboard { padding: 28px 20px 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .page-heading h1 { font-size: 29px; }
  .page-heading p { display: none; }
  .live-box { display: flex; align-items: center; flex-wrap: wrap; text-align: left; gap: 6px 12px; }
  .live-status, .uk-clock { font-size: 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat { padding: 12px 18px; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .stat > span { font-size: 15px; }
  .stat strong { font-size: 30px; }
  .queue-section { padding: 22px 20px 10px; }
  .queue-heading { align-items: flex-start; flex-direction: column; gap: 0; min-height: 0; margin: 0; }
  .queue-heading h2 { display: none; }
  .admin-tools { margin-bottom: 18px; }
  .queue-heading p { font-size: 16px; }
  .tabs { display: none; }
  .mobile-filter { display: block; }
  .tabs button { justify-content: flex-start; padding: 10px 12px; }
  .search { min-width: 0; max-width: none; }
  .search input { font-size: 16px; }
  .auto-update-note { display: none; }
  .card { display: flex; align-items: stretch; flex-direction: column; gap: 20px; padding: 26px 0; }
  .card h3 { font-size: 24px; }
  .message-box { border-left: 0; padding: 0; }
  .message { font-size: 18px; }
  .actions, .decision-note, .decision-summary { width: 100%; }
  .entry-receipt-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .actions button { min-height: 52px; }
  .pagination .button { padding: 10px 12px; font-size: 15px; }
  .pagination { flex-wrap: wrap; gap: 10px; }
  .pagination > span { order: -1; flex-basis: 100%; text-align: center; font-size: 14px; }
  .dashboard-footer { flex-direction: column; gap: 6px; }
  .tools-menu { right: auto; left: 0; max-width: calc(100vw - 82px); }
}
@media (max-width: 480px) {
  .login-side { padding: 28px 18px; align-items: start; }
  .login-card { padding: 28px 24px; }
  .login-card h1 { font-size: 27px; }
  .login-header > span { font-size: 15px; }
  .staff-name { display: none; }
  .dashboard { padding-right: 16px; padding-left: 16px; }
  .queue-section { padding-right: 16px; padding-left: 16px; }
  .delete-dialog { padding: 25px 22px; }
  .delete-dialog h2 { font-size: 25px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}


