:root {
  --bg: #eef5f2;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --text: #17294a;
  --muted: #61708f;
  --line: #dce6f0;
  --green: #12a14c;
  --green-dark: #0b7e3a;
  --green-soft: #ebfff2;
  --blue: #2680ff;
  --purple: #6b5cf6;
  --danger: #e44a3c;
  --shadow: 0 30px 70px rgba(19, 37, 74, 0.12);
  --hero-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(32, 131, 255, 0.1), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #edf4fa 100%);
}

button,
input {
  font: inherit;
}

.page {
  width: min(1420px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0;
}

.reservation-page {
  width: min(1240px, calc(100% - 28px));
}

.page-overlap {
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

.shell,
.form-card,
.table-card,
.stat-card,
.flash-message,
.terms-modal {
  background: var(--panel);
  border: 1px solid rgba(201, 214, 227, 0.8);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.shell {
  padding: 30px 34px 18px;
}

.reservation-card {
  padding: 34px 34px 28px;
}

.login-card {
  max-width: 720px;
  margin: 0 auto;
}

.table-card {
  padding: 28px 28px 24px;
}

.flash-list {
  margin-bottom: 18px;
}

.flash-message {
  padding: 14px 18px;
  border-radius: 18px;
  color: #14653c;
  background: #ebfff2;
}

.flash-error {
  color: #a63b32;
  background: #fff2ef;
}

.hero-banner {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(6, 28, 21, 0.95) 0%, rgba(8, 40, 27, 0.86) 42%, rgba(25, 52, 34, 0.55) 70%, rgba(30, 45, 32, 0.45) 100%),
    radial-gradient(circle at 18% 16%, rgba(51, 255, 119, 0.1), transparent 26%),
    linear-gradient(135deg, #071c15, #0f3725 52%, #2f4b31);
  box-shadow: var(--hero-shadow);
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(120, 255, 175, 0.12), transparent 14%),
    repeating-radial-gradient(circle at 8% 8%, rgba(120, 255, 175, 0.14) 0 2px, transparent 2px 18px);
  opacity: 0.36;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 28, 21, 0.05), rgba(6, 28, 21, 0.28));
}

