/* RoomSee — design tokens ------------------------------------------------- */
:root {
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #f3f4f9;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --text: #121527;
  --muted: #697089;
  --border: #e4e6ef;
  --accent: #5b4cf0;
  --accent-2: #8b5cf6;
  --accent-soft: #eeebff;
  --accent-text: #4b3cdb;
  --ok: #0f8a5f;      --ok-soft: #e1f6ec;
  --warn: #a35f00;    --warn-soft: #fff1d6;
  --danger: #d2303c;  --danger-soft: #fdeaec;
  --sidebar: #0e1121;
  --sidebar-2: #171b30;
  --sidebar-text: #a3a8c3;
  --sidebar-dim: #5f6582;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(18, 21, 39, .04), 0 2px 8px rgba(18, 21, 39, .04);
  --shadow: 0 10px 30px -12px rgba(18, 21, 39, .18);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090b15;
    --surface: #121626;
    --surface-2: #181d30;
    --text: #e9ebf5;
    --muted: #949bb5;
    --border: #252b42;
    --accent: #7c6dff;
    --accent-soft: rgba(124, 109, 255, .16);
    --accent-text: #ab9fff;
    --ok: #3fd096;      --ok-soft: rgba(63, 208, 150, .13);
    --warn: #f3b44a;    --warn-soft: rgba(243, 180, 74, .13);
    --danger: #ff6b76;  --danger-soft: rgba(255, 107, 118, .13);
    --sidebar: #070912;
    --sidebar-2: #10142a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 14px 36px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* Base ------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 0; }
h2 { font-size: 1.05rem; font-weight: 750; letter-spacing: -.01em; margin: 0; }
h3 { font-size: .95rem; font-weight: 700; margin: 0; }
p { margin: 0 0 .75rem; }
.icon { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.pre { white-space: pre-wrap; }
hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; width: 100%; }

/* App shell -------------------------------------------------------------- */
.app { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(124, 109, 255, .18), transparent 70%),
    var(--sidebar);
  color: var(--sidebar-text); display: flex; flex-direction: column; gap: 20px; padding: 20px 14px 16px;
}
.brand { display: flex; align-items: center; gap: 11px; color: #fff; font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; padding: 2px 8px; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 800; background: linear-gradient(90deg, #b3a8ff, #f0a6d8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(140deg, #9a8cff 0%, #5b4cf0 55%, #3f2fc4 100%);
  box-shadow: 0 8px 18px -6px rgba(91, 76, 240, .8), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.logo-mark svg { width: 20px; height: 20px; }
.logo-mark.lg { width: 46px; height: 46px; border-radius: 14px; }
.logo-mark.lg svg { width: 26px; height: 26px; }

.org-name { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--sidebar-dim); padding: 0 10px; margin-top: -12px; }
.site-switch { position: relative; margin: 0; }
.site-switch .icon { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; color: #b3a8ff; left: 12px; }
.site-switch .icon.chev { right: 10px; left: auto; color: var(--sidebar-dim); }
.site-switch select, .site-static {
  width: 100%; appearance: none; -webkit-appearance: none; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1); color: #fff; padding: 11px 34px 11px 40px;
  border-radius: 12px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; background-image: none;
}
.site-switch select:hover { background: rgba(255, 255, 255, .09); }
.site-switch select:focus { outline: none; box-shadow: 0 0 0 3px rgba(124, 109, 255, .45); border-color: transparent; }
.site-switch select option { color: #121527; background: #fff; }
.site-static { cursor: default; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--sidebar-dim); font-weight: 800; padding: 0 12px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--sidebar-text); font-weight: 600; font-size: .9rem; }
.nav-link:hover { background: rgba(255, 255, 255, .05); color: #fff; text-decoration: none; }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(124, 109, 255, .28), rgba(124, 109, 255, .06)); box-shadow: inset 3px 0 0 #9a8cff; }
.nav-link.active .icon { color: #b3a8ff; }
.nav-link .badge { margin-left: auto; }

.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.sidebar-foot form { margin: 0; }
.who { min-width: 0; flex: 1; line-height: 1.25; }
.who a { color: #fff; font-weight: 700; font-size: .88rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { font-size: .74rem; color: var(--sidebar-dim); font-weight: 600; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 800; font-size: .78rem; color: #fff; letter-spacing: .02em;
  background: linear-gradient(135deg, hsl(var(--hue, 255) 85% 66%), hsl(calc(var(--hue, 255) + 40) 80% 55%));
}
.icon-btn { background: none; border: 0; color: inherit; padding: 8px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 1260px; margin: 0 auto; padding: 34px 40px 72px; }
.mobile-bar, .scrim { display: none; }

/* Page header ------------------------------------------------------------ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); margin-bottom: 8px; }
.subtitle { color: var(--muted); margin: 8px 0 0; font-size: .95rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.back:hover { color: var(--text); text-decoration: none; }

/* Cards & layout --------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head h2 { display: flex; align-items: center; gap: 10px; }
.card-head p { margin: 3px 0 0; color: var(--muted); font-size: .86rem; }
.count { font-size: .75rem; font-weight: 800; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; }
.narrow { max-width: 600px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row form { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* Stats ------------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  position: relative; overflow: hidden; display: block; color: inherit; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
a.stat:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; }
.stat-value { font-size: 2.1rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .84rem; margin-top: 7px; font-weight: 600; }
.tone-sky   .stat-icon { background: color-mix(in srgb, #0ea5e9 14%, transparent); color: #0ea5e9; }
.tone-green .stat-icon { background: var(--ok-soft); color: var(--ok); }
.tone-amber .stat-icon { background: var(--warn-soft); color: var(--warn); }
.stat.hero {
  border: 0; color: #fff;
  background: radial-gradient(260px 160px at 100% 0%, rgba(255, 255, 255, .22), transparent 70%),
              linear-gradient(135deg, #6a5cff 0%, #5b4cf0 45%, #8b5cf6 100%);
  box-shadow: 0 16px 34px -16px rgba(91, 76, 240, .9);
}
.stat.hero .stat-icon { background: rgba(255, 255, 255, .18); color: #fff; }
.stat.hero .stat-label { color: rgba(255, 255, 255, .82); }
.stat.hero::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 22px solid rgba(255, 255, 255, .08); right: -50px; bottom: -70px; }
.stat .go { position: absolute; top: 18px; right: 18px; opacity: .55; }

/* Rooms right now -------------------------------------------------------- */
.rooms-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.room-now { position: relative; border: 1px solid var(--border); border-radius: 13px; padding: 14px 14px 14px 18px; background: var(--surface-2); overflow: hidden; }
.room-now::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--room); }
.room-now.busy { background: color-mix(in srgb, var(--room) 7%, var(--surface)); }
.room-now h3 { font-size: .93rem; margin-bottom: 2px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.room-now .meta { color: var(--muted); font-size: .78rem; font-weight: 600; }
.room-now .status-line { margin-top: 10px; font-size: .82rem; font-weight: 600; line-height: 1.35; }
.room-now .status-line span { color: var(--muted); font-weight: 500; display: block; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live.free { background: var(--ok-soft); color: var(--ok); }
.live.busy { background: var(--danger-soft); color: var(--danger); }
.live.busy::before { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 60%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }

/* Today agenda ----------------------------------------------------------- */
.agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.agenda li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border-radius: 12px; }
.agenda li.now { background: var(--accent-soft); }
.agenda li.past { opacity: .45; }
.agenda time { font-weight: 800; font-size: .84rem; font-variant-numeric: tabular-nums; line-height: 1.3; }
.agenda time span { display: block; color: var(--muted); font-weight: 600; font-size: .74rem; }
.agenda .what { border-left: 3px solid var(--room); padding-left: 12px; min-width: 0; }
.agenda .what a { color: var(--text); font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda .what span { color: var(--muted); font-size: .8rem; font-weight: 500; }
.agenda .what .now-tag, .now-tag { font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 1px 6px; border-radius: 5px; margin-left: 6px; vertical-align: 2px; }

/* Empty states ----------------------------------------------------------- */
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty .empty-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--accent-soft); color: var(--accent-text); }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { margin: 0 auto 14px; max-width: 34em; font-size: .9rem; }
.notice { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-weight: 600; margin-bottom: 20px; }
.notice a { color: inherit; text-decoration: underline; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  font: inherit; font-weight: 700; font-size: .88rem; padding: 9px 16px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: transform .08s, box-shadow .15s, background .15s, filter .15s; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.btn.primary { background: linear-gradient(135deg, #6c5eff, #5b4cf0); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px rgba(91, 76, 240, .85), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.success { background: var(--ok); border-color: transparent; color: #fff; }
.btn.success:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 28%, var(--border)); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 6px 11px; font-size: .8rem; border-radius: 9px; }
.btn.wide { width: 100%; padding: 13px; font-size: .95rem; }

/* Forms ------------------------------------------------------------------ */
label { display: flex; flex-direction: column; gap: 7px; font-weight: 700; font-size: .84rem; }
input, select, textarea {
  font: inherit; font-weight: 500; font-size: .92rem; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 11px; background: var(--surface); color: var(--text); min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a90a8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
input[type=color] { padding: 3px; width: 44px; height: 42px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
input:disabled { opacity: .6; }
textarea { resize: vertical; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.hint { color: var(--muted); font-size: .79rem; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.span-2 { grid-column: span 2; }
.form-section { padding: 24px 0; border-top: 1px solid var(--border); }
.form-section:first-child { border-top: 0; padding-top: 4px; }
.form-section > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .78rem; font-weight: 800; background: var(--accent-soft); color: var(--accent-text); }
.time-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 20px; border-top: 1px solid var(--border); }

/* Room picker ------------------------------------------------------------ */
.room-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 12px; }
.room-option { position: relative; display: block; cursor: pointer; font-weight: 500; }
.room-option input { position: absolute; opacity: 0; pointer-events: none; }
.room-option .box {
  height: 100%; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px;
  border: 1.5px solid var(--border); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.room-option:hover .box { border-color: color-mix(in srgb, var(--room) 55%, var(--border)); transform: translateY(-1px); }
.room-option input:checked + .box { border-color: var(--room); box-shadow: 0 0 0 4px color-mix(in srgb, var(--room) 20%, transparent); }
.room-option input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.room-option .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.swatch { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: var(--room); flex-shrink: 0; }
.room-option .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--room); opacity: 0; transform: scale(.6); transition: .15s; }
.room-option input:checked + .box .tick { opacity: 1; transform: none; }
.room-option strong { font-size: .93rem; }
.room-option .cap { color: var(--muted); font-size: .78rem; }
.avail { font-size: .74rem; font-weight: 700; margin-top: 4px; min-height: 1.2em; color: var(--muted); }
.avail.free { color: var(--ok); }
.avail.busy { color: var(--danger); }
.avail.small-room { color: var(--warn); }
.room-option.is-busy .box { opacity: .55; cursor: not-allowed; background: var(--surface-2); transform: none; }

/* Flash messages --------------------------------------------------------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 13px; margin-bottom: 14px; font-weight: 600; font-size: .9rem; }
.flash .icon { margin-top: 1px; }
.flash-success { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-message, .flash-info { background: var(--accent-soft); color: var(--accent-text); }

/* Status, tags, badges --------------------------------------------------- */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-approved { background: var(--ok-soft); color: var(--ok); }
.status-pending { background: var(--warn-soft); color: var(--warn); }
.status-denied { background: var(--danger-soft); color: var(--danger); }
.status-cancelled { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; background: var(--accent-soft); color: var(--accent-text); padding: 2px 8px; border-radius: 6px; }
.badge { background: #ff5468; color: #fff; border-radius: 999px; padding: 1px 7px; font-size: .7rem; font-weight: 800; line-height: 1.5; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--room); flex-shrink: 0; }

/* Date blocks & list rows ------------------------------------------------ */
.datebox { width: 54px; flex-shrink: 0; text-align: center; border-radius: 13px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); align-self: flex-start; }
.datebox .m { background: var(--room, var(--accent)); color: #fff; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; padding: 3px 0; }
.datebox .d { font-size: 1.35rem; font-weight: 800; line-height: 1.1; padding-top: 4px; letter-spacing: -.03em; }
.datebox .w { font-size: .62rem; color: var(--muted); font-weight: 800; text-transform: uppercase; padding-bottom: 5px; letter-spacing: .06em; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; gap: 14px; align-items: center; padding: 12px 10px; margin: 0 -10px; border-radius: 13px; color: inherit; }
.list-row + .list-row { border-top: 1px solid var(--border); border-top-left-radius: 0; border-top-right-radius: 0; }
a.list-row:hover { background: var(--surface-2); text-decoration: none; }
.list-row .datebox { align-self: center; }
.list-row .body { flex: 1; min-width: 0; }
.list-row .title { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { color: var(--muted); font-size: .82rem; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.meta > span { display: inline-flex; align-items: center; gap: 5px; }

/* Calendar --------------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; font-weight: 700;
  transition: background .15s, border-color .15s;
}
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--room, var(--muted)); }
.chip:hover { border-color: var(--room, var(--accent)); }
.chip.active { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip.pending-key { cursor: default; color: var(--muted); border-style: dashed; }
.chip.pending-key i { background: repeating-linear-gradient(135deg, var(--muted) 0 2px, transparent 2px 4px); }
#calendar {
  --fc-border-color: var(--border); --fc-page-bg-color: var(--surface); --fc-neutral-bg-color: var(--surface-2);
  --fc-today-bg-color: color-mix(in srgb, var(--accent) 6%, transparent); --fc-now-indicator-color: #ff5468;
  --fc-list-event-hover-bg-color: var(--surface-2); --fc-event-border-color: transparent; --fc-small-font-size: .78rem;
}
.fc { font-size: .86rem; }
.fc .fc-toolbar.fc-header-toolbar { margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.fc .fc-toolbar-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.fc .fc-button {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); font-weight: 700; font-size: .8rem;
  text-transform: capitalize; padding: .45em .85em; box-shadow: none !important;
}
.fc .fc-button:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.fc .fc-button:disabled { opacity: .45; background: var(--surface); color: var(--text); border-color: var(--border); }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background: var(--text); border-color: var(--text); color: var(--surface); }
.fc .fc-button-group > .fc-button:first-child { border-radius: 10px 0 0 10px; }
.fc .fc-button-group > .fc-button:last-child { border-radius: 0 10px 10px 0; }
.fc .fc-today-button { border-radius: 10px; margin-left: 8px !important; }
.fc .fc-scrollgrid { border-radius: 14px; overflow: hidden; }
.fc .fc-col-header-cell { background: var(--surface-2); }
.fc .fc-col-header-cell-cushion { font-weight: 800; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 10px 4px; }
.fc a.fc-col-header-cell-cushion:hover, .fc a.fc-daygrid-day-number:hover { text-decoration: none; }
.fc .fc-day-today .fc-col-header-cell-cushion { color: var(--accent-text); }
.fc .fc-timegrid-slot { height: 2.5em; }
.fc .fc-timegrid-slot-minor { border-top-style: none; }
.fc .fc-timegrid-slot-label-cushion { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: lowercase; }
.fc .fc-daygrid-day-number { font-weight: 700; font-size: .8rem; color: var(--muted); padding: 6px 8px; }
.fc .fc-day-today .fc-daygrid-day-number { color: #fff; background: var(--accent); border-radius: 8px; margin: 4px; padding: 2px 7px; }
.fc .fc-timegrid-event, .fc .fc-daygrid-block-event { border-radius: 9px; border: 0; box-shadow: 0 4px 12px -4px rgba(18, 21, 39, .35); }
.fc .fc-timegrid-event .fc-event-main { padding: 4px 6px; }
.fc .fc-event-title { font-weight: 700; }
.fc .fc-event-time { font-weight: 600; opacity: .9; font-size: .74rem; }
.fc .fc-event { cursor: pointer; transition: filter .15s; }
.fc .fc-event:hover { filter: brightness(1.08); }
.fc .is-pending.fc-timegrid-event, .fc .is-pending.fc-daygrid-block-event {
  opacity: .78; background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .28) 0 6px, transparent 6px 12px);
  outline: 1.5px dashed rgba(255, 255, 255, .75); outline-offset: -4px;
}
.fc .fc-list { border-radius: 14px; overflow: hidden; }
.fc .fc-list-day-cushion { background: var(--surface-2); font-weight: 800; }
.fc .fc-list-event.is-pending { opacity: .6; }
.fc .fc-highlight { background: var(--accent-soft); }

dialog { border: 0; border-radius: 20px; padding: 0; width: min(440px, 92vw); background: var(--surface); color: var(--text); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .45); }
dialog::backdrop { background: rgba(9, 11, 21, .45); backdrop-filter: blur(3px); }
dialog form { margin: 0; }
dialog .band { height: 8px; background: var(--room, var(--accent)); }
dialog .inner { padding: 22px 24px 20px; }
dialog h3 { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; margin: 16px 0; }
.kv dt { color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.kv dd { margin: 0; font-weight: 600; }

/* Admin: requests -------------------------------------------------------- */
.request { display: grid; grid-template-columns: auto minmax(0, 1fr) 300px; gap: 18px; padding: 20px 0; border-top: 1px solid var(--border); }
.request:first-of-type { border-top: 0; padding-top: 4px; }
.request-title { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.request-title a { color: var(--text); }
.notes { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; font-size: .86rem; margin-top: 10px; white-space: pre-wrap; }
.conflict { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 12px; border-radius: 11px; background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: .84rem; }
.decision { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.decision .row > .btn { flex: 1; }
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; }
.segmented a { padding: 6px 13px; border-radius: 9px; font-weight: 700; font-size: .8rem; color: var(--muted); }
.segmented a:hover { color: var(--text); text-decoration: none; }
.segmented a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Admin: rooms ----------------------------------------------------------- */
.room-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.room-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.room-card .band { height: 74px; padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; color: #fff;
  background: radial-gradient(160px 80px at 100% 0%, rgba(255, 255, 255, .3), transparent 70%), var(--room); }
.room-card .band .icon-wrap { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; }
.room-card form { padding: 16px; display: grid; gap: 10px; margin: 0; }
.room-card .inline { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
.room-card .inline-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 8px; }
.room-card.inactive .band { filter: grayscale(.85); opacity: .7; }
.room-card.new { border: 2px dashed var(--border); background: transparent; box-shadow: none; }
.room-card.new .band { background: transparent; color: var(--muted); height: auto; padding-bottom: 0; }
.room-card.new .band h2 { color: var(--text); }
.hidden-tag { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: rgba(0, 0, 0, .3); padding: 3px 8px; border-radius: 6px; }

/* Admin: people ---------------------------------------------------------- */
.person { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); }
.person:first-child { border-top: 0; padding-top: 4px; }
.person > form { margin: 0; }
.person-edit { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.ident { flex: 1 1 200px; display: flex; flex-direction: column; min-width: 0; }
.ident input.bare { border-color: transparent; background: transparent; padding: 3px 7px; margin-left: -7px; font-weight: 800; font-size: .95rem; }
.ident input.bare:hover { border-color: var(--border); }
.ident input.bare:focus { border-color: var(--accent); background: var(--surface); }
.ident .email, .ident .name { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ident .name { color: var(--text); font-weight: 800; font-size: .95rem; }
.person-edit input[name=password] { flex: 0 1 170px; }
.person-edit select { flex: 0 0 auto; }
.person.inactive .avatar { filter: grayscale(1); opacity: .5; }
.add-form { display: grid; grid-template-columns: 1.1fr 1.3fr 1.1fr auto auto; gap: 10px; align-items: center; }

/* Admin: facilities ------------------------------------------------------ */
.facility-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.facility-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.facility-card.closed { opacity: .65; }
.facility-card header { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.facility-card .f-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex-shrink: 0; }
.facility-card .stats-line { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.facility-card .stats-line span { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; }
.facility-card form { display: grid; gap: 10px; margin: 0; }
.facility-card .inline-3 { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }

/* Subscribe -------------------------------------------------------------- */
.feed { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--border); align-items: start; }
.feed:first-child { border-top: 0; padding-top: 0; }
.feed .swatch { width: 40px; height: 40px; border-radius: 12px; }
.copy { display: flex; gap: 8px; margin: 8px 0; }
.copy input { flex: 1; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .78rem; background: var(--surface-2); }
.feed .links { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; font-weight: 700; }
.feed .links a { display: inline-flex; align-items: center; gap: 5px; }
.howto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.howto div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; padding: 14px; font-size: .84rem; }
.howto b { display: block; margin-bottom: 4px; }

/* Booking detail --------------------------------------------------------- */
.detail-hero { position: relative; overflow: hidden; border-radius: var(--radius); padding: 26px 28px; margin-bottom: 20px; color: #fff;
  background: radial-gradient(400px 200px at 100% 0%, rgba(255, 255, 255, .25), transparent 70%), linear-gradient(135deg, var(--room), color-mix(in srgb, var(--room) 65%, #000)); }
.detail-hero h1 { color: #fff; margin: 6px 0 8px; }
.detail-hero .meta { color: rgba(255, 255, 255, .88); font-size: .9rem; font-weight: 600; }
.detail-hero .status { background: rgba(255, 255, 255, .94); }
.detail-hero .status-pending { color: #a35f00; }
.detail-hero .status-approved { color: #0f8a5f; }
.detail-hero .status-denied { color: #d2303c; }
.detail-hero .status-cancelled { color: #697089; border: 0; }

/* Auth pages ------------------------------------------------------------- */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 44px 56px; display: flex; flex-direction: column; gap: 40px;
  background:
    radial-gradient(700px 480px at -5% -10%, rgba(139, 123, 255, .75), transparent 60%),
    radial-gradient(620px 460px at 110% 105%, rgba(236, 72, 153, .5), transparent 60%),
    linear-gradient(160deg, #1d1650 0%, #0e1121 72%);
}
.auth-art::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 75%); }
.auth-art > * { position: relative; }
.auth-art .brand { padding: 0; font-size: 1.3rem; }
.auth-art h2 { font-size: clamp(2.2rem, 3.8vw, 3.5rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; margin: auto 0 18px; max-width: 11em; }
.grad-text { background: linear-gradient(90deg, #c7bdff, #f7a8d8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art p.lede { color: rgba(255, 255, 255, .72); font-size: 1.06rem; max-width: 29em; margin: 0; }
.features { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.features li { display: flex; gap: 10px; align-items: center; font-weight: 600; color: rgba(255, 255, 255, .86); }
.features .icon { color: #c7bdff; background: rgba(255, 255, 255, .1); border-radius: 7px; padding: 4px; width: 24px; height: 24px; }
.mock {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 520px; padding: 16px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px;
  backdrop-filter: blur(10px); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); transform: perspective(900px) rotateX(8deg) rotateZ(-2deg);
}
.mock .col { display: flex; flex-direction: column; gap: 8px; }
.mock .day { font-size: .66rem; color: rgba(255, 255, 255, .55); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; padding-left: 2px; }
.mock .ev { border-radius: 10px; padding: 8px 9px; font-size: .7rem; font-weight: 700; color: #fff; line-height: 1.25; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .6); }
.mock .ev small { display: block; font-weight: 600; opacity: .8; font-size: .62rem; }
.mock .gap { height: 26px; }
.auth-form { display: grid; place-items: center; padding: 48px 28px; }
.auth-card { width: min(410px, 100%); }
.auth-card > .logo-mark { margin-bottom: 22px; }
.auth-card h1 { font-size: 2rem; margin-bottom: 6px; }
.auth-card .lede { color: var(--muted); margin-bottom: 26px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-card .foot { margin-top: 22px; color: var(--muted); font-size: .82rem; display: flex; gap: 8px; align-items: flex-start; }
.input-icon { position: relative; display: block; }
.input-icon .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { width: 100%; padding-left: 40px; }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; margin-bottom: 26px; }
.auth-mobile-brand b { color: var(--accent-text); }
.setup-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-label-row { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request { grid-template-columns: auto minmax(0, 1fr); }
  .request .decision { grid-column: 2; }
}
@media (max-width: 1000px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .auth-split { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-mobile-brand { display: flex; }
  .auth-card > .logo-mark { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 60; transform: translateX(-102%); transition: transform .22s ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(9, 11, 21, .5); z-index: 55; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--sidebar); color: #fff; position: sticky; top: 0; z-index: 40; }
  .mobile-bar .brand { font-size: 1.05rem; padding: 0; }
  .mobile-bar .logo-mark { width: 30px; height: 30px; }
  .mobile-bar .site { margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--sidebar-text); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page { padding: 22px 16px 56px; }
  h1 { font-size: 1.55rem; }
}
@media (max-width: 640px) {
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat-icon { width: 34px; height: 34px; margin-bottom: 12px; }
  .stat-value { font-size: 1.7rem; }
  .form-grid, .time-row, .add-form, .setup-split { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .request { grid-template-columns: minmax(0, 1fr); }
  .request .datebox { display: none; }
  .request .decision { grid-column: auto; }
  .howto { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .fc .fc-toolbar.fc-header-toolbar { flex-direction: column; align-items: stretch; }
  .fc .fc-toolbar-chunk { display: flex; justify-content: center; }
  .room-picker { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .person { flex-wrap: wrap; }
  .facility-cards, .room-cards { grid-template-columns: minmax(0, 1fr); }
}
