@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

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

/* ── Variables ── */
:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-sidebar: #1e293b;
  --bg-topbar: #1e293b;
  --bg-hover: rgba(255,255,255,0.04);
  --bg-input: #0f172a;
  --border: rgba(255,255,255,0.07);
  --text: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #475569;
  --accent: #00d4ff;
  --accent-dim: rgba(0,212,255,0.1);
  --accent-bdr: rgba(0,212,255,0.25);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --muted: #64748b;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-topbar: #ffffff;
  --bg-hover: rgba(0,0,0,0.04);
  --bg-input: #f8fafc;
  --border: rgba(0,0,0,0.08);
  --text: #0f172a;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ── Base ── */
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Layout ── */
.admin-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 3px;
}

.sidebar-logo-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.sidebar-venue {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-venue-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 3px;
}

.sidebar-venue-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.sidebar-venue-type {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 2px;
}

.sidebar-nav { flex: 1; padding: 8px 0; }

.nav-section {
  padding: 12px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  border-right: 2px solid transparent;
  margin: 1px 0;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text); }

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
  border-right-color: var(--accent);
}

.nav-item i { width: 16px; text-align: center; font-size: 13px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--warning);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}

.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
}

.sidebar-logout:hover { background: rgba(239,68,68,0.1); color: var(--danger); }

/* ── Main ── */
.main-content { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.topbar-title { font-size: 16px; font-weight: 700; flex: 1; }

.topbar-subtitle { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 8px; }

.topbar-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
  position: relative;
}

.icon-btn:hover { color: var(--text); border-color: var(--accent-bdr); }

.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--warning);
  border-radius: 50%;
  border: 2px solid var(--bg-topbar);
  display: none;
}

.notif-dot.show { display: block; }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.topbar-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1.5px solid var(--accent-bdr);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ── Page content ── */
.page-content { padding: 24px; flex: 1; overflow-x: auto; }

/* ── Stats ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-icon--pending  { background: rgba(245,158,11,0.12); color: var(--warning); }
.stat-icon--accepted { background: rgba(34,197,94,0.12);  color: var(--success); }
.stat-icon--today    { background: var(--accent-dim);     color: var(--accent);  }
.stat-icon--total    { background: rgba(100,116,139,0.12); color: var(--muted);  }

.stat-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 3px;
}

.stat-label { font-size: 12px; color: var(--text-2); font-weight: 500; }

/* ── Table card ── */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-toolbar-title { font-size: 14px; font-weight: 700; }

/* ── Status tabs ── */
.status-tabs { display: flex; gap: 4px; flex-wrap: wrap; }

.status-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-2);
  border: 1px solid transparent;
}

.status-tab:hover { background: var(--bg-hover); color: var(--text); }

.status-tab.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-bdr); }

.tab-count {
  font-size: 11px;
  background: var(--bg-hover);
  padding: 1px 6px;
  border-radius: 100px;
  font-weight: 700;
}

.status-tab.active .tab-count { background: rgba(0,212,255,0.15); }

/* ── Date filter ── */
.date-toolbar { justify-content: space-between; }

.date-custom-form { display: flex; align-items: center; }

.date-custom-input {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-family: inherit;
}

.date-custom-input:hover { border-color: var(--accent-bdr); }

/* ── Table ── */
.res-table { width: 100%; border-collapse: collapse; min-width: 800px; }

.res-table th {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--bg-card);
}

.res-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.res-table tbody tr:last-child td { border-bottom: none; }
.res-table tbody tr:hover { background: var(--bg-hover); }

.row-indicator {
  width: 3px;
  padding: 0 !important;
}

.row-indicator--pending  { background: var(--warning); }
.row-indicator--accepted { background: var(--success); }
.row-indicator--rejected { background: var(--danger);  }
.row-indicator--noshow   { background: var(--muted);   }

/* ── Guest cell ── */
.guest-name { font-size: 14px; font-weight: 600; }
.guest-phone { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ── DateTime cell ── */
.res-date { font-size: 13px; font-weight: 600; }
.res-time { font-size: 12px; color: var(--accent); margin-top: 2px; font-weight: 600; }

/* ── Notes cell ── */
.notes-text {
  font-size: 12px;
  color: var(--text-2);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Status badge ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge--0 { background: rgba(245,158,11,0.12); color: var(--warning); }
.status-badge--1 { background: rgba(34,197,94,0.12);  color: var(--success); }
.status-badge--2 { background: rgba(239,68,68,0.12);  color: var(--danger);  }
.status-badge--3 { background: rgba(100,116,139,0.12); color: var(--muted); }

/* ── Action buttons ── */
.action-btns { display: flex; gap: 5px; flex-wrap: wrap; }

.action-btn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.action-btn--accept { background: rgba(34,197,94,0.12);  color: var(--success); }
.action-btn--reject { background: rgba(239,68,68,0.12);  color: var(--danger);  }
.action-btn--noshow { background: rgba(100,116,139,0.12); color: var(--muted);  }

.action-btn:hover { filter: brightness(1.3); transform: translateY(-1px); }

/* ── Primary / secondary buttons (Add/Save/Create actions across hotel & venue pages) ── */
.btn-primary {
  background: var(--accent);
  color: #04121a;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary:hover { border-color: var(--accent-bdr); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-3);
}

.empty-state i { font-size: 36px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info { font-size: 13px; color: var(--text-2); }

.pagination-btns { display: flex; gap: 4px; }

.page-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: none;
  transition: all 0.15s;
  font-family: inherit;
  text-decoration: none;
}

.page-btn:hover:not(:disabled) { border-color: var(--accent-bdr); color: var(--accent); }
.page-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 28px;
  box-shadow: var(--shadow);
  transform: scale(0.95) translateY(8px);
  transition: transform 0.2s;
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.modal-icon--accept { background: rgba(34,197,94,0.12);  color: var(--success); }
.modal-icon--reject { background: rgba(239,68,68,0.12);  color: var(--danger);  }
.modal-icon--noshow { background: rgba(100,116,139,0.12); color: var(--muted);  }

.modal-title { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.modal-sub   { font-size: 13px; color: var(--text-2); margin-bottom: 20px; line-height: 1.5; }

.modal-field-label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }

.modal-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.modal-textarea:focus { outline: none; border-color: var(--accent); }

.modal-actions { display: flex; gap: 10px; }

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.modal-btn--cancel  { background: var(--bg-hover); color: var(--text-2); }
.modal-btn--accept  { background: var(--success); color: #fff; border-color: var(--success); }
.modal-btn--reject  { background: var(--danger);  color: #fff; border-color: var(--danger);  }
.modal-btn--noshow  { background: var(--muted);   color: #fff; border-color: var(--muted);   }

.modal-btn:hover { filter: brightness(1.1); }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 280px;
  max-width: 360px;
  animation: toastIn 0.3s ease;
}

.toast-icon { color: var(--warning); font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-body strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.toast-body p { font-size: 12px; color: var(--text-2); }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
