/* =========================================
   Reset & Base
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #111111;
  color: #e0e0e0;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #E8A020;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* =========================================
   Layout
   ========================================= */
.site-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* =========================================
   Public Header
   ========================================= */
.site-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #222;
}

.name {
  font-size: 2.1rem;
  font-weight: 700;
  color: #E8A020;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.headline {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #666;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: #555;
}

.contact a {
  color: #777;
}
.contact a:hover {
  color: #E8A020;
  text-decoration: none;
}

.sep {
  margin: 0 0.6rem;
  color: #333;
}

/* =========================================
   Admin Header
   ========================================= */
.admin-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #222;
}

.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #E8A020;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.username-label {
  font-size: 0.8rem;
  color: #555;
}

/* =========================================
   Calendar
   ========================================= */
.calendar-container {
  width: 100%;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.month-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #E8A020;
  text-align: center;
  min-width: 160px;
}

.nav-btn {
  background: none;
  border: 1px solid #2a2a2a;
  color: #aaa;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
  padding-bottom: 2px;
}

.nav-btn:hover:not(:disabled) {
  border-color: #E8A020;
  color: #E8A020;
}

.nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 1.75rem;
}

.day-header {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0 0.6rem;
}

.day-cell {
  aspect-ratio: 1;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c1c1c;
  border: 1px solid transparent;
  transition: opacity 0.1s;
}

.day-cell.empty {
  background: transparent;
  border-color: transparent;
}

.day-cell.status-available {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.28);
}

.day-cell.status-on_hold {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.28);
}

.day-cell.status-not_available {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.28);
}

.day-cell.today {
  outline: 2px solid #E8A020;
  outline-offset: -2px;
}

.day-number {
  font-size: 0.78rem;
  color: #555;
  font-weight: 500;
  pointer-events: none;
}

.day-cell.status-available .day-number   { color: #4ade80; }
.day-cell.status-on_hold .day-number    { color: #fb923c; }
.day-cell.status-not_available .day-number { color: #f87171; }

/* =========================================
   Legend
   ========================================= */
.legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid #1e1e1e;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #666;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-available     { background: #4ade80; }
.dot-on_hold       { background: #fb923c; }
.dot-not_available { background: #f87171; }

/* =========================================
   Auth / Login
   ========================================= */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.auth-wrapper {
  width: 100%;
  max-width: 380px;
}

.auth-card {
  background: #181818;
  border: 1px solid #242424;
  border-radius: 14px;
  padding: 2.25rem 2rem;
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #222;
}

/* =========================================
   Dashboard Layout
   ========================================= */
.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* =========================================
   Cards
   ========================================= */
.card {
  background: #181818;
  border: 1px solid #242424;
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.75rem;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #E8A020;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.card-title-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  user-select: none;
}

.card-title-toggle:hover {
  color: #f0b030;
}

.toggle-icon {
  font-size: 0.65rem;
  color: #444;
  transition: transform 0.15s;
}

/* =========================================
   Forms
   ========================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 120px;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.booking-form .form-row:last-of-type {
  margin-bottom: 1.25rem;
}

label {
  font-size: 0.72rem;
  color: #666;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: #444;
}

input[type="text"],
input[type="password"],
input[type="date"],
select {
  background: #111;
  border: 1px solid #2c2c2c;
  border-radius: 7px;
  color: #e0e0e0;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  width: 100%;
  transition: border-color 0.15s;
  font-family: inherit;
  appearance: auto;
}

input:focus,
select:focus {
  outline: none;
  border-color: #E8A020;
}

input::placeholder {
  color: #3a3a3a;
}

select option {
  background: #181818;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1;
}

.btn:hover:not(:disabled) { opacity: 0.85; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-primary {
  background: #E8A020;
  color: #0e0e0e;
}

.btn-secondary {
  background: #222;
  color: #ccc;
  border: 1px solid #2e2e2e;
}

.btn-danger {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.btn-full {
  width: 100%;
}

/* =========================================
   Alerts
   ========================================= */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.alert-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #86efac;
}

/* =========================================
   Table
   ========================================= */
.table-wrapper {
  overflow-x: auto;
  margin: -0.25rem;
  padding: 0.25rem;
}

.bookings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.bookings-table th {
  text-align: left;
  padding: 0.4rem 0.75rem 0.6rem;
  color: #444;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  border-bottom: 1px solid #222;
}

.bookings-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #1a1a1a;
  color: #bbb;
  vertical-align: middle;
}

.bookings-table tbody tr:last-child td {
  border-bottom: none;
}

.bookings-table tbody tr:hover td {
  background: rgba(255,255,255,0.015);
}

/* =========================================
   Status Badges
   ========================================= */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.status-available     { background: rgba(74, 222, 128, 0.12); color: #4ade80; }
.status-on_hold       { background: rgba(251, 146, 60, 0.12);  color: #fb923c; }
.status-not_available { background: rgba(248, 113, 113, 0.12); color: #f87171; }

.empty-state {
  color: #444;
  font-style: italic;
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem 0;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 500px) {
  .site-wrapper {
    padding: 1.5rem 1rem 3rem;
  }

  .name {
    font-size: 1.6rem;
  }

  .form-row {
    flex-direction: column;
  }

  .calendar-grid {
    gap: 3px;
  }

  .day-number {
    font-size: 0.68rem;
  }

  .admin-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
