/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg:        #0f172a;
  --surface:   #1e293b;
  --surface2:  #263347;
  --border:    #334155;
  --border2:   #1e3a5f;
  --text:      #e2e8f0;
  --text2:     #94a3b8;
  --text3:     #64748b;
  --primary:   #3b82f6;
  --primary-h: #2563eb;
  --success:   #22c55e;
  --warning:   #eab308;
  --danger:    #ef4444;
  --purple:    #a78bfa;
  --radius:    10px;
  --bg1:       #0a1628;
  --bg2:       #172035;
  --bg3:       #1e293b;
  --text1:     #f1f5f9;
  --primary-dim: rgba(59,130,246,.08);
}
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 14px; }

/* ── Layout ───────────────────────────────────────────────────── */
#app { height: 100vh; display: flex; }

.sidebar {
  width: 220px; min-width: 220px; background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 0; overflow: hidden;
}
.sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-name { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -.3px; }
.sidebar-logo .logo-name span { color: var(--primary); }
.sidebar-logo .logo-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }

.nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: .8px; color: var(--text3); padding: 12px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  color: var(--text2); font-size: 13px; font-weight: 500;
  transition: background .15s, color .15s;
  text-decoration: none; border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: var(--text); }
.nav-item.active { background: rgba(59,130,246,.15); color: var(--primary); }
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 12px 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-footer .user-name { font-size: 13px; font-weight: 500; color: var(--text); }
.sidebar-footer .user-role { font-size: 11px; color: var(--text3); }
.sidebar-footer .btn-logout {
  margin-left: auto; background: none; border: none; color: var(--text3);
  cursor: pointer; font-size: 16px; padding: 4px; border-radius: 6px;
  transition: color .15s;
}
.sidebar-footer .btn-logout:hover { color: var(--danger); }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: 52px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.page { flex: 1; overflow-y: auto; padding: 24px; }

