/* Layout & components. Brand colours come from theme.css. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--brand-font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--brand-heading-font); line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
a { color: var(--brand-primary); }
p { margin: 0 0 .75rem; }
.muted { color: var(--text-muted); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand-accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 16px; padding-top: env(safe-area-inset-top); background: var(--header-bg); color: var(--header-text); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.topbar .logo { height: 34px; display: block; }
.topbar .app-name { font-weight: 600; opacity: .85; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.3); white-space: nowrap; }
.topbar .spacer { flex: 1; }
.icon-btn { background: transparent; border: 0; color: inherit; padding: 8px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font: inherit; }
.icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn svg { width: 22px; height: 22px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex: none; letter-spacing: .02em; }
.avatar.lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar.sm { width: 30px; height: 30px; font-size: .75rem; }
.user-menu { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--brand-radius); box-shadow: 0 10px 30px rgba(0,0,0,.15); min-width: 220px; padding: 6px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; color: inherit; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu .menu-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 60px); }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 16px 10px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 14px 12px 6px; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.nav a svg { width: 20px; height: 20px; color: var(--text-muted); flex: none; }
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--brand-accent-soft); color: var(--brand-primary); }
.nav a.active svg { color: var(--brand-accent); }
.badge-count { margin-left: auto; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
main { padding: 24px; max-width: 1200px; width: 100%; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 0; }

.bottom-nav { display: none; }
.scrim { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; height: 100%; width: 280px; transform: translateX(-100%); transition: transform .2s ease; padding-top: calc(16px + env(safe-area-inset-top)); }
  body.drawer-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.drawer-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
  main { padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
  .topbar .app-name { display: none; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: .7rem; color: var(--text-muted); text-decoration: none; background: none; border: 0; font-family: inherit; cursor: pointer; position: relative; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav .active { color: var(--brand-primary); }
  .bottom-nav .dot { position: absolute; top: 4px; left: calc(50% + 6px); width: 9px; height: 9px; background: var(--danger); border-radius: 50%; }
  .user-name { display: none; }
}

/* ---------- Cards, grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--brand-radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.hero { background: linear-gradient(120deg, var(--header-bg), color-mix(in srgb, var(--header-bg) 70%, var(--brand-accent))); color: var(--header-text); border-radius: var(--brand-radius); padding: 22px 24px; margin-bottom: 18px; }
.hero h1 { margin-bottom: 4px; }
.hero p { margin: 0; opacity: .85; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--brand-radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--brand-accent); transform: translateY(-1px); }
.tile .tile-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-accent-soft); color: var(--brand-primary); display: flex; align-items: center; justify-content: center; }
.tile .tile-icon svg { width: 24px; height: 24px; }
.tile strong { font-size: .98rem; }
.tile span { font-size: .8rem; color: var(--text-muted); }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.stat b { display: block; font-size: 1.4rem; line-height: 1.2; }
.stat span { font-size: .78rem; color: var(--text-muted); }
.meter { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; display: flex; margin: 12px 0 4px; }
.meter i { display: block; height: 100%; }
.meter .used { background: var(--brand-primary); }
.meter .pend { background: repeating-linear-gradient(45deg, var(--brand-accent), var(--brand-accent) 4px, transparent 4px, transparent 8px); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list a.row-link { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge.brand { background: var(--brand-accent-soft); color: var(--brand-primary); border-color: transparent; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--brand-primary); color: var(--brand-on-primary); min-height: 40px; }
.btn:hover { background: var(--brand-primary-strong); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.accent { background: var(--brand-accent); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.sm { padding: 5px 11px; min-height: 32px; font-size: .85rem; }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
label.field { display: grid; gap: 5px; font-weight: 600; font-size: .85rem; }
label.field .hint { font-weight: 400; color: var(--text-muted); font-size: .8rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; width: 100%; min-height: 40px; font-weight: 400; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 25%, transparent); }
input[readonly] { background: var(--surface-2); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: auto; min-height: 0; }
fieldset { border: 1px solid var(--border); border-radius: var(--brand-radius); padding: 14px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--info-bg); color: var(--info); font-size: .88rem; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.lock { background: var(--surface-2); color: var(--text-muted); border: 1px dashed var(--border); }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg label { padding: 6px 12px; cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg label + label { border-left: 1px solid var(--border); }
.seg input:checked + span { color: inherit; }
.seg label:has(input[value="ok"]:checked) { background: var(--ok-bg); color: var(--ok); }
.seg label:has(input[value="fail"]:checked) { background: var(--danger-bg); color: var(--danger); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--brand-accent); outline-offset: -3px; }
.checklist { display: grid; gap: 0; }
.checklist > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--text-muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.active { color: var(--brand-primary); border-bottom-color: var(--brand-accent); }
.tabs a svg { width: 14px; height: 14px; }

/* ---------- Profile ---------- */
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-head .meta { display: flex; gap: 6px 18px; flex-wrap: wrap; color: var(--text-muted); font-size: .9rem; margin-top: 4px; }
.kv { display: grid; grid-template-columns: minmax(130px, 40%) 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--text-muted); font-size: .88rem; }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 18px 8px; }
.timeline li::before { content: ""; position: absolute; left: -23px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--tl-color, var(--brand-accent)); }
.timeline .tl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.timeline .tl-notes { margin: 6px 0 0; white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); padding: 10px 12px; border-radius: 8px; font-size: .9rem; }
.tl-one_to_one { --tl-color: var(--brand-accent); } .tl-appraisal { --tl-color: var(--info); } .tl-wage_review { --tl-color: var(--ok); }
.tl-disciplinary { --tl-color: var(--danger); } .tl-grievance { --tl-color: var(--warn); } .tl-absence { --tl-color: var(--warn); }
.tl-training { --tl-color: var(--brand-primary); } .tl-promotion { --tl-color: var(--ok); } .tl-note { --tl-color: var(--text-muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .82rem; cursor: pointer; }
.chip.on { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-on-primary); }

