/* DPEG IT Helpdesk — styles from the approved prototype (design-reference/). */
:root {
  --dark: #1D4A33; --primary: #2E7D4F; --soft: #E7F3EA; --nav: #2F6B45;
  --ink: #1B1F24; --ink-2: #2C333D; --muted: #4A5361; --line: #E2E5EA; --line-2: #C9CED6; --line-3: #EEF0F3;
  --bg: #F4F5F7; --white: #FFFFFF; --danger: #B42318; --danger-ink: #A11A12; --purple: #5B2C91;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg-bg); color: var(--fg-ink); font-size: 14px; line-height: 1.45; }
a { color: var(--fg-primary); } a:hover { color: var(--fg-dark); }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
input, textarea, select { font: inherit; color: inherit; }
button:focus-visible, textarea:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--bd-7fbf94); outline-offset: 2px; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.muted { color: var(--fg-muted); }
.small { font-size: 12px; } .s13 { font-size: 13px; }
[hidden] { display: none !important; }

/* Header */
.app-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: var(--bg-dark); color: var(--fg-ffffff); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--bg-ffffff); color: var(--fg-dark); display: flex; align-items: center; justify-content: center; }
.brand-name { font-weight: 700; font-size: 16px; }
.brand-who { font-size: 12px; color: var(--fg-cfe5d6); }

/* Name button + menu (Admin settings, Sign out). Top right of the header,
   or at the bottom of the side bar in the workspace (see further down). */
.rail { display: contents; }
.account { position: relative; }
.account:empty { display: none; }
.acct-btn { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 4px; border: 0; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--fg-ffffff); font-size: 13px; font-weight: 600; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { background: rgba(255,255,255,.2); }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-7fd39a); color: var(--fg-dark); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.acct-menu { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: 280px; padding: 6px; border: 1px solid var(--bd-line); border-radius: 12px; background: var(--bg-ffffff); color: var(--fg-ink); box-shadow: 0 12px 32px rgba(16,40,26,.18); }
.acct-who { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--bd-line-3); }
.acct-who-text { display: flex; flex-direction: column; min-width: 0; font-size: 12px; color: var(--fg-muted); }
.acct-who-text strong { font-size: 14px; color: var(--fg-ink); }
.acct-who-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-roles { color: var(--fg-primary); font-weight: 600; }
.acct-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--fg-ink); font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; }
.acct-item:hover, .acct-item:focus-visible { background: var(--bg-soft); color: var(--fg-dark); }
.acct-item svg { color: var(--fg-muted); }
@media (max-width: 560px) { .acct-name { display: none; } .acct-btn { padding: 4px; } }
.view-nav { display: flex; flex-wrap: wrap; gap: 4px; border-radius: 22px; background: var(--bg-nav); padding: 3px; }
.view-nav a, .view-nav span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; color: var(--fg-ffffff); text-decoration: none; font-size: 13px; font-weight: 500; }
.view-nav [aria-current="page"] { background: var(--bg-ffffff); color: var(--fg-dark); font-weight: 600; }

/* Test-login bar (test site and your Mac only) */
.dev-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 24px; background: var(--bg-fff6d6); border-bottom: 1px solid var(--bd-ead58a); color: var(--fg-4d3a00); font-size: 13px; }
.dev-bar strong { font-weight: 700; }
.dev-bar button { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--bd-b8a04a); background: var(--bg-ffffff); color: var(--fg-4d3a00); font-size: 12px; font-weight: 600; }
.dev-bar button[aria-pressed="true"] { background: var(--bg-4d3a00); color: var(--fg-ffffff); border-color: var(--bd-4d3a00); }

main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 16px; }

/* Buttons */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; font-weight: 600; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-ink); }
.btn-primary { background: var(--bg-primary); border-color: var(--bd-primary); color: var(--fg-ffffff); }
.btn-primary:hover { background: var(--bg-dark); border-color: var(--bd-dark); }
.btn-danger { background: var(--bg-danger); border-color: var(--bd-danger); color: var(--fg-ffffff); }
.btn-outline-green { border-color: var(--bd-1e6b3a); color: var(--fg-1e6b3a); }
.btn-outline-red { border-color: var(--bd-danger-ink); color: var(--fg-danger-ink); font-weight: 700; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; font-weight: 700; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-ink); }
.chip[aria-pressed="true"], .seg[aria-pressed="true"] { background: var(--bg-dark); border-color: var(--bd-dark); color: var(--fg-ffffff); }
.seg { flex: 1 1 auto; min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-ink); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-ink); text-decoration: none; }
.tab[aria-selected="true"] { background: var(--bg-dark); border-color: var(--bd-dark); color: var(--fg-ffffff); }
.tab .count { display: inline-flex; min-width: 20px; justify-content: center; padding: 1px 6px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg-primary); color: var(--fg-ffffff); }
.tab[aria-selected="true"] .count { background: var(--bg-ffffff); color: var(--fg-dark); }

/* Pills */
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.p-Critical { background: var(--bg-fdecea); color: var(--fg-a11a12); } .p-High { background: var(--bg-fff1e0); color: var(--fg-8a4300); }
.p-Normal { background: var(--bg-e7f3ea); color: var(--fg-1a4f91); } .p-Low { background: var(--bg-eef0f3); color: var(--fg-46505c); }
.p-Request { background: var(--bg-f4f5f7); color: var(--fg-2c333d); }
.p-Safety { background: var(--bg-danger); color: var(--fg-ffffff); font-weight: 700; }
.p-Principal { background: var(--bg-purple); color: var(--fg-ffffff); font-weight: 700; }
.s-Received { background: var(--bg-e7f3ea); color: var(--fg-1a4f91); } .s-In-progress { background: var(--bg-fff6d6); color: var(--fg-6b5000); }
.s-Waiting-on-you { background: var(--bg-fff1e0); color: var(--fg-8a4300); } .s-Resolved { background: var(--bg-e6f4ea); color: var(--fg-1e6b3a); }
.s-Closed, .s-Cancelled { background: var(--bg-eef0f3); color: var(--fg-46505c); }

/* Cards and boxes */
.card { background: var(--bg-ffffff); border: 1px solid var(--bd-line); border-radius: 12px; }
.box { padding: 14px 16px; border-radius: 10px; }
.box-grey { background: var(--bg-bg); }
.box-green { background: var(--bg-soft); border: 1px solid var(--bd-bfdcc8); color: var(--fg-dark); }
.box-ok { background: var(--bg-e6f4ea); border: 1px solid var(--bd-b7dec3); color: var(--fg-1e4d2e); }
.box-warn { background: var(--bg-fff1e0); border: 1px solid var(--bd-f2cfa3); color: var(--fg-5e2e00); }
.box-red { background: var(--bg-fdecea); border: 1px solid var(--bd-f3b8b2); color: var(--fg-7a140e); }
.box-safety { background: var(--bg-danger); color: var(--fg-ffffff); }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border-radius: 12px; background: var(--bg-fff6d6); border: 1px solid var(--bd-ead58a); color: var(--fg-4d3a00); }
.banner .grow { flex: 1 1 320px; min-width: 0; }
.banner button { min-height: 40px; padding: 0 14px; border: 1px solid var(--bd-6b5000); border-radius: 8px; background: var(--bg-ffffff); color: var(--fg-4d3a00); font-weight: 600; }
.error-text { color: var(--fg-danger-ink); font-weight: 500; }
.loading { padding: 32px; text-align: center; color: var(--fg-muted); }

/* Home */
.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 32px; border-radius: 18px; background: var(--bg-dark); color: var(--fg-ffffff); }
.hero .text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hero .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-cfe5d6); }
.hero h1 { margin: 0; font-size: 30px; line-height: 1.2; }
.hero p { margin: 0; font-size: 16px; color: var(--fg-e3f0e7); }
.hero .actions { display: flex; flex-direction: column; gap: 10px; flex: 0 1 360px; min-width: 0; }
.hero-report { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 0 28px; border: none; border-radius: 14px; background: var(--bg-ffffff); color: var(--fg-dark); font-size: 18px; font-weight: 700; text-decoration: none; }
.hero-report:hover { color: var(--fg-dark); background: var(--bg-f3f8f4); }
/* Three smaller actions under the main button: My tickets, New hire, Exit */
.hero-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hero-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 92px; padding: 12px; border: 1px solid var(--bd-6fa884); border-radius: 12px; background: rgba(255,255,255,.06); color: var(--fg-ffffff); font-weight: 600; font-size: 14px; line-height: 1.2; text-decoration: none; transition: background .15s, border-color .15s; }
.hero-tile:hover { color: var(--fg-ffffff); background: rgba(255,255,255,.14); border-color: var(--bd-cfe5d6); }
.hero-tile svg { color: var(--fg-cfe5d6); margin-bottom: 2px; }
.hero-tile-sub { font-size: 12px; font-weight: 500; color: var(--fg-cfe5d6); }
.it-now { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; border-radius: 16px; border-color: var(--bd-e2e6e3); }
.it-now h2 { margin: 0; font-size: 18px; }
.load-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; background: var(--bg-soft); color: var(--fg-dark); }
.load-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-primary); }
.load-pill.busy { background: var(--bg-fff1e0); color: var(--fg-8a4300); } .load-pill.busy .dot { background: var(--bg-c06a00); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { padding: 16px; border-radius: 12px; background: var(--bg-f7f8f9); border: 1px solid var(--bd-e2e6e3); }
.stat.hl { background: var(--bg-f3f8f4); border-color: var(--bd-dcebe1); }
.stat .label { font-size: 13px; color: var(--fg-ink-2); font-weight: 500; }
.stat .num { font-size: 36px; font-weight: 700; line-height: 1.1; }
.stat.hl .num { color: var(--fg-dark); }
.meter { height: 10px; border-radius: 5px; background: var(--bg-eef2ef); overflow: hidden; display: flex; }
.meter .work { background: var(--bg-primary); } .meter .queue { background: var(--bg-9cc8aa); }
.quick { display: flex; flex-wrap: wrap; gap: 12px; }
.quick a { flex: 1 1 200px; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; border: 1px solid var(--bd-e2e6e3); border-radius: 12px; background: var(--bg-ffffff); color: var(--fg-ink); font-weight: 600; text-decoration: none; }
.quick a:hover { border-color: var(--bd-primary); color: var(--fg-ink); }

/* Report */
.field > label.search-label { font-size: 20px; font-weight: 700; }
.search-input { min-height: 48px; padding: 0 14px; border: 1px solid var(--bd-line-2); border-radius: 10px; font-size: 15px; background: var(--bg-ffffff); width: 100%; }
.split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.split > .left { flex: 1 1 380px; min-width: 0; }
.split > .right { flex: 2 1 380px; min-width: 0; }
.list-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--bd-line-3); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.list-head .title { font-weight: 700; font-size: 16px; }
.plist { padding: 4px 8px 8px; }
.group { border-bottom: 1px solid var(--bd-line-3); }
.group:last-child { border-bottom: none; }
.group-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 0 12px; border: none; border-radius: 8px; background: transparent; text-align: left; color: var(--fg-ink); }
.group-head.danger { color: var(--fg-danger-ink); }
.group-head .name { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; }
.group-head .chev { flex: none; transition: transform 300ms ease; }
.group[data-open="true"] .chev { transform: rotate(90deg); }
.group-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 300ms ease; }
.group[data-open="true"] .group-body { grid-template-rows: 1fr; }
.group-inner { overflow: hidden; min-height: 0; visibility: hidden; opacity: 0; transition: opacity 300ms ease, visibility 0s 300ms; }
.group[data-open="true"] .group-inner { visibility: visible; opacity: 1; transition: opacity 300ms ease; }
.group-inner > div { padding: 0 0 10px 32px; }
.prob { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; border: none; border-radius: 8px; text-align: left; font-size: 14px; background: transparent; color: var(--fg-ink); }
.prob:hover { background: var(--bg-bg); }
.prob[aria-pressed="true"] { background: var(--bg-soft); color: var(--fg-dark); font-weight: 600; }
.prob .safety-tag { font-size: 12px; font-weight: 600; color: var(--fg-danger-ink); }
.details { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.details h2 { margin: 0; font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-weight: 600; font-size: 13px; }
.input { min-height: 44px; padding: 0 12px; border: 1px solid var(--bd-line-2); border-radius: 8px; background: var(--bg-ffffff); width: 100%; }
textarea.input { padding: 10px 12px; min-height: 0; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tip { display: flex; gap: 8px; padding: 3px 0; } .tip .n { font-weight: 700; color: var(--fg-primary); }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 6px; border-top: 1px solid var(--bd-line-3); }
.done { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 12px; }
.done .title { font-size: 20px; font-weight: 700; }

/* My tickets */
.tlist-head { padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--bd-line-3); }
.tlist-head h1 { margin: 0; font-size: 18px; }
.trow { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 12px 16px; border: none; border-bottom: 1px solid var(--bd-line-3); text-align: left; color: var(--fg-ink); background: var(--bg-ffffff); text-decoration: none; }
.trow:hover { color: var(--fg-ink); background: var(--bg-fafbfa); }
.trow[aria-current="true"] { background: var(--bg-soft); box-shadow: inset 4px 0 0 var(--bd-primary); }
.trow .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.trow .t { font-weight: 600; }
.action-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--bg-8a4300); color: var(--fg-ffffff); }
.tdetail { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.tdetail h2 { margin: 0; font-size: 22px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.steps li { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--fg-muted); }
.steps .bar { display: block; height: 6px; border-radius: 3px; background: var(--bg-e2e5ea); }
.steps li.step-done .bar { background: var(--bg-primary); } .steps li.step-waiting .bar { background: var(--bg-c06a00); }
.steps li.step-current { font-weight: 700; color: var(--fg-ink); }
.msgs { display: flex; flex-direction: column; gap: 10px; }
.msgs h3 { margin: 0; font-size: 15px; }
.msg { padding: 12px 14px; border-radius: 10px; background: var(--bg-ffffff); border: 1px solid var(--bd-line); margin-right: 40px; }
.msg.mine { background: var(--bg-soft); border-color: var(--bd-bfdcc8); margin: 0 0 0 40px; }
.msg.system { background: var(--bg-bg); border: 1px dashed var(--bd-line-2); margin: 0; }
.msg.internal { background: var(--bg-fff8e1); border-color: var(--bd-f0de9a); }
.msg .head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--fg-muted); margin-bottom: 4px; }
.msg .head strong { color: var(--fg-ink); }
.msg .body { white-space: pre-line; overflow-wrap: anywhere; }
.stars { display: flex; gap: 2px; }
.stars button { width: 44px; height: 44px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; }

