/* ORBIT — styled to the Devoteam Brand Guidelines 2026 ("Building Agents of Change").
   Layout: Deep Night navigation rail + Daylight work surface with white 15px cards.
   Primary: Red Poppy (actions/highlights only), Black #3C3C3A (text), White.
   Secondary (surfaces, never text): Poppy Light, Poppy Lighter, Light Grey, Steel Blue, Deep Night (web).
   Accents (colour-coding/data only, never fills or text): Gold, Jade, Deep Blue — order Poppy, Gold, Jade, Deep Blue.
   Type: Montserrat. Light titles with a Medium highlight, line-height 1.1, letter-spacing −2%. */
:root {
  /* primary */
  --poppy: #f8485e;
  --black: #3c3c3a;
  --white: #ffffff;
  /* secondary */
  --poppy-light: #fca2ae;
  --poppy-lighter: #fddade;
  --light-grey: #efeeee;
  --steel: #c9d5e1;
  --night: #130a1e;
  /* accents (data / colour-coding) */
  --gold: #e6b04b;
  --jade: #2f9a80;
  --deep-blue: #0f4a6e;
  /* derived neutrals: tints of brand Black, chosen deliberately */
  --ink: var(--black);
  --muted: #6f6e6b;
  --line: #e4e2e2;
  --line-2: #f0efef;
  --bg: #f4f3f5;
  --card: var(--white);
  --focus: var(--poppy);
  --radius-card: 15px;
  --radius-btn: 12px;
  --radius-field: 10px;
  --shadow: 0 4px 18px rgba(19, 10, 30, 0.06), 0 1px 2px rgba(19, 10, 30, 0.04);
  --font: "Montserrat", "Aptos", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: var(--font); }
/* Hyperlinks: Red Poppy, underlined, heavier than the surrounding copy */
a { color: var(--poppy); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
a:hover { text-decoration-thickness: 2px; }
h1 { font-size: 30px; font-weight: 300; line-height: 1.1; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 .em, .em { font-weight: 500; }
h2 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -0.005em; }
h3.sub { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin: 20px 0 8px; }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--poppy); margin: 0 0 8px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--light-grey); padding: 1px 4px; border-radius: 4px; word-break: break-all; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
strong { font-weight: 600; }

