/* VD Planning — v32 design: menu on the left, Inter, light and dark display.
   Colours are variables: the dark display only changes the variables. */

@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/inter-Regular.woff?v=371) format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/inter-Medium.woff?v=371) format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/inter-SemiBold.woff?v=371) format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/inter-SemiBold.woff?v=371) format('woff'); }

:root {
  color-scheme: light;
  --bg: #f5f6f8; --card: #ffffff; --card-2: #f9fafb; --side: #ffffff; --ink: #1a2230; --ink-2: #344054; --muted: #667085;
  --line: #e4e7ec; --line-2: #d0d5dd; --hover: #f2f4f7; --sel: #eaf0fb;
  --brand: #20316d; --accent: #2b5cb8; --accent-ink: #ffffff; --accent-bg: #eaf0fb; --accent-hover: #234c99; --focus: rgba(43, 92, 184, .28);
  --ok: #157f3d; --okbg: #e6f4ea; --warn: #a15c00; --warnbg: #fdf1dc; --bad: #c0362c; --badbg: #fdeceb;
  --we: #eef1f5; --zebra: #eef1f5; --grid: rgba(29, 61, 99, .07); --grid-2: rgba(29, 61, 99, .035); --rowhover: rgba(43, 92, 184, .07); --rowsel: #fff3bf; --rowsel-line: #e8c547;
  /* colours of the Excel files: SD blue, MV gold, Midgard / costs orange, employees green, totals grey */
  --sd: #4472C4; --sd-h: #8FAADC; --sd-c: #DAE3F3; --mv: #FFC000; --mv-h: #FFD966; --mv-c: #FFF2CC;
  --mid: #ED7D31; --mid-h: #F4B183; --mid-c: #FBE5D6; --emp: #70AD47; --emp-h: #A9D08E; --emp-c: #E2EFDA;
  --gr-h: #D9D9D9; --gr-2: #e7e7e7; --fee: #002060;
  --st-fin: #e6f2e0; --st-fin-2: #d9ead0; --st-can: #fbe7e5; --st-stop: #fdeedb;
  --hol: #ffe0b3; --vac: #2e9d5b; --vac-pend: #9fd8b5; --sick: #c0504d; --tunis: #3b7dd8; --unav: #8a8f98; --na: #c9ced6;
  --short: #dbe5f1;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05); --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .08);
  --radius: 8px; --radius-lg: 12px; --side-w: 236px; --top-h: 56px;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1f27; --card: #242a33; --card-2: #2a303a; --side: #20252d; --ink: #e8ebf0; --ink-2: #c9cfd8; --muted: #9aa4b2;
  --line: #353c47; --line-2: #454e5b; --hover: #2d343e; --sel: #26344d;
  --brand: #c9d4f2; --accent: #7aa2f7; --accent-ink: #11151b; --accent-bg: #283655; --accent-hover: #93b4fa; --focus: rgba(122, 162, 247, .35);
  --ok: #5fd08a; --okbg: #1d3527; --warn: #f2b453; --warnbg: #3d3018; --bad: #f47f76; --badbg: #452523;
  --we: #2a2f38; --zebra: #2c323c; --rowhover: rgba(122, 162, 247, .09); --rowsel: #4a3e10; --rowsel-line: #a88a1c;
  --sd-h: #3b5a8f; --sd-c: #26324a; --mv-h: #75601e; --mv-c: #37311c; --mid-h: #855131; --mid-c: #3b2c23;
  --emp-h: #4d7236; --emp-c: #253421; --gr-h: #434b57; --gr-2: #353c47; --fee: #9fb4ff;
  --st-fin: #223326; --st-fin-2: #283b2c; --st-can: #3d2626; --st-stop: #3d3222;
  --hol: #57401f; --na: #3a414c; --short: #34425c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);
  --grid: rgba(255, 255, 255, .06); --grid-2: rgba(255, 255, 255, .025);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: var(--bg);
       font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased;
       background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px),
         linear-gradient(var(--grid-2) 1px, transparent 1px), linear-gradient(90deg, var(--grid-2) 1px, transparent 1px);
       background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; background-attachment: fixed; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 12px; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 10px; }
h3 { font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
b, strong, th { font-weight: 600; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
kbd { font: 500 11px 'Inter', system-ui, sans-serif; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; background: var(--card); }

/* ------------------------------------------------------------------ frame: side menu, top bar, content */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); border-right: 1px solid var(--line);
        display: flex; flex-direction: column; z-index: 120; }
.side-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.side-brand:hover { text-decoration: none; }
.side-brand .logo { display: block; height: 34px; width: auto; max-width: none; }
/* VD Engineering a bit smaller: its "VD" ends where the VD of VD Structure ends (same width) */
.side-brand .logo-vde { height: 29.5px; }
.side-brand .logo.text { font-weight: 600; color: var(--brand); }
[data-theme="dark"] .side-brand .logo, [data-theme="dark"] .loginlogos img { filter: brightness(0) invert(1); opacity: .92; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.side-group { margin-bottom: 14px; }
.side-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 6px 10px 4px; }
.side-nav a, .side-logout { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--ink-2);
                            font-weight: 500; font-size: 14px; position: relative; }
.side-nav a .ic, .side-logout .ic { color: var(--muted); }
.side-nav a:hover, .side-logout:hover { background: var(--hover); text-decoration: none; color: var(--ink); }
.side-nav a.on { background: var(--accent-bg); color: var(--accent); }
.side-nav a.on .ic { color: var(--accent); }
.side-nav a.on::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-more { border-top: 1px solid var(--line); padding-top: 10px; }
.newdot { width: 7px; height: 7px; border-radius: 50%; background: var(--mv); margin-left: auto; }
.side-foot { padding: 10px; border-top: 1px solid var(--line); }
.side-foot form { margin: 0; }
.side-logout { width: 100%; border: 0; background: none; font: inherit; font-weight: 500; cursor: pointer; text-align: left; }
.side-backdrop { display: none; }