.hero-content {
  width: min(1420px, calc(100% - 28px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 22px 0 62px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.brand-logo {
  display: block;
  width: min(100%, 210px);
  height: auto;
}

.hero-copy {
  color: #ffffff;
  padding-top: 8px;
}

.hero-date {
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9effb7;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 0.96;
  margin: 0 0 12px;
}

.hero-copy p {
  max-width: 520px;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.34;
  color: rgba(255, 255, 255, 0.9);
}

.hero-points {
  display: none;
}

.form-header {
  text-align: center;
  margin-bottom: 28px;
}

.form-header h2,
.form-header h1 {
  margin: 0 0 10px;
  font-size: clamp(2.4rem, 4vw, 4rem);
}

.form-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.25rem;
}

.reservation-form {
  display: block;
}

.form-section {
  padding: 18px 0 12px;
}

.form-section-bordered {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-badge,
.stat-icon,
.date-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.section-title h3,
.topbar h1,
.table-head h2 {
  margin: 0;
}

.section-title h3 {
  font-size: 2rem;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.single-grid {
  grid-template-columns: 1fr;
}

.login-section {
  padding-top: 8px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 1rem;
}

label b {
  color: #ff473d;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 1.06rem;
}

input:focus {
  outline: 2px solid rgba(18, 161, 76, 0.12);
  border-color: rgba(18, 161, 76, 0.3);
}

.companions-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}

.companion-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 80px;
  gap: 18px;
  align-items: end;
}

.primary-button,
.secondary-button,
.remove-button,
.export-button {
  border: 0;
  border-radius: 999px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

.primary-button:disabled,
.secondary-button:disabled,
.remove-button:disabled,
.export-button:disabled,
.modal-close:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.primary-button,
.export-button {
  background: linear-gradient(90deg, var(--green) 0%, #119849 100%);
  color: #fff;
}

.primary-button:hover,
.export-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(90deg, var(--green-dark) 0%, #0d6f34 100%);
}

.secondary-button,
.remove-button {
  background: #fff;
  color: var(--green);
  border: 1px solid rgba(18, 161, 76, 0.32);
}

.remove-button {
  color: var(--danger);
  border-color: rgba(228, 74, 60, 0.24);
  min-height: 56px;
}

.secondary-button,
.export-button {
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.large-button {
  width: 100%;
  min-height: 68px;
  font-size: 1.42rem;
  font-weight: 700;
  margin-top: 10px;
}

.trust-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.trust-bar article {
  padding: 8px 8px 0;
  text-align: center;
}

.trust-bar strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.trust-bar p {
  margin: 0;
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 20, 38, 0.58);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.terms-modal {
  width: min(760px, 100%);
  padding: 26px;
}

.terms-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.terms-modal-header h3 {
  margin: 0;
  font-size: 2rem;
}

.modal-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #eef4fa;
  color: var(--text);
  font-size: 1.7rem;
  cursor: pointer;
}

.terms-scroll {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f9fbff;
  padding: 18px;
}

.terms-text {
  margin: 0;
  white-space: pre-wrap;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
}

.terms-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0 22px;
  color: var(--text);
}

.terms-check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.terms-actions,
.topbar,
.table-head,
.panel-actions,
.id-cell,
.stat-card {
  display: flex;
  align-items: center;
}

.terms-actions {
  justify-content: flex-end;
  gap: 12px;
}

.terms-warning {
  margin: -6px 0 18px;
  color: var(--danger);
  font-size: 0.98rem;
  font-weight: 600;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.topbar h1 {
  font-size: 3rem;
}

.date-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-weight: 700;
}

.panel-actions {
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  gap: 18px;
  padding: 24px;
}

.stat-card strong {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1;
}

.stat-card p {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.stat-green {
  background: linear-gradient(180deg, #f7fffb 0%, #effaf3 100%);
}

.stat-blue {
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
}

.stat-purple {
  background: linear-gradient(180deg, #fdfcff 0%, #f6f2ff 100%);
}

.stat-blue .stat-icon {
  background: var(--blue);
}

.stat-purple .stat-icon {
  background: var(--purple);
}

.stat-green strong {
  color: var(--green);
}

.stat-blue strong {
  color: var(--blue);
}

.stat-purple strong {
  color: var(--purple);
}

.table-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.table-head h2 {
  font-size: 2rem;
}

.search-box {
  width: min(440px, 100%);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #e7eef6;
  border-radius: 22px;
}

.reservations-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.reservations-table th,
.reservations-table td {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid #edf2f8;
}

.id-cell {
  gap: 12px;
}

.toggle-button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5c6e92;
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}

.people-badge {
  display: inline-flex;
  justify-content: center;
  min-width: 48px;
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}

.details-hidden {
  display: none;
}

.details-panel {
  margin: 0 10px 12px;
  padding: 18px;
  border: 1px solid #dcefe4;
  border-radius: 18px;
  background: #fcfffd;
}

.details-panel h3 {
  margin: 0 0 18px;
  color: var(--green);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 10px 0;
}

.details-grid-head {
  border-bottom: 1px solid #edf2f8;
  font-weight: 600;
}

.empty-text,
.table-empty,
.form-header p,
.section-title p {
  color: var(--muted);
}

@media (max-width: 1120px) {
  .hero-content {
    grid-template-columns: 160px minmax(0, 1fr);
    padding-bottom: 34px;
  }

  .form-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .page,
  .reservation-page {
    width: min(100% - 18px, 1420px);
  }

  .page-overlap {
    margin-top: -18px;
  }

  .hero-copy h1 {
    font-size: 1.7rem;
  }

  .hero-copy p {
    font-size: 0.9rem;
  }

  .form-header h2,
  .form-header h1 {
    font-size: 2.1rem;
  }

  .section-title h3 {
    font-size: 1.6rem;
  }

  .form-grid,
  .form-grid-3,
  .companion-row,
  .details-grid,
  .trust-bar,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .table-head,
  .panel-actions,
  .terms-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .export-button,
  .secondary-button,
  .remove-button,
  .search-box {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-content {
    width: min(100% - 18px, 1420px);
    padding-top: 8px;
    padding-bottom: 12px;
    gap: 10px;
    grid-template-columns: 1fr;
  }

  .hero-banner {
    min-height: 140px;
  }

  .brand-logo {
    width: min(100%, 118px);
  }

  .brand-badge {
    padding: 8px 10px;
    border-radius: 14px;
  }

  .shell,
  .reservation-card,
  .table-card {
    padding: 18px 14px;
  }

  .form-header {
    margin-bottom: 18px;
  }

  .form-header h2,
  .form-header h1 {
    font-size: 1.8rem;
  }

  .form-header p,
  .section-title p,
  label,
  .hero-copy p,
  .hero-points p,
  .trust-bar p {
    font-size: 0.95rem;
  }

  .hero-copy h1 {
    font-size: 1.18rem;
  }

  .hero-date {
    margin-bottom: 4px;
    font-size: 0.62rem;
  }

  .section-title {
    gap: 12px;
    margin-bottom: 18px;
  }

  .section-badge {
    width: 36px;
    height: 36px;
  }

  .form-section {
    padding: 12px 0 8px;
  }

  .companion-row,
  .form-grid,
  .form-grid-3 {
    gap: 14px;
  }

  input {
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 1rem;
  }

  .secondary-button,
  .export-button {
    padding: 12px 18px;
  }

  .large-button {
    min-height: 58px;
    font-size: 1.15rem;
    margin-top: 6px;
  }

  .terms-modal {
    padding: 16px;
    border-radius: 22px;
  }

  .terms-modal-header h3 {
    font-size: 1.55rem;
  }

  .terms-scroll {
    max-height: 220px;
    padding: 14px;
  }

  .terms-text {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .trust-bar {
    gap: 8px;
    margin-top: 12px;
  }

  .trust-bar strong {
    font-size: 1rem;
  }
}
