:root {
  color-scheme: light;
  --bg: #f4efe7;
  --bg-2: #fbf8f2;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --text: #18212f;
  --muted: #667085;
  --border: rgba(24, 33, 47, 0.1);
  --accent: #0f766e;
  --accent-2: #d97706;
  --accent-3: #2563eb;
  --success: #15803d;
  --warning: #b45309;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 28%),
    linear-gradient(180deg, #fffdf9 0%, var(--bg) 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.9fr);
  gap: 24px;
  padding: 32px;
  margin-bottom: 22px;
}

.hero-copy h1 {
  margin: 12px 0 16px;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 11ch;
}

.lead {
  margin: 0;
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.02rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-aside {
  display: grid;
  gap: 16px;
}

.status-panel,
.panel,
.footer-card {
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

.auth-panel {
  position: relative;
}

.auth-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-3);
  font-weight: 800;
}

.status-panel {
  padding: 20px;
}

.status-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.status-value {
  margin-top: 8px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.status-meta {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.74);
}

.mini-card span,
.api-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.mini-card strong,
.api-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.78fr);
  gap: 22px;
  align-items: start;
}

.board-card,
.panel,
.footer-card {
  padding: 22px;
}

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

.section-head h2,
.result-panel h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-actions-stack {
  flex-direction: column;
  align-items: stretch;
  margin-top: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 26px rgba(15, 118, 110, 0.18);
}

.button.secondary {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.84);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot.occupied {
  background: var(--accent);
}

.dot.empty {
  background: #9ca3af;
}

.dot.missing {
  background: #cbd5e1;
}

.dot.aisle {
  background: #f59e0b;
}

.board {
  display: grid;
  gap: 12px;
}

.board-row {
  display: grid;
  grid-template-columns: 46px repeat(2, minmax(0, 1fr)) 18px repeat(2, minmax(0, 1fr)) 18px repeat(2, minmax(0, 1fr)) 18px repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.board-header .cell {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
  font-weight: 700;
}

.cell {
  min-height: 86px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.cell.row-label {
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--muted);
}

.cell.aisle {
  min-height: 86px;
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.06), rgba(245, 158, 11, 0.02));
  border: 1px dashed rgba(180, 83, 9, 0.2);
}

.cell.aisle::before {
  content: "";
}

.cell.missing {
  background: rgba(226, 232, 240, 0.7);
  color: #94a3b8;
  border-style: dashed;
}

.cell.empty {
  background: rgba(255, 255, 255, 0.82);
}

.cell.occupied {
  border-color: rgba(15, 118, 110, 0.2);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0.95));
}

.seat-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.seat-name {
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 700;
}

.seat-subtext {
  color: var(--muted);
  font-size: 0.84rem;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.9rem;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.field input[readonly] {
  color: #64748b;
  background: rgba(241, 245, 249, 0.8);
}

.field select {
  appearance: none;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

.roster,
.assignment-list,
.overflow-list {
  display: grid;
  gap: 10px;
}

.roster-item,
.assignment-item,
.overflow-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
}

.roster-item small,
.assignment-item small,
.overflow-item small {
  color: var(--muted);
}

.roster-item strong,
.assignment-item strong,
.overflow-item strong {
  display: block;
  font-size: 0.96rem;
}

.api-cards {
  display: grid;
  gap: 12px;
}

.api-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.result-panel {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
}

.result-panel h3 {
  margin-bottom: 14px;
}

.empty-state {
  padding: 14px;
  border-radius: 18px;
  border: 1px dashed var(--border);
  color: var(--muted);
  background: rgba(248, 250, 252, 0.7);
}

.muted-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

@media (max-width: 1120px) {
  .hero,
  .layout,
  .result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .shell {
    width: min(100% - 20px, 1440px);
    padding-top: 12px;
  }

  .hero,
  .board-card,
  .panel,
  .footer-card {
    padding: 18px;
    border-radius: 22px;
  }

  .section-head {
    flex-direction: column;
  }

  .board-row {
    gap: 6px;
    grid-template-columns: 40px repeat(2, minmax(0, 1fr)) 12px repeat(2, minmax(0, 1fr)) 12px repeat(2, minmax(0, 1fr)) 12px repeat(2, minmax(0, 1fr));
  }

  .cell {
    min-height: 76px;
    border-radius: 16px;
    padding: 8px;
  }

  .summary-grid,
  .inline-fields,
  .result-grid {
    grid-template-columns: 1fr;
  }
}
