/* =====================================================================
   Vandeputte · Réclamations & CAPA — huisstijl
   Kleuren via variabelen; wijzig --accent om te herbranden.
   ===================================================================== */
:root {
  --bg: #f3f4f6; --card: #ffffff; --line: #e5e7eb; --line-2: #d1d5db;
  --text: #1c2431; --muted: #6b7280; --muted-2: #9ca3af;
  --accent: #52a035; --accent-2: #448a2b; --accent-soft: #e6f3df; --accent-deep: #2f6b1c;
  --sidebar: #ffffff; --sidebar-2: #eef6ea; --sidebar-text: #3b4a36; --sidebar-line: #e3ebdf;
  --blue: #2563eb; --blue-soft: #dbeafe; --amber: #b45309; --amber-soft: #fef3c7;
  --orange: #c2410c; --orange-soft: #ffedd5; --purple: #6d28d9; --purple-soft: #ede9fe;
  --green: #3a7d24; --green-soft: #e6f3df; --red: #b91c1c; --red-soft: #fee2e2;
  --grey: #4b5563; --grey-soft: #f3f4f6;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --sidebar-w: 240px;
}
* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background-image: linear-gradient(180deg, #eef5ea 0, var(--bg) 220px); background-repeat: no-repeat; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.45; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .hidden { display: none !important; }
.mt { margin-top: 1rem; } .mb { margin-bottom: 1rem; } .mb-0 { margin-bottom: 0; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30; border-right: 1px solid var(--sidebar-line); }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.5rem; background: var(--card); border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 10; }
.page-title { font-size: 1.25rem; margin: 0; flex: 1; }
.topbar-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.topbar-search input { width: 260px; padding: .45rem .8rem .45rem 2rem; border: 1px solid var(--line-2); border-radius: 99px; font: inherit; font-size: .88rem; background: var(--grey-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") .7rem center / 15px no-repeat; }
.topbar-search input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); background-color: #fff; }
@media (max-width: 1000px) { .topbar-search input { width: 160px; } } @media (max-width: 600px) { .topbar-search { display: none; } }
details > summary { list-style: none; cursor: pointer; display: inline-flex; } details > summary::-webkit-details-marker { display: none; }
.content { padding: 1.5rem; max-width: 1400px; width: 100%; }
.burger { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; }
.nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 25; }