/* Narrow layout: Outlook side panel (taskpane.html) or a small window */
@media (max-width: 560px) {
  .app-header { padding: 10px 14px; }
  .dev-bar { padding: 8px 14px; }
  main { padding: 14px 10px 24px; gap: 12px; }
  .hero { padding: 20px; } .hero h1 { font-size: 22px; } .hero p { font-size: 14px; }
  .msg, .msg.mine { margin-left: 0; margin-right: 0; }
}
body.narrow .view-nav { display: none; }

/* Toast message */
.toast { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 10px; background: var(--bg-dark); color: var(--fg-ffffff); font-weight: 500; box-shadow: 0 6px 24px rgba(0,0,0,.18); z-index: 10; }
.toast.error { background: var(--bg-danger-ink); }

/* New hire + exit forms */
.form-page { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.page-title { margin: 0; font-size: 24px; font-weight: 700; }
.form-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.form-card h2 { margin: 0; font-size: 17px; color: var(--fg-dark); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 230px), 100%), 1fr)); gap: 14px; }
.fset { border: 1px solid var(--bd-line); border-radius: 10px; padding: 12px 14px; margin: 0; min-width: 0; }
.fset legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.sig-preview { flex: 1 1 280px; min-width: 0; padding: 16px; border: 1px solid var(--bd-line); border-radius: 10px; background: var(--bg-fafbfa); overflow-wrap: anywhere; }
.sig-label { font-size: 12px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }

/* Checklist progress (forms) */
.progress { display: block; height: 8px; background: var(--bg-line); border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--bg-primary); }
.p-New-Hire { background: var(--bg-e7f3ea); color: var(--fg-1d4a33); } .p-Exit { background: var(--bg-fff1e0); color: var(--fg-8a4300); }
.cl-item { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.cl-item.done span { color: var(--fg-ink); } .cl-item:not(.done) span { color: var(--fg-muted); }
.cl-head { font-size: 12px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.hr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; width: 100%; padding: 16px 18px; border: none; background: var(--bg-ffffff); color: var(--fg-ink); text-align: left; }
.hr-row:hover { background: var(--bg-fafbfa); }

/* "Needs you" on Home: only shown when a ticket is waiting on the employee */
.needs-you { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--bg-fff6d6); border: 1px solid var(--bd-ead58a); color: var(--fg-4d3a00); }
.needs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.needs-row .grow { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; }
.needs-ticket { font-size: 13px; overflow-wrap: anywhere; }
.needs-row + .needs-row { padding-top: 8px; border-top: 1px solid var(--bd-ead58a); }
.needs-btn { min-height: 40px; border-color: var(--bd-6b5000); color: var(--fg-4d3a00); }
.needs-btn:hover { background: var(--bg-4d3a00); border-color: var(--bd-4d3a00); color: var(--fg-ffffff); }

/* Tabs: full labels on wide screens; a compact icon bar (like a phone app)
   in the narrow Outlook side panel or any small window. */
.tab .tab-icon, .tab .tab-short { display: none; }
@media (max-width: 560px) {
  .tabs { display: grid; grid-template-columns: repeat(var(--tab-count, 5), minmax(0, 1fr)); gap: 2px; padding: 4px; border-radius: 14px; background: var(--bg-ffffff); border: 1px solid var(--bd-line); }
  .tab { position: relative; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 2px; border: none; border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--fg-muted); background: transparent; }
  .tab .tab-icon { display: block; line-height: 0; }
  .tab .tab-full { display: none; }
  .tab .tab-short { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tab[aria-selected="true"] { background: var(--bg-soft); color: var(--fg-dark); border: none; }
  .tab .count { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; padding: 0 5px; font-size: 11px; }
  .tab[aria-selected="true"] .count { background: var(--bg-primary); color: var(--fg-ffffff); }
}

/* ===== Home: the entry page ===== */
.home { display: flex; flex-direction: column; gap: 18px; }

/* Welcome banner: deep green, soft light, fine dot pattern */
.welcome {
  position: relative; overflow: hidden; padding: 56px 40px 36px; border-radius: 22px; color: var(--fg-ffffff);
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(127,191,148,.35), transparent 60%),
    radial-gradient(500px 260px at 0% 100%, rgba(46,125,79,.55), transparent 60%),
    linear-gradient(135deg, var(--bg-17402b) 0%, var(--bg-1d4a33) 45%, var(--bg-23573c) 100%);
  box-shadow: 0 12px 32px rgba(29,74,51,.18);
}
.welcome::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: radial-gradient(rgba(255,255,255,.7) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 100%); mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
}
.welcome > * { position: relative; }
.welcome-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
.welcome-date { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-cfe5d6); }
.live-pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); font-size: 13px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-7fe0a0); box-shadow: 0 0 0 0 rgba(127,224,160,.7); animation: live 2s infinite; }
.live-pill.busy .live-dot { background: var(--bg-ffc266); box-shadow: 0 0 0 0 rgba(255,194,102,.7); }
.live-pill.very-busy .live-dot { background: #FF8A80; box-shadow: 0 0 0 0 rgba(255,138,128,.7); }
.live-pill strong { font-weight: 700; }
.live-nums { font-weight: 500; opacity: .85; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(127,224,160,0); } 100% { box-shadow: 0 0 0 0 rgba(127,224,160,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.welcome .live-pill { position: absolute; top: 22px; right: 22px; } /* everyone: how busy IT is (home.js) */
.welcome-hello { margin: 0 0 6px; font-size: 17px; font-weight: 500; color: var(--fg-e3f0e7); }
.welcome-title { margin: 0 0 24px; font-size: clamp(26px, 4vw, 42px); line-height: 1.12; font-weight: 700; letter-spacing: -.01em; }
.welcome-title span { color: var(--fg-a8e0bb); }
.welcome-sub { margin: 10px 0 22px; font-size: 16px; color: var(--fg-e3f0e7); max-width: 640px; }
.welcome-search { display: flex; align-items: center; gap: 10px; max-width: 760px; padding: 6px 6px 6px 16px; border-radius: 16px; background: var(--bg-ffffff); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.welcome-search input { flex: 1; min-width: 0; min-height: 48px; border: none; outline: none; font-size: 16px; color: var(--fg-ink); background: transparent; }
.welcome-search .btn { min-height: 48px; border-radius: 12px; padding: 0 20px; }
.welcome-search:focus-within { box-shadow: 0 0 0 3px var(--bd-7fbf94), 0 10px 30px rgba(0,0,0,.18); }
.welcome-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--fg-cfe5d6); }
.welcome-chips a { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: var(--fg-ffffff); font-weight: 600; text-decoration: none; transition: background .15s; }
.welcome-chips a:hover { background: rgba(255,255,255,.2); color: var(--fg-ffffff); }

/* Four action cards */
.action-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.action-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 140px; padding: 20px; border-radius: 16px; background: var(--bg-ffffff); border: 1px solid var(--bd-e2e6e3); color: var(--fg-ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.action-card:hover { color: var(--fg-ink); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(29,74,51,.12); border-color: var(--bd-bfdcc8); }
.action-icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-soft); color: var(--fg-primary); margin-bottom: 6px; }
.action-title { font-size: 17px; font-weight: 700; }
.action-text { font-size: 13px; color: var(--fg-muted); padding-right: 22px; }
.action-arrow { position: absolute; right: 18px; bottom: 16px; font-size: 18px; color: var(--fg-primary); transition: transform .18s ease; }
.action-card:hover .action-arrow { transform: translateX(4px); }
.action-card.main { background: linear-gradient(135deg, var(--bg-2e7d4f), var(--bg-1d4a33)); border-color: transparent; color: var(--fg-ffffff); }
.action-card.main:hover { color: var(--fg-ffffff); box-shadow: 0 14px 30px rgba(46,125,79,.35); }
.action-card.main .action-icon { background: rgba(255,255,255,.16); color: var(--fg-ffffff); }
.action-card.main .action-text { color: var(--fg-e3f0e7); }
.action-card.main .action-arrow { color: var(--fg-ffffff); }
@media (prefers-reduced-motion: reduce) { .action-card, .action-arrow { transition: none; } .action-card:hover { transform: none; } }

/* Recent tickets + IT right now */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.home-panel { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; border-radius: 16px; border-color: var(--bd-e2e6e3); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.panel-head h2 { margin: 0; font-size: 16px; }
.recent { display: flex; flex-direction: column; }
.recent-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-radius: 10px; color: var(--fg-ink); text-decoration: none; }
.recent-row:hover { background: var(--bg-f3f8f4); color: var(--fg-ink); }
.recent-row + .recent-row { border-top: 1px solid var(--bd-line-3); }
.recent-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recent-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats > div { display: flex; flex-direction: column; }
.mini-num { font-size: 30px; font-weight: 700; line-height: 1.1; }
.mini-num.hl { color: var(--fg-primary); }

/* Tip of the day + safety line */
.tip-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border-radius: 16px; background: var(--bg-f3f8f4); border: 1px dashed var(--bd-9cc8aa); }
.tip-card .grow { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tip-icon { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-ffffff); color: var(--fg-b8860b); flex: none; }
.tip-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-primary); }
.home-safety { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--fg-muted); }

@media (max-width: 560px) {
  .welcome { padding: 22px 18px; border-radius: 18px; }
  .welcome .live-pill { position: static; margin-bottom: 14px; } /* "IT is busy" above the greeting */
  .welcome-search { padding-left: 12px; }
  .welcome-search .btn { padding: 0 14px; }
  .action-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .action-card { min-height: 0; padding: 14px; gap: 4px; border-radius: 14px; }
  .action-icon { width: 38px; height: 38px; margin-bottom: 4px; }
  .action-title { font-size: 15px; }
  .action-text, .action-arrow { display: none; }
}

