/* ============================================================
   CSS Variables
   ============================================================ */
:root {
  --primary: #7C6FF7;
  --primary-dark: #6A5CF0;
  --primary-light: #EEEAFF;
  --room1: #7C6FF7;
  --room1-light: #EEEAFF;
  --room2: #0EA5A0;
  --room2-light: #EDFAFA;
  --bg: #F7F7FB;
  --card: #FFFFFF;
  --border: #EAECF0;
  --text: #111827;
  --text-sub: #6B7280;
  --text-light: #9CA3AF;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.13);
  --header-height: 60px;
  --bottom-bar: 80px;
  --slot-h: 64px;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
button { cursor: pointer; border: none; outline: none; font-family: inherit; background: none; }
input, select, textarea { font-family: inherit; outline: none; box-sizing: border-box; }
a { text-decoration: none; }


/* ============================================================
   USER PAGE  (max-width 480px, centered)
   ============================================================ */

/* --- Header --- */
.header {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: var(--header-height);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex; align-items: center;
  padding: 0 20px;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 22px; }
.logo-text {
  font-size: 18px; font-weight: 800;
  color: var(--primary); letter-spacing: -0.5px;
}

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-link {
  font-size: 12px; font-weight: 600;
  color: var(--text-sub);
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  transition: all .2s;
  white-space: nowrap;
}
.header-link:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }

.admin-link {
  font-size: 13px; font-weight: 600;
  color: var(--text-sub);
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  transition: all .2s;
}
.admin-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Inquiry category selector (user modal) */
.inquiry-cats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.inquiry-cat {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
}
.inquiry-cat:hover { background: var(--primary-light); }
.inquiry-cat.active {
  border-color: var(--primary);
  background: var(--primary-light);
}
.inquiry-cat input { position: absolute; opacity: 0; pointer-events: none; }
.inquiry-cat-icon { font-size: 22px; }
.inquiry-cat-name { font-size: 12px; font-weight: 700; color: var(--text); }

/* --- Main --- */
.main {
  padding-top: var(--header-height);
  padding-bottom: calc(var(--bottom-bar) + 8px);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
}

/* --- Date Nav --- */
.date-nav {
  background: var(--card);
  padding: 16px 20px 0;
  border-bottom: 1px solid var(--border);
}

