/* =========================================
   THE PREMIUM STAY — Admin Dashboard CSS
   ========================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #0d1b2a;
  --navy2:   #1a2d42;
  --gold:    #c9a84c;
  --white:   #ffffff;
  --light:   #f4f6f9;
  --border:  #e2e8f0;
  --text:    #1a202c;
  --muted:   #718096;
  --pending: #d97706;
  --accepted:#16a34a;
  --declined:#dc2626;
  --radius:  10px;
  --shadow:  0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --font:    'Inter', system-ui, sans-serif;
}

html, body { height: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--light); }

/* =========================================
   LOGIN
   ========================================= */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
  padding: 24px;
}
.login-box {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.login-logo {
  text-align: center;
  margin-bottom: 36px;
}
.login-logo i {
  color: var(--gold);
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}
.login-logo h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.login-logo p { color: var(--muted); font-size: .9rem; }
.login-field { margin-bottom: 20px; }
.login-field label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.login-field input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
}
.login-field input:focus { border-color: var(--gold); }
.login-err { display: block; color: var(--declined); font-size: .8rem; margin-top: 6px; min-height: 18px; }
.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font: 600 1rem/1 var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s, transform .2s;
}
.btn-login:hover { background: var(--navy2); transform: translateY(-1px); }

/* =========================================
   DASHBOARD LAYOUT
   ========================================= */
.dashboard {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
}
.sidebar-logo i { color: var(--gold); }
.sidebar-nav { padding: 16px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s, color .2s;
  text-decoration: none;
}
.nav-item:hover, .nav-item.active {
  background: rgba(255,255,255,.08);
  color: var(--white);
}
.nav-item.active { color: var(--gold); }
.badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--navy);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  min-width: 20px;
  text-align: center;
}
.badge.pending { background: var(--pending); color: var(--white); }
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-back, .btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
}
.sidebar-back { color: rgba(255,255,255,.5); }
.sidebar-back:hover { background: rgba(255,255,255,.05); color: var(--white); }
.btn-logout { color: rgba(255,255,255,.5); border: none; font: inherit; background: none; }
.btn-logout:hover { background: rgba(255,255,255,.05); color: var(--declined); }

/* =========================================
   MAIN CONTENT
   ========================================= */
.main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.dash-header {
  padding: 24px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.dash-header h2 { font-size: 1.4rem; color: var(--navy); }
.dash-header p  { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.btn-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 8px;
  font: 500 .88rem var(--font);
  cursor: pointer;
  color: var(--navy);
  transition: background .2s;
}
.btn-refresh:hover { background: var(--border); }
.btn-refresh.spinning i { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================
   STATS
   ========================================= */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 32px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
}
.stat-card.pending  { border-color: var(--pending); }
.stat-card.accepted { border-color: var(--accepted); }
.stat-card.declined { border-color: var(--declined); }
.stat-label { display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--navy); font-family: 'Playfair Display', serif; }

/* =========================================
   TABLE
   ========================================= */
.table-wrap {
  flex: 1;
  padding: 0 32px 32px;
  overflow-x: auto;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--muted);
  font-size: 1rem;
}
.empty-state i { font-size: 2.5rem; opacity: .4; }
.bookings-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.bookings-table th {
  background: var(--navy);
  color: rgba(255,255,255,.8);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 14px 16px;
  text-align: left;
  white-space: nowrap;
}
.bookings-table td {
  padding: 14px 16px;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.bookings-table tr:last-child td { border-bottom: none; }
.bookings-table tbody tr:hover { background: var(--light); }
.booking-id { font-family: monospace; font-size: .82rem; color: var(--muted); }
.guest-name { font-weight: 600; color: var(--navy); }
.guest-email { font-size: .8rem; color: var(--muted); }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
}
.status-badge.pending  { background: #fef3c7; color: var(--pending); }
.status-badge.accepted { background: #dcfce7; color: var(--accepted); }
.status-badge.declined { background: #fee2e2; color: var(--declined); }

/* Action buttons */
.action-btns { display: flex; gap: 6px; white-space: nowrap; }
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font: 500 .8rem var(--font);
  cursor: pointer;
  border: none;
  transition: opacity .2s, transform .1s;
}
.btn-action:hover { opacity: .85; transform: translateY(-1px); }
.btn-action:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-view    { background: var(--light); color: var(--navy); border: 1px solid var(--border); }
.btn-accept  { background: var(--accepted); color: var(--white); }
.btn-decline { background: var(--declined); color: var(--white); }

/* =========================================
   DETAIL MODAL
   ========================================= */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.detail-modal[hidden] { display: none; }
.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
}
.detail-box {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  padding: 36px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: scale(.97); } }
.detail-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--light);
  color: var(--navy);
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: none;
  line-height: 1;
}
.detail-close:hover { background: var(--border); }
.detail-box h3 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  font-size: 1.4rem;
  margin-bottom: 24px;
}
.detail-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.detail-table tr { border-bottom: 1px solid var(--border); }
.detail-table tr:last-child { border-bottom: none; }
.detail-table td { padding: 10px 0; font-size: .9rem; }
.detail-table td:first-child { color: var(--muted); width: 40%; }
.detail-table td:last-child { font-weight: 500; color: var(--navy); }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-actions button, .detail-actions a {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font: 600 .9rem var(--font);
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity .2s;
}
.detail-actions button:hover, .detail-actions a:hover { opacity: .85; }
.btn-d-accept  { background: var(--accepted); color: var(--white); }
.btn-d-decline { background: var(--declined); color: var(--white); }
.btn-d-email   { background: var(--navy); color: var(--white); }
.btn-d-wa      { background: #25d366; color: var(--white); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .dashboard { flex-direction: column; }
  .sidebar { width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; }
  .sidebar-nav { flex-direction: row; padding: 8px; }
  .sidebar-footer { flex-direction: row; padding: 8px 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .table-wrap, .stats-row, .dash-header { padding-left: 16px; padding-right: 16px; }
}
