/* ═══════════════════════════════════════════════════════════════
   Pristyn Care — Conference Room Booking Portal
   Brand: Daintree #00263e | Accent #0097B2 | Light #e7f3f7
   ═══════════════════════════════════════════════════════════════ */

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

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

:root {
  /* Pristyn Care Brand */
  --brand-dark:    #00263e;   /* Daintree – sidebar */
  --brand-mid:     #003554;   /* sidebar hover */
  --brand-accent:  #0097B2;   /* teal CTA */
  --brand-accent2: #00B4D8;   /* lighter teal */
  --brand-light:   #e7f3f7;   /* Black Squeeze */
  --brand-xlight:  #f0f8fb;

  /* Semantic */
  --success:    #059669;
  --success-lt: #ecfdf5;
  --danger:     #dc2626;
  --danger-lt:  #fef2f2;
  --warning:    #d97706;
  --warning-lt: #fffbeb;

  /* Neutral */
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-300:   #cbd5e1;
  --gray-400:   #94a3b8;
  --gray-500:   #64748b;
  --gray-600:   #475569;
  --gray-700:   #334155;
  --gray-800:   #1e293b;
  --gray-900:   #0f172a;

  /* Layout */
  --sidebar-w:     260px;
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     14px;
  --radius-xl:     20px;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.06);
  --shadow:        0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.05);
  --shadow-md:     0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  --shadow-lg:     0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
  --transition:    .18s ease;
}

html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

/* ════════════════════════════════
   APP SHELL — SIDEBAR LAYOUT
   ════════════════════════════════ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--brand-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 24px rgba(0,0,0,.18);
  transition: transform var(--transition);
}

/* Logo area */
.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo-img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

/* SVG inline fallback logo */
.brand-svg-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon-box {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent2));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: .95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.01em;
}

.brand-sub {
  font-size: .65rem;
  color: rgba(255,255,255,.45);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Sidebar user pill */
.sidebar-user {
  margin: 16px 16px 0;
  padding: 12px 14px;
  background: rgba(255,255,255,.06);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.15);
  flex-shrink: 0;
}

.sidebar-avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; }

.sidebar-user-name {
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: .68rem;
  color: rgba(255,255,255,.45);
}

/* Nav sections */
.sidebar-nav {
  flex: 1;
  padding: 20px 12px 12px;
}

.nav-section-label {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 0 8px;
  margin: 16px 0 6px;
}

.nav-section-label:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .845rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: all var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(90deg, var(--brand-accent), #0089a3);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,151,178,.35);
}

.nav-item .nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--warning);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Admin divider */
.nav-admin-section {
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: 8px;
  padding-top: 8px;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .845rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: all var(--transition);
}

.sidebar-logout:hover {
  background: rgba(220,38,38,.15);
  color: #fca5a5;
}

/* ── Top Bar ───────────────────────────────────────────────────── */
.topbar {
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.topbar-date {
  font-size: .8rem;
  color: var(--gray-400);
  padding: 4px 10px;
  background: var(--gray-100);
  border-radius: 999px;
}

/* Mobile toggle */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--gray-600);
  font-size: 1.2rem;
}

