/* deKlein Boekhouding: one stylesheet for every screen (owner, 15 October 2026).
   House style of www.deklein.com: ink, blue and violet on a light ground.
   System fonts only (no requests to font services); amounts in tabular figures. */

:root {
  color-scheme: light;
  --ink: #17203b;
  --text-muted: #596278;
  --blue: #2e52c8;
  --blue-dark: #1f3a96;
  --violet: #6a5bd8;
  --line: #dfe4ee;
  --line-soft: #eef1f6;
  --field-line: #c9d0de;
  --bg: #f5f7fb;
  --card: #ffffff;
  --head-bg: #fafbfd;
  --tint: #e7ebfb;
  --tint-soft: #eef1fd;
  --ok: #1b6b43; --ok-bg: #e3f3ea;
  --warn: #7a4a00; --warn-bg: #fdf1dc; --warn-line: #f3dfb5;
  --danger: #a8231a; --danger-bg: #fde8e6; --danger-line: #f1c6c1;
  --radius: 12px;
  --radius-sm: 8px;
  --icon-chevron: 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 6l6 6-6 6'/%3E%3C/svg%3E");
  --icon-updown: 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='M8 9l4-4 4 4'/%3E%3Cpath d='M8 15l4 4 4-4'/%3E%3C/svg%3E");
  --icon-check: 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.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  /* Older names, still used inline in some templates. */
  --accent: var(--blue);
  --muted: var(--line);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

body { margin: 0; background: var(--bg); color: var(--ink); font-variant-numeric: tabular-nums; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1 { margin: .25rem 0 1rem; font-size: 1.85rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
h2 { margin: 1.5rem 0 .6rem; font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
section { margin-bottom: 2rem; }
hr { border: 0; border-top: 1px solid var(--line); }

/* Header */
header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; padding: .75rem 1.75rem; background: var(--card); border-bottom: 1px solid var(--line); }
header .brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; }
header .brand img { height: 34px; width: auto; display: block; }
header .brand span { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); padding-left: .75rem; border-left: 1px solid var(--line); }
header form { display: flex; align-items: center; gap: .75rem; color: var(--text-muted); font-size: .93rem; }

/* Layout */
.layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.75rem; align-items: start; padding: 1.5rem 1.75rem 3rem; }
.layout.no-menu { grid-template-columns: minmax(0, 1fr); }
.content { max-width: 78rem; min-width: 0; }
body.wide .content { max-width: 110rem; }