/* ---------- brand lockup (official logo files go in src/ui/brand) ---------- */
.lockup { display: flex; align-items: center; gap: 12px; }
.lockup-logo { height: 26px; width: auto; display: block; }
.lockup-sep { width: 1px; align-self: stretch; margin: 2px 0; background: currentColor; opacity: .35; }
.lockup-name { font-weight: 500; letter-spacing: .02em; font-size: 15px; }
.lockup-orbit { height: 22px; width: auto; display: block; }
.lockup-sm .lockup-logo { height: 22px; } .lockup-sm .lockup-orbit { height: 18px; } .lockup-sm { gap: 9px; }
.lockup-white { color: var(--white); }
.lockup-primary { color: var(--ink); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--night) 248px, var(--bg) 248px); }
.sidebar { background: var(--night); color: rgba(255, 255, 255, .78); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 24px 22px 18px; }
.nav { padding: 6px 12px; flex: 1; }
.nav-group { margin-bottom: 16px; }
.nav-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .5); padding: 6px 12px; }
.nav-item { display: flex; justify-content: space-between; align-items: center; color: rgba(255, 255, 255, .8); padding: 8px 12px; border-radius: 10px; font-weight: 400; text-decoration: none; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: var(--white); text-decoration: none; }
.nav-item.active { background: rgba(255, 255, 255, .1); color: var(--white); font-weight: 600; box-shadow: inset 3px 0 0 var(--poppy); }
.nav-badge { background: var(--poppy); color: var(--white); border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.who-name { color: var(--white); font-weight: 600; }
.who-role { font-size: 12px; color: rgba(255, 255, 255, .6); }
.sidebar .btn { background: rgba(255, 255, 255, .12); color: var(--white); border: 1px solid rgba(255, 255, 255, .2); align-self: flex-start; box-shadow: none; text-decoration: none; }
.sidebar .btn:hover:not(:disabled) { background: rgba(255, 255, 255, .2); }
.main { min-width: 0; background: linear-gradient(180deg, #ffffff 0, #fdf0f2 220px, var(--bg) 560px) no-repeat; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 32px; min-height: 46px; justify-content: flex-end; }
.menu-btn { display: none; margin-right: auto; }
.page { padding: 12px 32px 56px; max-width: 1440px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 8px 0 0; font-weight: 300; font-size: 15px; max-width: 75ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- cards & layout ---------- */
.card { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 24px; margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card, .grid-2 + .grid-2 { margin-top: 18px; }
.grid-2.tight { gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.row { display: flex; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.align-end { align-items: flex-end; }
.gap { gap: 16px; } .gap-s { gap: 8px; }
.stack-s { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; } .tiny { font-size: 11px; }
.strong { font-weight: 600; }
.text-bad { color: var(--poppy); font-weight: 500; }
.pre { white-space: pre-wrap; }
.mr { margin-right: 10px; }
.list { margin: 0; padding-left: 18px; line-height: 1.9; }
.list li::marker { color: var(--poppy); }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 9px 14px; margin: 0; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; min-width: 0; }
.empty { padding: 32px; text-align: center; color: var(--muted); font-weight: 300; }
.loading { padding: 32px; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--poppy); margin-right: 8px; vertical-align: middle; }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border-radius: var(--radius-card); padding: 18px 20px; color: var(--ink); box-shadow: var(--shadow); text-decoration: none; font-weight: 400; border: 1px solid transparent; }
.stat:hover { border-color: var(--poppy-light); text-decoration: none; }
.stat-num { font-size: 34px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.stat-bad .stat-num { color: var(--poppy); font-weight: 500; }
.balances { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-end; }
.balances.card { padding: 18px 24px; }
.balance-num { font-size: 30px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.balance-note { margin-left: auto; max-width: 380px; }

/* ---------- buttons: solid only, 12px corners, SemiBold ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--light-grey); color: var(--ink); border-radius: var(--radius-btn); padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, box-shadow .15s; }
.btn:hover:not(:disabled) { background: #e4e2e2; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--poppy); color: var(--white); box-shadow: 0 6px 16px rgba(248, 72, 94, .22); }
.btn-primary:hover:not(:disabled) { background: #ef3b52; }
.btn-danger { background: var(--black); color: var(--white); }
.btn-danger:hover:not(:disabled) { background: #2b2b2a; }
.btn-ghost { background: transparent; color: var(--poppy); padding-left: 6px; padding-right: 6px; text-decoration: underline; text-underline-offset: 2px; }
.btn-ghost:hover:not(:disabled) { background: transparent; text-decoration-thickness: 2px; }
.btn-s { padding: 6px 11px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; padding: 13px; }
.icon-btn { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--ink); line-height: 1; padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { background: var(--light-grey); }

/* ---------- form controls ---------- */
input, select, textarea { font: inherit; color: var(--ink); border: 1px solid var(--steel); border-radius: var(--radius-field); padding: 8px 11px; background: var(--white); min-width: 0; }
textarea { min-height: 76px; resize: vertical; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--poppy); box-shadow: 0 0 0 3px var(--poppy-lighter); }
input[type="checkbox"] { accent-color: var(--poppy); width: 16px; height: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > input, .field > select, .field > textarea, .field > .picker { width: 100%; }
.field-label { font-weight: 600; font-size: 13px; }
.req { color: var(--poppy); }
.field-hint { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--poppy); font-weight: 500; }
.check { display: inline-flex; align-items: center; gap: 8px; margin: 6px 16px 8px 0; cursor: pointer; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters input:not([type]), .filters input[type="text"] { min-width: 230px; }

/* ---------- labels: outline pills, upper and lower case, never clickable ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 10px 2px 8px; border-radius: 100px; white-space: nowrap; border: 1.5px solid var(--steel); color: var(--ink); background: var(--white); line-height: 1.5; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--steel); flex: none; }
.badge-ok { border-color: var(--jade); } .badge-ok::before { background: var(--jade); }
.badge-info { border-color: var(--deep-blue); } .badge-info::before { background: var(--deep-blue); }
.badge-warn { border-color: var(--gold); } .badge-warn::before { background: var(--gold); }
.badge-bad { border-color: var(--poppy); background: var(--poppy-lighter); } .badge-bad::before { background: var(--poppy); }
.badge-neutral { border-color: var(--steel); } .badge-neutral::before { background: #9aa9b8; }
.badge + .badge { margin-left: 4px; }

/* ---------- alerts (surfaces from the secondary palette, text always Black) ---------- */
.alert { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; line-height: 1.55; border-left: 4px solid; color: var(--ink); }
.alert-info { background: rgba(201, 213, 225, .45); border-color: var(--deep-blue); }
.alert-warn { background: var(--light-grey); border-color: var(--gold); }
.alert-bad { background: var(--poppy-lighter); border-color: var(--poppy); }
.alert-ok { background: var(--light-grey); border-color: var(--jade); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 10px 14px; font: inherit; font-weight: 400; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--poppy); }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 12px; }
.pager .muted { margin-right: auto; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); font-weight: 700; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #fdf3f4; }
.table tr.excluded td { background: #faf9f9; color: var(--muted); }
.sched td { vertical-align: middle; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(19, 10, 30, .5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--white); border-radius: var(--radius-card); width: 100%; max-width: 580px; box-shadow: 0 24px 60px rgba(19, 10, 30, .28); }
.modal-wide { max-width: 1100px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; font-weight: 400; letter-spacing: -0.01em; }
.modal-body { padding: 20px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); background: #faf9f9; border-radius: 0 0 var(--radius-card) var(--radius-card); }
.modal-body .card { margin-top: 12px; box-shadow: none; background: var(--light-grey); }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 80; max-width: 440px; }
.toast { padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 28px rgba(19, 10, 30, .18); background: var(--white); border-left: 4px solid; color: var(--ink); }
.toast-ok { border-color: var(--jade); } .toast-err { border-color: var(--poppy); } .toast-warn { border-color: var(--gold); }
.preview { background: var(--light-grey); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.preview .alert { margin: 0; background: var(--white); }

/* ---------- employee picker ---------- */
.picker { position: relative; }
.picker input { width: 100%; }
.picker-menu { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); background: var(--white); border-radius: 12px; box-shadow: 0 12px 32px rgba(19, 10, 30, .16); max-height: 260px; overflow-y: auto; padding: 4px; }
.picker-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: var(--white); padding: 8px 12px; text-align: left; font: inherit; cursor: pointer; border-radius: 8px; }
.picker-item:hover { background: var(--poppy-lighter); }
.picker-table td { vertical-align: middle; }
.picker-table td:first-child { min-width: 220px; }

/* ---------- assignment matrix ---------- */
.line { border-radius: 12px; padding: 14px; margin-bottom: 14px; background: #faf9f9; border: 1px solid var(--line); }
.matrix th, .matrix td { min-width: 130px; }
.matrix td:first-child, .matrix th:first-child { min-width: 50px; }
.cell { width: 100%; text-align: left; border: 1px solid var(--steel); background: var(--white); border-radius: 10px; padding: 7px 9px; font: inherit; cursor: pointer; min-height: 36px; color: var(--ink); }
.cell:hover { border-color: var(--poppy); }
.cell-empty { border-style: dashed; color: var(--poppy); font-weight: 500; }
.cell-override { background: rgba(201, 213, 225, .4); }
.cell-warn { border: 1.5px solid var(--gold); }
.cell-crit { border: 1.5px solid var(--poppy); background: var(--poppy-lighter); }
.sr-flag { font-weight: 700; font-size: 11px; }

/* ---------- Gantt (data colours: Poppy, Gold, Jade, Deep Blue) ---------- */
.gantt-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 12px; }
.gantt-title { font-size: 17px; font-weight: 500; margin-right: auto; letter-spacing: -0.01em; }
.seg { display: inline-flex; border-radius: 12px; overflow: hidden; background: var(--light-grey); padding: 3px; gap: 2px; }
.seg-btn { border: 0; background: transparent; padding: 6px 14px; font: inherit; font-weight: 500; cursor: pointer; color: var(--ink); border-radius: 9px; }
.seg-btn.active { background: var(--white); font-weight: 600; box-shadow: 0 1px 3px rgba(19, 10, 30, .12); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink); margin-bottom: 12px; }
.lg { display: inline-block; width: 18px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 6px; }
.lg-book { background: var(--poppy); }
.lg-sub { background: repeating-linear-gradient(45deg, #fff, #fff 3px, var(--poppy-lighter) 3px, var(--poppy-lighter) 6px); border: 1px solid var(--poppy); }
.lg-leave { background: repeating-linear-gradient(135deg, var(--poppy-light), var(--poppy-light) 3px, var(--poppy-lighter) 3px, var(--poppy-lighter) 6px); }
.lg-pleave { background: var(--white); border: 1.5px dashed var(--gold); }
.gantt-card { padding: 0; overflow-x: auto; }
.gantt { min-width: 880px; }
.g-row { display: grid; grid-template-columns: 230px 1fr; border-bottom: 1px solid var(--line-2); min-height: 56px; }
.g-head { position: sticky; top: 0; background: var(--white); z-index: 2; border-bottom: 1px solid var(--line); min-height: 36px; border-radius: var(--radius-card) var(--radius-card) 0 0; }
.g-name { padding: 9px 14px; border-right: 1px solid var(--line); min-width: 0; }
.g-head .g-name { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.g-track { position: relative; }
.g-tick { position: absolute; top: 10px; font-size: 11px; color: var(--muted); padding-left: 5px; white-space: nowrap; }
.g-tick.we { color: var(--muted); font-style: italic; }
.g-tick.today { color: var(--poppy); font-weight: 700; font-style: normal; }
.g-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line-2); }
.g-grid.we { background: rgba(201, 213, 225, .18); }
.g-grid.today { border-left: 2px solid var(--poppy); }
.g-group { background: var(--light-grey); padding: 7px 14px; font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.g-bar { position: absolute; top: 6px; height: 24px; border-radius: 7px; color: var(--white); font-size: 12px; font-weight: 600; padding: 0 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border: 1px solid; cursor: pointer; text-align: left; font-family: inherit; z-index: 1; }
.g-bar:hover { box-shadow: 0 4px 12px rgba(19, 10, 30, .22); }
.g-bar.sub { background: repeating-linear-gradient(45deg, #fff, #fff 4px, #f7f6f6 4px, #f7f6f6 8px); }
.g-leave { position: absolute; top: 33px; bottom: 5px; border-radius: 6px; background: repeating-linear-gradient(135deg, var(--poppy-light), var(--poppy-light) 5px, var(--poppy-lighter) 5px, var(--poppy-lighter) 10px); font-size: 11px; color: var(--ink); font-weight: 600; overflow: hidden; white-space: nowrap; padding: 0 7px; display: flex; align-items: center; }
.g-leave.pending { background: var(--white); border: 1.5px dashed var(--gold); }
.g-leave span { line-height: 1; background: rgba(255, 255, 255, .75); padding: 1px 4px; border-radius: 4px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }
.login-hero { background: linear-gradient(160deg, #071b2e 0%, #0e4d6e 100%); color: var(--white); padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-width: 0; }
.login-hero-copy { max-width: 560px; }
.tagline { font-size: 56px; font-weight: 300; line-height: 1.1; letter-spacing: -0.02em; color: var(--poppy); margin: 0 0 24px; text-wrap: balance; }
.login-hero-sub { font-size: 18px; font-weight: 300; line-height: 1.5; margin: 0; color: rgba(255, 255, 255, .9); max-width: 34ch; }
.login-hero-sub strong { font-weight: 500; color: var(--white); }
.login-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.login-facts li { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .28); border-radius: 15px; padding: 10px 14px; font-size: 13px; font-weight: 300; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.login-facts strong { font-weight: 600; color: var(--white); }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: linear-gradient(180deg, #ffffff 0%, #fdf0f2 50%, #f4f3f5 100%); min-width: 0; }
.login-card { background: var(--white); border-radius: var(--radius-card); padding: 32px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(19, 10, 30, .08); }
.login-title { font-size: 32px; margin-bottom: 8px; }
.login-card > p.muted { margin: 0 0 20px; font-weight: 300; font-size: 15px; }
.dev-login { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.dev-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--poppy); font-weight: 700; margin-bottom: 10px; }
.dev-list { display: flex; flex-direction: column; gap: 6px; max-height: 380px; overflow-y: auto; }
.dev-user { display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 9px 14px; cursor: pointer; font: inherit; color: var(--ink); }
.dev-user:hover { border-color: var(--poppy-light); background: #fdf3f4; }
.dev-name { font-weight: 600; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .sidebar { position: fixed; z-index: 70; width: 268px; transform: translateX(-100%); transition: transform .2s; }
  .menu-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(19, 10, 30, .35); }
  .menu-btn { display: inline-block; }
  .page { padding: 8px 16px 40px; }
  .topbar { padding: 8px 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 120px 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 28px 20px; gap: 24px; }
  .tagline { font-size: 38px; }
  .card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- ORBIT logo set ---------- */
.topbar-logo { display: none; margin-right: auto; color: var(--ink); }
.home-banner { border-radius: var(--radius-card); overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow); background: #ebecef; }
.home-banner img { display: block; width: 100%; height: clamp(120px, 15vw, 200px); object-fit: cover; object-position: center 45%; }
.login-hero { justify-content: center; background: radial-gradient(120% 80% at 85% 10%, #2b2233 0%, transparent 60%), var(--night); }
.login-banner { width: 100%; max-width: 620px; height: auto; border-radius: var(--radius-card); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); display: block; }
.signoff { margin: 0; font-weight: 700; font-size: 15px; color: var(--poppy); letter-spacing: -0.01em; }
.login-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 0 22px; }
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(180deg, #ffffff 0%, #fdf0f2 50%, #f4f3f5 100%); }
.splash img { border-radius: var(--radius-card); box-shadow: var(--shadow); max-width: 60vw; height: auto; }
.not-found { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 40px; }
.not-found img { border-radius: var(--radius-card); box-shadow: var(--shadow); max-width: 100%; height: auto; }
.not-found .btn { color: var(--white); }
@media (max-width: 900px) {
  .topbar { justify-content: space-between; }
  .topbar-logo { display: block; }
  .topbar .muted { display: none; }
  .menu-btn { order: 2; margin-right: 0; }
}
.login-devoteam { height: 34px; width: auto; display: block; align-self: flex-start; }
.login-card-devoteam { height: 24px; width: auto; display: block; margin: 0 0 18px; }
.row-link { color: var(--poppy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
tr.clickable:hover .row-link { text-decoration-thickness: 2px; }
a.btn-primary, a.btn-primary:hover { color: var(--white); text-decoration: none; }

/* ── Combobox (searchable select with optional free text) ───────────────────── */
.combo { position: relative; width: 100%; }
.combo > input { width: 100%; padding-right: 36px; cursor: text; }
.combo > input.has-value { font-weight: 600; color: var(--ink); }
.combo > input::placeholder { color: var(--muted); opacity: 1; }
.combo.open > input::placeholder { color: var(--ink); opacity: 0.55; font-weight: 500; }
.combo-chevron { position: absolute; right: 13px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; transition: transform 0.15s; }
.combo.open .combo-chevron { transform: rotate(-135deg); margin-top: -1px; border-color: var(--poppy); }
.combo-clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--light-grey); color: var(--black); font-size: 15px; line-height: 1; cursor: pointer; }
.combo-clear:hover { background: var(--poppy-lighter); color: var(--poppy); }
.combo-menu { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); max-height: 280px; overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-btn); box-shadow: 0 12px 32px rgba(19, 10, 30, 0.14); padding: 6px; }
.combo-item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; border-left: 3px solid transparent; }
.combo-item.active { background: #fdf3f4; border-left-color: var(--poppy); }
.combo-item.selected .combo-label { font-weight: 700; }
.combo-item.selected::after { content: "✓"; color: var(--poppy); font-weight: 700; margin-left: 6px; }
.combo-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-sub { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; flex-shrink: 0; }
.combo-create { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 10px; color: var(--poppy); font-weight: 600; justify-content: flex-start; }
.combo-plus { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--poppy-lighter); color: var(--poppy); font-weight: 700; margin-right: 8px; }
.combo-empty { padding: 10px; color: var(--muted); font-size: 13px; }
.combo-hint { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.combo-hint::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.combo-hint.linked::before { background: var(--jade); }
tr.row-blocked td { color: var(--muted); background: var(--line-2); }
.combo-create { flex-direction: column; align-items: flex-start; gap: 2px; }
.combo-create .combo-sub { font-weight: 500; letter-spacing: 0; padding-left: 28px; }

/* ── Shared small pieces ───────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 1px 9px; border-radius: 100px; border: 1.5px solid var(--steel); color: var(--ink); background: var(--white); white-space: nowrap; line-height: 1.6; }
.pill-poppy { border-color: var(--poppy); color: var(--poppy); }
.pill-dark { border-color: var(--night); background: var(--night); color: var(--white); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--poppy-lighter); color: var(--black); font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 100px; background: var(--light-grey); font-size: 13px; font-weight: 500; }
.avatar-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); font-weight: 700; cursor: pointer; text-align: left; }
.linkish:hover { color: var(--poppy); text-decoration: underline; text-underline-offset: 2px; }
.seg { display: inline-flex; background: var(--light-grey); border-radius: var(--radius-btn); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(19,10,30,.1); }

/* ── Day off ───────────────────────────────────────────────────────────────── */
.dayoff-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.dayoff-search { flex: 1 1 220px; max-width: 340px; }
.dayoff-today { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: #fdf3f4; border-left: 3px solid var(--poppy); }
.dayoff-days { display: flex; flex-direction: column; }
.dayoff-day { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-2); align-items: start; }
.dayoff-day.is-today .dayoff-date span:first-child { color: var(--poppy); }
.dayoff-date { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-weight: 600; padding-top: 6px; }
.dayoff-people { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; align-items: center; }
.dayoff-person { display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.dayoff-person > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.3; }
.dayoff-name { font-weight: 600; }
.dayoff-holiday { font-weight: 600; color: var(--deep-blue); }
.dayoff-day.is-holiday { background: linear-gradient(90deg, rgba(201,213,225,.25), transparent); }
@media (max-width: 640px) { .dayoff-day { grid-template-columns: 1fr; gap: 6px; } .dayoff-date { flex-direction: row; align-items: center; padding-top: 0; } }

/* ── Org chart (indented tree with connectors) ─────────────────────────────── */
.org-scroll { overflow-x: auto; padding-bottom: 6px; }
.org-count { margin-left: auto; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree ul { margin-left: 22px; padding-left: 22px; border-left: 2px solid var(--line); }
.org-tree li { position: relative; padding-top: 10px; }
.org-tree ul > li::before { content: ""; position: absolute; left: -22px; top: 33px; width: 20px; border-top: 2px solid var(--line); }
.org-tree ul > li:last-child::after { content: ""; position: absolute; left: -24px; top: 35px; bottom: 0; border-left: 2px solid var(--white); }
.org-node { display: flex; align-items: center; gap: 12px; width: 380px; max-width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 0 1px 2px rgba(19,10,30,.04); }
.org-node.is-me { border-color: var(--poppy); box-shadow: 0 0 0 3px var(--poppy-lighter); }
.org-node.is-match { background: #fdf3f4; border-color: var(--poppy-light); }
.org-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.org-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.org-toggle { flex: none; border: 1px solid var(--line); background: var(--light-grey); border-radius: 100px; font: inherit; font-size: 12px; font-weight: 700; padding: 3px 10px; cursor: pointer; color: var(--ink); }
.org-toggle:hover { border-color: var(--poppy); color: var(--poppy); }
@media (max-width: 640px) { .org-node { width: 100%; min-width: 230px; } .org-tree ul { margin-left: 12px; padding-left: 14px; } .org-tree ul > li::before { left: -14px; width: 12px; } .org-tree ul > li:last-child::after { left: -16px; } }

/* ── Org chart: classic top-down chart, teams spread sideways ─────────────── */
.oc-scroll { overflow: auto; max-height: calc(100vh - 260px); min-height: 360px; padding: 8px 8px 24px; cursor: grab; border-radius: 12px; background:
  radial-gradient(circle, var(--line) 1px, transparent 1.2px) 0 0 / 18px 18px; touch-action: pan-x pan-y; }
.oc-scroll:active { cursor: grabbing; }
.oc-zoom { width: max-content; min-width: 100%; }
.oc-tree, .oc-tree ul { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0; }
.oc-tree ul { position: relative; padding-top: 26px; }
.oc-tree li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 26px 7px 0; }
.oc-tree > li { padding-top: 6px; }
/* horizontal rail + drop to each child */
.oc-tree li::before, .oc-tree li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 26px; border-top: 2px solid var(--steel); }
.oc-tree li::after { right: auto; left: 50%; border-left: 2px solid var(--steel); }
.oc-tree li:only-child::before, .oc-tree li:only-child::after { display: none; }
.oc-tree li:only-child { padding-top: 0; }
.oc-tree li:first-child::before, .oc-tree li:last-child::after { border: 0 none; }
.oc-tree li:last-child::before { border-right: 2px solid var(--steel); border-radius: 0 10px 0 0; }
.oc-tree li:first-child::after { border-radius: 10px 0 0 0; }
.oc-tree > li::before, .oc-tree > li::after { display: none; }
/* drop from a manager to the rail */
.oc-tree li > ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 26px; border-left: 2px solid var(--steel); }
.oc-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; width: 182px; padding: 14px 10px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 6px rgba(19,10,30,.05); cursor: default; }
.oc-card .avatar { width: 40px; height: 40px; font-size: 13px; margin-bottom: 4px; }
.oc-card.is-manager { border-top: 3px solid var(--poppy); }
.oc-card.is-me { border-color: var(--poppy); box-shadow: 0 0 0 3px var(--poppy-lighter); }
.oc-card.is-match { background: #fdf3f4; border-color: var(--poppy-light); }
.oc-name { font-weight: 700; font-size: 14px; line-height: 1.25; text-align: center; }
button.oc-name { text-align: center; }
.oc-role { font-size: 12px; line-height: 1.3; }
.oc-card .org-meta { justify-content: center; }
.oc-toggle { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); z-index: 1; border: 1.5px solid var(--steel); background: var(--white); border-radius: 100px; font: inherit; font-size: 11.5px; font-weight: 700; padding: 1px 10px; cursor: pointer; color: var(--ink); white-space: nowrap; }
.oc-toggle:hover { border-color: var(--poppy); color: var(--poppy); }
.dayoff-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .dayoff-layout { grid-template-columns: 1fr; } }
.holiday-list { list-style: none; margin: 0 0 10px; padding: 0; }
.holiday-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.holiday-list li:first-child { border-top: 0; }
.holiday-list .holiday-date { grid-column: 1 / -1; }
.holiday-list .pill { align-self: start; }
.pill-blue { border-color: var(--deep-blue); color: var(--deep-blue); }
.pill-gold { border-color: var(--gold); color: #8a6417; }
.dayoff-holiday { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.tiny { font-size: 11.5px; }
/* a team without sub-teams is stacked under its manager to keep the chart readable */
.oc-tree ul.oc-stack { flex-direction: column; align-items: center; gap: 10px; padding-top: 26px; }
.oc-tree ul.oc-stack > li { padding: 0; }
.oc-tree ul.oc-stack > li::before, .oc-tree ul.oc-stack > li::after { display: none; }
.oc-tree li > ul.oc-stack::before { height: auto; bottom: 40px; }
.oc-card { z-index: 1; }
