/* Admin and caller console. Product palette: primary #3955D1, deep #263EA6, light #E2EDFD; Inter. */
:root {
  --p: #3955D1; --p-deep: #263EA6; --p-light: #E2EDFD; --ink: #101828; --text: #344054; --muted: #667085; --line: #E4E7EC;
  --bg: #F7F8FC; --ok: #067647; --ok-bg: #ECFDF3; --warn: #B54708; --warn-bg: #FFFAEB; --bad: #B42318; --bad-bg: #FEF3F2;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.45; }
:focus-visible { outline: 3px solid var(--p); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 99; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.top[hidden] { display: none; }
.logo { height: 22px; }
.app-name { font-weight: 600; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; }
nav#tabs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
nav#tabs a { padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
nav#tabs a:hover { background: var(--bg); }
nav#tabs a[aria-current="page"] { background: var(--p-light); color: var(--p-deep); font-weight: 600; }
.me { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 10px; }
main { max-width: 1280px; margin: 0 auto; padding: 24px; outline: none; }
h1 { font-size: 24px; letter-spacing: -.4px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 5px; }
input, select, textarea { font: inherit; width: 100%; border: 1px solid #D0D5DD; border-radius: 8px; padding: 8px 11px; background: #fff; min-height: 38px; color: var(--ink); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--p); }
textarea { min-height: 70px; }
.field { margin-bottom: 12px; } .field .err { color: var(--bad); font-size: 12px; margin-top: 3px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--p); color: #fff; } .btn.primary:hover { background: var(--p-deep); }
.btn.ghost { background: #fff; border-color: #D0D5DD; color: var(--text); } .btn.ghost:hover { border-color: var(--p); color: var(--p-deep); }
.btn.danger { background: #fff; border-color: #FDA29B; color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #FCFCFD; position: sticky; top: 0; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover { background: #F9FAFB; }
.tbl { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #F2F4F7; color: var(--text); white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); } .b-warn { background: var(--warn-bg); color: var(--warn); } .b-bad { background: var(--bad-bg); color: var(--bad); }
.b-p { background: var(--p-light); color: var(--p-deep); }
.muted { color: var(--muted); } .small { font-size: 12px; } .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; }
.stat { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); margin-bottom: 14px; }
.notice.ok { background: var(--ok-bg); color: var(--ok); } .notice.bad { background: var(--bad-bg); color: var(--bad); }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.daybtn { flex: 0 0 auto; min-width: 86px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; text-align: center; font: inherit; }
.daybtn b { display: block; font-size: 15px; } .daybtn span { font-size: 12px; color: var(--muted); }
.daybtn[aria-pressed="true"] { border-color: var(--p); background: var(--p-light); color: var(--p-deep); }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { border: 1px solid #B2C5F7; background: #fff; color: var(--p-deep); border-radius: 999px; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.slot:hover, .slot[aria-pressed="true"] { background: var(--p); color: #fff; border-color: var(--p); }
.seg { display: inline-flex; border: 1px solid #D0D5DD; border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--p); color: #fff; }
.drawer { position: fixed; inset: 0; background: rgba(16, 24, 40, .4); z-index: 50; display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.drawer-panel { width: min(720px, 100%); height: 100%; overflow: auto; background: #fff; padding: 22px 24px; box-shadow: -20px 0 40px rgba(16, 24, 40, .15); }
dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 0 0 16px; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; word-break: break-word; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #101828; color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
#toast.show { opacity: 1; }
.signin { max-width: 420px; margin: 12vh auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; text-align: left; }
.signin h1 { font-size: 30px; margin: 18px 0 6px; font-weight: 600; }
.hours-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; margin-bottom: 6px; }
iframe.mail { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
/* Team calendar */
fieldset.checks { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
fieldset.checks legend { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; padding: 0; width: 100%; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; cursor: pointer; }
.slot .who { display: block; font-size: 11px; font-weight: 500; opacity: .8; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.big { width: 12px; height: 12px; margin: 0; }
.typecard { text-align: left; font: inherit; cursor: pointer; display: block; width: 100%; color: inherit; }
.typecard:hover { border-color: var(--p); }
.typecard > * { margin-bottom: 6px; }
.inactive { opacity: .55; }
.conn { border-top: 1px solid var(--line); padding: 12px 0; }
.conn:first-of-type { border-top: 0; }
.link-code { background: var(--p-light); color: var(--p-deep); padding: 6px 10px; border-radius: 8px; font-size: 13px; word-break: break-all; }
.limits .lim-row { display: grid; grid-template-columns: 1fr 110px 110px; gap: 8px; align-items: center; margin-bottom: 6px; }
.seat select { max-width: 260px; }
.seats { margin-bottom: 8px; }
.seats .seat { margin-bottom: 6px; }
nav#tabs .count { background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; margin-left: 4px; }
nav#tabs .count:empty { display: none; }
.ms { margin-top: 4px; width: 300px; justify-content: center; }
.ms-logo { width: 16px; height: 16px; background: linear-gradient(90deg, #F25022 50%, #7FBA00 50%) top / 100% 50% no-repeat, linear-gradient(90deg, #00A4EF 50%, #FFB900 50%) bottom / 100% 50% no-repeat; }
/* Week grid */
.weekwrap { max-height: none; }
table.week { table-layout: fixed; min-width: 900px; }
table.week th.who { width: 150px; background: #fff; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); position: static; }
table.week th.who a { color: var(--ink); font-weight: 600; text-decoration: none; }
table.week td.daycell { padding: 8px 6px; }
table.week td.off { background: repeating-linear-gradient(45deg, #fff, #fff 6px, #F2F4F7 6px, #F2F4F7 12px); }
.bar { position: relative; height: 22px; background: #F2F4F7; border-radius: 6px; overflow: hidden; margin-bottom: 4px; }
.blk { position: absolute; top: 0; bottom: 0; display: block; }
.blk.work { background: #D1FADF; }
.blk.busy { background: #98A2B3; top: 5px; bottom: 5px; border-radius: 3px; }
.blk.booking { background: var(--p); top: 2px; bottom: 2px; border-radius: 4px; box-shadow: 0 0 0 1px #fff; }
a.blink { display: block; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.blink:hover { color: var(--p-deep); text-decoration: underline; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.legend .sw { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-left: 8px; }
.sw.work { background: #D1FADF; } .sw.busy { background: #98A2B3; } .sw.booking { background: var(--p); }
@media (max-width: 860px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } main { padding: 14px; } dl.kv { grid-template-columns: 1fr; } }
