/* =========================================================
   Hotel Room Request System - CSS
   Premium Dark Design with Glassmorphism
   ========================================================= */

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

/* ---- CSS Variables (Hostinger-inspired light theme) ---- */
:root {
  /* Shell */
  --bg-topbar:       #1b1240;
  --bg-sidebar:      #f1f1f4;
  --bg-page:         #f4f4f7;
  --bg-card:         #ffffff;
  --bg-card-hover:   #fafafa;
  --border:          #e4e4ea;
  --border-strong:   #d4d4dc;

  /* Legacy aliases (keep components working) */
  --bg-primary:      var(--bg-page);
  --bg-secondary:    var(--bg-sidebar);
  --glass-border:    var(--border);
  --glass-shadow:    0 1px 3px rgba(29,30,32,0.06), 0 4px 16px rgba(29,30,32,0.04);

  /* Brand / primary purple */
  --primary:         #673de6;
  --primary-soft:    #ede8fd;
  --primary-hover:   #5a32d1;
  --gold:            var(--primary);
  --gold-light:      #8b6cf0;
  --gold-dim:        var(--primary-soft);

  /* Status */
  --success:         #12a150;
  --success-bg:      #e3f6ec;
  --warning:         #b7791f;
  --warning-bg:      #fdf3dc;
  --danger:          #d92d4a;
  --danger-bg:       #fde8ec;
  --info:            #2f6fed;
  --info-bg:         #e6eefe;

  --accent-blue:     var(--info);
  --accent-green:    var(--success);
  --accent-red:      var(--danger);
  --accent-orange:   var(--warning);
  --accent-purple:   var(--primary);

  /* Text */
  --text:            #1d1e20;
  --text-muted:      #6d6e78;
  --text-primary:    var(--text);
  --text-secondary:  var(--text-muted);
  --text-on-dark:    #ffffff;
  --text-on-primary: #ffffff;

  /* Chat */
  --chat-guest-bg:   #f1f1f4;
  --chat-staff-bg:   var(--primary-soft);
  --chat-system-bg:  var(--info-bg);

  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       16px;
  --radius-xl:       22px;
  --radius-full:     9999px;

  --font-main:  'Inter', system-ui, sans-serif;
  --font-serif: 'Inter', system-ui, sans-serif;

  --transition: 0.2s ease;
  --shadow-card: 0 1px 2px rgba(29,30,32,0.04), 0 2px 8px rgba(29,30,32,0.04);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; outline: none; font-family: var(--font-main); }
input, textarea, select {
  font-family: var(--font-main);
  outline: none;
  border: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: #c8c8d0; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8b0; }

/* ================================================
   SHARED COMPONENTS
   ================================================ */

/* Glass card */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Status badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-pending    { background: var(--warning-bg); color: var(--warning); border: 1px solid transparent; }
.badge-confirmed  { background: var(--info-bg); color: var(--info); border: 1px solid transparent; }
.badge-in_progress{ background: var(--primary-soft); color: var(--primary); border: 1px solid transparent; }
.badge-completed  { background: var(--success-bg); color: var(--success); border: 1px solid transparent; }
.badge-cancelled  { background: var(--danger-bg); color: var(--danger); border: 1px solid transparent; }

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}
.btn-gold, .btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
}
.btn-gold:hover, .btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(103,61,230,0.35);
}
.btn-ghost {
  background: var(--bg-card);
  color: var(--primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid transparent; }
.btn-danger:hover { filter: brightness(0.96); }
.btn-success { background: var(--success-bg); color: var(--success); border: 1px solid transparent; }
.btn-success:hover { filter: brightness(0.96); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: var(--radius-sm); }

/* Input */
.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-input::placeholder { color: var(--text-muted); }

/* ================================================
   GUEST CHAT PAGE (index.html)
   ================================================ */

.page-guest {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(79,142,247,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(201,168,76,0.06) 0%, transparent 50%),
    var(--bg-primary);
}

/* --- Header --- */
.chat-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  z-index: 10;
}
.chat-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hotel-logo {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 15px rgba(180,120,60,0.25);
  flex-shrink: 0;
}
.hotel-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  display: block;
}
.hotel-name { font-family: var(--font-serif); font-size: 18px; color: var(--gold); letter-spacing: 0.04em; }
.hotel-tagline { font-size: 11px; color: var(--text-muted); margin-top: -2px; }
.room-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
}

/* --- Login Screen --- */
.login-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  box-shadow: var(--glass-shadow);
}
.login-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
  box-shadow: 0 8px 30px rgba(201,168,76,0.4);
}
.login-card h2 { font-family: var(--font-serif); font-size: 26px; margin-bottom: 8px; }
.login-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 28px; }
.room-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.room-btn {
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}
.room-btn:hover, .room-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
.login-or { color: var(--text-muted); font-size: 12px; margin: 16px 0; }
.login-manual { display: flex; gap: 8px; }

