/* SharedStay Manager — Design System */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Surfaces */
  --bg: oklch(0.975 0.008 85);              /* warm cream page */
  --surface: oklch(1 0 0);                   /* card white */
  --surface-2: oklch(0.968 0.006 85);        /* inset panel */
  --surface-3: oklch(0.955 0.008 85);        /* deeper inset */
  --sidebar: oklch(0.22 0.018 220);          /* deep ink */
  --sidebar-2: oklch(0.26 0.02 220);
  --sidebar-fg: oklch(0.92 0.01 85);
  --sidebar-muted: oklch(0.62 0.015 220);

  /* Brand */
  --teal: oklch(0.42 0.07 195);              /* primary */
  --teal-600: oklch(0.36 0.07 195);
  --teal-100: oklch(0.93 0.02 195);
  --sand: oklch(0.78 0.08 70);               /* warm accent */
  --sand-100: oklch(0.95 0.025 75);

  /* Neutrals */
  --ink: oklch(0.22 0.018 240);
  --ink-2: oklch(0.38 0.02 240);
  --muted: oklch(0.55 0.015 240);
  --subtle: oklch(0.72 0.012 240);
  --line: oklch(0.92 0.008 85);
  --line-2: oklch(0.88 0.008 85);

  /* Status */
  --ok: oklch(0.62 0.12 155);
  --ok-bg: oklch(0.95 0.04 155);
  --warn: oklch(0.76 0.13 75);
  --warn-bg: oklch(0.96 0.05 85);
  --err: oklch(0.58 0.17 25);
  --err-bg: oklch(0.95 0.04 25);
  --info: oklch(0.58 0.11 240);
  --info-bg: oklch(0.95 0.03 240);
  --block: oklch(0.75 0.01 240);
  --block-bg: oklch(0.93 0.005 240);

  /* Shadows */
  --shadow-xs: 0 1px 0 oklch(0.88 0.008 85 / 0.6);
  --shadow-sm: 0 1px 2px oklch(0.3 0.02 240 / 0.05), 0 1px 0 oklch(0.88 0.008 85 / 0.4);
  --shadow-md: 0 4px 14px oklch(0.3 0.02 240 / 0.06), 0 1px 2px oklch(0.3 0.02 240 / 0.04);
  --shadow-lg: 0 20px 50px oklch(0.2 0.02 240 / 0.12), 0 6px 18px oklch(0.2 0.02 240 / 0.06);

  /* Geometry */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Merriweather', 'Georgia', serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "kern";
}
button, input, select, textarea { font-family: inherit; color: inherit; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }

/* App shell */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--sand) 0%, oklch(0.65 0.09 55) 100%);
  display: grid; place-items: center;
  color: var(--sidebar);
  font-weight: 700;
  font-size: 15px;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.3), 0 2px 6px oklch(0 0 0 / 0.3);
}
.brand-name { font-weight: 700; font-size: 14px; letter-spacing: 0.01em; }
.brand-sub { font-size: 10px; color: var(--sidebar-muted); letter-spacing: 0.12em; text-transform: uppercase; }