/* "IT right now": one slim strip under the cards */
/* "IT right now" (the IT Manager's Home): how busy IT is, in numbers */
.it-now { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px; border-radius: 16px; background: var(--bg-ffffff); border: 1px solid var(--bd-e2e6e3); }
.it-now-head { display: flex; align-items: center; gap: 12px; }
.it-now-head h2 { margin: 0; font-size: 18px; }
.it-now-stats { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.it-stat.bad b { color: var(--fg-danger-ink); }
.busy-chip { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg-e6f4ea); color: var(--fg-1e6b3a); }
.busy-chip.amber { background: var(--bg-fff1e0); color: var(--fg-8a4300); }
.busy-chip.red { background: var(--bg-fdecea); color: var(--fg-danger-ink); }
/* Home: the Approvals card when something is waiting */
.action-card.waiting { border-color: var(--bd-ead58a); background: var(--bg-fffbea); }
.action-card.waiting .action-text { color: var(--fg-6b5000); font-weight: 700; }
.it-stat { display: flex; align-items: baseline; gap: 8px; }
.it-stat b { font-size: 28px; line-height: 1; font-weight: 700; color: var(--fg-ink); }
.it-stat b.hl { color: var(--fg-primary); }
.it-stat span { font-size: 13px; color: var(--fg-muted); }
.it-meter { flex: 1 1 160px; height: 8px; border-radius: 4px; background: var(--bg-eef2ef); overflow: hidden; display: flex; }
.it-meter .work { background: var(--bg-primary); } .it-meter .queue { background: var(--bg-9cc8aa); }
@media (max-width: 560px) {
  .it-now { padding: 16px; }
  .it-now-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .it-stat { flex-direction: column; gap: 2px; }
  .it-stat span { font-size: 12px; }
}

/* ===== Report an issue ===== */
.report { display: flex; flex-direction: column; gap: 16px; }
.report-hero { padding: 30px 36px 24px; }
.report-hero .welcome-title { margin-bottom: 18px; font-size: clamp(24px, 3.4vw, 34px); }
.welcome-chips button { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: var(--fg-ffffff); font-weight: 600; font-size: 13px; transition: background .15s; }
.welcome-chips button:hover { background: rgba(255,255,255,.2); }
.report-safety { display: inline-flex; align-items: center; gap: 6px; }

/* Problem list */
.plist-card { overflow: hidden; border-radius: 16px; border-color: var(--bd-e2e6e3); }
.area-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-soft); color: var(--fg-primary); }
.group-head.danger .area-icon { background: var(--bg-fdecea); color: var(--fg-danger-ink); }
.count-badge { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--bg-f1f3f2); color: var(--fg-muted); font-size: 12px; font-weight: 600; text-align: center; }
.group[data-open="true"] .group-head { color: var(--fg-dark); }
.group-inner > div { padding: 0 0 10px 48px; }
.prob { border-radius: 10px; }
.prob[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--bd-primary); }

/* Details panel */
.details { border-radius: 16px; border-color: var(--bd-e2e6e3); padding: 22px; gap: 16px; }
.empty-pick { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 8px; }
.empty-pick h2 { margin: 6px 0 0; font-size: 20px; }
.empty-pick p { margin: 0 0 10px; max-width: 360px; }
.empty-icon { width: 64px; height: 64px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-soft); color: var(--fg-primary); }
.common { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 380px; text-align: left; }
.common-btn { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--bd-e2e6e3); background: var(--bg-ffffff); color: var(--fg-ink); font-weight: 600; text-align: left; transition: border-color .15s, background .15s; }
.common-btn:hover { border-color: var(--bd-9cc8aa); background: var(--bg-f3f8f4); }
.common-btn span { color: var(--fg-primary); }
.back-btn { display: none; align-self: flex-start; padding: 6px 0; border: none; background: none; color: var(--fg-primary); font-weight: 600; }

.step { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 14px; background: var(--bg-fafbfa); border: 1px solid var(--bd-eef0f3); }
.step-head { display: flex; align-items: flex-start; gap: 12px; }
.step-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-dark); color: var(--fg-ffffff); font-size: 13px; font-weight: 700; }
.step-title { display: block; font-weight: 700; font-size: 16px; line-height: 28px; }
.step-sub { display: block; font-size: 13px; color: var(--fg-muted); }
.fix-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.fix-list li::marker { color: var(--fg-primary); font-weight: 700; }
.btn-fixed { border-color: var(--bd-1e6b3a); color: var(--fg-1e6b3a); background: var(--bg-ffffff); }
.btn-fixed:hover { background: var(--bg-1e6b3a); color: var(--fg-ffffff); }
.photo-btn { align-self: flex-start; border-style: dashed; font-weight: 500; }
.step-send { background: var(--bg-ffffff); }
.eta-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--fg-dark); font-size: 13px; font-weight: 600; }
.eta-chip.danger { background: var(--bg-fdecea); color: var(--fg-danger-ink); }
.safety-card { padding: 16px 18px; border-radius: 14px; }
.safety-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.safety-step { padding: 6px 0 6px 28px; border-top: 1px solid rgba(255,255,255,.2); }

/* "Sent!" card */
.done-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 24px; border-radius: 22px; background: var(--bg-ffffff); border: 1px solid var(--bd-e2e6e3); }
.done-card h1 { margin: 8px 0 0; font-size: 26px; }
.done-card p { margin: 0 0 12px; color: var(--fg-muted); font-size: 16px; max-width: 520px; }
.done-icon { width: 76px; height: 76px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-soft); color: var(--fg-primary); }
.done-card.danger .done-icon { background: var(--bg-fdecea); color: var(--fg-danger-ink); }

/* Narrow (Outlook panel): show the list OR the chosen problem, never both */
@media (max-width: 800px) {
  .report.has-sel .plist-card, .report.has-sel .report-head { display: none; }
  .report:not(.has-sel) .details { display: none; }
  .report.has-sel .back-btn { display: inline-flex; }
}
@media (max-width: 560px) {
  .report-hero { padding: 22px 18px 18px; }
  .details { padding: 16px; }
  .step { padding: 14px; }
  .group-inner > div { padding-left: 12px; }
}

/* Report header: plain, no banner (Home already has the big one) */
.report-head { display: flex; flex-direction: column; gap: 12px; }
.search-box { display: flex; align-items: center; gap: 10px; max-width: 760px; padding: 0 14px; border-radius: 12px; background: var(--bg-ffffff); border: 1px solid var(--bd-line-2); }
.search-box:focus-within { border-color: var(--bd-primary); box-shadow: 0 0 0 3px rgba(127,191,148,.35); }
.search-box input { flex: 1; min-width: 0; min-height: 48px; border: none; outline: none; font-size: 15px; background: transparent; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.soft-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--bd-cfe0d5); background: var(--bg-ffffff); color: var(--fg-dark); font-size: 13px; font-weight: 600; }
.soft-chip:hover { background: var(--bg-soft); }
.report-head .report-safety { margin: 0 0 0 6px; color: var(--fg-muted); font-size: 12px; }

/* Wide screens: the issue list scrolls inside its own box, and the details
   panel stays in view beside it, so opening an area never jumps the page. */
@media (min-width: 801px) {
  .report .split { align-items: flex-start; }
  .plist-card { position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 32px); /* JS fits it to the visible screen */ }
  .plist-card .plist { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .report .details { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; }
}

/* New hire: "Pick a department" tiles */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 10px; }
.dept-tile { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 34px 10px 10px; border-radius: 12px; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-ink); text-align: left; font-size: 14px; font-weight: 600; line-height: 1.25; transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.dept-tile:hover { border-color: var(--bd-primary); background: var(--bg-f6faf7); transform: translateY(-1px); }
.dept-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-soft); color: var(--fg-dark); transition: background .15s, color .15s; }
.dept-tick { position: absolute; top: 50%; right: 10px; transform: translateY(-50%) scale(.6); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: var(--bg-primary); color: var(--fg-ffffff); opacity: 0; transition: opacity .15s, transform .15s; }
.dept-tile[aria-pressed="true"] { border-color: var(--bd-primary); background: var(--bg-soft); color: var(--fg-dark); box-shadow: 0 0 0 1px var(--bd-primary) inset; }
.dept-tile[aria-pressed="true"] .dept-icon { background: var(--bg-primary); color: var(--fg-ffffff); }
.dept-tile[aria-pressed="true"] .dept-tick { opacity: 1; transform: translateY(-50%) scale(1); }
.dept-other { max-width: 420px; animation: deptIn .2s ease-out; }
@keyframes deptIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
[data-layout="narrow"] .dept-grid { grid-template-columns: 1fr 1fr; }
[data-layout="narrow"] .dept-tile { font-size: 13px; padding-right: 30px; }

/* New hire: hardware part slides open when "Laptop required?" is Yes */
.hw-reveal { overflow: hidden; }
.hw-inner { display: flex; flex-direction: column; gap: 14px; }
.hw-reveal.open { animation: hwOpen .45s ease-out; }
.hw-reveal.close { transition: max-height .4s ease-in, opacity .3s ease-in; opacity: 0; }
@keyframes hwOpen { from { max-height: 0; opacity: 0; } to { max-height: 700px; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hw-reveal.open { animation: none; } }
.hw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 4px 20px; }
.hw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 8px; margin: 0 -8px; border-radius: 8px; transition: background .15s; }
.hw-row.on { background: var(--bg-f6faf7); }
.hw-qty { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-muted); opacity: .55; transition: opacity .15s; }
.hw-row.on .hw-qty, .hw-qty:focus-within { opacity: 1; }
.hw-qty input { width: 52px; min-height: 36px; padding: 0 6px; border: 1px solid var(--bd-line-2); border-radius: 8px; text-align: center; font-weight: 700; font-size: 14px; background: var(--bg-ffffff); color: var(--fg-ink); }
.hw-row.on .hw-qty input { border-color: var(--bd-primary); }
.sig-logo { display: inline-grid; place-items: center; width: 92px; height: 40px; margin-bottom: 10px; border: 1px dashed var(--bd-a9c9b4); border-radius: 6px; background: var(--bg-soft); color: var(--fg-dark); font-size: 11px; font-weight: 700; letter-spacing: .04em; }

/* Exit form: timing and mailbox choice cards */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.choice-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-ink); text-align: left; transition: border-color .15s, background .15s, transform .15s; }
.choice-card:hover { border-color: var(--bd-primary); background: var(--bg-f6faf7); transform: translateY(-1px); }
.choice-card .grow { display: flex; flex-direction: column; gap: 2px; }
.choice-title { font-weight: 700; font-size: 15px; }
.choice-text { font-size: 13px; color: var(--fg-muted); line-height: 1.35; }
.choice-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-soft); color: var(--fg-dark); }
.choice-card[aria-pressed="true"] { border-color: var(--bd-primary); background: var(--bg-soft); box-shadow: 0 0 0 1px var(--bd-primary) inset; }
.choice-card[aria-pressed="true"] .choice-icon { background: var(--bg-primary); color: var(--fg-ffffff); }
.choice-card.urgent:hover { border-color: var(--bd-danger); background: var(--bg-fff6f5); }
.choice-card.urgent .choice-icon { background: var(--bg-fdecea); color: var(--fg-danger-ink); }
.choice-card.urgent[aria-pressed="true"] { border-color: var(--bd-danger); background: var(--bg-fdecea); box-shadow: 0 0 0 1px var(--bd-danger) inset; }
.choice-card.urgent[aria-pressed="true"] .choice-icon { background: var(--bg-danger); color: var(--fg-ffffff); }
.when-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--bg-soft); color: var(--fg-dark); font-weight: 600; font-size: 13px; }
.when-chip.soon { background: var(--bg-fdecea); color: var(--fg-danger-ink); }

/* Exit form: "What IT will do" */
.plan-card { border-color: var(--bd-bfdcc8); background: linear-gradient(180deg, var(--bg-f6faf7), var(--bg-ffffff) 60%); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.plan-col { padding: 14px; border-radius: 12px; border: 1px solid var(--bd-line); background: var(--bg-ffffff); display: flex; flex-direction: column; gap: 10px; }
.plan-head { display: flex; align-items: center; gap: 10px; }
.plan-head div { display: flex; flex-direction: column; }
.plan-head span:not(.plan-icon) { font-size: 12px; color: var(--fg-muted); }
.plan-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--bg-soft); color: var(--fg-dark); }
.plan-col.urgent { border-color: var(--bd-f3b8b2); }
.plan-col.urgent .plan-icon { background: var(--bg-danger); color: var(--fg-ffffff); }
.plan-col.urgent .plan-head span:not(.plan-icon) { color: var(--fg-danger-ink); font-weight: 700; }
.plan-col ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--fg-ink-2); }

