:root {
  --bg: #f6f1e8;
  --bg-strong: #d7d2c6;
  --panel: rgba(255, 251, 246, 0.88);
  --panel-strong: rgba(255, 248, 239, 0.94);
  --ink: #1d2430;
  --muted: #5f6774;
  --line: rgba(29, 36, 48, 0.1);
  --accent: #b45309;
  --accent-2: #165f57;
  --accent-3: #9f1239;
  --danger: #991b1b;
  --shadow: 0 24px 70px rgba(36, 41, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(180, 83, 9, 0.18), transparent 24%),
    radial-gradient(circle at 85% 20%, rgba(22, 95, 87, 0.16), transparent 22%),
    radial-gradient(circle at bottom right, rgba(159, 18, 57, 0.12), transparent 20%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 100%);
  font-family: "Source Sans 3", sans-serif;
}

h1, h2, h3, strong, .eyebrow, button {
  font-family: "Space Grotesk", sans-serif;
}

a {
  color: inherit;
}

button, input, select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(135deg, var(--ink) 0%, #374151 100%);
  color: white;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

button.secondary, .ghost-link {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

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

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.9);
}

input:focus, select:focus {
  outline: 2px solid rgba(22, 95, 87, 0.18);
  border-color: rgba(22, 95, 87, 0.35);
}

.auth-shell, .page-shell, .kiosk-shell {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  gap: 1.75rem;
  align-items: stretch;
  grid-template-columns: 1.2fr 0.88fr;
  padding: 2rem 0 2.5rem;
}

.hero-panel, .auth-card, .panel, .stat-card, .board-card {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

.hero-panel, .auth-card, .panel {
  border-radius: 28px;
  padding: 1.6rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  min-height: 640px;
  background:
    linear-gradient(145deg, rgba(16, 24, 40, 0.9), rgba(28, 36, 50, 0.8)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.14), transparent 26%);
  color: #f8fafc;
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
}

.hero-panel::before {
  width: 320px;
  height: 320px;
  top: -90px;
  right: -80px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 70%);
}

.hero-panel::after {
  width: 280px;
  height: 280px;
  bottom: -100px;
  left: -40px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.14), transparent 70%);
}

.hero-panel h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 0.92;
  margin: 0.65rem 0 1rem;
  max-width: 10ch;
}

.hero-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.hero-highlights,
.hero-metric-grid,
.seed-grid {
  display: grid;
  gap: 0.85rem;
}

.hero-highlights {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.4rem 0;
}

.hero-chip,
.hero-metric,
.seed-grid p {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
}

.hero-chip {
  padding: 0.95rem 1rem;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.92rem;
}

.hero-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-metric {
  padding: 1rem;
}

.hero-metric strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.2rem;
}

.auth-card {
  background:
    linear-gradient(180deg, var(--panel-strong) 0%, rgba(255, 251, 246, 0.82) 100%);
  display: grid;
  align-content: center;
  padding: 2rem;
}

.auth-card h2 {
  margin: 0.3rem 0 0.75rem;
  font-size: 2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent);
}

.hero-panel .eyebrow,
.hero-panel .subtle {
  color: rgba(248, 250, 252, 0.8);
}

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

.stack {
  display: grid;
  gap: 1rem;
}

.small-gap {
  gap: 0.6rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span,
.seed-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.seed-users {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

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

.seed-grid p,
.list-row {
  margin: 0.45rem 0;
}

.seed-grid p {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-color: rgba(29, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.seed-grid span {
  color: var(--muted);
  font-size: 0.95rem;
}

.page-shell, .kiosk-shell {
  padding: 1.2rem 0 2rem;
}

.view-switcher {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.active-tab {
  background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
  color: white;
  box-shadow: 0 14px 32px rgba(180, 83, 9, 0.18);
}

.topbar, .kiosk-header, .panel-head, .topbar-actions, .list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar, .kiosk-header {
  margin-bottom: 1.25rem;
}

.topbar h1, .kiosk-header h1 {
  margin: 0.2rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-card {
  border-radius: 22px;
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
}

.stat-card strong {
  font-size: 1.6rem;
}

.panel {
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.table-wrap {
  overflow-x: auto;
}

.inline-user-form {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1fr auto;
  gap: 0.6rem;
  min-width: 540px;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-label input {
  width: auto;
}

.user-form {
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.8rem 0.65rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.pill {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(28, 27, 25, 0.08);
}

.pill.pending {
  background: rgba(154, 52, 18, 0.12);
  color: var(--accent);
}

.pill.in_progress {
  background: rgba(21, 94, 117, 0.12);
  color: #155e75;
}

.pill.completed, .pill.delivered {
  background: rgba(20, 83, 45, 0.12);
  color: var(--accent-2);
}

.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.status-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
}

.board-card {
  border-radius: 20px;
  padding: 1rem;
  display: grid;
  gap: 0.35rem;
}

.kiosk-date, .success, .error {
  border-radius: 999px;
  padding: 0.7rem 1rem;
}

.success {
  background: rgba(20, 83, 45, 0.1);
  color: var(--accent-2);
}

.error {
  background: rgba(153, 27, 27, 0.12);
  color: var(--danger);
}

@media (max-width: 980px) {
  .auth-shell, .two-col {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
  }

  .hero-highlights,
  .hero-metric-grid,
  .seed-grid {
    grid-template-columns: 1fr;
  }

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

  .inline-user-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

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

  .topbar, .kiosk-header, .topbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}
