/* ==========================================================================
   BAKAID ERP v3 — design system
   Indigo structure, marigold reserved for the attendance dial, Public Sans.
   ========================================================================== */

@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url("../vendor/fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-display: swap; src: url("../vendor/fonts/public-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/public-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 800; font-display: swap; src: url("../vendor/fonts/public-sans-latin-800-normal.woff2") format("woff2"); }

:root {
  --indigo-950: #141833;
  --indigo-900: #1b2045;
  --indigo-800: #262d5e;
  --indigo-700: #33408a;
  --indigo-600: #3d4fc1;
  --indigo-500: #5468d8;
  --indigo-100: #e6e9fb;
  --indigo-50:  #f2f4fd;
  --marigold:   #f0a202;
  --marigold-d: #c98400;
  --marigold-50:#fff6e0;

  --ink:      #1a1e2c;
  --ink-2:    #4a5068;
  --ink-3:    #7a8099;
  --line:     #e2e5ee;
  --line-2:   #eef0f5;
  --surface:  #f5f6fa;
  --panel:    #ffffff;

  --ok:   #1e8e5a; --ok-bg:   #e5f5ec;
  --bad:  #c8402e; --bad-bg:  #fbeae7;
  --warn: #a8670a; --warn-bg: #fdf1dc;
  --info: #2f6fb3; --info-bg: #e7f0fa;

  --r-sm: 6px; --r: 8px; --r-lg: 12px;
  --shadow: 0 1px 2px rgba(20,24,51,.06), 0 2px 8px rgba(20,24,51,.04);
  --shadow-pop: 0 12px 32px rgba(20,24,51,.18);
  --side-w: 248px;
  --top-h: 60px;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--ink); }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
a { color: var(--indigo-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
small, .small { font-size: .82rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--indigo-500) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--indigo-100); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted, .text-muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ── App shell ─────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--indigo-950); color: #c9cdea; display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: var(--indigo-800) transparent;
}
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.25rem 1rem; color: #fff; text-decoration: none !important; }
.brand img { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.brand b { display: block; font-size: 1.05rem; letter-spacing: .02em; }
.brand span { display: block; font-size: .72rem; color: #8f95c4; }
.nav { padding: .25rem .75rem 1rem; flex: 1; }
.nav-group { margin-top: 1.1rem; }
.nav-group > p { margin: 0 0 .3rem .6rem; font-size: .72rem; font-weight: 600; color: #7c82b5; }
.nav a {
  display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: var(--r);
  color: #c9cdea; font-weight: 500; font-size: .9rem; text-decoration: none;
}
.nav a i { font-size: 1.05rem; width: 1.2rem; text-align: center; color: #8f95c4; }
.nav a:hover { background: var(--indigo-900); color: #fff; }
.nav a.active { background: var(--indigo-800); color: #fff; box-shadow: inset 3px 0 0 var(--marigold); }
.nav a.active i { color: var(--marigold); }
.nav .count { margin-left: auto; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--marigold); color: var(--indigo-950); font-size: .72rem; font-weight: 700; text-align: center; }
.side-foot { padding: .9rem 1.25rem; border-top: 1px solid var(--indigo-900); font-size: .75rem; color: #7c82b5; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 1rem;
  padding: 0 1.75rem; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; background: none; border: 0; font-size: 1.4rem; color: var(--ink); padding: .25rem; cursor: pointer; }
.crumbs { display: flex; align-items: center; gap: .45rem; font-size: .86rem; color: var(--ink-3); min-width: 0; }
.crumbs a { color: var(--ink-2); }
.crumbs i { font-size: .7rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink-2); font-size: 1.15rem; cursor: pointer; text-decoration: none !important;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .64rem; font-weight: 700; line-height: 16px; }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--indigo-100); color: var(--indigo-700); font-weight: 700; font-size: .8rem; flex-shrink: 0;
}
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.user-menu { position: relative; }
.user-menu > button { display: flex; align-items: center; gap: .55rem; background: none; border: 0; padding: .25rem .4rem; border-radius: 999px; cursor: pointer; font: inherit; color: var(--ink); }
.user-menu > button:hover { background: var(--line-2); }
.user-menu .who { text-align: left; line-height: 1.15; }
.user-menu .who b { display: block; font-size: .86rem; font-weight: 600; }
.user-menu .who span { font-size: .74rem; color: var(--ink-3); }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; padding: .35rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); z-index: 50;
}
.dropdown a, .dropdown button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem; border-radius: var(--r); color: var(--ink); font: inherit; font-size: .88rem; background: none; border: 0; text-align: left; cursor: pointer; text-decoration: none !important; }
.dropdown a:hover, .dropdown button:hover { background: var(--line-2); }
.dropdown .sep { height: 1px; background: var(--line); margin: .3rem 0; }

.content { width: 100%; max-width: 1320px; padding: 1.75rem; margin: 0 auto; flex: 1; }
.app-foot { padding: 1rem 1.75rem; font-size: .76rem; color: var(--ink-3); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.scrim { display: none; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .25s var(--ease); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(20,24,51,.45); z-index: 55; }
  .menu-btn { display: inline-block; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1.1rem; }
  .user-menu .who { display: none; }
}

/* ── Page header ───────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head p { margin: .3rem 0 0; color: var(--ink-2); max-width: 70ch; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; } /* legacy */
.page-header h1, .page-header h2 { font-size: 1.4rem; }

