/* Department workspaces: shared, responsive presentation over existing modules. */
:root { --paper:#f4f6f9; --sunken:#f8fafc; --line:#dce3eb; --line-2:#e9edf3; --tx-2:#475569; --tx-3:#64748b; }
body { background:var(--paper); }
.workspace-intro { margin-bottom:1.75rem; }
.workspace-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1.25rem; }
.workspace-kicker { color:#50647e; font-size:.7rem; font-weight:650; letter-spacing:.07em; text-transform:uppercase; margin:0 0 .6rem; }
.workspace-heading h1 { font-size:clamp(1.5rem,3vw,2.15rem); line-height:1.2; letter-spacing:-.04em; margin:0 0 .6rem; color:#16243b; }
.workspace-heading p:not(.workspace-kicker) { color:var(--tx-2); font-size:.9rem; line-height:1.6; margin:0; max-width:44rem; }
.workspace-date { white-space:nowrap; color:var(--tx-2); font-size:.78rem; padding:.5rem 0; }
.workspace-shortcuts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; }
.workspace-link { display:flex; align-items:flex-start; gap:.7rem; padding:1rem; background:#fff; border:1px solid var(--line); border-radius:12px; text-align:left; color:var(--tx-1); cursor:pointer; min-width:0; transition:border-color .15s,box-shadow .15s; }
.workspace-link:hover { border-color:#94a9c5; box-shadow:0 3px 12px #1b35520b; }
.workspace-link:focus-visible { outline:3px solid #2563eb; outline-offset:3px; }
.workspace-icon { display:grid; place-items:center; background:#edf2f9; color:#315682; border-radius:8px; width:2rem; height:2rem; flex-shrink:0; }
.workspace-icon svg { width:18px; height:18px; }
.workspace-link strong { display:block; font-size:.83rem; line-height:1.4; font-weight:650; }
.workspace-link small { display:block; margin-top:.35rem; font-size:.73rem; line-height:1.5; color:var(--tx-2); }
.workspace-link > svg { width:14px; height:14px; flex-shrink:0; margin-left:auto; color:#71829a; }
.panel { border-radius:12px; box-shadow:0 2px 5px #172b4d03; }
.crown { border-radius:14px; }
.crown::before,.crown::after { opacity:.18; }
.rail-link { border-radius:7px; }
button,input,select,textarea { font:inherit; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:2px solid #3979d2; outline-offset:3px; }
@media(max-width:1200px) { .workspace-shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
 .workspace-heading { display:block; } .workspace-date { display:block; margin-top:.6rem; }
 .workspace-shortcuts { gap:.5rem; } .workspace-link { padding:.8rem; gap:.5rem; flex-wrap:wrap; }
 .workspace-link > span:nth-child(2) { flex-basis:100%; } .workspace-link > svg { display:none; }
 .workspace-link strong { font-size:.8rem; } .workspace-link small { font-size:.72rem; }
 .workspace-intro { margin-bottom:1.25rem; }
 .dock-item { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; scroll-behavior:auto!important; } }

/* Professional shell: calm chrome, clear hierarchy, generous work surfaces. */
:root { --ui: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; --paper:#f5f7fa; --tx-1:#17263b; --tx-2:#526176; --tx-3:#68778c; }
#gate-mark:has(img) { width:min(100%,19rem); height:auto; aspect-ratio:2 / 1; background:transparent; border-radius:0; box-shadow:none; }
#rail-mark:has(img) { width:7.8rem; height:2.55rem; background:transparent; border-radius:0; box-shadow:none; }
#top-mark:has(img) { width:6.5rem; height:2.35rem; background:transparent; border-radius:0; box-shadow:none; }
.mark:has(img) img { object-fit:contain; }
.rail { background:#101e32; }
.rail::before,.rail::after { display:none; }
.rail-group { color:#8fa1b9; letter-spacing:.09em; font-size:.66rem; }
.rail-link { min-height:42px; margin-bottom:3px; color:#c0ccdc; }
.rail-link.is-on { background:#203854; border-color:#35516e; box-shadow:none; color:#fff; }
.rail-brand { padding-top:1.4rem; padding-bottom:1.4rem; }
.topbar { background:#fff; color:var(--tx-1); border-bottom:1px solid var(--line); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.topbar-head h1 { color:var(--tx-1); font-size:1.05rem; letter-spacing:-.025em; }
.topbar-head .eyebrow { color:var(--tx-3); letter-spacing:.06em; }
.topbar .btn-2,.jump-btn { background:#f7f9fc; border-color:var(--line); color:var(--tx-2); border-radius:8px; }
.topbar .btn-2:hover,.jump-btn:hover { color:var(--tx-1); background:#eef3fa; border-color:#b8c7da; }
.jump-btn svg,.topbar kbd { color:var(--tx-3); }
.topbar kbd { border-color:var(--line); background:white; }
.sync-status { background:#f8fafc; border-color:var(--line); color:var(--tx-2); font-size:.72rem; border-radius:6px; }
.sync-status.is-synced { color:#187456; background:#eff9f4; border-color:#d4eadf; }
.sync-status.is-saving,.sync-status.is-starting,.sync-status.is-pending { color:#235da7; background:#eff6ff; border-color:#d3e3f7; }
.sync-status.is-error,.sync-status.is-conflict,.sync-status.is-offline-pending { color:#a32f36; background:#fff2f2; border-color:#f2cfd2; }
.canvas { padding-top:1.8rem; }
.workspace-intro { max-width:82rem; }
.workspace-heading h1 { font-weight:650; font-size:clamp(1.5rem,2.2vw,1.95rem); }
.workspace-shortcuts { gap:1rem; }
.workspace-link { padding:1.1rem; border-radius:10px; }
.workspace-heading { margin-bottom:1.4rem; }
.panel { border:1px solid var(--line); box-shadow:0 2px 3px #1e334604; border-radius:10px; }
.canvas .panel > .panel-head { background:#fff; border-bottom:1px solid var(--line-2); padding:1.05rem 1.2rem; }
.canvas .panel > .panel-head h2,.canvas .panel > .panel-head h3 { color:var(--tx-1); font-size:.87rem; text-transform:none; letter-spacing:-.01em; font-weight:650; }
.canvas .panel > .panel-head .n { color:var(--tx-3); }
.crown { background:#fff; color:var(--tx-1); border:1px solid var(--line); border-radius:12px; box-shadow:0 2px 4px #1e334606; }
.crown::before,.crown::after { display:none; }
.crown-in { padding:1.4rem; }
.crown-top { margin-bottom:1.5rem; }
.crown-av { background:#edf3fb; color:#385d8b; box-shadow:none; }
.crown-who b,.crown-sub b { color:var(--tx-1); }
.crown-who em,.crown-sub { color:var(--tx-2); }
.crown-eyebrow { color:var(--tx-3); letter-spacing:.09em; }
.crown-figure { color:var(--tx-1); font-size:clamp(2rem,4vw,3rem); font-weight:620; letter-spacing:-.045em; }
.crown-figure.is-word { font-size:clamp(1.8rem,3vw,2.7rem); }
.crown-chip { background:#edf8f2; color:#187456; border:1px solid #d4eadf; }
.crown-chip.is-warn { background:#fff8eb; color:#94631c; border-color:#efdfbc; }
.crown-chip.is-warn::before { background:#b88228; animation:none; }
.crown .btn-crown { background:#2459a8; border:1px solid #2459a8; color:#fff; border-radius:7px; box-shadow:none; min-height:42px; }
.crown .btn-crown:hover { background:#1b478b; }
.crown .btn-crown-2 { background:#fff; border:1px solid var(--line); color:var(--tx-1); box-shadow:none; border-radius:7px; }
.crown-strip { border-top:1px solid var(--line); background:#f9fbfd; }
.crown-cell { border-color:var(--line); padding:1rem 1.2rem; }
.crown-cell dt,.crown-cell dd small { color:var(--tx-3); }
.crown-cell dd { color:var(--tx-1); font-size:1.1rem; }
.crown-spark .spark-scale { color:var(--tx-3); }
.crown-spark .spark path.line { stroke:#326abb; }
.crown-spark .spark path.area { fill:#326abb14; }
.crown-meter { background:#e7edf5; }
.crown-meter i { background:#326abb; }
.queue-head h2 { color:var(--tx-2); letter-spacing:.07em; }
.row { padding-top:1rem; padding-bottom:1rem; }
.row-m { color:var(--tx-2); }
.tag { border-radius:5px; }
.btn,.btn-2 { border-radius:7px; }
input,select,textarea { border-radius:7px; }
.module-intro { padding:.2rem 0 .45rem; }
.module-intro h2 { margin:.45rem 0; font-size:clamp(1.5rem,2.4vw,1.9rem); font-weight:620; letter-spacing:-.035em; }
.module-intro > p:last-child { color:var(--tx-2); font-size:.9rem; line-height:1.65; margin:.4rem 0; }
.record-panel { scroll-margin-top:90px; }
.record-toolbar { display:flex; align-items:end; gap:1rem; padding:1.2rem 1.2rem .9rem; }
.record-search { flex:1; }
.record-filter { width:12rem; }
.record-toolbar label { display:block; color:var(--tx-2); font-size:.76rem; margin-bottom:.45rem; font-weight:600; }
.record-toolbar input,.record-toolbar select { width:100%; min-height:44px; padding:.65rem .8rem; border:1px solid #ccd6e2; background:#fff; color:var(--tx-1); }
.record-summary { padding:0 1.2rem .9rem; color:var(--tx-3); font-size:.78rem; border-bottom:1px solid var(--line); }
.record-pager { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; padding:1rem 1.2rem; border-top:1px solid var(--line); color:var(--tx-2); font-size:.78rem; }
.record-pager > div { display:flex; align-items:center; gap:.8rem; }
.record-pager button { min-height:40px; }
.record-pager button:disabled { opacity:.45; cursor:not-allowed; }
.sheet-body > .rows > .row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; min-height:3.5rem; gap:.75rem; }
.sheet-body > .rows > .row .row-t { display:flex; align-items:center; gap:.6rem; min-width:0; }
.sheet-body > .rows > .row .row-t svg { width:1.15rem; height:1.15rem; flex:0 0 1.15rem; color:#315682; }
.sheet-body > .rows > .row .row-r { min-width:0; }
.doc-open { min-height:36px; padding:.4rem .65rem; font-size:.76rem; display:inline-flex; align-items:center; gap:.4rem; }
.doc-open svg { width:14px; height:14px; }
.document-row { min-height:102px; }
@media(max-width:61.99rem) {
 .topbar { position:sticky; top:0; left:0; right:0; margin:0; border-radius:0; width:100%; min-height:68px; padding:.75rem 1rem; transform:none!important; opacity:1!important; }
 .topbar-head h1 { font-size:1rem; }
 .canvas { padding-top:1.4rem; padding-bottom:7rem; }
 .dock { left:0; right:0; bottom:0; width:100%; max-width:none; transform:none; padding:.5rem .6rem max(.5rem,env(safe-area-inset-bottom)); border:0; border-top:1px solid var(--line); border-radius:0; background:#fff; box-shadow:0 -3px 15px #152c4508; backdrop-filter:none; }
 .dock-in { border:0; background:transparent; box-shadow:none; border-radius:0; max-width:36rem; margin:auto; }
 .dock-link { color:var(--tx-2); min-height:48px; border-radius:8px; }
 .dock-link.is-on { color:#2459a8; }
 .dock-pill { background:#eaf1fb; box-shadow:none; border:0; border-radius:8px; }
 .sync-status { max-width:120px; overflow:hidden; text-overflow:ellipsis; }
}
@media(max-width:600px) {
 .record-toolbar { align-items:stretch; flex-direction:column; gap:.8rem; }
 .record-filter { width:100%; }
 .record-pager { gap:.8rem; }
 .record-pager > div { width:100%; justify-content:space-between; gap:.5rem; }
 .row-t { white-space:normal; line-height:1.45; }
 .document-row .row-r { max-width:130px; }
 .workspace-link { padding:.85rem; }
 .crown-in { padding:1.15rem; }
 .crown-cell { padding:.9rem 1rem; }
}
@media(max-width:61.99rem) {
 .dock-in { width:100%; }
 .dock button { flex:1; color:var(--tx-2); min-height:48px; }
 .dock button.is-on { color:#2459a8; }
 .dock .dot { border-color:#fff; background:#b5791b; }
 .dock button.is-on .dot { border-color:#eaf1fb; }
}

/* CEO Google Calendar panel (owner only) */
.google-calendar-panel a { text-decoration: none; }
.google-calendar-panel .row-t a { color: inherit; }
.google-calendar-panel .row-t a:hover,
.google-calendar-panel .row-t a:focus-visible { color: var(--brand-ink); text-decoration: underline; }

/* ── history (4 Okt 2026) ── */
.hist-items { list-style: none; margin: 0; padding: .4rem var(--pad, 1.15rem) .2rem; display: grid; gap: .45rem; font-size: .86rem; }
.hist-items li { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: baseline; }
.hist-what { color: var(--tx-2); }
.hist-diff { flex-basis: 100%; color: var(--tx-3); font-size: .78rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hist-filter { display: flex; gap: .5rem; margin-top: .6rem; }
.hist-filter input { flex: 1; min-width: 0; min-height: 40px; border: 1px solid var(--line); border-radius: var(--r, 8px); padding: .4rem .65rem; font: inherit; }

/* ── daily work: routine counts + owner team board ───────────── */
.routine .check { align-items: center; }
.routine-r { display: inline-flex; gap: .35rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.team-work .row-r { display: inline-flex; flex-direction: row; gap: .5rem; align-items: center; }
.mini-meter { display: inline-block; width: 4.5rem; height: .4rem; border-radius: 99px; background: var(--line, #e4e7ec); overflow: hidden; }
.mini-meter i { display: block; height: 100%; background: var(--brand, #175cd3); border-radius: inherit; }
@media (max-width: 40rem) {
  .mini-meter { width: 3rem; }
  .routine-r .btn-xs { min-height: 44px; }
}
