:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #d8e0ea;
  --line-strong: #b9c5d4;
  --text: #17202c;
  --muted: #5f6d7d;
  --accent: #215f9c;
  --accent-dark: #164372;
  --accent-soft: #e6f0fb;
  --success: #157347;
  --success-soft: #e5f5ed;
  --danger: #b42318;
  --danger-soft: #fdebea;
  --shadow: 0 16px 40px rgba(23, 32, 44, 0.08);
  --shadow-soft: 0 8px 22px rgba(23, 32, 44, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, #f7f9fc 0%, var(--bg) 280px),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button,
.button,
.tabs a,
.tool-card,
tr.clickable {
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f7fa 72%),
    #f4f7fa;
}

.login-card,
.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card {
  width: min(460px, 100%);
  padding: 32px;
  border-radius: 7px;
  box-shadow: 0 18px 48px rgba(23, 32, 44, 0.1);
}

.login-header,
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-header {
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.login-brand-mark {
  width: 108px;
  height: 132px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #fff;
}

.login-logo {
  width: 88px;
  height: 120px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand img {
  width: 56px;
  height: 72px;
  object-fit: contain;
  flex: 0 0 auto;
}

.login-header h1 {
  max-width: 290px;
  margin-top: 4px;
  font-size: 25px;
  line-height: 1.12;
}

.login-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2 {
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
}

h2 {
  font-size: 21px;
  line-height: 1.2;
}

.login-form,
.editor,
.user-form {
  display: grid;
  gap: 16px;
}

.login-form {
  gap: 17px;
}

.login-form label {
  font-size: 15px;
}

.login-form input {
  min-height: 46px;
  background: #fbfcfd;
}

.login-form button {
  min-height: 46px;
  margin-top: 5px;
  background: #173d5c;
}

.login-form button:hover {
  background: #102f49;
}

.login-form button svg {
  width: 17px;
  height: 17px;
}

.login-footer {
  margin-top: 26px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e2e7ec;
  color: #7a8794;
  font-size: 10px;
}

label {
  display: grid;
  gap: 7px;
  color: #243244;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(33, 95, 156, 0.15);
}

button,
.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

button:hover,
.button:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-soft);
}

button:focus-visible,
.button:focus-visible,
.tabs a:focus-visible,
.tool-card:focus-visible {
  outline: 3px solid rgba(33, 95, 156, 0.22);
  outline-offset: 2px;
}

.secondary,
.ghost {
  background: #e9eef5;
  border-color: #e0e7f0;
  color: var(--text);
}

.secondary:hover,
.ghost:hover {
  background: #dce6f1;
  box-shadow: none;
}

.danger {
  background: var(--danger);
}

.danger:hover {
  background: #8f1d14;
}

.icon-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.icon-action {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.icon-caption {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-button img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.icon-button.csv-icon {
  background: #fff;
  border-color: #c8d4df;
  color: var(--success);
}

.icon-button.csv-icon:hover {
  background: #f5f7fa;
  border-color: #9facbd;
}

.icon-button.printer-icon {
  background: #fff;
  border-color: #c8d4df;
  color: var(--text);
}

.icon-button.printer-icon:hover {
  background: #fff8df;
  border-color: #e4ad12;
}

.icon-button.pdf-icon {
  width: 88px;
  height: 88px;
  min-height: 88px;
  background: #fff;
  border-color: #c8d4df;
  color: var(--danger);
}

.icon-button.pdf-icon img {
  width: 72px;
  height: 72px;
}

.icon-button.pdf-icon:hover {
  background: #fff5f4;
  border-color: #d96a62;
}

.report-download-panel {
  margin: 18px 0 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  border: 1px solid #efc2bf;
  border-left: 5px solid var(--danger);
  border-radius: 8px;
  background: #fff7f6;
}

.report-download-panel h2,
.report-download-panel p {
  margin: 0;
}

.report-download-panel p {
  margin-top: 5px;
}

.report-download-panel .icon-action {
  justify-items: center;
}

.report-download-panel .icon-caption {
  width: 88px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 28px 16px;
  background: rgba(247, 249, 252, 0.88);
}

.brand h1 {
  font-size: 29px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-actions form {
  margin: 0;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 0 28px 12px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  background: rgba(247, 249, 252, 0.88);
}

.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  color: #2b3745;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  white-space: nowrap;
  font-weight: 750;
}

.tabs a:hover {
  background: #e9eef5;
}

.tabs a.active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--accent-dark);
  box-shadow: var(--shadow-soft);
}