/* Menu */
nav.modules { position: sticky; top: 1rem; display: flex; flex-direction: column; max-height: calc(100vh - 2rem); font-size: .95rem; }
nav.modules .menu-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: transparent transparent; margin-right: -.5rem; padding: 0 .5rem 1rem 0; }
nav.modules .menu-scroll:hover, nav.modules .menu-scroll:focus-within { scrollbar-color: var(--field-line) transparent; }
nav.modules .heading { margin: 1rem 0 .3rem; padding: 0 .75rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
nav.modules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
nav.modules li a { display: flex; align-items: center; gap: .65rem; padding: .5rem .75rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
nav.modules li a::before { content: ""; flex: 0 0 18px; height: 18px; background-color: var(--text-muted); -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain; }
nav.modules li a:hover { background: #eef1f7; }
nav.modules li a[aria-current="page"] { background: var(--tint); color: var(--blue-dark); font-weight: 600; }
nav.modules li a[aria-current="page"]::before { background-color: var(--blue-dark); }
/* A module unfolds its groups and links underneath it; the chevron shows it can */
nav.modules li.module > a::after { content: ""; flex: 0 0 14px; height: 14px; margin-left: auto; background-color: #9aa3b8; -webkit-mask: var(--icon-chevron) no-repeat center / contain; mask: var(--icon-chevron) no-repeat center / contain; transition: transform .15s ease; }
nav.modules li.module.open > a { font-weight: 600; }
nav.modules li.module.open > a::after { transform: rotate(90deg); background-color: var(--text-muted); }
nav.modules li.module.open > a[aria-current="page"] { background: transparent; color: var(--ink); }
nav.modules li.module.open > a[aria-current="page"]:hover { background: #eef1f7; }
nav.modules li.module:not(.open) > ul.sub { display: none; }
nav.modules ul.sub { margin: .1rem 0 .6rem 1.3rem; padding: 0 0 0 .6rem; border-left: 1px solid var(--line); gap: 1px; }
nav.modules ul.sub a { position: relative; display: block; padding: .32rem .6rem; font-size: .875rem; line-height: 1.35; color: #3b4560; border-radius: 6px; }
nav.modules ul.sub a::before { display: none; }
nav.modules ul.sub a:hover { color: var(--ink); }
nav.modules ul.sub a.current { background: var(--tint); color: var(--blue-dark); font-weight: 600; }
nav.modules ul.sub a.current::after { content: ""; position: absolute; left: calc(-.6rem - 1px); top: .4rem; bottom: .4rem; width: 2px; border-radius: 2px; background: var(--blue); }
/* A group of pages (Setup, Inquiries and reports, …) unfolds one level deeper */
nav.modules ul.sub li.group > details > summary { display: flex; align-items: center; gap: .5rem; padding: .32rem .6rem; font-size: .875rem; line-height: 1.35; color: #3b4560; border-radius: 6px; cursor: pointer; list-style: none; user-select: none; }
nav.modules ul.sub li.group > details > summary::-webkit-details-marker { display: none; }
nav.modules ul.sub li.group > details > summary::after { content: ""; flex: 0 0 12px; height: 12px; margin-left: auto; background-color: #9aa3b8; -webkit-mask: var(--icon-chevron) no-repeat center / contain; mask: var(--icon-chevron) no-repeat center / contain; transition: transform .15s ease; }
nav.modules ul.sub li.group > details > summary:hover { background: #eef1f7; color: var(--ink); }
nav.modules ul.sub li.group > details[open] > summary { color: var(--ink); font-weight: 600; }
nav.modules ul.sub li.group > details[open] > summary::after { transform: rotate(90deg); }
nav.modules ul.sub li.group ul { margin: .1rem 0 .3rem .6rem; padding-left: .6rem; border-left: 1px solid var(--line); gap: 1px; }
body:has(.capture):not(.menu-open) nav.modules ul.sub { display: none; }

/* Company dropdown, top of the left bar: the companies, and Intercompany across them */
.company-picker { position: relative; margin: 0 0 .9rem; }
.company-picker > summary { list-style: none; display: flex; align-items: center; gap: .65rem; padding: .5rem .7rem .5rem .5rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; user-select: none; }
.company-picker > summary::-webkit-details-marker { display: none; }
.company-picker > summary::before { content: ""; flex: 0 0 32px; height: 32px; border-radius: 8px; background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f3a96' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5l8-2v18'/%3E%3Cpath d='M12 9h8v12'/%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M7.5 8h1M7.5 12h1M7.5 16h1M15.5 13h1M15.5 17h1'/%3E%3C/svg%3E") no-repeat center / 18px; }
.company-picker.intercompany > summary::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f3a96' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h14l-3-3'/%3E%3Cpath d='M20 16H6l3 3'/%3E%3C/svg%3E"); }
.company-picker > summary::after { content: ""; flex: 0 0 16px; height: 16px; margin-left: auto; background-color: var(--text-muted); -webkit-mask: var(--icon-updown) no-repeat center / contain; mask: var(--icon-updown) no-repeat center / contain; }
.company-picker > summary:hover { border-color: var(--field-line); }
.company-picker[open] > summary, .company-picker > summary:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46, 82, 200, .14); outline: none; }
.company-picker .picker-text { display: grid; min-width: 0; line-height: 1.25; }
.company-picker .picker-label { font-size: .72rem; color: var(--text-muted); }
.company-picker .company-name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: max(100%, 17rem); box-sizing: border-box; display: grid; gap: 2px; padding: .4rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(23, 32, 59, .16); }
.picker-menu .picker-heading { margin: .3rem .6rem .2rem; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.picker-menu a { position: relative; display: grid; padding: .45rem 2.2rem .45rem .6rem; border-radius: 8px; color: var(--ink); text-decoration: none; line-height: 1.3; }
.picker-menu a strong { font-weight: 600; }
.picker-menu a small { font-size: .78rem; color: var(--text-muted); }
.picker-menu a:hover { background: #eef1f7; color: var(--ink); }
.picker-menu a[aria-current="page"] { background: var(--tint); }
.picker-menu a[aria-current="page"]::after { content: ""; position: absolute; right: .7rem; top: 50%; width: 16px; height: 16px; margin-top: -8px; background-color: var(--blue); -webkit-mask: var(--icon-check) no-repeat center / contain; mask: var(--icon-check) no-repeat center / contain; }
.picker-menu a.intercompany { padding-left: 2.6rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f3a96' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h14l-3-3'/%3E%3Cpath d='M20 16H6l3 3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: .7rem center; background-size: 18px; }
.picker-menu hr { margin: .3rem .2rem; }
.picker-menu a.all { padding-top: .4rem; padding-bottom: .4rem; color: var(--blue); font-weight: 500; font-size: .9rem; }
.picker-menu a.all:hover { color: var(--blue-dark); }
nav.modules li[data-icon="home"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="payable"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l3 3v15H6z'/%3E%3Cpath d='M9 13l6-6'/%3E%3Cpath d='M10 7h5v5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l3 3v15H6z'/%3E%3Cpath d='M9 13l6-6'/%3E%3Cpath d='M10 7h5v5'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="receivable"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l3 3v15H6z'/%3E%3Cpath d='M15 8l-6 6'/%3E%3Cpath d='M14 14H9V9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l3 3v15H6z'/%3E%3Cpath d='M15 8l-6 6'/%3E%3Cpath d='M14 14H9V9'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="bank"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-5 9 5'/%3E%3Cpath d='M5 10v8M10 10v8M14 10v8M19 10v8M3 20h18'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-5 9 5'/%3E%3Cpath d='M5 10v8M10 10v8M14 10v8M19 10v8M3 20h18'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="journal"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h11a3 3 0 013 3v13H8a3 3 0 01-3-3z'/%3E%3Cpath d='M5 17a3 3 0 013-3h11'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h11a3 3 0 013 3v13H8a3 3 0 01-3-3z'/%3E%3Cpath d='M5 17a3 3 0 013-3h11'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="assets"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8l9-5 9 5v8l-9 5-9-5z'/%3E%3Cpath d='M3 8l9 5 9-5M12 13v8'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8l9-5 9 5v8l-9 5-9-5z'/%3E%3Cpath d='M3 8l9 5 9-5M12 13v8'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="tax"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5L5 19'/%3E%3Ccircle cx='7' cy='7' r='2.5'/%3E%3Ccircle cx='17' cy='17' r='2.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5L5 19'/%3E%3Ccircle cx='7' cy='7' r='2.5'/%3E%3Ccircle cx='17' cy='17' r='2.5'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="intercompany"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13l-3-3'/%3E%3Cpath d='M20 16H7l3 3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13l-3-3'/%3E%3Cpath d='M20 16H7l3 3'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="reporting"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="admin"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="companies"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5l8-2v18M12 9h8v12M4 21h16'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5l8-2v18M12 9h8v12M4 21h16'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="check"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="icsetup"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13l-3-3'/%3E%3Cpath d='M20 16H7l3 3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13l-3-3'/%3E%3Cpath d='M20 16H7l3 3'/%3E%3C/svg%3E"); }
nav.modules li[data-icon="fe"] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5L5 19'/%3E%3Ccircle cx='7' cy='7' r='2.5'/%3E%3Ccircle cx='17' cy='17' r='2.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5L5 19'/%3E%3Ccircle cx='7' cy='7' r='2.5'/%3E%3Ccircle cx='17' cy='17' r='2.5'/%3E%3C/svg%3E"); }

/* Module pages */
.module-actions { display: flex; gap: .5rem; }
.module-actions button { border: 0; background: none; color: var(--blue); padding: .2rem .3rem; font-weight: 500; }
.module-actions button:hover { background: none; color: var(--blue-dark); text-decoration: underline; }
.module-groups { max-width: 40rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .25rem 1rem; }
.module-groups details { border-bottom: 1px solid var(--line-soft); }
.module-groups details:last-child { border-bottom: 0; }
.module-groups summary { cursor: pointer; padding: .65rem 0; font-weight: 600; }
.module-groups ul { list-style: none; margin: 0 0 .6rem; padding-left: 1.2rem; display: grid; gap: .15rem; }
.module-groups li a { text-decoration: none; }
.module-groups li a:hover { text-decoration: underline; }

/* Forms */
.stacked { display: grid; gap: .9rem; max-width: 34rem; margin-bottom: 1rem; }
.stacked p, .stacked > div { margin: 0; display: grid; gap: .3rem; }
.stacked label { font-weight: 500; font-size: .93rem; }
/* Django renders label, help text and field as siblings: keep each field together. */
.stacked > label { margin-bottom: -.55rem; }
.stacked > div.helptext { margin-top: -.25rem; margin-bottom: -.5rem; }
.stacked > label:has(input[type="checkbox"]) { margin-bottom: 0; }
.helptext { font-size: .85rem; color: var(--text-muted); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); padding: .45rem .65rem; border: 1px solid var(--field-line); border-radius: var(--radius-sm); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(46, 82, 200, .35); outline-offset: 1px; border-color: var(--blue); }
input[type="checkbox"], input[type="radio"] { justify-self: start; width: 1.05rem; height: 1.05rem; accent-color: var(--blue); }
input[type="file"] { padding: .4rem; }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #eef1f7; border-radius: 10px; font-size: .9rem; }
.segmented a { padding: .3rem .8rem; border-radius: 7px; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.segmented a:hover { color: var(--ink); }
.segmented a[aria-current="page"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(23, 32, 59, .12); }
.segmented .count { color: var(--text-muted); font-weight: 500; }
.card.table-card { padding: 0; overflow: hidden; }
.card.table-card table { border-radius: 0; }
.table-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.table-toolbar input[type="search"] { min-width: 16rem; padding-left: 2rem; background: var(--card) no-repeat .65rem center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23596278' 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"); }
button.small { padding: .25rem .65rem; font-size: .85rem; color: var(--blue-dark); }
.inbox-note { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .6rem .9rem; background: var(--tint-soft); border: 1px solid #d9e0fa; border-radius: 10px; }
.filters, .inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }

/* Buttons: secondary by default; primary for the main action; red for deleting. */
button, a.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-size: .95rem; font-weight: 500; padding: .5rem .95rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; line-height: 1.3; }
button:hover, a.button:hover { background: #f2f4f9; color: var(--ink); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary, a.button.primary, button[name="book"], button[name="post"], form.stacked > button[type="submit"] { background: var(--blue); border-color: var(--blue); color: #ffffff; font-weight: 600; }
button.primary:hover, a.button.primary:hover, button[name="book"]:hover, button[name="post"]:hover, form.stacked > button[type="submit"]:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #ffffff; }
button.danger, form[action$="/delete/"] button[type="submit"], form[action$="/unbook/"] button[type="submit"], form[action$="/reject/"] button[type="submit"] { color: var(--danger); border-color: var(--danger-line); }
button.danger:hover, form[action$="/delete/"] button[type="submit"]:hover, form[action$="/unbook/"] button[type="submit"]:hover, form[action$="/reject/"] button[type="submit"]:hover { background: var(--danger-bg); color: var(--danger); }
form.stacked > button[type="submit"] { justify-self: start; }

/* Tables */
table { border-collapse: separate; border-spacing: 0; width: 100%; margin: .5rem 0 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .93rem; }
th, td { text-align: left; padding: .6rem .85rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--head-bg); color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child > td, tbody tr:last-child > th { border-bottom: 0; }
tbody tr:hover > td { background: #f8f9fd; }
tfoot th, tfoot td { background: var(--head-bg); border-top: 1px solid var(--line); border-bottom: 0; font-weight: 600; }
caption { text-align: left; font-weight: 600; padding: .6rem .85rem; caption-side: top; }
td.amount, th.amount { text-align: right; white-space: nowrap; }
td.number { width: 5rem; }
td.nowrap, th.nowrap { white-space: nowrap; }
tr.archived { opacity: .55; }
table.lines td { padding: .4rem .5rem; }
table.lines input, table.lines select { width: 100%; box-sizing: border-box; }
table.lines td.amount input { text-align: right; }
table.lines tr.line.selected td { background: var(--tint-soft); }
table.statement tr.side th { background: var(--tint-soft); font-size: 1.02rem; }
table.statement tr.total th, table.statement tr.subtotal td { border-top: 1px solid var(--line); }
table.statement tr.grand th { border-top: 2px solid var(--ink); }
table.statement .compare { color: var(--text-muted); }

/* Messages and notices */
.messages { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.messages li { padding: .6rem .9rem; border-radius: 10px; background: var(--ok-bg); color: var(--ok); border: 1px solid #c7e6d3; }
.messages li.error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.messages li.warning { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.messages li.info { background: var(--tint-soft); color: var(--blue-dark); border-color: #d9e0fa; }
.error, .errorlist { color: var(--danger); }
.warning { color: var(--warn); }
div.error, div.warning { padding: .7rem 1rem; border-radius: 10px; margin: 0 0 1rem; }
div.error { background: var(--danger-bg); border: 1px solid var(--danger-line); }
div.warning { background: var(--warn-bg); border: 1px solid var(--warn-line); }
div.error p, div.warning p { margin: .2rem 0; }
.errorlist { list-style: none; padding: 0; margin: 0 0 .25rem; font-size: .9rem; }
.inline { display: inline; }

/* Badges */
.badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--line-soft); color: #3d4660; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--tint); color: var(--blue-dark); }

/* Page head, cards and tiles */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.page-head .subtitle { margin: .15rem 0 0; color: var(--text-muted); }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.card > h2:first-child { margin-top: 0; }
.card table { border: 0; border-radius: 0; margin: 0; }
.table-scroll { overflow-x: auto; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.card-head h2 { margin: 0 0 .5rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.tile h2 { margin: 0; font-size: .87rem; font-weight: 500; color: var(--text-muted); }
.tile .tile-figure { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; }
.tile .tile-figure.positive { color: var(--ok); }
.tile .tile-figure.negative { color: var(--danger); }
.tile p { margin: 0; font-size: .9rem; color: var(--text-muted); }
.dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr)); gap: 0 2rem; }

/* Entry panel (bank statement and memoriaal headers) */
.entry-panel { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: .5rem 0 1rem; padding: .8rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.entry-panel dl { display: grid; grid-template-columns: auto auto; gap: .15rem 1rem; margin: 0; }
.entry-panel dt { color: var(--text-muted); }
.entry-panel dd { margin: 0; text-align: right; min-width: 6rem; }

/* Capturing a purchase invoice: document next to the form, more room for both. */
.capture { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.25rem; align-items: start; }
.capture-document iframe, .capture-document img { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); object-fit: contain; }
.capture-document .attach-box { display: grid; align-content: center; justify-items: start; gap: .75rem; min-height: 22rem; padding: 2rem; box-sizing: border-box; border: 2px dashed var(--field-line); border-radius: var(--radius); background: var(--card); }
.capture-document .attach-box h2 { margin: 0; }
.capture-document .attach-box p { margin: 0; color: var(--text-muted); }
.capture-document .attach-box input[type="file"] { max-width: 100%; }
.capture-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.capture-form .stacked { max-width: none; }
.capture-form table.lines { border: 1px solid var(--line); }
.content:has(.capture) { max-width: none; }
body:has(.capture):not(.menu-open) .layout { grid-template-columns: 3.25rem minmax(0, 1fr); }
body:has(.capture):not(.menu-open) nav.modules .company-picker, body:has(.capture):not(.menu-open) nav.modules .heading { display: none; }
body:has(.capture):not(.menu-open) nav.modules li a::after { display: none; }
body:has(.capture):not(.menu-open) nav.modules li a { width: 2.75rem; height: 2.75rem; padding: 0; justify-content: center; font-size: 0; }

.capture-form h2 { margin-top: 0; }
.capture-lines { margin-top: 1.25rem; }
.capture-lines table.lines { border: 0; }
.capture-lines table.lines th:nth-child(1) { width: 34%; }
.capture-lines table.lines th:nth-child(2) { width: 26%; }
.capture-lines table.lines th:nth-child(3) { width: 16%; }
.capture-lines table.lines th:nth-child(4) { width: 14%; }
.capture-lines table.lines th:nth-child(5) { width: 10%; }
.breadcrumb { margin: 0 0 .15rem; font-size: .85rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }

/* A bar with the actions of a long form that stays in view at the bottom. */
.action-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1.25rem; padding: .85rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -6px 18px rgba(23, 32, 59, .06); }
.action-bar > div { display: flex; flex-wrap: wrap; gap: .6rem; }
.default-submit { display: none; }

/* Dates */
.date-field { display: inline-flex; align-items: center; gap: .25rem; position: relative; }
.date-button { padding: .3rem .5rem; }
.date-message { display: block; font-size: .9rem; }

/* Log in and two-factor code */
body.auth > header { display: none; }
body.auth .layout { min-height: 100vh; box-sizing: border-box; padding: 0; grid-template-columns: minmax(0, 1fr); }
body.auth .content { max-width: none; }
.auth-page { display: flex; flex-wrap: wrap; min-height: 100vh; }
.auth-brand { flex: 1 1 24rem; background: var(--ink); color: #ffffff; padding: 3.5rem 4rem; display: flex; flex-direction: column; justify-content: flex-end; gap: 1rem; box-sizing: border-box; }
.auth-brand .eyebrow { margin: 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #b8c2e6; }
.auth-brand .claim { margin: 0; max-width: 28rem; font-size: 2.2rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; }
.auth-main { flex: 999 1 28rem; display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; box-sizing: border-box; }
.auth-card { width: 100%; max-width: 25rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 2.25rem; box-sizing: border-box; box-shadow: 0 8px 28px rgba(23, 32, 59, .06); }
.auth-card .logo { height: 40px; width: auto; display: block; margin-bottom: 1.5rem; }
.auth-card h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
.auth-card .stacked { margin: 1.25rem 0 0; }
.auth-card .stacked label { display: grid; gap: .35rem; }
.auth-card .stacked button[type="submit"] { justify-self: stretch; padding: .7rem 1rem; }

/* Test environment */
.test-environment { background: #c62828; color: #fff; font-weight: 700; text-align: center; padding: .4rem; letter-spacing: .05em; }
header nav.top-menu { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-right: auto; margin-left: 1rem; }
header nav.top-menu a { color: var(--text-muted); text-decoration: none; font-weight: 500; padding: .25rem 0; border-bottom: 2px solid transparent; }
header nav.top-menu a:hover, header nav.top-menu a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }

/* Small screens */
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; padding: 1rem; }
  body:has(.capture) .layout { grid-template-columns: 1fr; }
  body:has(.capture) nav.modules li a { width: auto; height: auto; padding: .5rem .75rem; justify-content: flex-start; font-size: inherit; }
  nav.modules { position: static; max-height: none; }
  nav.modules .menu-scroll { overflow: visible; margin-right: 0; padding: 0; }
  body:has(.capture) nav.modules li.module > a::after { display: block; }
  header { padding: .75rem 1rem; }
  .capture { grid-template-columns: 1fr; }
  .capture-document iframe, .capture-document img { height: 50vh; }
  .auth-brand { padding: 2rem 1.5rem; }
  table { display: block; overflow-x: auto; }
}

@media print {
  header, nav.modules, .module-actions, .messages, button { display: none !important; }
  body { background: #fff; }
  .layout { display: block; padding: 0; }
  table, .card, .tile { border-color: #999; }
}

/* Openstaande debiteuren / crediteuren: a heading and a subtotal per customer or supplier group */
table.open-items tr.section th { padding-top: 1.1rem; font-size: 1rem; color: var(--ink); background: transparent; }
table.open-items tr.subtotal th { border-top: 1px solid var(--line); font-weight: 600; }

/* Purchase invoices: select drafts to read again or delete */
.table-toolbar .bulk-actions { display: flex; align-items: center; gap: .5rem; }
table th.select, table td.select { width: 2rem; text-align: center; }

/* The month: hours grid. On a phone each row becomes a list of days. */
.grid-scroll { overflow-x: auto; }
table.grid { font-size: .85rem; }
table.grid th, table.grid td { padding: .3rem .25rem; text-align: center; }
table.grid th[scope="row"], table.grid thead th:first-child, table.grid tfoot th { text-align: left; min-width: 11rem; }
table.grid td.amount { text-align: right; }
table.grid .weekend { background: var(--head-bg); }
table.grid input { width: 2.9rem; padding: .25rem; text-align: right; box-sizing: border-box; }
ul.warnings { list-style: none; padding: .75rem 1rem; margin: 0 0 1rem; background: #fff6e0; border: 1px solid #f0d58c; border-radius: var(--radius-sm); }
details.row-details { margin: .5rem 0; }
details.row-details summary { cursor: pointer; font-weight: 500; }
details.row-details label { display: grid; gap: .3rem; max-width: 34rem; margin: .5rem 0; }
@media (max-width: 700px) {
  table.grid thead, table.grid tfoot { display: none; }
  table.grid, table.grid tbody, table.grid tr { display: block; width: 100%; }
  table.grid tr { margin-bottom: 1rem; border-bottom: 2px solid var(--line); }
  table.grid th[scope="row"] { display: block; }
  table.grid td { display: flex; justify-content: space-between; align-items: center; text-align: left; }
  table.grid td::before { content: attr(data-day); color: var(--text-muted); }
  table.grid input { width: 5rem; }
}

.notice { padding: .9rem 1.1rem; margin: 0 0 1.25rem; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius-sm); }
.notice h2 { margin-top: 0; }
form.inline { display: inline; }

tr.budget-warning td { background: #fff6e0; }
tr.budget-over td { background: var(--danger-bg); }
tr.euro td { border-top: 0; color: var(--text-muted); }