.shell { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
body.no-user .shell { margin-left: 0; }
.topbar { position: sticky; top: 0; z-index: 100; height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 24px;
          background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar .grow { flex: 1; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: 8px;
           border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { background: var(--hover); text-decoration: none; }
.menubtn { display: none; }
.searchbtn { display: flex; align-items: center; gap: 8px; width: min(440px, 46vw); height: 36px; padding: 0 8px 0 10px; font: inherit; color: var(--muted);
             background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; text-align: left; box-shadow: var(--shadow); }
.searchbtn:hover { border-color: var(--muted); }
.searchbtn .ph { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mylink { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 20px; color: var(--ink); font-weight: 500; }
.mylink:hover, .mylink.on { background: var(--hover); text-decoration: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.avatar.initials { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent); font-size: 11px; font-weight: 600; }
.avatar.big { width: 72px; height: 72px; font-size: 20px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
main { padding: 24px 28px 48px; width: 100%; max-width: 1500px; margin: 0 auto; flex: 1; }
main.wide { max-width: none; }
.foot { display: flex; gap: 16px; justify-content: flex-end; padding: 10px 28px 18px; color: var(--muted); font-size: 12px; }
.foot span { margin-right: auto; }
.foot a { color: var(--muted); }
.viewas { background: var(--warnbg); color: var(--warn); padding: 8px 28px; }
.viewas form { margin-left: 10px; }

/* ------------------------------------------------------------------ basic elements */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px; border: 1px solid transparent; }
.flash.ok { background: var(--okbg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash.error { background: var(--badbg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.flash.warn { background: var(--warnbg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.flash.toast { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 400; box-shadow: var(--shadow-lg); max-width: 90vw; transition: opacity .6s; }
.flash.toast.gone { opacity: 0; pointer-events: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.narrow { max-width: 400px; margin: 60px auto; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.bar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.bar h1, .bar h2 { margin: 0; margin-right: auto; }
.bar-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
tr.muted td { color: var(--muted); }
.summary { margin: 4px 0 12px; }
.small { font-size: 12px; }
.nw { white-space: nowrap; }
.r { text-align: right !important; font-variant-numeric: tabular-nums; }
.neg { color: var(--bad); }
.warn { color: var(--bad); font-weight: 600; white-space: nowrap; }
b.pos { color: var(--ok); }
.scroll { overflow-x: auto; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 1px 8px; border-radius: 10px; background: var(--hover); color: var(--ink-2); border: 1px solid var(--line); }
a.tag:hover { text-decoration: none; border-color: var(--line-2); }
.tag.late { background: var(--badbg); color: var(--bad); border-color: transparent; }
.filterinfo { background: var(--warnbg); color: var(--warn); padding: 6px 10px; border-radius: var(--radius); display: inline-block; }

/* status badges (projects) */
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; line-height: 18px; padding: 1px 8px 1px 7px;
          border-radius: 10px; white-space: nowrap; background: var(--hover); color: var(--ink-2); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.s-in-progress { background: var(--accent-bg); color: var(--accent); }
.status.s-finished { background: var(--okbg); color: var(--ok); }
.status.s-stopped { background: var(--warnbg); color: var(--warn); }
.status.s-cancelled { background: var(--hover); color: var(--muted); }
.status.s-late { background: var(--badbg); color: var(--bad); }

/* forms */
label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--muted); font-weight: 500; }
label input, label select, label textarea { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); }
label.check input { width: auto; margin: 0; }
label.inline-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
label.inline-label input { margin: 0; width: auto; }
input, select, textarea { font: inherit; color: var(--ink); padding: 7px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card);
                          box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s; }
input[type=checkbox], input[type=radio] { box-shadow: none; accent-color: var(--accent); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus, button:focus-visible, .btn:focus-visible, a:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
input.bad { border-color: var(--bad); background: var(--badbg); }
button, .btn { font: inherit; font-weight: 500; padding: 7px 14px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2);
               cursor: pointer; display: inline-block; white-space: nowrap; box-shadow: var(--shadow); line-height: 1.4; }
.btn:hover, button:hover { text-decoration: none; background: var(--hover); color: var(--ink); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover, .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.on, .filters .btn.on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line-2)); }
.btn.danger:hover { background: var(--badbg); }
.btn.small { padding: 2px 8px; font-size: 12px; }
button.link { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; box-shadow: none; font-weight: 500; }
button.link:hover { background: none; text-decoration: underline; }
button.x { background: none; border: 0; color: var(--bad); cursor: pointer; padding: 0 4px; font-size: 13px; box-shadow: none; }
button.busy { opacity: .6; cursor: progress; }
form.inline { display: inline; margin: 0; }
.weeknav { display: flex; gap: 6px; align-items: center; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.rowform { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; }
.rowform label { margin: 0; }
.rowform.tight { margin: 0; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 18px; }
.grid2 .wide, .grid4 .wide { grid-column: 1 / -1; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.form { max-width: 900px; }
dl { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }
.toggle { display: flex; }
.toggle .btn { border-radius: 0; box-shadow: none; }
.toggle .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.toggle .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.toggle .btn + .btn { border-left: 0; }
.toggle .btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabs { display: flex; gap: 6px; }

/* ------------------------------------------------------------------ tables */
table.list { border-collapse: collapse; width: 100%; background: var(--card); }
table.list th, table.list td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list thead th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--card-2); position: sticky; top: 0; }
table.list tfoot th { border-top: 2px solid var(--line-2); }
table.list tbody tr { cursor: default; }
table.list tbody tr:hover td { background-image: linear-gradient(var(--rowhover), var(--rowhover)); }
table.list tbody tr.sel td { background: var(--rowsel) !important; box-shadow: inset 0 2px 0 var(--rowsel-line), inset 0 -2px 0 var(--rowsel-line); }
.card > table.list:first-child, .card > .scroll > table.list { background: transparent; }
tr.late td.due { color: var(--bad); font-weight: 600; }
td.due.soon { color: var(--warn); font-weight: 600; }
table.nowrap th, table.nowrap td { white-space: nowrap; }
.tablewrap { max-height: calc(100vh - 220px); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow); }
.tablewrap.short { max-height: 520px; }
.tablewrap table.list thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }
.est { color: var(--muted); background: var(--card-2); }
th.grp { text-align: center !important; border-bottom: 1px solid var(--line); }
th.grp.eng { background: var(--mv-c) !important; } th.grp.str { background: var(--sd-c) !important; }

/* projects / invoicing lists */
table.projects td, table.projects th { white-space: nowrap; }
table.projects td.cut { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
table.projects td.small { white-space: normal; min-width: 160px; max-width: 300px; }
table.projects td.small div { margin: 1px 0; }
table.projects td { padding-top: 5px; padding-bottom: 5px; }
table.projects tbody tr:nth-child(even) td { background-color: var(--zebra); }
table.projects tbody tr.st-finished td { background-color: var(--st-fin); }
table.projects tbody tr.st-finished:nth-child(even) td { background-color: var(--st-fin-2); }
table.projects tbody tr.st-cancelled td { background-color: var(--st-can); }
table.projects tbody tr.st-stopped td { background-color: var(--st-stop); }
table.projects form.rowform.tight { flex-wrap: nowrap; gap: 4px; margin: 0; }
table.projects form.rowform.tight input { width: auto; min-width: 0; padding: 2px 6px; height: 28px; }
table.projects form.rowform.tight input[type=date] { width: 136px; }
table.projects form.rowform.tight .btn, table.projects .btn.small { height: 28px; padding-top: 0; padding-bottom: 0; }
table.projects form.paidform input { height: 28px; padding-top: 2px; padding-bottom: 2px; }
/* the project number stays visible when the list is scrolled sideways; the cell keeps the colour of its row */
table.list.projects { border-collapse: separate; border-spacing: 0; }
table.projects tbody td:first-child { position: sticky; left: 0; z-index: 1; background-color: var(--card); box-shadow: inset -1px 0 0 var(--line); }
table.projects tbody tr:nth-child(even) td:first-child { background-color: var(--zebra); }
table.projects tbody tr.st-finished td:first-child { background-color: var(--st-fin); }
table.projects tbody tr.st-finished:nth-child(even) td:first-child { background-color: var(--st-fin-2); }
table.projects tbody tr.st-cancelled td:first-child { background-color: var(--st-can); }
table.projects tbody tr.st-stopped td:first-child { background-color: var(--st-stop); }
table.projects thead th:first-child { position: sticky; left: 0; z-index: 3; background: var(--card-2); }
table.projects td:first-child a { font-weight: 600; font-variant-numeric: tabular-nums; }
a.sort { color: inherit; } a.sort.on { color: var(--accent); }
a.flt { color: inherit; border-bottom: 1px dotted var(--muted); } a.flt:hover { color: var(--accent); text-decoration: none; }

/* zebra rows like in the Excel sheets */
table.zebra tbody tr:nth-child(even) td { background-color: var(--zebra); }
table.zebra.z-vde tbody tr:nth-child(even) td, table.zebra.z-mv tbody tr:nth-child(even) td { background-color: var(--mv-c); }
table.zebra.z-vds tbody tr:nth-child(even) td, table.zebra.z-sdcost tbody tr:nth-child(even) td,
table.zebra.z-sdpay tbody tr:nth-child(even) td, table.zebra.z-vdsin tbody tr:nth-child(even) td,
table.zebra.z-sd tbody tr:nth-child(even) td { background-color: var(--sd-c); }
table.zebra.z-mid tbody tr:nth-child(even) td { background-color: var(--mid-c); }
table.tint-sd thead th, table.tint-sd tfoot th { background: var(--sd-h) !important; color: var(--ink); }
table.tint-mv thead th, table.tint-mv tfoot th { background: var(--mv-h) !important; color: var(--ink); }
th.c-sd { background: var(--sd-h) !important; } td.c-sd { background-color: var(--sd-c); }
th.c-mv { background: var(--mv-h) !important; } td.c-mv { background-color: var(--mv-c); }
th.c-mid { background: var(--mid-h) !important; } td.c-mid { background-color: var(--mid-c); }
th.c-emp, th.c-ben { background: var(--emp-h) !important; } td.c-emp, td.c-ben { background-color: var(--emp-c); }
th.c-gr { background: var(--gr-h) !important; }
th.c-gr2, td.c-gr2 { background: var(--gr-2) !important; }
.who-sd { box-shadow: inset 4px 0 0 var(--sd); } .who-mv { box-shadow: inset 4px 0 0 var(--mv); } .who-emp { box-shadow: inset 4px 0 0 var(--emp); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-weight: 600; font-size: 12px; }
.badge.sd { background: var(--sd-c); color: var(--ink); border: 1px solid var(--sd-h); }
.badge.mv { background: var(--mv-c); color: var(--ink); border: 1px solid var(--mv-h); }
.badge.emp { background: var(--emp-c); color: var(--ink); border: 1px solid var(--emp-h); }
.badge.mid { background: var(--mid-c); color: var(--ink); border: 1px solid var(--mid-h); }
table.results thead tr.top th { text-align: center; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
table.cash td, table.cash th, table.results td, table.results th { white-space: nowrap; }
table.cash thead tr:first-child th { top: 0; } table.cash thead tr:nth-child(2) th { top: 33px; }
table.cash td.dash { color: var(--muted); text-align: right; }
table.cash a.cv { color: inherit; border-bottom: 1px dotted var(--muted); } table.cash a.cv:hover { color: var(--accent); text-decoration: none; }
table.cash tfoot tr.total th { border-top: 2px solid var(--brand); background: var(--card-2); font-weight: 700; white-space: nowrap; }
table.result-table { max-width: 820px; }
table.result-table tfoot th { border-top: 2px solid var(--brand); font-size: 15px; }
form.paidform { display: inline-flex; gap: 3px; align-items: center; margin: 0; }
form.paidform input[type=date] { width: 122px; padding: 2px 4px; font-size: 12px; }
form.duefrm input[type=date] { padding: 2px 6px; }
.splitbox { margin-top: 10px; }
table.split input.splitin { width: 90px; padding: 2px 6px; text-align: right; }
details.paymore { display: inline-block; }
details.paymore summary { cursor: pointer; display: inline-block; padding: 0 6px; color: var(--accent); font-weight: 700; }
details.paymore[open] { display: inline-flex; gap: 4px; align-items: center; }

/* ------------------------------------------------------------------ hours grid */
table.grid { border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
table.grid th, table.grid td { padding: 4px; border-bottom: 1px solid var(--line); text-align: center; }
table.grid thead th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 4px; }
table.grid .what { text-align: left; min-width: 330px; }
table.grid .what input { width: 100%; }
table.grid input.h { width: 58px; text-align: right; box-shadow: none; }
table.grid .note input { width: 180px; box-shadow: none; }
table.grid .we { background: var(--we); }
table.grid .sum { font-weight: 600; min-width: 56px; font-variant-numeric: tabular-nums; }
table.grid tfoot .totals th { font-size: 14px; padding: 8px 4px; }
table.grid tfoot .targets th { font-size: 12px; color: var(--muted); font-weight: 400; }
table.grid th.today, table.grid tfoot th.today { background: var(--accent-bg) !important; color: var(--accent); font-weight: 700; }
table.grid td.today { background: color-mix(in srgb, var(--accent-bg) 55%, var(--card)) !important; box-shadow: inset 1px 0 0 var(--sd-h), inset -1px 0 0 var(--sd-h); }
table.grid td.today input { background: var(--card); }
table.grid.month input.h { width: 40px; padding: 5px 3px; }
table.grid.month th, table.grid.month td { padding: 3px 2px; }
table.grid.month .what { min-width: 260px; position: sticky; left: 0; background: var(--card); z-index: 1; }
table.grid.month .note input { width: 140px; }
.daytot.ok { background: var(--okbg); color: var(--ok); }
.daytot.off { background: var(--warnbg); color: var(--warn); }
.daytot.over { background: var(--badbg); color: var(--bad); }
#grid .cost { color: var(--mid); white-space: nowrap; }
#grid tr.costs th { background: var(--mid-c); font-weight: 600; font-size: 12px; }

/* ------------------------------------------------------------------ dashboard, charts */
.kpis { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 16px; min-width: 190px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi b { font-size: 20px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); }
.kpi.total { border-color: var(--accent); background: var(--accent-bg); }
.dash-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(520px, 46%); gap: 16px; align-items: start; }
.dash-top .feespie { margin: 0; }
.dash-top .feespie h2 { font-size: 15px; }
@media (max-width: 1300px) { .dash-top { grid-template-columns: 1fr; } }
svg.chart { width: 100%; height: auto; }
svg.chart text.val { font-size: 10px; fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }
[data-theme="dark"] svg text[fill="#6b7680"] { fill: var(--muted); }
[data-theme="dark"] svg text[fill="#1f2933"], [data-theme="dark"] svg text[fill="#333"], [data-theme="dark"] svg text[fill="#000"] { fill: var(--ink); }
[data-theme="dark"] svg text[fill="#375623"] { fill: var(--ok); }
[data-theme="dark"] svg text[fill="#C00000"], [data-theme="dark"] svg text[fill="#c00000"] { fill: var(--bad); }
[data-theme="dark"] svg line[stroke="#eef1f5"], [data-theme="dark"] svg line[stroke="#e5e9ee"], [data-theme="dark"] svg line[stroke="#dde2e6"] { stroke: var(--line); }
[data-theme="dark"] svg line[stroke="#9aa5b1"], [data-theme="dark"] svg line[stroke="#888"] { stroke: var(--line-2); }
[data-theme="dark"] svg path[stroke="#fff"], [data-theme="dark"] svg circle[stroke="#fff"] { stroke: var(--card); }
.ovwrap { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
table.ov { width: auto; }
table.ov th { text-align: left; font-weight: 500; padding-right: 14px; white-space: nowrap; }
table.ov tr.sum th, table.ov tr.sum td { border-top: 2px solid var(--line-2); }
.pie { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 22px; }
.pie > svg { width: clamp(180px, 34%, 380px); height: auto; flex: none; }
.pie .legend.col { flex: 1 1 220px; max-width: 420px; }
.feespie .pie > svg { width: clamp(200px, 46%, 420px); }
.feespie .legend.col span { font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: var(--muted); }
.legend.col { flex-direction: column; align-items: flex-start; gap: 4px; }
.legend .sw, .sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-2); vertical-align: middle; margin-left: 6px; }
.legend.col .sw { margin-left: 0; margin-right: 6px; }
table.clients td.barcell { width: 55%; }
table.rank td.barcell { width: 35%; }
table.rank td.cut { max-width: 220px; }
.hbar { display: inline-block; height: 14px; border-radius: 4px; vertical-align: middle; }
#cltoggle a { cursor: pointer; }
.gauge { position: relative; width: 150px; height: 18px; border-radius: 9px; background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; }
.gauge i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--emp-h); }
.gauge.near i { background: #ffc04d; }
.gauge.over i { background: #f39a9a; }
.gauge span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 18px; color: #1f2a36; white-space: nowrap; font-weight: 500; }
[data-theme="dark"] .gauge i { background: #3f6b2c; } [data-theme="dark"] .gauge.near i { background: #8a6418; } [data-theme="dark"] .gauge.over i { background: #8c3030; }
[data-theme="dark"] .gauge span { color: var(--ink); }
.ratio { display: inline-block; padding: 1px 8px; border-radius: 10px; font-weight: 600; }
.ratio.good { background: var(--okbg); color: var(--ok); }
.ratio.bad { background: var(--badbg); color: var(--bad); }
.chartbox.mob { display: none; }
.hbars .hb-year { margin: 6px 0 12px; }
.hbars .hb-year b { display: block; font-size: 15px; margin-bottom: 4px; }
.hbars .hb-row { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.hbars .hb-bar { display: block; height: 14px; border-radius: 3px; min-width: 2px; flex: none; max-width: 62%; }
.hbars .hb-val { font-size: 14px; white-space: nowrap; }
[data-partial].loading { opacity: .55; transition: opacity .15s; }
table.weekgrid td.wk { width: 22px; min-width: 22px; text-align: center; font-size: 10.5px; padding: 3px 1px; }
table.weekgrid th.c { font-size: 10px; text-align: center; padding: 3px 1px; }
td.wk.ok { background: var(--emp-h); } td.wk.near { background: #FFE699; } td.wk.low { background: var(--mid-h); } td.wk.none { background: var(--we); }
[data-theme="dark"] td.wk.near { background: #6b5a1a; }

/* ------------------------------------------------------------------ vacation plan */
.vplanwrap { overflow-x: auto; }
table.vplan { border-collapse: collapse; margin: 0 0 14px; font-size: 11px; table-layout: fixed; }
table.vplan th, table.vplan td { width: 26px; min-width: 26px; height: 22px; text-align: center; border: 1px solid var(--line); padding: 0; }
table.vplan thead th { font-weight: 500; color: var(--muted); line-height: 1.15; height: 30px; }
table.vplan thead th.today { background: var(--brand); color: var(--card); }
table.vplan .who { width: 70px; min-width: 70px; text-align: left; padding: 0 6px; font-weight: 600; background: var(--card-2); }
.vplan .we, .sw.we { background: var(--we); }
.vplan .hol, .sw.hol { background: var(--hol); }
.vplan .vac, .sw.vac { background: var(--vac); }
.vplan .vac.half, .sw.vac.half { background: linear-gradient(135deg, var(--vac) 50%, var(--card) 50%); }
.vplan .pend, .sw.pend { background: repeating-linear-gradient(45deg, var(--vac-pend) 0 4px, var(--card) 4px 8px) !important; }
.vplan .sick, .sw.sick { background: var(--sick); }
.vplan .tunis, .sw.tunis { background: var(--tunis); }
.vplan .unav, .sw.unav { background: var(--unav); }
table.vyear { border-collapse: collapse; table-layout: fixed; font-size: 10px; width: 100%; background: var(--card); }
table.vyear th, table.vyear td { width: auto; min-width: 12px; height: 15px; padding: 0; border: 1px solid var(--line); text-align: center; }
table.vyear th.mon { font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--card-2); }
table.vyear th.pc { font-size: 8px; font-weight: 600; color: var(--muted); writing-mode: vertical-rl; transform: rotate(180deg); height: 26px; }
table.vyear th.dn { width: 26px; min-width: 26px; background: var(--card-2); color: var(--muted); font-weight: 500; }
table.vyear .first { border-left: 2px solid var(--line-2); }
table.vyear td.na { background: var(--na); }
table.vyear td.today { outline: 2px solid var(--accent); outline-offset: -2px; }
table.vyear .we { background: var(--we); } table.vyear .hol { background: var(--hol); }
table.vyear .vac { background: var(--vac); } table.vyear .vac.half { background: linear-gradient(135deg, var(--vac) 50%, var(--card) 50%); }
table.vyear .pend { background: repeating-linear-gradient(45deg, var(--vac-pend) 0 3px, var(--card) 3px 6px) !important; }
table.vyear .sick { background: var(--sick); } table.vyear .tunis { background: var(--tunis); } table.vyear .unav { background: var(--unav); }
table.vyear .sick.half { background: linear-gradient(135deg, var(--sick) 50%, var(--card) 50%); }
/* single-session days (summer hours, Ramadan) lightly hatched; a vacation on such a day stays visible */
table.vyear td.short:not(.vac):not(.pend):not(.sick):not(.tunis):not(.unav):not(.today),
.sw.short { background: repeating-linear-gradient(135deg, var(--short) 0 2px, var(--card) 2px 5px); }

/* ------------------------------------------------------------------ profile, people, receipts, help */
.profilehead { justify-content: flex-start; gap: 16px; }
.profilehead h1 { margin: 0; }
.logoprev { display: inline-flex; width: 160px; height: 44px; align-items: center; }
.logoprev img { max-height: 44px; max-width: 160px; }
.receipts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.receipt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; background: var(--card); font-size: 13px; }
.receipt img, .receipt .pdf { width: 72px; height: 96px; object-fit: cover; border-radius: 4px; background: var(--card-2); flex: none; }
.receipt .pdf { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--bad); font-size: 12px; }
.receipt.none { opacity: .6; }
.help { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
.help nav.toc { position: sticky; top: 76px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; font-size: 14px; }
.help nav.toc a { display: block; padding: 3px 0; }
.help .card h2 { display: flex; align-items: center; gap: 10px; }
.help .card h2 .where { font-size: 12px; font-weight: 400; color: var(--muted); }
.help ol { padding-left: 22px; margin: 6px 0; }
.help ol li { margin: 5px 0; line-height: 1.5; }
.help .tip { background: var(--accent-bg); border-left: 3px solid var(--accent); padding: 6px 10px; margin: 8px 0 0; font-size: 13.5px; }
.help .flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; font-size: 13px; }
.help .flow span { background: var(--card); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 8px; }
.help .flow i { color: var(--muted); font-style: normal; }
.help .sw { width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 0; }

/* what's new */
.changelog { max-width: 820px; }
.release-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.release .ver { font-weight: 600; font-size: 16px; }
.release ul { margin: 4px 0 0; padding-left: 20px; }
.release li { margin: 4px 0; }
.release.latest { border-color: var(--accent); }

/* history */
.hist { list-style: none; margin: 0; padding: 0; }
.hist-item { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hist-item:last-child { border-bottom: 0; }
.hist-meta { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.hist-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hist-changes { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; }
.hist-changes .k { color: var(--muted); margin-right: 5px; }
.hist-changes s { color: var(--muted); }
.badge-act { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 1px 7px; border-radius: 9px; }
.badge-act.insert { background: var(--okbg); color: var(--ok); }
.badge-act.update { background: var(--accent-bg); color: var(--accent); }
.badge-act.delete { background: var(--badbg); color: var(--bad); }

/* ------------------------------------------------------------------ side panel (drawer) and quick search */
body.drawer-open { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 300; }
.drawer-back, .palette-back { position: absolute; inset: 0; background: rgba(15, 20, 30, .38); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(820px, 94vw); background: var(--bg); box-shadow: var(--shadow-lg);
                display: flex; flex-direction: column; animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.drawer-title { font-weight: 600; margin-right: auto; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 20px 30px; }
.drawer-body.loading { opacity: .5; }
.drawer-body .cols { grid-template-columns: 1fr; }
.palette { position: fixed; inset: 0; z-index: 350; }
.palette-box { position: absolute; top: 12vh; left: 50%; transform: translateX(-50%); width: min(620px, 94vw); background: var(--card);
               border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { flex: 1; border: 0; box-shadow: none; padding: 4px 0; font-size: 16px; background: transparent; }
.palette-input input:focus { box-shadow: none; }
.palette-list { max-height: min(60vh, 460px); overflow-y: auto; padding: 6px; }
.palette-group { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px 4px; }
.palette-item { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.palette-item small { color: var(--muted); margin-left: auto; white-space: nowrap; }
.palette-item:hover, .palette-item.on { background: var(--accent-bg); text-decoration: none; }
.palette-item.on { color: var(--accent); }
.palette-empty { padding: 16px; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------ login */
body.no-user { background: var(--bg); }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-brand { background: #1f2a44; color: #e9edf5; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; position: relative; overflow: hidden; }
.login-brand::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(180deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%); }
.login-brand .loginlogos { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.login-brand .loginlogos img { filter: brightness(0) invert(1); height: auto; }
.login-brand .loginlogos img { height: 60px; width: auto; }
.login-brand .loginlogos img.logo-vde { height: 52px; }
.login-brand .login-name h2 { font-size: 40px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 6px; color: #fff; }
.login-brand .login-name small { color: #9eabc4; font-size: 12px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-form .box { width: min(380px, 100%); }
.login-form h1 { font-size: 24px; margin-bottom: 4px; }
.login-form .sub { color: var(--muted); margin: 0 0 24px; }
.login-form label { margin-bottom: 14px; }
.login-form input { padding: 10px 12px; }
.login-form button.primary { width: 100%; padding: 10px; margin-top: 6px; }
.login-form .flash { margin-bottom: 16px; }
.login-foot { margin-top: 28px; font-size: 12px; color: var(--muted); }
.loginlogos { display: flex; gap: 16px; align-items: center; justify-content: center; margin-bottom: 8px; }
.loginlogos img { max-height: 56px; max-width: 45%; }
body.no-user main { padding: 0; max-width: none; }
body.no-user main > .card.narrow { margin: 60px auto; }

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 1100px) {
  .side { transform: translateX(-102%); transition: transform .2s ease; box-shadow: none; }
  body.menu-open .side { transform: none; box-shadow: var(--shadow-lg); }
  body.menu-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 20, 30, .38); z-index: 110; }
  .shell { margin-left: 0; }
  .menubtn { display: inline-flex; }
  .topbar { padding: 0 12px; }
  .mylink .name { display: none; }
  main { padding: 18px 16px 40px; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-form { align-items: flex-start; }
  .login-brand { padding: 28px 24px; }
  .login-brand .loginlogos { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .login-brand .loginlogos img { height: 34px; }
  .login-brand .loginlogos img.logo-vde { height: 29.5px; }
  .login-brand .login-name { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  main { padding: 12px 10px 40px; }
  h1 { font-size: 20px; }
  .card { padding: 12px 12px; }
  .searchbtn { width: auto; flex: 1; }
  .searchbtn kbd { display: none; }
  .foot { padding: 8px 12px 16px; }
  .card, .tablewrap, .scroll, .vplanwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tablewrap { max-height: none; }
  table.list { font-size: 13px; }
  .kpi { min-width: 0; flex: 1 1 150px; }
  .kpis { gap: 8px; }
  .bar { gap: 8px; }
  .bar h1, .bar h2 { width: 100%; }
  .filters input, .filters select { flex: 1 1 140px; min-width: 0; }
  .rowform label { flex: 1 1 140px; }
  .rowform input, .rowform select, .rowform textarea { width: 100%; }
  input, select, textarea, .btn, button { font-size: 16px; }   /* no automatic zoom on iPhone */
  .btn, button.primary { min-height: 38px; }
  .toggle .btn { padding-left: 10px; padding-right: 10px; }
  .dash-top { grid-template-columns: 1fr; }
  .pie > svg, .feespie .pie > svg { width: min(78vw, 320px); }
  table.grid .what { min-width: 150px; max-width: 170px; position: sticky; left: 0; z-index: 1; background: var(--card); }
  table.grid input.h { width: 46px; padding: 6px 3px; }
  table.grid th.note, table.grid td.note { min-width: 120px; }
  table.vyear { width: auto; min-width: 1100px; }
  table.vyear th.dn { position: sticky; left: 0; z-index: 1; }
  .help { grid-template-columns: 1fr; }
  .help nav.toc { position: static; }
  .gauge { width: 120px; }
  table.weekgrid td.wk { min-width: 24px; }
  .receipts { grid-template-columns: 1fr; }
  .login-card, .card.narrow { margin: 24px auto; }
  .chartbox.desk { display: none; }
  .chartbox.mob { display: block; }
  #money svg.chart, svg.chart[aria-label="Profit by month of work"] { min-width: 560px; }
  #money .cols > div, .card:has(svg[aria-label="Profit by month of work"]) { overflow-x: auto; }
  .hist-item { grid-template-columns: 1fr; gap: 4px; }
  dl { grid-template-columns: 130px 1fr; }
  .drawer-panel { width: 100vw; }
  .drawer-body { padding: 12px 12px 30px; }
}
@media (max-width: 900px) { .help { grid-template-columns: 1fr; } .help nav.toc { position: static; } }
/* phone or tablet held sideways (low screen): the lists are not squeezed into a tiny scrolling box */
@media (max-height: 600px) {
  .tablewrap { max-height: none; }
  .topbar { position: static; }
}
@media print {
  .side, .topbar, .foot, .side-backdrop { display: none !important; }
  .shell { margin: 0; }
  .card, .tablewrap { box-shadow: none; }
}
@media (max-width: 760px) { .searchbtn { flex: 1 1 auto; min-width: 0; } .topbar { gap: 6px; } }
/* dark display: the dark navy of the Excel charts (fees, money in) becomes a lighter blue */
[data-theme="dark"] svg [fill="#002060"], [data-theme="dark"] svg [fill="#1F3864"], [data-theme="dark"] svg [fill="#1f3864"] { fill: #5f7fd6; }
[data-theme="dark"] [style*="background:#002060"], [data-theme="dark"] [style*="background: #002060"] { background: #5f7fd6 !important; }
table.rank td.cut, table.clients td.cut { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

/* pies: bigger circle; the legend can go under it when the card is narrow */
#money .pie > svg, .cols .card .pie > svg { width: clamp(220px, 50%, 340px); }
#money .pie .legend.col { flex: 1 1 170px; }
.legend.col .two { display: inline-flex; align-items: flex-start; gap: 0; line-height: 1.35; }
.legend.col .two small { display: block; color: var(--muted); }
table.zebra.z-emp tbody tr:nth-child(even) td { background-color: var(--emp-c); }
table.tint-emp thead th, table.tint-emp tfoot th { background: var(--emp-h) !important; color: var(--ink); }
.login-form h1 { margin-bottom: 20px; }
.side-nav .count { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff;
                    font: 600 11px/18px 'Inter', sans-serif; text-align: center; font-style: normal; }
/* company pages */
.company-logo { height: 54px; width: auto; }
[data-theme="dark"] .company-logo { filter: brightness(0) invert(1); opacity: .92; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
iframe.map { width: 100%; height: 360px; border: 0; border-radius: var(--radius); }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.member { display: flex; gap: 12px; align-items: center; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
details.card > summary { cursor: pointer; }
.side-brand { flex-direction: column; }
.side-brand a { display: block; border-radius: 6px; padding: 2px; }
.side-brand a:hover { background: var(--hover); }
/* side menu in the night blue of the log-in page (both displays), logos in white */
.side { background: #1f2a44; border-right-color: #1a2339; color: #dfe5f0; }
[data-theme="dark"] .side { background: #151c2e; border-right-color: #10162a; }
.side-brand { border-bottom-color: rgba(255, 255, 255, .1); }
.side-brand .logo { filter: brightness(0) invert(1); opacity: .95; }
.side-brand a:hover { background: rgba(255, 255, 255, .07); }
.side-label { color: #8e9bb6; }
.side-nav a, .side-logout { color: #d3dae7; }
.side-nav a .ic, .side-logout .ic { color: #8e9bb6; }
.side-nav a:hover, .side-logout:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav a.on { background: rgba(255, 255, 255, .12); color: #fff; }
.side-nav a.on .ic { color: #9cc0ff; }
.side-nav a.on::before { background: #FFC000; }
.side-more, .side-foot { border-top-color: rgba(255, 255, 255, .1); }
/* labels of the facts on one line (Partner payments: "Earned (hours × salary rate)"): same spacing between the sums */
dl { grid-template-columns: minmax(150px, max-content) 1fr; column-gap: 24px; }
dt { white-space: nowrap; }
dd { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { dl { grid-template-columns: 1fr; row-gap: 0; } dt { white-space: normal; margin-top: 6px; } }
.phases { font-size: 10.5px; font-weight: 600; color: var(--accent); background: var(--accent-bg); border-radius: 6px; padding: 0 5px; letter-spacing: .08em; }
.reminders { border-left: 4px solid var(--warn); }
.reminders ul { margin: 0; padding-left: 18px; }
.reminders li { margin: 4px 0; }
/* Projects: fee (night blue) and profit (green) stand out: tinted, framed, a bit bolder */
:root { --fee-c: rgba(0, 32, 96, .055); --fee-line: rgba(0, 32, 96, .28); --fee-ink: #0b2a6b; --ben-c: rgba(112, 173, 71, .12); --ben-line: rgba(84, 130, 53, .45); --ben-ink: #2f5a1a; }
[data-theme="dark"] { --fee-c: rgba(127, 160, 240, .09); --fee-line: rgba(127, 160, 240, .4); --fee-ink: #b9cbff; --ben-c: rgba(112, 173, 71, .14); --ben-line: rgba(140, 200, 100, .45); --ben-ink: #a9dc8c; }
table.list td.col-fee, table.list td.col-profit { font-weight: 600; background-image: linear-gradient(var(--fee-c), var(--fee-c)); color: var(--fee-ink); }
table.list td.col-profit { background-image: linear-gradient(var(--ben-c), var(--ben-c)); color: var(--ben-ink); }
table.list td.col-profit.neg { color: var(--bad); }
table.list th.col-fee { color: var(--fee-ink); } table.list th.col-profit { color: var(--ben-ink); }
table.list .col-fee.first { box-shadow: inset 1px 0 0 var(--fee-line); } table.list .col-fee.last { box-shadow: inset -1px 0 0 var(--fee-line); }
table.list .col-profit.first { box-shadow: inset 1px 0 0 var(--ben-line); } table.list .col-profit.last { box-shadow: inset -1px 0 0 var(--ben-line); }
table.projects tbody tr:hover td.col-fee, table.projects tbody tr:hover td.col-profit { background-image: linear-gradient(var(--rowhover), var(--rowhover)); }

/* ---------------------------------------------------------------- 0.36 */
/* log-in: both logos at their exact size (no max-height), divider further left, sketch grid on the right */
.login-brand .loginlogos img { max-height: none; max-width: none; }
.login { grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); }
.login-form { background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-2) 1px, transparent 1px), linear-gradient(90deg, var(--grid-2) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; }
.login-form .box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px 28px 22px; box-shadow: var(--shadow-lg); }
/* side menu: same night blue with the light grid of the log-in page */
.side { background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
        background-size: 48px 48px; }
/* History, Help, What's new at the bottom, just above Log out */
.side-nav { display: flex; flex-direction: column; }
.side-more { margin-top: auto; margin-bottom: 0; }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.dots i.on { background: var(--mid); }
/* costs columns in red, like the costs in the Excel; a loss in a red bubble */
:root { --cost-c: rgba(192, 0, 0, .05); --cost-line: rgba(192, 0, 0, .28); --cost-ink: #9c2222; }
[data-theme="dark"] { --cost-c: rgba(244, 127, 118, .08); --cost-line: rgba(244, 127, 118, .4); --cost-ink: #f4a39c; }
table.list td.col-cost { font-weight: 600; background-image: linear-gradient(var(--cost-c), var(--cost-c)); color: var(--cost-ink); }
table.list th.col-cost { color: var(--cost-ink); }
table.list .col-cost.first { box-shadow: inset 1px 0 0 var(--cost-line); } table.list .col-cost.last { box-shadow: inset -1px 0 0 var(--cost-line); }
table.projects tbody tr:hover td.col-cost { background-image: linear-gradient(var(--rowhover), var(--rowhover)); }
.negb { display: inline-block; padding: 0 7px; border-radius: 10px; background: var(--badbg); color: var(--bad); font-weight: 600; }
/* phones held upright: Projects and Invoicing scroll inside their box, so the titles stay visible */
@media (max-width: 760px) and (min-height: 601px) { .tablewrap { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); } }
/* columns that can be hidden */
.colbar { display: flex; justify-content: flex-end; margin: -6px 0 6px; position: relative; }
.colmenu { position: absolute; right: 0; top: 34px; z-index: 50; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px;
           box-shadow: var(--shadow-lg); padding: 8px 12px; max-height: 60vh; overflow: auto; min-width: 220px; }
.colmenu label { display: flex; gap: 8px; align-items: center; margin: 4px 0; color: var(--ink); font-weight: 400; }
.colmenu label input { width: auto; margin: 0; }
.colmenu .muted { font-size: 12px; margin-top: 6px; }
/* phases of a project shown under its row */
.phases { cursor: pointer; }
.phases:hover { background: var(--accent); color: var(--accent-ink); }
tr.phase-row > td { background: var(--accent-bg) !important; padding: 6px 10px 10px 34px; }
tr.phase-row table { width: auto; background: var(--card); border-radius: 6px; }
tr.phase-row table th, tr.phase-row table td { padding: 4px 10px; position: static !important; box-shadow: none !important; background: none !important; }
table.sortable thead th { cursor: pointer; user-select: none; }
table.sortable thead th:hover { color: var(--accent); }
table.sortable thead th.asc::after { content: ' ▲'; font-size: 10px; } table.sortable thead th.desc::after { content: ' ▼'; font-size: 10px; }
table.list .col-fee.first.last { box-shadow: inset 1px 0 0 var(--fee-line), inset -1px 0 0 var(--fee-line); }
table.list .col-cost.first.last { box-shadow: inset 1px 0 0 var(--cost-line), inset -1px 0 0 var(--cost-line); }
table.list .col-profit.first.last { box-shadow: inset 1px 0 0 var(--ben-line), inset -1px 0 0 var(--ben-line); }
.pbar { display: inline-block; width: 70px; height: 8px; border-radius: 4px; background: var(--hover); vertical-align: middle; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--emp); border-radius: 4px; }
.pbar.neg i { background: var(--bad); }
/* My Hours: Saturday and Sunday clearly grey */
table.grid .we, table.grid th.we, table.grid td.we { background: var(--we-strong) !important; }
:root { --we-strong: #dfe4eb; } [data-theme="dark"] { --we-strong: #363d49; }
table.grid td.we input { background: rgba(255, 255, 255, .45); } [data-theme="dark"] table.grid td.we input { background: rgba(0, 0, 0, .15); }
.flash.warn { white-space: normal; font-weight: 400; color: var(--warn); }

/* ---------------------------------------------------------------- 0.37 */
/* one grid for the whole page, fixed to the window: 2 squares on the night blue (50 px) = 1 large square on the
   right (100 px) = 5 small squares (20 px); the lines continue from one side to the other */
:root { --side-w: 250px; --navy-grid: rgba(255, 255, 255, .06); --navy-grid-2: rgba(255, 255, 255, .025); }
.side, .login-brand::after { background-image: linear-gradient(var(--navy-grid) 1px, transparent 1px), linear-gradient(90deg, var(--navy-grid) 1px, transparent 1px);
  background-size: 50px 50px; background-attachment: fixed; background-position: 0 0; }
.login-form { background-attachment: fixed; background-position: 0 0; }
/* log-in: the night blue is exactly as wide as needed for the logos to be in the middle; its edge is a large grid line */
.login { grid-template-columns: 400px minmax(0, 1fr); }
.login-brand { padding: 100px 0 0; align-items: center; justify-content: flex-start; }
.login-brand .loginlogos { align-items: center; gap: 30px; }
.login-brand::after { mask-image: none; -webkit-mask-image: none; }
.login-brand .login-name { position: absolute; left: 0; right: 0; text-align: center; }
.login-brand .login-name h2 { margin: 0; }
.login-brand .login-name small { display: block; margin-top: 12px; line-height: 18px; }
@media (max-width: 760px) { .login { grid-template-columns: 1fr; } .login-brand { padding: 28px 24px; } .login-brand .login-name { position: static; } }
/* side menu: separator lines of the same length, thicker than the grid; each group in a frame with round corners */
.side-brand { border-bottom: 0; position: relative; padding-bottom: 16px; }
.side-foot { border-top: 0; position: relative; }
.side-brand::after, .side-foot::before { content: ''; position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .28); }
.side-brand::after { bottom: 0; } .side-foot::before { top: 0; }
.side-nav { padding: 12px 12px 12px; }
.side-group { border: 1.5px solid rgba(255, 255, 255, .2); border-radius: 11px; padding: 4px 5px 5px; margin-bottom: 10px; background: rgba(15, 22, 40, .35); }
.side-more { border-top: 1.5px solid rgba(255, 255, 255, .2); padding-top: 4px; margin-bottom: 0; }
.side-nav a.on::before { left: -6px; }
/* a switch between two views (Invoicing: who invoices whom; Offers / Pricing help): not a filter */
.seg { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 14px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); flex-wrap: wrap; }
.seg a { padding: 7px 14px; border-radius: 9px; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; }
.seg a b { font-weight: 600; }
.seg a:hover { background: var(--hover); text-decoration: none; }
.seg a.on { background: #1f2a44; color: #fff; box-shadow: inset 0 -3px 0 #FFC000; }
[data-theme="dark"] .seg a.on { background: #33415f; }
/* a project and its phases: one line (combined) or one line per phase */
button.phases { border: 0; font: inherit; font-size: 10.5px; font-weight: 600; line-height: 1.6; }
.phasetag { display: inline-block; font-size: 10.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 4px; line-height: 1.4; }
table.combinable:not(.combined) tr.ph-sum { display: none; }
table.combinable.combined tr.ph-part { display: none; }
table.combinable.combined tr.ph-part.open { display: table-row; }
table.combinable.combined tr.ph-part.open > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.combinable tr.ph-part[data-grp] td:first-child { white-space: nowrap; }
table.combinable:not(.combined) tr.ph-part td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.combinable:not(.combined) button.phases { pointer-events: none; }
[data-combine].on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
tr.hl > td { background: var(--accent-bg); }
/* offers */
.badge.of-open { background: var(--accent-bg); color: var(--accent); }
.badge.of-accepted { background: var(--okbg); color: var(--ok); }
.badge.of-refused { background: var(--badbg); color: var(--bad); }
tr.of-refused td { color: var(--muted); }
.btn.ok { border-color: var(--ok); color: var(--ok); }
.actions-cell form { display: inline-flex; gap: 6px; align-items: center; }
.side-brand { padding: 14px 18px 12px; gap: 8px; }
.side-nav { padding: 10px 12px 8px; }
.side-group { margin-bottom: 8px; padding: 2px 5px 4px; }
.side-label { padding: 5px 10px 2px; }
.side-nav a, .side-logout { padding: 5px 10px; }
.side-nav a.on::before { top: 6px; bottom: 6px; }
.side-foot { padding: 8px 10px; }
@media (max-height: 820px) { .side-nav a, .side-logout { padding: 4px 10px; } .side-label { padding: 3px 10px 1px; } .side-group { margin-bottom: 6px; } }
/* 0.37b: version under "Planning", aligned left; bigger logos in the menu (same space left and right) */
.login-brand .login-name { left: 50%; right: auto; transform: translateX(-50%); text-align: left; width: max-content; }
.side-brand .logo { height: 47.8px; }
.side-brand .logo-vde { height: 41.5px; }
/* 0.39: the same visual codes as the side menu. Main buttons in its night blue; in a group of buttons (tabs,
   toggles) the chosen one has the colour of the inside of the menu frames, the others a muted text like WORK… */
:root { --navy: #1f2a44; --navy-in: #19233a; --navy-hover: #2b3858; }
[data-theme="dark"] { --navy: #33415f; --navy-in: #3d4c70; --navy-hover: #45557c; }
button.primary, .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); color: #fff; }
.tabs .btn, .toggle .btn { color: var(--muted); }
.tabs .btn:hover, .toggle .btn:hover { color: var(--ink); }
.tabs .btn.primary, .toggle .btn.on, .tabs .btn.on { background: var(--navy-in); border-color: var(--navy-in); color: #fff; }
.tabs .btn.primary:hover, .toggle .btn.on:hover { background: var(--navy-hover); color: #fff; }
[data-combine].on { background: var(--navy-in); border-color: var(--navy-in); color: #fff; }
button.phases, .phases { background: var(--navy-in); color: #fff; }
.phases:hover { background: var(--navy-hover); color: #fff; }
/* log-in: the grid fades out towards the top again */
.login-brand::after { mask-image: linear-gradient(180deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%); }
.sumcell { cursor: help; border-bottom: 1px dotted var(--muted); }
.btn.on, .filters .btn.on { background: var(--navy-in); border-color: var(--navy-in); color: #fff; }
.exgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 10px 0; }
.exgrid fieldset { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px 10px; margin: 0; }
.exgrid legend { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 6px; }
.exgrid label { margin-bottom: 8px; }
/* log-in: "Planning" thinner than "Log in" */
.login-brand .login-name h2 { font-weight: 400; letter-spacing: -.01em; }
#salaries { margin-top: 18px; }
/* 0.41: buttons in the night blue of the side menu, a bit lighter so that they look the same as the menu (a small dark
   surface on white looks darker than the large menu with its grid) */
:root { --navy: #2b3858; --navy-in: #2b3858; --navy-hover: #364568; }
[data-theme="dark"] { --navy: #3a4a6e; --navy-in: #3a4a6e; --navy-hover: #46588a; }
.login-brand { padding-top: 50px; }
.formttl { align-self: center; margin-right: 6px; }
/* 0.42 */
[data-theme="dark"] .side { background-color: #151c2e; background-image: linear-gradient(var(--navy-grid) 1px, transparent 1px), linear-gradient(90deg, var(--navy-grid) 1px, transparent 1px); background-size: 50px 50px; background-attachment: fixed; }
table.caltable td { padding: 4px 8px; vertical-align: middle; }
table.caltable input { width: 100%; }
table.caltable td:nth-child(3) input { width: 70px; }
:root { --navy: #3a4a70; --navy-in: #3a4a70; --navy-hover: #46587f; }
[data-theme="dark"] { --navy: #3a4a6e; --navy-in: #3a4a6e; --navy-hover: #46588a; }
.sdtabs { margin: -4px 0 14px; justify-content: flex-end; }
.tabs .btn.primary.yellow { background: #FFC000; border-color: #FFC000; color: #1a2230; }
.bar .toggle.bar-tools { margin-left: auto; }
/* deadlines */
.daysleft { display: inline-block; padding: 0 8px; border-radius: 10px; background: var(--okbg); color: var(--ok); font-weight: 600; font-size: 12.5px; }
.daysleft.soon { background: var(--warnbg); color: var(--warn); }
.daysleft.late { background: var(--badbg); color: var(--bad); }
.dlcal { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 14px; }
.dlmonth h3 { margin-top: 0; }
.dlhead { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 11px; color: var(--muted); font-weight: 600; text-align: center; margin-bottom: 2px; }
.dlweek { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 1px; border-top: 1px solid var(--line); }
.dlday { border-left: 1px solid var(--line); padding: 1px 4px; }
.dlday:last-child, .dlweek .dlday:nth-child(7) { border-right: 1px solid var(--line); }
.dlday.out { background: var(--card-2); } .dlday.out .dn { opacity: .35; }
.dlday.we { background: var(--we); }
.dlday.today { box-shadow: inset 0 0 0 2px var(--navy); }
.dlday .dn { font-size: 11px; color: var(--muted); }
.dlmonth .dlweek:last-child { border-bottom: 1px solid var(--line); }
.dlbar { position: relative; z-index: 1; margin: 0 -1px; height: 100%; line-height: 1.3; font-size: 10.5px; color: #fff; overflow: hidden; display: flex; align-items: center;
         white-space: nowrap; padding: 0 5px; text-shadow: 0 0 3px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .9); }
.dlbar.rs { border-top-left-radius: 8px; border-bottom-left-radius: 8px; margin-left: 3px; }
.dlbar.re { border-top-right-radius: 8px; border-bottom-right-radius: 8px; margin-right: 3px; }
.dlbar.late { background: #c0362c; }
.dlbar:hover { text-decoration: none; filter: brightness(1.08); }
.dlk { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 7px; border-radius: 9px; text-transform: uppercase; }
.dlk.near { background: var(--warnbg); color: var(--warn); } .dlk.many { background: var(--badbg); color: var(--bad); }
table.deadlines .gauge { width: 90px; }
table.deadlines td.cut { max-width: 130px; } table.deadlines th, table.deadlines td { padding-left: 7px; padding-right: 7px; }
/* 0.46: top bar in the night blue of the side menu, with the same grid fixed to the window: its vertical lines
   continue those of the page (50 px = half a large square of the page); its height is one square */
:root { --top-h: 50px; }
.topbar { background-color: #1f2a44; border-bottom: 1px solid #1a2339; color: #dfe5f0;
  background-image: linear-gradient(var(--navy-grid) 1px, transparent 1px), linear-gradient(90deg, var(--navy-grid) 1px, transparent 1px);
  background-size: 50px 50px; background-attachment: fixed; background-position: 0 0; }
[data-theme="dark"] .topbar { background-color: #151c2e; border-bottom-color: #10162a; }
.topbar .iconbtn { color: #d3dae7; }
.topbar .iconbtn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.topbar .searchbtn { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .18); color: #aeb8cc; box-shadow: none; }
.topbar .searchbtn:hover { border-color: rgba(255, 255, 255, .4); }
.topbar .searchbtn kbd { background: transparent; color: #aeb8cc; border-color: rgba(255, 255, 255, .25); }
.topbar .mylink { color: #fff; }
.topbar .mylink:hover, .topbar .mylink.on { background: rgba(255, 255, 255, .08); }
.topbar .avatar.initials { background: rgba(255, 255, 255, .15); color: #fff; }
/* workload */
.wlbarh { width: 34%; }
.wlbar { position: relative; height: 18px; border-radius: 9px; background: var(--hover); overflow: hidden; }
.wlbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; opacity: .85; }
.wlbar span { position: relative; font-size: 11.5px; padding-left: 8px; font-weight: 600; }
.wlcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(820px, 1fr)); gap: 14px; margin-top: 14px; }
.wlcards .card { min-width: 0; overflow-x: auto; }
.wlcards table td.cut { max-width: 220px; }
/* monthly report */
table.list th.sub { text-align: left; background: var(--card-2); font-size: 12px; color: var(--muted); }
.printonly { display: none; }
@media print {
  .noprint { display: none !important; }
  .printonly { display: block; }
  main.report .card, main.report .kpi { break-inside: avoid; box-shadow: none; }
  main.report .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  body { background: #fff !important; }
}

/* printing: tables fit the page, no scroll bars */
@media print {
  .tablewrap, .scroll, .card { overflow: visible !important; max-height: none !important; }
  table.list { width: 100% !important; font-size: 10.5px; }
  table.list td, table.list th { white-space: normal !important; padding: 3px 5px; }
  table.list td.cut { max-width: none !important; overflow: visible; text-overflow: clip; }
  main.report .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  main.report .ccy { display: none; }
}
/* fields changed directly on the project page */
dl.editable dd { margin-bottom: 2px; }
.infield input:not([type=checkbox]):not([type=hidden]), .infield select { border-color: transparent; background: transparent; padding: 3px 6px; margin-left: -7px; box-shadow: none; font: inherit; }
.infield input:not([type=checkbox]):hover, .infield select:hover { border-color: var(--line-2); background: var(--card); }
.infield input:focus, .infield select:focus { border-color: var(--accent); background: var(--card); }
.infield .check { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.posb { display: inline-block; padding: 0 7px; border-radius: 10px; background: var(--okbg, #e3f4e6); color: var(--ok, #1d7a35); font-weight: 600; }
table.tint-mid thead th, table.tint-mid tfoot th { background: var(--mid-h) !important; color: var(--ink); }
table.moneyout tr.g-vde td { background-color: var(--mv-c); } table.moneyout tr.g-vds td { background-color: var(--sd-c); }
table.moneyout th.sub { text-align: left; }
table.projects form.rowform.tight .phsel { flex: none; width: 52px; height: 28px; padding: 0 4px; box-sizing: border-box; }
span.phsel { display: inline-block; }
[hidden] { display: none !important; }
#t_phases input.ph_pct, #t_prof input.pr_pct { width: 56px; min-width: 0; padding: 2px 6px; height: 28px; text-align: right; }
#t_phases td, #t_prof td { vertical-align: middle; }
#t_phases tr.muted td { color: var(--muted); }

.minicharts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.minichart svg { width: 100%; height: auto; display: block; }
.minichart .bar { margin: 0 0 4px; }
table.flowsum { table-layout: fixed; margin-left: 60px; width: calc(100% - 70px); }
table.flowsum td { padding: 2px; font-size: 11px; }
