[hidden] { display: none !important; }
/* Mobile Locker huisstijl: geel #FDB813, bijna zwart #0E0D17, lichtgrijs #F5F5F5, Manrope. */
:root {
  color-scheme: light;
  --brand: #fdb813;
  --brand-ink: #0e0d17;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --border: #e4e4e7;
  --text: #0e0d17;
  --text-2: #4b4a55;
  --text-3: #75747e;
  --brand-soft: #fff4d6;
  --link: #1d5fb8;
  --good: #0f7b3f;
  --good-bg: #e3f3e8;
  --bad: #b3261e;
  --bad-bg: #fbe7e5;
  --warn-bg: #fff4d6;
  --row-hover: #fafaf7;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e0d17;
    --surface: #17161f;
    --surface-2: #201f29;
    --border: #2c2b36;
    --text: #ffffff;
    --text-2: #c4c3cc;
    --text-3: #908f99;
    --brand-soft: #2a2411;
    --link: #7fb2f5;
    --good: #5cc98a;
    --good-bg: #16301f;
    --bad: #f08a82;
    --bad-bg: #3a1a17;
    --warn-bg: #2a2411;
    --row-hover: #1d1c26;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0d17;
  --surface: #17161f;
  --surface-2: #201f29;
  --border: #2c2b36;
  --text: #ffffff;
  --text-2: #c4c3cc;
  --text-3: #908f99;
  --brand-soft: #2a2411;
  --link: #7fb2f5;
  --good: #5cc98a;
  --good-bg: #16301f;
  --bad: #f08a82;
  --bad-bg: #3a1a17;
  --warn-bg: #2a2411;
  --row-hover: #1d1c26;
}
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: inline; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.45 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Layout */
.topbar {
  position: sticky; top: 0; z-index: 20; height: 56px;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--brand-ink); color: #fff; border-bottom: 3px solid var(--brand);
}
.topbar .brand img { height: 30px; display: block; }
.topbar .title { font-weight: 700; font-size: 15px; white-space: nowrap; }
.topbar .title small { color: #b9b8c2; font-weight: 500; margin-left: 6px; }
.topbar .spacer { flex: 1; }
.topbar select, .topbar .icon-btn {
  background: #201f29; border: 1px solid #3a3944; color: #fff; border-radius: var(--radius); height: 32px; padding: 0 8px;
}
.topbar .icon-btn { cursor: pointer; }
.topbar form { margin: 0; }
.menu-btn { display: none; }

.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 56px); }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border); padding: 12px 8px 24px;
  position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto;
}
.sidebar h4 { margin: 14px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.sidebar a { display: block; padding: 6px 10px; border-radius: var(--radius); color: var(--text); font-size: 13.5px; }
.sidebar a:hover { background: var(--surface-2); text-decoration: none; }
.sidebar a.active { background: var(--brand-soft); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
main { padding: 20px 24px 48px; min-width: 0; }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 24px 0 8px; }
.sub { color: var(--text-2); margin: 0 0 16px; }

/* Controls */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 12px 0 14px; }
.toolbar label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-2); }
.toolbar label.check { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: var(--text); height: 34px; }
.field, .toolbar select, .toolbar input[type=date], .toolbar input[type=text], .toolbar input[type=search] {
  height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 0 8px; min-width: 0;
}
.btn {
  height: 34px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(.96); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* Cards and tiles */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 12px; }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.tile .k { font-size: 12px; color: var(--text-2); }
.tile .v { font-size: 20px; font-weight: 700; margin-top: 2px; }
a.tile { color: inherit; display: block; }
a.tile:hover { border-color: var(--brand); text-decoration: none; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dl.facts dt { color: var(--text-2); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.report-links { columns: 2 220px; margin: 0; padding: 0; list-style: none; }
.report-links li { padding: 3px 0; break-inside: avoid; }

/* Tables */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 210px); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 5px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { position: sticky; top: 0; background: var(--surface-2); font-size: 12px; color: var(--text-2); font-weight: 700; z-index: 1; white-space: nowrap; }
thead tr + tr th { top: 29px; }
tbody tr:hover { background: var(--row-hover); }
td.num, th.num { text-align: right; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
tfoot td { font-weight: 700; background: var(--surface-2); position: sticky; bottom: 0; }
.rep td { border-bottom-color: transparent; }
.rep tr.lvl0 td, .rep tr.lvl1.fold td { border-top: 1px solid var(--border); }
.rep tr.lvl0 td { font-weight: 800; background: var(--surface-2); }
.rep tr.total td { font-weight: 700; border-top: 1px solid var(--text-3); }
.rep tr.fold td:first-child { font-weight: 600; }
.rep td.name { min-width: 260px; }
.rep td.name .wrap { display: inline-flex; align-items: center; gap: 4px; }
.tw { width: 18px; height: 18px; border: 0; background: none; cursor: pointer; padding: 0; color: var(--text-2); font-size: 12px; }
.tw-space { display: inline-block; width: 18px; }
.cell-link { color: inherit; cursor: pointer; border-bottom: 1px dotted var(--text-3); }
.cell-link:hover { color: var(--link); border-bottom-color: var(--link); text-decoration: none; }
.more-row td { color: var(--link); cursor: pointer; }
.neg { color: var(--bad); }
.muted { color: var(--text-3); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 3px; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 10px; color: var(--text-2); }

/* Messages */
.notice { padding: 10px 12px; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid var(--border); margin: 10px 0; }
.error-box { padding: 10px 12px; border-radius: var(--radius); background: var(--bad-bg); color: var(--bad); margin: 10px 0; }
.loading { color: var(--text-2); padding: 24px 4px; }
.loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 8px; width: min(1100px, 100%); max-height: 88vh; display: flex; flex-direction: column; border: 1px solid var(--border); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); gap: 12px; }
.modal header h3 { margin: 0; font-size: 15px; }
.modal .body { overflow: auto; padding: 0; }