.tabs a.unavailable,
.tabs a.unavailable:hover,
.tabs a.unavailable.active {
  background: var(--danger-soft);
  border-color: #fac5c0;
  color: var(--danger);
}

.app-shell {
  padding: 22px 28px 78px;
}

.panel {
  padding: 22px;
}

.no-live-events {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.no-live-events-content {
  max-width: 520px;
  text-align: center;
}

.no-live-events-content h2 {
  margin: 0;
  color: var(--danger);
  font-size: 28px;
}

.no-live-events-content p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.narrow {
  max-width: 760px;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar label {
  min-width: min(460px, 100%);
  flex: 1 1 360px;
}

.toolbar button,
.toolbar .button {
  flex: 0 0 auto;
}

.attendance-report-toolbar label {
  width: min(420px, 100%);
  min-width: min(300px, 100%);
  flex: 0 1 420px;
}

.checkin-search {
  align-items: end;
}

.checkin-search label {
  flex: 0 1 640px;
  min-width: min(420px, 100%);
}

.guest-checkin .toolbar {
  align-items: end;
  margin-bottom: 16px;
}

.guest-checkin .toolbar label {
  flex: 0 1 220px;
  min-width: 180px;
}

.guest-checkin .toolbar label:nth-of-type(3) {
  flex-basis: 300px;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(420px, 1.12fr) minmax(340px, 0.88fr);
  gap: 20px;
  align-items: start;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(23, 32, 44, 0.03);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e7edf4;
  text-align: left;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: #edf3f9;
  color: #223044;
  font-size: 14px;
  font-weight: 850;
}

td {
  color: #243244;
}

.empty-state {
  color: var(--muted);
  padding: 28px 12px;
  text-align: center;
}

tr.clickable {
  cursor: pointer;
}

tr.clickable:hover,
tr.selected {
  background: #edf6ff;
}

tr.already-checked-in {
  background: #fff5f4;
}

tr.already-checked-in:hover,
tr.already-checked-in.selected {
  background: #ffe9e7;
}

.checkin-time {
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  margin-top: 6px;
}

.checkin-results .member-type-col {
  width: 96px;
  white-space: nowrap;
}

.checkin-results .checkin-action-col {
  width: 260px;
}

.barcode-card {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(23, 32, 44, 0.02);
}

#barcode {
  width: min(900px, 100%);
  max-height: 220px;
}

.mapping {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.import-format-help {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
}

.import-format-help strong,
.import-format-help b {
  color: var(--text);
}

.scanner-add-fields {
  display: grid;
  gap: 16px;
}

.scanner-add-fields[hidden] {
  display: none !important;
}

.user-form {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  align-items: end;
  margin-bottom: 18px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
  min-height: auto;
}

.alert {
  padding: 13px 15px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 800;
  border: 1px solid transparent;
}

.success {
  background: var(--success-soft);
  border-color: #bfe5cf;
  color: var(--success);
}

.error {
  background: var(--danger-soft);
  border-color: #fac5c0;
  color: var(--danger);
}

.muted {
  color: var(--muted);
}

.event-status {
  font-weight: 850;
}

.event-status.scheduled {
  color: var(--success);
}

.event-status.active {
  color: var(--accent-dark);
}

.event-status.closed {
  color: var(--danger);
}

.checkin-success {
  color: var(--success);
  font-weight: 800;
}

.checkin-warning {
  color: var(--danger);
  font-weight: 800;
}

progress {
  width: 100%;
  height: 16px;
  accent-color: var(--accent);
}

.upload-progress {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.upload-progress[hidden] {
  display: none;
}

.drop-zone {
  border: 1px dashed #9facbd;
  border-radius: 8px;
  padding: 18px;
  background: var(--surface-soft);
}

.drop-zone span {
  color: var(--muted);
  font-weight: 600;
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: #edf6ff;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 18px;
  min-height: 118px;
}

.stat-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stat-card strong {
  color: var(--accent-dark);
  display: block;
  font-size: 27px;
  line-height: 1.15;
}

.stat-card .text-stat {
  font-size: 22px;
}

.dashboard-section {
  margin-top: 24px;
}

.dashboard-section h2 {
  font-size: 21px;
  margin: 0 0 12px;
}

.report-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
}

.report-section-hourly {
  border-left-color: var(--accent);
  background: #f5f9fd;
}

.report-section-daily {
  border-left-color: var(--success);
  background: #f5fbf7;
}

.hourly-chart {
  display: flex;
  align-items: end;
  gap: 14px;
  min-height: 170px;
  margin: 12px 0 18px;
  padding: 18px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  overflow-x: auto;
}

.attendance-day-chart + .attendance-day-chart {
  margin-top: 22px;
}

.attendance-day-chart h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
}

.hourly-bar-item {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-width: 72px;
  height: 130px;
  text-align: center;
}

.hourly-bar-count {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 850;
}

.hourly-bar-track {
  display: flex;
  align-items: end;
  justify-content: center;
  height: 76px;
}

.hourly-bar {
  width: 34px;
  min-height: 10px;
  border-radius: 8px 8px 3px 3px;
  background: var(--accent);
  box-shadow: inset 0 -10px 16px rgba(0, 0, 0, 0.12);
}

.hourly-bar-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.chart-empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.daily-chart {
  min-height: 190px;
}

.daily-bar-item {
  min-width: 108px;
  height: 150px;
}

.daily-bar-item .hourly-bar-track {
  height: 96px;
}

.daily-bar {
  background: var(--success);
}

.attendance-breakdown-table {
  margin-top: 14px;
}

.attendance-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(23, 32, 44, 0.03);
}