/* ── Login ────────────────────────────────────────────────────── */
/* ── Login page ──────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: #070d1b; overflow: hidden; position: relative;
  font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, sans-serif;
}
.login-wrap::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 900px 700px at -5% 20%,  rgba(59,130,246,.22) 0%, transparent 55%),
    radial-gradient(ellipse 700px 500px at 110% 85%, rgba(124,58,237,.18) 0%, transparent 55%),
    radial-gradient(ellipse 500px 400px at 60% 40%,  rgba(6,182,212,.10)  0%, transparent 55%);
  animation: bgDrift 20s ease-in-out infinite alternate;
}
@keyframes bgDrift {
  0%   { transform: scale(1)    translate(0,0); }
  50%  { transform: scale(1.04) translate(1%,-1%); }
  100% { transform: scale(.97)  translate(-1%,1%); }
}
.login-inner {
  position: relative; z-index: 1; width: 100%; max-width: 460px;
  animation: lCardUp .4s cubic-bezier(.16,1,.3,1);
}
@keyframes lCardUp { from { opacity:0; transform: translateY(20px) scale(.97); } to { opacity:1; transform: none; } }

.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-icon { display: block; margin: 0 auto 14px; height: 140px; width: auto; animation: logoPulse 5s ease-in-out infinite; }
@keyframes logoPulse {
  0%   { filter: drop-shadow(0 0 10px rgba(59,130,246,.5)) drop-shadow(0 0 20px rgba(59,130,246,.2)); }
  50%  { filter: drop-shadow(0 0 24px rgba(96,165,250,1)) drop-shadow(0 0 44px rgba(124,58,237,.7)); }
  100% { filter: drop-shadow(0 0 10px rgba(59,130,246,.5)) drop-shadow(0 0 20px rgba(59,130,246,.2)); }
}
.login-logo .name { font-size: 24px; font-weight: 800; color: rgba(255,255,255,.95); letter-spacing: .5px; }
.login-logo .name span { color: #60a5fa; }
.login-logo .sub { font-size: 14px; color: rgba(255,255,255,.35); margin-top: 4px; }

.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mode-card {
  background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 14px; padding: 18px 12px 14px; cursor: pointer; text-align: center;
  transition: all .25s cubic-bezier(.16,1,.3,1); user-select: none;
  position: relative; overflow: hidden;
}
.mode-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: 14px;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,.08) 100%);
  opacity: 0; transition: .3s;
}
.mode-card:hover { transform: translateY(-4px) scale(1.03); }
.mode-card:hover::before { opacity: 1; }
.mode-card.selected-login {
  background: rgba(59,130,246,.14); border-color: rgba(59,130,246,.6);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15), 0 8px 28px rgba(59,130,246,.2);
}
.mode-card.selected-register {
  background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.55);
  box-shadow: 0 0 0 3px rgba(16,185,129,.12), 0 8px 28px rgba(16,185,129,.15);
}

.icon-wrap { width: 68px; height: 68px; margin: 0 auto 10px; position: relative; transition: transform .25s cubic-bezier(.16,1,.3,1); }
.mode-card:hover .icon-wrap { transform: scale(1.12); }
.icon-circle {
  position: absolute; inset: 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
#cardLogin .icon-circle  { background: linear-gradient(135deg,#3b82f6,#1d4ed8); animation: pulseLogin 2.5s ease-in-out infinite; }
#cardReg   .icon-circle  { background: linear-gradient(135deg,#10b981,#047857); animation: pulseReg   2.5s ease-in-out infinite; }
@keyframes pulseLogin { 0%,100%{box-shadow:0 0 14px rgba(59,130,246,.5)}  50%{box-shadow:0 0 28px rgba(59,130,246,.9)} }
@keyframes pulseReg   { 0%,100%{box-shadow:0 0 14px rgba(16,185,129,.5)}  50%{box-shadow:0 0 28px rgba(16,185,129,.9)} }

.ring-outer { width:68px;height:68px;border-radius:50%;border:2.5px solid transparent;position:absolute;inset:0; }
#cardLogin .ring-outer { border-top-color:#3b82f6;border-right-color:rgba(59,130,246,.25); animation:spinCW  2s   linear infinite; }
#cardReg   .ring-outer { border-top-color:#10b981;border-right-color:rgba(16,185,129,.25); animation:spinCW  2.5s linear infinite; }
.ring-inner { width:52px;height:52px;border-radius:50%;border:2px solid transparent;position:absolute;inset:8px; }
#cardLogin .ring-inner { border-bottom-color:rgba(59,130,246,.6);border-left-color:rgba(59,130,246,.2); animation:spinCCW 1.5s linear infinite; }
#cardReg   .ring-inner { border-bottom-color:rgba(16,185,129,.6);border-left-color:rgba(16,185,129,.2); animation:spinCCW 2s   linear infinite; }
@keyframes spinCW  { to { transform: rotate(360deg);  } }
@keyframes spinCCW { to { transform: rotate(-360deg); } }
.mode-name { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.9); letter-spacing: .3px; }

.lform-panel {
  background: rgba(8,16,42,.88); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 24px 24px 20px;
  display: none; box-shadow: 0 20px 60px rgba(0,0,0,.55);
}
.lform-panel.visible { display: block; animation: lFadeSlide .25s cubic-bezier(.16,1,.3,1); }
@keyframes lFadeSlide { from { opacity:0; transform: translateY(-8px); } to { opacity:1; transform: none; } }

.lform-who { font-size:13px;font-weight:600;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.08); }
.lform-who span { font-weight: 800; }

.lform-panel label { display:block;font-size:11px;font-weight:600;color:rgba(255,255,255,.45);margin-bottom:7px;letter-spacing:.3px; }
.lfield { margin-bottom: 14px; }
.lfield input[type=text], .lfield input[type=password] {
  width:100%;padding:11px 14px;border:1px solid rgba(255,255,255,.18);border-radius:10px;
  font-size:16px;color:rgba(255,255,255,.95);background:rgba(255,255,255,.07);
  outline:none;transition:all .2s;font-family:'Exo 2',sans-serif;
}
.lfield input:focus {
  border-color: rgba(59,130,246,.7); background: rgba(255,255,255,.1);
  box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}
.lfield input::placeholder { color: rgba(255,255,255,.25); }

.btn-llogin    { background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;box-shadow:0 6px 20px rgba(59,130,246,.45); }
.btn-llogin:hover    { background:linear-gradient(135deg,#60a5fa,#3b82f6);transform:translateY(-1px);box-shadow:0 8px 28px rgba(59,130,246,.55); }
.btn-lregister { background:linear-gradient(135deg,#10b981,#059669);color:#fff;box-shadow:0 6px 20px rgba(16,185,129,.35); }
.btn-lregister:hover { background:linear-gradient(135deg,#34d399,#10b981);transform:translateY(-1px);box-shadow:0 8px 28px rgba(16,185,129,.45); }
.btn-lback { display:block;text-align:center;font-size:12px;color:rgba(255,255,255,.3);cursor:pointer;margin-top:10px;background:none;border:none;font-family:'Exo 2',sans-serif;text-decoration:underline;text-decoration-color:rgba(255,255,255,.15); }
.btn-lback:hover { color: rgba(255,255,255,.6); }

.login-hint { font-size:11px;color:rgba(255,255,255,.18);text-align:center;margin-top:16px; }
.lerror {
  background:rgba(239,68,68,.15);color:#fca5a5;border:1px solid rgba(239,68,68,.3);
  border-radius:10px;padding:10px 14px;font-size:12px;margin-bottom:14px;
}
.lsuccess {
  background:rgba(16,185,129,.15);color:#6ee7b7;border:1px solid rgba(16,185,129,.3);
  border-radius:10px;padding:10px 14px;font-size:12px;margin-bottom:14px;
}

/* ── Forms ────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 5px; font-weight: 500; }
.form-row { display: grid; gap: 12px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
input, select, textarea {
  width: 100%; padding: 9px 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 13px; outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
select option { background: var(--surface); }
textarea { resize: vertical; min-height: 72px; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: none; transition: background .15s, opacity .15s;
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-h); }
.btn-success { background: rgba(34,197,94,.15); color: var(--success); border: 1px solid rgba(34,197,94,.3); }
.btn-danger  { background: rgba(239,68,68,.12); color: var(--danger);  border: 1px solid rgba(239,68,68,.25); }
.btn-outline { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-outline:hover { background: rgba(255,255,255,.06); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text2); border: none; }
.btn-ghost:hover { background: rgba(255,255,255,.06); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-full { width: 100%; }

/* ── Cards & Stats ────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 12px; color: var(--text2); }
.stat-card.free .stat-value        { color: var(--success); }
.stat-card.occupied .stat-value    { color: var(--primary); }
.stat-card.cleaning .stat-value    { color: var(--warning); }
.stat-card.maintenance .stat-value { color: var(--danger); }
.stat-card.total .stat-value       { color: var(--text); }
.stat-card.guests .stat-value      { color: var(--purple); }

/* ── Section header ───────────────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.section-header h2 { font-size: 15px; font-weight: 600; }
.search-input { padding: 7px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; outline: none; width: 220px; }
.search-input:focus { border-color: var(--primary); }

/* ── Room Grid ────────────────────────────────────────────────── */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.room-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 12px; cursor: pointer; transition: border-color .15s, transform .1s;
  position: relative;
}
.room-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.room-card .room-num { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1; }
.room-card .room-type { font-size: 11px; color: var(--text3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card .room-floor { font-size: 11px; color: var(--text3); }
.room-card .room-status { position: absolute; top: 10px; right: 10px; }
.room-card.status-free        { border-left: 3px solid var(--success); }
.room-card.status-occupied    { border-left: 3px solid var(--primary); }
.room-card.status-cleaning    { border-left: 3px solid var(--warning); }
.room-card.status-maintenance { border-left: 3px solid var(--danger); }
.room-card.status-blocked     { border-left: 3px solid var(--text3); opacity: .7; }

/* ── Status Badge ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge-free        { background: rgba(34,197,94,.15);  color: var(--success); }
.badge-occupied    { background: rgba(59,130,246,.15);  color: var(--primary); }
.badge-cleaning    { background: rgba(234,179,8,.15);   color: var(--warning); }
.badge-maintenance { background: rgba(239,68,68,.12);   color: var(--danger); }
.badge-blocked     { background: rgba(100,116,139,.15); color: var(--text3); }
.badge-superadmin  { background: rgba(239,68,68,.15);   color: #fca5a5; }
.badge-admin       { background: rgba(59,130,246,.15);  color: var(--primary); }
.badge-reception   { background: rgba(34,197,94,.12);   color: var(--success); }
.badge-housekeeping{ background: rgba(234,179,8,.12);   color: var(--warning); }
.badge-medical     { background: rgba(167,139,250,.15); color: var(--purple); }

/* ── Table ────────────────────────────────────────────────────── */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead th { padding: 10px 14px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text3); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr { border-bottom: 1px solid rgba(51,65,85,.5); transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.03); }
tbody td { padding: 10px 14px; font-size: 13px; vertical-align: middle; }
.td-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ── Modal ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.modal.modal-sm { max-width: 380px; }
.modal-header { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-body { padding: 18px 20px; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.modal-close { background: none; border: none; color: var(--text3); font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.modal-close:hover { color: var(--danger); background: rgba(239,68,68,.1); }

/* ── Floor tabs ───────────────────────────────────────────────── */
.floor-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.floor-tab { padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); color: var(--text2); background: none; transition: all .15s; }
.floor-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── View toggle ──────────────────────────────────────────────── */
.view-toggle { display: flex; background: var(--bg); border-radius: 8px; padding: 3px; }
.view-btn { padding: 5px 10px; border-radius: 6px; cursor: pointer; background: none; border: none; color: var(--text3); font-size: 14px; }
.view-btn.active { background: var(--surface2); color: var(--text); }

/* ── Status selector ──────────────────────────────────────────── */
.status-list { display: flex; flex-direction: column; gap: 8px; }
.status-option {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-radius: 8px; border: 1px solid var(--border); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.status-option:hover { background: rgba(255,255,255,.04); }
.status-option.active { border-color: var(--primary); background: rgba(59,130,246,.08); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── Toast ────────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  padding: 11px 16px; border-radius: 10px; font-size: 13px; font-weight: 500;
  max-width: 320px; pointer-events: auto;
  animation: toastIn .2s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast-success { background: #14532d; border: 1px solid #166534; color: #bbf7d0; }
.toast-error   { background: #450a0a; border: 1px solid #7f1d1d; color: #fecaca; }
.toast-info    { background: #1e3a5f; border: 1px solid #1e40af; color: #bfdbfe; }
@keyframes toastIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: none; } }

/* ── Loading ──────────────────────────────────────────────────── */
.loading-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ──────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text3); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── Live dot ─────────────────────────────────────────────────── */
.live-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.live-on  { background: var(--success); box-shadow: 0 0 6px var(--success); }
.live-off { background: var(--text3); }

/* ── Chess table ──────────────────────────────────────────────── */
.chess-table { border-collapse: collapse; white-space: nowrap; font-size: 12px; }
.chess-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.chess-room-label {
  position: sticky; left: 0; z-index: 3; background: var(--surface);
  padding: 6px 10px; border-right: 1px solid var(--border);
  min-width: 90px; max-width: 120px;
}
thead .chess-room-label { z-index: 4; }
.chess-room-label b { display: block; font-size: 13px; }
.chess-room-type { font-size: 10px; color: var(--text3); }
.chess-th {
  padding: 5px 2px; text-align: center; min-width: 36px;
  border-right: 1px solid rgba(51,65,85,.4); font-weight: 500; color: var(--text2);
}
.chess-th.chess-wknd  { color: rgba(239,68,68,.7); background: rgba(239,68,68,.04); }
.chess-th.chess-today { color: var(--primary); background: rgba(59,130,246,.1); }
.chess-dow { font-size: 9px; opacity: .7; display: block; }
.chess-cell {
  padding: 0; height: 32px; min-width: 36px;
  border-right: 1px solid rgba(51,65,85,.3);
  border-bottom: 1px solid rgba(51,65,85,.2);
  cursor: pointer; transition: opacity .15s; vertical-align: middle;
}
.chess-cell.chess-wknd  { background: rgba(255,255,255,.01); }
.chess-cell.chess-today { outline: 1px solid var(--primary); outline-offset: -1px; }
.chess-cell.chess-free:hover { background: rgba(59,130,246,.1); }
.chess-cell.chess-busy  { padding: 2px 4px; }
.chess-cell.chess-busy:hover, .chess-cell.chess-busy-cont:hover { opacity: .75; }
.chess-name { font-size: 10px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; display: block; max-width: 90px; text-overflow: ellipsis; }

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Warning button ───────────────────────────────────────────────── */
.btn-warning { background: rgba(234,179,8,.12); color: var(--warning); border: 1px solid rgba(234,179,8,.25); }
.btn-warning:hover { background: rgba(234,179,8,.2); }

/* ── Section label ────────────────────────────────────────────────── */
.section-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text3); margin-bottom: 10px;
}

/* ── Modal XL ─────────────────────────────────────────────────────── */
.modal.modal-xl { max-width: 900px; }

/* ── Invoice layout ───────────────────────────────────────────────── */
.invoice-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 16px; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.invoice-table th,
.invoice-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.invoice-table th { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text3); }
.invoice-table tbody tr:last-child td { border-bottom: none; }

.inv-add-row {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
}
.inv-add-row input, .inv-add-row select { padding: 6px 10px; font-size: 12px; }

.invoice-summary {
  background: var(--bg); border-radius: 8px; padding: 12px 16px; margin-top: 4px;
}
.inv-sum-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; font-size: 13px; color: var(--text2);
}
.inv-sum-total {
  font-size: 15px; font-weight: 700; color: var(--text);
  border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px;
}

/* ── Guest search dropdown ────────────────────────────────────────── */
.guest-dd {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3); max-height: 240px; overflow-y: auto; margin-top: 2px;
}
.guest-dd-item {
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.guest-dd-item:last-child { border-bottom: none; }
.guest-dd-item:hover { background: var(--bg3); }

/* ── Tag radio selector ───────────────────────────────────────────── */
.tag-radio {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border); cursor: pointer; font-size: 12px; color: var(--text2);
  transition: border-color .15s, background .15s;
}
.tag-radio.active, .tag-radio:hover { background: var(--bg3); border-color: var(--primary); }