/* ── Main Content ─────────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1200px;
  width: 100%;
}

/* ════════════════════════════════
   PAGE HEADER
   ════════════════════════════════ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -.02em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: .85rem;
  color: var(--gray-400);
  margin-top: 4px;
  font-weight: 400;
}

/* ════════════════════════════════
   CARDS
   ════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.link-sm {
  font-size: .8rem;
  color: var(--brand-accent);
  text-decoration: none;
  font-weight: 600;
}
.link-sm:hover { text-decoration: underline; }

/* ════════════════════════════════
   BUTTONS
   ════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: .845rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  letter-spacing: -.01em;
  white-space: nowrap;
}

.btn:active { transform: scale(.98); }

.btn-primary  {
  background: linear-gradient(135deg, var(--brand-accent), #0089a3);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,151,178,.3);
}
.btn-primary:hover  { box-shadow: 0 6px 16px rgba(0,151,178,.45); transform: translateY(-1px); }

.btn-success  { background: linear-gradient(135deg, #059669, #047857); color: #fff; box-shadow: 0 4px 10px rgba(5,150,105,.25); }
.btn-success:hover  { transform: translateY(-1px); }

.btn-danger   { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; box-shadow: 0 4px 10px rgba(220,38,38,.25); }
.btn-danger:hover   { transform: translateY(-1px); }

.btn-warning  { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }

.btn-secondary{ background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-secondary:hover{ background: var(--gray-200); }

.btn-ghost    { background: transparent; color: var(--gray-600); border: 1px solid var(--gray-200); }
.btn-ghost:hover    { background: var(--gray-100); border-color: var(--gray-300); }

.btn-outline-brand { background: transparent; color: var(--brand-accent); border: 1.5px solid var(--brand-accent); }
.btn-outline-brand:hover { background: var(--brand-xlight); }

.btn-sm  { padding: 7px 14px; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-xs  { padding: 4px 10px; font-size: .75rem; border-radius: var(--radius-sm); }
.btn-lg  { padding: 13px 28px; font-size: .95rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; margin-top: 6px; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ════════════════════════════════
   FORMS
   ════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-label { font-size: .8rem; font-weight: 600; color: var(--gray-600); letter-spacing: .01em; }
.optional { font-weight: 400; color: var(--gray-400); }

.form-control {
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .875rem;
  background: var(--white);
  color: var(--gray-800);
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(0,151,178,.12);
}

.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; }

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

.form-check { flex-direction: row; align-items: center; gap: 0; }
.check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .875rem; color: var(--gray-600); }
.check-label input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand-accent); flex-shrink: 0; }

/* ════════════════════════════════
   ALERTS
   ════════════════════════════════ */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: .875rem;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
}