/* ---------- Org chart ---------- */
.org-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.org-toolbar input { max-width: 320px; }
.org-scroll { overflow: auto; padding: 8px 4px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--brand-radius); }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree { display: flex; justify-content: center; min-width: max-content; padding: 16px; }
.org-tree ul { display: flex; justify-content: center; padding-top: 22px; position: relative; }
.org-tree li { position: relative; padding: 22px 6px 0; display: flex; flex-direction: column; align-items: center; }
.org-tree > li { padding-top: 0; }
/* connectors */
.org-tree ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--border); }
.org-tree li::before, .org-tree li::after { content: ""; position: absolute; top: 0; height: 22px; width: 50%; border-top: 2px solid var(--border); }
.org-tree li::before { right: 50%; } .org-tree li::after { left: 50%; border-left: 2px solid var(--border); }
.org-tree li:only-child::before, .org-tree li:only-child::after { display: none; }
.org-tree li:only-child { padding-top: 0; }
.org-tree li:first-child::before, .org-tree li:last-child::after { border: 0; }
.org-tree li:last-child::before { border-right: 2px solid var(--border); border-radius: 0 8px 0 0; }
.org-tree li:first-child::after { border-radius: 8px 0 0 0; }
.org-tree > li::before, .org-tree > li::after { display: none; }
.org-tree li.collapsed > ul { display: none; }
.org-node { display: flex; align-items: center; gap: 10px; width: 200px; padding: 10px 12px; border-radius: var(--brand-radius); background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--brand-accent); box-shadow: var(--shadow); text-decoration: none; color: var(--text); text-align: left; }
.org-node:hover { border-color: var(--brand-accent); }
.org-node.me { border-top-color: var(--brand-primary); background: var(--brand-accent-soft); }
.org-node .nm { font-weight: 700; font-size: .88rem; line-height: 1.25; }
.org-node .jt { font-size: .76rem; color: var(--text-muted); line-height: 1.25; }
.org-node .lock { width: 14px; height: 14px; color: var(--text-muted); flex: none; margin-left: auto; align-self: flex-start; }
.org-toggle { margin-top: 6px; font-size: .72rem; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 999px; padding: 1px 9px; cursor: pointer; font-family: inherit; position: relative; z-index: 1; }
/* Narrow screens: indented list instead of a wide tree */
@media (max-width: 700px) {
  .org-scroll { padding: 8px; }
  .org-tree { display: block; min-width: 0; padding: 4px; }
  .org-tree ul { display: block; padding: 0 0 0 18px; border-left: 2px solid var(--border); margin-left: 16px; }
  .org-tree ul::before, .org-tree li::before, .org-tree li::after { display: none; }
  .org-tree li { display: block; padding: 8px 0 0; }
  .org-node { width: 100%; }
  .org-toggle { margin: 4px 0 0 46px; }
}