.attendance-details summary {
  min-height: 76px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
  background: var(--surface-soft);
}

.attendance-details summary::-webkit-details-marker {
  display: none;
}

.attendance-details summary:hover {
  background: #edf3f9;
}

.attendance-details-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.attendance-details-title strong {
  color: var(--accent-dark);
  font-size: 28px;
  line-height: 1;
}

.attendance-details-action {
  color: var(--accent-dark);
  font-weight: 800;
}

.details-collapse,
.attendance-details[open] .details-expand {
  display: none;
}

.attendance-details[open] .details-collapse {
  display: inline;
}

.attendance-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.attendance-details-content {
  padding: 18px;
}

.attendance-details-toolbar {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.attendance-details-toolbar p {
  margin: 0;
}

.attendance-export-summary {
  min-height: 76px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.attendance-export-members {
  border-left: 5px solid var(--accent);
  background: #f5f9fd;
}

.attendance-export-guests {
  border-left: 5px solid #c68a12;
  background: #fffbf1;
}

.attendance-export-missing {
  border-left: 5px solid var(--danger);
  background: #fff7f6;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading p {
  margin-top: 4px;
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.actions-cell form {
  margin: 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
}

.tool-card {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
}

.tool-card:hover {
  border-color: #9db8d8;
  background: #edf6ff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.tool-card strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.tool-card span {
  color: var(--muted);
}

.print-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.print-toolbar h2,
.print-title h1 {
  margin: 0;
}

.print-toolbar p,
.print-title p {
  margin: 6px 0 0;
}

.print-title {
  display: none;
}

.print-members-panel .print-members-table {
  margin-top: 6px;
}

.print-members-table th:nth-child(3),
.print-members-table td:nth-child(3) {
  width: 190px;
}

.import-results {
  margin-top: 22px;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-cards div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-soft);
}

.summary-cards strong {
  display: block;
  color: var(--accent-dark);
  font-size: 27px;
  line-height: 1;
}

.summary-cards span {
  color: var(--muted);
  font-weight: 800;
}

.badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 13px;
  font-weight: 850;
  min-width: 78px;
  padding: 5px 10px;
  text-align: center;
}

.badge.new {
  background: var(--success-soft);
  color: var(--success);
}

.badge.updated {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge.skipped {
  background: #eef2f6;
  color: var(--muted);
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 28px;
  background: rgba(247, 249, 252, 0.96);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  backdrop-filter: blur(8px);
}

.footer-left {
  display: flex;
  gap: 18px;
  align-items: center;
}

@media (max-width: 1100px) {
  .grid-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body {
    font-size: 14px;
  }

  .mapping,
  .user-form,
  .summary-cards,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 18px 12px;
  }

  .brand h1 {
    font-size: 24px;
  }

  .tabs {
    padding: 0 18px 12px;
  }

  .app-shell {
    padding: 18px 18px 92px;
  }

  .panel {
    padding: 16px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar label,
  .toolbar button,
  .toolbar .button {
    width: 100%;
  }

  .attendance-export-summary {
    align-items: flex-start;
  }

  .report-download-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 10px 18px;
  }

  .footer-left {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  .login-card {
    padding: 24px 20px;
  }

  .brand {
    gap: 12px;
  }

  .login-header {
    align-items: flex-start;
    gap: 14px;
  }

  .login-brand-mark {
    width: 82px;
    height: 100px;
  }

  .login-logo {
    width: 66px;
    height: 90px;
  }

  .brand img {
    width: 46px;
    height: 60px;
  }

  h1,
  .brand h1 {
    font-size: 22px;
  }

  .login-header h1 {
    font-size: 22px;
  }

  .section-heading,
  .print-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .topbar,
  .tabs,
  .print-toolbar,
  .no-print,
  footer,
  .alert {
    display: none !important;
  }

  .app-shell {
    padding: 0;
  }

  .panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .print-title {
    display: block;
    margin-bottom: 16px;
  }

  .print-title h1 {
    font-size: 22px;
  }

  .print-title p {
    color: #333;
    font-size: 12px;
  }

  table {
    border: 1px solid #777;
    box-shadow: none;
    font-size: 11px;
  }

  th {
    background: #e8e8e8 !important;
    color: #000;
  }

  th,
  td {
    border-bottom: 1px solid #aaa;
    padding: 5px 7px;
  }
}

/* V10 Modern Registry */
body:not(:has(.login-shell)) {
  background: #f4f6f8;
}

body:not(:has(.login-shell)) .topbar {
  min-height: 74px;
  margin-left: 88px;
  padding: 12px 28px;
  border-bottom: 1px solid #dce3ea;
  background: #fff;
}

body:not(:has(.login-shell)) .brand {
  gap: 11px;
}

body:not(:has(.login-shell)) .brand img {
  width: 38px;
  height: 50px;
}

body:not(:has(.login-shell)) .brand h1 {
  font-size: 20px;
  font-weight: 800;
}

.topbar-actions .button,
.topbar-actions button {
  min-height: 36px;
  padding: 7px 10px;
  gap: 7px;
  font-size: 12px;
}

.topbar-actions svg {
  width: 16px;
  height: 16px;
}

body:not(:has(.login-shell)) .tabs {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 88px;
  padding: 18px 10px;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 9px;
  border: 0;
  border-right: 1px solid #dce3ea;
  background: #fff;
  overflow: visible;
}

body:not(:has(.login-shell)) .tabs::before {
  content: "";
  display: block;
  width: 48px;
  height: 62px;
  margin: 0 auto 12px;
  background: #fff url("stti-logo-color.jpg") center / contain no-repeat;
}

body:not(:has(.login-shell)) .tabs a {
  min-height: 56px;
  padding: 8px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 0;
  border-radius: 7px;
  color: #6d7a89;
  font-size: 9px;
  font-weight: 750;
  text-align: center;
}

body:not(:has(.login-shell)) .tabs a svg {
  width: 19px;
  height: 19px;
}

body:not(:has(.login-shell)) .tabs a:hover {
  background: #f0f4f7;
  color: #173d5c;
}

body:not(:has(.login-shell)) .tabs a.active {
  background: #eaf2f8;
  color: #1f668f;
  box-shadow: none;
}

body:not(:has(.login-shell)) .tabs a.unavailable {
  background: #fff0ef;
  color: var(--danger);
}

body:not(:has(.login-shell)) .tabs .admin-nav-link {
  border-radius: 7px;
}

.tabs-logout {
  margin: auto 0 0;
}

.tabs-logout button {
  width: 100%;
  min-height: 56px;
  padding: 8px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6d7a89;
  font-size: 9px;
  font-weight: 750;
}

.tabs-logout button:hover {
  background: #fff0ef;
  color: var(--danger);
  box-shadow: none;
}

.tabs-logout button svg {
  width: 19px;
  height: 19px;
}

body:not(:has(.login-shell)) .app-shell {
  width: calc(100% - 88px);
  max-width: 1376px;
  margin-left: 88px;
  padding: 24px 32px 86px;
}

body:not(:has(.login-shell)) .panel {
  padding: 24px;
  border: 1px solid #dde4eb;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 32, 44, 0.05);
}

body:not(:has(.login-shell)) footer {
  left: 88px;
  padding: 9px 32px;
  background: rgba(255, 255, 255, 0.96);
  font-size: 12px;
}

.page-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #1f668f;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-heading h2,
.admin-tools-heading h2 {
  margin: 0;
  font-size: 28px;
}

.dashboard-heading p,
.admin-tools-heading p {
  margin: 5px 0 0;
}

.dashboard-heading .button svg {
  width: 17px;
}

.dashboard-event-banner {
  margin-bottom: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 7px;
  background: #173d5c;
  color: #fff;
}

.dashboard-event-banner > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 10px;
}

.dashboard-event-banner span {
  grid-row: 1 / 3;
  padding: 5px 7px;
  border-radius: 4px;
  background: #dff2e7;
  color: #17673b;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-event-banner strong {
  font-size: 16px;
}

.dashboard-event-banner small {
  color: #c1d1de;
  font-size: 11px;
}

.dashboard-event-banner a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-event-banner a svg {
  width: 15px;
}

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  min-height: 98px;
  padding: 16px;
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
}