.nav-section {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  padding: 14px 10px 6px;
  font-weight: 700;
}
.nav {
  display: flex; flex-direction: column; gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  color: oklch(0.82 0.01 220);
  cursor: pointer;
  font-size: 13px;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  transition: background 120ms ease, color 120ms ease;
  font-family: inherit;
}
.nav-item:hover { background: oklch(1 0 0 / 0.05); color: var(--sidebar-fg); }
.nav-item.active {
  background: oklch(1 0 0 / 0.08);
  color: oklch(1 0 0);
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.06);
}
.nav-item .ico { width: 16px; height: 16px; opacity: 0.85; flex-shrink: 0; }
.nav-item.active .ico { opacity: 1; color: var(--sand); }
.nav-item .count {
  margin-left: auto;
  font-size: 10px;
  background: oklch(1 0 0 / 0.1);
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid oklch(1 0 0 / 0.06);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prop-switch {
  background: oklch(1 0 0 / 0.04);
  border: 1px solid oklch(1 0 0 / 0.06);
  border-radius: 10px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 120ms;
}
.prop-switch:hover { background: oklch(1 0 0 / 0.08); }
.prop-switch .thumb {
  width: 28px; height: 28px; border-radius: 7px;
  background: repeating-linear-gradient(135deg, oklch(0.55 0.07 40) 0 6px, oklch(0.5 0.07 40) 6px 12px);
  flex-shrink: 0;
}
.prop-switch .label { font-size: 10px; color: var(--sidebar-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.prop-switch .name { font-size: 12px; font-weight: 700; color: var(--sidebar-fg); }
.prop-switch .chev { margin-left: auto; color: var(--sidebar-muted); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.user-chip:hover { background: oklch(1 0 0 / 0.05); }
.avatar {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--sand);
  color: var(--sidebar);
  display: grid; place-items: center;
  font-weight: 700; font-size: 11px;
  flex-shrink: 0;
}
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar.xs { width: 18px; height: 18px; font-size: 8px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }

/* Main */
.main { display: flex; flex-direction: column; min-width: 0; }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(120%) blur(4px);
}
.search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  transition: border-color 140ms, box-shadow 140ms;
}
.search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px oklch(0.42 0.07 195 / 0.1); }
.search input {
  border: none; outline: none; background: transparent;
  flex: 1; font-size: 13px; color: var(--ink);
}
.kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--muted);
}
.date-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-2);
}
.date-pill:hover { border-color: var(--line-2); }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--err);
  box-shadow: 0 0 0 2px var(--surface);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 80ms, box-shadow 120ms, background 120ms;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--teal);
  color: oklch(1 0 0);
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.2) inset, 0 2px 6px oklch(0.42 0.07 195 / 0.3);
}
.btn-primary:hover { background: var(--teal-600); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-dark {
  background: var(--ink);
  color: oklch(1 0 0);
}
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }

/* Page */
.page {
  padding: 28px 28px 80px;
  max-width: 1600px;
  width: 100%;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.h-crumb { font-size: 11px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; font-weight: 700; }
.h-title { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.h-sub { font-size: 13px; color: var(--muted); margin-top: 6px; max-width: 600px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.card-title { font-size: 14px; font-weight: 700; }
.card-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.card-body { padding: 18px; }

/* KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.kpi-label {
  font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.kpi-value {
  font-size: 28px; font-weight: 700; margin-top: 10px; line-height: 1;
  letter-spacing: -0.02em;
}
.kpi-unit { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.kpi-delta {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 10px;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 700;
}
.kpi-delta.down { background: var(--err-bg); color: var(--err); }
.kpi-delta.flat { background: var(--surface-3); color: var(--muted); }
.kpi.accent { background: var(--ink); color: oklch(1 0 0); border-color: var(--ink); }
.kpi.accent .kpi-label { color: oklch(0.7 0.01 220); }
.kpi.accent .kpi-unit { color: oklch(0.7 0.01 220); }
.kpi.accent .spark path { stroke: var(--sand); }
.spark { position: absolute; right: 12px; bottom: 12px; width: 72px; height: 26px; z-index: 0; opacity: 0.55; pointer-events: none; }
.kpi-delta { position: relative; z-index: 1; }
.kpi-value { position: relative; z-index: 1; }
.spark path { fill: none; stroke: var(--teal); stroke-width: 1.5; stroke-linecap: round; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.badge .b-dot { width: 6px; height: 6px; border-radius: 50%; }
.badge.ok { background: var(--ok-bg); color: oklch(0.38 0.09 155); }
.badge.ok .b-dot { background: var(--ok); }
.badge.warn { background: var(--warn-bg); color: oklch(0.42 0.1 75); }
.badge.warn .b-dot { background: var(--warn); }
.badge.err { background: var(--err-bg); color: oklch(0.42 0.15 25); }
.badge.err .b-dot { background: var(--err); }
.badge.info { background: var(--info-bg); color: oklch(0.38 0.1 240); }
.badge.info .b-dot { background: var(--info); }
.badge.block { background: var(--block-bg); color: var(--ink-2); }
.badge.block .b-dot { background: var(--block); }

/* Table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
}
.tbl td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
}
.tbl tr:hover td { background: var(--surface-2); }
.tbl tr { cursor: pointer; }
.tbl tr.selected td { background: oklch(0.93 0.02 195); }

/* Form bits */
.input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 140ms, box-shadow 140ms;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px oklch(0.42 0.07 195 / 0.1); }
select.input {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 6l4.5 4 4.5-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  cursor: pointer;
}
textarea.input {
  line-height: 1.5;
  min-height: 60px;
}
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 400;
}
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--ink); color: oklch(1 0 0); border-color: var(--ink); }