/* Chatter */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.timeline .meta { font-size: 12px; color: var(--text-3); }
.timeline .body { white-space: pre-wrap; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--brand-ink); }
.login-card { width: min(380px, 100%); background: var(--surface); border-radius: 8px; padding: 28px; border-top: 4px solid var(--brand); }
.login-card .brand img { height: 48px; margin-bottom: 14px; }
.login-card h1 { font-size: 18px; }
.login-card p { color: var(--text-2); margin: 0 0 16px; }
.login-card input { width: 100%; height: 40px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 10px; background: var(--surface); }
.login-card .btn { width: 100%; height: 40px; justify-content: center; }
.login-card .langs { margin-top: 14px; text-align: center; font-size: 12px; }
.login-card .langs a { margin: 0 5px; color: var(--text-2); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 56px; left: 0; bottom: 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .15s; height: auto; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
  .menu-btn { display: inline-block; }
  .topbar { gap: 6px; padding: 0 10px; }
  .topbar .title, .topbar .brand { display: none; }
  .topbar #companySel { max-width: 120px; }
  .topbar select, .topbar .icon-btn { padding: 0 5px; font-size: 13px; }
  .card { overflow-x: auto; }
  .topbar .spacer { display: none; }
  .topbar form { margin-left: auto; }
  dl.facts { grid-template-columns: 1fr; gap: 0 0; }
  dl.facts dd { margin-bottom: 6px; }
  main { padding: 16px; }
  .table-wrap { max-height: none; }
}
@media print {
  .topbar, .sidebar, .toolbar, .btn { display: none !important; }
  .layout { display: block; }
  .table-wrap { max-height: none; overflow: visible; border: 0; }
}

/* Forms (user management, own password) */
.form { display: grid; gap: 12px; padding: 16px; }
.form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-2); }
.form input[type=text], .form input[type=password], .form select {
  height: 36px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 0 10px; min-width: 0; width: 100%;
}
.form .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form fieldset { border: 1px solid var(--border); border-radius: var(--radius); margin: 0; padding: 8px 12px 12px; min-width: 0; }
.form legend { font-size: 12px; color: var(--text-2); padding: 0 6px; }
.form .checks { display: grid; gap: 8px; }
.form label.inline { flex-direction: row; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--text); }
.form label.inline input { margin-top: 3px; }
.pw-row { display: flex; gap: 6px; }
.pw-row input { flex: 1; }
.cred { display: grid; gap: 10px; padding: 12px; background: var(--surface-2); border-radius: var(--radius); font-size: 16px; overflow-wrap: anywhere; }
.cred strong { font-family: ui-monospace, Consolas, monospace; user-select: all; }
@media (max-width: 900px) { .form .two-col { grid-template-columns: 1fr; } }

.login-card .btn.google { width: 100%; height: 42px; justify-content: center; text-decoration: none; margin-bottom: 4px; }
.login-card .btn.google .g { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 800; font-size: 13px; }
.login-card .divider { margin: 14px 0 10px; text-align: center; color: var(--text-3); font-size: 12px; }

/* Remarks */
.rb { background: none; border: 0; cursor: pointer; padding: 0 2px; font-size: 14px; opacity: .3; line-height: 1; white-space: nowrap; color: inherit; }
.rb:hover, .rb:focus-visible { opacity: 1; }
.rb.has { opacity: 1; }
.rb span { font-size: 11px; font-weight: 700; margin-left: 2px; color: var(--link); }
.rb-cell { width: 1%; text-align: right; white-space: nowrap; }
tr:hover .rb { opacity: .8; }
.fab { position: fixed; right: 16px; bottom: 16px; z-index: 15; height: 40px; padding: 0 16px; border-radius: 20px; border: 0; background: var(--brand); color: var(--brand-ink); font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.fab:hover { filter: brightness(.95); }
.modal-bg2 { z-index: 60; background: rgba(0, 0, 0, .55); }
.form textarea { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 8px 10px; resize: vertical; min-height: 90px; }
@media print { .fab, .rb { display: none !important; } }
