:root {
  --bg: #f4f6f8;
  --bg-soft: #fbfcfd;
  --panel: #ffffff;
  --text: #1b2430;
  --muted: #647187;
  --line: #d9e1ea;
  --line-strong: #c7d1dd;
  --primary: #1f6fff;
  --primary-dark: #0f58da;
  --primary-soft: #edf4ff;
  --success: #1f8f5f;
  --success-soft: #eaf7f0;
  --warning: #ba7a16;
  --warning-soft: #fff5e4;
  --danger: #cb4b43;
  --danger-soft: #fff1ef;
  --shadow: 0 18px 44px rgba(24, 39, 75, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(31, 111, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 56%, #eef2f5 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.container {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(217, 225, 234, 0.92);
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.9);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f6fff 0%, #4fa0ff 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(31, 111, 255, 0.24);
}

.brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-text strong {
  font-size: 1rem;
  line-height: 1.2;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.85rem;
}

.main-nav {
  display: flex;
  width: 100%;
  gap: 10px;
  order: 3;
}

.nav-link {
  flex: 1;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(217, 225, 234, 0.95);
  background: rgba(247, 250, 252, 0.94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--muted);
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.nav-link.is-active {
  background: var(--primary-soft);
  border-color: rgba(31, 111, 255, 0.22);
  color: #184ca8;
}

.nav-link:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  order: 2;
}

.user-chip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 16px;
  background: #f4f7fb;
  border: 1px solid rgba(217, 225, 234, 0.95);
}

.user-chip strong {
  font-size: 0.95rem;
}

.user-chip span {
  color: var(--muted);
  font-size: 0.82rem;
}

.page-shell {
  padding: 18px 0 44px;
}

.hero-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(217, 225, 234, 0.96);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card,
.panel,
.action-card {
  padding: 20px;
}

.hero-card {
  display: grid;
  gap: 20px;
}

.flow-hero,
.section-hero {
  grid-template-columns: 1fr;
}

.flow-hero-copy,
.section-hero-copy {
  display: grid;
  gap: 14px;
}

.flow-hero-side,
.flow-mini {
  display: grid;
  gap: 12px;
}

.summary-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  border: 1px solid rgba(217, 225, 234, 0.95);
}

.summary-label,
.section-kicker {
  display: inline-block;
  color: #48617f;
  font-size: 0.82rem;
  font-weight: 700;
}

.summary-value {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  line-height: 1.2;
}

.summary-text {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.compact-summary {
  align-self: start;
}

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

.flow-mini-item {
  min-height: 44px;
  border-radius: 14px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7f9fc;
  border: 1px solid rgba(217, 225, 234, 0.95);
  color: var(--muted);
  font-weight: 700;
}

.flow-mini-item.is-done {
  background: var(--success-soft);
  color: var(--success);
}

.flow-mini-item.is-current {
  background: var(--primary-soft);
  color: var(--primary);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #2d5fb6;
  font-size: 0.82rem;
  font-weight: 800;
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.section-title h1,
.section-title h2,
.section-title h3,
.hero-card h1,
.panel h1,
.panel h2,
.panel h3 {
  margin: 0;
}

.section-title-spread {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.compact-title {
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(1.8rem, 5.6vw, 2.6rem);
  line-height: 1.16;
}

h2 {
  font-size: clamp(1.2rem, 4.2vw, 1.6rem);
}

h3 {
  font-size: 1.02rem;
}

.lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.form-card,
.card-list,
.compact-list,
.dashboard-grid,
.flow-steps,
.info-grid {
  display: grid;
  gap: 16px;
}

.flow-steps {
  margin-top: 18px;
  grid-template-columns: 1fr;
  display: grid;
  gap: 12px;
}

.step-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 225, 234, 0.94);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(24, 39, 75, 0.05);
}

.step-card.is-current {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  border-color: rgba(31, 111, 255, 0.2);
}

.step-index {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.step-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.dashboard-grid {
  margin-top: 18px;
  grid-template-columns: 1fr;
}

.dashboard-card-primary {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.mini-booking-list {
  display: grid;
  gap: 12px;
}

.mini-booking-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f9fc;
  border: 1px solid rgba(217, 225, 234, 0.95);
}

.mini-booking-item span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.empty-inline {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  background: #f7f9fc;
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

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

.info-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(217, 225, 234, 0.9);
  background: #f8fafc;
}

.info-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.info-card strong {
  font-size: 1rem;
  line-height: 1.45;
  word-break: break-word;
}

.search-bar,
.button-row,
.stats-bar,
.meta-grid,
.card-title-row,
.actions-cluster,
.inline-form,
.toggle-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-bar,
.stacked-on-mobile,
.actions-cluster {
  align-items: stretch;
}

.search-bar > *,
.button-row form > button {
  width: 100%;
}

.search-bar input,
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 13px 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 111, 255, 0.12);
  background: #fff;
}

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

.field span {
  font-weight: 700;
}

.filter-panel {
  margin-top: 18px;
}

.stats-bar {
  margin-top: 14px;
}