.date-top {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.date-center { text-align: center; flex: 1; }

.date-weekday {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 1px;
}

.date-text {
  font-size: 22px; font-weight: 800;
  color: var(--text); letter-spacing: -0.8px;
}

.btn-nav {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  font-size: 20px; color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; line-height: 1;
}
.btn-nav:hover {
  background: var(--primary-light);
  color: var(--primary); border-color: var(--primary);
}

/* Week Strip */
.week-strip {
  display: flex; gap: 2px;
  justify-content: space-between;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.week-strip::-webkit-scrollbar { display: none; }

.week-day {
  flex: none;
  display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s;
  min-width: 44px;
}
.week-day:hover:not(.active) { background: var(--bg); }
.week-day.active { background: var(--primary); }

.week-day-name {
  font-size: 11px; font-weight: 700;
  color: var(--text-sub); text-transform: uppercase;
}
.week-day.active .week-day-name { color: rgba(255,255,255,.75); }

.week-day-num { font-size: 16px; font-weight: 700; color: var(--text); }
.week-day.active .week-day-num { color: #fff; }
.week-day.is-today:not(.active) .week-day-num { color: var(--primary); }

/* --- Room Tabs --- */
.room-tabs {
  display: flex;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}

.room-tab {
  flex: 1; padding: 14px 0;
  font-size: 14px; font-weight: 600;
  color: var(--text-sub);
  border: none; border-bottom: 2.5px solid transparent;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.room-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.room-tab:nth-child(1) .tab-dot { background: var(--room1); }
.room-tab:nth-child(2) .tab-dot { background: var(--room2); }

/* --- Timeline --- */
.timeline-section {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.timeline-wrapper {
  display: flex;
  padding: 16px 12px 24px 20px;
}

.time-labels { flex: none; width: 50px; }

.time-label {
  height: var(--slot-h);
  font-size: 11px; font-weight: 500;
  color: var(--text-light);
  position: relative; top: -7px;
  line-height: 1; user-select: none;
}

.timeline-grid {
  flex: 1;
  position: relative;
  border-left: 1.5px solid var(--border);
}

.timeline-slot {
  height: var(--slot-h);
  border-bottom: 1px dashed var(--border);
  transition: background .15s;
  cursor: pointer;
}
.timeline-slot:last-child { border-bottom: none; }
.timeline-slot.room1:hover { background: var(--primary-light); }
.timeline-slot.room2:hover { background: var(--room2-light); }

.reservations-layer {
  position: absolute;
  top: 0; left: 0; right: 0;
  pointer-events: none;
}

.reservation-block {
  position: absolute;
  left: 6px; right: 6px;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  transition: transform .2s, box-shadow .2s;
}
.reservation-block:hover { transform: scale(1.01) translateX(-1px); box-shadow: var(--shadow-md); }

.reservation-block.room1 {
  background: linear-gradient(135deg, #7C6FF7 0%, #A89DF8 100%);
  color: #fff;
}
.reservation-block.room2 {
  background: linear-gradient(135deg, #0EA5A0 0%, #2DD4BF 100%);
  color: #fff;
}

.res-team { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-time { font-size: 11px; opacity: .85; margin-top: 2px; }
.res-members { font-size: 11px; opacity: .75; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Current time indicator */
.current-time-line {
  position: absolute; left: 0; right: 0;
  height: 2px; background: var(--danger);
  z-index: 20; pointer-events: none;
}
.current-time-line::before {
  content: '';
  position: absolute; left: -5px; top: -4px;
  width: 10px; height: 10px;
  border-radius: 50%; background: var(--danger);
}

/* --- Bottom Bar --- */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: var(--bottom-bar);
  padding: 12px 20px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 100;
}

.btn-reserve-main {
  width: 100%; height: 52px;
  background: var(--primary);
  color: #fff;
  font-size: 16px; font-weight: 700;
  border-radius: var(--radius);
  transition: all .2s; letter-spacing: -.3px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-reserve-main:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,111,247,.4);
}
.btn-reserve-main:active { transform: translateY(0); }

/* --- Modal (slide-up sheet) --- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  width: 100%; max-width: 480px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 18px; font-weight: 800; letter-spacing: -.5px; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%; background: var(--bg);
  font-size: 14px; color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 20px 20px 36px; }

/* Room badge in modal */
.room-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700;
  margin-bottom: 20px;
}
.room-badge.r1 { background: var(--primary-light); color: var(--room1); }
.room-badge.r2 { background: var(--room2-light); color: var(--room2); }

.badge-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.room-badge.r1 .badge-dot { background: var(--room1); }
.room-badge.r2 .badge-dot { background: var(--room2); }

/* Form */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px; color: var(--text);
  background: var(--card);
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,111,247,.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-light); }
.form-textarea { resize: none; height: 76px; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px; cursor: pointer;
}

/* Duration buttons */
.duration-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
}
.duration-btn {
  padding: 13px 0;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 14px; font-weight: 600;
  color: var(--text-sub);
  transition: all .2s;
}
.duration-btn:hover { border-color: var(--primary); color: var(--primary); }
.duration-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* Time summary */
.time-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.time-summary-icon { font-size: 16px; }
.time-summary-text { font-size: 14px; font-weight: 600; color: var(--text); }

/* Fee & Deposit info box */
.fee-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
.fee-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 4px;
}
.fee-label { font-size: 13px; color: var(--text-sub); font-weight: 600; }
.fee-value { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.fee-breakdown { font-size: 12px; color: var(--text-light); font-weight: 500; }
.fee-divider {
  height: 1px; background: var(--border);
  margin: 12px 0;
}
.fee-deposit-title {
  font-size: 12px; color: var(--text-sub); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.fee-deposit { display: flex; flex-direction: column; gap: 2px; }
.fee-deposit-bank { font-size: 14px; font-weight: 600; color: var(--text); }
.fee-deposit-bank b { font-weight: 800; letter-spacing: -0.3px; }
.fee-deposit-name { font-size: 13px; color: var(--text-sub); font-weight: 500; }
.btn-copy-account {
  margin-top: 8px; width: 100%; height: 36px;
  background: #fff; color: var(--primary);
  border: 1px solid var(--primary);
  font-size: 13px; font-weight: 700;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.btn-copy-account:hover { background: var(--primary-light); }
.fee-notice {
  margin-top: 10px; font-size: 12px; color: var(--text-light);
  text-align: center; font-weight: 500;
}

/* Pending reservation styling */
.reservation-block.pending {
  opacity: 0.65;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    rgba(255, 255, 255, 0.25) 6px,
    rgba(255, 255, 255, 0.25) 12px
  );
}
.res-status-badge {
  display: inline-block;
  font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px;
  margin-left: 4px; vertical-align: middle;
  letter-spacing: 0.3px;
}
.res-status-badge.pending {
  background: rgba(255, 255, 255, 0.85);
  color: #c2410c;
}

/* Blocked period overlay on timeline */
.blocked-block {
  position: absolute;
  left: 6px; right: 6px;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
  overflow: hidden;
  pointer-events: auto;
  cursor: not-allowed;
  background: repeating-linear-gradient(
    45deg,
    #9CA3AF,
    #9CA3AF 6px,
    #6B7280 6px,
    #6B7280 12px
  );
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  z-index: 2;
}
.blocked-block .blocked-icon { font-size: 14px; }
.blocked-block .blocked-text {
  font-size: 12px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: .3px;
}

/* Submit */
.btn-submit {
  width: 100%; height: 54px;
  background: var(--primary); color: #fff;
  font-size: 16px; font-weight: 700;
  border-radius: var(--radius);
  transition: all .2s; letter-spacing: -.3px;
  margin-top: 8px;
}
.btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,111,247,.4);
}
.btn-submit:disabled {
  opacity: .6; cursor: not-allowed;
  transform: none; box-shadow: none;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-bar) + 16px);
  left: 50%; transform: translateX(-50%) translateY(16px);
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  z-index: 400; pointer-events: none;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); color: #fff; }
.toast.error   { background: var(--danger);  color: #fff; }
.toast.info    { background: var(--text);    color: #fff; }


/* --- Desktop framing for user page --- */
@media (min-width: 481px) {
  body { background: #ECECF4; }

  .main {
    background: var(--bg);
    box-shadow:
      -1px 0 0 var(--border),
       1px 0 0 var(--border),
       0 8px 40px rgba(0,0,0,.08);
  }
  .header {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
  }
  .bottom-bar {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 -2px 16px rgba(0,0,0,.04);
  }
}


/* ============================================================
   ADMIN PAGE  (responsive: mobile + PC)
   ============================================================ */

/* --- Admin Login --- */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: linear-gradient(140deg, #F0EEFF 0%, #F7F7FB 50%, #EDFAFA 100%);
}

.login-card {
  width: 100%; max-width: 380px;
  background: var(--card);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
}

.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-icon { font-size: 40px; display: block; margin-bottom: 8px; }
.login-logo-text { font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }
.login-subtitle { font-size: 13px; color: var(--text-sub); margin-top: 4px; }

.login-title { font-size: 19px; font-weight: 800; color: var(--text); margin-bottom: 24px; letter-spacing: -.4px; }

.login-error {
  background: #FEF2F2; color: var(--danger);
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  margin-bottom: 16px; display: none;
}
.login-error.show { display: block; }

.btn-login {
  width: 100%; height: 50px;
  background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 700;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  transition: all .2s;
}
.btn-login:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(124,111,247,.4);
}

/* --- Admin Dashboard --- */
.admin-dashboard { display: none; min-height: 100vh; }
.admin-dashboard.show { display: block; }

.admin-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex; align-items: center;
  padding: 0 24px;
  justify-content: space-between;
}

.admin-logo { display: flex; align-items: center; gap: 10px; }
.admin-logo-icon { font-size: 22px; }
.admin-logo-text { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.admin-badge {
  font-size: 10px; font-weight: 700;
  background: var(--primary); color: #fff;
  padding: 3px 8px; border-radius: 10px; letter-spacing: .5px;
}

.btn-logout {
  font-size: 13px; font-weight: 600;
  color: var(--text-sub);
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  transition: all .2s;
}
.btn-logout:hover { color: var(--danger); border-color: var(--danger); background: #FEF2F2; }

/* Admin layout */
.admin-content {
  padding-top: var(--header-height);
  display: flex; min-height: 100vh;
}

/* Sidebar (desktop) */
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  padding: 24px 12px;
  border-right: 1px solid var(--border);
  background: var(--card);
  position: fixed;
  top: var(--header-height); bottom: 0;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 11px; font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase; letter-spacing: .8px;
  padding: 0 12px; margin-bottom: 8px;
}

.sidebar-nav { list-style: none; margin-bottom: 24px; }

.sidebar-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 2px;
}
.sidebar-item:hover { background: var(--bg); color: var(--text); }
.sidebar-item.active { background: var(--primary-light); color: var(--primary); }
.sidebar-icon { font-size: 16px; }

.room-filter-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Admin main */
.admin-main {
  flex: 1;
  padding: 28px;
  margin-left: 220px;
}

/* Dashboard: pending highlight */
.pending-highlight {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 1.5px solid #F59E0B;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all .15s;
}
.pending-highlight:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25); }
.pending-highlight.empty {
  background: var(--card);
  border-color: var(--border);
  cursor: default;
}
.pending-highlight.empty:hover { transform: none; box-shadow: none; }
.pending-highlight-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.pending-highlight-body { flex: 1; min-width: 0; }
.pending-highlight-title {
  font-size: 13px; font-weight: 800;
  color: #92400E; letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.pending-highlight.empty .pending-highlight-title { color: var(--text-sub); }
.pending-highlight-sub {
  font-size: 14px; font-weight: 600;
  color: var(--text);
}
.pending-highlight-amount {
  font-size: 22px; font-weight: 800;
  color: #92400E;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.pending-highlight.empty .pending-highlight-amount { color: var(--text-light); font-size: 16px; font-weight: 600; }

/* Dashboard: KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.kpi-card.revenue::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}
.kpi-period {
  font-size: 11px; font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 10px;
}
.kpi-main {
  display: flex; align-items: baseline; gap: 4px;
  margin-bottom: 6px;
}
.kpi-value {
  font-size: 28px; font-weight: 800;
  color: var(--text); letter-spacing: -1px; line-height: 1;
}
.kpi-unit { font-size: 14px; font-weight: 700; color: var(--text-sub); }
.kpi-sub { font-size: 12px; color: var(--text-sub); font-weight: 500; }
.kpi-sub span { font-weight: 700; color: var(--text); }

/* Dashboard: generic card */
.dashboard-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.dashboard-card-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.dashboard-card-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  letter-spacing: -0.3px;
}
.dashboard-card-sub { font-size: 12px; color: var(--text-sub); font-weight: 500; }

/* Dashboard: 7-day bar chart */
.bar-chart {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  height: 200px;
}
.bar-col {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
  min-width: 0;
}
.bar-value {
  font-size: 10px; font-weight: 700;
  color: var(--text-sub);
  height: 14px;
  white-space: nowrap;
}
.bar-track {
  flex: 1; width: 100%;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-sm);
  transition: height .4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 2px;
}
.bar-col.today .bar-fill {
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
}
.bar-label {
  font-size: 11px; font-weight: 600;
  color: var(--text-sub);
  text-align: center; line-height: 1.3;
}
.bar-label span { font-size: 10px; font-weight: 500; color: var(--text-light); }
.bar-col.today .bar-label { color: #D97706; font-weight: 700; }
.bar-col.sunday .bar-label { color: var(--danger); }
.bar-col.saturday .bar-label { color: #3B82F6; }

/* Bar chart — dynamic column variant (auto-fit) */
.bar-chart.mini {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  height: 160px;
  gap: 4px;
}
.bar-chart.mini .bar-value { height: 12px; font-size: 9px; }
.bar-chart.mini .bar-label { font-size: 10px; }

/* Stacked bar chart (monthly revenue split by room) */
.stack-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  height: 200px;
}
.stack-col {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; min-width: 0;
}
.stack-value {
  font-size: 10px; font-weight: 700; color: var(--text-sub);
  height: 14px; white-space: nowrap;
}
.stack-track {
  flex: 1; width: 100%;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.stack-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--room2) 0%, #0c9590 100%);
  border-radius: var(--radius-sm);
  transition: height .4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 2px;
  display: flex; flex-direction: column; justify-content: flex-start;
  overflow: hidden;
}
.stack-r1 {
  width: 100%;
  background: linear-gradient(180deg, var(--room1) 0%, var(--primary-dark) 100%);
  transition: height .4s cubic-bezier(0.4, 0, 0.2, 1);
}
.stack-label {
  font-size: 11px; font-weight: 600; color: var(--text-sub);
  text-align: center; line-height: 1.3;
}
.stack-label span { font-size: 10px; font-weight: 500; color: var(--text-light); }