/* My tickets: the list scrolls inside its own box */
.tlist-card { display: flex; flex-direction: column; overflow: hidden; }
.tlist-card .tlist-head { flex: none; }
.tlist-rows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
@media (min-width: 801px) {
  .tlist-card { position: sticky; top: 16px; max-height: calc(100vh - 32px); /* JS fits it to the visible screen */ }
}
@media (max-width: 800px) {
  .tlist-rows { max-height: 55vh; }
}

/* ---------- IT queue ---------- */
.itq { display: flex; flex-direction: column; gap: 14px; }
.itq-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.today-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.today-stat { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 14px 6px 8px; border-radius: 12px; border: 1px solid var(--bd-line); background: var(--bg-ffffff); color: var(--fg-ink); text-align: left; transition: border-color .15s, background .15s; }
.today-stat:hover { border-color: var(--bd-primary); }
.today-stat b { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 6px; border-radius: 10px; background: var(--bg-soft); color: var(--fg-dark); font-size: 18px; }
.today-stat span { display: flex; flex-direction: column; font-size: 12px; color: var(--fg-muted); line-height: 1.25; }
.today-stat span strong { font-size: 13px; color: var(--fg-ink); }
.today-stat.alert b { background: var(--bg-fdecea); color: var(--fg-danger-ink); }
.today-stat[aria-pressed="true"] { border-color: var(--bd-dark); background: var(--bg-dark); }
.today-stat[aria-pressed="true"] span, .today-stat[aria-pressed="true"] span strong { color: var(--fg-ffffff); }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fg-muted); pointer-events: none; }
.search-wrap .input { padding-left: 38px; }
.itq-group { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 10px 16px 6px; background: var(--bg-f8faf9); border-bottom: 1px solid var(--bd-line-3); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-muted); }
.itq-group span { padding: 0 7px; border-radius: 999px; background: var(--bg-line); color: var(--fg-ink-2); letter-spacing: 0; }
.itq-row.edge-safety { box-shadow: inset 4px 0 0 var(--bd-danger); }
.itq-row.edge-principal { box-shadow: inset 4px 0 0 var(--bd-purple); }
.itq-row.is-done .t { color: var(--fg-muted); }
.itq-row .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.time-chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg-line-3); color: var(--fg-ink-2); white-space: nowrap; }
.time-chip.red { background: var(--bg-fdecea); color: var(--fg-danger-ink); }
.time-chip.amber { background: var(--bg-fff1e0); color: var(--fg-8a4300); }
.time-chip.green { background: var(--bg-soft); color: var(--fg-dark); }
.time-chip.blue { background: var(--bg-fff6d6); color: var(--fg-6b5000); } /* "With IT": the same as "In progress" in My tickets */
.itq-more { width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--bd-line-3); background: var(--bg-ffffff); color: var(--fg-primary); font-weight: 600; text-align: left; }
.itq-more:hover { background: var(--bg-f6faf7); }
.itq-clear { display: flex; align-items: center; gap: 8px; padding: 16px; color: var(--fg-muted); font-size: 13px; }
.itq-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 24px; text-align: center; color: var(--fg-dark); }
.itq-head { display: flex; flex-direction: column; gap: 6px; }
.itq-controls { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; border-top: 1px solid var(--bd-line-3); }
.seg-ok[aria-pressed="true"] { background: var(--bg-1e6b3a); border-color: var(--bd-1e6b3a); }
.desk-sort { width: auto; max-width: 132px; min-height: 32px; padding: 0 24px 0 8px; font-size: 12.5px; }
.desk-list-toolbar h1 { white-space: nowrap; }
.seg-cancel { margin-left: 6px; color: var(--fg-danger-ink); }
.seg-cancel[aria-expanded="true"] { border-color: var(--bd-danger); background: var(--bg-fdecea); }
/* "Why is it cancelled?" opens under the status buttons */
.cancel-box { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 12px 14px; border-radius: 10px; background: var(--bg-fdecea); border: 1px solid var(--bd-f3b8b2); animation: cancel-open .18s ease-out; }
.cancel-box label { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px; }
.cancel-box textarea { min-height: 70px; font-size: 14px; background: var(--bg-ffffff); }
.btn-danger-solid { background: var(--bg-danger); border-color: var(--bd-danger); color: var(--fg-ffffff); }
@keyframes cancel-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cancel-box { animation: none; } }
.eta-date { width: auto; min-height: 40px; max-width: 170px; }
.itq-h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-muted); }
.itq-checks { display: flex; flex-direction: column; }
.itq-check { padding: 6px 8px; margin: 0 -8px; border-radius: 8px; }
.itq-check:hover { background: var(--bg-f6faf7); }
.itq-check.is-ticked span { color: var(--fg-muted); text-decoration: line-through; }
.itq-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.itq-fact-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.itq-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.itq-dl dt { color: var(--fg-muted); }
.itq-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--bg-dark); color: var(--fg-ffffff); font-weight: 700; font-size: 14px; }
.composer { display: flex; flex-direction: column; gap: 10px; padding: 12px; margin: 0 -12px -12px; border-radius: 12px; background: var(--bg-f8faf9); border: 1px solid var(--bd-line-3); }
.composer.note { background: var(--bg-fff8e1); border-color: var(--bd-f0de9a); }
.btn-note { background: var(--bg-8a6d00); border-color: var(--bd-8a6d00); color: var(--fg-ffffff); }

/* IT queue, calmer version */
.itq-top { align-items: center; }
.today-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-ink-2); font-size: 13px; font-weight: 500; }
.today-pill b { font-size: 15px; color: var(--fg-dark); }
.today-pill.alert { border-color: var(--bd-f3b8b2); color: var(--fg-danger-ink); }
.today-pill.alert b { color: var(--fg-danger-ink); }
.today-pill[aria-pressed="true"] { background: var(--bg-dark); border-color: var(--bd-dark); color: var(--fg-ffffff); }
.today-pill[aria-pressed="true"] b { color: var(--fg-ffffff); }
.itq-row { gap: 3px; padding: 11px 16px; }
.itq-row .top { align-items: flex-start; }
.itq-row .t { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.itq-row .sub { font-size: 12px; color: var(--fg-muted); }
.flag { font-weight: 700; }
.flag.safety { color: var(--fg-danger-ink); }
.flag.principal { color: var(--fg-purple); }
.reply-dot { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--bg-primary); color: var(--fg-ffffff); font-weight: 700; font-size: 11px; }
.itq-ticket { padding: 0; display: flex; flex-direction: column; }
.itq-ticket .itq-head { padding: 18px 20px 14px; gap: 4px; }
.itq-ticket h2 { margin: 2px 0 0; font-size: 20px; }
.safety-note { color: var(--fg-danger-ink); font-weight: 600; }
.prio-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-muted); }
.prio-pick select { min-height: 32px; padding: 0 8px; border: 1px solid var(--bd-line-2); border-radius: 8px; background: var(--bg-ffffff); font-size: 13px; font-weight: 600; color: var(--fg-ink); }
.itq-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; border-top: 1px solid var(--bd-line-3); border-bottom: 1px solid var(--bd-line-3); background: var(--bg-fafbfa); }
.seg.sm { flex: none; min-height: 34px; padding: 0 12px; }
.new-tag { padding: 0 8px; font-size: 12px; font-weight: 700; color: var(--fg-1a4f91); }
.eta-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-ink-2); font-size: 13px; font-weight: 600; }
.eta-btn.set { border-style: solid; border-color: var(--bd-bfdcc8); background: var(--bg-soft); color: var(--fg-dark); }
.eta-pop { display: flex; flex-direction: column; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--bd-line-3); background: var(--bg-f6faf7); animation: deptIn .15s ease-out; }
.itq-section { padding: 14px 20px; display: flex; flex-direction: column; gap: 12px; }
details.itq-section { border-bottom: 1px solid var(--bd-line-3); }
details.itq-section summary { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; }
details.itq-section summary::-webkit-details-marker { display: none; }
details.itq-section summary::before { content: "▸"; color: var(--fg-muted); transition: transform .15s; }
details.itq-section[open] summary::before { transform: rotate(90deg); }
.itq-ticket .composer { margin: 0; }
.composer-tabs { display: flex; gap: 2px; }
.composer-tabs button { padding: 4px 10px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 600; color: var(--fg-muted); }
.composer-tabs button[aria-pressed="true"] { background: var(--bg-ffffff); color: var(--fg-ink); box-shadow: 0 0 0 1px var(--bd-line-2); }
.composer.note .composer-tabs button[aria-pressed="true"] { color: var(--fg-6b5000); }