/* ---------- Calendar list ---------- */
.cal-month { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 14px 0 4px; }

/* ---------- Docs ---------- */
.doc { display: flex; gap: 14px; align-items: flex-start; }
.doc .doc-icon { width: 44px; height: 44px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--brand-accent-soft); color: var(--brand-primary); }
.doc .doc-icon svg { width: 22px; height: 22px; }

/* ---------- Modal & toast ---------- */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(10, 20, 30, .45); }
dialog .dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
dialog .dlg-head h2 { margin: 0; }
dialog .dlg-head button { color: var(--text-muted); }
dialog .dlg-head button:hover { background: var(--surface-2); }
dialog .dlg-body { padding: 18px; overflow-y: auto; }
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
@media (min-width: 861px) { .toasts { bottom: 24px; } }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 500; animation: pop .2s ease; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-brand { background: linear-gradient(150deg, var(--header-bg), color-mix(in srgb, var(--header-bg) 60%, var(--brand-accent))); color: var(--header-text); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-brand .logo { height: 48px; align-self: flex-start; }
.login-brand h1 { font-size: 2.1rem; max-width: 14ch; }
.login-brand ul { padding-left: 18px; opacity: .9; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.login-form .card { width: min(400px, 100%); padding: 28px; }
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { padding: 28px 20px; padding-top: calc(28px + env(safe-area-inset-top)); }
  .login-brand h1 { font-size: 1.5rem; margin-top: 16px; }
  .login-brand ul, .login-brand .foot { display: none; }
}
.empty { text-align: center; color: var(--text-muted); padding: 28px 12px; }
.loading { padding: 40px; text-align: center; color: var(--text-muted); }

/* ---------- Fixes ---------- */
:where(svg) { width: 1em; height: 1em; vertical-align: -0.125em; flex: none; }
.grid > .card + .card { margin-top: 0; }
.org-toolbar input, .org-toolbar select { width: auto; flex: 0 1 320px; min-width: 0; }
@media (max-width: 520px) { .org-toolbar input, .org-toolbar select { flex: 1 1 100%; } }
.org-scroll { position: relative; }
.seg label { position: relative; }

/* ---------- Vehicle check photos ---------- */
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-btn.disabled { opacity: .5; pointer-events: none; }
.file-btn:focus-within { outline: 3px solid var(--brand-accent); outline-offset: 2px; }
.photo-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.photo-picks:empty { display: none; }
.photo-pick { position: relative; display: grid; gap: 6px; }
.photo-pick img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.photo-pick input { min-height: 34px; padding: 5px 8px; font-size: .82rem; }
.photo-remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.photo-remove svg { width: 16px; height: 16px; }
.photo-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.photo-thumb { padding: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; width: 52px; height: 40px; cursor: zoom-in; background: var(--surface-2); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
dialog.wide { width: min(960px, calc(100vw - 32px)); }
.viewer { margin: 0; display: grid; gap: 8px; }
.viewer img { width: 100%; max-height: 70vh; object-fit: contain; background: var(--surface-2); border-radius: 8px; }
.viewer figcaption { color: var(--text-muted); font-size: .9rem; min-height: 1.2em; }
.viewer-nav { justify-content: space-between; margin-top: 10px; }
.checklist > div > span:first-child { min-width: 0; }
.seg { flex: none; }

/* ---------- Incidents ---------- */
.notice.danger-notice { background: var(--danger-bg); color: var(--danger); display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.notice.danger-notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice ul.safety { margin: 6px 0 0; padding-left: 20px; }
.notice.warn { margin-bottom: 16px; }
.inc-choices { display: grid; gap: 12px; margin-bottom: 18px; }
.inc-choice { display: grid; grid-template-columns: 52px minmax(0, 1fr) 20px; gap: 14px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--inc-c); border-radius: var(--brand-radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.inc-choice:hover { border-color: var(--inc-c); }
.inc-choice strong { display: block; font-size: 1.05rem; }
.inc-choice span span, .inc-choice > span:nth-child(2) > span { color: var(--text-muted); font-size: .88rem; }
.inc-choice-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--inc-c) 14%, transparent); color: var(--inc-c); }
.inc-choice-icon svg { width: 28px; height: 28px; }
.inc-choice .chev { width: 20px; height: 20px; color: var(--text-muted); }
.inc-rta { --inc-c: var(--info); } .inc-near_miss { --inc-c: var(--warn); } .inc-accident { --inc-c: var(--danger); }
.inc-title { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.inc-title svg { width: 28px; height: 28px; color: var(--brand-accent); }
.inc-type { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.inc-form { gap: 16px; }
.inc-form .card + .card { margin-top: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-grid > .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }
.field-label { font-weight: 600; font-size: .85rem; }
div.field { display: grid; gap: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice > span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: .9rem; min-height: 40px; }
.choice small { font-weight: 400; color: var(--text-muted); }
.choice:hover > span { border-color: var(--brand-accent); }
.choice input:checked + span { background: var(--brand-accent-soft); border-color: var(--brand-accent); color: var(--brand-primary); }
.choice.sev-medium input:checked + span { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.choice.sev-high input:checked + span { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.choice input:focus-visible + span { outline: 3px solid var(--brand-accent); outline-offset: 2px; }
.submit-row .btn { min-height: 48px; padding: 0 24px; }
.pre { white-space: pre-wrap; }
.inc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.inc-layout > div > .card + .card, .inc-layout aside .card + .card { margin-top: 16px; }
@media (max-width: 1000px) { .inc-layout { grid-template-columns: 1fr; } }
.photo-strip.big .photo-thumb { width: 120px; height: 90px; }
.bottom-nav .nav-report svg { color: var(--danger); }

/* ---------- Branding ---------- */
.avatar { color: var(--brand-on-accent, #fff); }
.topbar .logo { max-width: 180px; object-fit: contain; object-position: left center; }
/* Alacri symbol shown when a company has no logo of its own */
img.logo.is-symbol { width: 34px !important; height: 34px !important; border-radius: 9px; }
.login-brand img.logo.is-symbol { width: 52px !important; height: 52px !important; border-radius: 13px; }
.bp-top img.is-symbol { width: 28px; height: 28px; border-radius: 7px; }
.logo-sample img.is-symbol { width: 40px; height: 40px; border-radius: 10px; }
.login-brand .logo { max-width: 260px; object-fit: contain; object-position: left center; }
.colour-row { display: flex; gap: 8px; align-items: center; }
.colour-row input[type=color] { width: 52px; height: 40px; padding: 3px; flex: none; cursor: pointer; }
.colour-row input:not([type=color]) { width: 120px; font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; }
.logo-pick { display: grid; gap: 10px; }
.logo-sample { border-radius: 8px; padding: 14px 16px; border: 1px solid var(--border); display: flex; align-items: center; min-height: 64px; }
.logo-sample img { max-height: 40px; max-width: 220px; object-fit: contain; }
.brand-preview { border: 1px solid var(--border); border-radius: var(--brand-radius); overflow: hidden; background: var(--bg); }
.bp-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-weight: 600; }
.bp-top img { height: 28px; max-width: 150px; object-fit: contain; }
.bp-body { padding: 14px; display: grid; gap: 12px; }
.bp-hero { background: linear-gradient(120deg, var(--header-bg), color-mix(in srgb, var(--header-bg) 70%, var(--brand-accent))); color: var(--header-text); border-radius: 8px; padding: 12px 14px; display: grid; }
.bp-hero span { opacity: .85; font-size: .85rem; }
.bp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bp-tiles .tile { padding: 12px; }
.link-sample { color: var(--brand-primary); text-decoration: underline; }

/* ---------- Notifications ---------- */
.icon-btn.bell { position: relative; text-decoration: none; }
.bell-dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #e5372b; box-shadow: 0 0 0 2px var(--header-bg); }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5372b; flex: none; display: inline-block; }
.read-dot { width: 10px; height: 10px; flex: none; display: inline-block; }
.card-head h2 .badge-count { margin-left: 6px; vertical-align: 2px; }

/* ---------- Company news ---------- */
.news-list { display: grid; gap: 16px; }
.news { background: var(--surface); border: 1px solid var(--border); border-radius: var(--brand-radius); box-shadow: var(--shadow); padding: 18px 20px; display: grid; gap: 12px; }
.news.unread { border-color: color-mix(in srgb, var(--brand-accent) 55%, var(--border)); }
.news.priority { border-left: 5px solid var(--danger); }
.news-head { display: flex; gap: 12px; align-items: flex-start; }
.news-head .unread-dot { margin-top: 8px; }
.news-head h2 { margin: 0 0 2px; font-size: 1.15rem; }
.news-badges { flex: none; }
.news-body { max-width: 72ch; }
.news-body p { margin: 0 0 .7rem; }
.news-body p:last-child { margin-bottom: 0; }
.news-img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.news-foot:empty { display: none; }
.news-mini { display: grid; }
.news-mini-item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.news-mini-item:last-child { border-bottom: 0; }
.news-mini-item .grow { display: grid; min-width: 0; }
.news-mini-item strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choices.stack { flex-direction: column; }
.choices.stack .choice > span { border-radius: 10px; width: 100%; flex-wrap: wrap; }
@media (max-width: 520px) { .news-head { flex-wrap: wrap; } .news { padding: 16px; } }

/* ---------- Priority pop-up ---------- */
dialog.priority-dialog { width: min(600px, calc(100vw - 24px)); padding: 0; }
dialog.priority-dialog::backdrop { background: rgba(10, 20, 30, .75); backdrop-filter: blur(3px); }
.priority-band { background: var(--danger); color: #fff; font-weight: 700; padding: 12px 18px; display: flex; gap: 8px; align-items: center; letter-spacing: .02em; }
.priority-band svg { width: 20px; height: 20px; }
.priority-dialog .dlg-body { display: grid; gap: 12px; }
.priority-dialog h2 { font-size: 1.3rem; margin: 0; }
.priority-dialog .dlg-body > p.muted { margin: 0; }
.btn.wide { width: 100%; min-height: 50px; font-size: 1rem; }
.news-head { display: grid; gap: 4px; }
.news-head h2 .unread-dot { vertical-align: 3px; margin-right: 4px; }
.news-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.field-label .hint { display: block; font-weight: 400; color: var(--text-muted); font-size: .8rem; }

/* ---------- Push prompt ---------- */
.push-banner { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--brand-accent-soft); border: 1px solid color-mix(in srgb, var(--brand-accent) 40%, transparent); color: var(--text); border-radius: var(--brand-radius); padding: 14px 16px; margin-bottom: 16px; }
.push-banner > svg { width: 26px; height: 26px; color: var(--brand-primary); flex: none; }
.push-banner .grow { display: grid; gap: 2px; min-width: 200px; flex: 1; }
.push-banner .grow span { color: var(--text-muted); font-size: .88rem; }
.news-list > .push-banner { margin-bottom: 0; }

/* ---------- Audience picker & groups ---------- */
.aud-pick { display: grid; gap: 14px; margin-top: 14px; }
.aud-sec { display: grid; gap: 8px; }
.aud-sec .choice > span { min-height: 34px; padding: 5px 12px; font-size: .85rem; }
.aud-sec .choice small { margin-left: 4px; }
.hint-link { font-weight: 400; font-size: .8rem; margin-left: 8px; }
.people-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.people-list.tall { max-height: 320px; }
.person-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--border); cursor: pointer; font-weight: 400; }
.person-row:last-child { border-bottom: 0; }
.person-row:hover { background: var(--surface-2); }
.person-row input { width: 18px; height: 18px; min-height: 0; flex: none; accent-color: var(--brand-primary); }
.person-row:has(input:checked) { background: var(--brand-accent-soft); }
.aud-summary { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.aud-summary.empty-aud { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.tile-icon.sm { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-accent-soft); color: var(--brand-primary); display: grid; place-items: center; flex: none; }
.tile-icon.sm svg { width: 20px; height: 20px; }
.check input:disabled + * , .check:has(input:disabled) { opacity: .7; }

/* ---------- Equipment ---------- */
.check-cards { display: grid; gap: 10px; }
.check-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--border); border-radius: var(--brand-radius); padding: 14px 16px; box-shadow: var(--shadow); }
.check-card.due { border-left-color: var(--warn); }
.check-card.overdue { border-left-color: var(--danger); }
.check-card.ok { border-left-color: var(--ok); }
.check-card .grow { display: grid; gap: 4px; min-width: 0; }
.check-card .grow > a { color: inherit; }
@media (max-width: 520px) { .check-card { flex-wrap: wrap; } .check-card > .btn { width: 100%; } }
.eq-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; }
@media (max-width: 760px) { .eq-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.filters input { max-width: 280px; } .filters select { width: auto; }
.action-stack { display: grid; gap: 8px; }
.checklist-preview { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: .9rem; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cl-card { border: 1px solid var(--border); border-radius: var(--brand-radius); padding: 14px; display: grid; gap: 10px; align-content: start; background: var(--surface-2); }
.cl-card header { display: grid; gap: 2px; }
.cl-card p { margin: 0; }

/* ---------- Defects dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 960px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .kpis { grid-template-columns: 1fr; } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--brand-radius); padding: 14px 16px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.kpi-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--text-muted); display: flex; gap: 6px; align-items: center; }
.kpi-num { font-size: 2.2rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.kpi-num small { font-size: .95rem; font-weight: 600; color: var(--text-muted); }
.kpi-sub { font-size: .82rem; color: var(--text-muted); }
.kpi.alert { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); background: color-mix(in srgb, var(--danger-bg) 55%, var(--surface)); }
.kpi.alert .kpi-label { color: var(--danger); }
.dash-row { margin-bottom: 16px; }
.hbars { display: grid; gap: 10px; }
.hbar-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 36px; gap: 10px; align-items: center; }
.hbar-label { font-size: .88rem; color: var(--text); }
.hbar-track { height: 18px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hbar-track i { display: block; height: 100%; background: var(--brand-primary); border-radius: 0 4px 4px 0; min-width: 0; }
.hbar-track i.old, .hbar-track i.sev-unsafe { background: var(--danger); }
.hbar-track i.sev-major { background: var(--warn); }
.hbar-track i.sev-minor { background: var(--text-muted); }
.hbar-val { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.hbar-row:hover .hbar-track { outline: 2px solid var(--border); }
.age-cell { white-space: nowrap; }
.age-bar { display: inline-block; width: 70px; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.age-bar i { display: block; height: 100%; background: var(--brand-primary); border-radius: 0 4px 4px 0; }
.age-cell .num { font-variant-numeric: tabular-nums; font-size: .88rem; }
.chip { text-decoration: none; display: inline-flex; align-items: center; }
.chip-gap { width: 10px; }
.defect-table td:first-child, .defect-table td:nth-last-child(2) { white-space: nowrap; }
.defect-table .def-cell { min-width: 220px; }
.defect-table .def-cell strong { font-weight: 600; }
.age-bar { width: 48px; }

/* ---------- Mission, vision & values ---------- */
.mission-strip { display: grid; gap: 4px; padding: 14px 18px; margin-bottom: 18px; border-radius: var(--brand-radius); background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--brand-accent); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.mission-strip:hover { border-color: var(--brand-accent); }
.mission-strip > span:last-child { font-size: 1rem; line-height: 1.45; }
.mv-label { display: inline-flex; gap: 6px; align-items: center; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-primary); }
.mv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.mv-card { border-radius: var(--brand-radius); padding: 24px 26px; display: grid; gap: 10px; align-content: start; }
.mv-card.mission { background: var(--header-bg); color: var(--header-text); }
.mv-card.mission .mv-label { color: inherit; opacity: .8; }
.mv-card.vision { background: var(--brand-accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--brand-accent) 30%, transparent); }
.mv-statement { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.4; font-weight: 600; text-wrap: pretty; max-width: 48ch; }
.values-heading { margin: 28px 0 12px; font-size: 1.25rem; }
.values-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.value-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--brand-radius); padding: 18px; display: grid; gap: 8px; align-content: start; box-shadow: var(--shadow); }
.value-card h3 { margin: 0; font-size: 1.05rem; }
.value-card p { margin: 0; color: var(--text-muted); font-size: .92rem; }
.value-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-accent-soft); color: var(--brand-primary); font-weight: 800; font-size: 1.1rem; }
.val-rows { display: grid; gap: 10px; margin-bottom: 10px; }
.val-row { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.val-fields { flex: 1; display: grid; gap: 6px; min-width: 0; }
.val-fields textarea { min-height: 56px; }
.val-actions { display: flex; flex-direction: column; gap: 2px; }
.val-actions .icon-btn { color: var(--text-muted); padding: 4px 8px; font-size: 1rem; }
.val-actions .icon-btn:hover { background: var(--surface); }
.val-actions .icon-btn:disabled { opacity: .3; cursor: default; }

/* ---------- Section switches ---------- */
.toggles > li { gap: 16px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .slider { width: 46px; height: 26px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::after { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--brand-accent); outline-offset: 2px; }
.switch input:disabled + .slider { opacity: .6; }
.switch-text { font-size: .85rem; font-weight: 600; width: 26px; color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .switch .slider, .switch .slider::after { transition: none; } }

/* ---------- Alacri name ---------- */
.name-combo { display: flex; align-items: stretch; }
.name-combo input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.name-combo .name-suffix { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-left: 0; border-radius: 0 8px 8px 0; background: var(--surface-2); font-weight: 700; color: var(--text); }
.login-brand h1.app-title { font-weight: 400; letter-spacing: -.01em; }
.login-brand h1.app-title b { font-weight: 800; }

/* ---------- Alacri brand marks ---------- */
.splash { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--text-muted); }
.splash img { border-radius: 16px; box-shadow: 0 8px 24px rgba(22, 27, 51, .25); }
@media (prefers-reduced-motion: no-preference) { .splash img { animation: splash-in .5s ease both; } }
@keyframes splash-in { from { transform: scale(.9); opacity: 0; } }
.powered { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.powered img { height: 18px; width: auto; display: block; }
.login-form { flex-direction: column; gap: 20px; }
.login-powered { opacity: .85; }
.nav-powered { margin: 24px 12px 8px; opacity: .7; }
.nav-powered img { height: 16px; }

/* No company logo: keep the app name visible on phones, next to the Alacri symbol */
@media (max-width: 860px) { .topbar:has(img.logo.is-symbol) .app-name { display: inline; border-left: 0; padding-left: 0; font-size: .95rem; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; } }

/* ---------- Sign in with Microsoft ---------- */
.ms-btn { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border); font-weight: 600; gap: 10px; min-height: 44px; }
.ms-btn:hover { background: var(--surface-2); }
.ms-logo { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.badge .ms-logo { width: 11px; height: 11px; vertical-align: -1px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: .8rem; margin: 2px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
#ms-slot { display: grid; gap: 12px; }
#ms-slot:empty, #ms-error:empty { display: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-primary); text-decoration: underline; cursor: pointer; font: inherit; justify-self: start; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; word-break: break-all; }
.find-btn { border-radius: 0 8px 8px 0; }
.tech { margin-top: 12px; } .tech summary { cursor: pointer; color: var(--text-muted); font-size: .88rem; }
.signin-admin h2 svg { width: 20px; height: 20px; vertical-align: -3px; margin-right: 4px; }

/* ---------- Company, offices & directory ---------- */
.contact-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .86rem; }
.contact-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-primary); text-decoration: none; min-width: 0; }
.contact-links a:hover span { text-decoration: underline; }
.contact-links svg { width: 15px; height: 15px; color: var(--text-muted); flex: none; }
.contact-links span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list.directory > li { flex-wrap: wrap; }
.list.directory .row-link { flex: 1 1 260px; }
.list.directory .contact-links { flex: 1 1 320px; justify-content: flex-end; }
@media (max-width: 640px) { .list.directory .contact-links { justify-content: flex-start; padding-left: 48px; } }
.office-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.office-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--brand-radius); padding: 16px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); }
.office-card header { display: flex; gap: 10px; align-items: center; }
.office-card p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.profile-head .meta svg { width: 14px; height: 14px; vertical-align: -2px; }
.sub-office-tick { align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.sub-office-tick input { margin-top: 3px; }
.sub-office-tick small { display: block; font-weight: 400; margin-top: 2px; }
.company-admin .field-grid > span:empty { display: block; }

/* Employee form: groups shown in the staff list, and news-posting switches */
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mini-chip { font-size: .72rem; padding: 1px 8px; border-radius: 999px; background: var(--surface-2, var(--bg)); border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.news-rights { display: grid; gap: 4px; }
.news-rights .nr-opts { display: grid; gap: 2px; }
.news-rights .nr-opts[hidden] { display: none; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-of-type { border-bottom: 0; }
.switch-row small { display: block; }
.nr-group-list { padding: 4px 0 0 0; }
.switch-row > .grow { flex: 1; min-width: 0; }
.mini-chip.sec { background: color-mix(in srgb, var(--brand-primary) 10%, transparent); border-color: color-mix(in srgb, var(--brand-primary) 30%, transparent); color: var(--brand-primary); font-weight: 600; }
.ack-card { border: 2px solid var(--warn, #b45309); }
.ack-card h2 { display: flex; gap: 8px; align-items: center; }