.alert::before { font-size: 1rem; flex-shrink: 0; }
.alert-success { background: var(--success-lt); color: #065f46; border: 1px solid #a7f3d0; }
.alert-success::before { content: '✓'; }
.alert-danger  { background: var(--danger-lt);  color: #991b1b; border: 1px solid #fecaca; }
.alert-danger::before  { content: '✕'; }
.alert-warning { background: var(--warning-lt); color: #92400e; border: 1px solid #fde68a; }
.alert-warning::before { content: '⚠'; }
.alert-info    { background: var(--brand-light); color: #0c4a6e; border: 1px solid #bae6fd; }
.alert-info::before    { content: 'ℹ'; }

/* ════════════════════════════════
   BADGES
   ════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-primary   { background: var(--brand-light);  color: var(--brand-accent); }
.badge-success   { background: var(--success-lt);   color: var(--success); }
.badge-danger    { background: var(--danger-lt);    color: var(--danger); }
.badge-warning   { background: var(--warning-lt);   color: var(--warning); }
.badge-secondary { background: var(--gray-100);     color: var(--gray-500); }

/* ════════════════════════════════
   STATS ROW
   ════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-accent), var(--brand-accent2));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card.stat-alert::before { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.stat-card.stat-success::before { background: linear-gradient(90deg, var(--success), #34d399); }

.stat-icon { font-size: 1.4rem; margin-bottom: 10px; }
.stat-number { font-size: 2.2rem; font-weight: 800; color: var(--brand-dark); letter-spacing: -.03em; line-height: 1; }
.stat-card.stat-alert .stat-number { color: var(--warning); }
.stat-card.stat-success .stat-number { color: var(--success); }
.stat-label { font-size: .78rem; color: var(--gray-400); margin-top: 5px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* ════════════════════════════════
   TABLES
   ════════════════════════════════ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }

.data-table { width: 100%; border-collapse: collapse; font-size: .855rem; }

.data-table thead tr {
  background: var(--gray-50);
  border-bottom: 1.5px solid var(--gray-200);
}

.data-table th {
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 11px 16px;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-700);
}

.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover td { background: var(--brand-xlight); }
.data-table tbody tr:last-child td { border-bottom: none; }

.row-muted { opacity: .5; }

.room-badge {
  display: inline-flex;
  align-items: center;
  background: var(--brand-light);
  color: var(--brand-accent);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  letter-spacing: .03em;
}

/* ════════════════════════════════
   BOOKING LIST
   ════════════════════════════════ */
.booking-list { display: flex; flex-direction: column; gap: 10px; }

.booking-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  background: var(--gray-50);
  transition: all var(--transition);
}
.booking-item:hover { border-color: var(--brand-light); background: var(--brand-xlight); }

.booking-room-badge {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-mid));
  color: #fff;
  font-weight: 700;
  font-size: .72rem;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  letter-spacing: .03em;
}

.booking-info { flex: 1; min-width: 0; }
.booking-title { font-weight: 600; font-size: .875rem; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking-meta { font-size: .78rem; color: var(--gray-400); margin-top: 2px; }

/* ════════════════════════════════
   ROOM GRID (Dashboard)
   ════════════════════════════════ */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.room-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  transition: all var(--transition);
  cursor: default;
  background: var(--white);
}
.room-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.room-card.room-free { border-color: #a7f3d0; background: linear-gradient(135deg, #f0fdf9, #ecfdf5); }
.room-card.room-busy { border-color: #fecaca; background: linear-gradient(135deg, #fff5f5, #fef2f2); }

.room-number { font-weight: 800; font-size: .82rem; color: var(--brand-accent); letter-spacing: .04em; margin-bottom: 3px; }
.room-name { font-size: .78rem; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; line-height: 1.3; }
.room-cap { font-size: .72rem; color: var(--gray-400); margin-bottom: 6px; }
.room-status { font-size: .74rem; font-weight: 700; margin-bottom: 8px; }
.status-free { color: var(--success); }
.status-busy { color: var(--danger); }

/* ════════════════════════════════
   BOOK FORM LAYOUT
   ════════════════════════════════ */
.book-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: start;
}

.room-info-box {
  padding: 10px 14px;
  background: var(--brand-light);
  border-radius: var(--radius);
  font-size: .8rem;
  color: #0c4a6e;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  border: 1px solid #bae6fd;
}

.duration-hint { font-size: .8125rem; font-weight: 700; margin-top: 4px; min-height: 1.3em; }

/* ════════════════════════════════
   SCHEDULE SLOTS
   ════════════════════════════════ */
.schedule-slot {
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  border: 1px solid transparent;
}

.busy-slot {
  background: var(--danger-lt);
  border-left: 3px solid var(--danger);
  border-color: #fecaca;
}
.busy-slot strong { color: var(--danger); font-size: .84rem; }
.slot-title { font-weight: 600; font-size: .875rem; color: var(--gray-800); margin-top: 3px; }
.slot-by { font-size: .75rem; color: var(--gray-400); margin-top: 2px; }

/* ════════════════════════════════
   EMPTY STATE
   ════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--gray-400);
}
.empty-icon { font-size: 2.8rem; display: block; margin-bottom: 12px; }
.empty-state p { font-size: .9rem; margin-bottom: 14px; }

/* ════════════════════════════════
   CONFIRM PAGE
   ════════════════════════════════ */
.confirm-card {
  max-width: 540px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  text-align: center;
}
.confirm-icon { font-size: 3.5rem; margin-bottom: 14px; display: block; }
.confirm-card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; color: var(--gray-800); }

.booking-detail-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: left;
  margin-bottom: 20px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: .875rem;
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row > span:first-child { color: var(--gray-400); font-size: .8rem; flex-shrink: 0; }
.detail-row strong { color: var(--gray-800); font-weight: 600; text-align: right; }

/* ════════════════════════════════
   DAY SELECTOR
   ════════════════════════════════ */
.day-selector { display: flex; gap: 8px; flex-wrap: wrap; }

.day-btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: 48px;
  height: 48px;
  justify-content: center;
  border: 1.5px solid var(--gray-200);
  border-radius: 50%;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition);
  background: var(--white);
  color: var(--gray-600);
}
.day-btn input { display: none; }
.day-btn.selected { background: var(--brand-accent); color: #fff; border-color: var(--brand-accent); box-shadow: 0 4px 12px rgba(0,151,178,.35); }
.day-btn:hover:not(.selected) { border-color: var(--brand-accent); color: var(--brand-accent); }

/* ════════════════════════════════
   INFO BOX
   ════════════════════════════════ */
.info-box {
  background: var(--brand-light);
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: .845rem;
  color: #0c4a6e;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ════════════════════════════════
   ADMIN
   ════════════════════════════════ */
.admin-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.quick-link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: .9rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  text-align: center;
}
.quick-link-card:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.quick-link-card .qlc-icon { font-size: 1.8rem; }
.quick-link-card.has-badge::after {
  content: attr(data-badge);
  position: absolute;
  top: 10px; right: 10px;
  background: var(--warning);
  color: #fff;
  font-size: .64rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ── Tab Bar ─────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 4px; border-bottom: 1.5px solid var(--gray-200); margin-bottom: 20px; padding-bottom: 0; }
.tab-btn {
  padding: 9px 18px;
  font-size: .845rem;
  font-weight: 600;
  color: var(--gray-500);
  text-decoration: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: relative;
  bottom: -1.5px;
  border: 1.5px solid transparent;
  border-bottom: none;
}
.tab-btn:hover { color: var(--brand-accent); }
.tab-btn.active { color: var(--brand-accent); background: var(--white); border-color: var(--gray-200); border-bottom-color: var(--white); }

/* ── Recurring Card ──────────────────────────────────────────── */
.recurring-card { }
.recurring-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.recurring-detail-grid { display: grid; grid-template-columns: 1fr 1fr; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.recurring-detail-grid .detail-row { padding: 10px 14px; font-size: .845rem; border-bottom: 1px solid var(--gray-100); }
.recurring-action-form { border-top: 1px solid var(--gray-100); padding-top: 18px; margin-top: 4px; }

/* ── Room Admin List ─────────────────────────────────────────── */
.room-admin-list { display: flex; flex-direction: column; }
.room-admin-item { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--gray-100); }
.room-admin-item.inactive { opacity: .45; }
.room-admin-item:last-child { border-bottom: none; }
.room-admin-info { flex: 1; }
.room-admin-id { font-weight: 700; font-size: .75rem; color: var(--brand-accent); text-transform: uppercase; letter-spacing: .04em; }
.room-admin-name { font-weight: 700; font-size: .9375rem; color: var(--gray-800); }
.room-admin-meta { font-size: .78rem; color: var(--gray-400); margin-top: 2px; }
.room-admin-amenities { margin-top: 3px; }
.room-admin-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Filter Form ─────────────────────────────────────────────── */
.filter-form { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; padding-bottom: 6px; }
.filter-form .form-group { min-width: 160px; margin-bottom: 0; }

/* ════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════ */
.login-page {
  min-height: 100vh;
  background: var(--brand-dark);
  display: flex;
  align-items: stretch;
}

.login-left {
  width: 50%;
  background: linear-gradient(160deg, var(--brand-dark) 0%, #003d5c 60%, #005573 100%);
  display: flex;
  flex-direction: column;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.login-left::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,151,178,.2), transparent 70%);
  top: -100px; right: -100px;
}