.stat-pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #2354ac;
  font-size: 0.88rem;
  font-weight: 700;
}

.tag-muted {
  background: #eef2f6;
  color: #5f6f84;
}

.tag-success {
  background: var(--success-soft);
  color: var(--success);
}

.space-list,
.booking-section {
  margin-top: 18px;
}

.list-card {
  display: grid;
  gap: 16px;
  align-items: start;
}

.booking-card {
  display: grid;
  gap: 16px;
}

.booking-card-history {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.card-main,
.booking-main {
  display: grid;
  gap: 10px;
}

.card-title-row {
  align-items: center;
  margin: 0;
}

.meta-grid {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.description {
  margin: 0;
  color: #324257;
  line-height: 1.72;
}

.action-hint,
.form-hint,
.muted {
  color: var(--muted);
  line-height: 1.6;
}

.card-actions,
.actions-cluster {
  display: grid;
  gap: 10px;
}

.actions-cluster form,
.card-actions form {
  margin: 0;
}

.button-row > *,
.card-actions > *,
.actions-cluster > *,
.actions-cluster form,
.actions-cluster form > button,
.card-actions form > button {
  width: 100%;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

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

.primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  background: var(--primary-soft);
  color: #1a55b0;
}

.ghost-button {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.danger-button {
  background: var(--danger-soft);
  color: var(--danger);
}

.link-like {
  text-decoration: none;
}

.wide {
  width: 100%;
}

.inline-error {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
  line-height: 1.6;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 700;
}

.flash-info {
  background: var(--primary-soft);
  color: #2053a9;
}

.flash-success {
  background: var(--success-soft);
  color: #1f7f57;
}

.flash-warning {
  background: var(--warning-soft);
  color: #8b5d14;
}

.auth-card {
  min-height: 0;
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #334259;
}

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

.compact-filter-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.detail-panel {
  margin-top: 18px;
}

.note-box {
  padding: 15px 16px;
  border-radius: 16px;
  background: #f7f9fc;
  border: 1px solid rgba(217, 225, 234, 0.94);
  line-height: 1.7;
}

.success-note {
  background: var(--success-soft);
  border-color: rgba(31, 143, 95, 0.15);
}

.subtle-panel {
  background: #fbfcfe;
  border-style: dashed;
}

.success-panel {
  border-color: rgba(31, 143, 95, 0.22);
}

.error-panel {
  border-color: rgba(203, 75, 67, 0.22);
}

.booking-success-panel {
  display: grid;
  gap: 18px;
}

.seat-section {
  margin-top: 18px;
}

.seat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.seat-item {
  min-width: 52px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.seat-available {
  background: var(--success-soft);
  color: var(--success);
}

.booking-next-card {
  margin-top: 18px;
}

.empty-state {
  padding: 28px 20px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-xl);
}

.process-empty {
  margin-top: 18px;
}

.empty-state h2 {
  margin-bottom: 10px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.center-row {
  justify-content: center;
  margin-top: 16px;
}

.sub-card {
  padding: 18px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid rgba(217, 225, 234, 0.86);
}

.plain-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
  color: #334259;
}

.admin-grid {
  align-items: start;
}

@media (min-width: 641px) {
  .container {
    width: min(1120px, calc(100% - 40px));
  }

  .hero-card,
  .panel,
  .action-card {
    padding: 24px;
  }

  .main-nav {
    width: auto;
  }

  .button-row > *,
  .card-actions > *,
  .actions-cluster > * {
    width: auto;
  }

  .button-row form > button,
  .search-bar > * {
    width: auto;
  }

  .actions-cluster form,
  .actions-cluster form > button,
  .card-actions form > button {
    width: auto;
  }

  .search-bar input {
    flex: 1 1 260px;
    min-width: 260px;
  }

  .meta-grid {
    gap: 12px 20px;
  }
}

@media (max-width: 640px) {
  .section-title-spread {
    flex-direction: column;
    align-items: flex-start;
  }
  .brand-text small {
    display: none;
  }
  .user-chip span {
    display: none;
  }
  .user-chip strong {
    font-size: 0.85rem;
  }
  .ghost-button {
    padding: 0 12px;
  }
  .flow-mini-item {
    font-size: 0.85rem;
    padding: 0 8px;
  }
}

@media (min-width: 769px) {
  .header-inner {
    flex-wrap: nowrap;
    gap: 20px;
  }

  .main-nav {
    order: 2;
    margin-left: 20px;
    margin-right: auto;
  }

  .header-actions {
    order: 3;
  }

  .flow-hero,
  .section-hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    align-items: center;
  }

  .flow-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  }

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

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

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

  .list-card {
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  }

  .booking-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .card-actions-mobile-wide,
  .actions-cluster {
    min-width: 220px;
  }
}

@media (min-width: 1024px) {
  .page-shell {
    padding-top: 28px;
    padding-bottom: 56px;
  }

  .brand-text strong {
    font-size: 1.04rem;
  }

  .seat-item {
    min-width: 56px;
  }
}