/* ---------- Full-screen layout (everyone, wide screens) ---------- */
@media (min-width: 900px) {
  html:has(body.workspace) { overflow: hidden; }
  body.workspace { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
  body.workspace .app-header, body.workspace .dev-bar { flex: none; }
  body.workspace main { flex: 1; min-height: 0; min-width: 0; max-width: none; margin: 0; padding: 0; overflow: hidden; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 0; }
  body.workspace .rail { display: flex; flex-direction: column; min-height: 0; background: var(--bg-17402b); }
  body.workspace .tabs { flex: 1; min-height: 0; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 4px; padding: 10px 8px; background: var(--bg-17402b); overflow-y: auto; }
  body.workspace .brand-who { display: none; }
  body.workspace .tab { position: relative; flex-direction: column; justify-content: center; gap: 4px; min-height: 62px; padding: 8px 2px; border: none; border-radius: 10px; background: transparent; color: var(--fg-bfd8c8); font-size: 11px; font-weight: 600; text-align: center; }
  body.workspace .tab:hover { background: rgba(255,255,255,.08); color: var(--fg-ffffff); }
  body.workspace .tab .tab-icon { display: block; line-height: 0; }
  body.workspace .tab .tab-full { display: none; }
  body.workspace .tab .tab-short { display: block; }
  body.workspace .tab[aria-selected="true"] { background: rgba(255,255,255,.16); color: var(--fg-ffffff); box-shadow: inset 3px 0 0 var(--bd-7fd39a); }
  body.workspace .tab .count { position: absolute; top: 6px; right: 10px; min-width: 18px; padding: 0 5px; font-size: 11px; background: var(--bg-7fd39a); color: var(--fg-dark); }
  body.workspace #view { min-height: 0; overflow-y: auto; padding: 20px 28px 32px; }
  body.workspace #view.full { padding: 0; overflow: hidden; }
}

/* ---------- IT queue: full-screen help desk ---------- */
.desk { display: grid; height: 100%; grid-template-columns: 220px 340px minmax(0, 1fr) 300px; background: var(--bg-ffffff); }
.desk-views { display: flex; flex-direction: column; gap: 2px; padding: 16px 10px; background: var(--bg-f6f8f7); border-right: 1px solid var(--bd-line); overflow-y: auto; }
.desk-title { padding: 2px 12px 14px; font-size: 19px; font-weight: 700; color: var(--fg-ink); }
.desk-view { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-ink-2); font-size: 14px; font-weight: 500; text-align: left; }
.desk-view:hover { background: var(--bg-ecf2ee); }
.desk-view .n { font-size: 13px; color: var(--fg-muted); }
.desk-view.alert .n { color: var(--fg-danger-ink); font-weight: 700; }
.desk-view[aria-pressed="true"] { background: var(--bg-soft); color: var(--fg-dark); font-weight: 700; box-shadow: inset 3px 0 0 var(--bd-primary); }
.desk-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--bd-line); }
.desk-list-head { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-bottom: 1px solid var(--bd-line); }
.desk-list-head .input { min-height: 38px; font-size: 14px; }
.desk-view-pick { display: none; }
.desk-rows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.desk-row { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--bd-line-3); color: var(--fg-ink); text-decoration: none; }
.desk-row:hover { background: var(--bg-f6faf7); color: var(--fg-ink); }
.desk-row.edge-safety { box-shadow: inset 3px 0 0 var(--bd-danger); }
.desk-row.edge-principal { box-shadow: inset 3px 0 0 var(--bd-purple); }
.desk-row[aria-current="true"] { background: var(--bg-e6f3ea); box-shadow: inset 3px 0 0 var(--bd-primary); }
.desk-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; background: var(--bg-soft); color: var(--fg-dark); }
.desk-ico.safety { background: var(--bg-fdecea); color: var(--fg-danger-ink); }
.desk-ico.principal { background: var(--bg-f0e8fa); color: var(--fg-purple); }
.desk-ico.form { background: var(--bg-fff1e0); color: var(--fg-8a4300); }
.desk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.desk-row-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.desk-row-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-row-top .muted { flex: none; font-size: 12px; }
.desk-row-title { font-size: 13px; color: var(--fg-ink-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.desk-row-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; margin-top: 2px; }
.desk-row-tags .reply-dot { margin: 0; }
.desk-none { padding: 24px; text-align: center; color: var(--fg-muted); font-size: 13px; }
.desk-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.desk-empty { align-items: center; justify-content: center; gap: 6px; color: var(--fg-dark); }
.desk-head { display: flex; flex-direction: column; gap: 8px; padding: 16px 24px 14px; border-bottom: 1px solid var(--bd-line); }
.desk-head h2 { margin: 0; font-size: 20px; }
.desk-back { display: none; font-weight: 600; text-decoration: none; }
.desk-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 20px 24px; background: var(--bg-f6f8f7); }
.desk-sys { align-self: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 90%; padding: 4px 12px; border-radius: 999px; background: var(--bg-ffffff); border: 1px dashed var(--bd-line-2); font-size: 12px; color: var(--fg-muted); text-align: center; }
.desk-msg { display: flex; align-items: flex-start; gap: 10px; max-width: min(640px, 88%); }
.desk-msg.out { align-self: flex-end; flex-direction: row-reverse; }
.bubble { min-width: 0; padding: 10px 14px; border-radius: 12px; background: var(--bg-ffffff); border: 1px solid var(--bd-line); }
.desk-msg.out .bubble { background: var(--bg-e6f3ea); border-color: var(--bd-bfdcc8); }
.desk-msg.note .bubble { background: var(--bg-fff8e1); border-color: var(--bd-f0de9a); }
.bubble .head { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; color: var(--fg-muted); margin-bottom: 3px; }
.bubble .head strong { color: var(--fg-ink); }
.bubble .body { font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.desk-msg.note .avatar { background: var(--bg-8a6d00); }
.desk-composer { display: flex; flex-direction: column; gap: 8px; padding: 6px 24px 14px; border-top: 1px solid var(--bd-line); background: var(--bg-ffffff); }
.desk-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--bd-line-3); }
.desk-tabs button { padding: 8px 2px; border: 0; border-bottom: 3px solid transparent; background: none; font-size: 14px; font-weight: 600; color: var(--fg-muted); }
.desk-tabs button[aria-pressed="true"] { color: var(--fg-ink); border-bottom-color: var(--bd-dark); }
.desk-composer.note .desk-tabs button[aria-pressed="true"] { border-bottom-color: var(--bd-8a6d00); }
.desk-composer textarea { width: 100%; min-height: 72px; padding: 10px 12px; border: 1px solid var(--bd-line-2); border-radius: 10px; font: inherit; font-size: 14px; resize: vertical; }
.desk-composer.note textarea { background: var(--bg-fffcf0); border-color: var(--bd-f0de9a); }
.desk-composer-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
/* My tickets: the conversation as a chat box (same bubbles as the IT workspace) */
.tchat { display: flex; flex-direction: column; border: 1px solid var(--bd-line); border-radius: 12px; overflow: hidden; background: var(--bg-ffffff); }
.tchat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--bd-line); }
.tchat-head h3 { margin: 0; font-size: 15px; }
.tchat-msgs { flex: none; min-height: 160px; max-height: min(520px, 60vh); padding: 18px 16px; }
.tchat-composer { padding: 12px 16px 14px; }
.tchat-composer textarea { min-height: 64px; }
.avatar.it { background: var(--bg-primary); }
.tcancel { align-self: flex-start; color: var(--fg-muted); }
.desk-side { min-height: 0; overflow-y: auto; border-left: 1px solid var(--bd-line); }
.side-box { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--bd-line-3); }
.side-box h3 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-muted); }
.side-box .eta-btn { align-self: flex-start; }
.side-box .eta-pop { padding: 0; border: 0; background: none; }
.side-box .soft-chip { align-self: flex-start; }
.prio-select { min-height: 30px; padding: 0 6px; border: 1px solid var(--bd-line-2); border-radius: 8px; background: var(--bg-ffffff); font-size: 13px; font-weight: 600; }
@media (min-width: 900px) and (max-width: 1279px) {
  .desk { grid-template-columns: 300px minmax(0, 1fr) 270px; }
  .desk-views { display: none; }
  .desk-view-pick { display: block; }
}
@media (max-width: 899px) {
  .desk { display: block; height: auto; border: 1px solid var(--bd-line); border-radius: 14px; overflow: hidden; }
  .desk-views { display: none; }
  .desk-view-pick { display: block; }
  .desk.has-sel .desk-list, .desk:not(.has-sel) .desk-main, .desk:not(.has-sel) .desk-side { display: none; }
  .desk-back { display: inline; }
  .desk-head, .desk-msgs, .desk-composer { padding-left: 14px; padding-right: 14px; }
  .desk-side { border-left: 0; border-top: 1px solid var(--bd-line); }
}

/* Focused IT workspace: compact navigation, readable tickets, clear actions. */
.desk { grid-template-columns: 180px 310px minmax(0, 1fr) 270px; }
.desk-title { font-size: 17px; letter-spacing: -.3px; padding-bottom: 22px; }
.desk-caption { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--fg-muted); letter-spacing: 0; }
.desk-views { padding-top: 24px; background: var(--bg-f7f9f8); gap: 5px; }
.desk-view { min-height: 42px; font-size: 13px; border-radius: 7px; }
.desk-view .n { min-width: 22px; text-align: center; font-size: 11px; border-radius: 5px; background: var(--bg-e9eeeb); padding: 2px 5px; }
.desk-view[aria-pressed="true"] { background: var(--bg-ddede2); }
.desk-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 8px; }
.desk-list-toolbar h1 { margin: 0 0 2px; font-size: 17px; letter-spacing: -.3px; }
.desk-refresh { width: 34px; height: 34px; border: 1px solid var(--bd-line); border-radius: 8px; background: var(--bg-ffffff); color: var(--fg-ink-2); font-size: 23px; line-height: 1; }
.desk-refresh:hover { background: var(--bg-soft); color: var(--fg-dark); }
.desk-list-head { padding: 16px 14px 12px; }
.desk-list-head .input { background: var(--bg-f7f9f8); border-color: transparent; border-radius: 8px; }
.desk-row { padding: 16px 14px; gap: 10px; }
.desk-row-top strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.desk-row-main { gap: 5px; }
.desk-row-title { font-size: 12px; color: var(--fg-muted); }
.desk-row-title .mono { font-size: 10px; }
.desk-ico { width: 30px; height: 30px; border-radius: 9px; }
.desk-row[aria-current="true"] { background: var(--bg-eef6f0); }
.desk-head { padding: 22px 24px 18px; gap: 12px; }
.desk-head h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.45px; }
.desk-head .seg.sm { border-radius: 7px; font-size: 12px; }
.desk-msgs { background: var(--bg-fafbfa); gap: 20px; }
.desk-sys { border: 0; background: transparent; font-size: 11px; padding: 2px 8px; }
.bubble { padding: 13px 16px; border-radius: 12px; box-shadow: 0 2px 5px #173b2505; }
.bubble .head { margin-bottom: 7px; font-size: 11px; }
.bubble .body { line-height: 1.6; }
.desk-composer { padding-top: 10px; gap: 10px; }
.desk-tabs button { font-size: 13px; }
.desk-composer textarea { min-height: 90px; background: var(--bg-fafbfa); }
.desk-composer-foot .s13 { font-size: 11px; }
.desk-side { background: var(--bg-fcfdfc); }
.side-box { padding: 20px 18px; gap: 12px; }
.side-box h3 { font-size: 11px; letter-spacing: .08em; }
.desk button:focus-visible, .desk a:focus-visible { outline: 2px solid var(--bd-primary); outline-offset: 2px; }
@media (min-width: 900px) and (max-width: 1399px) {
  .desk { grid-template-columns: 280px minmax(0, 1fr) 250px; }
  .desk-views { display: none; }
  .desk-view-pick { display: block; }
}
/* IT queue: the details sit in the middle (the wider column), the conversation on the far right. */
.desk.queue { grid-template-columns: 180px 310px minmax(0, 3fr) minmax(340px, 2fr); }
.desk.queue .desk-main { order: 1; border-left: 1px solid var(--bd-line); }
.desk.queue .desk-side { border-left: 0; }
@media (min-width: 900px) and (max-width: 1399px) {
  .desk.queue { grid-template-columns: 280px minmax(0, 3fr) minmax(320px, 2fr); }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .desk { grid-template-columns: 240px minmax(0, 1fr); }
  .desk-side { grid-column: 2; max-height: 36vh; border-top: 1px solid var(--bd-line); }
  .desk-list { grid-row: 1 / 3; }
  .desk { grid-template-rows: minmax(0, 1fr) auto; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .desk.queue { grid-template-columns: 240px minmax(0, 1fr); }
  .desk.queue .desk-main { grid-column: 2; grid-row: 1; border-left: 0; }
  .desk.queue .desk-side { grid-row: 2; }
}
@media (max-width: 899px) {
  .desk-head h2 { font-size: 20px; }
  .desk-msg { max-width: 100%; }
  .desk-composer-foot { align-items: flex-start; }
}

/* ---------- Admin settings ---------- */
.adm { display: grid; height: 100%; grid-template-columns: 240px minmax(0, 1fr); background: var(--bg-ffffff); }
.adm-nav { display: flex; flex-direction: column; gap: 2px; padding: 16px 10px; background: var(--bg-f6f8f7); border-right: 1px solid var(--bd-line); overflow-y: auto; }
.adm-nav-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-ink-2); font-size: 14px; font-weight: 500; text-align: left; }
.adm-nav-item span:first-of-type { flex: 1; }
.adm-nav-item svg { color: var(--fg-muted); }
.adm-nav-item .n { font-size: 13px; color: var(--fg-muted); }
.adm-nav-item:hover { background: var(--bg-ecf2ee); }
.adm-nav-item[aria-pressed="true"] { background: var(--bg-soft); color: var(--fg-dark); font-weight: 700; box-shadow: inset 3px 0 0 var(--bd-primary); }
.adm-nav-item[aria-pressed="true"] svg { color: var(--fg-primary); }
.adm-nav-note { margin: auto 0 0; padding: 12px; }
.adm-main { min-height: 0; overflow-y: auto; padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 16px; }
.adm-main > * { flex-shrink: 0; } /* boxes grow with their content; the panel scrolls */
.adm-pick { display: none; }
.adm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.adm-list { display: flex; flex-direction: column; border: 1px solid var(--bd-line); border-radius: 12px; overflow: hidden; }
.adm-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--bd-line-3); background: var(--bg-ffffff); }
.adm-row:last-child { border-bottom: 0; }
.adm-row:hover { background: var(--bg-fafcfb); }
.adm-row.adm-fixed { background: var(--bg-f8faf9); }
.adm-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); font-weight: 700; color: var(--fg-ink-2); }
.icon-btn:disabled { opacity: .35; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn-ghost-red { color: var(--fg-danger-ink); border-color: var(--bd-f3b8b2); }
.adm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 1px 8px; border-radius: 999px; background: var(--bg-line-3); color: var(--fg-ink-2); font-size: 12px; font-weight: 600; }
.adm-editor { padding: 20px; display: flex; flex-direction: column; gap: 14px; border-color: var(--bd-bfdcc8); box-shadow: 0 4px 16px rgba(29,74,51,.08); }
.adm-editor h2 { margin: 0; font-size: 17px; color: var(--fg-dark); }
.adm-list .adm-editor { border-radius: 0; box-shadow: none; border: 0; border-bottom: 1px solid var(--bd-line-3); background: var(--bg-f6faf7); }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-choice { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-dark); }
.icon-choice[aria-pressed="true"] { background: var(--bg-primary); border-color: var(--bd-primary); color: var(--fg-ffffff); }
.adm-company { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
@media (max-width: 1099px) {
  .adm { grid-template-columns: 1fr; }
  .adm-nav { display: none; }
  .adm-pick { display: block; max-width: 320px; }
  .adm-main { padding: 18px; }
}
@media (max-width: 899px) {
  .adm { height: auto; border: 1px solid var(--bd-line); border-radius: 14px; overflow: hidden; }
  .adm-row { flex-wrap: wrap; }
  .adm-tools { width: 100%; justify-content: flex-end; }
}
.adm-group { padding: 14px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); }
.adm-group:first-of-type { padding-top: 4px; }
.custom-qs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.custom-qs .wide { grid-column: 1 / -1; }
.q-help { margin: -2px 0 2px; }
/* Admin > Form questions */
.adm-form-sec { display: flex; flex-direction: column; gap: 8px; }
.adm-sec-head { display: flex; align-items: center; gap: 10px; }
.adm-sec-head h2 { margin: 0; font-size: 16px; color: var(--fg-dark); }
.adm-sec-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-sec-edit .input { max-width: 420px; }
.adm-row.is-hidden strong { color: var(--fg-muted); text-decoration: line-through; }
.adm-row.is-custom { background: var(--bg-fbfdfb); }
.adm-add-q { display: flex; align-items: center; gap: 6px; width: 100%; padding: 12px 16px; border: 0; border-top: 1px dashed var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-primary); font-weight: 600; text-align: left; }
.adm-add-q:hover { background: var(--bg-f6faf7); }
.tag.req { background: var(--bg-fff1e0); color: var(--fg-8a4300); }
.tag.off { background: var(--bg-eef0f3); color: var(--fg-muted); }
.tag.mine { background: var(--bg-soft); color: var(--fg-dark); }
/* Company logo */
.sig-logo-img { display: block; max-width: 180px; max-height: 64px; margin-bottom: 10px; object-fit: contain; }
.adm-logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.adm-logo-box { display: grid; place-items: center; width: 240px; height: 96px; padding: 10px; border: 1px dashed var(--bd-line-2); border-radius: 10px; background: var(--bg-ffffff); }
.adm-logo-box { overflow: hidden; }
.adm-logo-box img { display: block; max-width: 220px; max-height: 76px; width: auto; height: auto; object-fit: contain; }
.adm-logo label.btn { cursor: pointer; }
/* Settings: locked sections, change history, IT access */
.adm-fs { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.adm-fs:disabled [data-act], .adm-fs:disabled .adm-add-q, .adm-fs:disabled button[type="submit"], .adm-fs:disabled label.btn { display: none; }
.adm-fs:disabled .icon-btn { display: none; }
.adm-locked-note { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.badge-new { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--bg-c06a00); color: var(--fg-ffffff); font-size: 11px; font-weight: 700; }
.adm-row-main .badge-new { margin-left: 4px; }
.hist-row.is-new { background: var(--bg-fff8ec); }
.hist-row.is-undone > .adm-row-main > span:nth-child(2) { text-decoration: line-through; color: var(--fg-muted); }
.access-row { cursor: pointer; }
.switch { position: relative; flex: none; width: 46px; height: 26px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--bg-c9ced6); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: var(--bg-ffffff); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--bg-primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--bd-7fbf94); outline-offset: 2px; }
/* Principal approvals */
.desk.appr { grid-template-columns: 360px minmax(0, 1fr); }
.appr-main { background: var(--bg-f6f8f7); }
/* The ticket on top; chat with IT, then Approve / Decline and the facts */
.appr-body { flex: 1; min-height: 0; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.appr-body .desk-back { margin-bottom: -6px; }
/* Top: which ticket this is about */
.appr-top { display: flex; flex-direction: column; gap: 6px; }
.appr-top h2 { margin: 2px 0 0; font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
.appr-by { font-size: 14px; color: var(--fg-muted); }
.appr-by strong { color: var(--fg-ink); }
/* The ticket facts on the left; the chat and the answer on the right */
.appr-grid { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1100px) {
  .appr-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.6fr); align-items: start; }
}
.appr-chat { background: var(--bg-ffffff); }
.appr-chat .tchat-msgs { min-height: 150px; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; } /* scrolls, the page doesn't grow */
.appr-chat .desk-composer textarea { min-height: 56px; }
.appr-req-label { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-muted); margin: 0 0 -8px 42px; }
.desk-msg.appr-req .bubble { border-left: 4px solid var(--bd-purple); }
.desk-msg.appr-req .body { font-size: 15px; font-weight: 600; }
.appr-side, .appr-right { display: flex; flex-direction: column; gap: 16px; }
.appr-panel { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border: 1px solid var(--bd-line); border-radius: 12px; background: var(--bg-ffffff); }
.appr-panel h3 { margin: 0; font-size: 15px; }
.appr-panel .appr-facts { margin: 0; }
.appr-facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); border-top: 1px solid var(--bd-line); }
.appr-facts dt, .appr-facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--bd-line); }
.appr-facts dt { font-size: 13px; font-weight: 600; color: var(--fg-muted); }
.appr-facts dd { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; overflow-wrap: anywhere; }
.appr-facts em { font-style: normal; font-size: 13px; color: var(--fg-muted); }
.appr-decide { border-color: var(--bd-f0de9a); background: var(--bg-fffcf0); }
.appr-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.appr-buttons .btn { justify-content: center; }
.appr-yes { background: var(--bg-1e6b3a); border-color: var(--bd-1e6b3a); color: var(--fg-ffffff); }
.appr-result { flex-direction: row; align-items: flex-start; }
.appr-result > span { display: flex; flex-direction: column; gap: 4px; }
.appr-result.approved { background: var(--bg-e6f4ea); border: 1px solid var(--bd-bfdcc8); color: var(--fg-1e6b3a); }
.appr-result.declined { background: var(--bg-fdecea); border: 1px solid var(--bd-f3b8b2); color: var(--fg-danger-ink); }
@media (min-width: 900px) and (max-width: 1279px) { .desk.appr { grid-template-columns: 320px minmax(0, 1fr); } }
/* IT: Principal approval box */
.appr-ask, .appr-wait, .appr-done { display: flex; flex-direction: column; gap: 6px; }
.appr-wait { padding: 10px 12px; border-radius: 10px; background: var(--bg-f3edfa); border: 1px solid var(--bd-d9c8ee); }
.appr-wait .soft-chip { align-self: flex-start; }
/* The chat with the Principal: the same bubbles as the main conversation, smaller */
.appr-talk { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 2px; max-height: 170px; overflow-y: auto; overscroll-behavior: contain; padding: 6px 6px 6px 0; border-top: 1px solid var(--bd-line-3); border-bottom: 1px solid var(--bd-line-3); }
.appr-talk .desk-msg { max-width: 100%; gap: 8px; }
.appr-talk .bubble { padding: 8px 11px; box-shadow: none; }
.appr-talk .bubble .head { margin-bottom: 3px; }
.appr-talk .bubble .body { font-size: 13px; line-height: 1.5; }
.appr-reply { min-height: 60px; font-size: 14px; }
.time-chip.purple { background: var(--bg-f3edfa); color: var(--fg-purple); }
.soft-chip.danger { border-color: var(--bd-danger); color: var(--fg-danger-ink); }
.appr-done { padding: 10px 12px; border-radius: 10px; }
.appr-done.approved { background: var(--bg-e6f4ea); border: 1px solid var(--bd-bfdcc8); }
.appr-done.declined { background: var(--bg-fdecea); border: 1px solid var(--bd-f3b8b2); }

