:root{
  --bg:#12161a; --surf:#1b2126; --surf2:#232b31; --line:#2c353c;
  --text:#edeeec; --muted:#8b96a0; --amber:#e8ac3e; --teal:#3f7d6b;
  --red:#c9463a; --green:#4c9a6b;
}
:root[data-theme="light"]{
  --bg:#f4f2ee; --surf:#ffffff; --surf2:#f0eee9; --line:#ddd8cf;
  --text:#1a1c1e; --muted:#6b7178;
}
@media(prefers-color-scheme:light){
  :root:not([data-theme="dark"]):not([data-theme="light"]){
    --bg:#f4f2ee; --surf:#ffffff; --surf2:#f0eee9; --line:#ddd8cf; --text:#1a1c1e; --muted:#6b7178;
  }
}
.theme-toggle{margin-left:4px}
.chat-panel{display:flex;flex-direction:column;height:100%}
.chat-panel select{margin-bottom:8px}
.chat-list{flex:1;min-height:220px}
.chat-author{font-weight:700}
.chat-author.role-admin,.chat-author.role-coordinator{color:var(--amber)}
.chat-author.role-employee{color:var(--teal)}
.chat-stars{color:var(--amber);font-size:11px;margin-left:4px}
.cal-day.linked{cursor:pointer;text-decoration:none;display:flex}
.cal-day.linked:hover{outline:2px solid var(--amber)}
.event-item.flash-highlight{outline:2px solid var(--amber);border-radius:8px}
.ratings-table input[type=number]{width:60px}
.field.inline{display:flex;gap:8px;align-items:flex-end;margin-bottom:10px}
.field.inline .field{flex:1;margin-bottom:0}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.5 -apple-system,Segoe UI,Roboto,system-ui,sans-serif}
h1,h2,h3{margin:0 0 8px;font-weight:700;letter-spacing:-.01em}
a{color:var(--amber);text-decoration:none}
.wrap{max-width:1100px;margin:0 auto;padding:16px}
.topbar{position:sticky;top:0;z-index:5;background:var(--surf);border-bottom:1px solid var(--line);
  padding:12px 16px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.brand{font-weight:800;font-size:18px;color:var(--amber)}
.brand span{color:var(--text)}
.role-badge{margin-left:auto;font-size:12px;color:var(--muted)}
.btn{display:inline-block;background:var(--surf2);border:1px solid var(--line);border-radius:8px;padding:8px 12px;color:var(--text);cursor:pointer;font:inherit}
.btn:hover{border-color:var(--amber)}
.btn.primary{background:var(--amber);color:#1a1408;border:none;font-weight:700}
.btn.ghost{background:transparent}
.btn.danger{background:transparent;border:1px solid var(--red);color:var(--red)}
.card{background:var(--surf);border:1px solid var(--line);border-radius:12px;padding:18px;margin-bottom:14px}
.flash{border-color:var(--amber)}
.field{margin-bottom:12px}
.field label{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}
.field input,.field select,.field textarea{width:100%;background:var(--surf2);border:1px solid var(--line);border-radius:8px;padding:10px;color:var(--text);font:inherit}
.grid{display:grid;gap:12px}
.grid.cols-2{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.grid.cols-3{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.stars{color:var(--amber);letter-spacing:1px}
.tag{display:inline-block;font-size:11px;padding:2px 8px;border-radius:100px;border:1px solid var(--line);color:var(--muted)}
.tag.ok{color:var(--green);border-color:var(--green)}
.tag.bad{color:var(--red);border-color:var(--red)}
.tag.wait{color:var(--amber);border-color:var(--amber)}
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{text-align:left;padding:8px 6px;border-bottom:1px solid var(--line)}
th{color:var(--muted);font-weight:600;font-size:12px}
.scrollx{overflow-x:auto}
.tabs{display:flex;gap:4px;overflow-x:auto;border-bottom:1px solid var(--line);margin-bottom:16px}
.tab{padding:10px 14px;border-bottom:2px solid transparent;color:var(--muted);white-space:nowrap}
.tab.active{color:var(--text);border-color:var(--amber)}
.event-item{border-bottom:1px solid var(--line);padding:12px 0;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.event-item:last-child{border:none}
.small{font-size:12px;color:var(--muted)}
.cal{max-width:420px}
.cal-head{margin-bottom:8px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.cal-nav{padding:4px 12px;font-weight:700}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}
.cal-dow{font-size:11px;color:var(--muted);padding:4px 0}
.cal-day{aspect-ratio:1;display:flex;align-items:center;justify-content:center;border-radius:8px;background:var(--surf2);border:1px solid transparent;font-size:13px}
.cal-day.pad{background:transparent}
.cal-day.today{border-color:var(--muted)}
.cal-day.marked{background:var(--amber);color:#1a1408;font-weight:700}
.cal-day.marked.past{background:var(--teal);color:#08130f}
.cal-legend{display:flex;gap:14px;margin-top:6px;font-size:12px;color:var(--muted)}
.dot{width:10px;height:10px;border-radius:3px;display:inline-block}
.dot-amber{background:var(--amber)} .dot-teal{background:var(--teal)}
.chat-list{max-height:280px;overflow-y:auto;background:var(--surf2);border:1px solid var(--line);border-radius:10px;padding:10px;margin-bottom:8px}
.msg{margin-bottom:8px;font-size:14px}
.msg b{color:var(--amber)}
.checklist label{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.auth{min-height:80vh;display:flex;align-items:center;justify-content:center;padding:24px}
.auth .card{max-width:420px;width:100%}
.oauth-row{display:flex;gap:8px;margin:10px 0}
.oauth-row .btn{flex:1;text-align:center}
.divider{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;margin:12px 0}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--line)}
