﻿:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --ink: #162027;
  --muted: #6c7a86;
  --accent: #1e4d82;
  --accent-soft: #dfe9f5;
  --danger: #b3261e;
  --success: #196d3a;
  --border: #dfe5ea;
  --shadow: 0 16px 32px rgba(22, 32, 39, 0.1);
  --radius: 18px;
  font-family: "Playfair Display", "Merriweather", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f7f9fb 0%, #eef2f6 45%, #e9eef3 100%);
  color: var(--ink);
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 24px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e4d82, #123a63);
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(18, 58, 99, 0.28);
  letter-spacing: 0.04em;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 14px;
}

.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
}

.nav a:hover {
  border-color: var(--accent);
}

.container {
  max-width: 1280px;
  margin: 24px auto 56px;
  padding: 0 20px;
  display: grid;
  gap: 18px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 26px 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #e4edf8, #ffffff);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

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

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  border: 1px solid var(--border);
}

.panel-header h1,
.panel-header h2 {
  margin: 0 0 6px;
}

.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.date-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcfe;
}

.date-controls select,
.date-controls input[type="date"] {
  min-width: 120px;
  background: #fff;
}

.date-controls .ghost {
  padding: 10px 14px;
}

.date-controls .ghost:hover {
  border-color: #c9d4df;
  background: #f3f7fb;
}

.date-controls .primary {
  padding: 10px 14px;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

input,
select,
textarea {
  padding: 10px 12px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  background: #fff;
}

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

button,
.ghost {
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
}

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

.ghost {
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
}

.notes {
  margin-top: 12px;
  padding: 12px;
  background: var(--accent-soft);
  border-radius: 12px;
  font-size: 14px;
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
}

.status.error {
  background: #f8e7e5;
  color: var(--danger);
}

.status.success {
  background: #e1f2e7;
  color: var(--success);
}

.schedule-table {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: auto;
  background: #f8fafc;
}

.schedule-table .row {
  display: flex;
  min-width: 760px;
  border-bottom: 1px solid var(--border);
}

.schedule-table .row:last-child {
  border-bottom: none;
}

.schedule-table .cell {
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  min-width: 140px;
  flex: 1 0 140px;
}

.schedule-table .cell:last-child {
  border-right: none;
}

.schedule-table .cell.time {
  font-weight: 700;
  background: #eef3f8;
  min-width: 96px;
  flex: 0 0 96px;
}

.schedule-table .cell.header {
  font-weight: 700;
  background: #eef3f8;
}

.schedule-table .cell.booked {
  background: #ffe9e4;
  color: #9c2b1a;
}

.schedule-table .cell.past {
  background: #f1f3f5;
  color: #9aa3ab;
}

.schedule-table .cell.available {
  background: #e7f5ee;
  color: #146039;
  border: none;
  width: 100%;
  height: 100%;
}

.schedule-table .cell.closed {
  background: #f1f3f5;
  color: #7a8793;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 32, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  width: min(720px, 95vw);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.history,
.booking {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.booking,
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.booking.cancelled,
.history-item.cancelled {
  background: #f8e7e5;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.summary-card {
  background: var(--accent-soft);
  border-radius: 16px;
  padding: 16px;
}

.summary-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.summary-value {
  font-size: 18px;
  font-weight: 700;
  margin-top: 8px;
}

.report-table .row,
.admin-table .row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.report-table .row.header,
.admin-table .row.header {
  font-weight: 700;
}

.admin-table .row {
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.4fr 1fr 1.2fr 0.5fr;
  align-items: start;
}

.admin-bookings-table .row {
  display: grid;
  grid-template-columns: 0.5fr 1fr 1fr 0.8fr 0.8fr 0.7fr 0.8fr 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.admin-bookings-table .row.header {
  font-weight: 700;
}

.admin-table .cell {
  width: 100%;
}

.admin-row textarea {
  min-height: 60px;
  height: auto;
}

.auto-textarea {
  height: auto;
  overflow-y: hidden;
}

.report-table,
.admin-table,
.admin-bookings-table {
  overflow-x: auto;
}

.report-table .row {
  min-width: 520px;
}

.admin-table .row {
  min-width: 980px;
}

.admin-bookings-table .row {
  min-width: 940px;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
    padding: 16px 20px;
    gap: 14px;
  }
  .nav {
    gap: 12px;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 18px;
  }
  .schedule-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .container {
    margin: 16px auto 32px;
    padding: 0 12px;
  }
  .panel {
    padding: 14px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .modal {
    padding: 10px;
    align-items: flex-start;
  }
  .modal-card {
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }
  .booking,
  .history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .report-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand {
    gap: 10px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 16px;
  }
  .brand-title {
    font-size: 17px;
  }
  .brand-subtitle {
    font-size: 12px;
  }
  .hero h1 {
    font-size: 22px;
  }
  .date-controls {
    width: 100%;
  }
  .date-controls input,
  .date-controls select,
  .date-controls button {
    width: 100%;
  }
}