/* ---------- Sign-in page: a white card in the middle of a green page ---------- */
body.signed-out { min-height: 100vh; background: radial-gradient(circle at 20% 0%, var(--bg-2e7d4f) 0%, var(--bg-1d4a33) 55%, var(--bg-143826) 100%); }
body.signed-out .app-header, body.signed-out .dev-bar { display: none; }
body.signed-out main { max-width: none; min-height: 100vh; padding: 24px 16px; justify-content: center; align-items: center; }
body.signed-out #view { width: 100%; }
.signin { display: flex; justify-content: center; }
.signin-card { width: 100%; max-width: 420px; padding: 40px 32px 28px; border-radius: 20px; background: var(--bg-ffffff); text-align: center; box-shadow: 0 24px 60px rgba(8,30,18,.35); }
.signin-logo { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin-bottom: 14px; border-radius: 16px; background: var(--bg-soft); color: var(--fg-dark); }
.signin-card h1 { margin: 0; font-size: 26px; color: var(--fg-dark); }
.signin-sub { margin: 6px 0 26px; color: var(--fg-muted); font-size: 14px; }
.signin-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--bg-primary); color: var(--fg-ffffff); font-size: 15px; font-weight: 700; text-decoration: none; }
.signin-btn:hover { background: var(--bg-dark); color: var(--fg-ffffff); }
.ms-tile { display: inline-flex; padding: 5px; border-radius: 6px; background: var(--bg-ffffff); line-height: 0; }
.signin-note { margin: 14px 0 0; font-size: 13px; color: var(--fg-muted); }
.signin-msg { margin-bottom: 16px; padding: 12px 14px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--bd-bfdcc8); color: var(--fg-dark); font-size: 13px; text-align: left; }
.signin-msg.red { background: var(--bg-fdecea); border-color: var(--bd-f3b8b2); color: var(--fg-7a140e); }
.signin-test { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--bd-line-3); text-align: left; }
.signin-test summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--fg-primary); }
.signin-test summary span { font-weight: 400; color: var(--fg-muted); }
.signin-test form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
@media (max-width: 560px) { .signin-card { padding: 32px 20px 24px; } }