/* ── Chess res cell ───────────────────────────────────────────────── */
td.chess-res { padding: 0 6px !important; vertical-align: middle; }
td.chess-res .chess-name { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ── Import ───────────────────────────────────────────────────────── */
.import-drop {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 32px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.import-drop:hover, .import-drop.drag-over {
  border-color: var(--primary); background: var(--primary-dim, rgba(99,102,241,.06));
}

/* ── Bulk rooms ───────────────────────────────────────────────────── */
.modal-lg { max-width: 680px; }
.bulk-floor-row {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 10px;
}
.bulk-floor-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-size: 13px; color: var(--text2);
}
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ── Equipment ────────────────────────────────────────────────────── */
.eq-section { }
.modal-md { max-width: 560px; }

/* ── Role badge ───────────────────────────────────────────────────── */
.role-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .3px;
}

/* ── Housekeeping ─────────────────────────────────────────────────── */
.hk-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text2);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px;
}
.hk-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.hk-count {
  background: var(--bg3); color: var(--text2); border-radius: 999px;
  padding: 1px 8px; font-size: 11px; font-weight: 700;
}
.hk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.hk-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px;
  transition: box-shadow .15s;
}
.hk-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.hk-card-top { display: flex; align-items: center; justify-content: space-between; }
.hk-num { font-size: 20px; font-weight: 700; color: var(--text1); }
.hk-meta { font-size: 12px; color: var(--text3); }
.hk-notes { font-size: 12px; color: var(--text2); font-style: italic; }
.hk-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ── Reports ──────────────────────────────────────────────────────── */
.rep-chart {
  display: flex; align-items: flex-end; gap: 2px;
  height: 100px; overflow-x: auto; padding-bottom: 2px;
}
.rep-bar-wrap {
  flex: 0 0 auto; width: 10px; height: 100%;
  display: flex; align-items: flex-end; cursor: pointer;
}
.rep-bar {
  width: 100%; border-radius: 2px 2px 0 0; min-height: 2px;
  transition: opacity .15s;
}
.rep-bar-wrap:hover .rep-bar { opacity: .75; }

