:root {
  --primary: #cc3333;
  --border: #e5e5e5;
  --text: #333;

  --bs-primary: #cc3333;
  --bs-primary-rgb: 204, 51, 51;

  --db-red: #cc3333;
  --db-red-dark: #aa2222;
  --db-red-pale: #fdf2f2;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: #fff;
}

.top-line {
  height: 6px;
  background: var(--primary);
}

header img {
  height: 60px;
}

h1,
h2,
h3 {
  color: var(--primary);
  font-weight: 600;
}

.btn-danger {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-danger:hover {
  background-color: #b02a2a;
  border-color: #b02a2a;
}

.btn-outline-danger {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-danger:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.admin-wrapper {
  max-width: 1400px;
  margin: 30px auto;
}

.admin-sidebar {
  border-right: 1px solid var(--border);
  padding-right: 0;
}

.admin-sidebar .list-group-item {
  border: none;
  border-radius: 0;
  padding: 10px 14px;
  font-size: 14px;
}

.admin-sidebar .list-group-item.active {
  background-color: var(--primary);
  border-color: var(--primary);
}

.admin-content h2 {
  margin-bottom: 20px;
}

.admin-content .form-label {
  font-size: 14px;
  margin-bottom: 4px;
}

.admin-content .form-control,
.admin-content .form-select {
  padding: 6px 10px;
  font-size: 14px;
}

.admin-content .btn {
  padding: 6px 14px;
  font-size: 14px;
}

.admin-sidebar .list-group-item.active {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.admin-sidebar .list-group-item:hover {
  background-color: #f4dede;
  color: var(--primary);
}

.admin-sidebar {
  background: #fafafa;
  padding-top: 10px;
}

.admin-sidebar .list-group-item {
  font-weight: 500;
  transition: all 0.15s ease;
}

.table {
  font-size: 14px;
}

.table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #666;
}

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

.table-hover tbody tr:hover {
  background-color: #f9f9f9;
}

.badge.bg-success {
  background-color: #198754 !important;
}

.badge.bg-danger {
  background-color: var(--primary) !important;
}

.admin-filters .form-control,
.admin-filters .form-select {
  font-size: 13px;
  padding: 6px 10px;
}

.list-group-item.active,
.list-group-item.active:focus,
.form-check-input:checked,
.list-group-item.active:hover,
.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
}

.form-check-input:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(204, 51, 51, 0.25);
}

.date-card:hover {
  background: #f5f5f5 !important;
}

/*ADMIN */

.admin-sidebar {
  background: #fafafa;
  border-right: 1px solid #e8e8e8;
}
.admin-sidebar .nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
  padding: 0.6rem 0.75rem 0.2rem;
}
.admin-sidebar .list-group-item {
  border: none;
  border-radius: 7px;
  margin-bottom: 2px;
  font-size: 0.85rem;
  color: #444;
  padding: 0.45rem 0.75rem;
  background: transparent;
}
.admin-sidebar .list-group-item i {
  color: #999;
  width: 18px;
}
.admin-sidebar .list-group-item:hover {
  background: #f0f0f0;
  color: #111;
}
.admin-sidebar .list-group-item:hover i {
  color: #555;
}
.admin-sidebar .list-group-item.active {
  background: var(--db-red);
  color: #fff;
  font-weight: 600;
}
.admin-sidebar .list-group-item.active i {
  color: rgba(255, 255, 255, 0.8);
}
.admin-sidebar .list-group-item.link-danger {
  color: var(--db-red);
}
.admin-sidebar .list-group-item.link-danger i {
  color: var(--db-red);
}
.admin-sidebar .list-group-item.link-danger:hover {
  background: #fff0f0;
}

