/* Shared components (platform-owned): status chips, page header actions, detail button bar, report page, records sections
   (documents / comments / history), selectors, in-progress placeholder, settings landing + category cards. */

/* status chips (spec 16.5) – text + colour, never colour alone */
.st { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 650; white-space: nowrap; }
.st-planned { background: var(--st-planned-bg); color: var(--st-planned); } .st-progress { background: var(--st-progress-bg); color: var(--st-progress); }
.st-done { background: var(--st-done-bg); color: var(--st-done); } .st-cancelled { background: var(--st-cancelled-bg); color: var(--st-cancelled); }
.st-neutral { background: var(--st-neutral-bg); color: var(--st-neutral); }

/* detail pages */
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.detail-actions [data-act="back"] { margin-right: auto; }
.crumbs span[aria-hidden] { opacity: .6; }

/* report (list) pages */
.report-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-bottom: 12px; }
.report-bar .search-in { max-width: 320px; flex: 1 1 220px; height: 38px; }
.report-bar .input:not(.search-in) { width: auto; height: 38px; font-size: var(--fs-sm); }
.report .tbl tr.click:hover td { background: var(--primary-soft); }
.report .chip { height: 30px; }

/* records: documents, comments, history */
.doc-bar { margin-bottom: 12px; } .doc-bar .search-in { flex: 1 1 200px; max-width: 320px; } .doc-bar select.input { width: auto; }
.doc-list li { display: flex; align-items: center; gap: 12px; }
.doc-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex: none; }
.doc-ic { width: 44px; height: 44px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; flex: none; }
.doc-main { flex: 1; min-width: 0; } .doc-main a { color: var(--text); display: block; } .doc-main b { display: block; }
.cmt-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.cmt-form textarea.input { min-height: 44px; }
.cmt-list li { padding: 10px 0; } .cmt-body { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.aud .aud-what span { display: inline-block; margin-right: 10px; font-size: 12px; color: var(--text-3); } .aud .aud-what .k { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-2); }
.aud .mini { display: block; font-size: 11px; color: var(--text-3); }
@media (max-width: 560px) { .cmt-form { grid-template-columns: 1fr; } }

/* selector (employee / location / work model) */
.sel { position: relative; }
.sel-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 4px; }
.sel-it { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; cursor: pointer; } .sel-it.on, .sel-it:hover { background: var(--surface-3); }




/* in-progress placeholder */
.in-progress-area { display: block; margin-top: 8px; }

/* settings landing (spec 15.0: four equal cards) and category cards (spec 15.2) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text); text-decoration: none !important; transition: border-color .12s, transform .12s; cursor: pointer; text-align: left; font: inherit; }
.tile:hover { border-color: var(--primary); transform: translateY(-1px); }
.tile[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.tile-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; }
.tile-ic .icon { stroke: var(--primary); width: 22px; height: 22px; }
.tile b { font-size: var(--fs-md); font-weight: 700; } .tile small { color: var(--text-3); font-size: var(--fs-sm); }
.tile .n { font-size: var(--fs-xs); color: var(--text-3); }
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; } .cat-grid .tile { padding: 14px; gap: 6px; }
.cat-msg { margin: 16px 0; }

/* home quick cards (shared look) */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }

/* section headers with icon (spec 16.6) */
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; } .card-head h2 .icon { stroke: var(--primary); }
.topbar .menu-btn { display: none; }
@media (max-width: 960px) { .topbar .menu-btn { display: inline-flex; } body.own-mode .topbar .menu-btn { display: none; } }

/* ---------- hero banner (UI mockup 2) – shared by Home and Dashboard: navy → indigo → violet, greeting, one-line summary, white action ---------- */
.hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; padding: 28px 32px; margin-bottom: var(--gap);
  border-radius: var(--radius-xl); color: var(--hero-ink); overflow: hidden; background: var(--grad); }
.hero > div:first-child { min-width: 0; flex: 1 1 340px; }
.hero h1, .hero .hero-title { font-size: 30px; font-weight: 750; letter-spacing: -.025em; margin: 2px 0 6px; color: var(--hero-ink); line-height: 1.15; }
.hero p { margin: 0; color: var(--hero-ink-2); max-width: 620px; line-height: 1.5; }
.hero-date { font-size: var(--fs-sm); color: var(--hero-ink-2); }
.hero-btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: var(--radius); background: var(--hero-btn-bg); color: var(--hero-btn-ink);
  font-weight: 700; text-decoration: none !important; flex: none; }
.hero-btn:hover { background: color-mix(in srgb, var(--hero-btn-bg) 90%, var(--brand-400)); }
.hero-btn .icon { stroke: currentColor; }
.hero .skel { background: rgba(255, 255, 255, .25); }
.hero a:focus-visible { outline-color: #fff; }
@media (max-width: 600px) {
  .hero { padding: 22px 20px; background: linear-gradient(150deg, var(--hero-from) 0%, var(--hero-mid) 75%, color-mix(in srgb, var(--hero-mid) 60%, var(--hero-to)) 100%); }
  .hero h1, .hero .hero-title { font-size: 24px; } .hero-btn { width: 100%; justify-content: center; }
}

/* ---------- icon chips (KPI cards, quick cards): soft-coloured rounded square + coloured icon ---------- */
.ic-chip { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); font-weight: 700; }
.ic-chip .icon { width: 20px; height: 20px; stroke: currentColor; }
.ic-chip.tone-ok { background: var(--success-bg); color: var(--success); } .ic-chip.tone-warn { background: var(--warning-bg); color: var(--warning); }
.ic-chip.tone-amber { background: var(--st-progress-bg); color: var(--st-progress); } .ic-chip.tone-danger { background: var(--danger-bg); color: var(--danger); }
.ic-chip.tone-info { background: var(--info-bg); color: var(--info); } .ic-chip.tone-brand { background: var(--primary-soft); color: var(--primary); }
.ic-chip.tone-violet { background: color-mix(in srgb, var(--c-6) 15%, var(--surface)); color: color-mix(in srgb, var(--c-6) 70%, var(--text)); }
@media (max-width: 420px) { .ic-chip { width: 36px; height: 36px; border-radius: 10px; } }
/* needs-attention strip (Home, Dashboard – spec 2.5) */
.attention-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.attention { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; }
.attention b { font-size: 24px; font-weight: 750; min-width: 28px; font-variant-numeric: tabular-nums; color: var(--text-3); } .attention span { font-size: var(--fs-sm); color: var(--text-2); }
.attention.on b { color: var(--warning); } .attention:hover { box-shadow: var(--shadow), 0 0 0 1px var(--brand-400); }
/* numbers below zero (overtime) */
.neg { color: var(--danger); }
.ts-kpis { margin-bottom: var(--gap); }