/* ── Dashboard period selector ────────────────────────────────────── */
.dash-period-bar {
  display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.dash-period-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 28px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--surface);
  transition: all .2s; min-width: 100px;
}
.dash-period-btn:hover { border-color: var(--primary); background: rgba(59,130,246,.07); }
.dash-period-btn.active {
  border-color: var(--primary); background: rgba(59,130,246,.15);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.dash-period-label { font-size: 15px; font-weight: 700; color: var(--text); }
.dash-period-btn.active .dash-period-label { color: var(--primary); }
.dash-period-sub { font-size: 10px; color: var(--text3); margin-top: 2px; }

/* ── Dashboard charts ─────────────────────────────────────────────── */
.dash-charts-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.dash-chart-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:16px 16px 8px;
}
.dash-chart-title { font-size:12px; font-weight:600; color:var(--text2); margin-bottom:10px; text-transform:uppercase; letter-spacing:.5px; }
@media (max-width:900px) { .dash-charts-row { grid-template-columns:1fr; } }

/* ── Pricing ──────────────────────────────────────────────────────── */
.pricing-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:16px; padding:12px 16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
.pricing-toolbar .sep { width:1px; height:24px; background:var(--border); flex-shrink:0; }
.price-cell-effective { font-size:15px; font-weight:700; }
.price-cell-effective.above { color:var(--success); }
.price-cell-effective.below { color:var(--warning); }
.badge-own { background:rgba(59,130,246,.15); color:var(--primary); font-size:10px; padding:1px 6px; border-radius:999px; margin-left:4px; vertical-align:middle; }
.price-edit-row { display:flex; gap:6px; align-items:center; }
.price-edit-row input { width:120px; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
  .invoice-cols { grid-template-columns: 1fr; }
  .hk-grid { grid-template-columns: 1fr 1fr; }
}