/* Toast */
.toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 100;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: oklch(1 0 0);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 240ms cubic-bezier(0.2, 0.9, 0.3, 1);
  pointer-events: auto;
  min-width: 280px;
}
.toast .t-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
@keyframes toastIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Drawer */
.scrim {
  position: fixed; inset: 0;
  background: oklch(0.2 0.02 240 / 0.4);
  backdrop-filter: blur(2px);
  z-index: 50;
  animation: fadeIn 180ms ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 520px; max-width: 100vw;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  animation: drawerIn 260ms cubic-bezier(0.2, 0.9, 0.3, 1);
  display: flex; flex-direction: column;
}
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
.drawer-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.drawer-body { padding: 22px; overflow-y: auto; flex: 1; }
.drawer-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--surface-2);
}

/* Modal */
.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  width: 560px; max-width: 92vw;
  animation: modalIn 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
  overflow: hidden;
}
@keyframes modalIn { from { transform: translate(-50%, calc(-50% + 8px)); opacity: 0; } }

/* Hairlines */
.hr { height: 1px; background: var(--line); border: 0; margin: 14px 0; }

/* Placeholder image */
.ph-img {
  background:
    repeating-linear-gradient(45deg,
      oklch(0.92 0.01 85) 0 8px,
      oklch(0.9 0.01 85) 8px 16px);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: oklch(0.5 0.01 240);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* Scroll-y areas */
.scroll { overflow: auto; }
.scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll::-webkit-scrollbar-thumb { background: oklch(0.85 0.008 85); border-radius: 10px; border: 2px solid var(--bg); }
.scroll::-webkit-scrollbar-track { background: transparent; }

/* Calendar */
.cal-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cal-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.cal-scroll { overflow-x: auto; }
.cal-grid {
  display: grid;
  --col-w: 56px;
  --row-h: 56px;
  --side-w: 200px;
  min-width: max-content;
}
.cal-header-row {
  display: grid;
  grid-template-columns: var(--side-w) repeat(var(--days), var(--col-w));
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 3;
}
.cal-row {
  display: grid;
  grid-template-columns: var(--side-w) repeat(var(--days), var(--col-w));
  border-bottom: 1px solid var(--line);
  position: relative;
}
.cal-row:last-child { border-bottom: 0; }
.cal-side {
  padding: 10px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  position: sticky; left: 0; z-index: 2;
}
.cal-side.head { background: var(--surface-2); }
.cal-side .u-name { font-size: 13px; font-weight: 700; }
.cal-side .u-meta { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.cal-day {
  border-right: 1px solid var(--line);
  padding: 8px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.cal-day .d-num { font-size: 14px; color: var(--ink); letter-spacing: -0.01em; }
.cal-day .d-dow { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.cal-day.today { background: oklch(0.96 0.03 75); color: var(--ink); }
.cal-day.weekend { background: var(--surface-2); }
.cal-cell {
  border-right: 1px solid var(--line);
  height: var(--row-h);
  position: relative;
  cursor: pointer;
  transition: background 80ms;
}
.cal-cell:hover { background: oklch(0.97 0.02 195); }
.cal-cell.weekend { background: var(--surface-2); }
.cal-cell.today::after {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; width: 2px;
  background: var(--sand);
}
.cal-booking {
  position: absolute;
  top: 6px; bottom: 6px;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex; align-items: center; gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: oklch(1 0 0);
  cursor: pointer;
  box-shadow: 0 1px 2px oklch(0.2 0 0 / 0.1);
  overflow: hidden;
  transition: transform 120ms, box-shadow 120ms;
  z-index: 2;
}
.cal-booking:hover { transform: translateY(-1px); box-shadow: 0 4px 10px oklch(0.2 0 0 / 0.15); z-index: 3; }
.cal-booking.ok { background: linear-gradient(180deg, oklch(0.55 0.11 155), oklch(0.48 0.11 155)); }
.cal-booking.warn { background: linear-gradient(180deg, oklch(0.7 0.13 75), oklch(0.63 0.13 75)); color: oklch(0.18 0.02 60); }
.cal-booking.info { background: linear-gradient(180deg, oklch(0.55 0.1 240), oklch(0.48 0.1 240)); }
.cal-booking.err { background: linear-gradient(180deg, oklch(0.58 0.17 25), oklch(0.52 0.17 25)); }
.cal-booking.owner { background: linear-gradient(180deg, oklch(0.46 0.08 320), oklch(0.4 0.08 320)); }
.cal-booking.block {
  background: repeating-linear-gradient(45deg, oklch(0.8 0.008 240) 0 6px, oklch(0.75 0.008 240) 6px 12px);
  color: var(--ink);
}
.cal-booking.clean {
  background: oklch(0.94 0.03 75);
  color: oklch(0.35 0.1 75);
  border: 1px dashed oklch(0.7 0.1 75);
  box-shadow: none;
}
.cal-booking .bk-avatar {
  width: 18px; height: 18px; border-radius: 50%;
  background: oklch(1 0 0 / 0.3);
  display: grid; place-items: center;
  font-size: 9px; font-weight: 700;
  flex-shrink: 0;
}

/* Utility */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.tnum { font-variant-numeric: tabular-nums; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow { font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.divider { height: 1px; background: var(--line); }
.pill-group { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 9px; gap: 2px; border: 1px solid var(--line); }
.pill-group .pill {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  border: none;
  background: transparent;
  font-family: inherit;
}
.pill-group .pill.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Notification item */
.notif-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  align-items: start;
  cursor: pointer;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: oklch(0.97 0.02 195); }
.notif-item.unread:hover { background: oklch(0.95 0.025 195); }
.notif-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
}
.notif-title { font-size: 13px; font-weight: 700; }
.notif-body { font-size: 12px; color: var(--muted); margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--muted); }

/* Progress bar */
.bar { height: 6px; background: var(--surface-3); border-radius: 10px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--teal); border-radius: 10px; }
.bar .fill.warn { background: var(--warn); }
.bar .fill.ok { background: var(--ok); }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  left: 260px;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  overflow: hidden;
}
.tweaks-head {
  background: var(--ink); color: oklch(1 0 0);
  padding: 10px 14px; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
  letter-spacing: 0.04em;
}
.tweaks-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.tweak-row { display: flex; flex-direction: column; gap: 6px; }
.tweak-row .lbl { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.swatch-row { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch {
  width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
  border: 2px solid transparent;
  transition: transform 120ms;
}
.swatch.active { border-color: var(--ink); transform: scale(1.1); }

/* Auth page */
.auth-card {
  max-width: 400px;
  margin: 80px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 40px;
}
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.auth-header .brand-mark {
  width: 48px; height: 48px;
  font-size: 22px;
  margin: 0 auto 14px;
}
.auth-header h1 {
  font-size: 20px;
  font-weight: 700;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-group input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface);
  outline: none;
  transition: border-color 140ms, box-shadow 140ms;
}
.form-group input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px oklch(0.42 0.07 195 / 0.1);
}
.btn-block { width: 100%; justify-content: center; }
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}
.alert-err {
  background: var(--err-bg);
  color: var(--err);
  border: 1px solid oklch(0.85 0.1 25);
}

/* Settings nav (sidebar-style nav inside settings page) */
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav a {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 120ms;
}
.settings-nav a:hover { background: var(--surface-2); }
.settings-nav a.active {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  font-weight: 700;
}

/* Toggle switch */
.toggle {
  width: 34px; height: 20px;
  border-radius: 20px;
  position: relative;
  background: var(--surface-3);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 160ms;
}
.toggle.on { background: var(--teal); }
.toggle .toggle-knob {
  position: absolute;
  top: 1px; left: 1px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 160ms;
}
.toggle.on .toggle-knob { left: 15px; }

/* Kanban columns */
.kanban-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.kanban-col {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
}
.kanban-col-label {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Page link styles */
a.nav-item { text-decoration: none; }

/* Donut chart center */
.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

/* Responsive KPI for reports */
.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
