:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #526175;
  --line: #d8e3ef;
  --paper: #ffffff;
  --page: #eef5fb;
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --blue-soft: #dbeafe;
  --green: #059669;
  --green-dark: #047857;
  --green-soft: #d1fae5;
  --cyan: #0e7490;
  --orange: #ea580c;
  --red: #dc2626;
  --shadow: 0 18px 42px rgba(31, 48, 72, 0.12);
  --shadow-strong: 0 24px 60px rgba(31, 48, 72, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.16), transparent 26rem),
    radial-gradient(circle at 82% 10%, rgba(5, 150, 105, 0.14), transparent 25rem),
    linear-gradient(135deg, #f8fbff 0%, var(--page) 48%, #f4fbf7 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #0f766e, #1d4ed8);
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2.05rem);
  line-height: 1.15;
}

.brand p,
.time {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.time {
  color: #375276;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 1px 0 rgba(23, 32, 51, 0.04);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.button.primary {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), #3b82f6);
  color: #fff;
}

.button.success {
  border-color: var(--green);
  background: linear-gradient(135deg, var(--green), #10b981);
  color: #fff;
}

.button.warning {
  min-height: 48px;
  border-color: var(--orange);
  background: linear-gradient(135deg, #f97316, var(--orange));
  color: #fff;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.55);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(216, 227, 239, 0.92);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.welcome {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 40px);
}

.welcome::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.welcome h2 {
  max-width: 13em;
  margin: 0 0 12px;
  font-size: clamp(2rem, 3.6vw, 3.05rem);
  letter-spacing: 0;
  line-height: 1.06;
}

.welcome p {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.65;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  padding: 24px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 18px 36px rgba(31, 48, 72, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.choice::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -46px;
  width: 150px;
  height: 150px;
  border: 28px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.choice > * {
  position: relative;
  z-index: 1;
}

.choice-reserved {
  background: linear-gradient(145deg, #1d4ed8, #38bdf8);
}

.choice-walkin {
  background: linear-gradient(145deg, #047857, #34d399);
}

.choice [data-icon] {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.choice strong {
  display: block;
  margin-top: 22px;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.2;
}

.choice span {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.choice:hover,
.nav a:hover,
.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.choice:focus-visible,
.nav a:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 4px solid rgba(56, 189, 248, 0.45);
  outline-offset: 3px;
}

.section {
  padding: 22px 24px 24px;
  margin-top: 16px;
}

.active-section {
  min-height: 240px;
}

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

.section h2 {
  margin: 0;
  font-size: 1.28rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

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

th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

tbody tr {
  background: #fff;
}

tbody tr:hover {
  background: #f8fbff;
}

.right {
  text-align: right;
}

.visit-time {
  display: inline-flex;
  min-width: 76px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #1d4ed8;
  background: var(--blue-soft);
  font-weight: 900;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-right: 10px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  vertical-align: middle;
}

.type-reserved {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.type-walkin {
  color: var(--green-dark);
  background: var(--green-soft);
}

.empty {
  padding: 36px 12px;
  text-align: center;
  color: var(--muted);
  font-weight: 900;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: #40516a;
  font-size: 0.92rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(23, 32, 51, 0.03);
}

textarea {
  min-height: 108px;
  resize: vertical;
}

.reservation-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.reservation-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: linear-gradient(90deg, #eff6ff, #ffffff);
}

.reservation-time {
  min-width: 70px;
  min-height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue-dark);
  background: #dbeafe;
  font-weight: 900;
}

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

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.toast,
.dialog-backdrop {
  position: fixed;
  z-index: 20;
}

.toast {
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 28px));
  padding: 15px 20px;
  border-radius: 8px;
  color: #fff;
  background: rgba(17, 24, 39, 0.94);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.show {
  opacity: 1;
}

.dialog-backdrop {
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.52);
}

.dialog-backdrop.open {
  display: grid;
}

.dialog {
  width: min(440px, 100%);
  padding: 26px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-strong);
}

.dialog h3 {
  margin: 0 0 8px;
}

.dialog p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 28px, 1040px);
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1040px);
    padding-top: 16px;
  }

  .topbar,
  .choices,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .nav {
    justify-content: stretch;
  }

  .nav a,
  .actions .button {
    flex: 1 1 auto;
  }

  .choice {
    min-height: 156px;
  }

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