/* ---------- Emails (IT and Admin): how the IT mailbox was sorted ---------- */
.desk.mail { grid-template-columns: 210px 340px minmax(0, 1fr); }
.desk.mail.senders { grid-template-columns: 210px minmax(0, 1fr); }
.mail-test-link { margin-top: 10px; gap: 8px; justify-content: flex-start; text-decoration: none; border: 1px dashed var(--bd-line-2); }
.mail-note { margin: 14px 4px 0; line-height: 1.45; }
.mail-check { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; margin: 14px 4px 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-ffffff); border: 1px solid var(--bd-line); line-height: 1.4; }
.mail-check-now { display: none; align-self: flex-start; }
@media (max-width: 1399px) { .mail-check-now { display: inline-flex; } }
.mail-check.bad { background: var(--bg-fdecea); border-color: var(--bd-f3b8b2); color: var(--fg-7a140e); }
.mail-watch { align-self: flex-start; }
.mail-filters { gap: 4px; flex-wrap: nowrap; }
.mail-filters .chip { min-height: 30px; padding: 0 10px; font-size: 12.5px; white-space: nowrap; }
.mail .desk-caption { overflow-wrap: anywhere; }
.mail-filters .chip.alert:not([aria-pressed="true"]) { border-color: #E0A100; }
.mail-main { background: var(--bg-f6f8f7); }
.mail-from { overflow-wrap: anywhere; }
.mail-body-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 14px; max-width: 900px; }
.mail-why { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--bg-ffffff); border: 1px solid var(--bd-line); font-size: 14px; }
.mail-why svg { flex: none; color: var(--fg-primary); margin-top: 1px; }
.mail-decide { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border: 1px solid var(--bd-ead58a); border-radius: 12px; background: var(--bg-fffbea); }
.mail-ticket { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--bd-bfdcc8); color: var(--fg-dark); font-weight: 600; }
.mail-reply { border: 1px solid var(--bd-line); border-radius: 12px; background: var(--bg-ffffff); overflow: hidden; }
.mail-reply-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--bd-line-3); font-size: 13px; }
.mail-out-to { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-bottom: 1px solid var(--bd-line-3); background: var(--bg-fafbfa); overflow-wrap: anywhere; }
.mail-out-error { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: var(--bg-fdecea); color: var(--fg-7a140e); border-bottom: 1px solid var(--bd-f3b8b2); }
.mail-reply-body { padding: 12px 14px; white-space: pre-line; font-size: 14px; color: var(--fg-ink-2); }
.theme-pick { display: inline-flex; align-items: center; gap: 8px; }
.theme-swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.adm-mail-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.mail-out-frame { width: 100%; height: 640px; border: 0; border-top: 1px solid var(--bd-line-2); background: #F3F5F4; }
.adm-mail-frame { width: 100%; height: 560px; border: 1px solid var(--bd-line-2); border-radius: 10px; background: #F3F5F4; }
.mail-body { padding: 16px 18px; border: 1px solid var(--bd-line); border-radius: 12px; background: var(--bg-ffffff); white-space: pre-line; overflow-wrap: anywhere; font-size: 14px; }
.mail-sender { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.mail-senders { background: var(--bg-ffffff); }
.mail-sender-list { flex: 1; min-height: 0; overflow-y: auto; }
.mail-sender-row { display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(160px, 1fr) auto; align-items: center; gap: 10px 18px; padding: 12px 24px; border-bottom: 1px solid var(--bd-line-3); }
.mail-sender-who { display: flex; flex-direction: column; min-width: 0; }
.mail-sender-who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-test .chip[aria-pressed="true"] { background: var(--bg-dark); border-color: var(--bd-dark); color: var(--fg-ffffff); }
/* Like the IT queue: below 1400px wide the left menu becomes a drop-down. */
@media (min-width: 900px) and (max-width: 1399px) {
  .desk.mail { grid-template-columns: 320px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .desk.mail .desk-list { grid-row: auto; }
  .desk.mail.senders { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .mail-body-wrap { padding: 16px 14px 24px; }
  .mail-sender-row { grid-template-columns: 1fr; padding: 12px 14px; }
}

/* Emails to check: red number on the Emails tab, and the reminder bubble beside it */
.tab .count.red, body.workspace .tab .count.red { background: var(--bg-d92d20); color: var(--fg-ffffff); }
.mail-nudge { position: fixed; z-index: 30; transform: translateY(-50%); display: flex; align-items: center; gap: 12px; max-width: 420px; padding: 12px 10px 12px 16px; border-radius: 12px; background: var(--bg-d92d20); color: var(--fg-ffffff); box-shadow: 0 10px 28px rgba(120,20,12,.3); animation: nudge-in .35s ease both; }
.mail-nudge::before { content: ""; position: absolute; left: -7px; top: 50%; width: 14px; height: 14px; background: var(--bg-d92d20); transform: translateY(-50%) rotate(45deg); border-radius: 2px; }
.mail-nudge-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.mail-nudge-text strong { font-size: 14px; }
.mail-nudge-go { flex: none; padding: 7px 12px; border-radius: 8px; background: var(--bg-ffffff); color: var(--fg-b42318); font-size: 13px; font-weight: 700; text-decoration: none; }
.mail-nudge-go:hover { background: var(--bg-fee4e2); color: var(--fg-912018); }
.mail-nudge-x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--fg-ffffff); }
.mail-nudge-x:hover { background: rgba(255,255,255,.18); }
@keyframes nudge-in { from { opacity: 0; transform: translate(-8px, -50%); } }
/* "New ticket" pop-up for IT (alerts.js), bottom right */
.ticket-alert { position: fixed; z-index: 40; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 12px; width: min(420px, calc(100vw - 32px)); padding: 12px 10px 12px 14px; border-radius: 12px; background: var(--bg-1d4a33); color: var(--fg-ffffff); box-shadow: 0 12px 32px rgba(0,0,0,.28); animation: nudge-in .35s ease both; }
.ticket-alert-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.16); }
.ticket-alert-icon.safety { background: var(--bg-d92d20); }
.ticket-alert-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.ticket-alert-text strong { font-size: 14px; }
.ticket-alert-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-alert-go { flex: none; padding: 7px 12px; border-radius: 8px; background: var(--bg-ffffff); color: var(--fg-1d4a33); font-size: 13px; font-weight: 700; text-decoration: none; }
.ticket-alert-x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--fg-ffffff); }
.ticket-alert-x:hover { background: rgba(255,255,255,.18); }
@media (prefers-reduced-motion: reduce) { .mail-nudge, .ticket-alert { animation: none; } }

