/* Tokens lifted from dashboard/server/render-dashboard.js so this board reads
   as a sibling of the Zeno one. Single theme, painted explicitly. */
:root {
  --bg: #f5f1ea; --bg-2: #ede6d8;
  --surface: #ffffff; --surface-2: #fbf8f2;
  --line: #e3d8c2; --line-soft: #efe7d6;
  --text: #1d2a35; --muted: #6c7884; --muted-2: #9aa3ad;
  --primary: #14384f; --primary-2: #1c4f6f; --accent: #c89b4a;
  --success: #15795b; --success-bg: #e4f3ec;
  --danger: #b42318; --danger-bg: #fbe7e4;
  --warning: #9a6200; --warning-bg: #f9efdd;
  --info: #2b5ea7; --info-bg: #e8f0f8;
  --admin: #a32a8c; --admin-bg: #fbecf6;
  --radius: 10px; --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(20,56,79,.06);
  --shadow-md: 0 4px 14px rgba(20,56,79,.08);
  --shadow-lg: 0 24px 60px rgba(20,56,79,.22);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text); font-size: 13px; min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

/* a bit wider (Vlad 2026-11-05: "Whole dashboard a bit wider, the right side wider") */
.app { padding: 20px; max-width: 1960px; margin: 0 auto; display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* ---- Header: one line ---- */
.header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  display: grid; place-items: center; color: #fff; font-family: 'Fraunces', serif; font-weight: 700; font-size: 13px; box-shadow: var(--shadow-sm);
}
h1 { margin: 0; font-family: 'Fraunces', serif; font-weight: 600; font-size: 16px; color: var(--primary); letter-spacing: -.2px; line-height: 1.2; }
.header-stats { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stat-pill {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px;
  font-weight: 700; font-size: 11.5px; color: var(--primary); box-shadow: var(--shadow-sm); white-space: nowrap;
}
.stat-pill span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat-pill.is-auto { color: var(--muted); border-style: dashed; }
.stat-pill.stat-age { color: var(--muted); font-weight: 600; }
.stat-pill.stat-age.is-old { color: var(--danger); border-color: var(--danger); }
.header-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.who { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-right: 4px; }
.who b { color: var(--text); font-weight: 700; }
.who-role { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--info); background: var(--info-bg); padding: 2px 7px; border-radius: 999px; }
.role-switch { display: inline-flex; gap: 3px; }
.role-switch a.who-role { text-decoration: none; color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.role-switch a.who-role:hover { color: var(--info); box-shadow: inset 0 0 0 1px var(--info); }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--info-bg); color: var(--info); font-size: 10.5px; font-weight: 800; }
.reload-btn { cursor: pointer; transition: background .12s, border-color .12s; }
.reload-btn:hover { background: var(--surface-2); border-color: var(--primary-2); }
.reload-btn:disabled { opacity: .6; cursor: default; }

/* ---- Filter bar ---- */
.filter-bar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 8px; margin-bottom: 8px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 5px;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 0; }
.filter-row > * { flex: 0 0 auto; min-width: 0; }
.search-wrap { position: relative; flex: 0 0 230px; width: 230px; }
.search-wrap .input { padding-left: 30px; }
.search-wrap::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c7884' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-size: contain; background-repeat: no-repeat;
}
.input, .select { width: 100%; height: 26px; padding: 0 9px; font-size: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.select.stage-select { width: 190px; }
.select.sort-select { width: 170px; }
.input::placeholder { color: var(--muted-2); }
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,56,79,.10); background: #fff; }
.btn {
  border: 0; border-radius: 8px; height: 38px; padding: 0 16px; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: background .15s, transform .08s;
}
.btn:hover:not(:disabled) { background: var(--primary-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
.filter-bar .btn { height: 26px; padding: 0 11px; font-size: 11.5px; border-radius: 7px; }
.chip-btn {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 0 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .12s, color .12s, border-color .12s; white-space: nowrap; height: 26px; display: inline-flex; align-items: center; gap: 4px;
}
.chip-btn:hover { background: #fff; border-color: var(--primary-2); }
.chip-btn.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-bar .chip-btn { height: 21px; padding: 0 9px; font-size: 11px; }
.filter-group { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.filter-group-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-right: 2px; }

/* ---- Panel ---- */
.main-row { display: flex; gap: 8px; flex: 1 1 auto; min-height: 0; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 320px; min-width: 0;
}
.panel-head { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-2); flex: 0 0 auto; }
.prop-list { padding: 6px; flex: 1 1 auto; min-height: 0; overflow: auto; }
.prop-list-foot { padding: 8px 12px 6px; font-size: 11px; color: var(--muted-2); }
.empty-state { padding: 40px 14px; text-align: center; color: var(--muted); font-size: 12.5px; }
.loading-state { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.loading-spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-caption { font-size: 12px; color: var(--muted); }
.error-state { padding: 20px 14px; color: var(--danger); font-size: 12.5px; }

/* ---- Today sidebar ---- */
.today-side { flex: 0 0 272px; width: 272px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; min-height: 0; }
.today-head { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.today-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 14px; color: var(--primary); }
.today-date { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.today-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 6px; }
.today-group { padding: 10px 8px 4px; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.appt { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 3px 10px; align-items: center; width: 100%; text-align: left; padding: 8px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; transition: background .12s, border-color .12s; }
.appt + .appt { border-top: 1px solid var(--line-soft); border-radius: 0 0 8px 8px; }
.appt:hover { background: var(--surface-2); border-color: var(--line); }
.appt-time { grid-row: span 2; font-size: 11px; font-weight: 800; color: #fff; background: var(--primary); text-align: center; padding: 3px 0; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.appt.is-past .appt-time { background: var(--muted-2); }
.appt.is-next .appt-time { background: var(--success); }
.appt.is-next { background: rgba(21,121,91,.06); border-color: #c5e0d2; }
.appt.is-later .appt-time { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); padding: 2px 0; }
.appt-addr { font-weight: 700; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-who { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-who b { color: var(--text); font-weight: 600; }
.appt-none { padding: 14px 10px; font-size: 12px; color: var(--muted); }
.today-foot { padding: 8px 14px; border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--muted-2); }

/* ---- Denied page ---- */
.denied { max-width: 520px; margin: 60px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow-md); }
.denied p { font-size: 14px; line-height: 1.5; }
.denied-sub { color: var(--muted); font-size: 12px; }

/* the right side stays down to 900 px wide (2026-11-05: "Everybody has right side"); phones get it on top (mobile.css) */
@media (max-width: 900px) { .today-side { display: none; } }
@media (max-width: 760px) { .app { height: auto; } .prop-list { overflow: visible; } }

/* ---- setters' call backs panel: a passed time not done yet is red (2026-10-14) ---- */
.appt.is-missed .appt-time { background: var(--danger); }
.appt.is-missed { background: var(--danger-bg); }

/* the setter's own day, on top of their Call backs panel (2026-10-14) */
.myday { margin: 10px 10px 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.myday-h { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.myday-row { display: grid; grid-template-columns: 70px 30px 1fr; align-items: baseline; gap: 6px; font-size: 12px; padding: 2px 0; }
.myday-row span { color: var(--muted); font-weight: 700; }
.myday-row b { font-size: 15px; font-weight: 800; color: var(--text); text-align: right; }
.myday-row em { font-style: normal; font-size: 11px; color: var(--muted); }