.login-left::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,180,216,.15), transparent 70%);
  bottom: -80px; left: 40px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.login-brand-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent2));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}

.login-brand-text { display: flex; flex-direction: column; }
.login-brand-name { font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.login-brand-tagline { font-size: .72rem; color: rgba(255,255,255,.45); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }

.login-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; padding: 20px 0; }
.login-hero h1 { font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1.15; letter-spacing: -.03em; margin-bottom: 16px; }
.login-hero h1 span { color: var(--brand-accent2); }
.login-hero p { font-size: 1rem; color: rgba(255,255,255,.6); line-height: 1.7; max-width: 380px; }

.login-features-list { display: flex; flex-direction: column; gap: 14px; margin-top: 36px; position: relative; z-index: 1; }
.login-feature { display: flex; align-items: center; gap: 12px; }
.login-feature-icon { width: 36px; height: 36px; background: rgba(255,255,255,.08); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .95rem; flex-shrink: 0; }
.login-feature-text { font-size: .875rem; color: rgba(255,255,255,.65); }
.login-feature-text strong { color: rgba(255,255,255,.9); display: block; font-size: .9rem; }

.login-right {
  width: 50%;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.login-card-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.login-card-logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-mid));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.login-card-logo-text { display: flex; flex-direction: column; }
