/* ============================================================
   NOWILLS PMS — Reservation Dashboard
   Pure CSS design system (glassmorphism, dark/light, motion)
   ============================================================ */

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

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-brd: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 12px 40px -12px rgba(24, 30, 71, 0.24);
  --panel: rgba(255, 255, 255, 0.78);
  --soft-bg: rgba(255, 255, 255, 0.35);
  --soft-bg-2: rgba(255, 255, 255, 0.5);
  --txt: #0f172a;
  --txt-soft: #64748b;
  --grid-line: rgba(15, 23, 42, 0.08);
  --brand: #6366f1;
  --brand-2: #22d3ee;
  --ring: rgba(99, 102, 241, 0.55);

  --ok: #10b981;
  --warn: #f59e0b;
  --bad: #f43f5e;
  --info: #0ea5e9;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html.dark {
  --glass-bg: rgba(18, 22, 42, 0.6);
  --glass-brd: rgba(255, 255, 255, 0.09);
  --glass-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.85);
  --panel: rgba(16, 20, 38, 0.86);
  --soft-bg: rgba(255, 255, 255, 0.06);
  --soft-bg-2: rgba(255, 255, 255, 0.11);
  --txt: #e6ecff;
  --txt-soft: #93a0c2;
  --grid-line: rgba(255, 255, 255, 0.08);
  --ring: rgba(129, 140, 248, 0.6);
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1200px 700px at 8% -8%, rgba(109, 94, 252, 0.28), transparent 60%),
    radial-gradient(1100px 600px at 100% 0%, rgba(34, 211, 238, 0.22), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(244, 114, 182, 0.18), transparent 60%),
    linear-gradient(180deg, #eef1fb 0%, #e7ecfa 40%, #eaf0fb 100%);
  background-attachment: fixed;
  transition: background 0.5s ease, color 0.3s ease;
}

html.dark body {
  background:
    radial-gradient(1200px 700px at 8% -8%, rgba(109, 94, 252, 0.3), transparent 60%),
    radial-gradient(1100px 600px at 100% 0%, rgba(34, 211, 238, 0.18), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(217, 70, 239, 0.16), transparent 60%),
    linear-gradient(180deg, #070a17 0%, #0a0f22 45%, #070a17 100%);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(109, 94, 252, 0.35); }

/* ---------- glass surfaces ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
}
.glass-soft {
  background: var(--soft-bg);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
}
.soft { color: var(--txt-soft); }

/* ---------- scrollbars ---------- */
.thin::-webkit-scrollbar { width: 7px; height: 7px; }
.thin::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--txt-soft) 45%, transparent); border-radius: 99px; }
.thin::-webkit-scrollbar-track { background: transparent; }
.thin { scrollbar-width: thin; }
.noscroll::-webkit-scrollbar { display: none; }
.noscroll { scrollbar-width: none; }

/* ---------- animations ---------- */
@keyframes floatIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounceDot { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } }

.anim-float { animation: floatIn 0.5s var(--ease) both; }
.anim-pop { animation: popIn 0.3s var(--ease) both; }
.anim-left { animation: slideLeft 0.35s var(--ease) both; }
.anim-up { animation: slideUp 0.4s var(--ease) both; }
.live-dot { animation: pulseRing 2s infinite; }
.spin { animation: spin 0.9s linear infinite; }

.sheen {
  background-image: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.45) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: shimmer 2.2s linear infinite;
}

