/* =========================================================
   HostelHub — Theme
   ========================================================= */
:root {
  --primary: #6d5efc;
  --primary-2: #a855f7;
  --accent: #ec4899;
  --cyan: #06b6d4;
  --green: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --blue: #3b82f6;
  --grad: linear-gradient(135deg, #6d5efc 0%, #a855f7 55%, #ec4899 100%);
  --grad-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --grad-green: linear-gradient(135deg, #10b981 0%, #059669 60%, #0ea5e9 130%);
  --grad-amber: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --grad-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 60%, #a855f7 140%);
  --grad-indigo: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

  --bg: #f3f5fc;
  --surface: rgba(255, 255, 255, .82);
  --surface-solid: #ffffff;
  --surface-2: #f6f7fd;
  --border: rgba(99, 102, 241, .12);
  --text: #1e1b3a;
  --muted: #6b7091;
  --shadow-sm: 0 1px 2px rgba(30, 27, 58, .06), 0 2px 6px rgba(30, 27, 58, .05);
  --shadow: 0 2px 4px rgba(30, 27, 58, .04), 0 10px 24px -6px rgba(76, 61, 190, .18), 0 24px 48px -18px rgba(76, 61, 190, .22);
  --shadow-lg: 0 4px 8px rgba(30, 27, 58, .05), 0 22px 40px -10px rgba(76, 61, 190, .30), 0 40px 80px -30px rgba(236, 72, 153, .25);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-w: 270px;
  --sidebar-bg: linear-gradient(180deg, #14112e 0%, #1d1650 55%, #2a1458 100%);
}
[data-theme="dark"] {
  --bg: #0b0d1e;
  --surface: rgba(23, 24, 48, .78);
  --surface-solid: #171830;
  --surface-2: #1d1f3d;
  --border: rgba(148, 140, 255, .14);
  --text: #e8e8fb;
  --muted: #9a9cc4;
  --shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 14px 30px -8px rgba(0, 0, 0, .55);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, .3), 0 26px 50px -12px rgba(109, 94, 252, .35);
  --sidebar-bg: linear-gradient(180deg, #0a0a1a 0%, #120f33 60%, #1b0f3b 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background .3s, color .3s;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }
h1, h2, h3, h4 { margin: 0 0 .5rem; letter-spacing: -.01em; }
img { max-width: 100%; }

/* Decorative animated background orbs */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; animation: float 22s ease-in-out infinite; }
.bg-orbs span:nth-child(1) { width: 520px; height: 520px; background: #a5b4fc; top: -160px; right: -120px; }
.bg-orbs span:nth-child(2) { width: 420px; height: 420px; background: #f9a8d4; bottom: -140px; left: 20%; animation-delay: -7s; }
.bg-orbs span:nth-child(3) { width: 360px; height: 360px; background: #67e8f9; top: 35%; right: 25%; opacity: .25; animation-delay: -14s; }
[data-theme="dark"] .bg-orbs span { opacity: .18; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.08); } 66% { transform: translate(-30px,25px) scale(.95); } }

/* ===================== Sidebar ===================== */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--sidebar-bg); color: #cfd0f5; z-index: 50;
  display: flex; flex-direction: column;
  box-shadow: 10px 0 40px -10px rgba(30, 20, 90, .45);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; color: #fff; }
.brand:hover { color: #fff; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: var(--grad); box-shadow: 0 10px 24px -6px rgba(168, 85, 247, .7), inset 0 1px 0 rgba(255,255,255,.35);
  transform: perspective(200px) rotateX(10deg) rotateY(-10deg);
}
.brand-text { font-weight: 800; font-size: 19px; line-height: 1.1; }
.brand-text small { display: block; font-weight: 500; font-size: 11.5px; color: #a5a6d8; letter-spacing: .04em; }
.nav { overflow-y: auto; padding: 4px 14px 24px; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: #7f80b8; margin: 18px 10px 6px; font-weight: 700; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0;
  color: #c9caf0; border-radius: 12px; font-weight: 500; position: relative; transition: all .2s;
}
.nav-link i { font-size: 17px; width: 22px; text-align: center; opacity: .85; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(3px); }
.nav-link.active {
  background: linear-gradient(135deg, rgba(109,94,252,.95), rgba(168,85,247,.9));
  color: #fff; box-shadow: 0 10px 22px -8px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255,255,255,.25);
}
.nav-link.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: #f0abfc; }

.overlay { display: none; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

/* ===================== Topbar ===================== */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: var(--surface); backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.page-heading { min-width: 0; }
.page-heading h1 { font-size: 21px; font-weight: 800; margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb { color: var(--muted); font-size: 12.5px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-actions > * { flex-shrink: 0; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-solid); color: var(--text); font-size: 18px; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .2s;
}
.icon-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--grad-rose); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(244,63,94,.5); }
.menu-toggle { display: none; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 30px; border: 1px solid var(--border); background: var(--surface-solid); color: var(--text); cursor: pointer; font: inherit; font-weight: 600; box-shadow: var(--shadow-sm); }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: var(--surface-solid);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 60;
  transform-origin: top right; animation: pop .18s ease-out;
}
.dropdown-menu.wide { width: 330px; }
.dropdown.open .dropdown-menu { display: block; }
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(-6px); } to { opacity: 1; transform: none; } }
.dd-head { padding: 8px 12px; font-weight: 700; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dd-head small { display: block; color: var(--muted); font-weight: 500; }
.dd-item { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 10px; color: var(--text); }
.dd-item:has(i) { flex-direction: row; align-items: center; gap: 10px; }
.dd-item:hover { background: var(--surface-2); color: var(--primary); }
.dd-item small { color: var(--muted); }
.dd-empty { padding: 16px; text-align: center; color: var(--muted); }
.dd-foot { display: block; text-align: center; padding: 8px; font-weight: 600; border-top: 1px solid var(--border); margin-top: 6px; }

.content { padding: 26px 28px; flex: 1; }
.footer { padding: 18px 28px; color: var(--muted); font-size: 12.5px; text-align: center; }

/* ===================== Cards (3D) ===================== */
.card {
  background: var(--surface); backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; margin-bottom: 22px; position: relative;
}
.card-3d { transform-style: preserve-3d; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; will-change: transform; }
.card-3d:hover { box-shadow: var(--shadow-lg); }
.card-3d .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; }
.card-3d .glare::after { content: ""; position: absolute; width: 180%; height: 180%; left: var(--gx, 50%); top: var(--gy, 50%); transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255,255,255,.35) 0%, transparent 40%); opacity: 0; transition: opacity .3s; }
.card-3d:hover .glare::after { opacity: 1; }
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head h2, .card-head h3 { font-size: 17px; font-weight: 750; margin: 0; display: flex; align-items: center; gap: 10px; }
.card-head h2 i, .card-head h3 i { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--grad); color: #fff; font-size: 16px; box-shadow: 0 6px 14px -4px rgba(139,92,246,.6); }
.card-head .spacer { flex: 1; }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat {
  position: relative; border-radius: 20px; padding: 20px 20px 18px; color: #fff; overflow: hidden;
  background: var(--grad); box-shadow: 0 18px 34px -14px rgba(109,94,252,.7), inset 0 1px 0 rgba(255,255,255,.3);
  transform-style: preserve-3d; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; min-height: 128px;
}
.stat::before { content: ""; position: absolute; width: 170px; height: 170px; border-radius: 50%; background: rgba(255,255,255,.13); right: -50px; top: -60px; }
.stat::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.09); right: 30px; bottom: -60px; }
.stat .s-icon { position: absolute; right: 18px; top: 18px; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; background: rgba(255,255,255,.22); backdrop-filter: blur(6px); transform: translateZ(40px); box-shadow: 0 10px 20px -6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.4); }
.stat .s-label { font-size: 12.5px; font-weight: 600; opacity: .92; text-transform: uppercase; letter-spacing: .06em; transform: translateZ(20px); }
.stat .s-value { font-size: 30px; font-weight: 800; margin: 6px 0 2px; transform: translateZ(35px); text-shadow: 0 4px 14px rgba(0,0,0,.18); }
.stat .s-sub { font-size: 12.5px; opacity: .9; transform: translateZ(20px); position: relative; z-index: 1; }
.stat.cyan { background: var(--grad-cyan); box-shadow: 0 18px 34px -14px rgba(6,182,212,.75); }
.stat.green { background: var(--grad-green); box-shadow: 0 18px 34px -14px rgba(16,185,129,.75); }
.stat.amber { background: var(--grad-amber); box-shadow: 0 18px 34px -14px rgba(245,158,11,.75); }
.stat.rose { background: var(--grad-rose); box-shadow: 0 18px 34px -14px rgba(244,63,94,.7); }
.stat.indigo { background: var(--grad-indigo); box-shadow: 0 18px 34px -14px rgba(79,70,229,.75); }
.stat a { color: inherit; }
.progress { height: 7px; background: rgba(255,255,255,.25); border-radius: 10px; overflow: hidden; margin-top: 10px; transform: translateZ(20px); }
.progress > span { display: block; height: 100%; background: #fff; border-radius: 10px; }
.progress.light { background: var(--surface-2); }
.progress.light > span { background: var(--grad); }

/* Layout grids */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid > .card { margin-bottom: 0; }
.mb { margin-bottom: 22px; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-solid); color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: transform .12s, box-shadow .2s, filter .2s; box-shadow: var(--shadow-sm); line-height: 1.3;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 10px 22px -8px rgba(139,92,246,.75), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.12); }
.btn-primary:hover { color: #fff; filter: brightness(1.07); box-shadow: 0 14px 28px -8px rgba(139,92,246,.85), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.12); }
.btn-success { background: var(--grad-green); color: #fff; border: 0; box-shadow: 0 10px 22px -8px rgba(16,185,129,.7), inset 0 -3px 0 rgba(0,0,0,.12); }
.btn-success:hover { color: #fff; }
.btn-danger { background: var(--grad-rose); color: #fff; border: 0; box-shadow: 0 10px 22px -8px rgba(244,63,94,.7), inset 0 -3px 0 rgba(0,0,0,.12); }
.btn-danger:hover { color: #fff; }
.btn-warning { background: var(--grad-amber); color: #fff; border: 0; box-shadow: 0 10px 22px -8px rgba(245,158,11,.7), inset 0 -3px 0 rgba(0,0,0,.12); }
.btn-warning:hover { color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 10px; }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 10px; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ===================== Forms ===================== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; font-weight: 750; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); margin-top: 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--border); display: flex; align-items: center; gap: 8px; }
.field label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; color: var(--muted); }
.field label .req { color: var(--rose); }
.field .help { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-solid);
  color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s; outline: none;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(109,94,252,.15); }
.input[readonly], .input:disabled { background: var(--surface-2); color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; padding-top: 6px; }
.switch input { appearance: none; width: 44px; height: 24px; border-radius: 20px; background: #cbd0e6; position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked { background: var(--grad); }
.switch input:checked::after { transform: translateX(20px); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.file-preview { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; }
.file-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow-sm); }

/* ===================== Grid / Table ===================== */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search-box { position: relative; flex: 1 1 260px; min-width: 200px; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-left: 40px; border-radius: 14px; }
.toolbar select.input { width: auto; min-width: 140px; }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-solid); }
table.grid-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.grid-table th {
  position: sticky; top: 0; z-index: 1; text-align: left; padding: 12px 14px; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; font-weight: 700;
}
.grid-table th a { color: inherit; display: inline-flex; gap: 4px; align-items: center; }
.grid-table th a:hover { color: var(--primary); }
.grid-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.grid-table tbody tr { transition: background .15s, transform .15s; }
.grid-table tbody tr:hover { background: rgba(109,94,252,.05); }
.grid-table tbody tr:last-child td { border-bottom: 0; }
.grid-table td.num, .grid-table th.num { text-align: right; white-space: nowrap; }
.grid-table .actions { white-space: nowrap; text-align: right; }
.grid-table mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 2px; }
.cell-main { display: flex; align-items: center; gap: 10px; }
.cell-main b { display: block; }
.cell-main small { color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.pager .pages { display: flex; gap: 6px; flex-wrap: wrap; }
.pager .pages a, .pager .pages span { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface-solid); color: var(--text); font-weight: 600; }
.pager .pages .cur { background: var(--grad); color: #fff; border: 0; box-shadow: 0 8px 18px -6px rgba(139,92,246,.7); }
.no-results { padding: 30px; text-align: center; color: var(--muted); display: none; }

/* Badges & avatars */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 30px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-success { background: rgba(16,185,129,.13); color: #059669; }
.b-warning { background: rgba(245,158,11,.15); color: #c2780a; }
.b-danger { background: rgba(244,63,94,.13); color: #e11d48; }
.b-info { background: rgba(59,130,246,.13); color: #2563eb; }
.b-muted { background: rgba(107,112,145,.13); color: var(--muted); }
[data-theme="dark"] .b-success { color: #34d399; } [data-theme="dark"] .b-warning { color: #fbbf24; }
[data-theme="dark"] .b-danger { color: #fb7185; } [data-theme="dark"] .b-info { color: #60a5fa; }
.avatar { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.avatar.sm { width: 32px; height: 32px; border-radius: 50%; font-size: 12px; }
.avatar.lg { width: 96px; height: 96px; border-radius: 26px; font-size: 32px; }
.avatar-ini { display: inline-grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, hsl(var(--h), 75%, 60%), hsl(calc(var(--h) + 40), 80%, 50%)); }

/* Alerts */
.alert { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; margin-bottom: 18px; font-weight: 500; box-shadow: var(--shadow-sm); animation: pop .25s ease-out; border: 1px solid transparent; }
.alert i { font-size: 18px; }
.alert span { flex: 1; }
.alert-success { background: rgba(16,185,129,.12); color: #047857; border-color: rgba(16,185,129,.25); }
.alert-danger { background: rgba(244,63,94,.12); color: #be123c; border-color: rgba(244,63,94,.25); }
.alert-info { background: rgba(59,130,246,.12); color: #1d4ed8; border-color: rgba(59,130,246,.25); }
.alert-warning { background: rgba(245,158,11,.14); color: #b45309; border-color: rgba(245,158,11,.25); }
[data-theme="dark"] .alert-success { color: #6ee7b7; } [data-theme="dark"] .alert-danger { color: #fda4af; }
[data-theme="dark"] .alert-info { color: #93c5fd; } [data-theme="dark"] .alert-warning { color: #fcd34d; }
.alert-close { background: none; border: 0; font-size: 20px; cursor: pointer; color: inherit; opacity: .6; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .grow small { color: var(--muted); }
.li-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; color: #fff; background: var(--grad); flex-shrink: 0; }
.li-icon.cyan { background: var(--grad-cyan); } .li-icon.green { background: var(--grad-green); }
.li-icon.amber { background: var(--grad-amber); } .li-icon.rose { background: var(--grad-rose); }
.muted { color: var(--muted); }
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state i { font-size: 54px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Key-value detail */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.kv div { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; border: 1px solid var(--border); }
.kv span { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kv b { font-weight: 600; word-break: break-word; }

/* Profile hero */
.hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 26px; border-radius: 22px; color: #fff; background: var(--grad); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; margin-bottom: 22px; }
.hero::after { content: ""; position: absolute; width: 320px; height: 320px; right: -80px; top: -120px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero h2 { font-size: 26px; font-weight: 800; margin: 0; }
.hero .meta { display: flex; gap: 16px; flex-wrap: wrap; opacity: .92; font-size: 13.5px; margin-top: 6px; }
.hero .avatar { border: 4px solid rgba(255,255,255,.55); }

/* Occupancy map */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.room-card { padding: 16px; margin: 0; }
.room-card .room-no { font-size: 20px; font-weight: 800; }
.room-card .room-type { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.beds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bed { width: 46px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; position: relative; cursor: default; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15), 0 6px 12px -6px rgba(0,0,0,.35); transition: transform .15s; }
.bed:hover { transform: translateY(-3px) scale(1.05); }
.bed i { font-size: 14px; display: block; margin-bottom: -6px; }
.bed.available { background: var(--grad-green); }
.bed.occupied { background: var(--grad-indigo); }
.bed.reserved { background: var(--grad-amber); }
.bed.maintenance { background: var(--grad-rose); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.floor-title { font-weight: 750; margin: 20px 0 12px; display: flex; align-items: center; gap: 8px; color: var(--muted); }

/* Attendance radios */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 3px; border: 1px solid var(--border); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 6px 11px; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted); transition: all .15s; }
.seg input:checked + span { color: #fff; box-shadow: 0 4px 10px -3px rgba(0,0,0,.3); }
.seg input[value="present"]:checked + span { background: var(--grad-green); }
.seg input[value="absent"]:checked + span { background: var(--grad-rose); }
.seg input[value="leave"]:checked + span { background: var(--grad-amber); }
.seg input[value="out"]:checked + span { background: var(--grad-cyan); }
.att-matrix td, .att-matrix th { padding: 6px !important; text-align: center; font-size: 11.5px; }
.att-matrix td:first-child, .att-matrix th:first-child { text-align: left; white-space: nowrap; }
.att-p { color: #059669; font-weight: 800; } .att-a { color: #e11d48; font-weight: 800; } .att-l { color: #d97706; font-weight: 800; } .att-o { color: #0891b2; font-weight: 800; }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; background: var(--surface); padding: 6px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.tabs a { padding: 8px 14px; border-radius: 11px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.tabs a.active { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(139,92,246,.8); }

/* Charts */
.chart-box { position: relative; height: 280px; }

/* Login */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: var(--sidebar-bg); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; perspective: 1200px; }
.auth-art h1 { font-size: 42px; font-weight: 800; line-height: 1.1; margin-bottom: 14px; }
.auth-art h1 span { background: linear-gradient(90deg, #c4b5fd, #f0abfc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art p { color: #c4c5ef; font-size: 16px; max-width: 460px; }
.float-cards { position: relative; height: 240px; margin-top: 40px; transform-style: preserve-3d; }
.float-card { position: absolute; padding: 18px 20px; border-radius: 18px; background: rgba(255,255,255,.1); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); animation: bob 6s ease-in-out infinite; min-width: 200px; }
.float-card b { font-size: 26px; display: block; }
.float-card small { color: #d0d1f7; }
.float-card i { font-size: 24px; float: right; margin-left: 16px; }
.float-card:nth-child(1) { left: 0; top: 0; transform: rotateY(18deg) rotateX(8deg); }
.float-card:nth-child(2) { left: 180px; top: 90px; animation-delay: -2s; transform: rotateY(-12deg) rotateX(6deg); background: linear-gradient(135deg, rgba(109,94,252,.6), rgba(236,72,153,.5)); }
.float-card:nth-child(3) { left: 30px; top: 160px; animation-delay: -4s; transform: rotateY(14deg) rotateX(-6deg); }
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 26px; font-weight: 800; }
.demo-logins { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 18px; }
.demo-logins button { font-size: 12px; }

/* Print */
.print-only { display: none; }
.doc { max-width: 820px; margin: 0 auto; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 2px dashed var(--border); margin-bottom: 18px; }
.doc-title { font-size: 28px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.totals { margin-left: auto; max-width: 320px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .grand { font-size: 18px; font-weight: 800; border-top: 2px solid var(--border); padding-top: 10px; }
@media print {
  .sidebar, .topbar, .footer, .no-print, .toolbar, .pager, .bg-orbs, .actions, .alert { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd; backdrop-filter: none; background: #fff; transform: none !important; }
  .print-only { display: block; }
  body { background: #fff; color: #000; }
  .table-wrap { overflow: visible; border: 0; }
  .grid-table th { position: static; }
}

/* ===================== Responsive ===================== */
@media (max-width: 1200px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
  .sidebar { transform: translateX(-105%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .overlay { display: block; position: fixed; inset: 0; background: rgba(15,12,40,.5); backdrop-filter: blur(3px); z-index: 40; }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .grid-2, .grid-2-1 { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { padding: 40px 28px; }
  .float-cards { display: none; }
}
@media (max-width: 768px) {
  .content { padding: 18px 14px; }
  .topbar { padding: 12px 14px; }
  .page-heading h1 { font-size: 17px; }
  .crumb { display: none; }
  .user-chip > span:not(.avatar), .user-chip .bi-chevron-down { display: none; }
  .user-chip { padding: 4px; }
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px; min-height: 112px; }
  .stat .s-value { font-size: 22px; }
  .stat .s-icon { width: 38px; height: 38px; font-size: 18px; right: 12px; top: 12px; }
  .card { padding: 16px; border-radius: 16px; }
  .dropdown-menu.wide { width: 290px; right: -60px; }
  /* Tables become stacked cards */
  .table-wrap.stack { border: 0; background: transparent; overflow: visible; }
  .stack .grid-table thead { display: none; }
  .stack .grid-table, .stack .grid-table tbody, .stack .grid-table tr, .stack .grid-table td { display: block; width: 100%; }
  .stack .grid-table tr { background: var(--surface-solid); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 12px; padding: 8px 4px; box-shadow: var(--shadow); }
  .stack .grid-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 7px 12px; text-align: right; }
  .stack .grid-table td::before { content: attr(data-label); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; text-align: left; }
  .stack .grid-table td.actions { justify-content: flex-end; border-top: 1px dashed var(--border); margin-top: 4px; padding-top: 10px; }
  .stack .grid-table td.actions::before { content: none; }
  .toolbar .btn span { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 20px; }
  .hero h2 { font-size: 21px; }
  .auth-art h1 { font-size: 30px; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .demo-logins { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