.login-card-logo-name { font-size: 1rem; font-weight: 800; color: var(--brand-dark); }
.login-card-logo-sub { font-size: .68rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }

.login-card h2 { font-size: 1.45rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; letter-spacing: -.02em; }
.login-card p { font-size: .875rem; color: var(--gray-400); margin-bottom: 28px; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--gray-700);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.btn-google:hover { border-color: var(--gray-400); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.login-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.login-divider::before,.login-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.login-divider span { font-size: .75rem; color: var(--gray-400); font-weight: 500; }

.login-note { font-size: .78rem; color: var(--gray-400); text-align: center; margin-top: 16px; line-height: 1.5; }
.login-note a { color: var(--brand-accent); text-decoration: none; }

@media (max-width: 768px) {
  .login-page { flex-direction: column; }
  .login-left { width: 100%; padding: 32px 24px; min-height: 0; }
  .login-hero { padding: 16px 0 0; }
  .login-hero h1 { font-size: 1.6rem; }
  .login-features-list { display: none; }
  .login-right { width: 100%; padding: 32px 20px; }
}

/* ════════════════════════════════
   FOOTER
   ════════════════════════════════ */
.site-footer {
  padding: 20px 32px;
  font-size: .78rem;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--gray-500); }

/* ════════════════════════════════
   GRID + UTILITIES
   ════════════════════════════════ */
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-1 { margin-top: 6px; }
.mt-4 { margin-top: 24px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.text-muted { color: var(--gray-400); }
.text-sm { font-size: .855rem; }
.text-xs { font-size: .75rem; }
.text-center { text-align: center; }

/* ════════════════════════════════
   RESPONSIVE
   ════════════════════════════════ */
@media (max-width: 1024px) {
  .book-layout { grid-template-columns: 1fr; }
  .recurring-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid-2col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }
  .sidebar.open {
    transform: translateX(0);
  }

  .main-wrapper { margin-left: 0; }

  .sidebar-toggle { display: flex; }

  .main-content { padding: 20px 16px; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }

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

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 150;
  }
  .sidebar-overlay.open { display: block; }
}

/* ════════════════════════════════════════════════════
   GOOGLE CALENDAR–STYLE ROOM CALENDAR
   ════════════════════════════════════════════════════ */

/* ── Toolbar ─────────────────────────────────────────── */
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  box-shadow: var(--shadow);
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cal-week-label {
  font-size: .875rem;
  font-weight: 700;
  color: var(--gray-700);
  padding: 0 6px;
}

.cal-room-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cal-room-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray-500);
  text-decoration: none;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  transition: all var(--transition);
  line-height: 1.3;
}

.cal-room-tab span {
  font-weight: 400;
  font-size: .65rem;
  color: var(--gray-400);
  white-space: nowrap;
}

.cal-room-tab:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}

.cal-room-tab.active {
  background: var(--brand-accent);
  color: #fff;
  border-color: var(--brand-accent);
  box-shadow: 0 4px 12px rgba(0,151,178,.3);
}

.cal-room-tab.active span { color: rgba(255,255,255,.75); }

/* ── Wrapper & Grid ──────────────────────────────────── */
.cal-wrapper {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 260px);
  min-height: 500px;
}

.cal-grid {
  display: grid;
  /* time col + 7 day cols */
  grid-template-columns: 64px repeat(7, minmax(110px, 1fr));
  min-width: 860px;
  position: relative;
}

/* ── Corner cell ─────────────────────────────────────── */
.cal-corner {
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  left: 0;
  z-index: 30;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-room-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: .68rem;
  color: var(--gray-400);
  text-align: center;
  line-height: 1.4;
}
.cal-room-info strong { color: var(--brand-accent); font-size: .8rem; }

/* ── Day headers ─────────────────────────────────────── */
.cal-day-header {
  background: var(--white);
  border-bottom: 2px solid var(--gray-200);
  border-right: 1px solid var(--gray-100);
  padding: 10px 8px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.cal-day-header.past { opacity: .55; }

.cal-dname {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gray-400);
}