/* My settings: theme picker (the little pictures always show their own theme) */
.theme-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.theme-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border: 1px solid var(--bd-line-2); border-radius: 12px; background: var(--bg-ffffff); color: var(--fg-ink); text-align: left; }
.theme-tile:hover { border-color: var(--bd-primary); }
.theme-tile[aria-pressed="true"] { border-color: var(--bd-primary); box-shadow: 0 0 0 1px var(--bd-primary) inset; background: var(--bg-soft); }
.theme-mock { position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%; height: 78px; margin-bottom: 6px; padding: 0 0 10px; border-radius: 8px; overflow: hidden; border: 1px solid #C9CED6; background: #F4F5F7; }
.theme-mock.dark { background: #1E2521; border-color: #37443C; }
.theme-mock.auto { background: linear-gradient(115deg, #F4F5F7 50%, #1E2521 50%); }
.tm-head { height: 18px; background: #1D4A33; }
.tm-line { height: 7px; width: 70%; margin-left: 10px; border-radius: 4px; background: #C9CED6; }
.tm-line.short { width: 45%; }
.theme-mock.dark .tm-line { background: #4A5A50; }
.theme-mock.auto .tm-line { background: linear-gradient(115deg, #C9CED6 50%, #4A5A50 50%); }
.tm-btn { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 12px; border-radius: 4px; background: #2E7D4F; }

/* My settings: text size (like zooming in; the full-screen pages shrink to fit) */
html[data-text="large"] body { zoom: 1.12; }
html[data-text="larger"] body { zoom: 1.25; }
@media (min-width: 900px) {
  html[data-text="large"] body.workspace { height: calc(100vh / 1.12); }
  html[data-text="larger"] body.workspace { height: calc(100vh / 1.25); }
}

/* My settings: less movement (no sliding, fading or pop-in) */
:root[data-motion="less"] *, :root[data-motion="less"] *::before, :root[data-motion="less"] *::after {
  animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; transition-delay: 0s !important; scroll-behavior: auto !important;
}

/* My settings: compact lists (more on screen) */
:root[data-density="compact"] .trow { padding: 8px 14px; gap: 2px; }
:root[data-density="compact"] .desk-row { padding: 9px 14px; gap: 8px; }
:root[data-density="compact"] .desk-row-main { gap: 2px; }
:root[data-density="compact"] .desk-view { min-height: 34px; }
:root[data-density="compact"] .prob { min-height: 34px; }
:root[data-density="compact"] .group-head { min-height: 44px; }
:root[data-density="compact"] .side-box { padding: 12px 18px; gap: 8px; }
:root[data-density="compact"] .desk-msgs { gap: 12px; padding-top: 14px; padding-bottom: 14px; }
:root[data-density="compact"] .mail-item { padding: 10px 12px; gap: 4px; }

/* My settings: bold, higher-contrast text (grey text as dark as normal text,
   stronger lines). Light and dark both, as these refer to the theme's colours. */
:root[data-contrast="high"] {
  --fg-muted: var(--fg-ink-2);
  --fg-46505c: var(--fg-ink-2);
  --bd-line-3: var(--bd-line);
  --bd-line: var(--bd-line-2);
}
:root[data-contrast="high"] body { font-weight: 500; }

/* Report an issue: "Add to favourites" star (My settings > Favourite issues) */
.fav-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-height: 30px; padding: 0 10px; border: 1px solid var(--bd-line-2); border-radius: 999px; background: transparent; color: var(--fg-muted); font-size: 12px; font-weight: 600; }
.fav-btn:hover { border-color: var(--bd-8a6d00); color: var(--fg-6b5000); }
.fav-btn[aria-pressed="true"] { border-color: var(--bd-ead58a); background: var(--bg-fff6d6); color: var(--fg-6b5000); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }

/* My settings: groups, one-line settings, and small lists */
.ms-group { margin: 10px 0 -4px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); scroll-margin-top: 16px; }
.ms-list { gap: 0; padding-top: 4px; padding-bottom: 4px; }
.ms-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 14px 0; border-bottom: 1px solid var(--bd-line-3); }
.ms-row:last-child { border-bottom: 0; }
.ms-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 240px; min-width: 0; }
.ms-inline { flex: 1 1 360px; align-items: stretch; gap: 8px; }
.ms-inline .input { flex: 1 1 200px; min-width: 0; }
.ms-items { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ms-items li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--bd-line); border-radius: 10px; }
.ms-x { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-muted); }
.ms-x:hover { background: var(--bg-line-3); color: var(--fg-ink); }

/* IT: the employee is away (their My settings > Out of office) */
.away-chip { padding: 1px 8px; border-radius: 999px; background: var(--bg-fff6d6); color: var(--fg-6b5000); font-size: 12px; font-weight: 600; }
.away-box { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--bd-ead58a); background: var(--bg-fff6d6); color: var(--fg-6b5000); font-size: 13px; }
.form-card > .ms-inline { flex: none; } /* on its own line, not beside a label */
.it-now .it-meter { flex: none; } /* a thin bar, not a column-filling block */

/* Screenshots and files on tickets (Report an issue, My tickets, IT workspace) */
.file-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.file-list li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-list li:has(> .file-thumb) { padding: 6px 6px 6px 8px; border: 1px solid var(--bd-line); border-radius: 10px; }
.file-open { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--bd-line); border-radius: 10px; background: var(--bg-ffffff); color: var(--fg-ink); text-align: left; }
.file-open:hover { border-color: var(--bd-primary); }
.file-thumb { flex: none; width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--bg-line-3); }
.file-icon { display: grid; place-items: center; color: var(--fg-muted); }
.file-name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
.tfiles { display: flex; flex-direction: column; gap: 6px; }
.tfiles h3 { margin: 0; }
label.photo-btn { cursor: pointer; }
.file-viewer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: rgba(10,16,13,.88); }
.file-viewer-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: #fff; font-weight: 600; }
.file-viewer-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-viewer-bar .ms-x { color: #fff; }
.file-viewer img { flex: 1; min-height: 0; max-width: 100%; margin: 0 auto 16px; object-fit: contain; }

/* IT workspace, middle column: cards on a soft background, in the order IT needs them */
.desk.queue .ws-side { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--bg-f4f5f7); }
.ws-side .side-box { gap: 12px; padding: 16px 18px; border: 1px solid var(--bd-line); border-radius: 14px; background: var(--bg-ffffff); box-shadow: 0 1px 2px rgba(16,24,20,.04); }
.ws-side .side-box h3 { font-size: 11px; letter-spacing: .08em; }
.ws-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 14px; align-items: stretch; }
.ws-pair > .side-box { height: 100%; }
.ws-person-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ws-person-name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.ws-person-name strong { font-size: 16px; }
.ws-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ws-fact { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-f6f8f7); }
.ws-fact > span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); }
.ws-fact > strong { font-size: 14px; overflow-wrap: anywhere; }
.ws-fact .prio-select { align-self: flex-start; }
.ws-foot { padding-top: 10px; border-top: 1px solid var(--bd-line-3); font-size: 13px; overflow-wrap: anywhere; }
.file-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.file-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 8px; border: 1px solid var(--bd-line); border-radius: 12px; background: var(--bg-ffffff); color: var(--fg-ink); text-align: left; }
.file-tile:hover { border-color: var(--bd-primary); }
.file-tile .file-thumb { width: 100%; height: 92px; border-radius: 8px; }
.file-tile-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-tile-meta { font-size: 11px; color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Report an issue: a file is being dragged over the page */
.details.drop-on { outline: 3px dashed var(--bd-primary); outline-offset: -6px; background: var(--bg-f3f8f4); }

/* "IT right now" on Home (the IT Manager): tiles that open their tickets; a soft colour per ticket type */
.board { --t-Issue: var(--bg-5b8bd9); --t-New-Hire: var(--bg-4ca374); --t-Exit: var(--bg-e0a050); }
.board .it-now-head { flex-wrap: wrap; gap: 8px 12px; }
.board-filter { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.board-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); color: var(--fg-ink-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.board-chip:hover { border-color: var(--bd-primary); }
.board-chip[aria-pressed="true"] { background: var(--bg-dark); border-color: var(--bd-dark); color: var(--fg-ffffff); }
.board .dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; }
.dot.t-Issue { background: var(--t-Issue); } .dot.t-New-Hire { background: var(--t-New-Hire); } .dot.t-Exit { background: var(--t-Exit); }
.board .dot.overdue { background: var(--bg-ffffff); border: 2px solid var(--bd-danger); width: 8px; height: 8px; }
.board-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.board-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 30px 12px 14px; border-radius: 12px; border: 1px solid var(--bd-line); background: var(--bg-f7f8f9); color: var(--fg-ink); text-align: left; cursor: pointer; }
.board-tile:hover { border-color: var(--bd-line-2); background: var(--bg-ffffff); }
.board-tile b { font-size: 28px; line-height: 1; font-weight: 700; }
.board-tile.hl b { color: var(--fg-primary); }
.board-tile.bad b { color: var(--fg-danger-ink); }
.board-tile span { font-size: 13px; color: var(--fg-muted); line-height: 1.3; }
.board-tile .board-caret { position: absolute; top: 12px; right: 12px; }
.board-tile.on { background: var(--bg-ffffff); border-color: var(--bd-primary); box-shadow: 0 0 0 1px var(--bd-primary); }
.board-tile.bad.on { border-color: var(--bd-danger); box-shadow: 0 0 0 1px var(--bd-danger); }
.board-caret { display: inline-flex; color: var(--fg-muted); transition: transform .15s; }
.board-tile.on .board-caret { transform: rotate(90deg); color: var(--fg-ink); }
.board-open { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; border-top: 1px solid var(--bd-line-3); }
.board-open h3 { margin: 8px 0 0; font-size: 15px; }
.board-list { display: flex; flex-direction: column; max-height: 520px; overflow-y: auto; border: 1px solid var(--bd-line); border-radius: 12px; }
.board-empty { margin: 0; padding: 18px; color: var(--fg-muted); font-size: 14px; }
.bcard { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 16px; border: none; border-bottom: 1px solid var(--bd-line-3); background: var(--bg-ffffff); color: var(--fg-ink); font: inherit; text-align: left; cursor: pointer; }
.bcard:last-child { border-bottom: none; }
.bcard:hover { background: var(--bg-f7f8f9); }
.bcard-title { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-who { flex: 0 1 180px; min-width: 0; font-size: 13px; color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-when { flex: none; width: 92px; text-align: right; font-size: 13px; color: var(--fg-muted); }
.bcard-when.late, .bd-sub .late { color: var(--fg-b42318); font-weight: 600; }
/* The small window when Lucy clicks a ticket */
.board-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: none; border-radius: 16px; background: var(--bg-ffffff); color: var(--fg-ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.board-dialog::backdrop { background: rgba(20, 30, 25, .45); }
.bd-box { display: flex; flex-direction: column; gap: 12px; padding: 18px 22px 22px; }
.bd-box.t-Issue { --t: var(--bg-5b8bd9); } .bd-box.t-New-Hire { --t: var(--bg-4ca374); } .bd-box.t-Exit { --t: var(--bg-e0a050); }
.bd-box .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--t); }
.bd-head { display: flex; align-items: center; justify-content: space-between; }
.bd-close { display: inline-flex; padding: 6px; border: none; border-radius: 8px; background: none; color: var(--fg-muted); cursor: pointer; }
.bd-close:hover { background: var(--bg-eef0f3); color: var(--fg-ink); }
.bd-box h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.bd-box h3 { margin: 4px 0 0; font-size: 14px; }
.bd-sub { margin: -6px 0 0; font-size: 14px; color: var(--fg-muted); }
.bd-box .bcard-type { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--fg-muted); }
.bd-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.bd-facts dt { color: var(--fg-muted); }
.bd-facts dd { margin: 0; overflow-wrap: anywhere; }
.bd-steps { display: flex; flex-direction: column; gap: 6px; }
.bd-details { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bg-f7f8f9); font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .board-filter { margin-left: 0; width: 100%; }
  .board-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .board-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bcard-who { display: none; }
}
@media (prefers-reduced-motion: reduce) { .board-caret { transition: none; } }
/* Home: "Go to HR view" for people who also do HR (Lucy) */
.hr-jump { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: var(--bg-ffffff); border: 1px solid var(--bd-e2e6e3); color: var(--fg-ink); text-decoration: none; }
.hr-jump:hover { color: var(--fg-ink); border-color: var(--bd-bfdcc8); }
.hr-jump .action-icon { margin: 0; flex: none; }
.hr-jump .grow { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.hr-jump strong { font-size: 16px; }
@media (max-width: 560px) { .hr-jump { flex-wrap: wrap; } .hr-jump .btn { width: 100%; justify-content: center; } }
/* New hire form: pick the manager from a list; forms handed over to finish */
.people-box { position: relative; }
.people-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: max(100%, min(340px, 92vw)); max-height: 340px; overflow-x: hidden; overflow-y: auto; padding: 4px; border-radius: 10px; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); box-shadow: 0 10px 28px rgba(0, 0, 0, .14); }
.people-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 8px 10px; border: none; border-radius: 8px; background: none; color: var(--fg-ink); font: inherit; text-align: left; cursor: pointer; }
.people-row:hover, .people-row:focus-visible { background: var(--bg-e7f3ea); }
.people-row strong, .people-row span { max-width: 100%; overflow-wrap: anywhere; }
.people-row span { font-size: 13px; color: var(--fg-muted); }
.people-none { padding: 10px; font-size: 14px; color: var(--fg-muted); }
.handover-note { padding: 12px 16px; border-radius: 10px; background: var(--bg-e7f3ea); color: var(--fg-1d4a33); font-size: 14px; }
.handover-msg { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--fg-1d4a33); border-radius: 0 8px 8px 0; background: var(--bg-ffffff); color: var(--fg-ink); white-space: pre-wrap; }
.handover-msg span { color: var(--fg-muted); font-weight: 600; white-space: normal; }
.handover-panel { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--bd-line-2); border-radius: 10px; background: var(--bg-f6faf7); }
.handover-panel label { font-weight: 600; }
.handover-list { gap: 10px; }
.handover-list h2 { margin: 0; font-size: 16px; }
.handover-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--bd-line-3); }
.handover-row .grow { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.handover-where { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.handover-list h2.handover-gap { margin-top: 10px; }
/* New hire and Exit pages: "New form" | "Your forms" */
.forms-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--bd-line-2); }
.forms-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin-bottom: -1px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--fg-muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.forms-tab[aria-selected="true"] { color: var(--fg-1d4a33); border-bottom-color: var(--bd-primary); }
.count-pill { padding: 1px 8px; border-radius: 999px; background: var(--bg-e7f3ea); color: var(--fg-1d4a33); font-size: 12px; font-weight: 700; }
.count-pill.hot { background: var(--bg-primary); color: var(--fg-ffffff); }
/* IT workspace: the ticket and its description in the middle, "Chat with …" on the right */
.ws-ticket h2 { margin: 0; font-size: 22px; line-height: 1.3; letter-spacing: -.45px; }
.ws-ticket .seg.sm { border-radius: 7px; font-size: 12px; }
.ws-desc-text { margin: 0; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ws-desc-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--bd-line-3); font-size: 14px; }
.ws-desc-facts dt { color: var(--fg-muted); }
.ws-desc-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.chat-head { gap: 2px; }
.chat-head h2 { font-size: 18px; }
/* Ticket list: the person's name first, the issue on one line, a blue dot for Principals */
.desk-row-who { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.desk-row-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--bg-5b8bd9); }
/* Star ratings: the chip in IT's list, the box on the ticket, Lucy's board */
.rating-chip { padding: 1px 8px; border-radius: 999px; background: var(--bg-fff8e1); color: var(--fg-8a4300); font-size: 12px; font-weight: 700; white-space: nowrap; }
.rating-chip.low { background: var(--bg-fdecea); color: var(--fg-b42318); }
.rating-stars { color: #E0A100; letter-spacing: 1px; margin-right: 6px; }
.ws-rating { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--bg-fff8e1); font-size: 14px; }
.ws-rating > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ws-rating p { margin: 0; color: var(--fg-ink); }
.ws-rating.low { background: var(--bg-fdecea); }
.ws-rating.low strong { color: var(--fg-b42318); }
.rate-panel { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--bd-line-2); background: var(--bg-ffffff); }
.rate-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.rate-head h2 { margin: 0; font-size: 18px; }
.rate-panel h3 { margin: 4px 0 0; font-size: 14px; color: var(--fg-muted); }
.rate-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rate-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--bg-f6faf7); }
.rate-stat b { font-size: 24px; line-height: 1.1; }
.rate-stat span { font-size: 13px; color: var(--fg-muted); }
.rate-stat.big { background: var(--bg-fff8e1); }
.rate-stat.big .rating-stars { font-size: 16px; color: #E0A100; }
.rate-stat.low b { color: var(--fg-b42318); }
.rate-stat.up b { color: var(--fg-1e6b3a); }
.rate-list { display: flex; flex-direction: column; }
.rate-row { padding: 10px 0; border-top: 1px solid var(--bd-line-3); }
.rate-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rate-row-title { min-width: 0; overflow-wrap: anywhere; }
.rate-row p { margin: 4px 0 0; color: var(--fg-ink); }
.rate-row.low p { color: var(--fg-b42318); }
.desk-row .desk-row-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--fg-ink-2); }
/* IT workspace: a ✕ in the corner of each file removes it */
.file-tile-box { position: relative; min-width: 0; }
.file-tile-box .file-tile { width: 100%; }
.file-remove { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--bd-line-2); border-radius: 50%; background: var(--bg-ffffff); color: var(--fg-muted); cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.file-remove:hover { background: var(--bg-fdecea); border-color: var(--bd-danger); color: var(--fg-b42318); }
/* IT workspace: the estimate sits at the top of the chat, its choices drop down */
.chat-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chat-eta { position: relative; flex: none; }
.chat-eta .eta-pop { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: 260px; padding: 12px 14px; border: 1px solid var(--bd-line); border-radius: 12px; background: var(--bg-ffffff); box-shadow: 0 12px 30px rgba(0, 0, 0, .14); }
/* Approvals: what IT is asking, at the top of the left side */
.appr-ask-panel { background: var(--bg-f3edfa); border-color: var(--bd-d9c8ee); }
.appr-ask-text { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.appr-details { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Status reports (views/reports.js): the list, and the report as emailed. */
.desk.reports { grid-template-columns: 340px minmax(0, 1fr); }
.rep-main { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; background: var(--bg-f6f8f7); }
.rep-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rep-back svg { transform: rotate(180deg); }
.rep-frame { flex: 1; width: 100%; min-height: 70vh; border: 1px solid var(--bd-line-2); border-radius: 12px; background: #FFFFFF; }
.rep-row-top strong { white-space: nowrap; }

/* New hire and exit tickets in the IT workspace (views/it.js sheetHead,
   groupedChecklist): a setup sheet. The details get more room than the chat. */
.desk.queue:has(.ws-form) { grid-template-columns: 180px 310px minmax(0, 2.4fr) minmax(300px, 1fr); }
@media (min-width: 1100px) and (max-width: 1399px) {
  .desk.queue:has(.ws-form) { grid-template-columns: 280px minmax(0, 2.2fr) minmax(290px, 1fr); }
}
.sheet-kind { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--bg-soft); color: var(--fg-dark); }
.sheet-head.exit .sheet-kind { background: var(--bg-fff1e0); color: var(--fg-8a4300); }
.ws-side .sheet-name { margin: 2px 0 0; font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
.sheet-sub { margin-top: -6px; font-size: 14px; color: var(--fg-muted); }
.sheet-date { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 6px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; background: var(--bg-f4f5f7); }
.sheet-date.soon { background: var(--bg-fff1e0); color: var(--fg-8a4300); }
.sheet-date.late { background: var(--bg-fdecea); color: var(--fg-a11a12); }
.sheet-progress { display: flex; align-items: center; gap: 12px; }
.sheet-progress .progress { flex: 1; height: 10px; }
.sheet-progress strong { font-size: 14px; white-space: nowrap; }
.sheet-checks { gap: 14px; }
.sheet-group { display: flex; flex-direction: column; }
.sheet-group-head { display: flex; justify-content: space-between; padding: 0 0 6px; margin-bottom: 2px; border-bottom: 1px solid var(--bd-line-3); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-muted); }
.sheet-group-head .all { color: var(--fg-1e6b3a); }
.itq-check-row { display: flex; align-items: center; gap: 10px; }
.itq-check-row .itq-check { flex: 1; min-width: 0; margin: 0 -8px; font-size: 15px; }
.itq-check-row .btn { flex: none; }
.sheet-dl { grid-template-columns: minmax(120px, max-content) 1fr; gap: 9px 18px; font-size: 14px; }
.sheet-sig summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.sheet-sig summary::-webkit-details-marker { display: none; }
.sheet-sig summary::before { content: "▸"; color: var(--fg-muted); }
.sheet-sig[open] summary::before { content: "▾"; }
