:root {
  color-scheme: light;
  --white: #fff;
  --paper: #f4f8fc;
  --blue: #0065b8;
  --blue-dark: #005097;
  --navy: #123557;
  --text: #31475c;
  --muted: #62758a;
  --line: #d5e3ef;
  --line-dark: #aac7df;
  --pale-blue: #e6f1fa;
  --danger: #a53e37;
  --danger-dark: #7e2925;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 14px/1.6 "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-underline-offset: 4px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
.topbar { min-height: 88px; background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 1380px;
  min-height: 88px;
  margin: auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .055em;
  text-decoration: none;
}
.company-mark { display: block; width: 43px; height: 43px; object-fit: contain; flex: none; }
.topbar-label { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.topbar-label span { color: var(--line-dark); padding: 0 7px; }
.account { margin-left: auto; display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 13px; }
.account form { margin: 0; }
.text-button { padding: 8px 0; border: 0; background: transparent; color: var(--blue); font-weight: 650; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-button span { margin-left: 6px; }

.dashboard { width: min(1240px, calc(100% - 96px)); margin: auto; padding: 65px 0 80px; }
.heading-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 45px; }
.eyebrow, .panel-kicker { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 30px; height: 1px; background: var(--blue); flex: none; }
.heading-row h1, .login-intro h1, .login-panel h2, .table-heading h2, .confirm-card h1 {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.12;
}
.heading-row h1 { margin: 17px 0 12px; font-size: clamp(40px, 4vw, 54px); }
.heading-light { color: var(--blue); font-weight: 400; }
.subtitle { margin: 0; color: var(--muted); font-size: 15px; }
.heading-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; color: var(--muted); font-size: 13px; }
.status-pill {
  padding: 7px 11px;
  background: #fff8eb;
  color: #815620;
  border: 1px solid #efd8ae;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
}
.status-pill.active { background: var(--paper); color: var(--blue-dark); border-color: var(--line-dark); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-title h2 { margin: 0; color: var(--navy); font-size: 19px; font-weight: 650; }
.section-title > span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.capacity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.capacity-card { min-height: 160px; padding: 20px 22px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.day-line { display: flex; justify-content: space-between; color: var(--navy); font-size: 13px; font-weight: 650; }
.card-index { color: #7395b1; font-size: 11px; letter-spacing: .08em; }
.capacity-value { margin: 18px 0 12px; color: var(--navy); font: 36px/1 Georgia, serif; }
.capacity-value span { color: #7590a6; font: 15px "Segoe UI", Arial, sans-serif; }
.capacity-meter { display: block; width: 100%; height: 5px; border: 0; border-radius: 3px; background: #d5e5f1; overflow: hidden; appearance: none; }
.capacity-meter::-webkit-progress-bar { background: #d5e5f1; }
.capacity-meter::-webkit-progress-value { background: var(--blue); }
.capacity-meter::-moz-progress-bar { background: var(--blue); }
.capacity-card.full .capacity-meter::-webkit-progress-value { background: #a86232; }
.capacity-card.full .capacity-meter::-moz-progress-bar { background: #a86232; }
.capacity-caption { margin-top: 11px; color: var(--muted); font-size: 12px; }
.capacity-caption strong { color: var(--navy); }

.table-panel { margin-top: 42px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--white); }
.table-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 27px 28px 24px; }
.table-heading h2 { margin: 7px 0 0; font-size: 32px; }
.count-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 9px;
  vertical-align: 5px;
  border-radius: 12px;
  background: var(--pale-blue);
  color: var(--blue-dark);
  font: 700 12px "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}
.outline-button, .filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}
.outline-button:hover, .filter-button:hover { border-color: var(--blue); background: var(--paper); }
.filter-row { display: flex; align-items: center; gap: 12px; padding: 17px 28px; border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 13px; }
.filter-row label { color: var(--navy); font-weight: 650; }
.filter-row select, .login-form input {
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
}
.filter-row select { min-width: 195px; min-height: 42px; padding: 9px 30px 9px 12px; }
.clear-filter { font-size: 13px; }
.shown { margin-left: auto; color: var(--muted); font-size: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 1050px; border-collapse: collapse; text-align: left; }
th { padding: 14px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .075em; white-space: nowrap; }
td { padding: 17px 20px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13px; line-height: 1.55; }
td.name-cell { min-width: 145px; color: var(--navy); font-weight: 650; }
.secondary { color: var(--muted); }
.empty-state { min-height: 188px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-state strong { margin: 8px 0 4px; color: var(--navy); font-size: 15px; }
.empty-state p { margin: 0; font-size: 13px; }
.empty-icon { color: var(--blue); font-size: 25px; }
.table-footer { display: flex; justify-content: space-between; gap: 20px; padding: 15px 28px; color: var(--muted); font-size: 11px; }

.login-layout {
  width: min(1240px, calc(100% - 96px));
  min-height: 540px;
  margin: 74px auto 90px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 80px;
}
.login-intro { position: relative; padding: 25px 0 42px; }
.login-intro h1 { margin: 25px 0 22px; font-size: clamp(50px, 5vw, 68px); }
.login-intro h1 em { color: var(--blue); font-weight: 400; }
.login-intro p { max-width: 500px; margin: 0; color: var(--text); font-size: 17px; line-height: 1.7; }
.event-strip { display: flex; gap: 36px; max-width: 500px; margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); }
.event-strip div { display: flex; flex-direction: column; gap: 5px; }
.event-strip small { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .1em; }
.event-strip strong { color: var(--navy); font-size: 16px; font-weight: 650; }
.login-index { display: none; }
.login-panel { padding: 38px 40px 34px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.login-panel h2 { margin: 12px 0; font-size: 36px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.65; }
.login-form { display: flex; flex-direction: column; margin-top: 26px; }
.login-form label { margin-bottom: 7px; color: var(--navy); font-size: 13px; font-weight: 650; }
.login-form input { min-height: 48px; margin-bottom: 18px; padding: 12px 14px; }
.login-form input::placeholder { color: #73869a; }
.primary-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  margin-top: 3px;
  padding: 12px 17px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: var(--white);
  font-weight: 650;
}
.primary-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.primary-button span { font-size: 19px; line-height: 1; }
.login-note { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.lock-icon { margin-right: 7px; color: var(--blue); font-size: 16px; }
.form-error { margin-top: 20px; padding: 11px 13px; border-left: 3px solid var(--danger); background: #fff1f0; color: var(--danger-dark); font-size: 13px; line-height: 1.45; }

.delete-link { color: var(--danger); font-weight: 650; }
.delete-link:hover { color: var(--danger-dark); text-decoration-thickness: 2px; }
.confirm-layout { width: min(720px, calc(100% - 96px)); margin: 74px auto; }
.confirm-card { padding: 38px 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.confirm-card h1 { margin: 14px 0; font-size: 38px; }
.confirm-explanation { max-width: 540px; color: var(--text); line-height: 1.65; }
.confirm-details { margin: 26px 0; border-top: 1px solid var(--line); }
.confirm-details div { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.confirm-details dt { color: var(--muted); font-size: 13px; }
.confirm-details dd { margin: 0; color: var(--navy); font-weight: 650; overflow-wrap: anywhere; }
.confirm-actions { display: flex; align-items: center; gap: 12px; }
.confirm-note { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.delete-button { min-height: 42px; padding: 9px 15px; border: 1px solid var(--danger); border-radius: 6px; background: var(--danger); color: var(--white); font-weight: 650; }
.delete-button:hover { border-color: var(--danger-dark); background: var(--danger-dark); }

@media (max-width: 900px) {
  .dashboard, .login-layout { width: calc(100% - 48px); }
  .login-layout { gap: 32px; }
  .capacity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px), (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .topbar, .topbar-inner { min-height: 72px; }
  .topbar-inner { flex-wrap: wrap; gap: 10px 12px; padding: 12px 20px; }
  .topbar-label { display: none; }
  .wordmark { flex: 0 0 auto; }
  .company-mark { width: 38px; height: 38px; }
  .account { flex: 1 1 130px; justify-content: flex-end; gap: 12px; min-width: 0; }
  .account > span { min-width: 0; text-align: right; overflow-wrap: anywhere; }
  .text-button { min-height: 44px; white-space: nowrap; }

  .login-layout {
    width: calc(100% - 40px);
    min-height: 0;
    margin: 28px auto 48px;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .login-intro { padding: 0; }
  .login-intro h1 { margin: 20px 0 16px; font-size: clamp(34px, 10vw, 44px); }
  .login-intro p { font-size: 15px; }
  .event-strip { display: grid; grid-template-columns: 1.35fr .8fr .8fr; gap: 14px; margin-top: 24px; padding-top: 18px; }
  .event-strip strong { font-size: 14px; }
  .login-panel { padding: 26px 22px; }
  .login-panel h2 { font-size: 31px; }
  .login-form input { font-size: 16px; }

  .dashboard { width: calc(100% - 40px); padding: 34px 0 48px; }
  .heading-row { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 32px; }
  .heading-row h1 { margin: 14px 0 10px; font-size: clamp(32px, 9vw, 42px); }
  .subtitle { font-size: 14px; }
  .heading-aside { align-items: center; flex-direction: row; flex-wrap: wrap; gap: 10px; }
  .section-title { align-items: flex-start; flex-direction: column; gap: 5px; }
  .capacity-grid { gap: 10px; }
  .capacity-card { min-width: 0; min-height: 0; padding: 16px; }
  .day-line { min-height: 42px; line-height: 1.35; }
  .day-line > span:first-child { overflow-wrap: anywhere; }
  .card-index { display: none; }
  .capacity-value { margin: 12px 0 10px; font-size: 32px; }
  .capacity-caption { margin-top: 9px; }

  .table-panel { margin-top: 30px; }
  .table-heading { align-items: stretch; flex-direction: column; gap: 16px; padding: 22px 18px; }
  .table-heading h2 { font-size: 29px; }
  .outline-button, .filter-button, .delete-button { min-height: 44px; }
  .filter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 16px 18px; }
  .filter-row label { grid-column: 1 / -1; }
  .filter-row select { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
  .clear-filter { display: inline-flex; align-items: center; min-height: 44px; }
  .shown { grid-column: 2; margin-left: 0; justify-self: end; align-self: center; }
  .table-scroll { overflow: visible; }
  .table-scroll table, .table-scroll tbody { display: block; width: 100%; min-width: 0; }
  .table-scroll thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .participant-row { display: block; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .participant-row td[data-label] {
    display: grid;
    grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 5px 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .participant-row td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 400; }
  .participant-row td.name-cell { font-size: 15px; }
  .participant-row .delete-link { display: inline-flex; align-items: center; min-height: 44px; justify-self: start; }
  .empty-row, .empty-row td { display: block; width: 100%; }
  .empty-row td { padding: 20px 18px; }
  .table-footer { flex-direction: column; gap: 5px; padding: 15px 18px; }

  .confirm-layout { width: calc(100% - 40px); margin: 32px auto 48px; }
  .confirm-card { padding: 26px 22px; }
  .confirm-card h1 { font-size: 33px; }
  .confirm-details div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .confirm-actions { flex-wrap: wrap; }
}