/* ── Panels / cards ────────────────────────────────────────── */
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel + .panel, .card + .card { margin-top: 1.25rem; }
.panel-head, .card-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .95rem 1.25rem; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-head h2, .card-header h2, .card-header h3 { font-size: 1rem; font-weight: 650; }
.panel-head p { margin: .15rem 0 0; font-size: .84rem; color: var(--ink-3); }
.panel-body, .card-body { padding: 1.25rem; }
.panel-foot { padding: .85rem 1.25rem; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.panel.flush .panel-body { padding: 0; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 1.25rem; }

/* ── Stats ─────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.15rem; }
.stat .label, .stat .lbl { font-size: .8rem; color: var(--ink-3); font-weight: 500; }
.stat .value, .stat .num { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-top: .15rem; }
.stat .hint { font-size: .78rem; color: var(--ink-3); margin-top: .1rem; }
.stat.tone-ok .value { color: var(--ok); } .stat.tone-bad .value { color: var(--bad); } .stat.tone-warn .value { color: var(--warn); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1rem; margin-bottom: 1.25rem; } /* legacy */

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1rem; min-height: 38px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--line-2); }
.btn:disabled, .btn.disabled { opacity: .55; pointer-events: none; }
.btn i { font-size: 1rem; }
.btn-primary { background: var(--indigo-600); border-color: var(--indigo-600); color: #fff; }
.btn-primary:hover { background: var(--indigo-700); border-color: var(--indigo-700); }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-success:hover { background: #17734a; }
.btn-danger { background: var(--panel); border-color: #f0c9c2; color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.btn-outline { background: transparent; }
.btn-sm { padding: .3rem .65rem; min-height: 30px; font-size: .8rem; }
.btn-lg { padding: .75rem 1.3rem; min-height: 46px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; gap: .35rem; flex-wrap: wrap; }

/* ── Pills / badges ────────────────────────────────────────── */
.pill, .badge { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; line-height: 1.5; background: var(--line-2); color: var(--ink-2); }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-indigo { background: var(--indigo-100); color: var(--indigo-700); }
.b-in, .b-active { background: var(--ok-bg); color: var(--ok); } .b-out, .b-inactive { background: var(--bad-bg); color: var(--bad); }
.b-admin { background: var(--indigo-100); color: var(--indigo-700); }

/* ── Alerts ────────────────────────────────────────────────── */
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--r); margin-bottom: 1.25rem; font-size: .9rem; border: 1px solid transparent; }
.alert i { font-size: 1.1rem; line-height: 1.3; }
.alert-success, .alert-ok { background: var(--ok-bg); color: #145c3b; border-color: #c4e8d4; }
.alert-error, .alert-danger, .alert-er { background: var(--bad-bg); color: #8c2a1d; border-color: #f2cdc6; }
.alert-warning, .alert-warn { background: var(--warn-bg); color: #7a4a05; border-color: #f4dcae; }
.alert-info { background: var(--info-bg); color: #1f4f82; border-color: #c9dcf1; }
.alert ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.action-msg { padding: .7rem 1rem; border-radius: var(--r); margin-bottom: 1rem; background: var(--info-bg); }
.error-box { background: var(--bad-bg); color: #8c2a1d; padding: .8rem 1rem; border-radius: var(--r); margin-bottom: 1rem; }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table, .table-wrap > table, .card table:not([class]) { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table-wrap > table th, .card table:not([class]) th {
  text-align: left; font-weight: 600; font-size: .78rem; color: var(--ink-3); padding: .65rem 1rem; background: #fafbfd;
  border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0;
}
.table td, .table-wrap > table td, .card table:not([class]) td { padding: .7rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover td, .table-wrap > table tbody tr:hover td { background: #fafbff; }
.table tr:last-child td { border-bottom: 0; }
.table .num, .table td.right { text-align: right; }
.table a.row-link { color: var(--ink); font-weight: 600; }
.table .sub { display: block; font-size: .78rem; color: var(--ink-3); }
.table tfoot td { font-weight: 700; background: #fafbfd; border-top: 1px solid var(--line); }
.col-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
.table-compact td, .table-compact th { padding: .45rem .75rem; }

/* ── Toolbar / filters ─────────────────────────────────────── */
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .85rem 1.25rem; border-bottom: 1px solid var(--line-2); }
.toolbar .grow { flex: 1; min-width: 200px; }
.search { position: relative; }
.search i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search .input { padding-left: 2.2rem; }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font-size: .8rem; font-weight: 600; text-decoration: none !important; }
.chip:hover { border-color: var(--indigo-500); color: var(--indigo-700); }
.chip.on { background: var(--indigo-900); border-color: var(--indigo-900); color: #fff; }
.chip .n { font-weight: 700; opacity: .7; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.field label, .form-label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink); margin-bottom: .35rem; }
.field label .req { color: var(--bad); margin-left: .15rem; }
.field .help, .form-hint { font-size: .78rem; color: var(--ink-3); margin-top: .3rem; }
.field .err { font-size: .78rem; color: var(--bad); margin-top: .3rem; }
.form-group { margin-bottom: 1rem; } .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.input, .form-control, select.input, textarea.input {
  width: 100%; padding: .55rem .75rem; min-height: 40px; border: 1px solid #d5d9e5; border-radius: var(--r); background: #fff;
  font: inherit; font-size: .9rem; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
textarea.input, textarea.form-control { min-height: 96px; resize: vertical; line-height: 1.45; }
select.input, select.form-control { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%237a8099' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; }
.input:focus, .form-control:focus { outline: none; border-color: var(--indigo-500); box-shadow: 0 0 0 3px var(--indigo-100); }
.input[readonly] { background: var(--surface); }
.input.is-invalid { border-color: var(--bad); }
.input-sm { min-height: 32px; padding: .3rem .6rem; font-size: .84rem; }
.check { display: flex; align-items: center; gap: .55rem; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--indigo-600); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: .6rem 1rem; }
.check-card { display: flex; gap: .7rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.check-card:has(input:checked) { border-color: var(--indigo-500); background: var(--indigo-50); }
.check-card input { margin-top: .2rem; width: 17px; height: 17px; accent-color: var(--indigo-600); }
.check-card b { display: block; font-size: .88rem; }
.check-card span { font-size: .78rem; color: var(--ink-3); }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; padding-top: 1.25rem; margin-top: 1.25rem; border-top: 1px solid var(--line-2); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; font-size: .95rem; margin-bottom: .75rem; }

/* ── Description list ──────────────────────────────────────── */
.kv { display: grid; grid-template-columns: minmax(140px, 34%) 1fr; margin: 0; }
.kv dt { padding: .6rem 0; color: var(--ink-3); font-size: .84rem; border-bottom: 1px solid var(--line-2); }
.kv dd { margin: 0; padding: .6rem 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; word-break: break-word; }
.kv dd.long { white-space: pre-wrap; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dt { border: 0; padding-bottom: 0; } }

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a { padding: .65rem .9rem; color: var(--ink-2); font-weight: 600; font-size: .88rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--indigo-700); border-color: var(--indigo-600); }
.tabs a .n { margin-left: .3rem; font-size: .74rem; background: var(--line-2); padding: 0 .4rem; border-radius: 99px; }

/* ── Empty state ───────────────────────────────────────────── */
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--ink-2); }
.empty > i { font-size: 2rem; color: var(--ink-3); }
.empty h3 { margin: .6rem 0 .3rem; }
.empty p { max-width: 46ch; margin: 0 auto 1rem; font-size: .9rem; }

/* ── Pagination ────────────────────────────────────────────── */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.25rem; border-top: 1px solid var(--line-2); font-size: .84rem; color: var(--ink-3); flex-wrap: wrap; }
.pager .btn-group .btn { min-width: 34px; }

/* ── Progress ──────────────────────────────────────────────── */
.bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--indigo-500); }
.bar.ok > span { background: var(--ok); } .bar.warn > span { background: #d9930f; } .bar.bad > span { background: var(--bad); }

/* ── Hub tiles (module launcher) ───────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.tile {
  display: flex; gap: .9rem; align-items: flex-start; padding: 1.1rem; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); color: var(--ink); text-decoration: none !important; transition: border-color .15s, box-shadow .15s;
}
.tile:hover { border-color: var(--indigo-500); box-shadow: 0 0 0 3px var(--indigo-50); }
.tile .ico { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--indigo-50); color: var(--indigo-600); font-size: 1.25rem; }
.tile b { display: block; font-size: .95rem; margin-bottom: .15rem; }
.tile span { font-size: .82rem; color: var(--ink-3); line-height: 1.4; display: block; }
.tile .meta { margin-top: .5rem; font-size: .76rem; font-weight: 600; color: var(--indigo-600); }
.tile-section { margin: 1.75rem 0 .75rem; font-size: .95rem; font-weight: 700; color: var(--ink-2); }
.tile-section:first-child { margin-top: 0; }

/* ── Lists / timeline ──────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: .8rem; align-items: center; padding: .75rem 1.25rem; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; font-size: .9rem; }
.list .meta { font-size: .78rem; color: var(--ink-3); }
.list a.title { color: var(--ink); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem 1rem; }
.timeline li::before { content: ""; position: absolute; left: -1.42rem; top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--indigo-500); }
.timeline .when { font-size: .76rem; color: var(--ink-3); }

/* ── Attendance dial (the one loud element) ────────────────── */
.clock-card { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; padding: 1.75rem; }
@media (max-width: 700px) { .clock-card { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1.25rem; } }
.dial {
  --p: 0; position: relative; width: 210px; height: 210px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; font: inherit;
  background: conic-gradient(var(--marigold) calc(var(--p) * 1%), #f3e7c9 0);
  display: grid; place-items: center; transition: transform .15s var(--ease), box-shadow .2s;
  box-shadow: 0 10px 30px rgba(240,162,2,.25);
}
.dial::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--indigo-950); }
.dial:hover:not(:disabled) { transform: scale(1.02); }
.dial:active:not(:disabled) { transform: scale(.98); }
.dial:disabled { cursor: not-allowed; filter: grayscale(.5); opacity: .8; }
.dial.out { background: conic-gradient(#8ea0ff calc(var(--p) * 1%), #dfe3fb 0); box-shadow: 0 10px 30px rgba(84,104,216,.25); }
.dial-face { position: relative; text-align: center; color: #fff; }
.dial-face .t { font-size: 2.3rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.dial-face .a { margin-top: .55rem; font-size: .95rem; font-weight: 700; color: var(--marigold); }
.dial.out .dial-face .a { color: #b7c2ff; }
.dial-face .s { margin-top: .2rem; font-size: .74rem; color: #a7acd6; }
.gps { display: flex; align-items: center; gap: .5rem; font-size: .86rem; color: var(--ink-2); margin-top: .6rem; }
.gps .led { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex-shrink: 0; }
.gps .led.ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.gps .led.wait { background: #d9930f; animation: pulse 1.2s infinite; }
.gps .led.bad { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
.today-strip { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem; }
.today-strip div { font-size: .8rem; color: var(--ink-3); }
.today-strip b { display: block; font-size: 1.05rem; color: var(--ink); }

/* ── Modal (native <dialog>) ───────────────────────────────── */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-pop); width: min(560px, calc(100vw - 2rem)); }
dialog.modal::backdrop { background: rgba(20,24,51,.45); }
dialog.modal .panel-head { border-bottom: 1px solid var(--line-2); }

/* ── Auth pages ────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 1fr); background: var(--panel); }
.auth-art { position: relative; background: var(--indigo-950); color: #fff; padding: 2.5rem 3rem; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-art .org { display: flex; align-items: center; gap: .8rem; }
.auth-art .org img { width: 46px; height: 46px; background: #fff; border-radius: 10px; padding: 4px; }
.auth-art .org b { font-size: 1.15rem; display: block; }
.auth-art .org span { font-size: .8rem; color: #a7acd6; }
.auth-clock { position: relative; }
.auth-clock .time { font-size: clamp(4rem, 9vw, 7.5rem); font-weight: 800; letter-spacing: -.045em; line-height: .9; }
.auth-clock .time .sec { color: var(--marigold); font-weight: 700; font-size: .38em; letter-spacing: 0; margin-left: .2rem; vertical-align: top; }
.auth-clock .date { margin-top: 1rem; font-size: 1.1rem; color: #c9cdea; }
.auth-art .note { font-size: .85rem; color: #8f95c4; max-width: 44ch; }
.auth-art .rings { position: absolute; right: -180px; bottom: -180px; width: 520px; height: 520px; border-radius: 50%; border: 56px solid var(--indigo-900); }
.auth-art .rings::after { content: ""; position: absolute; inset: 70px; border-radius: 50%; border: 18px solid rgba(240,162,2,.85); border-right-color: transparent; border-bottom-color: transparent; transform: rotate(20deg); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { font-size: 1.7rem; }
.auth-box .lead { color: var(--ink-2); margin: .4rem 0 1.75rem; }
.auth-box .field { margin-bottom: 1rem; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 2.75rem; }
.pw-wrap button { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--ink-3); font-size: 1.1rem; padding: .35rem; cursor: pointer; border-radius: 6px; }
.otp-input { font-size: 1.8rem !important; letter-spacing: .5em; text-align: center; font-weight: 700; padding: .6rem !important; }
.auth-foot { margin-top: 2rem; font-size: .8rem; color: var(--ink-3); display: flex; align-items: center; gap: .45rem; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { padding: 1.5rem; min-height: auto; } .auth-art .rings, .auth-art .note { display: none; } .auth-clock .time { font-size: 3.5rem; } .auth-clock { margin-top: 1.25rem; } }

.qr-box { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
.qr-box .qr { width: 196px; height: 196px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.qr-box .qr svg, .qr-box .qr img { width: 100%; height: 100%; display: block; }
@media (max-width: 600px) { .qr-box { grid-template-columns: 1fr; justify-items: center; } }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; letter-spacing: .08em; background: var(--surface); padding: .5rem .7rem; border-radius: var(--r); word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1rem; }
.codes span { background: var(--surface); padding: .45rem .7rem; border-radius: var(--r); text-align: center; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 2.3rem; margin-bottom: 1rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -.1rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--indigo-100); color: var(--indigo-700); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }

/* ── Error page ────────────────────────────────────────────── */
.page-plain { display: grid; place-items: center; min-height: 100vh; }
.error-page { text-align: center; padding: 2rem; max-width: 520px; }
.error-page .error-code { font-size: 4.5rem; font-weight: 800; color: var(--indigo-100); margin: 0; line-height: 1; }
.error-page h1 { margin: .5rem 0; }
.error-page p { color: var(--ink-2); }

/* ── Org chart ─────────────────────────────────────────────── */
.org ul { list-style: none; margin: 0; padding-left: 1.6rem; border-left: 1px dashed var(--line); }
.org > ul { border: 0; padding: 0; }
.org li { margin: .5rem 0; }
.org .node { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .8rem .45rem .45rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.org .node b { font-size: .86rem; display: block; }
.org .node span { font-size: .74rem; color: var(--ink-3); }

/* ── Utilities (legacy-compatible) ─────────────────────────── */
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.d-flex { display: flex; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .wrap { flex-wrap: wrap; }

@media print {
  .side, .topbar, .app-foot, .page-actions, .no-print, .toolbar, .pager { display: none !important; }
  .app { display: block; } .content { padding: 0; max-width: none; }
  .panel, .card { box-shadow: none; border-color: #ccc; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.dial-face > span { display: block; }
.auth-art .note { position: relative; z-index: 1; max-width: 36ch; }
.kv-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.wf-bar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; padding: .9rem 1.25rem; background: #fafbfd; border-bottom: 1px solid var(--line-2); }
.wf-bar .state { margin-right: auto; display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--ink-2); }
.child + .child { border-top: 1px solid var(--line); }
.inline-form { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { min-width: 160px; }
.money-big { font-size: 1.35rem; font-weight: 700; }

/* ==========================================================================
   v3.1 — installable app, mobile-first refinements, modern-classic type
   ========================================================================== */
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); }
:root { --serif: "Source Serif 4", Georgia, "Times New Roman", serif; --r-lg: 14px; --tab-h: 64px; }

/* Classic: serif titles, sans for everything you read and fill in */
h1, .page-head h1, .auth-box h1, .error-page h1, .install-hero h1 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
.page-head h1 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.95rem); }
.brand b, .auth-art .org b { font-family: var(--serif); font-weight: 700; letter-spacing: .01em; font-size: 1.15rem; }
.tile-section { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); }
.panel-head h2 { letter-spacing: -.005em; }
.stat .value { font-feature-settings: "tnum" 1, "lnum" 1; }

/* Modern: calmer surfaces, crisper focus, gentle depth */
.panel, .card, .stat, .tile { border-color: #e4e7f0; }
.panel { box-shadow: 0 1px 0 rgba(20,24,51,.03), 0 8px 24px -16px rgba(20,24,51,.18); }
.stat { box-shadow: 0 1px 0 rgba(20,24,51,.03); }
.btn { border-radius: 10px; }
.btn-primary { box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 16px -8px rgba(61,79,193,.7); }
.input, .form-control { border-radius: 10px; }
.side { background: linear-gradient(180deg, #161b3a 0%, #121630 100%); }

/* Install entry points */
.install-btn span { margin-left: .1rem; }
.side-install { display: flex; align-items: center; gap: .6rem; margin: 0 0 .75rem; padding: .6rem .7rem; border-radius: 10px; background: var(--indigo-900); color: #fff !important; text-decoration: none !important; }
.side-install:hover { background: var(--indigo-800); }
.side-install i { font-size: 1.2rem; color: var(--marigold); }
.side-install b { display: block; font-size: .84rem; }
.side-install span { font-size: .72rem; color: #9aa0cf; line-height: 1.3; }
html.is-app .side-install, html.is-app .install-btn { display: none !important; }
.auth-install { display: grid; gap: .5rem; margin-top: 1.25rem; justify-items: center; }
.install-hero { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.install-hero img { border-radius: 18px; box-shadow: 0 10px 30px -12px rgba(20,24,51,.5); }
.install-steps { display: grid; gap: .6rem; margin-top: 1rem; }
.install-steps details { border: 1px solid var(--line); border-radius: 12px; padding: .2rem .9rem; background: #fff; }
.install-steps summary { cursor: pointer; padding: .65rem 0; font-weight: 600; display: flex; gap: .55rem; align-items: center; }
.install-steps details[open] summary { color: var(--indigo-700); }
.install-steps ol { margin: 0 0 .9rem; padding-left: 1.2rem; font-size: .9rem; color: var(--ink-2); }
.install-steps li { margin: .3rem 0; }

/* Offline indicator & toast */
.offline-pill { display: none; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: .78rem; font-weight: 600; }
html.is-offline .offline-pill { display: inline-flex; }
.toast {
  position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100;
  display: flex; align-items: center; gap: .75rem; max-width: calc(100vw - 2rem); padding: .6rem .6rem .6rem 1rem;
  background: var(--indigo-950); color: #fff; border-radius: 14px; box-shadow: var(--shadow-pop); font-size: .88rem; animation: toast-in .25s var(--ease);
}
.toast .icon-btn { color: #c9cdea; width: 32px; height: 32px; }
.toast .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* Bottom tab bar — phones and tablets */
.tabbar { display: none; }
@media (max-width: 960px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    background: none; border: 0; font: inherit; font-size: .68rem; font-weight: 600; color: var(--ink-3); text-decoration: none !important; cursor: pointer;
  }
  .tabbar i { font-size: 1.3rem; }
  .tabbar .on { color: var(--indigo-700); }
  .tabbar .on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--marigold); }
  .tabbar .badge-dot { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .62rem; line-height: 17px; text-align: center; }
  .app-foot { padding-bottom: calc(var(--tab-h) + 1rem + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(var(--tab-h) + .75rem + env(safe-area-inset-bottom)); }
  .install-btn span { display: none; }
  .install-btn { padding: .3rem .55rem; }
}

/* Phones */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .input, .form-control, select.input, textarea.input { font-size: 16px; min-height: 44px; } /* no iOS zoom */
  .btn { min-height: 42px; }
  .btn-sm { min-height: 34px; }
  .topbar { height: 56px; }
  .crumbs > *:not(:last-child) { display: none; }
  .crumbs > span:last-child, .crumbs > a:last-child { font-weight: 600; color: var(--ink); max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-head { margin-bottom: 1.1rem; align-items: stretch; }
  .page-actions { width: 100%; }
  .page-actions > .btn, .page-actions > form { flex: 1 1 auto; }
  .page-actions > form .btn { width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .stat { padding: .8rem .9rem; }
  .stat .value { font-size: 1.35rem; }
  .panel-head, .panel-body, .toolbar { padding-left: 1rem; padding-right: 1rem; }
  .toolbar > select.input, .toolbar > .input { width: 100% !important; max-width: none !important; }
  .toolbar .btn { flex: 1; }
  .tiles { grid-template-columns: 1fr; gap: .65rem; }
  .tile { padding: .9rem; }
  .dial { width: 188px; height: 188px; }
  .dial-face .t { font-size: 2rem; }
  .today-strip { justify-content: center; gap: 1rem 1.5rem; }
  dialog.modal { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .user-menu > button .bi-chevron-down { display: none; }

  /* Tables turn into cards */
  .table-wrap:has(> table.table:not(.no-cards)) { overflow: visible; }
  table.table:not(.no-cards) thead { display: none; }
  table.table:not(.no-cards), table.table:not(.no-cards) tbody, table.table:not(.no-cards) tfoot, table.table:not(.no-cards) tr, table.table:not(.no-cards) td { display: block; width: 100%; min-width: 0 !important; }
  table.table:not(.no-cards) tr { padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
  table.table:not(.no-cards) tbody tr:hover td { background: none; }
  table.table:not(.no-cards) td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .22rem 0; border: 0; text-align: right !important; }
  table.table:not(.no-cards) td::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; color: var(--ink-3); font-size: .78rem; font-weight: 500; text-align: left; }
  table.table:not(.no-cards) td:first-child { display: block; text-align: left !important; font-size: 1rem; padding-bottom: .35rem; }
  table.table:not(.no-cards) td:first-child::before { display: none; }
  table.table:not(.no-cards) td:empty, table.table:not(.no-cards) td[data-label=""]::before { display: none; }
  table.table:not(.no-cards) td:last-child:has(> .btn) { justify-content: flex-end; padding-top: .45rem; }
  table.table:not(.no-cards) td:last-child:has(> .btn)::before { display: none; }
  table.table:not(.no-cards) .sub { display: inline; margin-left: .35rem; }
  table.table:not(.no-cards) tfoot tr { background: #fafbfd; }
}

/* Installed app window: respect notches and the title-bar area */
@media (display-mode: standalone), (display-mode: window-controls-overlay) {
  .topbar { padding-top: env(safe-area-inset-top); height: calc(var(--top-h) + env(safe-area-inset-top)); }
  .side { padding-top: env(safe-area-inset-top); }
  .auth-art { padding-top: calc(2.5rem + env(safe-area-inset-top)); }
}
@media (display-mode: window-controls-overlay) {
  .topbar { -webkit-app-region: drag; app-region: drag; left: env(titlebar-area-x, 0); }
  .topbar a, .topbar button, .topbar form { -webkit-app-region: no-drag; app-region: no-drag; }
}

html.is-app .install-link, html.is-app [data-install-wrap] { display: none !important; }
body:has(.install-hero) .auth-install { display: none; }

/* Grouped forms and detail pages */
.form-section { padding-top: .75rem; margin-top: .25rem; border-top: 1px solid var(--line-2); }
.form-grid > .form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section h3 { font-family: var(--serif); font-size: 1.05rem; }
.form-section p { margin: .2rem 0 0; font-size: .82rem; color: var(--ink-3); }
.kv-section { font-family: var(--serif); font-size: 1rem; margin: 1.4rem 0 .2rem; }
.kv-section:first-child { margin-top: 0; }
.rating { color: var(--marigold-d); letter-spacing: .05em; white-space: nowrap; }
.rating .off { color: #d9dce6; }

.kv dd .sub { display: block; font-size: .78rem; color: var(--ink-3); }

/* ── Recruitment ───────────────────────────────────────────── */
.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.score.pass { color: var(--ok); } .score.fail { color: var(--bad); }
.row-pass td { background: #f6fbf8; }
.score-grid td { padding: .35rem .4rem !important; vertical-align: top; }
.score-grid .score-in { width: 4.2rem; min-height: 38px; text-align: center; padding: .3rem; font-weight: 600; }
.score-grid select.input-sm, .score-grid input.input-sm { min-width: 150px; }
.score-grid td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
.qlist { list-style: none; margin: 0; padding: 0; }
.qlist li { border-bottom: 1px solid var(--line-2); padding: .6rem 1.25rem; }
.qrow, .qadd { display: grid; grid-template-columns: auto 1fr auto auto; gap: .6rem; align-items: start; }
.qadd { grid-template-columns: 1fr auto auto; border-top: 1px solid var(--line-2); }
.qrow textarea, .qadd textarea { min-height: 44px; }
.qn { font-weight: 700; color: var(--indigo-600); padding-top: .55rem; }
@media (max-width: 720px) { .qrow, .qadd { grid-template-columns: 1fr; } .qn { padding: 0; } }
.bulk-bar { background: #fafbfd; }
.pos-card { display: flex; flex-direction: column; gap: .7rem; padding: 1.1rem 1.2rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.pos-card:hover { border-color: var(--indigo-500); box-shadow: 0 0 0 3px var(--indigo-50); }
.pos-card h3 { font-family: var(--serif); font-size: 1.12rem; }
.pos-card .meta { font-size: .8rem; color: var(--ink-3); }
.funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.funnel div { background: var(--surface); border-radius: 8px; padding: .45rem .5rem; text-align: center; }
.funnel b { display: block; font-size: 1.15rem; }
.funnel span { font-size: .7rem; color: var(--ink-3); }
.print-only { display: none; }
.signatures { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2.2rem 1.5rem; margin-top: 1.5rem; }
.signatures div { border-top: 1px solid #999; padding-top: .3rem; display: grid; font-size: .8rem; }
@media print {
  .print-only { display: block; }
  .signatures.print-only { display: grid; }
  .tabs, .stats, .no-print { display: none !important; }
  .report-table td, .report-table th { padding: .3rem .4rem; font-size: .78rem; }
  .row-pass td { background: none; }
}
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; }
.funnel > div { min-width: 0; }
@media (max-width: 520px) { .pos-grid { grid-template-columns: 1fr; } }
.signatures.print-only { display: none; }
@media print { .signatures.print-only { display: grid; } }

/* ── Recruitment v3.5: profile, offers, analytics ─────────── */
.warn-text { color: var(--warn); } .ok-text { color: var(--ok); } .bad-text { color: var(--bad); }
.stats-6 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.prose h3 { font-size: .8rem; color: var(--ink-3); margin: .2rem 0 .3rem; font-weight: 600; }
.prose p { margin: 0 0 1rem; line-height: 1.6; max-width: 72ch; }
.person-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.person-name { font-family: var(--serif); font-size: 1.45rem; margin: 0 0 .2rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.15rem; flex: none; }
.score-ring { --p: 0; width: 104px; height: 104px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--indigo-600) calc(var(--p) * 1%), var(--line-2) 0); }
.score-ring > div { width: 82px; height: 82px; border-radius: 50%; background: var(--panel); display: grid; place-content: center; text-align: center; }
.score-ring b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.score-ring span { font-size: .68rem; color: var(--ink-3); }
.kv-2 { display: grid; grid-template-columns: minmax(100px, 30%) 1fr; gap: .55rem 1rem; margin: 0; padding: 1rem 1.25rem; border-top: 1px solid var(--line-2); }
.kv-2 dt { color: var(--ink-3); font-size: .82rem; } .kv-2 dd { margin: 0; font-size: .9rem; }
.kv-2 dd .sub, .warn-text.sub, .ok-text.sub { display: block; font-size: .76rem; margin-top: .15rem; }
.meter { position: relative; height: 8px; background: var(--line-2); border-radius: 99px; margin: .35rem 0 .2rem; }
.meter span { position: absolute; inset: 0 auto 0 0; background: var(--indigo-500); border-radius: 99px; }
.meter i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem; border-top: 1px solid var(--line-2); }
.doc-list li:first-child { border-top: 0; }
.doc-list .sub { display: block; font-size: .78rem; color: var(--ink-3); word-break: break-all; }
.doc-ic { font-size: 1.4rem; color: var(--line); } .doc-ic.has { color: var(--indigo-600); }
.doc-up label { cursor: pointer; margin: 0; }
.doc-preview { border-top: 1px solid var(--line-2); padding: 1rem 1.25rem; }
.doc-preview iframe { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.docs-cell { white-space: nowrap; }
.doc-dot { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #b7bdcc; border: 1px dashed #d3d8e4; margin-left: 3px; text-decoration: none !important; }
.doc-dot.has { color: var(--indigo-700); background: var(--indigo-50); border: 1px solid var(--indigo-100); }
.doc-dot:hover { border-color: var(--indigo-500); color: var(--indigo-700); }
.offers-table select.input-sm { min-width: 190px; }
.mail-preview { padding: .2rem 1.25rem 1rem; }
.mail-preview summary { font-size: .85rem; font-weight: 600; cursor: pointer; padding: .4rem 0; color: var(--indigo-700); }
.mail-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 640px; }
.mail-subj { background: var(--indigo-900); color: #fff; padding: .7rem 1rem; font-weight: 600; }
.mail-body { padding: 1rem; font-size: .9rem; line-height: 1.55; background: #fff; }
.placeholders { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: var(--ink-3); margin-bottom: 1rem; }
.placeholders code { background: var(--indigo-50); color: var(--indigo-700); padding: .05rem .35rem; border-radius: 5px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.tpl { display: flex; flex-direction: column; gap: .25rem; }
.tpl h3 { font-size: 1rem; margin: 0 0 .3rem; }
.tpl textarea { font-size: .85rem; line-height: 1.45; }
.insight { border-left: 4px solid var(--indigo-600); }
.insight h2 { font-size: 1.05rem; margin: 0 0 .5rem; }
.insight ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; line-height: 1.5; }
.chart-h { font-size: .82rem; font-weight: 600; color: var(--ink-2); margin: 1.1rem 0 .5rem; }
.chart-h:first-child { margin-top: 0; }
/* charts */
.hbars { position: relative; display: grid; gap: .45rem; }
.hbar, .range { display: grid; grid-template-columns: minmax(90px, 30%) 1fr 6.2rem; align-items: center; gap: .7rem; }
.hbar-l { font-size: .84rem; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.hbar-l a { color: var(--ink); }
.hbar-l span, .hbar-v span { display: block; font-size: .72rem; color: var(--ink-3); }
.hbar-t { height: 18px; position: relative; }
.hbar-t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar-v { font-size: .84rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar-t .ref, .range-t .ref { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1.5px solid var(--ink-2); z-index: 1; }
.hbar-head { margin-bottom: -.25rem; } .hbar-head .hbar-t { height: 14px; }
.ref-label { position: absolute; top: 0; transform: translateX(-50%); font-size: .7rem; color: var(--ink-2); white-space: nowrap; }
.ranges { position: relative; display: grid; gap: .55rem; }
.range-t { position: relative; height: 18px; background: linear-gradient(var(--line-2), var(--line-2)) center / 100% 1px no-repeat; }
.range-t .seg { position: absolute; top: 6px; height: 6px; border-radius: 99px; background: #9dc8f7; }
.range-t .dot { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #257de0; box-shadow: 0 0 0 2px #fff; }
.cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; align-items: end; height: 190px; }
.col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; min-width: 0; }
.col b { font-size: .72rem; font-variant-numeric: tabular-nums; }
.col-t { position: relative; } .col-t i { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(24px, 80%); border-radius: 4px 4px 0 0; min-height: 1px; }
.col span { font-size: .68rem; color: var(--ink-3); padding-top: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .55rem 0 0; padding: 0; font-size: .8rem; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.heat { border-collapse: separate; border-spacing: 2px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.heat th { font-weight: 600; font-size: .74rem; color: var(--ink-2); padding: .25rem .4rem; text-align: center; }
.heat tbody th { text-align: left; white-space: nowrap; }
.heat td { min-width: 46px; height: 32px; text-align: center; border-radius: 4px; }
.heat td.empty { color: #b7bdcc; background: #f6f7fb; }
.heat-key { display: flex; align-items: center; gap: .5rem; font-size: .72rem; color: var(--ink-3); margin-top: .6rem; }
.heat-key i { width: 160px; height: 8px; border-radius: 99px; }
@media (max-width: 640px) {
  .hbar, .range { grid-template-columns: minmax(80px, 34%) 1fr 5.4rem; gap: .5rem; }
  .doc-preview iframe { height: 420px; }
  .kv-2 { grid-template-columns: 1fr; gap: .1rem; } .kv-2 dd { margin-bottom: .55rem; }
}
@media print { .doc-preview, .doc-up { display: none; } .panel { break-inside: avoid; } }

/* ==========================================================================
   v3.6 Classic theme — BAKAID organisation colours, Aptos.
   Navy from the logo blue for structure, royal blue for action, green for
   success, red for errors only. The logo's three colours appear once, as a
   stripe under the brand (and on the sign-in card).
   ========================================================================== */
:root {
  --indigo-950: #0d2a57;   /* navy: sidebar, headings */
  --indigo-900: #12336a;
  --indigo-800: #1a3f7e;
  --indigo-700: #224c94;
  --indigo-600: #2f62b5;   /* BAKAID blue */
  --indigo-500: #4a7cc9;
  --indigo-100: #d9e4f6;
  --indigo-50:  #edf2fb;
  --marigold:   #6fbf26;   /* BAKAID green as the accent */
  --marigold-d: #4f9a1c;
  --marigold-50:#eef8e4;
  --brand-red:  #d61f2c;

  --ink:   #1b2333;
  --ink-2: #44506a;
  --ink-3: #6f7a91;
  --line:  #d9dfea;
  --line-2:#e9edf4;
  --surface: #f2f4f8;
  --ok: #3d8a14; --ok-bg: #eaf6df;
  --bad: #c41d2a; --bad-bg: #fbe8e9;
  --info: #2f62b5; --info-bg: #edf2fb;

  --r-sm: 4px; --r: 5px; --r-lg: 7px;
  --shadow: 0 1px 2px rgba(13,42,87,.06);
  --font: Aptos, "Aptos Display", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", "Public Sans", Arial, sans-serif;
  --serif: "Aptos Display", Aptos, "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Public Sans", sans-serif;
  --stripe: linear-gradient(90deg, #2f62b5 0 58%, #6fbf26 58% 82%, #d61f2c 82% 100%);
}
html { font-size: 15px; }
body { font-size: 13.5px; line-height: 1.5; letter-spacing: 0; }
h1, .page-head h1, .auth-box h1, .error-page h1, .install-hero h1 { font-weight: 600; letter-spacing: -.005em; color: var(--indigo-950); }
h1 { font-size: 1.45rem; } h2 { font-size: 1.05rem; font-weight: 600; } h3 { font-size: .95rem; font-weight: 600; }
.brand b, .auth-art .org b, .tile-section, .form-section h3, .kv-section, .pos-card h3, .person-name { font-weight: 600; letter-spacing: 0; }

/* Sidebar: letterhead brand block on navy */
.side { background: var(--indigo-950); color: #c8d3e8; }
.brand { background: #fff; color: var(--indigo-950); padding: .95rem 1.1rem .9rem; position: relative; }
.brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--stripe); }
.brand img { width: 40px; height: 40px; padding: 0; border-radius: 0; background: none; }
.brand b { color: var(--indigo-950); font-size: 1.08rem; letter-spacing: .04em; }
.brand span { color: var(--ink-3); font-size: .7rem; }
.nav { padding-top: .4rem; }
.nav-group > p { color: #8fa3c7; font-size: .7rem; font-weight: 600; letter-spacing: .02em; }
.nav a { border-radius: var(--r-sm); font-size: .9rem; color: #d3dcee; }
.nav a i { color: #9fb3d6; }
.nav a:hover { background: rgba(255,255,255,.07); }
.nav a.active { background: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 var(--marigold); color: #fff; }
.nav a.active i { color: #fff; }
.nav .count { background: var(--brand-red); color: #fff; }
.side-foot { border-top: 1px solid rgba(255,255,255,.08); }

/* Top bar and page head */
.topbar { background: #fff; border-bottom: 1px solid var(--line); box-shadow: none; }
.crumbs a { color: var(--indigo-600); }
.page-head { padding-bottom: .9rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.page-head p { font-size: .9rem; }

/* Panels: classic tinted headings */
.panel, .card, .stat, .tile, .pos-card { border-radius: var(--r-lg); box-shadow: var(--shadow); border-color: var(--line); }
.panel-head, .card-header { background: #f7f9fc; border-bottom: 1px solid var(--line); padding: .75rem 1.1rem; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.panel-head h2, .card-header h2, .card-header h3 { font-size: .95rem; font-weight: 600; color: var(--indigo-950); }
.panel-head p { font-size: .8rem; }
.panel-body, .card-body { padding: 1.1rem; }
.panel-foot { background: #fafbfd; border-top-color: var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.insight { border-left-color: var(--indigo-600); }

/* Statistics: brand rule on the left */
.stat { border-left: 3px solid var(--indigo-600); padding: .85rem 1rem; }
.stat .label, .stat .lbl { font-size: .76rem; color: var(--ink-2); }
.stat .value, .stat .num { font-size: 1.4rem; font-weight: 600; color: var(--indigo-950); letter-spacing: -.01em; }
.stat.tone-ok { border-left-color: var(--ok); } .stat.tone-bad { border-left-color: var(--bad); } .stat.tone-warn { border-left-color: var(--warn); }

/* Tables: tinted header, quiet zebra rows */
.table th, .table-wrap > table th, .card table:not([class]) th { background: var(--indigo-50); color: var(--indigo-950); font-weight: 600; font-size: .78rem; border-bottom: 1px solid var(--indigo-100); }
.table td { font-size: .86rem; }
.table tbody tr:nth-child(even) td { background: #fafbfd; }
.table tbody tr:hover td { background: var(--indigo-50); }
.heat th { background: none !important; }

/* Controls */
.btn { border-radius: var(--r); font-size: .85rem; font-weight: 600; }
.btn-primary { background: var(--indigo-600); border-color: var(--indigo-600); }
.btn-primary:hover { background: var(--indigo-700); border-color: var(--indigo-700); }
.input, select.input, textarea.input { border-radius: var(--r); font-size: .88rem; }
.input:focus { border-color: var(--indigo-500); box-shadow: 0 0 0 3px var(--indigo-50); }
.pill, .badge { border-radius: 4px; font-size: .72rem; padding: .1rem .5rem; }
.chip { border-radius: var(--r); font-size: .78rem; }
.chip.on { background: var(--indigo-600); border-color: var(--indigo-600); }
.tabs { gap: 0; border-bottom: 2px solid var(--line); }
.tabs a { font-size: .85rem; padding: .6rem .95rem; border-bottom-width: 3px; margin-bottom: -2px; }
.tabs a.on { color: var(--indigo-950); border-color: var(--indigo-600); background: linear-gradient(transparent, var(--indigo-50)); }
.alert { border-radius: var(--r); }

/* Hub tiles (inside every module) */
.tile { border-left: 3px solid transparent; }
.tile:hover { border-color: var(--line); border-left-color: var(--indigo-600); box-shadow: 0 2px 8px rgba(13,42,87,.08); }
.tile .ico { border-radius: var(--r); background: var(--indigo-600); color: #fff; }
.tile-section { font-size: .95rem; color: var(--indigo-950); padding-bottom: .45rem; border-bottom: 1px solid var(--line); }

/* Module launcher (All modules) */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.mod { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.mod-head { display: flex; gap: .85rem; align-items: center; padding: 1rem 1.1rem .8rem; color: var(--ink); text-decoration: none !important; }
.mod-head:hover h3 { color: var(--indigo-600); text-decoration: underline; }
.mod-ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: var(--r); color: #fff; font-size: 1.35rem; background: var(--mod, var(--indigo-600)); }
.mod-head h3 { font-size: 1rem; color: var(--indigo-950); margin: 0 0 .1rem; }
.mod-head p { margin: 0; font-size: .8rem; color: var(--ink-3); line-height: 1.4; }
.mod-figs { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: #fafbfd; }
.mod-figs div { padding: .55rem 1.1rem; } .mod-figs div + div { border-left: 1px solid var(--line-2); }
.mod-figs b { display: block; font-size: 1.15rem; font-weight: 600; color: var(--indigo-950); font-variant-numeric: tabular-nums; }
.mod-figs span { font-size: .72rem; color: var(--ink-3); }
.mod-links { list-style: none; margin: 0; padding: .45rem .5rem .6rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0 .25rem; flex: 1; align-content: start; }
.mod-links a { display: flex; align-items: center; gap: .45rem; padding: .35rem .6rem; border-radius: var(--r-sm); font-size: .83rem; color: var(--ink-2); }
.mod-links a:hover { background: var(--indigo-50); color: var(--indigo-700); text-decoration: none; }
.mod-links i { color: var(--indigo-500); }
.mod-group { display: flex; align-items: baseline; gap: .6rem; margin: 1.6rem 0 .8rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.mod-group:first-of-type { margin-top: 0; }
.mod-group h2 { font-size: 1rem; color: var(--indigo-950); margin: 0; }
.mod-group span { font-size: .8rem; color: var(--ink-3); }
.welcome-band { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--indigo-950); color: #fff; border-radius: var(--r-lg); padding: 1.1rem 1.3rem; margin-bottom: 1.4rem; position: relative; overflow: hidden; }
.welcome-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--stripe); }
.welcome-band h2 { color: #fff; font-size: 1.15rem; margin: 0 0 .15rem; }
.welcome-band p { margin: 0; color: #c8d3e8; font-size: .85rem; }
.welcome-band .btn { background: #fff; color: var(--indigo-950); border-color: #fff; }
@media (max-width: 520px) { .mod-links { grid-template-columns: 1fr; } }

/* Sign-in */
.auth-art { background: var(--indigo-950); }
.auth-box { position: relative; }
.auth-box::before { content: ""; display: block; height: 4px; width: 72px; background: var(--stripe); border-radius: 2px; margin-bottom: 1.2rem; }

/* Recruitment details that used the old serif */
.score-ring { background: conic-gradient(var(--indigo-600) calc(var(--p) * 1%), var(--line-2) 0); }
@media print { .brand::after, .welcome-band::after { display: none; } .table tbody tr:nth-child(even) td { background: none; } }
.auth-art .rings::after { border-color: var(--marigold); border-right-color: transparent; border-bottom-color: transparent; }
.dial { background: conic-gradient(var(--marigold) calc(var(--p) * 1%), #e3efd6 0); }

/* ── v3.7 Monitoring visits & Fundraising ─────────────────── */
.progress { height: 7px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.filters-bar { padding: 0 0 1rem; gap: .5rem; flex-wrap: wrap; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; } }
.finding-form { display: grid; gap: .7rem; }
.finding-list { list-style: none; margin: 0; padding: 0; }
.finding-list li { padding: .9rem 1.1rem .9rem 1.2rem; border-top: 1px solid var(--line-2); border-left: 4px solid var(--line); }
.finding-list li:first-child { border-top: 0; }
.finding-list li.sev-critical { border-left-color: var(--bad); } .finding-list li.sev-high { border-left-color: #f47230; }
.finding-list li.sev-medium { border-left-color: #f2b33d; } .finding-list li.sev-low { border-left-color: #9dc8f7; }
.finding-list p { margin: .35rem 0 .45rem; line-height: 1.55; max-width: 90ch; }
.finding-meta { font-size: .78rem; } .finding-meta .sev { font-weight: 600; color: var(--ink-2); }
.action-table td { vertical-align: top; }
.action-table tr.row-late td { background: #fff7f7 !important; }
.action-table tr.row-done td { color: var(--ink-3); }
.status-form { display: grid; grid-template-columns: 1fr auto; gap: .3rem; }
.status-form select { grid-column: 1 / -1; font-weight: 600; }
.status-form select.st-completed { color: var(--ok); } .status-form select.st-in_progress { color: #b86e00; } .status-form select.st-dropped { color: var(--ink-3); }
.row-tools { display: block; font-size: .75rem; margin-top: .35rem; color: var(--ink-3); }
.linkish { background: none; border: 0; padding: 0; color: var(--indigo-600); font: inherit; cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.deadline { width: 46px; flex: none; text-align: center; border: 1px solid var(--line); border-radius: var(--r); font-size: .68rem; color: var(--ink-3); line-height: 1.1; padding: .25rem 0; text-transform: none; }
.deadline b { display: block; font-size: 1.05rem; color: var(--indigo-950); }
.deadline.near { border-color: #f2b33d; background: #fff8e8; } .deadline.late { border-color: var(--bad); background: var(--bad-bg); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.board-col { background: #eef1f6; border-radius: var(--r-lg); padding: .6rem; display: flex; flex-direction: column; gap: .5rem; min-height: 160px; border-top: 3px solid var(--indigo-500); }
.board-col.st-awarded { border-top-color: var(--ok); } .board-col.st-not_awarded { border-top-color: #b7bdcc; } .board-col.st-idea, .board-col.st-in_development { border-top-color: var(--indigo-950); }
.board-head { font-size: .82rem; font-weight: 600; color: var(--indigo-950); display: flex; gap: .4rem; align-items: center; }
.board-head .n { margin-left: auto; background: #fff; border-radius: 99px; padding: 0 .5rem; font-size: .72rem; }
.board-sum { font-size: .75rem; color: var(--ink-3); margin-top: -.3rem; }
.board-card { display: grid; gap: .25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: .6rem .7rem; color: var(--ink); text-decoration: none !important; font-size: .8rem; box-shadow: var(--shadow); }
.board-card:hover { border-color: var(--indigo-500); }
.board-card b { font-weight: 600; font-size: .84rem; line-height: 1.3; }
.board-card span { color: var(--ink-3); } .board-card em { font-style: normal; font-size: .76rem; font-weight: 600; color: var(--ink-2); }
.timeline li { padding-left: 1.4rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 1.1rem; top: 1.05rem; width: 8px; height: 8px; border-radius: 50%; background: var(--indigo-500); }
@media (max-width: 640px) {
  .action-table thead { display: none; }
  .action-table, .action-table tbody, .action-table tr, .action-table td { display: block; width: 100%; }
  .action-table tr { border-bottom: 1px solid var(--line); padding: .7rem .9rem; }
  .action-table td { border: 0 !important; padding: .15rem 0 !important; background: none !important; }
  .action-table tr.row-late { background: #fff7f7; border-left: 3px solid var(--bad); }
  .action-table td:nth-child(1):not(:empty)::before { content: "No. "; color: var(--ink-3); font-size: .75rem; }
  .action-table td:nth-child(2) { color: var(--ink-3); font-size: .8rem; }
  .action-table td:nth-child(4)::before { content: "Responsible: "; color: var(--ink-3); }
  .action-table td:nth-child(5)::before { content: "Timeline: "; color: var(--ink-3); }
  .action-table td:last-child { padding-top: .5rem !important; }
}

/* ── v3.8 Files library ─────────────────────────────────────── */
.fm { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.fm-side { position: sticky; top: 76px; display: grid; gap: .55rem; }
.fm-new { justify-content: center; }
.fm-views, .fm-tree { display: grid; gap: 1px; margin: .3rem 0 0; padding: 0; list-style: none; }
.fm-views a, .fm-tree a { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: var(--r); color: var(--ink-2); font-size: .86rem; text-decoration: none !important; min-width: 0; }
.fm-views a:hover, .fm-tree a:hover { background: #e8edf6; color: var(--ink); }
.fm-views a.on, .fm-tree a.on { background: var(--indigo-50); color: var(--indigo-800); font-weight: 600; box-shadow: inset 3px 0 0 var(--indigo-600); }
.fm-views a i { width: 1.1rem; color: var(--ink-3); } .fm-views a.on i { color: var(--indigo-600); }
.fm-views em, .fm-tree em { margin-left: auto; font-style: normal; font-size: .72rem; color: var(--ink-3); background: #e8edf6; border-radius: 99px; padding: 0 .45rem; }
.fm-tree span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-tree ul { list-style: none; margin: 0; padding: 0; }
.fm-tree .t-lock { font-size: .72rem; color: var(--ink-3); }
.fm-tree-h { font-size: .72rem; font-weight: 600; color: var(--ink-3); margin: .9rem .6rem 0; }
.fm-usage { font-size: .74rem; color: var(--ink-3); padding: .7rem .6rem 0; border-top: 1px solid var(--line); margin-top: .4rem; }
.fm-main { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.25rem 1.25rem; min-height: 460px; box-shadow: var(--shadow); }
.fm-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: .9rem; }
.fm-head h1 { font-size: 1.3rem; margin: 0 0 .2rem; }
.fm-head p { margin: 0; color: var(--ink-3); font-size: .84rem; }
.fm-tools { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin-bottom: 1rem; }
.fm-tools select.input-sm { width: auto; }
.segctl { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.segctl a, .segctl label { display: inline-flex; align-items: center; margin: 0; cursor: pointer; }
.segctl a { padding: .35rem .6rem; color: var(--ink-3); }
.segctl a.on { background: var(--indigo-50); color: var(--indigo-700); }
.segctl label + label, .segctl a + a { border-left: 1px solid var(--line); }
.segctl input { position: absolute; opacity: 0; pointer-events: none; }
.segctl label span { padding: .42rem .75rem; font-size: .83rem; }
.segctl input:checked + span { background: var(--indigo-600); color: #fff; font-weight: 600; }
.segctl input:focus-visible + span { outline: 2px solid var(--indigo-500); outline-offset: -2px; }
.fm-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; margin-bottom: 1.1rem; }
.fm-folder { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none !important; background: #fbfcfe; }
.fm-folder:hover { border-color: var(--indigo-500); background: #fff; }
.fm-folder > i:first-child { font-size: 1.5rem; }
.fm-folder b { display: block; font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-folder small { font-size: .74rem; color: var(--ink-3); }
.fm-folder .grow { min-width: 0; }
.fm-table td { vertical-align: middle; }
.fm-name { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none !important; min-width: 0; }
.fm-name > i { font-size: 1.55rem; flex: none; }
.fm-name b { display: block; font-weight: 600; }
.fm-name:hover b { color: var(--indigo-600); text-decoration: underline; }
.fm-name small { display: block; font-size: .74rem; color: var(--ink-3); overflow-wrap: anywhere; }
.vbadge { display: inline-block; font-size: .7rem; font-weight: 600; padding: .08rem .45rem; border-radius: 4px; background: #eef1f6; color: var(--ink-2); border: 1px solid #dde3ee; white-space: nowrap; }
.vbadge.final { background: var(--ok-bg); color: var(--ok); border-color: #c7e6b0; }
.vbadge.final::before { content: "\2713\00a0"; }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; }
.fm-card { display: grid; gap: .4rem; padding: .7rem; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none !important; font-size: .82rem; }
.fm-card:hover { border-color: var(--indigo-500); box-shadow: 0 2px 8px rgba(13,42,87,.08); }
.fm-card b { font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fm-thumb { height: 108px; display: grid; place-items: center; background: #f4f6fa; border-radius: 4px; font-size: 2.6rem; overflow: hidden; }
.fm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fm-empty { border: 2px dashed transparent; border-radius: var(--r-lg); }
.fm-empty.dz { border-color: var(--line); }
.drop-hint { display: none; }
.fm-main.dragging { outline: 3px dashed var(--indigo-500); outline-offset: -8px; }
.fm-main.dragging .drop-hint { display: grid; place-items: center; align-content: center; gap: .4rem; position: absolute; inset: 0; background: rgba(237,242,251,.92); border-radius: var(--r-lg); color: var(--indigo-800); font-size: 1rem; z-index: 5; }
.fm-main.dragging .drop-hint i { font-size: 2.6rem; }
.dropzone { position: relative; display: grid; place-items: center; gap: .25rem; text-align: center; padding: 1.6rem 1rem; border: 2px dashed #c5cfe0; border-radius: var(--r-lg); background: #f8fafd; color: var(--ink-2); }
.dropzone i { font-size: 2rem; color: var(--indigo-500); }
.dropzone small { color: var(--ink-3); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.over, .dropzone:hover { border-color: var(--indigo-500); background: var(--indigo-50); }
.dropzone.has { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.small-dz { padding: 1rem; }
.dz-list { list-style: none; margin: -.4rem 0 0; padding: 0; font-size: .8rem; color: var(--ink-2); display: grid; gap: .2rem; }
.dz-list li::before { content: "\2022  "; color: var(--ok); }
.swatches { display: flex; gap: .45rem; padding-top: .3rem; }
.swatches input { position: absolute; opacity: 0; }
.swatches span { display: block; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 2px #fff, 0 0 0 3px transparent; }
.swatches input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
dialog.modal.modal-lg { width: min(720px, calc(100vw - 2rem)); }
dialog.modal .panel-body { max-height: calc(100vh - 220px); overflow: auto; }
.share-modes { display: grid; gap: .45rem; }
.share-mode { display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; margin: 0; }
.share-mode:has(input:checked) { border-color: var(--indigo-600); background: var(--indigo-50); box-shadow: inset 3px 0 0 var(--indigo-600); }
.share-mode input { accent-color: var(--indigo-600); }
.share-mode > i { font-size: 1.2rem; color: var(--indigo-600); width: 1.4rem; text-align: center; }
.share-mode b { display: block; font-size: .88rem; } .share-mode small { color: var(--ink-3); font-size: .78rem; }
.share-pick { margin-top: 1rem; padding-top: .4rem; border-top: 1px solid var(--line-2); }
.share-pick h4 { font-size: .8rem; margin: .8rem 0 .4rem; color: var(--indigo-950); }
.share-pick h4 small { font-weight: 400; color: var(--ink-3); }
.pick-list { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); }
.pick-people { margin-top: .4rem; }
.pick-row { display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem; margin: 0; cursor: pointer; font-size: .85rem; border-bottom: 1px solid var(--line-2); }
.pick-row:last-child { border-bottom: 0; }
.pick-row.on { background: var(--indigo-50); }
.pick-row small { display: block; color: var(--ink-3); font-size: .72rem; }
.pick-row select { width: auto; min-width: 104px; }
.pick-row select:disabled { opacity: .35; }
.fd-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.1rem; flex-wrap: wrap; }
.fd-icon { font-size: 2.6rem; line-height: 1; }
.fd-head h1 { font-size: 1.4rem; margin: 0 0 .3rem; }
.fd-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; font-size: .82rem; color: var(--ink-3); }
.fd-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; }
.fd-preview { overflow: hidden; }
.fd-preview iframe { width: 100%; height: 620px; border: 0; display: block; background: #525659; }
.fd-preview img { display: block; max-width: 100%; margin: 0 auto; max-height: 620px; }
.fd-nopreview { text-align: center; padding: 3rem 1rem; }
.fd-nopreview > i { font-size: 4rem; }
.vtimeline { list-style: none; margin: 0; padding: .4rem 1.1rem .8rem; }
.vtimeline li { position: relative; display: flex; gap: .8rem; align-items: flex-start; padding: .65rem 0 .65rem 1.3rem; border-left: 2px solid var(--line); margin-left: .35rem; }
.vtimeline li:last-child { border-left-color: transparent; }
.vdot { position: absolute; left: -7px; top: .85rem; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #b7c2d6; }
.vtimeline li.current .vdot { border-color: var(--indigo-600); background: var(--indigo-600); }
.vtimeline li.final .vdot { border-color: var(--ok); background: var(--ok); }
.vtimeline li.viewing { background: linear-gradient(90deg, var(--indigo-50), transparent); }
.vtimeline .meta { font-size: .76rem; color: var(--ink-3); margin-top: .2rem; }
.vacts { display: flex; gap: .1rem; }
.vacts form { display: inline; }
.access-sum { display: flex; gap: .7rem; align-items: center; }
.access-sum > i { font-size: 1.3rem; color: var(--indigo-600); width: 38px; height: 38px; display: grid; place-items: center; background: var(--indigo-50); border-radius: 50%; }
.access-sum small { display: block; color: var(--ink-3); font-size: .76rem; }
.grant-list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .45rem; font-size: .85rem; }
.grant-list li { display: flex; gap: .6rem; align-items: center; }
.grant-list small { display: block; color: var(--ink-3); font-size: .72rem; }
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; flex: none; }
.avatar-sm.grp { background: var(--marigold-50); color: var(--marigold-d); }
.tag { display: inline-block; font-size: .74rem; padding: .05rem .45rem; border-radius: 99px; background: var(--indigo-50); color: var(--indigo-700); text-decoration: none !important; }
.activity li > i { color: var(--ink-3); }
@media (max-width: 980px) {
  .fm, .fd-grid { grid-template-columns: 1fr; }
  .fm-side { position: static; grid-template-columns: 1fr 1fr; }
  .fm-views { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fm-views a { flex-direction: column; gap: .15rem; font-size: .7rem; text-align: center; padding: .45rem .2rem; }
  .fm-views a em { margin: 0; }
  .fm-tree-h, .fm-tree, .fm-usage { display: none; }
  .fd-preview iframe { height: 420px; }
}
@media (max-width: 640px) {
  .fm-main { padding: .8rem; }
  .fm-table th:nth-child(3), .fm-table td:nth-child(3), .fm-table th:nth-child(5), .fm-table td:nth-child(5) { display: none; }
}
.vtimeline .vacts { margin-left: auto; flex: none; justify-content: flex-end; }
.vtimeline li > .grow { min-width: 0; }
.vbadge.final[href] { text-decoration: none; }
.share-pick label.pick-row, .field .share-pick label.pick-row { display: flex !important; align-items: center; gap: .6rem; margin: 0; font-weight: 400; font-size: .85rem; color: var(--ink); }
.share-pick label.pick-row > input { flex: none; margin: 0; accent-color: var(--indigo-600); }
.share-pick label.pick-row > .grow { flex: 1; min-width: 0; }
.share-pick label.pick-row > select { flex: none; width: 118px; min-width: 0; }
.field .share-modes label.share-mode { display: flex; font-weight: 400; margin: 0; }

/* ── v3.8.2 Sign-in: classic letterhead card ───────────────── */
body.signin-page { background: var(--indigo-950); background-image: radial-gradient(ellipse at 50% 30%, #17407f 0%, rgba(13,42,87,0) 62%); min-height: 100vh; }
body.signin-page::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 4px; background: var(--stripe); z-index: 2; }
.signin { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1rem 2rem; gap: 1.1rem; }
.signin-card { width: 100%; max-width: 420px; background: #fff; border-radius: 8px; box-shadow: 0 18px 50px rgba(3,14,34,.45), 0 2px 6px rgba(3,14,34,.2); overflow: hidden; }
.signin-brand { text-align: center; padding: 2rem 2rem 0; }
.signin-brand img { display: block; width: 56px; height: 56px; margin: 0 auto .65rem; object-fit: contain; }
.signin-org { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: .18em; color: var(--indigo-950); padding-left: .18em; }
.signin-tag { font-size: .78rem; color: var(--ink-3); margin-top: .15rem; }
.signin-rule { display: block; width: 96px; height: 3px; margin: 1.1rem auto 0; background: var(--stripe); border-radius: 2px; }
.signin-card .auth-box { max-width: none; padding: 1.6rem 2rem 1.4rem; }
.signin-card .auth-box::before { display: none; }
.signin-card .auth-box h1 { font-size: 1.2rem; text-align: center; margin: 0; }
.signin-card .auth-box .lead { text-align: center; font-size: .86rem; color: var(--ink-3); margin: .3rem 0 1.4rem; }
.signin-card .auth-box .btn-lg { margin-top: .3rem; }
.signin-card .auth-install { margin-top: 1.1rem; }
.signin-card-foot { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .75rem 1rem; background: #f6f8fb; border-top: 1px solid var(--line-2); font-size: .76rem; color: var(--ink-3); }
.signin-card-foot i { color: var(--ok); }
.signin-clock { margin: 0; font-size: .82rem; color: #c3cfe6; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.signin-clock #hh { font-weight: 600; color: #fff; }
.signin-clock .sec { color: #8fa3c7; }
.signin-copy { margin: 0; font-size: .72rem; color: #7f93b8; }
body.signin-page:has(.install-hero) .signin-card { max-width: 560px; }
body.signin-page .install-hero { text-align: left; }
@media (max-width: 480px) {
  .signin { justify-content: flex-start; padding-top: calc(2rem + env(safe-area-inset-top)); }
  .signin-brand { padding: 1.6rem 1.25rem 0; }
  .signin-card .auth-box { padding: 1.3rem 1.25rem 1.2rem; }
}
.signin-card .install-hero h1, .signin-card .install-hero .lead { text-align: left; }

/* ── v3.9 Files library: single column, simple and calm ────── */
.hide-sm { display: inline; }
.lib { max-width: 1180px; }
.lib-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.lib-path { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; font-size: 1.35rem; font-weight: 600; color: var(--indigo-950); line-height: 1.3; }
.lib-path a { color: var(--ink-3); text-decoration: none; font-weight: 500; }
.lib-path a:hover { color: var(--indigo-600); }
.lib-path a.on, .lib-path span.on { color: var(--indigo-950); font-weight: 600; }
.lib-path a i { color: #e0a526; margin-right: .15rem; }
.lib-path .sep { font-size: .8rem; color: #b3bccd; }
.lib-desc { margin: .25rem 0 0; color: var(--ink-3); font-size: .86rem; }
.lib-actions { display: flex; gap: .5rem; flex: none; }
.lib-search { position: relative; margin-bottom: .9rem; }
.lib-search > i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.lib-search input { width: 100%; height: 46px; padding: 0 2.6rem 0 2.6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: .92rem; color: var(--ink); box-shadow: var(--shadow); }
.lib-search input:focus { outline: none; border-color: var(--indigo-500); box-shadow: 0 0 0 3px var(--indigo-50); }
.lib-clear { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.lib-tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; overflow-x: auto; scrollbar-width: none; }
.lib-tabs::-webkit-scrollbar { display: none; }
.lib-tabs a { flex: none; padding: .55rem .8rem .6rem; font-size: .86rem; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.lib-tabs a:hover { color: var(--indigo-700); }
.lib-tabs a.on { color: var(--indigo-950); font-weight: 600; border-bottom-color: var(--indigo-600); }
.lib-tabs a span { display: inline-block; min-width: 1.35rem; padding: 0 .35rem; margin-left: .25rem; border-radius: 99px; background: #e8edf5; color: var(--ink-3); font-size: .7rem; font-weight: 600; text-align: center; }
.lib-tabs a.on span { background: var(--indigo-50); color: var(--indigo-700); }
.lib-body { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.25rem 1.25rem; box-shadow: var(--shadow); min-height: 320px; }
.lib-note { margin: 0 0 1rem; font-size: .84rem; color: var(--ink-3); }
.lib-h { font-size: .8rem; font-weight: 600; color: var(--ink-2); margin: 0 0 .65rem; letter-spacing: .01em; }
.lib-h span { color: var(--ink-3); font-weight: 400; margin-left: .2rem; }
.lib-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .55rem; margin-bottom: 1.6rem; }
.lib-folder { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border: 1px solid var(--line-2); border-radius: 8px; background: #fafbfd; color: var(--ink); text-decoration: none !important; transition: border-color .12s, background .12s; }
.lib-folder:hover { border-color: #c9d4ea; background: #f2f6fd; }
.lib-folder > i { font-size: 1.45rem; flex: none; }
.lib-folder span { min-width: 0; }
.lib-folder b { display: block; font-size: .87rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-folder small { font-size: .74rem; color: var(--ink-3); }
.lib-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .3rem; }
.lib-bar .lib-h { margin: 0; }
.lib-filters { display: flex; gap: .45rem; align-items: center; }
.lib-filters select { width: auto; }
.lib-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.lib-table th { text-align: left; font-weight: 600; font-size: .74rem; color: var(--ink-3); padding: .55rem .6rem; border-bottom: 1px solid var(--line); background: none; }
.lib-table th.right { text-align: right; }
.lib-table td { padding: .65rem .6rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.lib-table tbody tr:last-child td { border-bottom: 0; }
.lib-table tbody tr:hover td { background: #f7f9fd; }
.th-sort { color: inherit; text-decoration: none; }
.th-sort.on, .th-sort:hover { color: var(--indigo-700); }
.lib-name { display: flex; align-items: center; gap: .8rem; color: var(--ink); text-decoration: none !important; min-width: 0; }
.lib-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--c); font-size: 1.15rem; }
.lib-nm { min-width: 0; }
.lib-nm b { display: block; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.lib-name:hover b { color: var(--indigo-600); }
.lib-nm small { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .55rem; margin-top: .2rem; font-size: .74rem; color: var(--ink-3); }
.lib-nm .fn { overflow-wrap: anywhere; }
.tag-kind { font-size: .66rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-2); background: #eef1f6; border-radius: 3px; padding: 0 .3rem; }
.acc-restricted { color: #8a5a00; } .acc-private { color: var(--bad); }
.who { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-2); white-space: nowrap; }
.col-owner { width: 190px; } .col-date { width: 120px; color: var(--ink-2); } .col-size { width: 80px; color: var(--ink-3); } .col-act { width: 84px; }
.lib-table .icon-btn { opacity: .55; }
.lib-table tr:hover .icon-btn { opacity: 1; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .8rem; margin-top: .6rem; }
.lib-card { display: grid; gap: .35rem; padding: .6rem; border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink); text-decoration: none !important; font-size: .82rem; }
.lib-card:hover { border-color: #c9d4ea; box-shadow: 0 4px 14px rgba(13,42,87,.08); }
.lib-card b { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-card small { color: var(--ink-3); display: flex; gap: .35rem; align-items: center; }
.lib-thumb { position: relative; height: 112px; display: grid; place-items: center; border-radius: 7px; background: color-mix(in srgb, var(--c, #6f7a91) 8%, #f7f8fb); color: var(--c, #6f7a91); font-size: 2.4rem; overflow: hidden; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lib-thumb em { position: absolute; right: .45rem; bottom: .4rem; font-style: normal; font-size: .62rem; font-weight: 700; color: var(--ink-2); background: #fff; border-radius: 3px; padding: 0 .3rem; }
.lib-empty { display: grid; justify-items: center; gap: .35rem; text-align: center; padding: 3.5rem 1rem; color: var(--ink-3); border-radius: 10px; }
.lib-empty.dz { border: 2px dashed var(--line); }
.lib-empty > i { font-size: 2.4rem; color: #b3bccd; }
.lib-empty b { color: var(--ink); font-size: .98rem; }
.lib-foot { margin: .8rem 0 0; font-size: .75rem; color: var(--ink-3); }
.lib-body.dragging { outline: 3px dashed var(--indigo-500); outline-offset: -8px; }
.lib-body.dragging .drop-hint { display: grid; place-items: center; align-content: center; gap: .4rem; position: absolute; inset: 0; background: rgba(237,242,251,.94); border-radius: 10px; color: var(--indigo-800); z-index: 5; }
.lib-body.dragging .drop-hint i { font-size: 2.6rem; }
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .lib-path { font-size: 1.1rem; }
  .lib-body { padding: .8rem; }
  .col-owner, .col-size { display: none; }
  .lib-table thead { display: none; }
  .lib-table td { padding: .6rem .3rem; }
  .col-date { width: auto; font-size: .76rem; }
  .lib-table .icon-btn { opacity: 1; }
  .lib-bar { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .lib-head { flex-direction: column; align-items: stretch; gap: .6rem; }
  .lib-actions { justify-content: flex-end; }
  .lib-path { font-size: 1.05rem; flex-wrap: nowrap; overflow: hidden; }
  .lib-path > a:not(:first-child), .lib-path > .sep:not(:nth-last-child(2)) { display: none; }
  .lib-path > span.on { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lib-table, .lib-table tbody { display: block; }
  .lib-table tr { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: .65rem .1rem; border-bottom: 1px solid var(--line-2); }
  .lib-table tbody tr:last-child { border-bottom: 0; }
  .lib-table td { display: block; border: 0 !important; padding: 0 !important; width: auto !important; background: none !important; }
  .lib-table td:first-child { grid-column: 1 / -1; margin-bottom: .35rem; }
  .lib-table td.col-date { padding-left: calc(36px + .8rem) !important; color: var(--ink-3); }
  .lib-table td.col-owner, .lib-table td.col-size { display: none; }
  .lib-nm b { font-size: .9rem; }
}

/* ── v4.0 Knowledge Management ─────────────────────────────── */
.km-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.km-head h1 { margin: 0 0 .2rem; font-size: 1.4rem; display: flex; align-items: center; gap: .55rem; }
.km-head p { margin: 0; color: var(--ink-3); font-size: .88rem; max-width: 75ch; }
.km-abbr { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; padding: .1rem .4rem; border-radius: 4px; color: var(--c, var(--indigo-600)); background: color-mix(in srgb, var(--c, #2f62b5) 12%, #fff); vertical-align: middle; }
.km-nav { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; overflow-x: auto; scrollbar-width: none; }
.km-nav::-webkit-scrollbar { display: none; }
.km-nav a { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .8rem .6rem; font-size: .86rem; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.km-nav a i { color: var(--c, var(--ink-3)); }
.km-nav a.on { color: var(--indigo-950); font-weight: 600; border-bottom-color: var(--c, var(--indigo-600)); }
.km-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9rem; }
.km-card { display: flex; flex-direction: column; gap: .55rem; padding: 1.1rem 1.1rem 1rem; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 10px; color: var(--ink); text-decoration: none !important; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.km-card:hover { box-shadow: 0 6px 18px rgba(13,42,87,.1); transform: translateY(-1px); }
.km-ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); font-size: 1.3rem; }
.km-card-t { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.km-card-t b { font-size: .98rem; color: var(--indigo-950); }
.km-card .km-abbr { color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.km-card-d { font-size: .8rem; color: var(--ink-3); line-height: 1.45; flex: 1; }
.km-card-f { font-size: .8rem; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: .55rem; }
.km-card-f b { font-size: 1.05rem; color: var(--indigo-950); }
.km-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.km-filter { margin-bottom: .7rem; }
.chips-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.km-items { display: grid; gap: .7rem; }
.km-item { display: grid; gap: .35rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 8px; color: var(--ink); text-decoration: none !important; box-shadow: var(--shadow); }
.km-item:hover { border-color: #c9d4ea; border-left-color: var(--c); }
.km-item b { font-size: .98rem; color: var(--indigo-950); line-height: 1.35; }
.km-item-top { display: flex; align-items: center; gap: .5rem; }
.km-item-top .muted { margin-left: auto; }
.km-type { font-size: .7rem; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); padding: .1rem .45rem; border-radius: 4px; }
.km-sum { font-size: .85rem; color: var(--ink-2); line-height: 1.5; }
.km-meta { font-size: .76rem; color: var(--ink-3); }
.km-docs { position: sticky; top: 76px; }
.km-dot { flex: none; width: 34px; height: 24px; display: grid; place-items: center; border-radius: 5px; font-size: .64rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.risk-badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: .12rem .5rem; border-radius: 4px; white-space: nowrap; }
.risk-low { background: #e4f3d8; color: #2f6b0f; } .risk-medium { background: #fdf0cf; color: #8a5a00; }
.risk-high { background: #fde1d1; color: #a3410f; } .risk-critical { background: #f9d3d6; color: #9e1520; }
.heat5 { display: grid; grid-template-columns: auto 1fr; gap: .3rem .5rem; align-items: center; }
.heat5-y { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .72rem; color: var(--ink-3); text-align: center; }
.heat5-grid { display: grid; grid-template-columns: 20px repeat(5, minmax(0, 1fr)); gap: 4px; }
.heat5-c { aspect-ratio: 1.6; display: grid; place-items: center; border-radius: 5px; font-weight: 700; font-size: 1rem; opacity: .55; }
.heat5-c.has { opacity: 1; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.heat5-l { font-size: .72rem; color: var(--ink-3); text-align: center; }
.heat5-x { grid-column: 2; font-size: .72rem; color: var(--ink-3); text-align: center; }
.heat5 .legend { grid-column: 1 / -1; }
.legend .sw.risk-low, .legend .sw.risk-medium, .legend .sw.risk-high, .legend .sw.risk-critical { border: 0; }
@media (max-width: 980px) { .km-split { grid-template-columns: 1fr; } .km-docs { position: static; } }

/* ── v4.0 Ask AI ───────────────────────────────────────────── */
.ai { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 170px); }
.ai-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.ai-head h1 { margin: 0; font-size: 1.35rem; }
.ai-head p { margin: .15rem 0 0; color: var(--ink-3); font-size: .86rem; }
.ai-clear { margin-left: auto; }
.ai-mark { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #fff; font-size: 1.3rem; background: linear-gradient(135deg, var(--indigo-600), var(--indigo-950)); }
.ai-thread { flex: 1; display: flex; flex-direction: column; gap: .9rem; padding: .5rem 0 1rem; }
.ai-welcome { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.ai-hello { margin: 0 0 1rem; font-size: .98rem; }
.ai-suggest { display: flex; flex-wrap: wrap; gap: .5rem; }
.ai-chip { border: 1px solid var(--line); background: #f7f9fc; border-radius: 99px; padding: .45rem .85rem; font: inherit; font-size: .84rem; color: var(--indigo-800); cursor: pointer; }
.ai-chip:hover { border-color: var(--indigo-500); background: var(--indigo-50); }
.ai-msg { display: flex; gap: .6rem; align-items: flex-start; }
.ai-me { justify-content: flex-end; }
.ai-me .ai-bubble { background: var(--indigo-600); color: #fff; border-radius: 14px 14px 4px 14px; max-width: 75%; padding: .6rem .9rem; font-size: .9rem; }
.ai-bot .ai-bubble { background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: .8rem 1rem; max-width: calc(100% - 46px); font-size: .9rem; box-shadow: var(--shadow); line-height: 1.55; }
.ai-bot .ai-bubble > p { margin: 0 0 .55rem; }
.ai-av { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--indigo-600), var(--indigo-950)); }
.ai-h { margin: .8rem 0 .35rem; font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.ai-h.ai-urgent { color: var(--bad); } .ai-h.ai-soon { color: #a06200; }
.ai-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .45rem; }
.ai-list li { padding: .45rem .6rem; border-radius: 8px; background: #f7f9fc; border: 1px solid var(--line-2); }
.ai-list li a { font-weight: 600; }
.ai-list li small { display: block; color: var(--ink-3); font-size: .76rem; margin-top: .1rem; }
.ai-list li > i { color: var(--indigo-500); }
.ai-area { display: inline-block; font-size: .66rem; font-weight: 700; color: var(--indigo-700); background: var(--indigo-50); border-radius: 4px; padding: 0 .35rem; margin-right: .25rem; vertical-align: 1px; }
.ai-src { display: block; margin-top: .5rem; font-size: .7rem; color: var(--ink-3); }
.ai-note { font-size: .78rem; color: #8a5a00; background: #fff8e8; border-radius: 6px; padding: .4rem .6rem; }
.ai-typing { display: inline-flex; gap: 4px; padding: .3rem 0; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9fb0cc; animation: aiDot 1s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ai-typing i { animation: none; } }
.ai-ask { position: sticky; bottom: .8rem; display: flex; gap: .5rem; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .5rem .5rem .5rem .9rem; box-shadow: 0 6px 22px rgba(13,42,87,.12); }
.ai-ask textarea { flex: 1; border: 0; resize: none; font: inherit; font-size: .95rem; padding: .45rem 0; max-height: 160px; outline: none; background: transparent; }
.ai-ask .btn { border-radius: 10px; height: 40px; width: 44px; justify-content: center; }
.ai-foot { font-size: .74rem; color: var(--ink-3); text-align: center; margin: .6rem 0 0; }
@media (max-width: 640px) { .ai { min-height: calc(100vh - 210px); } .ai-ask { bottom: calc(72px + env(safe-area-inset-bottom)); } .ai-me .ai-bubble { max-width: 88%; } }
@media (min-width: 1280px) { .km-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ── v4.1 Ask AI: saved and shared ─────────────────────────── */
.ai-tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin: 0 0 1rem; overflow-x: auto; }
.ai-tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .85rem; color: var(--ink-2); font-size: .88rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.ai-tabs a:hover { color: var(--indigo-700); }
.ai-tabs a.on { color: var(--indigo-800); border-bottom-color: var(--indigo-600); font-weight: 600; }
.ai-count { font-size: .72rem; color: var(--ink-3); background: var(--line-2); border-radius: 99px; padding: 0 .45rem; font-weight: 600; }
.ai-new { color: #fff; background: var(--bad); border-radius: 99px; padding: 0 .45rem; font-size: .7rem; }
.ai-actions { display: flex; gap: .35rem; margin-top: .6rem; padding-top: .5rem; border-top: 1px solid var(--line-2); }
.ai-actions form { margin: 0; }
.ai-act { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 7px; padding: .22rem .6rem; font: inherit; font-size: .76rem; cursor: pointer; }
.ai-act:hover { border-color: var(--indigo-500); color: var(--indigo-700); }
.ai-act.is-saved { color: var(--indigo-700); background: var(--indigo-50); border-color: transparent; cursor: default; }
.ai-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 1rem 1.2rem 1.1rem; display: flex; flex-direction: column; gap: .9rem; }
.ai-card .ai-bot .ai-bubble { box-shadow: none; }
.ai-card-head { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); padding-bottom: .8rem; }
.ai-card-head p { margin: .15rem 0 0; }
.ai-card-title { margin: 0; font-size: 1.1rem; }
.ai-card-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.ai-card-actions form { margin: 0; }
.ai-title-form { display: flex; align-items: center; gap: .3rem; margin: 0; }
.ai-title-input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; font-weight: 700; color: var(--ink-1, #142033); border: 1px solid transparent; border-radius: 6px; padding: .15rem .35rem; margin-left: -.35rem; background: transparent; }
.ai-title-input:hover, .ai-title-input:focus { border-color: var(--line); background: #f7f9fc; outline: none; }
.ai-shared-with { border-top: 1px solid var(--line-2); padding-top: .8rem; }
.ai-shared-with h4 { margin: 0 0 .5rem; font-size: .86rem; }
.ai-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .4rem; }
.ai-people li { display: flex; align-items: center; gap: .55rem; padding: .35rem .5rem; border: 1px solid var(--line-2); border-radius: 8px; font-size: .84rem; }
.ai-people li small, .ai-saved-list small { display: block; color: var(--ink-3); font-size: .74rem; font-weight: 400; }
.ai-people form { margin: 0; }
.avatar-xs { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .68rem; font-weight: 700; color: var(--indigo-800); background: var(--indigo-50); }
.ai-saved-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.ai-saved-list li + li { border-top: 1px solid var(--line-2); }
.ai-saved-list a { display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; color: inherit; text-decoration: none; }
.ai-saved-list a:hover { background: #f7f9fc; }
.ai-saved-list a > .bi { color: var(--indigo-600); }
.ai-saved-list b { font-weight: 600; color: var(--indigo-800); }
.ai-saved-list li.is-new b { font-weight: 700; }
.ai-meta { display: flex; align-items: center; gap: .6rem; flex: none; text-align: right; }
.pill-new { background: var(--bad-bg); color: var(--bad); }
.ai-share-q { margin: 0 0 .9rem; padding: .6rem .8rem; background: #f7f9fc; border-left: 3px solid var(--indigo-600); border-radius: 6px; font-size: .9rem; }
.ai-pick-h { margin: 1rem 0 .4rem; font-size: .84rem; }
.ai-privacy { margin: 1rem 0 0; font-size: .78rem; color: var(--ink-2); background: #eef7e6; border-radius: 8px; padding: .55rem .7rem; }
.ai-privacy .bi { color: #3f8a14; }
.ai-share-note { margin: 0; padding: .6rem .8rem; background: #fff8e8; border-radius: 8px; font-size: .88rem; color: #5b4300; }
@media (max-width: 640px) { .ai-meta small { display: none; } .ai-card { padding: .9rem; } }

/* ── v4.2 Main modules: launcher tiles and module landing pages ── */
.launch { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.launch-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; min-height: 178px; padding: 1.4rem 1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); color: var(--indigo-950); text-decoration: none; text-align: center; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.launch-tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--mod); opacity: .85; }
.launch-tile:hover { border-color: var(--mod); box-shadow: 0 8px 22px rgba(13,42,87,.12); transform: translateY(-2px); color: var(--indigo-950); }
.launch-tile:focus-visible { outline: 3px solid var(--mod); outline-offset: 2px; }
.launch-ico { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 18px; color: #fff; font-size: 1.9rem; background: var(--mod); background-image: linear-gradient(160deg, rgba(255,255,255,.18), rgba(0,0,0,.12)); box-shadow: 0 6px 14px color-mix(in srgb, var(--mod) 35%, transparent); }
.launch-tile b { font-size: .98rem; font-weight: 700; line-height: 1.3; }
.launch-badge { position: absolute; top: .7rem; right: .7rem; font-size: .68rem; font-weight: 700; color: var(--bad); background: var(--bad-bg); border-radius: 99px; padding: .08rem .5rem; }
.launch-h { margin: 2rem 0 .7rem; font-size: .9rem; color: var(--ink-2); font-weight: 700; }
.launch-short { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.launch-short a { position: relative; display: flex; align-items: center; gap: .6rem; padding: .7rem .85rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-1, #142033); text-decoration: none; font-size: .88rem; font-weight: 600; }
.launch-short a:hover { border-color: var(--indigo-500); color: var(--indigo-800); }
.launch-short i { color: var(--indigo-600); font-size: 1.1rem; }
.launch-short b { margin-left: auto; font-size: .7rem; color: #fff; background: var(--bad); border-radius: 99px; padding: 0 .45rem; }
@media (max-width: 560px) {
  .launch { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .launch-tile { min-height: 148px; padding: 1.1rem .6rem 1rem; }
  .launch-ico { width: 56px; height: 56px; font-size: 1.55rem; border-radius: 15px; }
  .launch-tile b { font-size: .88rem; }
  .launch-short { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.modland-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.modland-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--mod); }
.modland-ico { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 15px; color: #fff; font-size: 1.6rem; background: var(--mod); background-image: linear-gradient(160deg, rgba(255,255,255,.18), rgba(0,0,0,.12)); }
.modland-head h1 { margin: 0; font-size: 1.35rem; color: var(--indigo-950); }
.modland-head p { margin: .15rem 0 0; color: var(--ink-3); font-size: .88rem; }
.modland-find { display: flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 9px; padding: 0 .7rem; background: #f7f9fc; min-width: 240px; }
.modland-find:focus-within { border-color: var(--indigo-500); background: #fff; }
.modland-find i { color: var(--ink-3); }
.modland-find input { border: 0; background: transparent; font: inherit; font-size: .88rem; padding: .5rem 0; outline: none; width: 100%; }
.modland-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin: 1rem 0 .4rem; }
.modland-kpi { display: flex; flex-direction: column; gap: .1rem; padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: inherit; }
.modland-kpi:hover { border-color: var(--mod); }
.modland-kpi b { font-size: 1.45rem; color: var(--indigo-950); line-height: 1.2; font-variant-numeric: tabular-nums; }
.modland-kpi span { font-size: .78rem; color: var(--ink-3); }
.modland-kpi.tone-warn b { color: #a06200; } .modland-kpi.tone-bad b { color: var(--bad); }
.modland-sec { margin-top: 1.5rem; }
.modland-sec h2 { margin: 0 0 .7rem; font-size: .92rem; color: var(--indigo-950); padding-bottom: .45rem; border-bottom: 1px solid var(--line); }
.modland-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .7rem; }
.modland-grid .sub { display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.modland-grid .sub:hover { border-color: var(--mod); box-shadow: 0 3px 10px rgba(13,42,87,.08); }
.modland-grid .sub:focus-visible { outline: 3px solid var(--mod); outline-offset: 2px; }
.sub-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--mod); background: color-mix(in srgb, var(--mod) 11%, #fff); font-size: 1.15rem; }
.sub-text { flex: 1; min-width: 0; }
.sub-text b { display: block; font-size: .92rem; color: var(--indigo-950); }
.sub-text small { display: block; font-size: .78rem; color: var(--ink-3); line-height: 1.4; margin-top: .1rem; }
.sub-badge { flex: none; min-width: 1.5rem; text-align: center; font-size: .72rem; font-weight: 700; color: #fff; background: var(--bad); border-radius: 99px; padding: .1rem .45rem; }
.sub-go { color: var(--ink-3); font-size: .8rem; }
.modland-grid .sub:hover .sub-go { color: var(--mod); }
.modland-none { margin-top: 1.5rem; }
@media (max-width: 640px) { .modland-find { min-width: 0; width: 100%; } .modland-head { padding: 1rem; } .modland-grid { grid-template-columns: 1fr; } }

/* ── v4.3 Files: type, period, place and "not in use" ──────── */
.lib-bar { flex-wrap: wrap; }
.lib-filters { flex-wrap: wrap; justify-content: flex-end; }
.lib-fx { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; justify-content: flex-end; padding: .6rem; margin-top: .2rem; background: #f7f9fc; border: 1px solid var(--line-2); border-radius: var(--r); }
.lib-fx[hidden] { display: none; }
.lib-fx select { width: auto; max-width: 200px; }
.dtype { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 600; color: var(--indigo-800); background: var(--indigo-50); border-radius: 4px; padding: 0 .4rem; }
.notuse { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; color: #7a4a05; background: #fdf0d8; border-radius: 4px; padding: 0 .4rem; }
.lib-table tr.is-retired .lib-name b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(122,74,5,.45); }
.lib-table tr.is-retired .lib-ic { opacity: .55; }
.alert-retired { background: #fdf6e7; color: #6b4300; border-color: #f0d9a6; }
.docd { border: 1px solid var(--line); border-radius: var(--r); padding: .8rem .9rem .9rem; margin: 0; display: flex; flex-direction: column; gap: .7rem; background: #fbfcfe; }
.docd legend { font-size: .82rem; font-weight: 700; color: var(--indigo-950); padding: 0 .35rem; }
.docd .form-grid { margin: 0; }
.docd-period { margin-bottom: .4rem; }
.docd-when { display: flex; gap: .4rem; }
.docd-when > * { flex: 1; min-width: 0; }
.docd-when [hidden] { display: none; }
.docd-retire { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; border: 1px dashed #e0c48a; border-radius: var(--r); background: #fffaf0; cursor: pointer; }
.docd-retire input { margin-top: .2rem; }
.docd-retire b { display: block; font-size: .86rem; color: #6b4300; }
.docd-retire small { display: block; font-size: .76rem; color: var(--ink-3); }
.docd [data-doc-place][hidden], .docd [data-doc-retire-box][hidden] { display: none; }
.fd-meta .dtype, .fd-meta .notuse { font-size: .78rem; padding: .05rem .5rem; }
.lib-fx { justify-content: flex-start; }
.lib-fx select { flex: 1 1 150px; max-width: none; }
.lib-fx .btn { flex: none; }

/* ── v4.3.1 Files: quick viewer ──────────────────────────── */
.lib-view { gap: .3rem; padding: .25rem .6rem; }
.lib-view span { font-size: .8rem; }
.lib-card-wrap { position: relative; }
.lib-card-wrap .lib-card { height: 100%; }
.lib-card-view { position: absolute; top: .45rem; right: .45rem; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.95); color: var(--indigo-700); cursor: pointer; opacity: 0; transition: opacity .15s; }
.lib-card-wrap:hover .lib-card-view, .lib-card-view:focus-visible { opacity: 1; }
@media (hover: none) { .lib-card-view { opacity: 1; } }
dialog.viewer { width: min(1100px, 96vw); max-width: none; height: min(90vh, 900px); padding: 0; display: none; flex-direction: column; overflow: hidden; }
dialog.viewer[open] { display: flex; }
.viewer-head { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.viewer-head h2 { margin: 0; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-head p { margin: .1rem 0 0; font-size: .76rem; color: var(--ink-3); }
.viewer-head .grow { min-width: 0; }
.viewer-retired { margin: 0; padding: .45rem 1rem; font-size: .82rem; background: #fdf6e7; color: #6b4300; border-bottom: 1px solid #f0d9a6; }
.viewer-retired[hidden] { display: none; }
.viewer-body { flex: 1; min-height: 0; background: #525659; display: flex; align-items: center; justify-content: center; }
.viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-none { text-align: center; color: #fff; padding: 2rem; }
.viewer-none .bi { font-size: 3rem; opacity: .8; }
.viewer-none .muted { color: #d5d9e0 !important; }
@media (max-width: 640px) {
  dialog.viewer { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .viewer-head { flex-wrap: wrap; }
  .viewer-head .grow { flex-basis: calc(100% - 44px); }
  .lib-view span { display: none; }
}
.viewer-hint { display: none; margin: 0; padding: .4rem 1rem; font-size: .78rem; color: var(--ink-2); background: #f7f9fc; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .viewer-hint:not([hidden]) { display: block; } }

/* ── v4.4 View documents in the page (PDF.js + Office previews) ── */
.viewer-body { overflow: auto; align-items: stretch; justify-content: stretch; }
.viewer-body.kind-image { align-items: center; justify-content: center; }
.viewer-body.kind-docx, .viewer-body.kind-pptx, .viewer-body.kind-text { background: #e9edf3; }
.viewer-body.kind-xlsx, .viewer-body.kind-csv { background: #fff; }
.viewer-body > .pv, .viewer-body > .pdfv { width: 100%; }
.viewer-loading { margin: auto; color: #fff; font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.kind-docx .viewer-loading, .kind-pptx .viewer-loading, .kind-xlsx .viewer-loading, .kind-csv .viewer-loading, .kind-text .viewer-loading { color: var(--ink-2); }
.viewer-none { margin: auto; }
.kind-docx .viewer-none, .kind-xlsx .viewer-none, .kind-pptx .viewer-none, .kind-csv .viewer-none, .kind-text .viewer-none, .kind-none .viewer-none { color: var(--ink-2); }
.kind-none { background: #f3f5f9; }
.pdfv { display: flex; flex-direction: column; min-height: 100%; }
.pdfv-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: .3rem; padding: .35rem .7rem; background: #3b3f44; color: #e9ecef; font-size: .8rem; }
.pdfv-bar .icon-btn { color: #e9ecef; }
.pdfv-bar .icon-btn:hover { background: rgba(255,255,255,.12); }
.pdfv-pages { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; overflow-x: auto; }
.pdfv-pages canvas { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); max-width: none; }
.pv { padding: 1.2rem; }
.pv-doc { max-width: 820px; margin: 0 auto; background: #fff; padding: 2.6rem 3rem; box-shadow: 0 2px 12px rgba(13,42,87,.12); font-size: .95rem; line-height: 1.6; color: #1d2433; overflow-wrap: anywhere; }
.pv-doc p { margin: 0 0 .7rem; }
.pv-doc .pv-empty { margin: 0 0 .5rem; }
.pv-doc .pv-h { color: var(--indigo-950); margin: 1.2rem 0 .5rem; line-height: 1.3; }
.pv-doc h1.pv-title { font-size: 1.5rem; }
.pv-doc .pv-center { display: block; text-align: center; }
.pv-doc .pv-quote { border-left: 3px solid var(--line); padding-left: .8rem; color: var(--ink-2); }
.pv-list { margin: 0 0 .7rem; padding-left: 1.4rem; }
.pv-img { max-width: 100%; height: auto; display: inline-block; margin: .3rem 0; }
.pv-tablewrap { overflow-x: auto; margin: .4rem 0 .9rem; }
.pv-table { border-collapse: collapse; width: 100%; font-size: .86rem; }
.pv-table td { border: 1px solid #cfd6e2; padding: .35rem .5rem; vertical-align: top; }
.pv-table tr:first-child td { background: #f3f6fb; font-weight: 600; }
.pv-xlsx { display: flex; flex-direction: column; min-height: 100%; margin: -1.2rem; }
.pv-xlsx .pv-pane { flex: 1; }
.pv-xlsx .pv-tablewrap { margin: 0; }
.pv-sheet { border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; }
.pv-sheet th, .pv-sheet td { border: 1px solid #dfe4ec; padding: .25rem .5rem; white-space: nowrap; max-width: 380px; overflow: hidden; text-overflow: ellipsis; }
.pv-sheet thead th { position: sticky; top: 0; background: #f3f6fb; color: var(--ink-3); font-weight: 600; text-align: center; z-index: 1; }
.pv-sheet tbody th { background: #f3f6fb; color: var(--ink-3); font-weight: 500; text-align: right; position: sticky; left: 0; }
.pv-sheet td.num { text-align: right; }
.pv-tabs { position: sticky; bottom: 0; display: flex; gap: 2px; padding: .3rem .5rem 0; background: #eef1f6; border-top: 1px solid var(--line); overflow-x: auto; }
.pv-tab { border: 1px solid var(--line); border-bottom: 0; background: #e2e7ef; border-radius: 6px 6px 0 0; padding: .3rem .8rem; font: inherit; font-size: .8rem; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.pv-tab.on { background: #fff; color: #1f7a3a; font-weight: 700; }
.pv-pad { padding: .8rem 1rem; }
.pv-slides { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.pv-note { margin: 0; font-size: .78rem; color: var(--ink-3); text-align: center; }
.pv-slide { position: relative; background: #fff; aspect-ratio: 16 / 9; padding: 2rem 2.4rem; box-shadow: 0 2px 12px rgba(13,42,87,.14); overflow: auto; border-top: 4px solid var(--indigo-600); }
.pv-slide h2 { margin: 0 0 .9rem; font-size: 1.35rem; color: var(--indigo-950); }
.pv-slide-no { position: absolute; right: .8rem; bottom: .5rem; font-size: .72rem; color: var(--ink-3); }
.pv-bullets { margin: 0 0 .6rem; padding-left: 1.2rem; font-size: .95rem; line-height: 1.5; }
.pv-pics { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.pv-pics img { max-height: 220px; max-width: 100%; object-fit: contain; }
.pv-text { margin: 0 auto; max-width: 900px; background: #fff; padding: 1.5rem; white-space: pre-wrap; font-size: .85rem; box-shadow: 0 2px 12px rgba(13,42,87,.12); }
.fd-preview { padding: 0; overflow: hidden; }
.fd-view { display: flex; height: min(78vh, 900px); }
.fd-view.kind-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 640px) {
  .pv { padding: .6rem; }
  .pv-doc { padding: 1.3rem 1.1rem; font-size: .9rem; }
  .pv-slide { aspect-ratio: auto; padding: 1.2rem; }
  .pv-xlsx { margin: -.6rem; }
  .fd-view { height: 70vh; }
}

/* ── v4.5 Available documents register ───────────────────── */
.reg-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.reg-head h1 { margin: 0; font-size: 1.35rem; color: var(--indigo-950); display: flex; align-items: center; gap: .5rem; }
.reg-head h1 .bi { color: var(--indigo-600); }
.reg-head p { margin: .15rem 0 0; color: var(--ink-3); font-size: .86rem; }
.reg-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .7rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0; }
.reg-search { flex: 1 1 320px; display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 9px; padding: 0 .75rem; background: #f7f9fc; }
.reg-search:focus-within { border-color: var(--indigo-500); background: #fff; box-shadow: 0 0 0 3px var(--indigo-50); }
.reg-search .bi { color: var(--ink-3); }
.reg-search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: .92rem; padding: .6rem 0; outline: none; min-width: 0; }
.reg-tools select { width: auto; flex: 0 1 170px; }
.reg-count { font-size: .8rem; color: var(--ink-3); margin-left: auto; white-space: nowrap; }
.reg-tablewrap { background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); overflow: auto; max-height: calc(100vh - 290px); box-shadow: var(--shadow); }
.reg-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.reg-table thead th { position: sticky; top: 0; z-index: 2; background: var(--indigo-950); color: #fff; text-align: left; font-weight: 600; font-size: .78rem; padding: .6rem .7rem; white-space: nowrap; }
.reg-table thead th[data-sort] { cursor: pointer; user-select: none; }
.reg-table thead th[data-sort]::after { content: "\2195"; opacity: .35; margin-left: .3rem; font-size: .7rem; }
.reg-table thead th[aria-sort="ascending"]::after { content: "\25B2"; opacity: .9; }
.reg-table thead th[aria-sort="descending"]::after { content: "\25BC"; opacity: .9; }
.reg-table td { padding: .55rem .7rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.reg-table tbody tr:nth-child(even) td { background: #fafbfd; }
.reg-table tbody tr:hover td { background: #f1f5fc; }
.reg-table .c-no { width: 1%; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.reg-table .c-act { width: 1%; text-align: right; }
.reg-table .c-act .btn { margin-left: .25rem; }
.reg-table .c-folder a { color: var(--ink-2); font-size: .8rem; }
.reg-table .c-place, .reg-table .c-folder { max-width: 220px; }
.reg-doc { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; min-width: 240px; }
.reg-doc b { display: block; color: var(--indigo-950); font-weight: 600; }
.reg-doc:hover b { color: var(--indigo-600); text-decoration: underline; }
.reg-doc small { display: block; color: var(--ink-3); font-size: .74rem; margin-top: .1rem; }
.reg-table tr.is-retired .reg-doc b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(122,74,5,.45); }
.reg-none { padding: 1.5rem; text-align: center; }
@media (max-width: 900px) { .reg-table .c-folder, .reg-table .c-ver, .reg-table .c-place { display: none; } }
@media (max-width: 640px) {
  .reg-table .c-no, .reg-table .c-date, .reg-table th:nth-child(3), .reg-table td:nth-child(3) { display: none; }
  .reg-table .c-act .btn { padding: .3rem .5rem; }
  .reg-tools select { flex: 1 1 45%; }
  .reg-tablewrap { max-height: none; }
}
@media (max-width: 640px) {
  .reg-head h1 { font-size: 1.15rem; }
  .reg-head .grow { flex-basis: 100%; }
  .reg-table thead { display: none; }
  .reg-table, .reg-table tbody { display: block; }
  .reg-table tbody tr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .45rem .6rem; padding: .75rem .8rem; border-bottom: 1px solid var(--line-2); }
  .reg-table tbody tr[hidden] { display: none; }
  .reg-table tbody tr:nth-child(even) { background: #fafbfd; }
  .reg-table td { border: 0; padding: 0; background: none !important; }
  .reg-table td:nth-child(2) { grid-column: 1 / -1; }
  .reg-doc { min-width: 0; }
  .reg-table .c-act { text-align: right; }
}

/* ── v4.6 Links: no underline when the pointer is over them (colour change only) ── */
a, a:hover, a:focus, .linkish, .linkish:hover, .row-link:hover, .lib-name:hover b, .reg-doc:hover b, .fm-name:hover b, .mod-head:hover h3, a.title:hover { text-decoration: none !important; }
a:focus-visible, .linkish:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 2px; border-radius: 3px; }
.lib-table tr.is-retired .lib-name b, .reg-table tr.is-retired .reg-doc b { text-decoration: line-through !important; }

/* ── v4.6 Learning modules (KM, OL, IL) ── */
.lm-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.2rem; margin-bottom: .8rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.lm-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.lm-ico { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 14px; color: #fff; font-size: 1.5rem; background: var(--c); background-image: linear-gradient(160deg, rgba(255,255,255,.18), rgba(0,0,0,.12)); }
.lm-head h1 { margin: 0; font-size: 1.3rem; color: var(--indigo-950); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.lm-head p { margin: .2rem 0 0; color: var(--ink-3); font-size: .86rem; max-width: 80ch; }
.lm-head .km-abbr { --c: inherit; }
.lm-filter { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .7rem; }
.lm-filter .reg-search { flex: 1 1 280px; background: #fff; }
.lm-filter select { width: auto; }
.lm-docs { border-radius: 0; box-shadow: none; border: 0; border-top: 1px solid var(--line); max-height: none; }
.il-gain { display: grid; gap: .6rem; }
.il-row { display: grid; grid-template-columns: minmax(110px, 34%) 1fr auto; gap: .6rem; align-items: center; font-size: .84rem; }
.il-t { position: relative; height: 16px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.il-t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.il-b { background: #c3c9d8; z-index: 1; height: 7px; top: 0 !important; bottom: auto !important; }
.il-e { background: var(--c, #7a4fc9); height: 7px; top: auto !important; bottom: 0 !important; }
.il-v { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }

/* ── v4.7 Kobo data ───────────────────────────────────────── */
.kb-connect .panel-body { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.kb-connect .panel-body > .bi { font-size: 2rem; color: #4f9a1c; }
.kb-connect h2 { margin: 0 0 .2rem; font-size: 1.05rem; }
.kb-connect p { margin: 0; font-size: .86rem; color: var(--ink-2); }
.kb-sync { margin: 0 0 1rem; padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.kb-sync[hidden] { display: none; }
.kb-sync-bar { height: 8px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.kb-sync-bar i { display: block; height: 100%; width: 0; background: #4f9a1c; transition: width .3s; }
.kb-sync p { margin: .5rem 0 0; font-size: .84rem; color: var(--ink-2); }
.kb-forms { border: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); max-height: none; }
.kb-proj select { max-width: 200px; }
.kb-skipped { padding: .7rem 1rem; border-top: 1px solid var(--line-2); font-size: .84rem; color: var(--ink-2); }
.kb-skipped summary { cursor: pointer; }
.kb-skipped p { margin: .4rem 0 0; }
.kb-search .reg-search { min-width: 240px; }
.kb-datawrap { overflow: auto; max-height: calc(100vh - 300px); border-top: 1px solid var(--line); }
.kb-data { border-collapse: separate; border-spacing: 0; font-size: .8rem; }
.kb-data th { position: sticky; top: 0; z-index: 2; background: var(--indigo-950); color: #fff; text-align: left; font-weight: 600; padding: .5rem .6rem; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.kb-data td { padding: .4rem .6rem; border-bottom: 1px solid var(--line-2); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.kb-data td.num { text-align: right; font-variant-numeric: tabular-nums; }
.kb-data .kb-sticky { position: sticky; left: 0; z-index: 1; min-width: 190px; border-right: 1px solid var(--line); }
.kb-data th.kb-sticky { z-index: 3; }
.kb-data td.kb-sticky b { display: block; color: var(--indigo-950); }
.kb-data td.kb-sticky small { display: block; color: var(--ink-3); }
.kb-acts { display: block; margin-top: .15rem; font-size: .74rem; }
.kb-acts .linkish { font-size: .74rem; }
.kb-reason { display: block; font-size: .72rem; color: #7a4a05; white-space: normal; }
.kb-data tr.is-excl td { background: #fbf6ec; color: var(--ink-3); }
.kb-data td.is-fix { background: #eaf6e1; box-shadow: inset 2px 0 0 #4f9a1c; }
.kb-pager { display: flex; align-items: center; gap: .4rem; padding: .6rem .9rem; border-top: 1px solid var(--line-2); }
.kb-cur { margin: 0; padding: .45rem .6rem; background: #f7f9fc; border-radius: 6px; font-size: .88rem; }
.kb-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; align-items: start; }
.kb-tool { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; margin: 0; }
.kb-tool h3 { margin: 0; font-size: .95rem; color: var(--indigo-950); display: flex; gap: .45rem; align-items: center; }
.kb-tool h3 .bi { color: #4f9a1c; }
.kb-tool > p { margin: 0; font-size: .8rem; color: var(--ink-3); line-height: 1.45; }
.kb-tool .form-grid { margin: 0; }
.kb-tool .btn { align-self: flex-start; }
.kb-checks { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; }
.kb-checks label { display: flex; gap: .4rem; align-items: center; }
.kb-checks-scroll { max-height: 190px; overflow: auto; padding: .4rem .5rem; border: 1px solid var(--line-2); border-radius: 6px; }
.kb-filter { padding: .7rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.kb-filter label.small { display: inline-flex; align-items: center; gap: .35rem; }
.kb-filter input, .kb-filter select { width: auto; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kb-q h3 { margin: 0; font-size: .92rem; color: var(--indigo-950); line-height: 1.35; }
.kb-q .panel-head p { margin: .1rem 0 0; font-size: .72rem; }
.kb-note { margin: .5rem 0 0; font-size: .74rem; color: var(--ink-3); }
.kb-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin-bottom: .8rem; }
.kb-stats span { display: flex; flex-direction: column; padding: .45rem .5rem; background: #f7f9fc; border-radius: 6px; font-size: .7rem; color: var(--ink-3); }
.kb-stats b { font-size: 1.05rem; color: var(--indigo-950); font-variant-numeric: tabular-nums; }
.kb-top { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .82rem; }
.kb-top li { display: flex; justify-content: space-between; gap: .6rem; padding: .3rem 0; border-bottom: 1px dashed var(--line-2); }
.kb-xtab { border-collapse: collapse; font-size: .78rem; margin-top: .8rem; width: 100%; }
.kb-xtab th, .kb-xtab td { border: 1px solid var(--line-2); padding: .3rem .45rem; text-align: left; }
.kb-xtab thead th { background: #f3f6fb; font-weight: 600; }
.kb-xtab thead th small { display: block; font-weight: 400; color: var(--ink-3); }
.kb-xtab td { background: linear-gradient(90deg, rgba(37,125,224,.16) var(--p), transparent var(--p)); white-space: nowrap; }
.kb-xtab td span { color: var(--ink-3); font-size: .7rem; }
.kb-rep-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.kb-doc { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 2rem 2.2rem; max-width: 1100px; }
.kb-doc-head { display: flex; gap: 1rem; align-items: center; padding-bottom: 1rem; border-bottom: 3px solid transparent; border-image: var(--stripe) 1; }
.kb-logo { width: 64px; height: auto; }
.kb-eyebrow { margin: 0; font-size: .78rem; color: var(--ink-3); }
.kb-doc-head h1 { margin: .15rem 0; font-size: 1.5rem; color: var(--indigo-950); }
.kb-sub { margin: 0; color: var(--ink-2); font-size: .9rem; }
.kb-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin: 1.2rem 0; }
.kb-facts div { padding: .7rem .8rem; background: #f7f9fc; border-radius: 8px; }
.kb-facts dt { font-size: .74rem; color: var(--ink-3); }
.kb-facts dd { margin: .1rem 0 0; font-size: 1.15rem; font-weight: 700; color: var(--indigo-950); }
.kb-intro { padding: .9rem 1rem; background: #f2f8ec; border-left: 4px solid #4f9a1c; border-radius: 6px; margin-bottom: 1rem; }
.kb-intro h2 { margin: 0 0 .3rem; font-size: .95rem; }
.kb-intro p { margin: 0; font-size: .9rem; line-height: 1.55; }
.kb-method { font-size: .82rem; color: var(--ink-2); margin-bottom: 1.2rem; }
.kb-method summary { cursor: pointer; font-weight: 600; color: var(--indigo-950); }
.kb-method ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.kb-grid-report { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.kb-rq { padding: 1rem; border: 1px solid var(--line-2); border-radius: 8px; break-inside: avoid; }
.kb-rq h3 { margin: 0 0 .7rem; }
.kb-rq h3 span { color: #4f9a1c; }
.kb-doc-foot { margin-top: 1.2rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .74rem; color: var(--ink-3); }
@media (max-width: 760px) { .kb-grid, .kb-grid-report { grid-template-columns: 1fr; } .kb-facts { grid-template-columns: repeat(2, 1fr); } .kb-doc { padding: 1.1rem; } .kb-stats { grid-template-columns: repeat(3, 1fr); } }
@media print {
  .side, .topbar, .no-print, .app-foot, .tabbar, .flash, .foot, footer.app-footer { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .kb-doc { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .kb-grid-report { grid-template-columns: 1fr 1fr; }
  .kb-rq { page-break-inside: avoid; }
  .hbar-t i, .col-t i, .split i, .kb-xtab td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.src-tag { display: inline-block; font-size: .64rem; font-weight: 700; padding: 0 .35rem; border-radius: 4px; vertical-align: 1px; }
.src-kobo { color: #2e6b0c; background: #eaf6e1; }
.src-gform { color: #5b34a0; background: #f0e9fb; }
.gf-ways { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: stretch; }
.gf-way { border: 1px solid var(--line); border-radius: var(--r); padding: .8rem; display: flex; flex-direction: column; gap: .5rem; }
.gf-way h3 { margin: 0; font-size: .88rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.gf-way p { margin: 0; font-size: .78rem; color: var(--ink-3); line-height: 1.45; }
.gf-or { align-self: center; font-size: .78rem; color: var(--ink-3); }
@media (max-width: 640px) { .gf-ways { grid-template-columns: 1fr; } .gf-or { justify-self: center; } }
.kb-connect { margin-bottom: 1rem; }

/* ── v4.9 GBV survivors — economic support (IGA) ─────────── */
.iga-conf { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; font-weight: 700; color: #8a1d4f; background: #fbe8f0; border-radius: 99px; padding: .1rem .55rem; vertical-align: middle; }
.iga-lock { font-size: .78rem; color: var(--ink-3); display: inline-flex; gap: .3rem; align-items: center; }
.iga-names { display: inline; margin: 0; }
.btn-warn { background: #fff4e5; border-color: #f0c27a; color: #7a4a05; }
.iga-st { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; color: #1d2433; white-space: nowrap; }
.iga-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.iga-tier { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: .74rem; font-weight: 800; color: #fff; }
.iga-tier.t-A { background: #d61f2c; } .iga-tier.t-B { background: #e07a1f; } .iga-tier.t-C { background: #2f62b5; }
.iga-avatar { width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; color: #8a1d4f; background: #fbe8f0; }
.iga-avatar.sm { width: 32px; height: 32px; font-size: .85rem; }
.iga-person { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); border-left: 5px solid #b0306a; }
.iga-person h1 { margin: 0; font-size: 1.3rem; color: var(--indigo-950); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.iga-pname { font-weight: 500; color: var(--ink-2); }
.iga-person p { margin: .25rem 0 0; font-size: .86rem; color: var(--ink-3); display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.iga-prot { display: inline-flex; gap: .25rem; align-items: center; font-size: .74rem; font-weight: 700; color: #8a1d1d; background: #fde8e8; border-radius: 99px; padding: .05rem .5rem; }
.iga-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: 1rem; }
.iga-step { display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: center; padding: .7rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.iga-step > span { grid-row: span 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #eef1f6; color: var(--ink-3); font-weight: 700; font-size: .85rem; }
.iga-step.ok > span { background: #3d8a14; color: #fff; }
.iga-step b { font-size: .86rem; color: var(--indigo-950); }
.iga-step small { font-size: .74rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iga-cols { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.iga-cols .panel-head h2 { display: flex; gap: .45rem; align-items: center; }
.iga-cols .panel-head h2 .bi { color: #b0306a; }
.iga-grp { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; padding: .55rem .7rem; border-radius: 8px; background: color-mix(in srgb, var(--c) 10%, #fff); }
.iga-grp .bi { color: var(--c); font-size: 1.2rem; }
.iga-grp small { margin-left: auto; color: var(--ink-3); font-size: .74rem; }
.iga-inline { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.iga-inline select { flex: 1 1 200px; width: auto; }
.iga-inline input[type=date] { width: auto; }
.iga-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; }
.iga-dl > div { padding: .5rem .9rem; border-bottom: 1px solid var(--line-2); }
.iga-dl dt { font-size: .72rem; color: var(--ink-3); }
.iga-dl dd { margin: .1rem 0 0; font-size: .86rem; color: var(--indigo-950); }
.iga-sensitive { margin: .6rem .9rem .9rem; border: 1px dashed #e2a6c2; border-radius: 8px; background: #fdf6f9; }
.iga-sensitive h3 { margin: .6rem .9rem 0; font-size: .8rem; color: #8a1d4f; display: flex; gap: .35rem; align-items: center; }
.iga-sensitive .iga-dl { grid-template-columns: 1fr; }
.iga-sensitive .iga-dl > div { border-bottom: 0; padding: .35rem .9rem; }
.iga-timeline { padding: .4rem .9rem .9rem; }
.iga-tl { display: flex; gap: .8rem; align-items: flex-start; padding: .65rem 0; border-bottom: 1px solid var(--line-2); }
.iga-tl:last-child { border-bottom: 0; }
.iga-tl p { margin: .25rem 0 0; font-size: .84rem; }
.iga-tl small { color: var(--ink-3); font-size: .76rem; margin-left: .3rem; }
.iga-tl-dot { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: .82rem; color: var(--ink-3); background: #eef1f6; border: 2px solid #dfe4ec; }
.iga-tl.done .iga-tl-dot, .iga-tl-dot.done { background: #3d8a14; border-color: #3d8a14; color: #fff; }
.iga-tl.overdue .iga-tl-dot, .iga-tl-dot.overdue { background: #fde8e8; border-color: #d61f2c; color: #d61f2c; }
.iga-tl.due .iga-tl-dot, .iga-tl-dot.due { background: #fff4e5; border-color: #e07a1f; color: #a06200; }
.iga-warn { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .8rem; border-radius: 8px; background: #fde8e8; color: #6b1010; font-size: .86rem; }
.iga-warn input { margin-top: .2rem; }
.iga-kit-form { width: 100%; border-collapse: collapse; }
.iga-kit-form th { text-align: left; font-size: .74rem; color: var(--ink-3); font-weight: 600; padding: 0 .25rem .3rem; }
.iga-kit-form td { padding: .2rem .25rem; }
.iga-choice { display: flex; flex-wrap: wrap; gap: .4rem; }
.iga-choice label { cursor: pointer; }
.iga-choice input { position: absolute; opacity: 0; }
.iga-choice span { display: inline-flex; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 99px; font-size: .82rem; background: #fff; }
.iga-choice input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); color: #1d2433; font-weight: 600; box-shadow: inset 0 0 0 1px var(--c); }
.iga-choice input:focus-visible + span { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
.iga-table { border-radius: var(--r-lg); max-height: calc(100vh - 300px); }
.iga-g { display: inline-flex; gap: .3rem; align-items: center; }
.iga-g .bi { color: var(--c); }
.iga-bulk { position: sticky; top: 0; z-index: 5; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .55rem .8rem; margin-bottom: .5rem; background: #1d2a44; color: #fff; border-radius: var(--r); font-size: .86rem; }
.iga-bulk[hidden] { display: none; }
.iga-bulk select { width: auto; }
.iga-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.iga-gcard { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; border-top: 4px solid var(--c); margin: 0; }
.iga-gcard.is-off { opacity: .6; }
.iga-gh { display: flex; gap: .7rem; align-items: flex-start; }
.iga-gi { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--c); font-size: 1.2rem; }
.iga-gh h3 { margin: 0; font-size: .95rem; color: var(--indigo-950); }
.iga-gh p { margin: .15rem 0 0; font-size: .78rem; color: var(--ink-3); }
.iga-gn { display: flex; flex-direction: column; align-items: center; font-size: .68rem; color: var(--ink-3); text-decoration: none; }
.iga-gn b { font-size: 1.35rem; color: var(--c); line-height: 1.1; }
.iga-kitlist { margin: 0; padding-left: 1.1rem; font-size: .8rem; color: var(--ink-2); }
.iga-gcard .btn { align-self: flex-start; }
@media (max-width: 900px) { .iga-cols { grid-template-columns: 1fr; } .iga-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .iga-dl { grid-template-columns: 1fr; } }
.iga-sub { display: block; font-size: .72rem; color: var(--ink-3); }

/* ── v4.10 Files: four sharing choices, admin columns ── */
.share-modes-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.share-modes-4 .share-mode { flex-direction: column; align-items: flex-start; gap: .3rem; padding: .7rem .75rem; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; position: relative; }
.share-modes-4 .share-mode input { position: absolute; opacity: 0; }
.share-modes-4 .share-mode > .bi { font-size: 1.15rem; color: var(--c); }
.share-modes-4 .share-mode b { display: block; font-size: .88rem; }
.share-modes-4 .share-mode small { display: block; font-size: .72rem; color: var(--ink-3); line-height: 1.35; }
.share-modes-4 .share-mode:has(input:checked) { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); background: color-mix(in srgb, var(--c) 7%, #fff); }
.share-modes-4 .share-mode:has(input:focus-visible) { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
.share-box .share-pick { margin-top: .6rem; }
.share-box .share-pick[hidden], .share-pick[hidden] { display: none; }
.acc2 { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 600; color: var(--c); }
.access-sum > .bi { color: var(--c, var(--indigo-600)); }
.cols-list { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
@media (max-width: 640px) { .share-modes-4 { grid-template-columns: 1fr 1fr; } .cols-list { grid-template-columns: 1fr; } }
.iga-el { align-items: center; margin-bottom: .6rem; }
.dproj { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; color: var(--brand-blue, #2f62b5); }
.reg-table .c-proj { min-width: 9rem; }

/* ── Risk Management (v4.13) ─────────────────────────────── */
.rk-hero { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; background: var(--card, #fff); border: 1px solid var(--line); border-left: 5px solid #d61f2c; border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.rk-hero h1 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.rk-hero p { margin: .2rem 0 0; color: var(--ink-2); font-size: .9rem; }
.rk-hero-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, #d61f2c, #8e1420); flex: none; }
.rk-mx { margin-bottom: .6rem; align-items: center; }
.rk-level { display: inline-flex; align-items: center; gap: .25rem; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff; background: var(--c); white-space: nowrap; }
.rk-st { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--c); }
.rk-st::before { content: ''; width: .55rem; height: .55rem; border-radius: 50%; background: var(--c); }
.rk-ast { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--c); white-space: nowrap; }
.rk-late { color: #c41d2a; font-weight: 700; }
.rk-late-sub { display: block; color: #c41d2a; font-size: .72rem; }
.rk-prog { display: inline-flex; align-items: center; gap: .45rem; }
.rk-prog-t { display: inline-flex; width: 80px; height: 7px; border-radius: 99px; background: #e6e9f0; overflow: hidden; }
.rk-prog-t i { display: block; height: 100%; }
.rk-prog small { color: var(--ink-2); white-space: nowrap; }
.rk-dot { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 99px; background: #d61f2c; color: #fff; font-size: .7rem; font-weight: 700; animation: rk-blink 1.2s ease-in-out infinite; }
.rk-h3 { font-size: .82rem; font-weight: 700; color: var(--ink-2); margin: 0 0 .4rem; }

/* blinking red: needs attention */
@keyframes rk-blink { 0%, 100% { background: #d61f2c; box-shadow: 0 0 0 0 rgba(214, 31, 44, .55); } 50% { background: #ff3b4a; box-shadow: 0 0 0 6px rgba(214, 31, 44, 0); } }
@keyframes rk-row { 0%, 100% { background: rgba(214, 31, 44, .035); } 50% { background: rgba(214, 31, 44, .13); } }
@keyframes rk-tile { 0%, 100% { border-color: #d61f2c; box-shadow: 0 0 0 0 rgba(214, 31, 44, .35); } 50% { border-color: #ff6b76; box-shadow: 0 0 0 5px rgba(214, 31, 44, 0); } }
.rk-alert { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; background: #d61f2c; color: #fff !important; font-size: .74rem; font-weight: 700; white-space: nowrap; text-decoration: none; animation: rk-blink 1.2s ease-in-out infinite; }
.rk-alert-lg { font-size: .82rem; padding: .25rem .7rem; }
.rk-table tr.rk-attn td { animation: rk-row 1.6s ease-in-out infinite; }
.rk-table tr.rk-attn td:first-child { box-shadow: inset 4px 0 0 #d61f2c; }
.stat.rk-blink { border: 2px solid #d61f2c; animation: rk-tile 1.4s ease-in-out infinite; }
.stat.rk-blink .value { color: #c41d2a; }
.rk-why-s { display: block; color: #a3161f; font-size: .75rem; margin-top: .15rem; }
.rk-chip-attn i { color: #d61f2c; }
.rk-attn-panel { border: 2px solid #d61f2c; }
.rk-attn-panel h2 i { color: #d61f2c; }
.rk-attn-list { list-style: none; margin: 0; padding: 0; }
.rk-attn-list li { display: flex; align-items: center; gap: .8rem; padding: .65rem 1.1rem; border-top: 1px solid var(--line); }
.rk-attn-list small { display: block; color: #a3161f; font-size: .78rem; }
.rk-pulse { width: .75rem; height: .75rem; border-radius: 50%; flex: none; animation: rk-blink 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .rk-alert, .rk-dot, .rk-pulse, .stat.rk-blink, .rk-table tr.rk-attn td { animation: none; }
  .rk-table tr.rk-attn td { background: rgba(214, 31, 44, .08); }
}

/* heat map */
.rk-heat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: .3rem .5rem; }
.rk-heat-y { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .75rem; font-weight: 700; color: var(--ink-2); text-align: center; }
.rk-heat-x { grid-column: 2; text-align: center; font-size: .75rem; font-weight: 700; color: var(--ink-2); }
.rk-heat-grid { display: grid; grid-template-columns: 6.5rem repeat(5, 1fr); gap: 4px; }
.rk-heat-ax { display: flex; flex-direction: column; justify-content: center; font-size: .8rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.rk-heat-ax small { font-size: .66rem; font-weight: 500; color: var(--ink-2); }
.rk-heat-ax.x { text-align: center; align-items: center; }
.rk-heat-c { display: grid; place-items: center; aspect-ratio: 1.5; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, #fff); color: #fff; font-weight: 800; font-size: 1.05rem; }
.rk-heat-c.has { background: var(--c); }
.rk-heat-c.attn { outline: 3px solid #d61f2c; outline-offset: 1px; animation: rk-tile 1.4s ease-in-out infinite; }
.rk-heat-a { text-decoration: none; }
.rk-legend { margin-top: .7rem; }

/* risk file */
.rk-file { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; }
.rk-file.attn { border: 2px solid #d61f2c; }
.rk-file h1 { margin: .15rem 0 .4rem; font-size: 1.25rem; line-height: 1.35; }
.rk-file-cat { margin: 0; font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.rk-file-meta { display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; margin: 0; font-size: .85rem; color: var(--ink-2); }
.rk-why { display: flex; gap: .8rem; margin-top: .8rem; padding: .8rem 1rem; border-radius: 12px; background: #fdecee; color: #8e1420; }
.rk-why > i { font-size: 1.4rem; color: #d61f2c; animation: rk-tile 1.4s infinite; border-radius: 50%; }
.rk-why ul { margin: .2rem 0 0; padding-left: 1.1rem; }
.rk-rate { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; margin-top: 1rem; }
.rk-rate-c { flex: 1 1 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .7rem; border-radius: 12px; background: var(--card, #fff); border: 1px solid var(--line); text-align: center; }
.rk-rate-c small { font-size: .72rem; color: var(--ink-2); font-weight: 600; }
.rk-rate-c b { font-size: 1.6rem; line-height: 1.2; }
.rk-rate-c span { font-size: .8rem; }
.rk-rate-c.big { background: var(--c); border-color: var(--c); color: #fff; }
.rk-rate-c.big small { color: rgba(255, 255, 255, .85); }
.rk-rate-x { display: grid; place-items: center; font-size: 1.2rem; color: var(--ink-2); }
.rk-cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; }
@media (max-width: 900px) { .rk-cols { grid-template-columns: 1fr; } .rk-rate-x { display: none; } }
.rk-text h3 { font-size: .8rem; color: var(--ink-2); margin: 1rem 0 .3rem; }
.rk-text h3:first-child { margin-top: 0; }
.rk-text div { font-size: .9rem; line-height: 1.55; }
.rk-act { padding: .85rem 1.1rem; border-top: 1px solid var(--line); }
.rk-act.attn { box-shadow: inset 4px 0 0 #d61f2c; background: #fff7f8; }
.rk-act-h { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.rk-act-m { margin: .45rem 0 .25rem; font-weight: 600; }
.rk-act-todo { font-size: .86rem; color: var(--ink-2); line-height: 1.5; }
.rk-act-meta { display: flex; gap: .3rem 1rem; flex-wrap: wrap; margin: .45rem 0 0; font-size: .8rem; color: var(--ink-2); }
.rk-note { margin: .4rem 0 0; font-size: .8rem; color: #2f62b5; }
.rk-tl { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.rk-tl li { position: relative; padding: 0 0 1rem .6rem; display: flex; flex-direction: column; gap: .15rem; font-size: .86rem; }
.rk-tl li::before { content: ''; position: absolute; left: -1.42rem; top: .3rem; width: .65rem; height: .65rem; border-radius: 50%; background: #d61f2c; border: 2px solid #fff; }
.rk-tl p { margin: .15rem 0; color: var(--ink-2); }
.rk-table .rk-sub, .rk-sub { display: block; font-size: .75rem; color: var(--ink-2); margin-top: .2rem; }
.rk-m { font-weight: 600; font-size: .86rem; }
.rk-det summary { cursor: pointer; color: var(--ink); }
.rk-det div { margin-top: .4rem; color: var(--ink-2); line-height: 1.5; }
.rk-what { background: #f3f5fa; padding: .6rem .8rem; border-radius: 8px; margin: 0; }
.rk-choice { display: flex; gap: .4rem; flex-wrap: wrap; }
.rk-choice label { cursor: pointer; }
.rk-choice input { position: absolute; opacity: 0; }
.rk-choice span { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border-radius: 10px; border: 1.5px solid var(--line); font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.rk-choice input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.rk-choice input:focus-visible + span { outline: 2px solid var(--c); outline-offset: 2px; }
.rk-mail { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin: 0; }
.rk-check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.rk-check input { margin-top: .25rem; }
.rk-check small { display: block; color: var(--ink-2); font-weight: 400; font-size: .8rem; }
.rk-people { min-height: 6rem; }
.rk-group .panel-head h2 { font-size: 1rem; }
.rk-h3.mt-2 { margin-top: 1.1rem; }
.rk-sub { border: 0; padding: 0; background: none; }
select.rk-people { background-image: none; padding-right: .6rem; }

/* ── Asset register overview (v4.14) ─────────────────────── */
.as-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: .4rem 0 1rem; }
.as-head h1 { margin: 0; font-size: 1.3rem; display: flex; gap: .5rem; align-items: center; }
.as-head p { margin: .2rem 0 0; color: var(--ink-2); font-size: .9rem; }
.stat .value.as-money { font-size: 1.25rem; }
.as-count { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .7rem; display: grid; gap: .15rem; }
.as-count label { display: flex; gap: .5rem; align-items: center; font-size: .86rem; padding: .2rem 0; }
.as-count label[hidden] { display: none; }
.bad-text { color: #c41d2a; }

/* ── Recruitment: panel shortlisting (v4.15) ─────────────── */
.sl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; counter-reset: sl; }
.sl-steps li { counter-increment: sl; position: relative; padding: .6rem .7rem .6rem 2.6rem; border-radius: 12px; background: #f3f5fa; font-size: .82rem; line-height: 1.3; }
.sl-steps li::before { content: counter(sl); position: absolute; left: .65rem; top: .65rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; background: #d8deeb; color: #3a4563; font-weight: 700; font-size: .78rem; }
.sl-steps li.ok { background: #ecf7e6; } .sl-steps li.ok::before { content: '✓'; background: #3d8a14; color: #fff; }
.sl-steps li.part::before { background: #e0a526; color: #fff; }
.sl-steps b { display: block; } .sl-steps span { color: var(--ink-2); font-size: .76rem; }
@media (max-width: 800px) { .sl-steps { grid-template-columns: 1fr 1fr; } }
.sl-req { padding-top: 0; } .sl-req summary { cursor: pointer; color: var(--ink-2); }
.sl-crow .input[name=criterion] { flex: 1; min-width: 220px; }
.sl-bar { display: inline-block; width: 100%; max-width: 220px; height: 7px; border-radius: 99px; background: #e6e9f0; overflow: hidden; vertical-align: middle; }
.sl-bar i { display: block; height: 100%; background: #3d8a14; border-radius: 99px; }
.sl-prog .grow .sl-bar { margin-top: .3rem; }
.sl-wrap { max-height: 75vh; overflow: auto; }
.sl-sheet th { position: sticky; top: 0; z-index: 2; background: var(--card, #fff); vertical-align: bottom; }
.sl-sheet .sl-who { position: sticky; left: 0; z-index: 1; background: var(--card, #fff); min-width: 220px; max-width: 280px; }
.sl-sheet th.sl-who { z-index: 3; }
.sl-sheet th.sl-c { min-width: 110px; font-weight: 700; }
.sl-sheet th.sl-c small { display: block; font-weight: 400; color: var(--ink-2); font-size: .72rem; line-height: 1.25; white-space: normal; }
.sl-sheet th.sl-c em { display: block; font-style: normal; font-size: .7rem; color: #2f62b5; }
.sl-sheet .sub { display: block; font-size: .75rem; color: var(--ink-2); }
.sl-sheet tr.sl-done td { background: #f4faf0; }
.sl-sheet tr.sl-done td.sl-who { box-shadow: inset 3px 0 0 #3d8a14; }
.sl-num { width: 74px; } .sl-rec { min-width: 140px; }
.sl-yn.yes { border-color: #3d8a14; color: #2e6a0f; background: #f0f9ea; } .sl-yn.no { border-color: #c41d2a; color: #a3161f; background: #fdf0f1; }
.sl-tools { align-items: center; gap: .6rem; flex-wrap: wrap; }
.sl-rank .sub { display: block; font-size: .75rem; color: var(--ink-2); }
.sl-rank tr.sl-fail td { background: #fdf6f6; }
.sl-score { display: inline-flex; align-items: center; gap: .45rem; } .sl-score .sl-bar { width: 80px; }
.sl-vote { display: inline-flex; align-items: center; gap: .15rem; margin-right: .3rem; padding: .05rem .4rem; border-radius: 99px; font-size: .76rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.sl-cm summary { cursor: pointer; color: #2f62b5; } .sl-cm ul { margin: .3rem 0 0; padding-left: 1rem; color: var(--ink-2); }
.sl-sub { display: block; font-size: .75rem; color: var(--ink-2); margin-top: .15rem; border: 0; padding: 0; background: none; }
.sl-crow { display: flex !important; align-items: center; gap: .5rem; flex-wrap: wrap; }
.sl-crow .btn-group { margin-left: auto; }
.qadd.sl-crow .btn { width: auto; }

/* ── Online offer of employment (v4.17) ──────────────────── */
.of-done { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 2.3rem; margin: 0 auto 1rem; }
.of-done.ok { background: #e9f6e2; color: #3d8a14; } .of-done.bad { background: #fdecee; color: #c41d2a; } .of-done.info { background: #eef2fb; color: #2f62b5; }
.of-terms { margin: 0 0 1.2rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.of-terms div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .6rem; padding: .55rem .8rem; border-top: 1px solid var(--line); font-size: .9rem; }
.of-terms div:first-child { border-top: 0; }
.of-terms dt { color: var(--ink-2); font-weight: 600; } .of-terms dd { margin: 0; }
.of-h2 { font-size: 1rem; margin: 0 0 .5rem; }
.of-ben { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .35rem; font-size: .9rem; }
.of-ben i { color: #3d8a14; }
.of-det { margin-bottom: 1rem; } .of-det summary, .of-decline summary { cursor: pointer; color: #2f62b5; font-size: .88rem; }
.of-form { display: grid; gap: .9rem; padding: 1rem; border-radius: 12px; background: #f4f8f1; border: 1px solid #d7ebcb; }
.of-decline { margin-top: 1rem; } .of-decline form { margin-top: .6rem; display: grid; gap: .6rem; }
.auto-steps { list-style: none; margin: 0; padding: 0 1rem 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; counter-reset: au; }
.auto-steps li { counter-increment: au; position: relative; padding: .55rem .7rem .55rem 2.3rem; border-radius: 10px; background: #f3f5fa; font-size: .82rem; line-height: 1.3; }
.auto-steps li::before { content: counter(au); position: absolute; left: .6rem; top: .6rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center; background: #2f62b5; color: #fff; font-weight: 700; font-size: .72rem; }
.auto-steps b { display: block; } .auto-steps span { color: var(--ink-2); font-size: .76rem; }

/* ── Onboarding (v4.18) ──────────────────────────────────── */
.ob-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; }
.ob-head h1 { margin: 0; font-size: 1.35rem; } .ob-head p { margin: .15rem 0 0; color: var(--ink-2); font-size: .9rem; }
.ob-av { width: 56px; height: 56px; font-size: 1.15rem; }
.ob-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; margin-top: .45rem !important; font-size: .84rem; }
.ob-st { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; color: var(--c); }
.ob-st::before { content: ''; width: .55rem; height: .55rem; border-radius: 50%; background: var(--c); }
.ob-ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, var(--card, #fff) 76%, transparent 77% 100%), conic-gradient(#3d8a14 calc(var(--p) * 1%), #e6e9f0 0); }
.ob-ring b { font-size: 1rem; line-height: 1; } .ob-ring small { font-size: .68rem; color: var(--ink-2); }
.ob-cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; }
@media (max-width: 900px) { .ob-cols { grid-template-columns: 1fr; } }
.ob-tasks { list-style: none; margin: 0; padding: 0; }
.ob-tasks li { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem 1.1rem; border-top: 1px solid var(--line); }
.ob-tasks li b { display: block; font-weight: 600; font-size: .9rem; }
.ob-tasks li small { display: block; color: var(--ink-2); font-size: .78rem; margin-top: .1rem; }
.ob-tasks li.done b { color: var(--ink-2); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.ob-tasks li.late { box-shadow: inset 3px 0 0 #c41d2a; background: #fff8f8; }
.ob-box { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 2px solid #b8c0d3; background: #fff; display: grid; place-items: center; cursor: pointer; color: #fff; padding: 0; margin-top: .05rem; }
.ob-box:hover:not(:disabled) { border-color: #3d8a14; }
.ob-tasks li.done .ob-box { background: #3d8a14; border-color: #3d8a14; }
.ob-box:disabled { cursor: not-allowed; opacity: .55; }
.ob-box:focus-visible { outline: 3px solid #2f62b5; outline-offset: 2px; }
.ob-tpl-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ob-tpl-row input[name=title] { flex: 1; min-width: 220px; }
.ob-days { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.ob-days input { width: 70px; }
.ob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .8rem; }
.ob-card { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; }
.ob-card:hover { border-color: #2f62b5; box-shadow: 0 3px 12px rgba(13,42,87,.08); }
.ob-card.late { box-shadow: inset 4px 0 0 #c41d2a; }
.ob-card b { display: block; } .ob-card small { display: block; color: var(--ink-2); font-size: .78rem; margin-top: .15rem; }
.ob-bar { display: block; height: 6px; border-radius: 99px; background: #e6e9f0; margin: .55rem 0 .1rem; overflow: hidden; } .ob-bar i { display: block; height: 100%; background: #3d8a14; }
.rem-job { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.rem-job > i { font-size: 1.15rem; color: #2f62b5; margin-top: .1rem; }
.rem-job input { margin-top: .3rem; }
.rem-job b { display: block; font-size: .9rem; } .rem-job small { display: block; color: var(--ink-2); font-size: .78rem; line-height: 1.4; }
.rem-code { white-space: pre-wrap; word-break: break-all; background: #0f1530; color: #e7ecff; padding: .6rem .8rem; border-radius: 8px; font-size: .8rem; margin: 0; }
.panel-body.ob-tpl-row { display: flex; } .panel-body.ob-tpl-row input[name=title] { flex: 2; }

/* ── Resource mobilization trackers (v4.19) ──────────────── */
.rm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; }
.rm-card { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 1.2rem 1.2rem 1rem; border-radius: 16px; background: linear-gradient(160deg, #ffffff 0%, #f4f8ff 100%); border: 1px solid var(--line); color: inherit; text-decoration: none; overflow: hidden; }
.rm-card:hover { border-color: #2f62b5; box-shadow: 0 8px 24px rgba(20, 45, 100, .10); }
.rm-card.arch { opacity: .65; }
.rm-card-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #2f62b5; color: #fff; font-size: 1.2rem; margin-bottom: .4rem; }
.rm-card b { font-size: 1rem; line-height: 1.3; } .rm-card > small { color: var(--ink-2); font-size: .8rem; }
.rm-card-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .9rem; }
.rm-card-nums span { display: flex; flex-direction: column; font-size: .72rem; color: var(--ink-2); padding: .45rem .5rem; border-radius: 10px; background: rgba(47, 98, 181, .06); }
.rm-card-nums em { font-style: normal; font-size: 1.25rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.rm-card-nums i { font-style: normal; font-size: .7rem; color: #1d3f8f; font-weight: 600; }
.rm-card-nums .n-ok { background: #ecf7e6; } .rm-card-nums .n-ok em { color: #2e6a0f; }
.rm-card-nums .n-wait { background: #fdf5e3; } .rm-card-nums .n-wait em { color: #9a6b00; }
.rm-hero { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; padding: 1.4rem 1.5rem; border-radius: 18px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #3f7be0 0%, #1d3f8f 55%, #142c63 100%); }
.rm-hero h1 { margin: .15rem 0 .3rem; font-size: 1.45rem; line-height: 1.25; color: #fff; }
.rm-kicker { margin: 0; font-size: .78rem; letter-spacing: .02em; color: rgba(255,255,255,.8); font-weight: 600; }
.rm-sub { margin: 0; color: rgba(255,255,255,.85); font-size: .9rem; }
.rm-hero .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.rm-hero .btn:hover { background: rgba(255,255,255,.22); }
.rm-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; margin-top: -1.1rem; padding: 0 .8rem; position: relative; flex: none; height: auto; min-height: 0; align-self: stretch; align-items: start; }
.rm-hero { padding-bottom: 2.4rem; }
.rm-table td:last-child { white-space: nowrap; } .rm-table td:last-child > * { display: inline-flex; vertical-align: middle; } .rm-table form.inline { display: inline-flex; margin: 0; }
@media (max-width: 1000px) { .rm-kpis { grid-template-columns: repeat(2, 1fr); margin-top: .8rem; padding: 0; } }
.rm-kpi { display: flex; flex-direction: column; gap: .1rem; padding: .9rem 1rem; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(20, 45, 100, .08); border-top: 4px solid var(--c, #2f62b5); }
.rm-kpi.k-rec { --c: #3d8a14; } .rm-kpi.k-app { --c: #2f62b5; } .rm-kpi.k-won { --c: #5aa02c; } .rm-kpi.k-wait { --c: #b07d00; } .rm-kpi.k-lost { --c: #c41d2a; }
.rm-kpi-l { font-size: .76rem; color: var(--ink-2); font-weight: 600; }
.rm-kpi b { font-size: 1.7rem; line-height: 1.15; } .rm-kpi b small { font-size: .8rem; font-weight: 500; color: var(--ink-2); }
.rm-kpi-v { font-size: .86rem; font-weight: 700; color: var(--c); } .rm-kpi-h { font-size: .74rem; color: var(--ink-2); }
.rm-strip { display: flex; gap: 3px; margin-top: 1rem; height: 30px; border-radius: 10px; overflow: hidden; }
.rm-strip span { display: flex; align-items: center; justify-content: center; padding: 0 .5rem; background: var(--c); color: #fff; font-size: .74rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rm-sec { margin-top: 1rem; }
.rm-table td { vertical-align: top; }
.rm-t { font-weight: 600; display: block; min-width: 240px; max-width: 420px; }
.rm-flag { max-width: 420px; }
.rm-flag { display: block; margin-top: .25rem; font-size: .74rem; color: #9a6b00; }
.rm-table tr.rm-chk td:first-child { box-shadow: inset 3px 0 0 #e0a526; }
.rm-sub2 { display: block; font-size: .74rem; color: var(--ink-2); font-weight: 400; }
.rm-chip { display: inline-block; margin: 0 .25rem .25rem 0; padding: .05rem .45rem; border-radius: 99px; background: #eef2fb; color: #1d3f8f; font-size: .72rem; white-space: nowrap; }
.rm-stage { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 99px; font-size: .76rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); white-space: nowrap; }
.rm-note { display: block; margin-top: .25rem; font-size: .74rem; color: var(--ink-2); max-width: 220px; }
.rm-more { max-width: 300px; } .rm-more summary { cursor: pointer; color: #2f62b5; } .rm-more p { margin: .35rem 0 0; color: var(--ink-2); }
.rm-table tfoot td { border-top: 2px solid var(--line); }
.rm-bars { display: grid; gap: .7rem; }
.rm-bar { display: grid; grid-template-columns: 11rem 1fr auto; gap: .7rem; align-items: center; font-size: .86rem; }
.rm-bar-t { height: 14px; border-radius: 99px; background: #eef1f7; overflow: hidden; } .rm-bar-t i { display: block; height: 100%; border-radius: 99px; }
.rm-funnel { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .35rem; }
.rm-funnel li { padding: .45rem .8rem; border-radius: 10px; background: #f3f5fa; font-size: .86rem; }
.rm-funnel li:nth-child(2) { margin-left: 1.2rem; background: #eaf0fb; } .rm-funnel li:nth-child(3) { margin-left: 2.4rem; background: #ecf7e6; }
.rm-pick { display: grid; gap: .4rem; max-height: 50vh; overflow: auto; }
.rm-pick label { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.rm-pick small { display: block; color: var(--ink-2); font-size: .76rem; }
.rm-danger { justify-content: flex-start; gap: .5rem; border-top: 1px solid var(--line); }
@media print { .rm-hero { background: #1d3f8f !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .rm-hero .btn-group, .tabs, .icon-btn, .btn { display: none !important; } }

/* ── GBV Champions (v4.20) ───────────────────────────────── */
.ch-hero { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; padding: 1.4rem 1.5rem; border-radius: 18px; color: #fff; background: radial-gradient(120% 150% at 100% 0%, #8a63d2 0%, #5b3fa3 45%, #35206b 100%); }
.ch-hero h1 { margin: .15rem 0 .3rem; font-size: 1.5rem; color: #fff; }
.ch-kicker { margin: 0; font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.85); }
.ch-sub { margin: 0; max-width: 62ch; color: rgba(255,255,255,.88); font-size: .9rem; }
.ch-hero .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.ch-hero .btn:hover { background: rgba(255,255,255,.22); }
.ch-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-top: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card, #fff); }
.ch-filters label { display: flex; flex-direction: column; gap: .2rem; font-size: .74rem; font-weight: 600; color: var(--ink-2); }
.ch-filters .input { min-width: 0; padding-top: .35rem; padding-bottom: .35rem; }
.ch-filters select.input { max-width: 190px; }
label.ch-check { flex-direction: row !important; align-items: center; gap: .4rem !important; font-weight: 500 !important; color: var(--ink) !important; font-size: .82rem !important; }
.ch-kpis { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: .7rem; margin-top: 1rem; }
@media (max-width: 1100px) { .ch-kpis { grid-template-columns: repeat(3, 1fr); } }
.ch-kpi { display: flex; flex-direction: column; padding: .85rem 1rem; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line); }
.ch-kpi > span { font-size: .76rem; font-weight: 600; color: var(--ink-2); }
.ch-kpi b { font-size: 1.6rem; line-height: 1.2; font-variant-numeric: tabular-nums; } .ch-kpi b em { font-style: normal; font-size: .9rem; color: var(--ink-2); font-weight: 500; }
.ch-kpi small { font-size: .76rem; color: var(--ink-2); }
.ch-kpi.big { background: #f3effb; border-color: #d9cdf1; } .ch-kpi.big b { font-size: 2.1rem; color: #4a2f8d; }
.ch-meta { margin: .6rem 0 0; font-size: .82rem; color: var(--ink-2); }
.ch-wait { font-weight: 600; color: #9a6b00; }
.ch-pyr { display: grid; gap: .45rem; }
.ch-pyr-row { display: grid; grid-template-columns: 1fr 6.5rem 1fr; align-items: center; gap: .5rem; font-size: .8rem; }
.ch-pyr-row em { font-style: normal; text-align: center; color: var(--ink-2); }
.ch-pyr-row span { position: relative; height: 22px; display: flex; align-items: center; }
.ch-pyr-row .m { justify-content: flex-end; } .ch-pyr-row .m i { position: absolute; right: 0; height: 100%; background: #257de0; border-radius: 6px 0 0 6px; }
.ch-pyr-row .f i { position: absolute; left: 0; height: 100%; background: #f47230; border-radius: 0 6px 6px 0; }
.ch-pyr-row b { position: relative; padding: 0 .4rem; font-size: .78rem; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.ch-pyr-leg span { height: auto; font-weight: 600; color: var(--ink-2); }
.ch-tag { display: inline-block; padding: .05rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 600; margin: 0 .25rem .25rem 0; }
.ch-tag.a { background: #efe9fa; color: #4a2f8d; } .ch-tag.b { background: #e0f5f1; color: #0a6e60; }
.ch-reports { display: grid; }
.ch-rep { border-top: 1px solid var(--line); } .ch-rep.dup { background: #fffaf0; }
.ch-rep summary { display: flex; gap: .9rem; align-items: center; padding: .7rem 1.1rem; cursor: pointer; list-style: none; font-size: .88rem; }
.ch-rep summary::-webkit-details-marker { display: none; }
.ch-rep[open] summary { background: #f7f5fc; }
.ch-date { display: flex; flex-direction: column; align-items: center; width: 3.2rem; font-size: .7rem; color: var(--ink-2); line-height: 1.1; } .ch-date b { font-size: 1.15rem; color: var(--ink); }
.ch-plat { display: block; font-size: .78rem; color: var(--ink-2); }
.ch-flag { display: block; font-size: .74rem; color: #9a6b00; }
.ch-nums { font-size: .82rem; color: var(--ink-2); white-space: nowrap; } .ch-nums b { color: var(--ink); font-size: 1rem; }
.ch-st { font-size: .72rem; font-weight: 700; padding: .12rem .55rem; border-radius: 99px; } .ch-st.approved { background: #e9f6e2; color: #2e6a0f; } .ch-st.pending { background: #fdf3dc; color: #8a5f00; } .ch-st.rejected { background: #fde8ea; color: #a3121f; }
.ch-rep-body { padding: .4rem 1.1rem 1rem 5.2rem; }
.ch-rep-nums { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.ch-rep-nums span { display: flex; flex-direction: column; padding: .35rem .7rem; border-radius: 10px; background: #f4f2f9; font-size: .72rem; color: var(--ink-2); } .ch-rep-nums em { font-style: normal; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.ch-text { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .4rem 1.2rem; }
.ch-text h4 { margin: .3rem 0 .1rem; font-size: .78rem; color: #4a2f8d; } .ch-text p { margin: 0; font-size: .86rem; line-height: 1.5; }
.ch-states { display: flex; flex-wrap: wrap; gap: .6rem; }
.ch-states span { padding: .5rem .9rem; border-radius: 12px; font-size: .84rem; background: #f3f5fa; } .ch-states b { font-size: 1.1rem; margin-right: .2rem; }
.ch-states .active { background: #e9f6e2; } .ch-states .quiet { background: #fdf3dc; } .ch-states .inactive { background: #fde8ea; }
.ch-dot { display: block; font-size: .72rem; font-weight: 600; } .ch-dot.active { color: #2e6a0f; } .ch-dot.quiet { color: #8a5f00; } .ch-dot.inactive, .ch-dot.never { color: #a3121f; }
.ch-prog { height: 8px; border-radius: 99px; background: #eceaf3; overflow: hidden; } .ch-prog i { display: block; height: 100%; background: #5b3fa3; }
@media print { .ch-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .ch-hero .btn-group, .ch-filters, .tabs { display: none !important; } .ch-rep { break-inside: avoid; } }
.ch-h1sub { font-size: .9rem; font-weight: 500; padding: .15rem .6rem; border-radius: 99px; background: rgba(255,255,255,.18); vertical-align: middle; }
.ch-star { color: #e0a526; font-size: .8rem; }
.ch-vhead { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; flex-wrap: wrap; } .ch-vhead h2 { margin: 0; } .ch-vhead p { margin: .1rem 0 0; font-size: .86rem; }
.ch-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #5b3fa3; color: #fff; font-weight: 700; font-size: 1.1rem; }
.ch-dot.big { font-size: .82rem; padding: .25rem .7rem; border-radius: 99px; background: #f3f5fa; }
.ch-month { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; } .ch-month label { display: flex; flex-direction: column; font-size: .74rem; font-weight: 600; color: var(--ink-2); gap: .2rem; }
.ch-monthly > header { margin-top: 1rem; padding: 1.2rem 1.4rem; border-radius: 16px; background: #f6f3fc; border: 1px solid #e2d8f4; }
.ch-monthly > header h2 { margin: .1rem 0 .5rem; font-size: 1.4rem; color: #35206b; } .ch-monthly > header p { margin: 0; line-height: 1.6; max-width: 90ch; }
.ch-kicker2 { font-size: .78rem !important; font-weight: 700; color: #5b3fa3; }
.ch-kpi small .up { color: #2e6a0f; font-weight: 700; } .ch-kpi small .down { color: #a3121f; font-weight: 700; }
.ch-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .8rem; }
.ch-quotes blockquote { margin: 0; padding: .8rem 1rem; border-left: 3px solid #5b3fa3; background: #faf9fd; border-radius: 0 10px 10px 0; }
.ch-quotes p { margin: 0 0 .4rem; font-size: .88rem; line-height: 1.5; } .ch-quotes cite { font-size: .74rem; color: var(--ink-2); font-style: normal; }
.ch-chip2 { display: inline-flex; flex-direction: column; margin: 0 .4rem .4rem 0; padding: .35rem .7rem; border-radius: 10px; background: #fde8ea; color: #7d0f19; font-size: .84rem; font-weight: 600; text-decoration: none; } .ch-chip2 small { font-weight: 400; font-size: .72rem; }
.ch-heat td, .ch-heat th { padding: .4rem .5rem; } .ch-heat td { font-weight: 600; }
.ch-issue-list p { margin: 0 0 .2rem; font-size: .88rem; line-height: 1.5; }
.ch-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .9rem; }
.ch-area { padding: 1rem 1.1rem; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line); border-top: 4px solid #3d8a14; }
.ch-area.high { border-top-color: #c41d2a; animation: ch-blink 1.6s ease-in-out infinite; } .ch-area.medium { border-top-color: #e0a526; } .ch-area.low { border-top-color: #9cc27e; }
@keyframes ch-blink { 0%, 100% { box-shadow: 0 0 0 0 rgba(196,29,42,0); } 50% { box-shadow: 0 0 0 4px rgba(196,29,42,.28); } }
@media (prefers-reduced-motion: reduce) { .ch-area.high { animation: none; box-shadow: 0 0 0 3px rgba(196,29,42,.25); } }
.ch-area-h { display: flex; gap: .6rem; align-items: flex-start; } .ch-area-h b { display: block; font-size: 1rem; } .ch-area-h small { color: var(--ink-2); font-size: .78rem; }
.ch-lvl { font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 99px; white-space: nowrap; } .ch-lvl.high { background: #fde8ea; color: #a3121f; } .ch-lvl.medium { background: #fdf3dc; color: #8a5f00; } .ch-lvl.low, .ch-lvl.ok { background: #e9f6e2; color: #2e6a0f; }
.ch-area-n { display: flex; gap: .5rem; margin: .7rem 0; } .ch-area-n span { flex: 1; display: flex; flex-direction: column; padding: .35rem .5rem; border-radius: 8px; background: #f4f5f9; font-size: .7rem; color: var(--ink-2); } .ch-area-n em { font-style: normal; font-weight: 700; font-size: 1rem; color: var(--ink); }
.ch-area ul { margin: 0; padding-left: 1.1rem; font-size: .84rem; line-height: 1.5; } .ch-area li.w3 { color: #a3121f; font-weight: 600; } .ch-area li.w2 { color: #8a5f00; font-weight: 600; }
.ch-area-v { margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .8rem; } .ch-area-v a { display: inline-flex; align-items: center; gap: .3rem; }
.ch-dot-i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; } .ch-dot-i.active { background: #3d8a14; } .ch-dot-i.quiet { background: #e0a526; } .ch-dot-i.inactive, .ch-dot-i.never { background: #c41d2a; }
@media print { .ch-month, .ch-area.high { animation: none; } }
.ch-src { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); } .ch-src.on { background: #f6f3fc; }
.ch-src h3 { margin: 0 0 .4rem; font-size: 1rem; display: flex; gap: .5rem; align-items: center; }
.ch-src-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; } .ch-src-row .input[type=file] { flex: 1; min-width: 220px; }

/* ── Action plans (v4.23) ────────────────────────────────── */
.ap-ring { --p: 0; --c: #3d8a14; width: 96px; height: 96px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--ring-bg, #fff) 78%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), rgba(127,127,127,.18) 0); }
.ap-ring b { font-size: 1.4rem; line-height: 1; } .ap-ring span { font-size: .7rem; opacity: .8; }
.ap-ring.sm { width: 58px; height: 58px; } .ap-ring.sm b { font-size: .88rem; }
.ap-hero { --ring-bg: color-mix(in srgb, var(--tc) 80%, #000); display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; padding: 1.4rem 1.5rem; border-radius: 18px; color: #fff;
  background: radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, var(--tc) 70%, #fff) 0%, var(--tc) 45%, color-mix(in srgb, var(--tc) 60%, #000) 100%); }
.ap-hero .ap-ring { background: radial-gradient(closest-side, color-mix(in srgb, var(--tc) 88%, #000) 78%, transparent 80% 100%), conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.22) 0); }
.ap-hero h1 { margin: .15rem 0 .3rem; font-size: 1.5rem; color: #fff; } .ap-kicker { margin: 0; font-size: .8rem; font-weight: 600; opacity: .9; } .ap-sub { margin: 0; opacity: .9; font-size: .9rem; }
.ap-hero .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #fff; } .ap-hero .btn:hover { background: rgba(255,255,255,.24); }
.ap-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; margin-top: 1rem; }
@media (max-width: 1100px) { .ap-kpis { grid-template-columns: repeat(3, 1fr); } }
.ap-kpi { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .6rem; align-items: center; padding: .8rem 1rem; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line); border-left: 4px solid var(--k, #c3c9d8); color: inherit; text-decoration: none; }
.ap-kpi i { grid-row: span 2; font-size: 1.3rem; color: var(--k, #5d6676); } .ap-kpi b { font-size: 1.5rem; line-height: 1.1; } .ap-kpi span { font-size: .76rem; color: var(--ink-2); } .ap-kpi small { position: absolute; display: none; }
.ap-kpi.completed { --k: #3d8a14; } .ap-kpi.in_progress { --k: #e0a526; } .ap-kpi.not_started { --k: #6b8fd6; } .ap-kpi.overdue { --k: #c41d2a; }
.ap-kpi.overdue b { color: #a3121f; }
.ap-bar { display: flex; gap: 3px; height: 12px; margin-top: .8rem; border-radius: 99px; overflow: hidden; } .ap-bar i { display: block; }
.ap-insights ul { margin: 0; padding: .4rem 1.2rem 1rem 2.4rem; display: grid; gap: .45rem; }
.ap-insights li { font-size: .92rem; line-height: 1.5; } .ap-insights li::marker { font-size: 1.1em; }
.ap-insights li.bad { color: #a3121f; font-weight: 600; } .ap-insights li.warn { color: #7b5300; } .ap-insights li.info { color: var(--ink); }
.ap-doms { display: grid; gap: .6rem; }
.ap-dom { display: grid; grid-template-columns: 13rem 1fr 3rem; gap: .7rem; align-items: center; color: inherit; text-decoration: none; }
.ap-dom-l { font-size: .86rem; font-weight: 600; line-height: 1.2; } .ap-dom-l small { display: block; font-weight: 400; color: var(--ink-2); font-size: .74rem; }
.ap-dom-b { display: flex; gap: 2px; height: 18px; border-radius: 6px; overflow: hidden; background: #eef0f5; } .ap-dom-b i { display: block; }
.ap-dom-p { text-align: right; font-size: .9rem; }
.ap-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.ap-dl-i { padding: .7rem .8rem; border-radius: 12px; background: #f4f6fa; display: flex; flex-direction: column; gap: .25rem; } .ap-dl-i b { font-size: .95rem; } .ap-dl-i span { font-size: .8rem; color: var(--ink-2); }
.ap-dl-i.late { background: #fdecee; } .ap-dl-i.late small { color: #a3121f; font-weight: 600; font-size: .72rem; }
.ap-group { border-top: 1px solid var(--line); }
.ap-group-h { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.2rem; background: #f7f8fb; position: sticky; top: 0; z-index: 1; } .ap-group-h h3 { margin: 0; font-size: 1rem; flex: 1; }
.ap-area { margin: 0; padding: .55rem 1.2rem .2rem; font-size: .8rem; font-weight: 700; color: #4a2f8d; }
.ap-row { display: flex; gap: .9rem; align-items: flex-start; padding: .7rem 1.2rem; border-left: 4px solid transparent; }
.ap-row + .ap-row { border-top: 1px dashed #e7e9ef; }
.ap-row.overdue { border-left-color: #c41d2a; background: #fffafa; } .ap-row.completed { border-left-color: #3d8a14; } .ap-row.completed .ap-act { color: var(--ink-2); }
.ap-row.in_progress { border-left-color: #e0a526; }
.ap-no { width: 2.4rem; flex: none; font-size: .8rem; font-weight: 700; color: var(--ink-2); padding-top: .1rem; }
.ap-act { margin: 0; font-weight: 600; line-height: 1.4; } .ap-meta { margin: .25rem 0 0; font-size: .8rem; color: var(--ink-2); }
.ap-note { margin: .35rem 0 0; font-size: .82rem; padding: .35rem .6rem; border-radius: 8px; background: #f4f6fa; }
.ap-rec { color: #4a2f8d; font-weight: 600; }
.ap-late { display: inline-block; margin-left: .4rem; padding: .05rem .5rem; border-radius: 99px; background: #fde8ea; color: #a3121f; font-weight: 700; font-size: .72rem; } .ap-late.soft { background: #fdf3dc; color: #8a5f00; }
.ap-st { width: 130px; flex: none; display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; } .ap-st small { font-size: .72rem; color: var(--ink-2); } .ap-st .ch-prog { width: 100%; }
.ap-pill { display: inline-block; padding: .12rem .55rem; border-radius: 99px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.ap-pill.completed { background: #e9f6e2; color: #2e6a0f; } .ap-pill.in_progress { background: #fdf3dc; color: #8a5f00; } .ap-pill.not_started { background: #e8eefb; color: #2f4f99; } .ap-pill.overdue { background: #fde8ea; color: #a3121f; } .ap-pill.dropped { background: #eef0f5; color: #5d6676; }
.ap-tools { display: flex; gap: .3rem; flex: none; }
@media (max-width: 760px) { .ap-row { flex-wrap: wrap; } .ap-st { width: auto; } .ap-dom { grid-template-columns: 1fr 3rem; } .ap-dom-b { grid-column: span 2; order: 3; } }
.ap-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .8rem; margin-bottom: .2rem; }
.ap-card { display: flex; gap: .9rem; align-items: center; padding: .9rem 1rem; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line); border-left: 4px solid var(--tc); color: inherit; text-decoration: none; }
.ap-card:hover { box-shadow: 0 6px 18px rgba(20, 45, 100, .09); }
.ap-card b { display: block; line-height: 1.3; } .ap-card small { display: block; color: var(--ink-2); font-size: .76rem; }
.ap-card-t { font-size: .72rem; font-weight: 700; color: var(--tc); } .ap-card-n { display: block; margin-top: .2rem; font-size: .78rem; } .ap-card-n em { font-style: normal; color: #a3121f; font-weight: 700; }
.ap-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .4rem; }
.ap-types label { cursor: pointer; } .ap-types input { position: absolute; opacity: 0; }
.ap-types span { display: block; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; font-size: .84rem; } .ap-types span i { color: var(--tc); }
.ap-types input:checked + span { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 9%, #fff); font-weight: 600; }
.ap-types input:focus-visible + span { outline: 2px solid var(--tc); outline-offset: 2px; }
@media print { .ap-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .ap-hero .btn-group, .ap-tools, .ap-filter, #actions .btn { display: none !important; } .ap-row { break-inside: avoid; } .ap-group-h { position: static; } }
.di-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .6rem; }
.di-plan { display: flex; gap: .7rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fc; } .di-plan i { font-size: 1.3rem; color: #2f62b5; } .di-plan small { display: block; color: var(--ink-2); }

/* ── Sign-in fits the screen without scrolling (v4.26) ───── */
.signin { min-height: 100vh; min-height: 100dvh; padding: clamp(1rem, 4vh, 3rem) 1rem clamp(.75rem, 2.5vh, 2rem); gap: clamp(.6rem, 2vh, 1.1rem); }
.signin-meta { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; }
@media (max-height: 800px) {
  .signin-brand { padding: 1.4rem 2rem 0; }
  .signin-brand img { width: 46px; height: 46px; margin-bottom: .45rem; }
  .signin-org { font-size: 1.2rem; }
  .signin-rule { margin-top: .8rem; }
  .signin-card .auth-box { padding: 1.1rem 2rem 1rem; }
  .signin-card .auth-box .lead { margin: .2rem 0 .9rem; }
  .signin-card .auth-box .field { margin-bottom: .8rem; }
  .signin-card .auth-box .field label { margin-bottom: .25rem; }
  .signin-card .auth-box p.small { margin-top: .7rem !important; margin-bottom: 0; }
  .signin-card .auth-install { margin-top: .5rem; }
  .signin-card-foot { padding: .55rem 1rem; }
}
@media (max-height: 680px) {
  /* Logo beside the name, date and version on one line. */
  .signin-brand { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 1rem 1.5rem .2rem; text-align: left; flex-wrap: wrap; }
  .signin-brand img { width: 40px; height: 40px; margin: 0; }
  .signin-org { font-size: 1.1rem; letter-spacing: .14em; }
  .signin-tag { margin-top: 0; }
  .signin-rule { flex: 0 0 100%; width: auto; margin: .55rem 0 0; background: var(--stripe) center / 72px 3px no-repeat; }
  .signin-card .auth-box { padding: .8rem 1.75rem .85rem; }
  .signin-card .auth-box h1 { font-size: 1.05rem; }
  .signin-card .auth-box .lead { margin: .1rem 0 .7rem; font-size: .8rem; }
  .signin-card .auth-box .field { margin-bottom: .65rem; }
  .signin-card .auth-box .btn-lg { padding-top: .6rem; padding-bottom: .6rem; }
  .signin-card .auth-box p.small { margin-top: .55rem !important; }
  .signin-card .auth-install { margin-top: .3rem; }
  .signin-card-foot { padding: .45rem 1rem; font-size: .72rem; }
  .signin-meta { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: .25rem .8rem; }
  .signin-meta p { font-size: .74rem; }
}
@media (max-height: 560px) {
  .signin-card .auth-box .lead, .signin-rule { display: none; }
  .signin-card .auth-box h1 { margin-bottom: .5rem; }
  .signin-card .auth-install { display: none; }
}

/* ── QR sign-in and strong passwords (v4.27) ─────────────── */
.signin-card.wide { max-width: 800px; }
.signin-split { display: grid; grid-template-columns: 300px 1fr; gap: 0; margin: -1.6rem -2rem -1.4rem; }
.signin-qrpane { padding: 1.4rem 1.5rem; background: linear-gradient(165deg, #f2f6fd 0%, #e9f0fb 100%); border-right: 1px solid var(--line-2); display: flex; align-items: center; }
.signin-formpane { padding: 1.6rem 2rem 1.4rem; display: flex; flex-direction: column; justify-content: center; }
.signin-card .signin-qrpane h2 { margin: 0 0 .9rem; font-size: 1.05rem; text-align: center; color: var(--indigo-950); }
.qrl { text-align: center; width: 100%; }
.qrl-code { --left: 1; position: relative; width: 196px; height: 196px; margin: 0 auto .75rem; padding: 12px; background: #fff; border-radius: 18px;
  box-shadow: 0 10px 30px rgba(20, 45, 100, .12); }
.qrl-code::after { content: ''; position: absolute; inset: -3px; border-radius: 20px; padding: 3px; pointer-events: none;
  background: conic-gradient(#2f62b5 calc(var(--left) * 360deg), transparent 0); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; transition: background .9s linear; }
.qrl-img, .qrl-img svg { width: 100%; height: 100%; display: block; }
.qrl-wait { display: grid; place-items: center; height: 100%; font-size: 2rem; color: var(--ink-3); }
.qrl-wait i { animation: qrl-spin 1s linear infinite; display: inline-block; }
@keyframes qrl-spin { to { transform: rotate(360deg); } }
.qrl-over { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; padding: 1rem; border-radius: 18px; background: rgba(255,255,255,.95); font-size: .88rem; font-weight: 600; line-height: 1.35; }
.qrl-over i { font-size: 2.1rem; }
.qrl-over.ok i { color: #3d8a14; } .qrl-over.bad i { color: #c41d2a; } .qrl-over.info i { color: #2f62b5; }
.qrl-num { margin: 0; font-size: .86rem; color: var(--ink-2); }
.qrl-num b { display: inline-block; min-width: 2.4rem; padding: .05rem .45rem; margin: 0 .15rem; border-radius: 8px; background: #fff; color: #1d3f8f; font-size: 1.2rem; letter-spacing: .08em; box-shadow: 0 1px 3px rgba(20,45,100,.15); }
.qrl-state { min-height: 1.1em; margin: .25rem 0 .7rem; font-size: .74rem; color: var(--ink-3); }
.qrl-mini { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: .35rem; text-align: left; font-size: .8rem; color: var(--ink-2); }
.qrl-mini li { counter-increment: s; display: flex; gap: .55rem; align-items: center; }
.qrl-mini li::before { content: counter(s); flex: none; width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center; background: #2f62b5; color: #fff; font-size: .7rem; font-weight: 700; }
@media (max-width: 760px) { .signin-card.wide { max-width: 420px; } .signin-split { display: block; margin: 0; } .signin-qrpane { display: none; } .signin-formpane { padding: 0; } }
@media (max-height: 800px) { .signin-split { margin: -1.1rem -2rem -1rem; } .signin-formpane { padding: 1.1rem 2rem 1rem; } .signin-qrpane { padding: 1rem 1.3rem; } }
@media (max-height: 680px) { .signin-split { margin: -.8rem -1.75rem -.85rem; } .signin-formpane { padding: .8rem 1.75rem .85rem; } .qrl-code { width: 168px; height: 168px; padding: 10px; } .signin-card .signin-qrpane h2 { margin-bottom: .6rem; font-size: .98rem; } .qrl-mini { gap: .25rem; } }
@media (prefers-reduced-motion: reduce) { .qrl-wait i { animation: none; } .qrl-code::after { transition: none; } }
.qra-done { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 2.3rem; margin: 0 auto 1rem; }
.qra-done.ok { background: #e9f6e2; color: #3d8a14; } .qra-done.bad { background: #fdecee; color: #c41d2a; } .qra-done.info { background: #eef2fb; color: #2f62b5; }
.qra-info { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: .6rem; }
.qra-info li { display: flex; gap: .7rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; }
.qra-info i { font-size: 1.4rem; color: #2f62b5; } .qra-info small { display: block; color: var(--ink-2); font-size: .78rem; }
.qra-ask { font-weight: 600; margin: 0 0 .5rem; }
.qra-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.qra-pick label { position: relative; } .qra-pick input { position: absolute; opacity: 0; }
.qra-pick span { display: grid; place-items: center; height: 64px; border: 2px solid var(--line); border-radius: 14px; font-size: 1.6rem; font-weight: 700; cursor: pointer; }
.qra-pick input:checked + span { border-color: #2f62b5; background: #eef2fb; color: #1d3f8f; }
.qra-pick input:focus-visible + span { outline: 3px solid #2f62b5; outline-offset: 2px; }
.qrs { position: relative; border-radius: 16px; overflow: hidden; background: #0d1530; aspect-ratio: 3 / 4; max-height: 60vh; }
.qrs video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qrs-frame { position: absolute; inset: 18% 14%; border: 3px solid rgba(255,255,255,.9); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.qrs-msg { position: absolute; left: 0; right: 0; bottom: 0; padding: .7rem; color: #fff; background: rgba(0,0,0,.55); font-size: .86rem; text-align: center; }
.qrs-msg.ok { background: rgba(61,138,20,.85); }
.qrp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
@media (max-width: 760px) { .qrp-grid { grid-template-columns: 1fr; } }
/* Strong-password checklist */
.pw-rules { list-style: none; margin: .55rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .9rem; font-size: .78rem; color: var(--ink-3); }
.pw-rules li { display: flex; gap: .35rem; align-items: baseline; }
.pw-rules li[data-rule]::before { content: '○'; flex: none; width: .9rem; text-align: center; color: #b7c0d3; }
.pw-rules.typing li[data-rule]:not(.ok) { color: #9a3b14; } .pw-rules.typing li[data-rule]:not(.ok)::before { content: '✕'; color: #c41d2a; }
.pw-rules li.ok { color: #2e6a0f; } .pw-rules li.ok::before { content: '✓'; color: #3d8a14; font-weight: 700; }
.pw-rules .pw-meter { grid-column: 1 / -1; height: 5px; border-radius: 99px; background: #e8ebf2; overflow: hidden; margin-top: .25rem; }
.pw-rules .pw-meter span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .2s; }
.pw-rules .pw-meter .weak { background: #c41d2a; } .pw-rules .pw-meter .mid { background: #e0a526; } .pw-rules .pw-meter .strong { background: #3d8a14; }
@media (max-width: 480px) { .pw-rules { grid-template-columns: 1fr; } }
.pw-must { border-left-width: 4px; }
.pw-focus { box-shadow: 0 0 0 3px rgba(224, 165, 38, .45); }

/* ── Folder bin (v4.28) ──────────────────────────────────── */
.bin-note { display: flex; gap: .6rem; align-items: center; }
.bin-folders { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.bin-folder { display: flex; gap: .8rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.bin-folder > i { font-size: 1.6rem; } .bin-folder b { display: block; } .bin-folder small { color: var(--ink-3); font-size: .78rem; }
.bin-folder form { margin: 0; }
.folder-danger { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; padding: .85rem 1rem; border: 1px dashed #e6b8bd; border-radius: 12px; background: #fffafa; }
.folder-danger b { display: block; font-size: .9rem; } .folder-danger span { font-size: .8rem; color: var(--ink-3); }
.folder-danger form { margin: 0; }
.btn-danger-soft { color: #a3121f; border-color: #e6b8bd; background: #fff; } .btn-danger-soft:hover { background: #fdecee; border-color: #c41d2a; }
@media (max-width: 600px) { .folder-danger, .bin-folder { flex-wrap: wrap; } }
/* Registration (v4.28) */
.field.span-2 { grid-column: 1 / -1; }
.reg-choice { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.reg-choice label { position: relative; cursor: pointer; } .reg-choice input { position: absolute; opacity: 0; }
.reg-choice span { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; padding: .8rem 1rem; border: 2px solid var(--line); border-radius: 12px; height: 100%; }
.reg-choice span i { grid-row: span 2; font-size: 1.4rem; color: #2f62b5; } .reg-choice small { color: var(--ink-3); font-size: .78rem; line-height: 1.4; }
.reg-choice input:checked + span { border-color: #2f62b5; background: #f2f6fd; }
.reg-choice input:focus-visible + span { outline: 3px solid #2f62b5; outline-offset: 2px; }
@media (max-width: 700px) { .reg-choice { grid-template-columns: 1fr; } }
.reg-steps { list-style: none; display: flex; justify-content: center; gap: .3rem; margin: 0 0 1rem; padding: 0; font-size: .74rem; color: var(--ink-3); }
.reg-steps li { display: flex; align-items: center; gap: .35rem; } .reg-steps li + li::before { content: ''; width: 1.2rem; height: 2px; background: var(--line); margin-right: .1rem; }
.reg-steps span { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; background: #e8ebf2; color: var(--ink-2); font-weight: 700; font-size: .72rem; }
.reg-steps li.on { color: var(--indigo-950); font-weight: 700; } .reg-steps li.on span { background: #2f62b5; color: #fff; }
.reg-steps li.done span { background: #3d8a14; color: #fff; }
/* Vendors (v4.30) */
.vt-chip { display: inline-block; padding: .15rem .55rem; border-radius: 999px; background: #eef3fb; color: #24467f; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.vt-types { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.2rem 0 1rem; }
.vt-type { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: .8rem; text-decoration: none; }
.vt-type b { margin-left: .25rem; color: var(--indigo-950); } .vt-type:hover, .vt-type.on { border-color: #2f62b5; background: #f2f6fd; }

/* ── Sign-in, v4.32: full-height split ─────────────────────────────────────
   Left: navy, live clock and greeting over lake-depth contour lines.
   Right: the form on white. Phone: navy header, form below. */
body.si-page { margin: 0; background: #fff; min-height: 100dvh; }
.si { display: grid; grid-template-columns: minmax(360px, 46%) 1fr; min-height: 100vh; min-height: 100dvh; }
.si-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.5rem, 4.5vh, 3rem) clamp(1.75rem, 4vw, 3.5rem); color: #fff; background: #0d2a57;
  background-image: radial-gradient(120% 80% at 0% 0%, #17407f 0%, rgba(23,64,127,0) 60%); }
.si-side::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(#2f62b5 0 58%, #6fbf26 58% 82%, #d61f2c 82%); }
.si-lake { position: absolute; right: 0; bottom: 0; width: 82%; height: 100%; color: #8fb3ea; opacity: .16; pointer-events: none; }
.si-brand { position: relative; display: flex; align-items: center; gap: .85rem; }
.si-brand img { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 12px; padding: 5px; }
.si-brand b { display: block; font-size: 1.15rem; font-weight: 700; letter-spacing: .16em; }
.si-brand span { display: block; font-size: .8rem; color: #a9bbd9; margin-top: .1rem; }
.si-now { position: relative; }
.si-greet { margin: 0 0 .6rem; font-size: clamp(1rem, 1.4vw, 1.2rem); font-weight: 500; color: #dbe5f5; }
.si-greet span { color: #8fa9d2; font-weight: 400; }
.si-time { margin: 0; font-size: clamp(4rem, 9vw, 7.75rem); font-weight: 700; line-height: .92; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.si-time .sec { display: inline-block; margin-left: .35rem; font-size: .3em; font-weight: 600; letter-spacing: 0; color: #6fbf26; vertical-align: top; }
.si-date { margin: .9rem 0 0; font-size: clamp(.95rem, 1.2vw, 1.1rem); color: #a9bbd9; }
.si-copy { position: relative; margin: 0; font-size: .74rem; color: #7f93b8; }

.si-main { display: flex; align-items: center; justify-content: center; padding: clamp(1.25rem, 4vh, 3rem) clamp(1.25rem, 4vw, 3rem); overflow-y: auto; background: #fff; }
.si-box.auth-box { width: 100%; max-width: 400px; }
.si-main.wide .si-box.auth-box { max-width: 420px; }
body.si-page .auth-box::before { display: none; }
.si-box h1 { margin: 0; font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; color: #0d2a57; }
.si-box .lead { margin: .35rem 0 1.6rem; color: var(--ink-3); font-size: .95rem; }
.si-box .field { margin-bottom: 1.05rem; }
.si-box label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.si-label { display: flex; justify-content: space-between; align-items: baseline; }
.si-label a { font-size: .8rem; font-weight: 500; }
.si-input { position: relative; }
.si-input > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #8a96ab; font-size: 1rem; pointer-events: none; z-index: 1; }
.si-input .input { height: 48px; padding-left: 2.6rem; border-radius: 10px; background: #f7f9fc; border-color: #dfe5ee; font-size: .98rem; }
.si-input .input:hover { border-color: #c6d0de; }
.si-input .input:focus { background: #fff; border-color: #2f62b5; box-shadow: 0 0 0 4px rgba(47,98,181,.14); }
.si-input:focus-within > i { color: #2f62b5; }
.si-go { height: 50px; margin-top: .5rem; border-radius: 10px; font-size: 1rem; gap: .25rem; }
.si-go .bi { font-size: 1.4rem; transition: transform .15s ease; } .si-go:hover .bi { transform: translateX(3px); }
.si-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 1.8rem; background: #eef2f8; border-radius: 12px; }
.si-switch button { display: flex; align-items: center; justify-content: center; gap: .45rem; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; }
.si-switch button[aria-selected="true"] { background: #fff; color: #0d2a57; box-shadow: 0 1px 3px rgba(13,42,87,.14), 0 1px 1px rgba(13,42,87,.06); }
.si-switch button:focus-visible { outline: 3px solid #2f62b5; outline-offset: 1px; }
.si-qr { text-align: center; }
.si-qr .lead { margin-bottom: 1.2rem; }
.si-qr .qrl-code { width: 212px; height: 212px; }
.si-qr .qrl-mini { max-width: 300px; margin: .2rem auto 0; }
.si-trust { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: 1.6rem 0 0; padding-top: 1.1rem; border-top: 1px solid #edf0f5; font-size: .78rem; color: var(--ink-3); }
.si-trust i { color: #3d8a14; }
body.si-page .auth-install { margin-top: 1.1rem; }
body.si-page .install-hero, body.si-page .install-hero h1, body.si-page .install-hero .lead { text-align: left; }

/* short screens: keep everything on one screen */
@media (min-width: 861px) and (max-height: 720px) {
  .si-box h1 { font-size: 1.55rem; } .si-box .lead { margin-bottom: 1.1rem; } .si-switch { margin-bottom: 1.1rem; }
  .si-box .field { margin-bottom: .8rem; } .si-input .input { height: 44px; } .si-go { height: 46px; }
  .si-trust { margin-top: 1rem; padding-top: .8rem; } body.si-page .auth-install { margin-top: .7rem; }
  .si-qr .qrl-code { width: 176px; height: 176px; padding: 10px; } .si-qr .lead { margin-bottom: .8rem; }
}
/* tablets and phones: navy header, form below */
@media (max-width: 860px) {
  .si { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .si-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: calc(1.1rem + env(safe-area-inset-top)) 1.25rem 1.6rem; }
  .si-side::after { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 4px; background: var(--stripe); }
  .si-lake { width: 100%; opacity: .12; }
  .si-brand { flex: 1; } .si-brand img { width: 40px; height: 40px; border-radius: 10px; } .si-brand b { font-size: 1rem; }
  .si-now { text-align: right; } .si-greet { display: none; }
  .si-time { font-size: 1.7rem; letter-spacing: -.02em; } .si-time .sec { display: none; }
  .si-date { margin-top: .2rem; font-size: .74rem; }
  .si-copy { display: none; }
  .si-main { align-items: flex-start; margin-top: -1rem; border-radius: 18px 18px 0 0; position: relative; padding: 1.75rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); }
  .si-box h1 { font-size: 1.55rem; }
}
@media (max-width: 380px) { .si-date { display: none; } }
@media (prefers-reduced-motion: reduce) { .si-go .bi { transition: none; } }
@media (max-width: 480px) { .si-brand span { display: none; } }
.si-box .reg-steps { justify-content: flex-start; }

/* ── Dashboard, v4.33 ──────────────────────────────────────────────────── */
.db-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
  padding: clamp(1.4rem, 3vw, 2.1rem) clamp(1.4rem, 3vw, 2.4rem); margin-bottom: 1.25rem; border-radius: 18px; color: #fff;
  background: #0d2a57; background-image: radial-gradient(110% 120% at 0% 0%, #17407f 0%, rgba(23,64,127,0) 60%); }
.db-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--stripe); }
.db-lake { position: absolute; right: 0; top: 0; height: 100%; width: 60%; color: #8fb3ea; opacity: .14; pointer-events: none; }
.db-hero-text, .db-hero-dial { position: relative; }
.db-date { margin: 0; font-size: .84rem; color: #a9bbd9; }
.db-hero h1 { margin: .25rem 0 0; font-family: inherit; font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.025em; color: #fff; }
.db-sw { margin: .15rem 0 0; font-size: .95rem; color: #8fa9d2; }
.db-today { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
.db-today div { min-width: 118px; padding: .6rem .85rem; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.db-today span { display: block; font-size: .72rem; color: #a9bbd9; }
.db-today b { display: block; margin-top: .1rem; font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.db-gps { margin-top: 1rem; color: #dbe5f5; font-size: .84rem; }
.db-gps .led { background: #8fa9d2; } .db-gps .led.ok { box-shadow: 0 0 0 4px rgba(61,138,20,.35); }
.db-hero-dial { display: grid; justify-items: center; gap: .8rem; }
.dial.db-dial { width: 188px; height: 188px; background: conic-gradient(#6fbf26 calc(var(--p) * 1%), rgba(255,255,255,.16) 0); box-shadow: 0 14px 40px rgba(3,14,34,.45); }
.dial.db-dial::before { inset: 10px; background: #fff; }
.dial.db-dial .dial-face { color: #0d2a57; }
.dial.db-dial .dial-face .t { font-size: 2.4rem; }
.dial.db-dial .dial-face .a { color: #2f62b5; font-size: 1rem; }
.dial.db-dial .dial-face .s { color: var(--ink-3); }
.dial.db-dial.out { background: conic-gradient(#8fb3ea calc(var(--p) * 1%), rgba(255,255,255,.16) 0); }
.dial.db-dial.out .dial-face .a { color: #b4232f; }
.dial.db-dial.done { background: #6fbf26; } .dial.db-dial.done .dial-face .a { color: #3d8a14; }
.dial.db-dial:disabled { filter: none; opacity: 1; } .dial.db-dial:disabled:not(.done) .dial-face { opacity: .75; }
.dial.db-dial:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.db-map { width: 188px; height: 110px; border-radius: 12px; border: 2px solid rgba(255,255,255,.2); }

.db-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin-bottom: 1.25rem; }
.db-kpi { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; align-items: center; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.db-kpi:hover { border-color: #b9c8e2; box-shadow: 0 6px 18px rgba(13,42,87,.08); }
.db-kpi:focus-visible { outline: 3px solid #2f62b5; outline-offset: 2px; }
.k-i { grid-row: span 2; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; }
.k-blue { background: #eaf1fc; color: #2f62b5; } .k-green { background: #ecf7e3; color: #3d8a14; } .k-amber { background: #fdf3dc; color: #a86b00; } .k-violet { background: #f1edfb; color: #5b45a8; }
.k-l { font-size: .78rem; color: var(--ink-3); }
.k-v { font-size: 1.6rem; font-weight: 700; line-height: 1.15; color: #0d2a57; font-variant-numeric: tabular-nums; }
.k-v small { font-size: .78rem; font-weight: 500; color: var(--ink-3); }
.k-bar { grid-column: 1 / -1; display: block; height: 6px; margin-top: .65rem; border-radius: 3px; background: #ecf0f5; overflow: hidden; }
.k-bar span { display: block; height: 100%; border-radius: 3px; background: #6fbf26; }
.k-h { grid-column: 1 / -1; margin-top: .5rem; font-size: .76rem; color: var(--ink-3); }

.db-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; }
.db-count { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .4rem; margin-left: .35rem; border-radius: 999px; background: #fdf3dc; color: #8a5f00; font-size: .76rem; font-weight: 700; vertical-align: middle; }
.db-list { list-style: none; margin: 0; padding: .35rem; }
.db-list a { display: flex; align-items: center; gap: .85rem; padding: .7rem .75rem; border-radius: 12px; color: inherit; text-decoration: none; }
.db-list a:hover { background: #f5f8fd; } .db-list a:focus-visible { outline: 3px solid #2f62b5; outline-offset: -2px; }
.db-list li + li { border-top: 1px solid #f0f3f7; }
.db-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #eaf1fc; color: #2f62b5; font-size: 1.1rem; }
.db-list b { display: block; font-size: .92rem; font-weight: 600; color: #0d2a57; }
.db-list small { display: block; margin-top: .15rem; font-size: .78rem; color: var(--ink-3); }
.db-type { display: inline-block; margin-right: .3rem; padding: 0 .45rem; border-radius: 6px; background: #f1f4f9; color: var(--ink-2); font-weight: 600; font-size: .72rem; }
.db-go { flex: none; font-size: .8rem; font-weight: 600; color: #2f62b5; white-space: nowrap; }
.db-more { display: block; padding: .8rem; text-align: center; font-size: .84rem; font-weight: 600; border-top: 1px solid var(--line-2); }

.db-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: 1rem; }
.db-actions a { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; padding: .9rem; border: 1px solid var(--line); border-radius: 12px; color: #0d2a57; font-size: .86rem; font-weight: 600; text-decoration: none; transition: border-color .15s, background .15s; }
.db-actions a i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #eaf1fc; color: #2f62b5; font-size: 1.05rem; }
.db-actions a:hover { border-color: #2f62b5; background: #f7faff; } .db-actions a:focus-visible { outline: 3px solid #2f62b5; outline-offset: 2px; }

.db-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; padding: 1rem 1rem .4rem; }
.db-day { display: grid; justify-items: center; gap: .25rem; padding: .5rem 0 .45rem; border-radius: 10px; font-size: .72rem; color: var(--ink-3); }
.db-day i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #f1f4f9; color: #9aa6b8; font-size: .9rem; }
.db-day small { min-height: 1em; font-size: .68rem; font-variant-numeric: tabular-nums; }
.db-day.here i { background: #6fbf26; color: #fff; } .db-day.later i { background: transparent; border: 1px dashed #d5dce6; }
.db-day.today { background: #f2f6fd; color: #0d2a57; font-weight: 700; }
.db-none { margin: .4rem 1rem 1.2rem; font-size: .84rem; color: var(--ink-3); }
.db-time { list-style: none; margin: .4rem 1rem 1.1rem; padding: 0 0 0 1.1rem; border-left: 2px solid #edf0f5; }
.db-time li { position: relative; padding: .45rem 0; font-size: .84rem; }
.db-time li::before { content: ""; position: absolute; left: calc(-1.1rem - 6px); top: .72rem; width: 10px; height: 10px; border-radius: 50%; background: #6fbf26; box-shadow: 0 0 0 3px #fff; }
.db-time li.out::before { background: #2f62b5; }
.db-time b { color: #0d2a57; } .db-time span { color: var(--ink-2); } .db-time small { display: block; color: var(--ink-3); font-size: .76rem; }

@media (max-width: 1100px) { .db-kpis { grid-template-columns: repeat(2, 1fr); } .db-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .db-hero { grid-template-columns: 1fr; text-align: center; gap: 1.2rem; border-radius: 16px; }
  .db-hero-dial { order: -1; } .db-lake { width: 100%; }
  .db-today { justify-content: center; } .db-today div { min-width: calc(50% - .3rem); flex: 1; }
  .db-gps { justify-content: center; text-align: left; }
  .dial.db-dial { width: 168px; height: 168px; }
  .db-kpis { gap: .6rem; } .db-kpi { padding: .85rem; } .k-i { width: 36px; height: 36px; font-size: 1.05rem; } .k-v { font-size: 1.35rem; }
  .db-go { display: none; }
}
@media (prefers-reduced-motion: reduce) { .db-kpi, .db-actions a { transition: none; } }
.db-list .grow { flex: 1; min-width: 0; }

/* ── Sidebar, v4.34 ────────────────────────────────────────────────────────
   Navy with the brand tile, rounded items, green marker on the active one,
   and a collapse-to-icons mode on computers (html.side-mini). */
.side { background: #0d2a57; background-image: linear-gradient(180deg, #0f3063 0%, #0b2450 100%); color: #c8d3e8; border-right: 1px solid rgba(255,255,255,.04); }
.brand.sb-brand { position: relative; display: flex; align-items: center; gap: .75rem; margin: .9rem .75rem .35rem; padding: .7rem .7rem; border-radius: 14px; background: rgba(255,255,255,.06); color: #fff; }
.brand.sb-brand::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--stripe); }
.brand.sb-brand:hover { background: rgba(255,255,255,.09); }
.brand.sb-brand img { flex: none; width: 40px; height: 40px; padding: 4px; border-radius: 11px; background: #fff; object-fit: contain; }
.brand.sb-brand b { color: #fff; font-family: inherit; font-size: 1rem; font-weight: 700; letter-spacing: .14em; }
.brand.sb-brand span { color: #a9bbd9; font-size: .7rem; line-height: 1.3; }
.sb-nav { padding: .2rem .75rem 1rem; }
.sb-nav .nav-group { margin-top: 1.15rem; }
.sb-nav .nav-group > p { margin: 0 0 .35rem .75rem; color: #7f96bd; font-size: .68rem; font-weight: 600; letter-spacing: .02em; }
.sb-nav a { position: relative; gap: .75rem; height: 42px; padding: 0 .75rem; margin-bottom: 2px; border-radius: 11px; color: #d3dcee; font-size: .9rem; font-weight: 500; transition: background .15s, color .15s; }
.sb-nav a i { width: 1.25rem; font-size: 1.1rem; color: #9fb3d6; transition: color .15s; }
.sb-nav a:hover { background: rgba(255,255,255,.07); color: #fff; } .sb-nav a:hover i { color: #fff; }
.sb-nav a.active { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; font-weight: 600; }
.sb-nav a.active i { color: #fff; }
.sb-nav a.active::before { content: ""; position: absolute; left: -.75rem; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #6fbf26; }
.sb-nav a:focus-visible, .sb-mini:focus-visible, .brand.sb-brand:focus-visible, .side-install:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sb-nav .count { margin-left: auto; min-width: 1.45rem; height: 1.3rem; display: inline-grid; place-items: center; padding: 0 .4rem; border-radius: 999px; background: #d61f2c; color: #fff; font-size: .7rem; font-weight: 700; }
.sb-foot { padding: .75rem; border-top: 1px solid rgba(255,255,255,.08); }
.sb-foot .side-install { margin: 0 0 .6rem; padding: .6rem .7rem; border-radius: 12px; background: rgba(255,255,255,.06); }
.sb-foot .side-install:hover { background: rgba(255,255,255,.1); }
.sb-foot .side-install i { color: #6fbf26; }
.sb-foot .side-install span { color: #a9bbd9; }
.sb-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-left: .35rem; }
.sb-ver { font-size: .72rem; color: #7f96bd; }
.sb-mini { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: #a9bbd9; cursor: pointer; font-size: .95rem; }
.sb-mini:hover { background: rgba(255,255,255,.08); color: #fff; }
.sb-mini i { transition: transform .2s; }
@media (max-width: 960px) { .sb-mini { display: none; } .side { width: 280px; } }

/* collapsed: icons only, labels as tooltips */
@media (min-width: 961px) {
  .app { transition: grid-template-columns .2s ease; }
  html.side-mini .app { grid-template-columns: 76px 1fr; }
  html.side-mini .side { overflow-x: visible; overflow-y: auto; }
  html.side-mini .sb-t { display: none; }
  html.side-mini .brand.sb-brand { justify-content: center; margin: .9rem .6rem .35rem; padding: .55rem 0 .7rem; }
  html.side-mini .sb-nav { padding: .2rem .6rem 1rem; }
  html.side-mini .sb-nav .nav-group > p { height: 1px; margin: 0 .4rem .6rem; overflow: hidden; background: rgba(255,255,255,.1); color: transparent; }
  html.side-mini .sb-nav a { justify-content: center; padding: 0; }
  html.side-mini .sb-nav a.active::before { left: -.6rem; }
  html.side-mini .sb-nav .count { position: absolute; top: 3px; right: 3px; min-width: 1.1rem; height: 1.05rem; padding: 0 .25rem; font-size: .6rem; }
  html.side-mini .sb-foot { padding: .75rem .6rem; }
  html.side-mini .sb-foot .side-install { justify-content: center; padding: .6rem 0; }
  html.side-mini .sb-row { justify-content: center; padding: 0; }
  html.side-mini .sb-mini i { transform: rotate(180deg); }
  html.side-mini [data-tip] { position: relative; }
  html.side-mini .side [data-tip]:hover::after, html.side-mini .side [data-tip]:focus-visible::after {
    content: attr(data-tip); position: fixed; left: 84px; transform: translateY(-50%); margin-top: 21px; z-index: 80; padding: .4rem .65rem; border-radius: 8px;
    background: #0a1f40; color: #fff; font-size: .8rem; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 18px rgba(3,14,34,.35); pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .app, .sb-nav a, .sb-nav a i, .sb-mini i { transition: none; } }
/* Sidebar lake contour lines (v4.35), as on the sign-in page and dashboard */
.side { position: sticky; isolation: isolate; }
.sb-lake { position: absolute; left: 0; bottom: 0; width: 100%; height: min(420px, 60%); color: #8fb3ea; opacity: .13; pointer-events: none; z-index: -1; }
html.side-mini .sb-lake { opacity: .1; }
@media (max-width: 960px) { .side { position: fixed; } }

/* ── Sidebar always fits, never scrolls (v4.36) ───────────────────────────
   Menu items shrink (42px → 30px) to fit the height; short screens get a
   compact brand, divider lines instead of group labels and a smaller footer. */
.side { height: 100vh; height: 100dvh; overflow: hidden !important; }
html.side-mini .side { overflow: hidden !important; }
.sb-nav { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.sb-nav .nav-group { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; margin-top: clamp(.35rem, 1.8vh, 1.15rem); }
.sb-nav a { flex: 0 1 42px; height: auto; min-height: 30px; }
.brand.sb-brand, .sb-foot { flex: none; }
@media (max-height: 720px) {
  .brand.sb-brand { margin: .6rem .75rem .2rem; padding: .5rem .6rem; }
  .brand.sb-brand img { width: 34px; height: 34px; border-radius: 9px; }
  .brand.sb-brand span { display: none; }
  .sb-foot { padding: .5rem .75rem; }
  .sb-foot .side-install { margin-bottom: .35rem; padding: .45rem .6rem; }
  .sb-foot .side-install span span, .sb-foot .side-install .sb-t { font-size: 0; } .sb-foot .side-install .sb-t b { font-size: .8rem; }
  .sb-mini { width: 30px; height: 30px; }
}
@media (max-height: 600px) {
  .sb-nav .nav-group > p { height: 1px; margin: 0 .75rem .45rem; overflow: hidden; background: rgba(255,255,255,.1); color: transparent; }
  .sb-foot .side-install { display: none; }
  .sb-nav a { min-height: 28px; font-size: .86rem; }
}
@media (max-height: 480px) {
  .sb-nav a { min-height: 26px; font-size: .82rem; } .sb-nav a i { font-size: 1rem; }
  .brand.sb-brand { margin-top: .4rem; }
}

/* ── Data protection notice (v4.37) ─────────────────────────────────────── */
html.tc-lock, html.tc-lock body { overflow: hidden; }
.tc-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: clamp(.5rem, 3vh, 2rem) 1rem; background: rgba(7,22,46,.62); backdrop-filter: blur(3px); }
.tc-modal { display: flex; flex-direction: column; width: 100%; max-width: 760px; max-height: 100%; margin: 0; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(3,14,34,.5); overflow: hidden; }
.tc-head { position: relative; display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.3rem 1rem; background: #0d2a57; color: #fff; }
.tc-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--stripe); }
.tc-badge { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); font-size: 1.3rem; color: #6fbf26; }
.tc-head h2 { margin: 0; font-size: 1.15rem; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.tc-head p { margin: .15rem 0 0; font-size: .78rem; color: #a9bbd9; }
.tc-switch { flex: none; display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.1); }
.tc-switch button { height: 32px; padding: 0 .8rem; border: 0; border-radius: 8px; background: transparent; color: #dbe5f5; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.tc-switch button[aria-pressed="true"] { background: #fff; color: #0d2a57; }
.tc-switch button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1.2rem 1.4rem .6rem; font-size: .9rem; line-height: 1.6; color: var(--ink-2); }
.tc-body:focus-visible { outline: 2px solid #2f62b5; outline-offset: -2px; }
.tc-intro { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 12px; background: #f2f6fd; color: #0d2a57; font-weight: 500; }
.tc-sec { margin-bottom: 1.1rem; }
.tc-sec h3 { display: flex; align-items: center; gap: .55rem; margin: 0 0 .35rem; font-family: inherit; font-size: .98rem; font-weight: 700; color: #0d2a57; }
.tc-sec h3 span { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; background: #eaf1fc; color: #2f62b5; font-size: .74rem; }
.tc-sec p { margin: 0 0 .5rem; }
.tc-sec ul { margin: 0 0 .5rem; padding-left: 1.2rem; } .tc-sec li { margin-bottom: .25rem; } .tc-sec li::marker { color: #6fbf26; }
.tc-foot { flex: none; display: grid; gap: .8rem; padding: .9rem 1.3rem 1.1rem; border-top: 1px solid var(--line-2); background: #f8fafc; }
.tc-agree { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; font-weight: 600; color: #0d2a57; cursor: pointer; }
.tc-agree input { flex: none; width: 18px; height: 18px; margin-top: .15rem; accent-color: #2f62b5; }
.tc-btns { display: flex; justify-content: flex-end; gap: .6rem; }
.tc-btns .btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.tc-page .panel-head { flex-wrap: wrap; gap: .6rem; }
.tc-page .tc-switch { background: #eef2f8; } .tc-page .tc-switch button { color: var(--ink-2); } .tc-page .tc-switch button[aria-pressed="true"] { box-shadow: 0 1px 3px rgba(13,42,87,.14); }
.tc-page .tc-body { max-width: 78ch; }
@media (max-width: 600px) {
  .tc-backdrop { padding: 0; place-items: stretch; }
  .tc-modal { max-height: none; height: 100%; border-radius: 0; }
  .tc-head { flex-wrap: wrap; padding-top: calc(1rem + env(safe-area-inset-top)); }
  .tc-head .tc-switch { width: 100%; } .tc-head .tc-switch button { flex: 1; }
  .tc-body { padding: 1rem; }
  .tc-btns { flex-direction: column-reverse; } .tc-btns .btn { width: 100%; justify-content: center; }
  .tc-foot { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}
.tc-body:focus { outline: none; }
/* Privacy notice: sub-headings and contact blocks (v4.38) */
.tc-sec h4 { margin: .7rem 0 .3rem; font-size: .86rem; font-weight: 700; color: #2f62b5; }
.tc-dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: .4rem 0 .6rem; padding: .8rem 1rem; border-radius: 12px; background: #f7f9fc; border: 1px solid #edf0f5; }
.tc-dl dt { font-weight: 600; color: #0d2a57; } .tc-dl dd { margin: 0; }
@media (max-width: 600px) { .tc-dl { grid-template-columns: 1fr; gap: .1rem; } .tc-dl dd { margin-bottom: .4rem; } }

/* ── Screen guard (v4.39) ──────────────────────────────────────────────── */
.sg-mark { position: fixed; inset: 0; z-index: 150; pointer-events: none; background-repeat: repeat; opacity: .085; }
.sg-shield { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; padding: 1.5rem; text-align: center; background: #0d2a57; color: #fff; cursor: pointer; }
.sg-shield[hidden] { display: none; }
.sg-shield i { font-size: 2.6rem; color: #f0a202; }
.sg-shield b { font-size: 1.2rem; } .sg-shield span { color: #dbe5f5; } .sg-shield small { margin-top: .6rem; color: #8fa9d2; }
html.sg-hide .app, html.sg-hide .tabbar, html.sg-hide .tc-backdrop { visibility: hidden; }
html.sg-blur .app, html.sg-blur .tabbar { filter: blur(14px); transition: filter .1s; }
@media print {
  .sg-mark { position: fixed; display: block !important; opacity: .12; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sg-shield { display: none !important; }
  html.sg-blur .app { filter: none; }
}