.brand { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border-bottom: 1px solid var(--sidebar-line); }
.brand img { width: 96px; height: auto; display: block; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { color: var(--text); font-size: 1rem; } .brand-text small { font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; line-height: 1.3; }
.nav { padding: .6rem; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: 7px; color: var(--sidebar-text); font-size: .93rem; margin-bottom: 2px; }
.nav a:hover { background: var(--sidebar-2); text-decoration: none; color: var(--accent-deep); }
.nav a.active { background: var(--accent); color: #fff; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); padding: 1rem .7rem .35rem; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: .7rem; padding: .05rem .45rem; border-radius: 99px; font-weight: 600; }
.sidebar-foot { padding: .75rem; border-top: 1px solid var(--sidebar-line); display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; }
.me { display: flex; align-items: center; gap: .6rem; color: var(--sidebar-text); min-width: 0; }
.me:hover { text-decoration: none; color: var(--accent-deep); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff; flex: none; }
.me-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.me-text strong { font-size: .85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { font-size: .7rem; color: var(--muted); }
.lang-switch { display: flex; gap: 2px; }
.lang-switch button { background: none; border: 1px solid var(--line-2); color: var(--muted); font-size: .7rem; padding: .2rem .35rem; border-radius: 4px; cursor: pointer; }
.lang-switch button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lang-center { justify-content: center; margin-top: 1.5rem; }
.lang-center button { color: var(--muted); border-color: var(--line-2); padding: .3rem .6rem; }
.logout { color: var(--muted); padding: .3rem; } .logout:hover { color: var(--red); }

/* ---------- Icons (inline SVG masks) ---------- */
.ic { width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ic-home   { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8v9a2 2 0 01-2 2h-4v-7H9v7H5a2 2 0 01-2-2z'/%3E%3C/svg%3E"); }
.ic-check  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Cpath d='M8 12l3 3 5-6'/%3E%3C/svg%3E"); }
.ic-folder { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2z'/%3E%3C/svg%3E"); }
.ic-list   { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }
.ic-shield { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.ic-chart  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.ic-users  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2 20c0-3.5 3-6 7-6s7 2.5 7 6M16 4.5a3.5 3.5 0 010 7M22 20c0-3-2-5-5-5.6'/%3E%3C/svg%3E"); }
.ic-user   { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.5-7 8-7s8 3 8 7'/%3E%3C/svg%3E"); }
.ic-tags   { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 12V4h8l9 9-8 8z'/%3E%3Ccircle cx='7.5' cy='8.5' r='1.2' fill='black'/%3E%3C/svg%3E"); }
.ic-cog    { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 01-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 01-4 0v-.1a1.7 1.7 0 00-1.1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 01-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 010-4h.1a1.7 1.7 0 001.5-1.1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 012.8-2.8l.1.1a1.7 1.7 0 001.8.3H9a1.7 1.7 0 001-1.5V3a2 2 0 014 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 012.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8V9a1.7 1.7 0 001.5 1H21a2 2 0 010 4h-.1a1.7 1.7 0 00-1.5 1z'/%3E%3C/svg%3E"); }
.ic-scale  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M4 21h16M3 7l9-2 9 2M6 7l-3 7a3 3 0 006 0zM18 7l-3 7a3 3 0 006 0z'/%3E%3C/svg%3E"); }
.ic-box    { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 2l9 5v10l-9 5-9-5V7z'/%3E%3Cpath d='M3 7l9 5 9-5M12 12v10'/%3E%3C/svg%3E"); }
.ic-out    { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E"); }

/* ---------- Cards, grid ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card.empty, .empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); } .empty .btn { margin-top: .5rem; }
.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); }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); display: block; color: inherit; }
.kpi:hover { text-decoration: none; border-color: var(--accent); }
.kpi .kpi-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi .kpi-value { font-size: 1.8rem; font-weight: 700; line-height: 1.2; margin-top: .2rem; color: var(--accent-deep); }
.kpi .kpi-sub { font-size: .8rem; color: var(--muted); }
.kpi.warn .kpi-value { color: var(--red); } .kpi.good .kpi-value { color: var(--green); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--grey-soft); white-space: nowrap; }
.tbl tbody tr:hover { background: #f9fafb; }
.tbl tr.row-link { cursor: pointer; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .actions-col { white-space: nowrap; text-align: right; }
.tbl tfoot td { font-weight: 600; background: var(--grey-soft); }
.tbl-compact th, .tbl-compact td { padding: .35rem .5rem; }
.overdue-row td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: .12rem .55rem; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.badge-blue { background: var(--blue-soft); color: var(--blue); } .badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-orange { background: var(--orange-soft); color: var(--orange); } .badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-green { background: var(--green-soft); color: var(--green); } .badge-red { background: var(--red-soft); color: var(--red); }
.badge-grey { background: var(--grey-soft); color: var(--grey); } .badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-type { font-family: ui-monospace, Menlo, monospace; font-weight: 700; }
.badge-RC { background: var(--blue-soft); color: var(--blue); } .badge-NC { background: var(--amber-soft); color: var(--amber); } .badge-GC { background: var(--red-soft); color: var(--red); }
.due { font-variant-numeric: tabular-nums; } .due-late { color: var(--red); font-weight: 600; } .due-soon { color: var(--amber); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: 7px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font-size: .9rem; font-weight: 500; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--grey-soft); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-2); }
.btn-danger { color: var(--red); border-color: #fca5a5; } .btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: .3rem .6rem; font-size: .8rem; } .btn-block { width: 100%; justify-content: center; }
.btn-link { border: 0; background: none; color: var(--accent); padding: .2rem .3rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-group { display: inline-flex; gap: .4rem; flex-wrap: wrap; }

/* ---------- Forms ---------- */
form label, .lbl { display: block; font-size: .82rem; font-weight: 600; color: var(--grey); margin-bottom: .9rem; }
label > input, label > select, label > textarea, .input { display: block; width: 100%; margin-top: .3rem; padding: .5rem .65rem; border: 1px solid var(--line-2); border-radius: 7px; font: inherit; font-weight: 400; color: var(--text); background: #fff; }
label > input:focus, label > select:focus, label > textarea:focus, .input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; display: inline; margin: 0 .4rem 0 0; }
label.check { display: flex; align-items: center; gap: .4rem; font-weight: 500; cursor: pointer; }
label.check input { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-all { grid-column: 1 / -1; }
.form-actions { display: flex; gap: .6rem; align-items: center; margin-top: .5rem; padding-top: 1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }
.hint { font-size: .78rem; color: var(--muted); font-weight: 400; margin-top: .25rem; }
.req::after { content: " *"; color: var(--red); }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filters label { margin: 0; min-width: 120px; } .filters label > select, .filters label > input { margin-top: .2rem; padding: .4rem .55rem; font-size: .88rem; }
.filters .btn { align-self: flex-end; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem 0; margin: 0 0 1.25rem; }
legend { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); padding: 0 .4rem; }
.progress { height: 8px; background: var(--grey-soft); border-radius: 99px; overflow: hidden; min-width: 60px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.progress-wrap { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------- Pills (meervoudige keuze) ---------- */
.pills { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .35rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border: 1px solid var(--line-2); border-radius: 99px; font-size: .85rem; font-weight: 500; cursor: pointer; background: #fff; margin: 0; }
.pill input { margin: 0; accent-color: var(--accent); } .pill.on, .pill:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs button, .tabs a { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -2px; padding: .6rem .9rem; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.on, .tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .cnt { background: var(--grey-soft); color: var(--muted); border-radius: 99px; padding: 0 .4rem; font-size: .72rem; margin-left: .3rem; }
.tab-pane { display: none; } .tab-pane.on { display: block; }

/* ---------- Flash ---------- */
.flash { margin: 1rem 1.5rem 0; padding: .7rem 1rem; border-radius: 8px; font-size: .9rem; border: 1px solid; }
.flash-success { background: var(--green-soft); color: var(--green); border-color: #86efac; }
.flash-error { background: var(--red-soft); color: var(--red); border-color: #fca5a5; }
.flash-info { background: var(--blue-soft); color: var(--blue); border-color: #93c5fd; }
.bare .flash { margin: 0 0 1rem; }
.alert { padding: .8rem 1rem; border-radius: 8px; font-size: .9rem; border: 1px solid; margin-bottom: 1rem; }
.alert-warn { background: var(--amber-soft); color: var(--amber); border-color: #fcd34d; }
.alert-info { background: var(--blue-soft); color: var(--blue); border-color: #93c5fd; }
.alert-error { background: var(--red-soft); color: var(--red); border-color: #fca5a5; }
.alert ul { margin: .3rem 0 0 1.2rem; padding: 0; }

/* ---------- Detail view ---------- */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .9rem; margin: 0; }
.dl dt { color: var(--muted); font-weight: 500; } .dl dd { margin: 0; }
.dl-3 { grid-template-columns: repeat(3, max-content 1fr); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: .6rem 0 .6rem 1.2rem; border-left: 2px solid var(--line); position: relative; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .95rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline .when { color: var(--muted); font-size: .78rem; }
.timeline .body { margin-top: .2rem; white-space: pre-wrap; }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.file-list li { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; display: flex; gap: .6rem; align-items: center; font-size: .85rem; }
.file-list .thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; background: var(--grey-soft); }
.file-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 1.2rem; text-align: center; color: var(--muted); font-size: .88rem; cursor: pointer; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { display: none; }
.dropzone .chosen { margin-top: .5rem; font-size: .8rem; color: var(--text); }
.head-meta { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.head-meta .num { font-family: ui-monospace, Menlo, monospace; font-size: 1.15rem; font-weight: 700; }
.section-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin: 1.25rem 0 .6rem; }
.repeat-table { table-layout: fixed; width: 100%; } .repeat-table th { white-space: normal; } .repeat-table td { padding: .25rem .3rem; } .repeat-table input, .repeat-table select { margin: 0; padding: .4rem .5rem; font-size: .88rem; width: 100%; min-width: 0; }
.repeat-table .rm, .rep-item .rm { color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 1.2rem; line-height: 1; } .repeat-table .rm:hover, .rep-item .rm:hover { color: var(--red); }
.rep-items { display: grid; gap: .75rem; }
.rep-item { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 2.4rem 0 1rem; background: #fafbf9; }
.rep-item .rm { position: absolute; top: .5rem; right: .6rem; }
.rep-item .form-grid label { margin-bottom: .8rem; } .rep-item .rep-check { margin-top: 1.7rem; }

/* ---------- Charts (CSS bars) ---------- */
.bars { display: grid; gap: .4rem; font-size: .85rem; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr max-content; gap: .6rem; align-items: center; }
.bar-row .bar { height: 14px; background: var(--grey-soft); border-radius: 4px; overflow: hidden; }
.bar-row .bar > span { display: block; height: 100%; background: var(--accent); }
.bar-row .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cols { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 1rem; }
.cols .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: .7rem; color: var(--muted); }
.cols .col > b { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.cols .col > b::after { content: attr(data-v); position: absolute; top: -1.1rem; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--text); }
.cols .col > b.nc { background: var(--amber); } .cols .col > b.gc { background: var(--red); }
.cols .col.stack > b { border-radius: 0; } .cols .col.stack > b:first-of-type { border-radius: 3px 3px 0 0; }
.legend { display: flex; gap: 1rem; font-size: .78rem; color: var(--muted); margin-top: .5rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: middle; }

/* ---------- Auth ---------- */
body.bare { background: var(--bg); background-image: none; }
.auth { display: grid; grid-template-columns: minmax(320px, 46%) 1fr; min-height: 100vh; }
.auth-side { background: linear-gradient(160deg, #2f6b1c 0%, var(--accent) 70%, #6cb84d 100%); color: #fff; padding: 3rem 3.25rem; display: flex; flex-direction: column; gap: 2rem; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.07); }
.auth-logo { width: 220px; height: auto; }
.auth-side-text h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .5rem; color: #fff; }
.auth-side-text p { font-size: 1.05rem; opacity: .92; max-width: 34ch; margin: 0; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; max-width: 40ch; }
.auth-points li { padding-left: 1.6rem; position: relative; font-size: .95rem; opacity: .95; }
.auth-points li::before { content: "✓"; position: absolute; left: 0; top: .1rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: rgba(255,255,255,.2); font-size: .7rem; display: grid; place-items: center; font-weight: 700; }
.auth-foot { margin-top: auto; font-size: .78rem; opacity: .7; }
.auth-main { display: grid; place-items: center; padding: 2rem 1.5rem; }
.auth-box { width: 100%; max-width: 380px; }
.auth-logo-small { display: none; width: 180px; margin: 0 auto 1.5rem; }
.auth-box h2 { font-size: 1.6rem; margin-bottom: .25rem; }
.auth-intro { margin-bottom: 1.5rem; }
.auth-form label > input { padding: .7rem .8rem; font-size: 1rem; }
.btn-lg { padding: .8rem 1rem; font-size: 1rem; font-weight: 600; margin: .5rem 0 1rem; }
.bare .flash { margin: 0 0 1rem; }
.auth-card h2 { margin-bottom: 1rem; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-logo-small { display: block; } .auth-main { align-items: start; padding-top: 3rem; } }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: .3rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pager a, .pager span { padding: .3rem .65rem; border: 1px solid var(--line-2); border-radius: 6px; font-size: .85rem; }
.pager span.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Print ---------- */
@media print { .sidebar, .topbar, .nav-backdrop, .no-print { display: none !important; } .main { margin: 0; } .content { padding: 0; max-width: none; } .card { box-shadow: none; break-inside: avoid; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid-3, .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main { grid-template-columns: 1fr; } .dl-3 { grid-template-columns: max-content 1fr; } }
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; } body.nav-open .sidebar { transform: none; } body.nav-open .nav-backdrop { display: block; }
  .main { margin-left: 0; } .burger { display: block; } .content { padding: 1rem; } .topbar { padding: .7rem 1rem; }
  .grid-2, .grid-3, .grid-4, .form-grid, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; } .span-2, .span-3 { grid-column: auto; }
  .page-title { font-size: 1.05rem; } .kpis { grid-template-columns: repeat(2, 1fr); } .bar-row { grid-template-columns: 80px 1fr max-content; }
}
