:root {
  --bg: #09111f;
  --bg-soft: #101b2f;
  --panel: rgba(11, 19, 35, 0.76);
  --panel-strong: rgba(9, 16, 28, 0.9);
  --line: rgba(150, 178, 212, 0.18);
  --text: #f4f7fb;
  --muted: #9fb1c8;
  --accent: #f5b544;
  --accent-strong: #d68425;
  --accent-soft: rgba(245, 181, 68, 0.14);
  --success: #4cc98a;
  --danger: #f47d7d;
  --danger-soft: rgba(244, 125, 125, 0.18);
  --warning: #e6bc6b;
  --shadow: 0 24px 60px rgba(2, 8, 20, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI Variable Text", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 181, 68, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(99, 186, 151, 0.16), transparent 22%),
    linear-gradient(180deg, #07101d 0%, #0d1525 100%);
}

body.public-page {
  background:
    radial-gradient(circle at top left, rgba(245, 181, 68, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(96, 165, 250, 0.15), transparent 26%),
    linear-gradient(180deg, #09111f 0%, #101b2f 100%);
}

body.admin-page {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.16), transparent 28%),
    radial-gradient(circle at right, rgba(244, 125, 125, 0.14), transparent 20%),
    linear-gradient(180deg, #07101d 0%, #0c1526 100%);
}

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

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

input,
textarea,
select,
.picker-trigger {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(150, 178, 212, 0.2);
  background: rgba(10, 18, 34, 0.88);
  color: var(--text);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

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

input:hover,
textarea:hover,
select:hover,
.picker-trigger:hover {
  border-color: rgba(245, 181, 68, 0.4);
}

input:focus,
textarea:focus,
select:focus,
.picker-field.open .picker-trigger {
  border-color: rgba(245, 181, 68, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 181, 68, 0.12);
  transform: translateY(-1px);
}

input[type="hidden"] {
  display: none;
}

button {
  border: 0;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

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

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 52px;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hidden {
  display: none;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent);
}

.muted {
  margin: 0;
  color: var(--muted);
}

.site-header,
.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.site-header {
  margin-bottom: 24px;
}

.site-title,
.site-header h1,
.hero-card h2,
.booking-card h2,
.auth-card h1,
.admin-topbar h2,
.panel-head h3 {
  margin: 0;
}

.site-title {
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.95;
}

.site-subtitle {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.site-actions,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.inline-button,
.ghost-link,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 16px;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #1f1203;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(214, 132, 37, 0.22);
}

.ghost-button,
.ghost-link {
  border: 1px solid rgba(150, 178, 212, 0.2);
  background: rgba(150, 178, 212, 0.1);
  color: var(--text);
}

.inline-button {
  width: fit-content;
}

.back-link {
  margin-top: 18px;
}

.public-layout {
  display: grid;
  gap: 24px;
}

.hero-card,
.booking-card,
.panel,
.auth-card,
.summary-card {
  padding: 28px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 24px;
}

.hero-copy h2 {
  max-width: 720px;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  line-height: 1.05;
}

.hero-text {
  max-width: 700px;
  margin: 16px 0 0;
  color: #d9e3f2;
  line-height: 1.75;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.hero-note {
  color: var(--muted);
}

.hero-aside,
.info-card {
  height: 100%;
}

.info-card {
  padding: 24px;
  border-radius: 22px;
  background: rgba(8, 15, 28, 0.64);
  border: 1px solid rgba(150, 178, 212, 0.14);
}

.info-card strong {
  display: block;
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.info-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
  color: #dce7f6;
  line-height: 1.6;
}

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

.feature-card {
  padding: 24px;
}

.feature-card h3 {
  margin: 0 0 12px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 0;
}

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

.form-grid.single-column {
  grid-template-columns: 1fr;
}

.form-grid label,
.status-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-error {
  min-height: 18px;
  color: #ffb3b3;
  font-size: 13px;
  line-height: 1.4;
}

.field-group.has-error input {
  border-color: rgba(244, 125, 125, 0.86);
  box-shadow: 0 0 0 4px rgba(244, 125, 125, 0.12);
}

.field-group.has-error span:first-child {
  color: #ffd0d0;
}

.form-grid label span,
.status-field span {
  font-size: 14px;
  color: #dce7f6;
}

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

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.error-text {
  margin: 6px 0 0;
  min-height: 22px;
  color: var(--danger);
}

.success-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(76, 201, 138, 0.12);
  border: 1px solid rgba(76, 201, 138, 0.22);
}

.success-card.hidden {
  display: none;
}

.success-card strong {
  color: #b5f1cf;
}

.success-card p {
  margin: 0;
  color: #ddf8e8;
  line-height: 1.6;
}

.auth-card {
  max-width: 460px;
  margin: 10vh auto 0;
}

.demo-box {
  display: inline-flex;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(8, 15, 28, 0.68);
  border: 1px solid rgba(150, 178, 212, 0.14);
}

.admin-topbar {
  padding: 24px 28px;
  margin-bottom: 22px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(245, 181, 68, 0.24);
  color: #fee4b3;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.summary-card {
  display: grid;
  gap: 10px;
}

.summary-label {
  color: var(--muted);
  font-size: 14px;
}

.summary-card strong {
  font-size: 2rem;
}

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

.admin-reservation-groups {
  display: grid;
  gap: 22px;
}

.reservation-group {
  display: grid;
  gap: 14px;
}

.reservation-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reservation-group-head h4 {
  margin: 0;
  font-size: 1.15rem;
}

.admin-reservation-list {
  display: grid;
  gap: 14px;
}

.admin-reservation-card {
  padding: 20px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid rgba(150, 178, 212, 0.14);
  display: grid;
  gap: 16px;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.card-title-row h5 {
  margin: 0;
  font-size: 1.1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.new {
  background: rgba(245, 181, 68, 0.16);
  color: #f6d79d;
}

.status-badge.confirmed {
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
}

.status-badge.completed {
  background: rgba(76, 201, 138, 0.16);
  color: #b8f3d2;
}

.status-badge.cancelled {
  background: rgba(244, 125, 125, 0.16);
  color: #ffd2d2;
}

.reservation-meta-grid {
  display: grid;
  gap: 10px;
  color: #d9e3f2;
  line-height: 1.6;
}

.reservation-card-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.status-field {
  min-width: 240px;
}

.status-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.small-button.delete {
  background: var(--danger-soft);
  color: #ffd0d0;
}

.empty-state {
  padding: 24px;
  border-radius: 22px;
  text-align: center;
  background: rgba(8, 15, 28, 0.62);
  border: 1px dashed rgba(150, 178, 212, 0.18);
  color: var(--muted);
}

.picker-field {
  position: relative;
}

.picker-field.open {
  z-index: 40;
}

.picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.picker-field[data-picker-type="time"] .picker-trigger {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 16px;
  gap: 0;
  align-items: center;
}

.picker-field[data-picker-type="time"] .picker-trigger::before {
  content: "";
  width: 16px;
  height: 1px;
}

.picker-trigger-value.placeholder {
  color: var(--muted);
}

.picker-trigger-icon {
  color: var(--muted);
  font-size: 12px;
}

.picker-field[data-picker-type="time"] .picker-trigger-value {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.picker-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  width: min(320px, 100%);
  min-width: 280px;
  padding: 14px;
  display: none;
}

.picker-field.open .picker-popover {
  display: block;
}

.picker-shell {
  display: grid;
  gap: 14px;
}

.picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.picker-toolbar.compact {
  justify-content: flex-start;
}

.picker-nav-button,
.picker-clear-button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(150, 178, 212, 0.16);
  background: rgba(150, 178, 212, 0.1);
  color: var(--text);
}

.picker-weekdays,
.picker-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.picker-weekdays {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.picker-day,
.picker-time-slot {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(150, 178, 212, 0.12);
  background: rgba(10, 18, 34, 0.92);
  color: var(--text);
}

.picker-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-variant-numeric: tabular-nums;
}

.picker-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.picker-time-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-variant-numeric: tabular-nums;
}

.picker-day.disabled,
.picker-day:disabled {
  background: rgba(10, 18, 34, 0.5);
  border-color: rgba(150, 178, 212, 0.08);
  color: rgba(159, 177, 200, 0.45);
}

.picker-time-slot.occupied {
  background: rgba(127, 29, 29, 0.34);
  border-color: rgba(248, 113, 113, 0.34);
  color: #ffd0d0;
}

.picker-time-slot.conflict {
  background: rgba(127, 29, 29, 0.14);
  border-color: rgba(248, 113, 113, 0.22);
  color: #ffd0d0;
}

.picker-day.today {
  border-color: rgba(245, 181, 68, 0.44);
}

.picker-day.selected,
.picker-time-slot.selected {
  background: rgba(245, 181, 68, 0.18);
  border-color: rgba(245, 181, 68, 0.4);
  color: #ffe7bc;
}

.picker-day.placeholder {
  min-height: 40px;
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}

.picker-availability {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(8, 15, 28, 0.58);
  border: 1px solid rgba(150, 178, 212, 0.1);
}

.picker-helper {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.picker-helper.danger {
  color: #ffd0d0;
}

.picker-interval-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.picker-interval-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.24);
  border: 1px solid rgba(248, 113, 113, 0.24);
  color: #ffd0d0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 980px) {
  .hero-card,
  .feature-grid,
  .admin-summary-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .admin-topbar {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 18px 16px 32px;
  }

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

  .site-actions,
  .topbar-actions,
  .hero-actions,
  .reservation-card-actions,
  .form-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .ghost-button,
  .ghost-link,
  .small-button,
  .status-field {
    width: 100%;
  }

  .picker-popover {
    width: 100%;
    min-width: 0;
  }

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