/* --- Chat Layout --- */
.chat-layout { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Chat bubble */
.msg-wrap { display: flex; align-items: flex-end; gap: 8px; }
.msg-wrap.guest { flex-direction: row-reverse; }
.msg-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.avatar-staff { background: linear-gradient(135deg, var(--gold), var(--gold-light)); }
.avatar-guest { background: linear-gradient(135deg, #4f8ef7, #6366f1); }
.msg-bubble {
  max-width: 72%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}
.msg-wrap.guest  .msg-bubble { background: var(--chat-guest-bg); color: #fff; border-bottom-right-radius: 4px; }
.msg-wrap.staff  .msg-bubble { background: var(--chat-staff-bg); border: 1px solid var(--glass-border); color: var(--text-primary); border-bottom-left-radius: 4px; }
.msg-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; text-align: right; }
.msg-wrap.staff .msg-time { text-align: left; }

/* Quick request chips */
.quick-chips {
  padding: 12px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.chip:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

/* Chat input bar */
.chat-input-bar {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}
.chat-input-bar textarea {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  resize: none;
  max-height: 120px;
  min-height: 46px;
  line-height: 1.5;
  transition: var(--transition);
}
.chat-input-bar textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.1); }
.chat-input-bar textarea::placeholder { color: var(--text-muted); }
.send-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #1a1200;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.send-btn:hover { transform: scale(1.08); box-shadow: 0 4px 20px rgba(201,168,76,0.4); }
.send-btn:disabled { opacity: 0.4; transform: none; }

/* Category picker (custom) */
.category-bar {
  padding: 10px 24px 8px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}
.cat-picker {
  flex: 1;
  position: relative;
}
.cat-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  font-family: inherit;
}
.cat-trigger:hover,
.cat-picker.open .cat-trigger {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(255,255,255,0.04));
}
.cat-trigger-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(201,168,76,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.cat-trigger-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cat-trigger-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-trigger-dept {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
}
.cat-trigger-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.cat-picker.open .cat-trigger-chevron {
  transform: rotate(180deg);
  color: var(--gold);
}

.cat-panel {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% + 8px);
  max-height: min(52vh, 420px);
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(12, 18, 32, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 -12px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04);
  padding: 10px;
  z-index: 30;
  animation: catPanelIn 0.18s ease;
}
.cat-panel[hidden] { display: none !important; }
@keyframes catPanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cat-panel-header {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 8px 10px;
}
.cat-group { margin-bottom: 10px; }
.cat-group:last-child { margin-bottom: 2px; }
.cat-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 8px 8px;
}
.cat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cat-dot.hk { background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.45); }
.cat-dot.fo { background: #60a5fa; box-shadow: 0 0 8px rgba(96,165,250,0.45); }
.cat-dot.it { background: #a78bfa; box-shadow: 0 0 8px rgba(167,139,250,0.45); }
.cat-dot.eng { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,0.45); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
}
.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  min-height: 72px;
}
.cat-item span {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  line-height: 1.25;
  color: inherit;
}
.cat-item:hover {
  background: rgba(201,168,76,0.12);
  border-color: rgba(201,168,76,0.35);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.cat-item.active {
  background: rgba(201,168,76,0.18);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201,168,76,0.2);
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-item { min-height: 64px; padding: 10px 4px; }
  .cat-panel { max-height: 48vh; }
}

/* Toast notification */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  min-width: 260px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease forwards;
  border: 1px solid;
}
.toast-success { background: rgba(52,211,153,0.15); border-color: rgba(52,211,153,0.3); color: var(--accent-green); }
.toast-error   { background: rgba(248,113,113,0.15); border-color: rgba(248,113,113,0.3); color: var(--accent-red);   }
.toast-info    { background: rgba(79,142,247,0.15);  border-color: rgba(79,142,247,0.3);  color: var(--accent-blue);  }
@keyframes toastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }

/* Typing indicator */
.typing-dots { display: flex; gap: 4px; padding: 4px 0; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted);
  animation: dot 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot { 0%,80%,100%{ transform:scale(0.7); opacity:0.5; } 40%{ transform:scale(1); opacity:1; } }

/* ================================================
   ADMIN DASHBOARD (admin.html)
   ================================================ */

