/* ============================================================
   HOTEL ADMIN — Global Styles
   ============================================================ */

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

:root {
  --primary:       #1a3a5c;
  --primary-hover: #254e7a;
  --accent:        #c9a84c;
  --accent-hover:  #b8963e;
  --bg:            #f4f6f9;
  --white:         #ffffff;
  --text:          #2c3e50;
  --text-muted:    #6c757d;
  --border:        #dee2e6;
  --shadow:        0 2px 12px rgba(0, 0, 0, 0.08);
  --radius:        8px;
  --danger:        #dc3545;
  --success:       #28a745;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  background: var(--primary);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.nav-brand {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.nav-links .btn-nav-accent {
  background: var(--accent);
  color: var(--primary) !important;
  font-weight: 600;
  padding: 0.35rem 1rem;
}

.nav-links .btn-nav-accent:hover {
  background: var(--accent-hover);
}

/* ── Container ───────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Room Grid ───────────────────────────────────────────── */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.room-card {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.room-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.room-card__header {
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.room-number { font-weight: 700; font-size: 1rem; }

.room-card__body {
  padding: 1rem;
  flex: 1;
}

.room-card__body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--primary);
}

.room-card__body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.room-desc {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.room-card__footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

/* ── Status Badges ───────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-available  { background: #d4edda; color: #155724; }
.status-occupied   { background: #f8d7da; color: #721c24; }
.status-maintenance{ background: #fff3cd; color: #856404; }
.status-pending    { background: #cce5ff; color: #004085; }
.status-confirmed  { background: #d4edda; color: #155724; }
.status-cancelled  { background: #f8d7da; color: #721c24; }
.status-completed  { background: #e2e3e5; color: #383d41; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  text-decoration: none;
  line-height: 1;
}

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

.btn-primary  { background: var(--accent);   color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-secondary { background: var(--primary); color: #fff; }
.btn-secondary:hover { background: var(--primary-hover); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg); }

.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c82333; }

.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
}

.auth-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-logo h1 {
  color: var(--primary);
  font-size: 1.5rem;
}

.auth-logo p { color: var(--text-muted); font-size: 0.9rem; }

.auth-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: none;
}

.alert.show { display: block; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

tbody tr { transition: background 0.15s; }
tbody tr:hover { background: #f8f9fa; }

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.no-data {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem;
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* ── Filters ─────────────────────────────────────────────── */
.filters {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-group { display: flex; flex-direction: column; gap: 0.3rem; }
.filter-group label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.filter-group select { padding: 0.45rem 0.75rem; border: 1px solid var(--border); border-radius: 4px; font-size: 0.9rem; }

/* ── Modal ───────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.open { display: flex; }

.modal-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 { font-size: 1.15rem; color: var(--primary); }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-close:hover { color: var(--danger); }

.modal-footer { margin-top: 1.25rem; display: flex; gap: 0.75rem; justify-content: flex-end; }

/* ── Admin Layout ────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 60px);
}

.admin-sidebar {
  background: var(--primary);
  padding: 1.5rem 0;
}

.admin-sidebar-title {
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 1.25rem;
  margin-bottom: 0.5rem;
}

.admin-nav { list-style: none; }

.admin-nav a {
  display: block;
  padding: 0.65rem 1.25rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-left-color: var(--accent);
}

.admin-main { padding: 2rem; background: var(--bg); }

/* ── Stat Cards (dashboard) ──────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-card__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── Room Detail ─────────────────────────────────────────── */
.room-detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.room-detail-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.room-detail-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.room-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  margin: 1.25rem 0;
}

.room-detail-meta dt { font-size: 0.8rem; color: var(--text-muted); }
.room-detail-meta dd { font-weight: 600; }

.booking-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  align-self: start;
}

.booking-card h2 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ── Select small ────────────────────────────────────────── */
.select-sm {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8rem;
}

/* ── Misc ────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); font-size: 0.88rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .room-detail-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .rooms-grid { grid-template-columns: 1fr; }
}
