:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f2f4f5;
  color: #1d2a2f;
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

button, input { font: inherit; }

.login-layout {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.5rem;
  background: linear-gradient(145deg, #0e4b56 0%, #12323b 55%, #17252b 100%);
}

.login-card {
  width: min(100%, 25rem);
  padding: 2rem;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 24%);
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: #bf642e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.5rem); }

.login-card form { display: grid; gap: 1rem; margin-top: 1.75rem; }
.login-card label { display: grid; gap: 0.4rem; font-weight: 700; }
.login-card input { width: 100%; padding: 0.8rem; border: 1px solid #9ba8ad; border-radius: 0.35rem; }
.login-card button, .toolbar button { border: 0; border-radius: 0.35rem; cursor: pointer; font-weight: 800; }
.login-card button { padding: 0.85rem; background: #bf642e; color: #fff; }
.form-error { min-height: 1.5rem; margin: 0; color: #a32929; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: #12323b;
  color: #fff;
}

.toolbar h1 { font-size: 1.35rem; }
.toolbar-meta { display: flex; align-items: center; gap: 1rem; }
.toolbar button { padding: 0.55rem 0.8rem; background: #fff; color: #12323b; }

.rotor-main { padding: 1.25rem clamp(1rem, 4vw, 3rem) 3rem; }
.board-status { margin: 0 0 1rem; color: #54666d; }
.active-tours-panel { margin: 0 0 1.25rem; padding: 1rem; border: 1px solid #e6c7b3; border-radius: 0.5rem; background: #fff6ef; }
.active-tours-panel[hidden] { display: none; }
.active-tours-panel > h2 { margin: 0 0 0.75rem; color: #743b1f; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.active-tours { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 0.7rem; }
.active-tour { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem; border: 1px solid #e2c1ad; border-radius: 0.4rem; background: #fff; }
.active-tour-name, .active-tour-meta { margin: 0; }
.active-tour-name { font-weight: 800; }
.active-tour-meta { margin-top: 0.2rem; color: #765646; font-size: 0.78rem; text-transform: capitalize; }
.tour-action { padding: 0.55rem 0.7rem; border: 0; border-radius: 0.3rem; background: #a84e21; color: #fff; cursor: pointer; font-size: 0.75rem; font-weight: 800; }
.tour-action:disabled { cursor: wait; opacity: 0.55; }
.roster-panel { margin: 0 0 1.25rem; padding: 1rem; border: 1px solid #cfd7da; border-radius: 0.5rem; background: #fff; }
.roster-panel header { margin-bottom: 0.75rem; }
.roster-panel h2 { margin: 0; font-size: 1.1rem; }
.roster { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.55rem; }
.roster-person { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.7rem 0.8rem; border: 1px solid #e1e7e9; border-radius: 0.35rem; background: #f8fafa; }
.roster-name, .roster-meta { margin: 0; }
.roster-name { font-weight: 800; }
.roster-meta { margin-top: 0.18rem; color: #61747a; font-size: 0.75rem; text-transform: capitalize; }
.roster-empty { margin: 0; color: #6c7c82; font-style: italic; }
.presence-action { padding: 0.45rem 0.6rem; border: 1px solid #6e7e84; border-radius: 0.3rem; background: #fff; color: #29434b; cursor: pointer; font-size: 0.72rem; font-weight: 800; white-space: nowrap; }
.presence-action:hover { background: #29434b; color: #fff; }
.presence-action:disabled { cursor: wait; opacity: 0.55; }
.queue-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.queue-card { overflow: hidden; border: 1px solid #cfd7da; border-radius: 0.5rem; background: #fff; box-shadow: 0 0.3rem 1.2rem rgb(28 51 59 / 8%); }
.queue-card header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; background: #dce8e8; border-bottom: 1px solid #c5d2d4; }
.queue-card h2 { margin: 0; font-size: 1rem; text-transform: capitalize; }
.queue-count { min-width: 1.8rem; padding: 0.15rem 0.45rem; border-radius: 1rem; background: #12323b; color: #fff; text-align: center; font-size: 0.8rem; font-weight: 800; }
.queue-card ol { margin: 0; padding: 0; list-style: none; }
.queue-person { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-top: 1px solid #edf0f1; font-weight: 700; }
.queue-person-name { flex: 1; }
.queue-actions { display: flex; align-items: center; gap: 0.45rem; }
.reorder-actions { display: inline-flex; gap: 0.2rem; }
.reorder-actions button { display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border: 1px solid #91a0a5; border-radius: 0.25rem; background: #f7f9f9; color: #29434b; cursor: pointer; font-weight: 900; }
.reorder-actions button:disabled { cursor: default; opacity: 0.25; }
.queue-position { display: grid; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: 50%; background: #e57b3b; color: #fff; font-size: 0.8rem; }
.queue-action { padding: 0.45rem 0.6rem; border: 1px solid #bf642e; border-radius: 0.3rem; background: #fff7f1; color: #8c431c; cursor: pointer; font-size: 0.72rem; font-weight: 800; }
.queue-action:hover { background: #bf642e; color: #fff; }
.queue-action:disabled { cursor: wait; opacity: 0.55; }
.queue-empty { padding: 1.4rem 1rem; color: #6c7c82; font-style: italic; }

.audit-panel { margin-top: 1.5rem; padding: 1rem; border: 1px solid #cfd7da; border-radius: 0.5rem; background: #fff; }
.audit-panel header { display: flex; justify-content: space-between; align-items: end; margin-bottom: 0.75rem; }
.audit-panel h2 { margin: 0; }
.audit-table-wrap { overflow-x: auto; }
.audit-panel table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.audit-panel th, .audit-panel td { padding: 0.6rem; border-bottom: 1px solid #e8edef; text-align: left; white-space: nowrap; }
.audit-panel th { color: #53666d; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.audit-result { font-weight: 800; text-transform: capitalize; }
.audit-result-accepted { color: #267046; }
.audit-result-denied, .audit-result-failed { color: #9b3434; }
.audit-more { margin-top: 0.8rem; padding: 0.55rem 0.75rem; border: 1px solid #7f9198; border-radius: 0.3rem; background: #f6f8f8; cursor: pointer; font-weight: 700; }

@media (max-width: 38rem) {
  .toolbar { align-items: flex-start; }
  .toolbar-meta { align-items: flex-end; flex-direction: column; }
  .queue-person { align-items: flex-start; flex-wrap: wrap; }
  .queue-actions { width: 100%; justify-content: flex-end; }
}