/* ── Section header ──────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.section-header i {
  font-size: 1.1rem;
  color: var(--db-red);
}
.section-header h5 {
  margin: 0;
  color: var(--db-red);
  font-weight: 700;
}

/* ── Cards ───────────────────────────────────────────────── */
.admin-card {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.admin-card .card-header {
  background: #fafafa;
  border-bottom: 1px solid #e8e8e8;
  border-radius: 10px 10px 0 0;
  padding: 0.55rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* ── Table ───────────────────────────────────────────────── */
.admin-table th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #aaa;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}
.admin-table td {
  font-size: 0.85rem;
  vertical-align: middle;
}
.admin-table tbody tr:hover {
  background: #fdf8f8;
}

/* ── Status toggle ───────────────────────────────────────── */
.status-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ddd;
  color: #ccc;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  padding: 0;
}
.status-toggle.is-open {
  border-color: #198754;
  color: #198754;
}
.status-toggle.is-open:hover {
  background: #198754;
  color: #fff;
}
.status-toggle.is-closed {
  border-color: var(--db-red);
  color: var(--db-red);
}
.status-toggle.is-closed:hover {
  background: var(--db-red);
  color: #fff;
}

/* ── Badge pair ──────────────────────────────────────────── */
.badge-pair {
  font-size: 0.7rem;
  background: #fdf2f2;
  color: var(--db-red);
  border: 1px solid #f5c6c6;
  border-radius: 5px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── Form labels ─────────────────────────────────────────── */
.form-label.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 0.35rem;
}

/* ── Form inputs improved spacing & styling ─────────────── */
.admin-card .form-control,
.admin-card .form-select {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  transition: all 0.15s ease;
  background: #fafafa;
}

.admin-card .form-control:focus,
.admin-card .form-select:focus {
  background: #fff;
  border-color: var(--db-red);
  box-shadow: 0 0 0 3px rgba(204, 51, 51, 0.08);
}

.admin-card .form-control:disabled,
.admin-card .form-select:disabled {
  background: #f5f5f5;
  color: #999;
  border-color: #e8e8e8;
}

.admin-card .input-group .form-control,
.admin-card .input-group .form-select {
  border-left: none;
}

.admin-card .input-group-text {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-right: none;
  border-radius: 6px 0 0 6px;
  padding: 0.5rem 0.75rem;
}

.admin-card .row.g-2 > *,
.admin-card .row.g-3 > * {
  margin-bottom: 0.75rem;
}

/* ── Booking status toggle (only in dates view) ──────────────────── */
/* The toggle is now embedded in an admin-card with border-left accent */

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #198754;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(204, 51, 51, 0.15);
}

/* ── Booking form: step header with number and divider ──── */
.booking-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--db-red);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--db-red);
}

.booking-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--db-red);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* BOOKING */

/* ── Global ──────────────────────────────────────────── */
body {
  color: #1a1a1a;
}

a {
  color: var(--db-red);
}
a:hover {
  color: var(--db-red-dark);
}

/* ── Buttons ─────────────────────────────────────────── */
.btn-danger {
  background-color: var(--db-red);
  border-color: var(--db-red);
}
.btn-danger:hover {
  background-color: var(--db-red-dark);
  border-color: var(--db-red-dark);
}
.btn-outline-danger {
  color: var(--db-red);
  border-color: var(--db-red);
}
.btn-outline-danger:hover {
  background-color: var(--db-red);
  border-color: var(--db-red);
}

/* ── Form focus ──────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: var(--db-red);
  box-shadow: 0 0 0 0.2rem rgba(204, 51, 51, 0.15);
}

/* ── Alerts ──────────────────────────────────────────── */
.alert-success {
  border-left: 4px solid #198754;
}
.alert-danger {
  border-left: 4px solid var(--db-red);
}
.alert-info {
  border-left: 4px solid #0dcaf0;
}

/* ── Bookings disabled message (home page) ─────────────────────── */
.bookings-disabled-notice {
  max-width: 500px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 4px solid var(--db-red);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.bookings-disabled-notice i {
  font-size: 2.5rem;
  color: var(--db-red);
  margin-bottom: 1rem;
  opacity: 0.9;
}

.bookings-disabled-notice h2 {
  color: var(--db-red);
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.bookings-disabled-notice p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* ── Booking responsive design ────────────────────────────────── */
@media (max-width: 768px) {
  .booking-wrapper {
    padding: 1.5rem 0.75rem;
  }

  .booking-title {
    font-size: 1.5rem;
  }

  .section-title {
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .section-number {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .section-title h2 {
    font-size: 1.1rem;
  }

  .booking-card {
    padding: 1.25rem;
  }

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

  .date-card {
    padding: 1rem;
  }

  .form-control,
  .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}