:root { --brand: #8D1B3D; --bg: #f6f6f8; --surface: #fff; --surface-2: #f0eff3; --text: #1d1d24; --muted: #6b6b78; --border: #e3e2e8;
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --ai: #4f46e5; }
@media (prefers-color-scheme: dark) { :root { --bg: #121218; --surface: #1b1b24; --surface-2: #23232e; --text: #ececf2; --muted: #9a9aab; --border: #2f2f3c; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; }
button { font: inherit; cursor: pointer; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.login { width: 100%; max-width: 360px; }
.login h1 { margin: 0 0 4px; font-size: 20px; color: var(--brand); }
.field { display: block; margin: 12px 0; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; }
.btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.bad { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.wide { width: 100%; padding: 12px; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }
header.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
header.top .brand { font-weight: 800; color: var(--brand); margin-inline-end: auto; }
nav.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
nav.tabs a { white-space: nowrap; padding: 6px 12px; border-radius: 999px; color: var(--text); text-decoration: none; background: var(--surface-2); }
nav.tabs a.on { background: var(--brand); color: #fff; font-weight: 700; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 5px 12px; color: var(--text); }
.seg button.on { background: var(--brand); color: #fff; }
main { padding: 16px; max-width: 1200px; margin: 0 auto; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.kpi .n { font-size: 26px; font-weight: 800; }
.kpi .l { color: var(--muted); font-size: 12px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill.ai { background: rgba(79,70,229,.12); color: var(--ai); }
.pill.on { background: rgba(22,163,74,.14); color: var(--ok); }
.pill.off { background: rgba(220,38,38,.12); color: var(--bad); }
.pill.tsd { background: rgba(141,27,61,.12); color: var(--brand); }
.pill.tet { background: rgba(37,99,235,.12); color: #2563eb; }
h2 { font-size: 16px; margin: 18px 0 10px; }
.dept { margin-bottom: 18px; }
.person { cursor: pointer; }
.person .nm { font-weight: 700; }
.person .tt { color: var(--muted); font-size: 12px; }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
table.list th, table.list td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
table.list th { font-size: 12px; color: var(--muted); background: var(--surface-2); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input { flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.floor { display: grid; gap: 8px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.room { min-height: 96px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.room .rn { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.desk { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 8px; background: var(--surface-2); margin-bottom: 4px; cursor: pointer; font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.idle { background: #9ca3af; } .dot.working, .dot.reviewing, .dot.messaging { background: var(--ok); } .dot.in_meeting, .dot.on_call { background: var(--ai); }
.dot.waiting_approval { background: var(--warn); } .dot.blocked { background: var(--bad); } .dot.paused, .dot.on_break { background: #a3a3a3; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal { max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; }
.modal h3 { margin: 0 0 4px; }
ul.tight { margin: 4px 0 10px; padding-inline-start: 18px; }
.toast { position: fixed; bottom: 16px; inset-inline-start: 16px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 30; }
@media (max-width: 640px) { .floor { grid-template-columns: repeat(2, minmax(0, 1fr)); } table.list { font-size: 12px; } }

.bar{height:8px;border-radius:4px;background:var(--line,#e5e7eb);margin-top:8px;overflow:hidden}
.bar span{display:block;height:100%;background:var(--ok,#16a34a)}
.bar span.hi{background:var(--bad,#dc2626)}
.btn[disabled]{opacity:.5;cursor:not-allowed}