/* Dashboard: room breakdown */
.room-breakdown { display: flex; flex-direction: column; gap: 16px; }
.room-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}
.room-row-head {
  display: flex; align-items: center; gap: 10px;
  min-width: 140px;
}
.room-row-count {
  font-size: 12px; color: var(--text-sub); font-weight: 600;
}
.room-row-meter {
  height: 10px; background: var(--bg);
  border-radius: 999px; overflow: hidden;
}
.room-row-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 2px;
}
.room-row-meter-fill.r1 { background: var(--room1); }
.room-row-meter-fill.r2 { background: var(--room2); }
.room-row-amount {
  display: flex; flex-direction: column; align-items: flex-end;
  min-width: 100px;
}
.room-row-amount > span:first-child { font-size: 14px; font-weight: 700; color: var(--text); }
.room-row-pct { font-size: 11px; font-weight: 600; color: var(--text-sub); }

/* Filter panel (chip-based) */
.filter-panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}

.chip-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.chip.chip-status-pending.active { background: #F59E0B; border-color: #F59E0B; }
.chip.chip-status-confirmed.active { background: #10B981; border-color: #10B981; }

.chip-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.chip-dot.room1 { background: var(--room1); }
.chip-dot.room2 { background: var(--room2); }
.chip.active .chip-dot { background: #fff; }

.filter-search {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
  margin-top: 4px;
}
.filter-search:focus { border-color: var(--primary); background: var(--card); }

/* Reservation list */
.reservation-list { display: flex; flex-direction: column; gap: 10px; }

.date-group-header {
  font-size: 13px; font-weight: 700;
  color: var(--text-sub);
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  margin: 8px 0;
  letter-spacing: .3px;
}

.reservation-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
  transition: box-shadow .2s;
}
.reservation-item:hover { box-shadow: var(--shadow-md); }

.res-room-tag {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.res-room-tag.r1 { background: var(--primary-light); color: var(--room1); }
.res-room-tag.r2 { background: var(--room2-light); color: var(--room2); }

.res-info { flex: 1; min-width: 0; }
.res-date-label { font-size: 12px; color: var(--text-sub); margin-bottom: 2px; }
.res-name { font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-detail { font-size: 13px; color: var(--text-sub); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.res-time-info { flex-shrink: 0; text-align: right; }
.res-time-main { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.res-duration { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

.res-fee { font-size: 13px; color: var(--text-sub); margin-top: 2px; font-weight: 600; }

.res-status-admin {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
  margin-left: 6px; letter-spacing: 0.3px;
  vertical-align: middle;
}
.res-status-admin.pending { background: #FEF3C7; color: #92400E; }
.res-status-admin.confirmed { background: #D1FAE5; color: #065F46; }

.reservation-item.pending {
  border-left: 3px solid #F59E0B;
  background: #FFFBEB;
}

.res-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-confirm-deposit {
  padding: 7px 12px;
  border-radius: 18px;
  background: #ECFDF5;
  border: 1.5px solid #86EFAC;
  color: #065F46;
  font-size: 12px; font-weight: 700;
  white-space: nowrap;
  transition: all .2s;
}
.btn-confirm-deposit:hover { background: #10B981; color: #fff; border-color: #10B981; }

.btn-delete {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  color: var(--danger);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.btn-delete:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Empty / Loading */
.admin-empty { text-align: center; padding: 60px 20px; color: var(--text-sub); }
.admin-empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.admin-empty-text { font-size: 15px; font-weight: 500; }

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile nav (admin) */
.mobile-admin-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 100; padding: 8px 0 14px;
}
.mobile-nav-items { display: flex; justify-content: space-around; }
.mobile-nav-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 4px 16px; cursor: pointer;
  font-size: 11px; font-weight: 600;
  color: var(--text-sub); transition: color .15s;
}
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-icon { font-size: 20px; }

/* Admin Toast (no bottom bar) */
.admin-toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  z-index: 400; pointer-events: none;
}
.admin-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.admin-toast.success { background: var(--success); color: #fff; }
.admin-toast.error   { background: var(--danger);  color: #fff; }

/* ============================================================
   ADMIN: User info in header
   ============================================================ */
.admin-user-info {
  display: flex; align-items: center; gap: 12px;
}

.user-display {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 20px;
}
.user-name { font-size: 13px; font-weight: 700; color: var(--text); }

.user-role-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: .3px;
  white-space: nowrap;
}
.user-role-badge.system { background: var(--primary); color: #fff; }
.user-role-badge.reservation { background: #DBEAFE; color: #1D4ED8; }


/* ============================================================
   ADMIN: Page header
   ============================================================ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap; gap: 12px;
}
.page-title {
  font-size: 22px; font-weight: 800;
  color: var(--text); letter-spacing: -.5px;
  margin-bottom: 2px;
}
.page-subtitle { font-size: 13px; color: var(--text-sub); }


/* ============================================================
   ADMIN: Buttons
   ============================================================ */
.btn-primary {
  height: 42px; padding: 0 18px;
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s;
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(124,111,247,.4);
}

.btn-secondary {
  flex: 1; height: 48px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 15px; font-weight: 600;
  color: var(--text-sub);
  background: var(--card);
  transition: all .2s;
}
.btn-secondary:hover { background: var(--bg); color: var(--text); }

.btn-danger {
  flex: 1; height: 48px;
  background: var(--danger); color: #fff;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700;
  transition: all .2s;
}
.btn-danger:hover {
  background: #DC2626;
  box-shadow: 0 4px 16px rgba(239,68,68,.4);
}
.btn-danger:disabled, .btn-secondary:disabled {
  opacity: .6; cursor: not-allowed;
}


/* ============================================================
   ADMIN: Role select (radio cards)
   ============================================================ */
.role-select { display: flex; flex-direction: column; gap: 8px; }

.role-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  background: var(--card);
}
.role-option:hover { border-color: var(--primary); background: var(--primary-light); }
.role-option.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124,111,247,.1);
}
.role-option input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer; flex-shrink: 0;
}
.role-info { flex: 1; }
.role-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.role-desc { font-size: 12px; color: var(--text-sub); }


/* ============================================================
   ADMIN: Toggle row
   ============================================================ */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  gap: 12px;
}
.toggle-switch {
  appearance: none;
  width: 44px; height: 24px;
  border-radius: 12px;
  background: #D1D5DB;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.toggle-switch:checked { background: var(--primary); }
.toggle-switch:checked::after { transform: translateX(20px); }


/* ============================================================
   ADMIN: Inquiries
   ============================================================ */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  background: var(--danger);
  color: #fff;
  border-radius: 10px;
  font-size: 11px; font-weight: 800;
  margin-left: auto;
}
.nav-badge.mobile {
  position: absolute;
  top: 4px; right: 20%;
  min-width: 16px; height: 16px; padding: 0 4px;
  font-size: 10px; border-radius: 8px;
}

.inquiry-list { display: flex; flex-direction: column; gap: 10px; }

.inquiry-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow .2s, transform .1s;
  border-left: 4px solid transparent;
}
.inquiry-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.inquiry-item.new { border-left-color: var(--primary); }
.inquiry-item.cat-incident.new { border-left-color: var(--danger); }
.inquiry-item.cat-complaint.new { border-left-color: var(--warning); }

.inquiry-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.inquiry-cat-tag {
  font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 12px;
  letter-spacing: .3px;
  background: var(--primary-light); color: var(--primary-dark);
}
.inquiry-cat-tag.cat-complaint { background: #FEF3C7; color: #B45309; }
.inquiry-cat-tag.cat-incident  { background: #FEE2E2; color: #B91C1C; }

.inquiry-status-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  letter-spacing: .3px;
}
.inquiry-status-badge.new      { background: var(--primary-light); color: var(--primary-dark); }
.inquiry-status-badge.resolved { background: #D1FAE5; color: #065F46; }

.inquiry-time {
  margin-left: auto;
  font-size: 12px; color: var(--text-light); font-weight: 500;
}

.inquiry-preview {
  font-size: 14px; color: var(--text);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inquiry-contact {
  margin-top: 8px;
  font-size: 12px; color: var(--text-sub);
}

.inquiry-detail-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.inquiry-detail-content {
  font-size: 15px; color: var(--text);
  line-height: 1.7;
  background: var(--bg);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  white-space: pre-wrap; word-break: break-word;
}
.inquiry-detail-contact {
  background: var(--primary-light);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text);
  line-height: 1.8;
}
.inquiry-detail-contact.muted {
  background: var(--bg); color: var(--text-light);
  font-style: italic; text-align: center;
}
.inquiry-detail-contact a { color: var(--primary-dark); font-weight: 700; }
.inquiry-detail-label {
  font-size: 11px; font-weight: 800; color: var(--text-sub);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 4px;
}
.inquiry-detail-resolved {
  margin-top: 12px;
  font-size: 12px; color: var(--success);
  background: #D1FAE5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.sidebar-item { position: relative; }

/* ============================================================
   ADMIN: Calendar
   ============================================================ */
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px;
}
.cal-title-wrap { display: flex; align-items: center; gap: 10px; }
.cal-title { font-size: 20px; font-weight: 800; color: var(--text); margin: 0; }
.cal-today-btn {
  height: 32px; padding: 0 14px;
  background: var(--primary-light); color: var(--primary-dark);
  border-radius: 8px; font-size: 13px; font-weight: 700;
}
.cal-today-btn:hover { background: var(--primary); color: #fff; }

.cal-legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 12px; color: var(--text-sub);
}
.cal-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.cal-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px;
}
.cal-dot.r1 { background: var(--room1); }
.cal-dot.r2 { background: var(--room2); }
.cal-dot.pending { background: repeating-linear-gradient(45deg, var(--warning), var(--warning) 3px, #fff 3px, #fff 5px); border: 1px solid var(--warning); }
.cal-dot.blocked { background: repeating-linear-gradient(45deg, #9CA3AF, #9CA3AF 3px, #6B7280 3px, #6B7280 5px); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  background: var(--card);
  padding: 10px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cal-dow {
  font-size: 12px; font-weight: 700; color: var(--text-sub);
  text-align: center; padding: 8px 0 6px;
  text-transform: uppercase; letter-spacing: .5px;
}
.cal-dow.sunday { color: var(--danger); }
.cal-dow.saturday { color: #3B82F6; }

.cal-cell {
  min-height: 92px;
  background: #FAFAFC;
  border-radius: 8px;
  padding: 6px 7px;
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  overflow: hidden;
}
.cal-cell:hover { background: var(--primary-light); transform: translateY(-1px); }
.cal-cell.empty { background: transparent; cursor: default; pointer-events: none; }
.cal-cell.today { background: var(--primary-light); outline: 2px solid var(--primary); }

.cal-date {
  font-size: 13px; font-weight: 700; color: var(--text);
  line-height: 1;
}
.cal-cell.sunday  .cal-date { color: var(--danger); }
.cal-cell.saturday .cal-date { color: #3B82F6; }

.cal-bars { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.cal-bar {
  font-size: 10px; font-weight: 700;
  padding: 3px 6px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: .2px;
}
.cal-bar.r1 { background: var(--primary-light); color: var(--room1); }
.cal-bar.r2 { background: var(--room2-light); color: var(--room2); }
.cal-bar.blocked { background: #F3F4F6; color: var(--text-sub); }
.cal-bar.has-pending {
  background-image: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(245, 158, 11, 0.35) 4px, rgba(245, 158, 11, 0.35) 7px);
}

/* Day detail modal content */
.cal-detail-section { margin-bottom: 18px; }
.cal-detail-section:last-child { margin-bottom: 0; }
.cal-detail-label {
  font-size: 12px; font-weight: 800; color: var(--text-sub);
  letter-spacing: .5px; text-transform: uppercase;
  margin-bottom: 8px;
}
.cal-detail-blocked, .cal-detail-res {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 8px;
}
.cal-detail-blocked {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.cal-detail-res-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.cal-detail-res-body {
  font-size: 13px; color: var(--text);
  display: flex; flex-direction: column; gap: 3px;
}
.cal-detail-sub { color: var(--text-sub); font-size: 12px; }
.cal-detail-time {
  font-size: 12px; font-weight: 600; color: var(--text);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

@media (max-width: 768px) {
  .cal-cell { min-height: 70px; padding: 4px 5px; }
  .cal-date { font-size: 12px; }
  .cal-bar  { font-size: 9px; padding: 2px 4px; }
  .cal-grid { gap: 2px; padding: 6px; }
}

/* ============================================================
   ADMIN: Blocked list
   ============================================================ */
.blocked-list { display: flex; flex-direction: column; gap: 10px; }

.blocked-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
  transition: box-shadow .2s;
}
.blocked-item:hover { box-shadow: var(--shadow-md); }

.blocked-date { flex: 0 0 auto; min-width: 130px; }
.blocked-date-main { font-size: 15px; font-weight: 700; color: var(--text); }
.blocked-time { font-size: 13px; color: var(--text-sub); margin-top: 2px; }
.blocked-allday {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  background: var(--warning); color: #fff;
  padding: 2px 8px; border-radius: 6px;
}

.blocked-meta {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.blocked-reason {
  font-size: 13px; color: var(--text);
  background: var(--bg);
  padding: 4px 10px; border-radius: 6px;
}

.res-room-tag.all {
  background: #F3F4F6;
  color: var(--text-sub);
}

@media (max-width: 768px) {
  .blocked-item { padding: 14px 16px; gap: 12px; flex-wrap: wrap; }
  .blocked-date { min-width: 0; flex: 1 1 auto; }
  .blocked-meta { flex-basis: 100%; order: 3; }
}

/* ============================================================
   ADMIN: User list
   ============================================================ */
.user-list { display: flex; flex-direction: column; gap: 10px; }

.user-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
  transition: box-shadow .2s;
}
.user-item:hover { box-shadow: var(--shadow-md); }
.user-item.inactive { opacity: .6; }

.user-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.user-avatar.system { background: linear-gradient(135deg, #7C6FF7, #A89DF8); }
.user-avatar.reservation { background: linear-gradient(135deg, #3B82F6, #60A5FA); }

.user-meta { flex: 1; min-width: 0; }
.user-meta-top {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.user-meta-name { font-size: 16px; font-weight: 700; color: var(--text); }
.user-meta-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-created { font-size: 12px; color: var(--text-light); }

.user-self-tag {
  font-size: 10px; font-weight: 700;
  background: var(--primary); color: #fff;
  padding: 2px 7px; border-radius: 8px;
  letter-spacing: .3px;
}
.user-inactive-tag {
  font-size: 10px; font-weight: 700;
  background: #F3F4F6; color: var(--text-sub);
  padding: 2px 7px; border-radius: 8px;
  letter-spacing: .3px;
}

.btn-edit-user {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600;
  color: var(--text);
  transition: all .2s;
}
.btn-edit-user:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 16px; padding-bottom: 90px; }
  .mobile-admin-nav { display: block; }
  .reservation-item { padding: 14px 16px; gap: 10px; }
  .filter-panel { padding: 12px; gap: 6px; }
  .chip { padding: 6px 12px; font-size: 12px; }
  .filter-search { font-size: 13px; padding: 9px 12px; }

  .kpi-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .kpi-card { padding: 14px 12px; }
  .kpi-value { font-size: 20px; }
  .kpi-unit { font-size: 12px; }
  .kpi-period { font-size: 10px; margin-bottom: 6px; }
  .kpi-sub { font-size: 11px; }

  .pending-highlight { padding: 14px 16px; gap: 12px; }
  .pending-highlight-icon { font-size: 26px; }
  .pending-highlight-amount { font-size: 18px; }

  .bar-chart { height: 150px; gap: 4px; }
  .bar-value { font-size: 9px; }
  .bar-label { font-size: 10px; }

  .room-row { grid-template-columns: 1fr; gap: 6px; }
  .room-row-head { min-width: 0; }
  .room-row-amount { flex-direction: row; gap: 8px; justify-content: space-between; }

  .admin-header { padding: 0 16px; }
  .admin-user-info { gap: 6px; }
  .admin-logo-text { display: none; }
  .user-display { padding: 5px 10px; gap: 6px; }
  .user-name { font-size: 12px; }
  .user-role-badge { font-size: 9px; padding: 2px 6px; }
  .admin-user-info > a { display: none; }
  .btn-logout { padding: 5px 10px; font-size: 12px; }

  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header .btn-primary { width: 100%; justify-content: center; }
  .page-title { font-size: 18px; }

  .user-item { padding: 14px 16px; gap: 12px; }
  .user-avatar { width: 40px; height: 40px; font-size: 16px; }
  .user-meta-name { font-size: 15px; }
  .user-created { display: none; }
}

@media (min-width: 769px) {
  .mobile-admin-nav { display: none; }
  .admin-sidebar { display: block; }

  /* Center modals vertically on admin desktop (instead of bottom sheet) */
  body:has(.admin-dashboard) .modal-overlay { align-items: center; }
  body:has(.admin-dashboard) .modal {
    border-radius: 20px;
    max-height: 88vh;
    transform: translateY(16px);
    opacity: 0;
    transition: transform .25s cubic-bezier(.2,.8,.3,1), opacity .2s;
  }
  body:has(.admin-dashboard) .modal-overlay.open .modal {
    transform: translateY(0);
    opacity: 1;
  }
  body:has(.admin-dashboard) .modal-handle { display: none; }
  body:has(.admin-dashboard) .modal-header { padding-top: 20px; }
  body:has(.admin-dashboard) .modal-body   { padding-bottom: 24px; }
}
