:root {
  --bg: #0f172a;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --border: #dbe3ee;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --shadow: 0 16px 38px rgba(15, 23, 42, .10);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #eef3f8;
  color: var(--text);
}
button, input, textarea, select { font: inherit; }
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}
.sidebar {
  background: var(--bg);
  color: white;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand { font-size: 22px; font-weight: 800; }
.small { font-size: 13px; }
.sidebar .muted { color: rgba(255,255,255,.72); }
.sidebar-nav {
  display: grid;
  gap: 8px;
}
.tab-btn {
  text-align: left;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.08);
  color: white;
  cursor: pointer;
  font-weight: 700;
}
.tab-btn.active {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.2);
}
.main-panel { padding: 24px; }
.topbar {
  margin-bottom: 20px;
}
.topbar h1 { margin: 0 0 8px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.auth-card {
  width: min(100%, 540px);
  margin: 48px auto;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card span { display: block; color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 10px; font-size: 30px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.align-center { align-items: center; }
.row.gap-8 { gap: 8px; }
.row.gap-12 { gap: 12px; }
.margin-top-16 { margin-top: 16px; }
.margin-top-20 { margin-top: 20px; }
.margin-bottom-12 { margin-bottom: 12px; }
.hidden { display: none !important; }
.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: #eff6ff; color: #1d4ed8; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-small { padding: 10px 12px; }
.status-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.status-box.success {
  background: var(--success-soft);
  border-color: #bbf7d0;
  color: #166534;
}
.status-box.error {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: #991b1b;
}
.status-box.warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}
.stack-list {
  display: grid;
  gap: 12px;
}
.stack-list.compact-list { margin-top: 12px; }
.stack-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
  padding: 14px;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.media-card {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 16px;
  background: var(--panel-soft);
}
.preview {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 10px 0 12px;
  background: #fff;
}
.month-title { font-size: 20px; font-weight: 800; }
.calendar-admin-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 18px;
}
.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.calendar-weekdays.compact > div {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}
.admin-calendar .day {
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}
.admin-calendar .day.available { background: #dcfce7; border-color: #86efac; color: #166534; }
.admin-calendar .day.unavailable { background: #f3f4f6; color: #9ca3af; }
.admin-calendar .day.selected { outline: 3px solid var(--primary); background: var(--primary-soft); color: #1d4ed8; }
.editor-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel-soft);
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.slot-chip {
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 12px;
  font-weight: 700;
  text-align: center;
}

.contain-preview { object-fit: contain; background: #faf7f2; }
.back-link { text-decoration: none; display: block; }
.wrap-row { flex-wrap: wrap; }
.booking-row-full { display: grid; gap: 14px; }
.booking-row-side { margin-top: 8px; }
.booking-email-preview summary { cursor: pointer; font-weight: 700; color: #1d4ed8; }
.booking-email-preview pre { white-space: pre-wrap; word-break: break-word; margin-top: 10px; background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.collapsible-title-wrap { display: flex; gap: 12px; align-items: center; }
.collapsible-body { display: none; }
.collapsible-body.open { display: block; }

.offer-summary-display { margin-top: 4px; max-width: 760px; }
.catalog-offer-list { display: grid; gap: 4px; margin-top: 6px; }

.social-editor-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: center;
}

.document-editor-item textarea {
  min-height: 84px;
}

.document-editor-item input[readonly],
.document-editor-item textarea[readonly] {
  background: #f6f7f3;
}

.richtext-hidden {
  display: none;
}

.richtext-wrap {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.richtext-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.rte-btn,
.rte-select,
.rte-color {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  min-height: 38px;
}

.rte-btn {
  cursor: pointer;
  font-weight: 700;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.rte-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}

.rte-color {
  width: 48px;
  padding: 4px;
}

.richtext-editor {
  min-height: 220px;
  padding: 14px;
  outline: none;
  line-height: 1.7;
}

.richtext-editor h2,
.richtext-editor h3,
.richtext-editor p,
.richtext-editor ul,
.richtext-editor ol,
.richtext-editor blockquote {
  margin: 0 0 12px;
}

.richtext-editor blockquote {
  padding-left: 14px;
  border-left: 4px solid #cbd5e1;
  color: #475569;
}


.footer-page-select-field {
  min-width: 280px;
}

.footer-page-select-field select {
  width: 100%;
}

.footer-page-panel {
  display: none;
}

.footer-page-panel.active {
  display: block;
}

.footer-documents-manager {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.document-editor-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.audio-preview {
  width: 100%;
  margin-top: 10px;
}

.email-template-textarea {
  min-height: 280px;
  font-family: Consolas, 'Courier New', monospace;
  line-height: 1.5;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #dbe3f0;
  vertical-align: top;
  text-align: left;
}

.admin-table th {
  background: #f3f6fb;
  font-weight: 700;
}

.compact-table th,
.compact-table td {
  padding: 8px 10px;
}