.cal-dnum {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-700);
  line-height: 1;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-dnum.today-bubble {
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent2));
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,151,178,.4);
}

.cal-day-header.today .cal-dname { color: var(--brand-accent); }

.cal-dmonth {
  font-size: .65rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* ── Time labels ─────────────────────────────────────── */
.cal-time-label {
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  border-top: 1px solid var(--gray-100);
  position: sticky;
  left: 0;
  z-index: 10;
  padding: 0 8px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  height: 60px;
}

.cal-time-label span {
  font-size: .7rem;
  color: var(--gray-400);
  font-weight: 600;
  margin-top: -8px;
  white-space: nowrap;
}

/* ── Slot cells ──────────────────────────────────────── */
.cal-slot {
  border-top: 1px solid var(--gray-100);
  border-right: 1px solid var(--gray-100);
  height: 60px;
  position: relative;
  transition: background var(--transition);
}

.cal-half-divider {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  border-top: 1px dashed var(--gray-100);
  pointer-events: none;
}

.cal-slot.open-slot { cursor: pointer; }
.cal-slot.open-slot:hover { background: var(--brand-xlight); }
.cal-slot.past-slot { background: var(--gray-50); cursor: default; }

/* ── Events overlay ──────────────────────────────────── */
.cal-events-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── Event blocks ────────────────────────────────────── */
.cal-event {
  position: absolute;
  border-radius: 6px;
  padding: 5px 7px;
  overflow: hidden;
  cursor: pointer;
  pointer-events: all;
  transition: opacity .15s, box-shadow .15s, transform .1s;
  z-index: 5;
}

.cal-event:hover {
  opacity: .92;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  transform: scale(1.01);
  z-index: 10;
}

/* My bookings: teal gradient */
.cal-event.mine {
  background: linear-gradient(135deg, var(--brand-accent), #006f86);
  color: #fff;
  border-left: 3px solid var(--brand-dark);
}

/* Other users' bookings: warm amber */
.cal-event.others {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-left: 3px solid #92400e;
}

.cal-event-title {
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.cal-event-time {
  font-size: .65rem;
  opacity: .85;
  margin-top: 1px;
}

.cal-event-user {
  font-size: .63rem;
  opacity: .75;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Modal ───────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(3px);
  z-index: 900;
  /* flex centering — sidebar offset keeps modal fully in the content area */
  align-items: center;
  justify-content: center;
  padding-left: var(--sidebar-w);
  box-sizing: border-box;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn .15s ease;
}

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp { from { opacity:0; transform:translateY(24px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }

.modal-box {
  /* No longer position:fixed — it's a flex child of the overlay */
  width: 92%;
  max-width: 520px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px rgba(0,0,0,.22);
  overflow: hidden;
  animation: slideUp .2s ease forwards;
  /* Ensure modal doesn't exceed viewport height */
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-box.modal-sm { max-width: 420px; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--gray-100);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.modal-subtitle {
  font-size: .8rem;
  color: var(--brand-accent);
  margin-top: 3px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-left: 12px;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }

.modal-body {
  padding: 20px 24px;
  flex: 1;
  overflow-y: auto;
}

.modal-body .form-group { margin-bottom: 16px; }
.modal-body .form-group:last-child { margin-bottom: 0; }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* ── Toast ───────────────────────────────────────────── */
.cal-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--brand-dark);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0;
  transition: all .35s ease;
  z-index: 9999;
  white-space: nowrap;
}

.cal-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Legend ──────────────────────────────────────────── */
.cal-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: .775rem;
  color: var(--gray-500);
  margin-top: 12px;
  flex-wrap: wrap;
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-mine   { background: linear-gradient(135deg, var(--brand-accent), #006f86); }
.legend-others { background: linear-gradient(135deg, #f59e0b, #d97706); }
.legend-free   { background: var(--brand-light); border: 1px solid var(--gray-200); }

@media (max-width: 768px) {
  .cal-toolbar { flex-direction: column; align-items: flex-start; }
  .cal-wrapper { max-height: calc(100vh - 320px); }
  .modal-box { max-width: 96%; }
  .modal-overlay { padding-left: 0; }
}
}