.stat-card span {
  font-size: 11px;
  text-transform: uppercase;
}

.stat-card strong,
.stat-card .text-stat {
  margin-top: 9px;
  font-size: 25px;
}

.dashboard-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e7ec;
}

.dashboard-section h2 {
  font-size: 18px;
}

.hourly-chart {
  border-radius: 5px;
  background: #f7f9fb;
}

.admin-tools-heading {
  margin-bottom: 20px;
}

.tool-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px;
}

.tool-card {
  min-height: 82px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 38px 1fr 18px;
  align-items: center;
  gap: 12px;
  border: 1px solid #dce3ea;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  box-shadow: none;
}

.tool-card:hover {
  border-color: #aebfce;
  background: #f7f9fb;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(23, 32, 44, 0.06);
}

.tool-card > svg:first-child {
  width: 20px;
  height: 20px;
  padding: 9px;
  box-sizing: content-box;
  border-radius: 6px;
  background: #eaf2f8;
  color: #1f668f;
}

.tool-card > svg:last-child {
  width: 16px;
  color: #8793a0;
}

.tool-card span {
  display: grid;
  gap: 3px;
}

.tool-card strong {
  font-size: 14px;
}

.tool-card small {
  color: #6d7a89;
  font-size: 11px;
}

.toolbar {
  max-width: 980px;
}

