:root {
  --bg: #f4f6f8; --surface: #ffffff; --surface-2: #eef1f4; --text: #1a202c; --muted: #5b6672; --border: #d9dee4;
  --primary: #0f766e; --primary-ink: #ffffff; --primary-soft: #d9f1ee;
  --green: #16a34a; --green-soft: #dcfce7; --red: #dc2626; --red-soft: #fee2e2; --orange: #f97316; --orange-soft: #ffedd5;
  --yellow: #eab308; --yellow-soft: #fef9c3; --blue: #2563eb; --blue-soft: #dbeafe; --grey: #9aa3ad; --grey-soft: #e5e7eb;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
  --nav-h: 60px; --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1419; --surface: #1a2029; --surface-2: #232b36; --text: #e6e9ee; --muted: #9aa5b3; --border: #2f3946;
    --primary: #2dd4bf; --primary-ink: #04201c; --primary-soft: #113b37; --green-soft: #113a23; --red-soft: #3f1515; --orange-soft: #3f2410;
    --yellow-soft: #3a3410; --blue-soft: #14274a; --grey-soft: #2d3542; --shadow: 0 1px 2px rgba(0,0,0,.4); }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .75rem; }
.splash { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.hidden { display: none !important; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: .75rem; }
.right { text-align: right; } .center { text-align: center; }
.mt { margin-top: 1rem; } .mb { margin-bottom: 1rem; }

/* layout */
.shell { display: flex; min-height: 100vh; }
.sidebar { display: none; width: 230px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); padding: 1rem .75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { font-weight: 700; font-size: 1.05rem; padding: .25rem .5rem .9rem; }
.sidebar a { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 8px; color: var(--text); }
.sidebar a.active, .sidebar a:hover { background: var(--primary-soft); color: var(--primary); }
.sidebar .sect { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .9rem .6rem .3rem; }
.main { flex: 1; min-width: 0; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 1rem); }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); padding: .6rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.topbar .title { font-weight: 600; font-size: 1.05rem; }
.content { padding: 1rem; max-width: 1200px; margin: 0 auto; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--surface); border-top: 1px solid var(--border); display: flex; z-index: 20; }
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; color: var(--muted); position: relative; }
.bottomnav a.active { color: var(--primary); }
.bottomnav .ico, .sidebar .ico { font-size: 1.25rem; line-height: 1; width: 1.5rem; text-align: center; }
.navbadge { position: absolute; top: 6px; right: calc(50% - 22px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: .65rem; line-height: 16px; text-align: center; font-weight: 700; }
.sidebar .navbadge { position: static; margin-left: auto; }
@media (min-width: 960px) { .sidebar { display: block; } .bottomnav { display: none; } .main { padding-bottom: 1rem; } }

/* components */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.card + .card { margin-top: .75rem; }
.card.tight { padding: .6rem .75rem; }
.grid { display: grid; gap: .75rem; }
.grid.two { grid-template-columns: 1fr; } .grid.three { grid-template-columns: 1fr; } .grid.four { grid-template-columns: 1fr 1fr; }
@media (min-width: 700px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: 1fr 1fr 1fr; } .grid.four { grid-template-columns: repeat(4, 1fr); } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem .95rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; min-height: 40px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.warn { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: .3rem .6rem; min-height: 32px; font-size: .85rem; border-radius: 8px; }
.btn.big { font-size: 1.15rem; padding: 1rem; min-height: 64px; width: 100%; border-radius: 16px; }
.btn.block { width: 100%; }
.badge { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--grey-soft); color: var(--text); white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); } .badge.red { background: var(--red-soft); color: var(--red); }
.badge.orange { background: var(--orange-soft); color: var(--orange); } .badge.yellow { background: var(--yellow-soft); color: #854d0e; }
.badge.blue { background: var(--blue-soft); color: var(--blue); } .badge.primary { background: var(--primary-soft); color: var(--primary); }
.chip { display: inline-block; font-size: .72rem; padding: .1rem .45rem; border-radius: 6px; background: var(--yellow-soft); color: #854d0e; margin: 1px; }
.chip.soft { background: var(--blue-soft); color: var(--blue); }
.alert { padding: .7rem .9rem; border-radius: 10px; border: 1px solid; margin-bottom: .75rem; }
.alert.warn { background: var(--yellow-soft); border-color: var(--yellow); color: #713f12; }
.alert.error { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.alert.info { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.alert.ok { background: var(--green-soft); border-color: var(--green); color: var(--green); }

label.f { display: block; margin-bottom: .7rem; }
label.f > span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .25rem; font-weight: 600; }
input.in, select.in, textarea.in { width: 100%; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); min-height: 40px; }
textarea.in { min-height: 80px; resize: vertical; }
.check { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.check input { width: 18px; height: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 .75rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span2 { grid-column: span 2; } }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: .75rem; }
.filters label.f { margin: 0; min-width: 140px; flex: 1; }
.filters .in { min-height: 38px; padding: .4rem .6rem; }

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.t th, table.t td { padding: .5rem .55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; white-space: nowrap; }
table.t th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover { background: var(--surface-2); }
table.t td.wrap { white-space: normal; }

.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .modal-back { align-items: center; } }
.modal { background: var(--surface); width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 1rem; box-shadow: var(--shadow); }
@media (min-width: 640px) { .modal { border-radius: 16px; } }
.modal.wide { max-width: 900px; }
.modal .mhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.modal .mactions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1rem; }
#toast-root { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: .4rem; pointer-events: none; width: min(92vw, 420px); }
.toast { background: #1f2937; color: #fff; padding: .6rem .9rem; border-radius: 10px; box-shadow: var(--shadow); font-size: .9rem; animation: fadein .2s; }
.toast.ok { background: var(--green); } .toast.err { background: var(--red); } .toast.warn { background: var(--orange); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* clock screen */
.clock-hero { text-align: center; padding: 1.2rem .5rem; }
.clock-hero .time { font-size: 2.6rem; font-weight: 700; letter-spacing: .01em; }
.state-pill { display: inline-block; padding: .35rem .9rem; border-radius: 999px; font-weight: 700; }
.state-pill.in { background: var(--green-soft); color: var(--green); } .state-pill.break { background: var(--orange-soft); color: var(--orange); } .state-pill.out { background: var(--grey-soft); color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px dashed var(--border); gap: .5rem; }
.timeline li:last-child { border-bottom: 0; }
.camera-box { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; max-height: 60vh; }
.camera-box video, .camera-box img, .camera-box canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.photo-big { width: 100%; max-width: 320px; border-radius: 12px; border: 1px solid var(--border); }
.cmp { display: flex; gap: .75rem; align-items: flex-start; }
.cmp figure { margin: 0; text-align: center; flex: 1; } .cmp figcaption { font-size: .72rem; color: var(--muted); margin-top: .25rem; }
.cmp img { width: 100%; max-width: 220px; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }

/* live board */
.light { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--grey); flex-shrink: 0; box-shadow: 0 0 0 2px var(--surface); }
.light.in { background: var(--green); } .light.break { background: var(--orange); } .light.absent { background: var(--red); }
.light.out { background: var(--blue); } .light.expected { background: #cbd5e1; } .light.off { background: var(--grey); opacity: .6; }
.light.leave { background: #8b5cf6; }
.badge.purple { background: #ede9fe; color: #6d28d9; }
.sched .cell.leave { background: #ede9fe; color: #6d28d9; }
.doc-row { display: flex; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.doc-row:last-child { border-bottom: 0; }
.doc-ico { font-size: 1.4rem; width: 2rem; text-align: center; }
.progress { height: 10px; background: var(--grey-soft); border-radius: 5px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); transition: width .2s; }
.rec-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.rec-head img, .rec-head .noimg { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; border: 1px solid var(--border); background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.8rem; }
.light.attention { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--yellow); }
.light.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: .15; } 100% { opacity: 1; } }
.board { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .board { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .board { grid-template-columns: 1fr 1fr 1fr; } }
.people { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.person { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .6rem .3rem .45rem; border-radius: 999px; background: var(--surface-2); font-size: .82rem; cursor: pointer; border: 1px solid transparent; }
.person:hover { border-color: var(--border); }
.person .pos { color: var(--muted); font-size: .72rem; }
.bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--grey-soft); margin: .4rem 0; }
.bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem .9rem; font-size: .8rem; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; }
.kpi .card { padding: .6rem .7rem; } .kpi .n { font-size: 1.5rem; font-weight: 700; } .kpi .l { font-size: .75rem; color: var(--muted); }

/* schedule grid */
.sched { font-size: .8rem; }
.sched td { white-space: nowrap; }
.sched .cell { display: block; padding: .3rem .4rem; border-radius: 6px; cursor: pointer; min-width: 84px; text-align: center; border: 1px solid transparent; }
.sched .cell.default { color: var(--muted); } .sched .cell.override { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); }
.sched .cell.off { background: var(--grey-soft); color: var(--muted); } .sched .cell.holiday { background: var(--yellow-soft); color: #854d0e; }
.sched .cell.ot { box-shadow: inset 0 -3px 0 var(--orange); }
.sched .cell:hover { border-color: var(--primary); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: .75rem; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: .55rem .8rem; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.approve-item { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; }
.approve-item .photos { display: flex; gap: .4rem; }
.approve-item .photos img { width: 72px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.login-box { max-width: 420px; margin: 8vh auto; }
.menu-list a { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: .5rem; color: var(--text); font-weight: 600; }
.kbd { font-family: ui-monospace, monospace; background: var(--surface-2); padding: .1rem .35rem; border-radius: 4px; font-size: .85em; }

/* notifications bell + inbox, event people picker */
.topbar .bell { position: relative; text-decoration: none; font-size: 1.15rem; line-height: 1; padding: .2rem .35rem; border-radius: 8px; }
.topbar .bell:hover { background: var(--grey-soft); }
.topbar .bell .navbadge { top: -6px; right: -8px; left: auto; }
.notif { display: flex; gap: .75rem; padding: .7rem .9rem; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: var(--primary-soft); }
.notif .nt { font-weight: 600; }
.pick { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: .4rem .6rem; }
.pick label { display: flex; gap: .5rem; align-items: center; padding: .25rem 0; font-size: .9rem; cursor: pointer; }

/* chat */
.chat { display: flex; height: calc(100vh - 150px); min-height: 420px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.chat-list { width: 300px; flex-shrink: 0; border-right: 1px solid var(--border); overflow: auto; padding: .5rem; }
.chat-thread { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.conv { padding: .55rem .6rem; border-radius: 8px; cursor: pointer; } .conv:hover, .conv.active { background: var(--primary-soft); }
.chat-head { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border-bottom: 1px solid var(--border); }
.chat-msgs { flex: 1; overflow: auto; padding: .8rem; display: flex; flex-direction: column; gap: .3rem; background: var(--bg, #f3f4f6); }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; } .msg.mine { align-self: flex-end; align-items: flex-end; }
.msg .who { font-size: .7rem; color: var(--muted); margin: 0 .3rem; } .msg.mine .who { display: none; }
.msg .bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .45rem .7rem; white-space: pre-wrap; word-break: break-word; }
.msg.mine .bubble { background: var(--primary); color: #fff; border-color: var(--primary); } .msg.mine .bubble .muted { color: rgba(255,255,255,.75); } .msg.mine .bubble a { color: #fff; }
.msg.sys { align-self: center; max-width: 100%; } .msg.sys .bubble { background: transparent; border: 0; color: var(--muted); font-size: .75rem; padding: .1rem .4rem; }
.msg img { max-width: 260px; max-height: 260px; border-radius: 8px; display: block; margin-bottom: .2rem; }
.chat-day { align-self: center; font-size: .7rem; color: var(--muted); margin: .4rem 0; }
.chat-compose { display: flex; gap: .4rem; padding: .5rem; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-compose textarea { flex: 1; resize: none; max-height: 120px; min-height: 38px; }
@media (max-width: 959px) { .chat { height: calc(100vh - 175px); } .chat-list { width: 100%; border-right: 0; } .chat-thread { display: none; } .chat.show-thread .chat-list { display: none; } .chat.show-thread .chat-thread { display: flex; } }
@media (min-width: 960px) { .chat-head #back { display: none; } }

/* signature pad (policies) */
.sigpad { display: block; width: 100%; height: 160px; border: 1px dashed var(--border); border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }
.nowrap { white-space: nowrap; }

/* analytics bar charts */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 1rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bars .fill { width: 100%; border-radius: 4px 4px 0 0; }
.bars .val { font-size: .7rem; color: var(--muted); }
.bars .lbl { font-size: .65rem; color: var(--muted); margin-top: .2rem; white-space: nowrap; }

.board > .card.wide { grid-column: 1 / -1; }
.seg { display: inline-flex; gap: .2rem; padding: .15rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.deptgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; margin-top: .6rem; align-items: start; }
.deptblock { border: 1px solid var(--border); border-radius: 10px; padding: .5rem .6rem; background: var(--surface-2); }
.deptblock .people { margin-top: .4rem; }
.bar.thin { height: 6px; margin: .3rem 0; }

/* directory & org chart */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.dir-card { display: flex; gap: .7rem; align-items: flex-start; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--border); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); flex: none; }
.avatar.sm { width: 34px; height: 34px; font-size: .75rem; }
.org ul { list-style: none; margin: .2rem 0 .2rem 1rem; padding-left: .8rem; border-left: 2px solid var(--border); }
.org > ul { margin-left: 0; padding-left: 0; border-left: 0; }
.org li { margin: .3rem 0; }
/* org chart: boxes joined by lines (top-down tree) */
.orgwrap { overflow: auto; padding: 1rem; }
.otree { display: inline-block; min-width: 100%; }
.otree ul { display: flex; justify-content: center; list-style: none; margin: 0; padding: 22px 0 0; position: relative; }
.otree > ul { padding-top: 0; }
.otree li { position: relative; padding: 22px 8px 0; display: flex; flex-direction: column; align-items: center; }
.otree > ul > li { padding-top: 0; }
.otree li::before, .otree li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 2px solid var(--line, #94a3b8); }
.otree li::after { right: auto; left: 50%; border-left: 2px solid var(--line, #94a3b8); }
.otree li:only-child::before, .otree li:only-child::after { border-top: 0; }
.otree li:first-child::before, .otree li:last-child::after { border-top: 0; }
.otree li:last-child::before { border-right: 2px solid var(--line, #94a3b8); border-top-right-radius: 8px; }
.otree li:last-child::after { border-left: 0; }
.otree li:first-child::after { border-top-left-radius: 8px; }
.otree li:only-child::before { border-right: 2px solid var(--line, #94a3b8); border-radius: 0; }
.otree > ul > li::before, .otree > ul > li::after { display: none; }
.otree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--line, #94a3b8); margin-left: -1px; }
.otree.shelf > ul { justify-content: flex-start; flex-wrap: wrap; gap: .6rem; padding-top: .6rem; }
.otree.shelf > ul > li { padding: 0; }
.onode { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.onode.person { display: flex; align-items: center; gap: .5rem; padding: .3rem .6rem; white-space: nowrap; }
.otree > ul > li > .onode.person, .otree li > .onode.person { border-width: 2px; }
.onode.dept { min-width: 190px; padding: 0 0 .4rem; border: 2px solid var(--primary, #0f766e); }
.dept-title { background: var(--primary, #0f766e); color: var(--primary-ink, #fff); font-weight: 700; padding: .35rem .6rem; border-radius: 7px 7px 0 0; display: flex; justify-content: space-between; align-items: center; gap: .5rem; white-space: nowrap; }
.dept-title .badge { background: rgba(255, 255, 255, .25); color: inherit; }
.lead-slot { margin: .4rem .4rem 0; padding: .3rem; border: 1px dashed var(--border); border-radius: 8px; display: flex; flex-direction: column; gap: .2rem; }
.lead-slot .empty { padding: .3rem .2rem; }
.dept-members { margin: .4rem .4rem 0; display: flex; flex-direction: column; gap: .25rem; }
.dept-members .onode.person, .lead-slot .onode.person, .tray .onode.person { border-width: 1px; }
.tray-people { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; min-height: 2.4rem; }
.onode.storegroup { border: 2px solid var(--primary, #0f766e); padding-bottom: .4rem; }
.store-grid { display: grid; gap: .4rem; padding: .4rem .4rem 0; align-items: start; }
.store-card { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); text-align: left; min-width: 150px; padding-bottom: .3rem; }
.store-name { font-weight: 700; font-size: .85rem; padding: .3rem .4rem; background: var(--surface-2); border-radius: 7px 7px 0 0; display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.store-toggle { display: block; padding: 0 .4rem; }
.store-card .dept-members { margin: .3rem .3rem 0; }
.store-card .onode.person { white-space: normal; }
.orgfull { position: fixed; inset: 0; z-index: 2000; background: var(--bg); display: flex; flex-direction: column; }
.orgfull-bar { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .5rem .8rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.orgfull-body { flex: 1; overflow: auto; padding: 16px; text-align: center; }
.orgfull-body .otree { display: inline-block; min-width: 0; }
.movable { cursor: grab; user-select: none; }
.onode.person.approver { border-color: var(--green, #16a34a); }
.onode.person .badge { font-size: .65rem; }
.dragging { opacity: .4; }
.org-top { border: 2px dashed var(--border); border-radius: 10px; padding: .5rem .8rem; margin-bottom: 1rem; color: var(--muted); font-size: .85rem; text-align: center; position: sticky; left: 0; }
.onode.person.over, .lead-slot.over, .onode.dept.over, .tray.over, .org-top.over { outline: 3px dashed #2563eb; outline-offset: 2px; background: rgba(37, 99, 235, .08); }
.org .node { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