.page-admin {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 0%, rgba(201,168,76,0.06) 0%, transparent 50%),
    var(--bg-primary);
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 4px;
}
.sidebar-brand {
  padding: 8px 12px 24px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 16px;
}
.sidebar-title { font-family: var(--font-serif); font-size: 20px; color: var(--gold); }
.sidebar-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.sidebar-nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.sidebar-nav-item.active { background: var(--gold-dim); color: var(--gold); }
.sidebar-nav-item .icon { font-size: 16px; }
.nav-count {
  margin-left: auto;
  background: var(--accent-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}
.nav-count.green { background: var(--accent-green); }

/* Main content */
.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.admin-topbar {
  padding: 20px 28px;
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.admin-topbar h1 { font-size: 20px; font-weight: 700; }
.admin-topbar .sub { font-size: 13px; color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 20px 28px;
  flex-shrink: 0;
}
.stat-card {
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-pending   .stat-num { color: var(--accent-orange); }
.stat-confirmed .stat-num { color: var(--accent-blue);   }
.stat-progress  .stat-num { color: var(--accent-purple); }
.stat-completed .stat-num { color: var(--accent-green);  }
.stat-total     .stat-num { color: var(--gold);          }

/* Filter bar */
.filter-bar {
  padding: 0 28px 16px;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}
.filter-chip:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.filter-chip.active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }

/* Request list */
.requests-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.request-card {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
}
.request-card:hover { background: var(--bg-card-hover); transform: translateY(-1px); }
.request-category-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--gold-dim);
}
.request-body { flex: 1; min-width: 0; }
.request-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.request-room { font-weight: 700; font-size: 15px; }
.request-time { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.request-message { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.request-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Detail panel */
.detail-panel {
  width: 360px;
  flex-shrink: 0;
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
  overflow-y: auto;
}
.detail-panel.empty {
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
}
.detail-panel.empty .empty-icon { font-size: 48px; margin-bottom: 16px; }
.detail-section label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 6px; }
.detail-section p { font-size: 14px; color: var(--text-primary); line-height: 1.5; }
.detail-divider { height: 1px; background: var(--glass-border); }
.reply-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13px;
  resize: none;
  min-height: 80px;
  line-height: 1.5;
  transition: var(--transition);
}
.reply-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.1); }
.reply-input::placeholder { color: var(--text-muted); }

/* Pulse animation for pending */
@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,146,60,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(251,146,60,0); }
}
.request-card.pending { animation: pulse-border 2s infinite; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0%{ background-position:200% 0; } 100%{ background-position:-200% 0; } }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* Responsive */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .detail-panel { display: none; }
  .admin-sidebar { width: 200px; }
}
@media (max-width: 600px) {
  .admin-sidebar { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .room-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========== Voice Note UI ========== */
.mic-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  cursor: pointer;
}
.mic-btn:hover {
  background: rgba(201,168,76,0.2);
  border-color: var(--gold);
  color: var(--gold);
  transform: scale(1.05);
}

.voice-record-bar,
.voice-preview-bar {
  padding: 12px 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  background: rgba(15,23,42,0.4);
}

.voice-rec-status {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #f87171;
  font-variant-numeric: tabular-nums;
}

.voice-rec-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.voice-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.voice-stop {
  background: #ef4444;
  color: #fff;
}
.voice-stop:hover { background: #dc2626; transform: scale(1.05); }
.voice-cancel {
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}
.voice-cancel:hover { background: rgba(248,113,113,0.15); color: #f87171; }
.voice-send {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #1a1200;
  font-weight: 700;
}
.voice-send:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(201,168,76,0.35); }
.voice-play {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  font-size: 14px;
}
.voice-play:hover { border-color: var(--gold); color: var(--gold); }

.voice-preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.voice-preview-info #voice-preview-duration {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.voice-preview-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* Voice bubble player */
.msg-bubble.voice-bubble {
  padding: 10px 12px;
  min-width: 180px;
  max-width: 260px;
}
.voice-player {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vp-play {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: inherit;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.vp-play:hover { background: rgba(201,168,76,0.35); }
.msg-wrap.guest .vp-play { background: rgba(255,255,255,0.25); }
.msg-wrap.guest .vp-play:hover { background: rgba(255,255,255,0.4); }

.vp-progress-wrap {
  flex: 1;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.vp-progress-bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
  overflow: hidden;
}
.msg-wrap.staff .vp-progress-bar { background: rgba(0,0,0,0.15); }
.vp-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.1s linear;
}
.msg-wrap.guest .vp-progress-fill { background: #fff; }

.vp-time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
  min-width: 32px;
  text-align: right;
}

.voice-uploading {
  opacity: 0.6;
  pointer-events: none;
}
.voice-uploading .msg-bubble::after {
  content: ' ⏳';
  font-size: 12px;
}