/* ============================================================ TOP BAR */
.topbar {
  position: sticky; top: 0; z-index: 60;
  padding: 10px 14px 6px;
  border-left: 0; border-right: 0; border-top: 0;
  border-radius: 0;
}
.topbar-row { display: flex; align-items: center; gap: 9px; }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 15px; color: #fff; font-size: 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 45%, #22d3ee);
  box-shadow: 0 10px 24px -8px rgba(99, 102, 241, 0.75);
}
.brand-mark .pip {
  position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border-radius: 99px;
  background: #34d399; border: 2px solid rgba(255,255,255,0.8);
}
.brand-title { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.brand-title span { background: linear-gradient(90deg, #6366f1, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: 9.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--txt-soft); }

.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--r-md); flex-shrink: 0;
  background: var(--soft-bg); border: 1px solid var(--glass-brd);
  transition: transform 0.18s var(--ease), background 0.18s ease;
}
.icon-btn:hover { transform: translateY(-2px) scale(1.06); background: var(--soft-bg-2); }
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 99px; background: #f43f5e; color: #fff;
  font-size: 9px; font-weight: 800;
}
.icon-btn .badge.cyan { background: #22d3ee; min-width: 10px; height: 10px; padding: 0; }

.pill-btn {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px;
  border-radius: var(--r-md); font-size: 11.5px; font-weight: 700; flex-shrink: 0;
  background: var(--soft-bg); border: 1px solid var(--glass-brd);
  transition: transform 0.18s var(--ease), background 0.18s;
}
.pill-btn:hover { transform: translateY(-2px); background: var(--soft-bg-2); }
.pill-btn.grad {
  background: linear-gradient(90deg, #6366f1, #8b5cf6 55%, #22d3ee); color: #fff; border: none;
  box-shadow: 0 10px 22px -10px rgba(99, 102, 241, 0.9);
}
.branch-chip {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
  background: rgba(99, 102, 241, 0.22); color: #4f46e5; font-size: 9px; font-weight: 800;
}
html.dark .branch-chip { color: #a5b4fc; }

.search-wrap { position: relative; flex: 1 1 auto; min-width: 90px; }
.search-box {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 11px; border-radius: var(--r-md);
  background: var(--soft-bg); border: 1px solid var(--glass-brd);
  transition: box-shadow 0.2s;
}
.search-box:focus-within { box-shadow: 0 0 0 2px var(--ring); }
.search-box input { flex: 1; min-width: 0; background: none; border: none; outline: none; font-size: 12px; }
.search-box input::placeholder { color: var(--txt-soft); }
kbd {
  border: 1px solid var(--glass-brd); border-radius: 6px; padding: 1px 5px;
  font-size: 9px; font-weight: 700; color: var(--txt-soft); font-family: var(--font);
}

.pop {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 80;
  min-width: 200px; padding: 7px; border-radius: var(--r-xl);
  animation: popIn 0.22s var(--ease) both;
  max-height: 70vh; overflow-y: auto;
}
.pop.left { right: auto; left: 0; }
.pop-row {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px;
  border-radius: var(--r-md); text-align: left; font-size: 11.5px;
  transition: background 0.15s;
}
.pop-row:hover { background: var(--soft-bg-2); }
.pop-row.active { background: var(--soft-bg-2); font-weight: 700; }
.pop-title { padding: 4px 9px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--txt-soft); }
.pop-row .t { font-size: 11.5px; font-weight: 700; display: block; }
.pop-row .s { font-size: 10px; color: var(--txt-soft); display: block; }
.pop-field { display: block; padding: 4px 6px; }
.pop-field label { display: block; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; color: var(--txt-soft); margin-bottom: 4px; }

.statusline {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 6px; font-size: 10px; font-weight: 600; color: var(--txt-soft);
}
.statusline .dot { display: inline-block; width: 6px; height: 6px; border-radius: 99px; background: #10b981; margin-right: 5px; }

/* ============================================================ LAYOUT */
.page { max-width: 1900px; margin: 0 auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 1280px) { .layout { grid-template-columns: minmax(0, 1fr) 318px; } }
.board-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sidebar-col { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 1280px) {
  .sidebar-col { position: sticky; top: 92px; max-height: calc(100vh - 104px); overflow-y: auto; padding-right: 4px; }
}

/* ============================================================ KPI */
.kpi-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.kpi {
  position: relative; flex: 0 0 auto; width: 172px; padding: 11px 12px 8px;
  border-radius: var(--r-xl); text-align: left; overflow: hidden; scroll-snap-align: start;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.kpi:hover { transform: translateY(-5px); box-shadow: 0 24px 44px -22px rgba(20, 25, 70, 0.55); }
.kpi.active { box-shadow: 0 0 0 2px var(--brand), var(--glass-shadow); }
.kpi .rail { position: absolute; inset: 0 0 auto 0; height: 3px; }
.kpi .orb { position: absolute; top: -34px; right: -34px; width: 96px; height: 96px; border-radius: 99px; filter: blur(20px); opacity: 0.16; transition: opacity 0.3s; }
.kpi:hover .orb { opacity: 0.4; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; color: var(--txt-soft); }
.kpi-head .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-trend { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.kpi-trend.up { color: #10b981; } .kpi-trend.down { color: #f43f5e; } .kpi-trend.flat { color: #94a3b8; }
.kpi-val { margin-top: 3px; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-hint { font-size: 10px; color: var(--txt-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-spark { margin-top: 3px; opacity: 0.45; transform: translateY(3px); transition: 0.28s var(--ease); height: 24px; }
.kpi:hover .kpi-spark { opacity: 1; transform: none; }

/* ============================================================ FILTERS */
.filters { border-radius: var(--r-xl); padding: 10px; }
.filters-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip {
  flex-shrink: 0; white-space: nowrap; padding: 4px 10px; border-radius: 99px;
  font-size: 10.5px; font-weight: 700;
  background: var(--soft-bg); border: 1px solid var(--glass-brd);
  transition: transform 0.16s var(--ease), background 0.16s;
}
.chip:hover { transform: translateY(-2px) scale(1.04); }
.chip.on { background: rgba(99, 102, 241, 0.22); border-color: rgba(99, 102, 241, 0.6); color: #4338ca; }
html.dark .chip.on { color: #c7d2fe; }
.chip-scroll { display: flex; gap: 6px; overflow-x: auto; flex: 1 1 220px; min-width: 0; padding-bottom: 2px; }

.btn-primary {
  display: flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-md);
  font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.9);
  transition: transform 0.16s var(--ease);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  padding: 6px 11px; border-radius: var(--r-md); font-size: 11px; font-weight: 700;
  background: var(--soft-bg); border: 1px solid var(--glass-brd);
  transition: transform 0.16s var(--ease), background 0.16s;
}
.btn-ghost:hover { transform: translateY(-2px); background: var(--soft-bg-2); }
.btn-ghost.on { background: var(--brand); color: #fff; border-color: transparent; }
.btn-danger { padding: 6px 9px; border-radius: var(--r-md); font-size: 10.5px; font-weight: 800; color: #e11d48; background: rgba(244, 63, 94, 0.14); }

.seg { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--soft-bg); border: 1px solid var(--glass-brd); }
.seg button { display: grid; place-items: center; width: 28px; height: 26px; border-radius: 9px; transition: 0.16s; }
.seg button:hover { background: var(--soft-bg-2); }
.seg button.on { background: var(--brand); color: #fff; }

.filter-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--grid-line);
  animation: popIn 0.24s var(--ease) both;
}
@media (min-width: 640px) { .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .filter-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.field label { display: block; margin-bottom: 4px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; color: var(--txt-soft); }
.field input, .field select, .pop-field input, .pop-field select, .modal input, .modal select {
  width: 100%; padding: 6px 8px; border-radius: var(--r-sm); font-size: 11px; font-weight: 600;
  background: var(--soft-bg); border: 1px solid var(--glass-brd); outline: none;
  transition: box-shadow 0.18s;
}
.field input:focus, .field select:focus, .modal input:focus, .modal select:focus { box-shadow: 0 0 0 2px var(--ring); }
.field.set input, .field.set select { box-shadow: 0 0 0 1.5px rgba(99, 102, 241, 0.7); }
select option { color: #0f172a; }

.bulkbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; padding: 8px;
  border-radius: var(--r-lg); background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.35);
  animation: popIn 0.24s var(--ease) both;
}
.bulkbar .lbl { font-size: 11px; font-weight: 800; color: #4338ca; }
html.dark .bulkbar .lbl { color: #c7d2fe; }
.bulkbar button { padding: 4px 9px; border-radius: 9px; font-size: 10.5px; font-weight: 700; background: var(--soft-bg-2); transition: transform 0.16s var(--ease); }
.bulkbar button:hover { transform: translateY(-2px); }

.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-xl); font-size: 11.5px; font-weight: 700;
  animation: popIn 0.24s var(--ease) both;
}

/* ============================================================ ROOM GRID */
.room-grid { display: grid; gap: 10px; grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .room-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1700px) { .room-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.room-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .room-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .room-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .room-grid.compact { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.floor-head { display: flex; align-items: center; gap: 9px; margin: 4px 0 7px; }
.floor-head .tag { padding: 2px 9px; border-radius: 9px; font-size: 10px; font-weight: 800; color: #fff; background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.floor-head .line { flex: 1; height: 1px; background: var(--grid-line); }

.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-xl);
  transition: transform 0.26s var(--ease), box-shadow 0.26s, outline-color 0.2s;
  animation: floatIn 0.45s var(--ease) both;
  outline: 2px solid transparent; outline-offset: 2px;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 26px 50px -22px rgba(20, 25, 70, 0.6); z-index: 2; }
.card.selected { outline-color: var(--brand); }
.card.highlight { outline: 2px solid #22d3ee; box-shadow: 0 0 26px -4px rgba(34, 211, 238, 0.8); }
.card.dragging { opacity: 0.4; transform: rotate(2deg) scale(0.97); }
.card.drop { outline: 2px dashed rgba(99, 102, 241, 0.95); transform: translateY(-4px) scale(1.012); }
.card .rail { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; z-index: 3; }

.card-img { position: relative; width: 100%; height: 96px; overflow: hidden; background: #1e293b; }
.card.small .card-img { height: 66px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); display: block; }
.card:hover .card-img img { transform: scale(1.11); }
.card-img .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0.2) 55%, transparent); }
.card-num { position: absolute; left: 11px; bottom: 5px; display: flex; align-items: flex-end; gap: 7px; color: #fff; }
.card-num b { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.card-num span { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.11em; opacity: 0.9; margin-bottom: 2px; }
.card-meta { position: absolute; right: 9px; bottom: 6px; display: flex; gap: 6px; font-size: 9px; font-weight: 700; color: rgba(255,255,255,0.9); }
.card-badges { position: absolute; right: 8px; top: 7px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sel-box {
  position: absolute; left: 10px; top: 8px; z-index: 4;
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px;
  font-size: 10px; font-weight: 800; color: transparent;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.6);
  transition: 0.16s;
}
.sel-box:hover { background: rgba(0,0,0,0.6); }
.sel-box.on { background: var(--brand); border-color: #a5b4fc; color: #fff; }

.badge {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 99px;
  font-size: 9px; font-weight: 800; border: 1px solid transparent; white-space: nowrap;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

.card-body { display: flex; flex-direction: column; gap: 6px; padding: 9px 10px 10px 12px; flex: 1; }
.card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-title .t { font-size: 12px; font-weight: 800; line-height: 1.2; }
.card-title .s { font-size: 9.5px; color: var(--txt-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title .rate { font-size: 11.5px; font-weight: 800; text-align: right; white-space: nowrap; }
.card-title .rate small { display: block; font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--txt-soft); }

.amenities { display: flex; flex-wrap: wrap; gap: 4px; }
.amenity {
  display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; font-size: 10.5px;
  background: var(--soft-bg-2); border: 1px solid var(--glass-brd); cursor: help;
  transition: transform 0.18s var(--ease), background 0.18s;
}
.amenity:hover { transform: translateY(-3px) scale(1.2) rotate(-5deg); background: rgba(99, 102, 241, 0.25); }
.amenity.more { width: auto; min-width: 21px; padding: 0 5px; font-size: 9px; font-weight: 800; color: var(--txt-soft); }

.res-box { padding: 8px; border-radius: var(--r-md); background: var(--soft-bg); border: 1px solid var(--glass-brd); }
.res-box.empty { border-style: dashed; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.res-head { display: flex; align-items: center; gap: 8px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; color: #fff; font-size: 10px; font-weight: 800; box-shadow: 0 6px 14px -8px rgba(0,0,0,0.7); }
.avatar.sm { width: 28px; height: 28px; font-size: 9px; border-radius: 9px; }
.res-name { display: flex; align-items: center; gap: 4px; min-width: 0; }
.res-name b { font-size: 11.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-sub { font-size: 9.5px; color: var(--txt-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 7px; font-size: 9.5px; }
.res-cols .k { font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--txt-soft); }
.res-cols .v { font-weight: 800; }
.res-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.tag { padding: 2px 6px; border-radius: 7px; font-size: 9px; font-weight: 700; background: var(--soft-bg-2); }
.tag.indigo { background: rgba(99, 102, 241, 0.18); color: #4338ca; }
html.dark .tag.indigo { color: #c7d2fe; }
.req { margin-top: 5px; font-size: 9.5px; font-style: italic; color: var(--txt-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card-actions { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 2px; }
.act {
  display: grid; place-items: center; width: 27px; height: 25px; border-radius: 8px; font-size: 11px;
  background: var(--soft-bg-2); transition: transform 0.16s var(--ease), background 0.16s;
}
.act:hover { transform: translateY(-2px) scale(1.1); background: rgba(99, 102, 241, 0.25); }
.act.wide { flex: 1; width: auto; gap: 4px; font-size: 10px; font-weight: 800; color: #fff; }
.act.green { background: #10b981; } .act.green:hover { background: #059669; }
.act.blue { background: #0ea5e9; } .act.blue:hover { background: #0284c7; }

/* ---------- list view ---------- */
.table-wrap { border-radius: var(--r-xl); padding: 4px; overflow-x: auto; }
table.board { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 11px; }
table.board th { padding: 8px; text-align: left; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--txt-soft); }
table.board td { padding: 7px 8px; border-top: 1px solid var(--grid-line); }
table.board tbody tr { cursor: pointer; transition: background 0.15s; }
table.board tbody tr:hover { background: var(--soft-bg-2); }

.empty-state { padding: 46px 18px; text-align: center; border-radius: var(--r-xl); }
.empty-state b { font-size: 14px; }
.empty-state p { margin: 5px 0 0; font-size: 11.5px; color: var(--txt-soft); }
.loader { height: 34px; border-radius: var(--r-md); opacity: 0.55; }

/* ============================================================ SIDEBAR */
.panel { border-radius: var(--r-xl); padding: 10px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.panel-head .t { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; }
.panel-head .n { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; color: var(--txt-soft); }
.panel-head .n .cnt { padding: 1px 7px; border-radius: 99px; background: var(--soft-bg-2); }
.panel-body { margin-top: 9px; }
.scroll-48 { max-height: 200px; overflow-y: auto; padding-right: 3px; }
.scroll-56 { max-height: 240px; overflow-y: auto; padding-right: 3px; }

.res-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px; border-radius: var(--r-md); text-align: left; cursor: grab; transition: background 0.15s; }
.res-row:hover { background: var(--soft-bg-2); }
.res-row:active { cursor: grabbing; }
.res-row .info { min-width: 0; flex: 1; }
.res-row .n { display: flex; align-items: center; gap: 4px; }
.res-row .n b { font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-row .m { font-size: 9.5px; color: var(--txt-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 8px; }
.quick-grid button {
  display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: var(--r-md);
  font-size: 10.5px; font-weight: 800; color: #fff;
  background: linear-gradient(90deg, rgba(99,102,241,0.95), rgba(139,92,246,0.95));
  box-shadow: 0 10px 20px -12px rgba(99, 102, 241, 0.9);
  transition: transform 0.16s var(--ease);
}
.quick-grid button:hover { transform: translateY(-2px) scale(1.02); }
.dashed-btn { width: 100%; padding: 7px; border-radius: var(--r-md); border: 1px dashed rgba(99,102,241,0.55); font-size: 11px; font-weight: 800; color: #4f46e5; transition: background 0.16s; }
html.dark .dashed-btn { color: #a5b4fc; }
.dashed-btn:hover { background: rgba(99, 102, 241, 0.12); }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head b { font-size: 11px; }
.cal-nav { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--soft-bg); border: 1px solid var(--glass-brd); font-size: 12px; }
.cal-dow, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow span { text-align: center; font-size: 8.5px; font-weight: 800; text-transform: uppercase; color: var(--txt-soft); }
.cal-day { position: relative; display: grid; place-items: center; height: 25px; border-radius: 7px; font-size: 9.5px; font-weight: 700; transition: background 0.15s; }
.cal-day:hover { background: var(--soft-bg-2); }
.cal-day.today { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.cal-day .load { position: absolute; bottom: 3px; height: 2px; width: 12px; border-radius: 99px; }

.status-row { display: flex; align-items: center; gap: 8px; }
.status-row .dot { width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; }
.status-row .nm { width: 88px; flex-shrink: 0; font-size: 10.5px; font-weight: 600; }
.status-row .track { flex: 1; height: 6px; border-radius: 99px; background: var(--soft-bg-2); overflow: hidden; }
.status-row .fill { height: 100%; border-radius: 99px; transition: width 0.8s var(--ease); }
.status-row .v { width: 24px; text-align: right; font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums; }

.mini-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--soft-bg); margin-bottom: 4px; }
.mini-item .t { font-size: 10.5px; font-weight: 800; }
.mini-item .s { font-size: 9.5px; color: var(--txt-soft); }

.feed-item { display: flex; gap: 8px; width: 100%; padding: 6px; border-radius: var(--r-sm); text-align: left; transition: background 0.15s; }
.feed-item:hover { background: var(--soft-bg-2); }
.feed-item .bullet { width: 6px; height: 6px; border-radius: 99px; margin-top: 5px; flex-shrink: 0; background: linear-gradient(135deg, #6366f1, #22d3ee); }
.feed-item .t { font-size: 10.5px; font-weight: 700; display: block; }
.feed-item .s { font-size: 9.5px; color: var(--txt-soft); display: block; }

/* ============================================================ ANALYTICS */
.analytics { display: grid; gap: 10px; grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 768px) { .analytics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .analytics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chart-card { border-radius: var(--r-xl); padding: 12px; animation: floatIn 0.5s var(--ease) both; }
.chart-card.wide { grid-column: span 1; }
@media (min-width: 1400px) { .chart-card.wide { grid-column: span 2; } }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.chart-head h3 { margin: 0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; }
.chart-head span { font-size: 10px; color: var(--txt-soft); }
.chart-foot { display: flex; justify-content: space-between; margin-top: 5px; font-size: 8.5px; font-weight: 700; color: var(--txt-soft); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 116px; }
.bars .col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.bars .bar { width: 100%; border-radius: 6px 6px 0 0; transition: height 0.8s var(--ease), filter 0.2s; }
.bars .col:hover .bar { filter: brightness(1.18); }
.bars .lb { width: 100%; text-align: center; font-size: 8px; font-weight: 700; color: var(--txt-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .vl { font-size: 8.5px; font-weight: 800; opacity: 0; transition: opacity 0.2s; color: var(--txt-soft); }
.bars .col:hover .vl { opacity: 1; }
.hbar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hbar .nm { width: 82px; flex-shrink: 0; font-size: 10px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { flex: 1; height: 8px; border-radius: 99px; background: var(--soft-bg-2); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; transition: width 0.85s var(--ease); }
.hbar .v { width: 68px; text-align: right; font-size: 9.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: 12px; }
.donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.donut-legend div { display: flex; align-items: center; gap: 6px; font-size: 10px; }
.donut-legend .sw { width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; }
.donut-legend .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.donut-legend .v { font-weight: 800; font-variant-numeric: tabular-nums; }

.integrations { border-radius: var(--r-xl); padding: 12px; }
.integrations .grid { display: flex; flex-wrap: wrap; gap: 6px; }
.integrations .item {
  display: flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px;
  font-size: 9.5px; font-weight: 700; background: var(--soft-bg); border: 1px solid var(--glass-brd);
  transition: transform 0.16s var(--ease);
}
.integrations .item:hover { transform: translateY(-2px) scale(1.04); }
.integrations .item i { width: 6px; height: 6px; border-radius: 99px; background: #10b981; }

/* ============================================================ OVERLAYS */
.overlay { position: fixed; inset: 0; z-index: 90; display: flex; }
.overlay .scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.46); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

.drawer {
  position: relative; z-index: 2; margin-left: auto; width: 100%; max-width: 440px; height: 100%;
  border-radius: 26px 0 0 26px; padding: 16px; overflow-y: auto;
  animation: slideLeft 0.34s var(--ease) both;
}
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.drawer-head h2 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -0.03em; }
.drawer-hero { position: relative; height: 160px; margin-top: 12px; border-radius: var(--r-xl); overflow: hidden; }
.drawer-hero img { width: 100%; height: 100%; object-fit: cover; }
.drawer-hero .scrim2 { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.75), transparent); }
.drawer-hero .cap { position: absolute; left: 13px; bottom: 9px; color: #fff; }
.drawer-hero .cap small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.drawer-hero .cap b { font-size: 18px; font-weight: 800; }
.drawer-hero .facts { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 5px; }
.drawer-hero .facts span { padding: 2px 7px; border-radius: 7px; background: rgba(0,0,0,0.5); color: #fff; font-size: 10px; font-weight: 700; }
.tabs { display: flex; gap: 4px; padding: 4px; margin-top: 12px; border-radius: var(--r-md); background: var(--soft-bg); border: 1px solid var(--glass-brd); }
.tabs button { flex: 1; padding: 6px; border-radius: 9px; font-size: 11px; font-weight: 800; text-transform: capitalize; transition: 0.16s; }
.tabs button:hover { background: var(--soft-bg-2); }
.tabs button.on { background: var(--brand); color: #fff; }
.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.kv { padding: 6px 8px; border-radius: var(--r-sm); background: var(--soft-bg); }
.kv .k { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--txt-soft); }
.kv .v { font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amenity-list { display: flex; flex-wrap: wrap; gap: 6px; }
.amenity-full {
  display: flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: var(--r-sm);
  font-size: 10px; font-weight: 600; background: var(--soft-bg); border: 1px solid var(--glass-brd);
  transition: transform 0.18s var(--ease);
}
.amenity-full:hover { transform: translateY(-2px) scale(1.05); }
.folio-line { display: flex; justify-content: space-between; padding-bottom: 5px; margin-bottom: 5px; border-bottom: 1px solid var(--grid-line); font-size: 11px; }
.folio-total { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; padding-top: 4px; }
.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding-bottom: 20px; }
.action-grid button {
  display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: var(--r-md);
  font-size: 11px; font-weight: 700; text-align: left;
  background: var(--soft-bg); border: 1px solid var(--glass-brd);
  transition: transform 0.16s var(--ease), background 0.16s;
}
.action-grid button:hover { transform: translateY(-2px) scale(1.02); background: var(--soft-bg-2); }
.action-grid button.tone-indigo { background: #6366f1; color: #fff; border-color: transparent; }
.action-grid button.tone-emerald { background: #10b981; color: #fff; border-color: transparent; }
.action-grid button.tone-sky { background: #0ea5e9; color: #fff; border-color: transparent; }
.action-grid button.tone-rose { background: #f43f5e; color: #fff; border-color: transparent; }
.section-label { margin: 14px 0 7px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; color: var(--txt-soft); }

/* ---------- AI ---------- */
.ai-panel {
  position: relative; z-index: 2; margin: auto 0 0 auto; width: 100%; max-width: 440px;
  height: min(690px, 90vh); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 26px; animation: slideLeft 0.34s var(--ease) both;
}
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-bottom: 1px solid var(--grid-line); }
.ai-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 18px; font-size: 11.5px; line-height: 1.55; animation: popIn 0.26s var(--ease) both; }
.msg.ai { align-self: flex-start; background: var(--soft-bg); border: 1px solid var(--glass-brd); }
.msg.user { align-self: flex-end; color: #fff; background: linear-gradient(90deg, #6366f1, #8b5cf6); box-shadow: 0 10px 22px -12px rgba(99,102,241,0.9); }
.msg .ttl { display: block; margin-bottom: 4px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.msg ul { margin: 7px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.msg li { display: flex; gap: 7px; font-size: 11px; }
.msg li::before { content: ""; width: 4px; height: 4px; border-radius: 99px; background: currentColor; opacity: 0.6; margin-top: 6px; flex-shrink: 0; }
.msg .hl { margin-top: 8px; padding: 4px 9px; border-radius: 9px; font-size: 10.5px; font-weight: 800; background: rgba(99,102,241,0.22); color: #4338ca; }
html.dark .msg .hl { color: #c7d2fe; }
.ai-sugg { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; border-top: 1px solid var(--grid-line); }
.ai-form { display: flex; align-items: center; gap: 8px; padding: 10px; border-top: 1px solid var(--grid-line); }
.ai-form input { flex: 1; padding: 9px 12px; border-radius: var(--r-md); font-size: 11.5px; background: var(--soft-bg); border: 1px solid var(--glass-brd); outline: none; }
.ai-form input:focus { box-shadow: 0 0 0 2px var(--ring); }
.ai-send { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md); color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 10px 20px -10px rgba(99,102,241,0.9); transition: transform 0.16s var(--ease); }
.ai-send:hover { transform: scale(1.08); }
.typing { display: flex; gap: 4px; padding: 10px 14px; width: 62px; border-radius: 18px; background: var(--soft-bg); border: 1px solid var(--glass-brd); }
.typing i { width: 6px; height: 6px; border-radius: 99px; background: var(--brand); animation: bounceDot 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }

/* ---------- context menu ---------- */
.ctx { position: fixed; z-index: 95; width: 226px; padding: 6px; border-radius: var(--r-xl); animation: popIn 0.16s var(--ease) both; }
.ctx button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 9px; border-radius: 9px; font-size: 11px; font-weight: 600; text-align: left; transition: background 0.14s; }
.ctx button:hover { background: var(--soft-bg-2); }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; padding: 16px; }
.modal { position: relative; z-index: 2; width: 100%; max-width: 460px; padding: 18px; border-radius: 26px; animation: popIn 0.26s var(--ease) both; max-height: 92vh; overflow-y: auto; }
.modal h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.modal .sub { font-size: 11px; color: var(--txt-soft); }
.modal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.modal-grid .full { grid-column: span 2; }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal-actions button { flex: 1; padding: 9px; border-radius: var(--r-md); font-size: 12px; font-weight: 800; }
.modal-actions .cancel { background: var(--soft-bg); border: 1px solid var(--glass-brd); }
.modal-actions .go { color: #fff; background: linear-gradient(90deg, #6366f1, #8b5cf6); box-shadow: 0 10px 20px -10px rgba(99,102,241,0.9); }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 6px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast { padding: 9px 14px; border-radius: var(--r-md); text-align: center; font-size: 11.5px; font-weight: 800; animation: popIn 0.24s var(--ease) both; box-shadow: 0 18px 40px -18px rgba(0,0,0,0.6); }
.toast.ok { color: #059669; } .toast.err { color: #e11d48; } .toast.info { color: #4f46e5; }
html.dark .toast.ok { color: #6ee7b7; } html.dark .toast.err { color: #fda4af; } html.dark .toast.info { color: #a5b4fc; }

.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 70; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 18px; font-size: 21px; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 50%, #22d3ee);
  box-shadow: 0 22px 44px -18px rgba(99, 102, 241, 0.95);
  transition: transform 0.2s var(--ease);
}
.fab:hover { transform: scale(1.1) rotate(6deg); }
@media (min-width: 640px) { .fab { display: none; } }

/* ---------- responsive helpers ---------- */
.hide-sm { display: none; }
@media (min-width: 560px) { .hide-sm { display: flex; } }
.hide-md { display: none; }
@media (min-width: 900px) { .hide-md { display: flex; } .hide-md.grid { display: grid; } }
.hide-lg { display: none; }
@media (min-width: 1180px) { .hide-lg { display: flex; } }
@media (max-width: 640px) {
  .page { padding: 9px; }
  .kpi { width: 152px; }
  .drawer { border-radius: 22px 22px 0 0; max-width: 100%; margin-top: 8vh; height: 92vh; }
  .ai-panel { max-width: 100%; height: 88vh; border-radius: 24px 24px 0 0; }
}

/* ---------- print ---------- */
@media print {
  .topbar, .sidebar-col, .fab, .filters { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; }
}