.narrow {
  max-width: 720px;
}

table {
  border-radius: 6px;
  box-shadow: none;
}

th {
  background: #edf2f6;
}

@media (max-width: 900px) {
  body:not(:has(.login-shell)) .topbar {
    min-height: 62px;
    margin-left: 0;
    padding: 8px 14px;
    align-items: center;
    flex-direction: row;
  }

  body:not(:has(.login-shell)) .brand img {
    width: 32px;
    height: 42px;
  }

  body:not(:has(.login-shell)) .brand h1 {
    font-size: 17px;
  }

  .scanner-status span,
  .logout-button span {
    display: none;
  }

  .topbar-actions .button,
  .topbar-actions button {
    width: 38px;
    padding: 0;
  }

  body:not(:has(.login-shell)) .tabs {
    inset: auto 0 0 0;
    width: 100%;
    height: 68px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    flex-direction: row;
    justify-content: space-around;
    gap: 3px;
    border-right: 0;
    border-top: 1px solid #dce3ea;
    box-shadow: 0 -5px 18px rgba(23, 32, 44, 0.06);
  }

  body:not(:has(.login-shell)) .tabs::before {
    display: none;
  }

  body:not(:has(.login-shell)) .tabs a,
  body:not(:has(.login-shell)) .tabs .admin-nav-link,
  .tabs-logout button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    padding: 5px 2px;
    border: 0;
    border-radius: 6px;
    font-size: 8px;
  }

  .tabs-logout {
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
  }

  body:not(:has(.login-shell)) .tabs a svg {
    width: 18px;
    height: 18px;
  }

  body:not(:has(.login-shell)) .app-shell {
    width: 100%;
    margin-left: 0;
    padding: 16px 14px 96px;
  }

  body:not(:has(.login-shell)) .panel {
    padding: 16px;
  }

  body:not(:has(.login-shell)) footer {
    position: static;
    margin-bottom: 68px;
    padding: 10px 14px;
    left: 0;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-heading .button {
    width: 100%;
  }

  .dashboard-event-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 76px;
  }
}

@media (max-width: 480px) {
  body:not(:has(.login-shell)) .brand h1 {
    max-width: 180px;
    font-size: 15px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    min-height: 88px;
    padding: 13px;
  }

  .stat-card strong,
  .stat-card .text-stat {
    font-size: 20px;
  }

  .tool-card {
    grid-template-columns: 38px 1fr 14px;
    padding: 12px;
  }
}
