/* addui-time-27 1793355236-3889: generated by design-system/build.py from tokens.json and bundle.css. Do not edit by hand. */
:root, [data-theme="light"] {
  --ground: #f3f4f6;
  --sheet: #ffffff;
  --wash: #e9ecef;
  --hover: #eef7fc;
  --rule: #e1e4e8;
  --rule-strong: #868c94;
  --edge: #14171a;
  --ink: #14171a;
  --on-ink: #ffffff;
  --ink-soft: #555b63;
  --ink-faint: #a1a7af;
  --accent: #d42a1c;
  --on-accent: #ffffff;
  --accent-strong: #a51f14;
  --accent-wash: #fbeae8;
  --blue: #0072bc;
  --on-blue: #ffffff;
  --cyan: #00a0e3;
  --blue-wash: #e5f2fa;
  --ok: #2e7350;
  --ok-wash: #e8f0eb;
  --warn: #946100;
  --warn-wash: #f6efdf;
  --scrim: rgba(243,242,239,0.88);
}
[data-theme="dark"] {
  --ground: #0e1013;
  --sheet: #171a1e;
  --wash: #22262c;
  --hover: #142430;
  --rule: #2a2f36;
  --rule-strong: #6d747e;
  --edge: #8a919b;
  --ink: #eef0f3;
  --on-ink: #14171a;
  --ink-soft: #a7aeb7;
  --ink-faint: #5c636c;
  --accent: #ff5d4f;
  --on-accent: #1a0302;
  --accent-strong: #ff8379;
  --accent-wash: #3a1714;
  --blue: #5bb6f0;
  --on-blue: #0b1620;
  --cyan: #2ab4ef;
  --blue-wash: #10283a;
  --ok: #74c294;
  --ok-wash: #162a1f;
  --warn: #e0b05a;
  --warn-wash: #2e2614;
  --scrim: rgba(10,10,9,0.74);
}
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --nav-w: 208px;
  --drawer-w: 288px;
  --topbar-h: 64px;
  --topbar-wide-h: 56px;
  --control-h: 32px;
  --control-h-touch: 44px;
  --row-h: 40px;
  --row-h-touch: 48px;
  --bp-compact: 760px;
  --bp-wide-auto: 1100px;
  --font-sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/HankenGrotesk-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* addui-time-27 · icons: 2px square-cap strokes on a 24px grid, as data-URI masks that take the text colour (unchanged from AddUI27) */
:root {
  --i-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M4 7h16M4 12h16M4 17h10'/%3E%3C/svg%3E");
  --i-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
  --i-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M14.5 5.5L8 12l6.5 6.5'/%3E%3C/svg%3E");
  --i-next: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M9.5 5.5L16 12l-6.5 6.5'/%3E%3C/svg%3E");
  --i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Ccircle cx='10.5' cy='10.5' r='5.5'/%3E%3Cpath d='M15 15l4.5 4.5'/%3E%3C/svg%3E");
  --i-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --i-edit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M5 19h3.5L18 9.5 14.5 6 5 15.5V19z'/%3E%3C/svg%3E");
  --i-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M5 7h14M10 7V5h4v2M7 7l1 12h8l1-12'/%3E%3C/svg%3E");
  --i-settings: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M5 8h8M17 8h2M5 16h2M11 16h8'/%3E%3Cpath d='M13 6h4v4h-4zM7 14h4v4H7z'/%3E%3C/svg%3E");
  --i-logout: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M13 5h5v14h-5M10 8.5L6.5 12l3.5 3.5M6.5 12H16'/%3E%3C/svg%3E");
  --i-print: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M7 9V5h10v4M7 16H5v-7h14v7h-2'/%3E%3Cpath d='M7 13h10v6H7z'/%3E%3C/svg%3E");
  --i-attachment: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M9 12.5l5.5-5.5a2.8 2.8 0 0 1 4 4L11 18.5a4.6 4.6 0 0 1-6.5-6.5L11 5.5'/%3E%3C/svg%3E");
  --i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='M12 11v5.5M12 7.5v1.5'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='M8.5 12.2l2.4 2.4 4.6-5'/%3E%3C/svg%3E");
  --i-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='M12 7.5v5.5M12 15.5V17'/%3E%3C/svg%3E");
  --i-eye-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M4 4l16 16M10.5 6.2A8.6 8.6 0 0 1 12 6c4.6 0 8 6 8 6a14 14 0 0 1-2.1 2.8M7 7.6C5.1 9 4 12 4 12s3.4 6 8 6a7.8 7.8 0 0 0 3.6-.9'/%3E%3Cpath d='M10.2 10.2a2.5 2.5 0 0 0 3.6 3.6'/%3E%3C/svg%3E");
  --i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M6 11h12v9H6zM8.5 11V8a3.5 3.5 0 0 1 7 0v3'/%3E%3C/svg%3E");
  --i-external: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M13 5h6v6M19 5l-8 8M17 14v5H5V7h5'/%3E%3C/svg%3E");
  --i-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M8 5.5v13l10-6.5z'/%3E%3C/svg%3E");
  --i-stop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M7 7h10v10H7z'/%3E%3C/svg%3E");
  --i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Ccircle cx='12' cy='8.5' r='3.5'/%3E%3Cpath d='M5 19.5c1.2-3.4 3.8-5 7-5s5.8 1.6 7 5'/%3E%3C/svg%3E");
  --i-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M5 6h14v13H5zM5 10h14M9 4v4M15 4v4'/%3E%3C/svg%3E");
  --i-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M12 4v11M7.5 10.5L12 15l4.5-4.5M5 19h14'/%3E%3C/svg%3E");
  --i-upload: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M12 15V4M7.5 8.5L12 4l4.5 4.5M5 19h14'/%3E%3C/svg%3E");
  --i-refresh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M19 12a7 7 0 1 1-2.1-5M19 4.5V9h-4.5'/%3E%3C/svg%3E");
  --i-history: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M4.5 12a7.5 7.5 0 1 0 2.2-5.3M4.5 4.5v3.5H8'/%3E%3Cpath d='M12 8v4.5l3 2'/%3E%3C/svg%3E");
  --i-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M7 4h7l4 4v12H7z'/%3E%3Cpath d='M14 4v4h4'/%3E%3C/svg%3E");
  --i-collapse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M4 5h16v14H4zM9 5v14'/%3E%3Cpath d='M15.5 9.5L13 12l2.5 2.5'/%3E%3C/svg%3E");
  --i-expand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M4 5h16v14H4zM9 5v14'/%3E%3Cpath d='M13 9.5l2.5 2.5L13 14.5'/%3E%3C/svg%3E");
  --i-help: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='M9.6 9.5a2.5 2.5 0 0 1 4.8.9c0 1.7-2.4 2.1-2.4 3.6M12 16.2v1.3'/%3E%3C/svg%3E");
  --i-addu: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAAPCAYAAACvMDy4AAABhUlEQVR42tVWTWvCQBScFSMWP5ImjUIR+gN6KPTSUy/933rWi+hJEASFItTYTTYalETYnlY0TbIbjQfnkmxm8t5O9mX3kW5/hHvD18cbF/e9wZicjgVKuEP0BmNyek16dpfGVFAWN9WKxm3TgKk30Kw9AAD8YAfKNnCoh30YkfjLn++vPEsj4+NllWe1ZCDd/gh6vcZfnm08PeqJorXLsFg6YNuApE0qSSPjb2msXK1omaYAHLnpPORJX11FoxKjSJRs08g0dTox2zSu0qjEKMyYqTeUxSpamUbGr6iH4WSG4WSGFfUu3zzERqECFa1MI+O/f37h+VtRqrx14Qrn2u41rVx4yUTR4Sbakh/sCp2oLF6cj487bQtGs86NZp132lau2GelSNkGltEozBhlm1x8PH/LNJBWfrLYZyvmUA9rlxViau0yOBk/fBKvml8W+5+xfRiRxdK52pw4gNPOqDReJb8sdmpLxbYBmc5D7vrBsaVS2Sii6JDZdsl4gaT8Ki1dFv4AJJcy6oyCUIcAAAAASUVORK5CYII=");
}
.i-menu { --icon: var(--i-menu); }
.i-close { --icon: var(--i-close); }
.i-back { --icon: var(--i-back); }
.i-next { --icon: var(--i-next); }
.i-search { --icon: var(--i-search); }
.i-plus { --icon: var(--i-plus); }
.i-edit { --icon: var(--i-edit); }
.i-trash { --icon: var(--i-trash); }
.i-settings { --icon: var(--i-settings); }
.i-logout { --icon: var(--i-logout); }
.i-print { --icon: var(--i-print); }
.i-attachment { --icon: var(--i-attachment); }
.i-info { --icon: var(--i-info); }
.i-check { --icon: var(--i-check); }
.i-warning { --icon: var(--i-warning); }
.i-eye-off { --icon: var(--i-eye-off); }
.i-lock { --icon: var(--i-lock); }
.i-external { --icon: var(--i-external); }
.i-play { --icon: var(--i-play); }
.i-stop { --icon: var(--i-stop); }
.i-user { --icon: var(--i-user); }
.i-calendar { --icon: var(--i-calendar); }
.i-download { --icon: var(--i-download); }
.i-upload { --icon: var(--i-upload); }
.i-refresh { --icon: var(--i-refresh); }
.i-history { --icon: var(--i-history); }
.i-file { --icon: var(--i-file); }
.i-collapse { --icon: var(--i-collapse); }
.i-expand { --icon: var(--i-expand); }
.i-help { --icon: var(--i-help); }
a.button-logout, #taskbar a.button-logout { --icon: var(--i-logout); }
a.button-settings, a.button-settings-off, #taskbar a.button-settings, #taskbar a.button-settings-off { --icon: var(--i-settings); }
a.button-print, #taskbar a.button-print { --icon: var(--i-print); }
a.button-pass, #taskbar a.button-pass { --icon: var(--i-lock); }
a.button-history, #taskbar a.button-history { --icon: var(--i-history); }
a.button-profile, #taskbar a.button-profile { --icon: var(--i-user); }
a.button-help, #taskbar a.button-help { --icon: var(--i-help); }
a.button-refresh, #taskbar a.button-refresh { --icon: var(--i-refresh); }
/* addui-time-27 — the intranet face of AddUI27 (time.addition.pt).
   Same IDs and classes as AddUI 1, AddUI2 and AddUI27 (MainPage / Zone / ModeStack markup). Load after the tokens.
   Swiss rules: one grotesk, flush-left text, a 4px base on an 8px rhythm, square corners, no shadows.
   Addition red says "you are here / do this"; Addition cyan draws the top band, the list rule and the circles; a deeper blue carries links and focus.
   Bauhaus marks, used sparingly: the red square of the selected zone, the blue disc / red square of the timer, the login composition, the loading shapes.
   Phone layout below 760px of page width (container query); 44px controls on any touch screen. */

html { container: aui / inline-size; }

body, .aui-shell, .aui-login { --ctl: var(--control-h); --row: var(--row-h); --fs: 14px; --fs-nav: 14px; --fs-sm: 12px; --gut: var(--space-6); --pad: var(--space-6); }
@media (pointer: coarse) {
  body, .aui-shell, .aui-login { --ctl: var(--control-h-touch); --row: var(--row-h-touch); --fs: 16px; --fs-nav: 16px; --fs-sm: 13px; }
}

/* ---------- base ---------- */
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 var(--fs)/1.45 var(--font-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
*, *::before, *::after { border-radius: 0; }
a, a:visited { color: var(--blue); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue); text-decoration-color: currentColor; }
a.active { color: var(--ink); font-weight: 600; }
th { font-weight: 600; }
b, strong { font-weight: 600; }
hr { height: 0; border: 0; border-top: 1px solid var(--rule); margin: var(--space-6) 0; }
form { margin: 0; padding: 0; }
fieldset { margin: 0 0 var(--space-8); padding: var(--space-4) 0 0; border: 0; border-top: 1px solid var(--ink); }
legend { padding: 0 var(--space-3) 0 0; color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--blue-wash); color: var(--ink); }

/* the Addition cursor: an accent underscore after titles. The only decoration the system keeps. */
.cursor::after, #titleFrame::after, #modeTitle .ttl::after, .empty strong::after, .aui-login h1::after { content: "_"; color: var(--accent); font-weight: 600; margin-left: .03em; }

/* ---------- icons: masks that follow the text colour ---------- */
.aui-i, #taskbar a[class*="button-"]::before, #leftFrameHead::before, #modeTitle #closeButton,
#message div::before, .toast::before, #fileList li::before, .button[class*="i-"]::before, #leftFrameControls a[class*="i-"]::before, #leftFrame li a[class*="i-"]::after {
  content: ""; display: inline-block; flex: none; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.aui-i { vertical-align: -3px; }

/* ---------- shell: one grid, flush left ---------- */
body:has(> #rightFrame), .aui-shell {
  height: 100dvh; overflow: hidden; display: grid; box-sizing: border-box;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  grid-template-rows: var(--topbar-h) auto auto minmax(0, 1fr) auto auto auto;
  grid-template-areas: "logo taskbar" "navhead title" "nav tabs" "nav main" "navlogo main" "navfoot footer" "sign footer";
  column-gap: var(--gut); padding: 0 var(--gut) var(--space-4);
  background: var(--ground); color: var(--ink); font: 400 var(--fs)/1.45 var(--font-sans);
}
/* the one structural line: ink, under the top bar, margin to margin */
body:has(> #rightFrame)::before, .aui-shell::before { content: ""; grid-row: 1; grid-column: 1 / -1; align-self: end; height: 4px; background: linear-gradient(90deg, var(--accent) 0 var(--nav-w), transparent var(--nav-w) calc(var(--nav-w) + var(--gut)), var(--cyan) calc(var(--nav-w) + var(--gut))); pointer-events: none; }

#logo { grid-area: logo; position: static; display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
#logo img { display: block; height: 24px; width: auto; max-width: 100%; }
#logo .indexInfo, #logo .caption { color: var(--ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; }
/* a single-colour logo shipped as a white PNG is drawn as a mask in ink (intrADD, addu, and the one-colour add·+·on) */
.aui-logo-mask { display: block; height: 24px; aspect-ratio: var(--ratio, 4); background: var(--ink); -webkit-mask: var(--src) left center / contain no-repeat; mask: var(--src) left center / contain no-repeat; }
.aui-logo-mask.soft { background: var(--ink-soft); }

#taskbar { grid-area: taskbar; position: static; width: auto; height: auto; padding: 0; display: flex; align-items: center; justify-content: flex-end; gap: 0; white-space: nowrap; }
#taskbar a, #taskbar a:visited, #taskbar a:active {
  display: inline-flex; align-items: center; gap: 6px; height: var(--ctl); padding: 0 var(--space-3);
  background: none; color: var(--ink-soft); font-size: var(--fs-sm); text-decoration: none; text-transform: none; text-shadow: none;
}
#taskbar a:last-child { padding-right: 0; }
#taskbar a:hover { color: var(--ink); text-decoration: none; }
#taskbar a:not([class*="button-"])::before { content: none; }
#taskbar a.button-settings-off { color: var(--ink-faint); pointer-events: none; }
#taskbar .user { color: var(--ink); font-weight: 600; }

/* ---------- page title ---------- */
#titleFrame { grid-area: title; align-self: end; padding: var(--space-8) 0 0; color: var(--ink); font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 32px; text-align: left; text-shadow: none; }

/* ---------- zones ---------- */
#leftFrameHead {
  grid-area: navhead; position: static; width: auto; height: auto; display: flex; align-items: center; gap: 0; align-self: end;
  padding: var(--space-8) 0 6px 12px; background: none; border: 0;
  color: var(--accent); font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: .08em; text-transform: uppercase;
}
#leftFrameHead::before { content: none; --icon: var(--i-menu); }
#leftFrameHead.auto { display: none; } /* added by addUI27.js when a page has none: only the phone drawer needs it */
#leftFrame { grid-area: nav; position: static; width: auto; min-height: 0; padding: var(--space-3) 0 0; border: 0; background: none; overflow: auto; }
#leftFrame ul { list-style: none; margin: 0; padding: 0; overflow: visible; white-space: normal; height: auto; width: auto; border: 0; }
#leftFrame ul ul { padding: 0; }
/* a hairline and air between groups of zones (a following <ul>, li.group, or a heading) */
#leftFrame > ul + ul, #leftFrame > ul > li.group ~ li.group, #leftFrame > ul > li:has(> a:not([href])) ~ li:has(> a:not([href])) {
  margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--rule);
}
#leftFrame li { height: auto; padding: 0; margin: 0; border: 0; background-image: none; font-size: var(--fs-nav); }
#leftFrame li a, #leftFrame li a:visited {
  position: relative; display: flex; align-items: center; gap: var(--space-2); min-height: var(--ctl); padding: 0 var(--space-2) 0 12px;
  color: var(--ink); font-weight: 400; text-decoration: none; text-shadow: none;
}
#leftFrame li a[href]:hover { background: var(--wash); text-decoration: none; }
#leftFrame li a:not([href]) { min-height: 28px; color: var(--ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; cursor: default; }
#leftFrame li.small a, #leftFrame ul.small li a { padding-left: 28px; font-size: calc(var(--fs-nav) - 1px); }
#leftFrame li a.i-external::after { margin-left: auto; width: 14px; height: 14px; color: var(--ink-soft); }
/* the selected zone: ink at 600 with a 2px accent bar on the column edge */
#leftFrame li.selected { background: none; border: 0; }
#leftFrame li.selected > a { color: var(--accent); font-weight: 600; }
#leftFrame li.selected > a::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; background: var(--accent); }
#leftFrame.moded { opacity: .35; pointer-events: none; }

#leftFrameLogo { grid-area: navlogo; position: static; padding: var(--space-4) 0 0 12px; }
#leftFrameLogo img { display: block; width: 140px; max-width: 100%; height: auto; }

#leftFrameControls { grid-area: navfoot; position: static; width: auto; height: auto; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); padding: var(--space-3) 0 0 12px; overflow: visible; font-size: var(--fs-sm); }
#leftFrameControls a, #leftFrameControls a:visited { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: var(--fs-sm); text-decoration: none; }
#leftFrameControls a.active { color: var(--ink); font-weight: 600; }
#leftFrameControls a[class*="i-"]::before { width: 14px; height: 14px; }
#leftFrameControls a:hover { color: var(--ink); }

/* the AddUI signature (AddUI2's #sign): addu™ in faint ink, bottom left */
#sign { grid-area: sign; position: static; display: block; padding: var(--space-3) 0 0 12px; text-align: left; }
#sign a, #sign .mark { display: block; width: 54px; height: 15px; background: var(--ink-faint); text-decoration: none; -webkit-mask: var(--i-addu) left center / contain no-repeat; mask: var(--i-addu) left center / contain no-repeat; }
#sign a:hover { background: var(--ink-soft); }
#sign img { display: none; }

/* ---------- tabs: words, the current one in ink over a 2px ink bar ---------- */
#tabsContainer { grid-area: tabs; position: static; width: auto; border: 0; overflow-x: auto; scrollbar-width: none; }
#tabsContainer::-webkit-scrollbar { display: none; }
#tabsBar { position: static; display: flex; gap: var(--space-6); width: auto !important; height: auto; margin: 0; padding-top: var(--space-3); border-bottom: 0; font-size: var(--fs); }
#tabsBar span.tabspace, #tabsBar .tsep { display: none; }
#tabsBar span.tablink, #tabsBar span.tablink-selected { float: none; flex: none; width: auto; height: auto; padding: 0; border: 0; background: none; }
#tabsBar span a, #tabsBar span a:visited {
  position: relative; display: flex; align-items: center; min-height: var(--ctl); padding: 0;
  color: var(--ink-soft); font-size: var(--fs); font-weight: 400; text-decoration: none; text-shadow: none; white-space: nowrap; opacity: 1;
}
#tabsBar span.tablink a:hover { color: var(--ink); text-decoration: none; }
#tabsBar span.tablink a:hover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--cyan); }
#tabsBar span.tablink-selected a { color: var(--ink); font-weight: 600; }
#tabsBar span.tablink-selected a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); }

/* ---------- the sheet ---------- */
#rightFrameOut { display: contents; }
#rightFrameTop, #rightFrameBot, #rightTit:empty { display: none; }
#rightFrame {
  grid-area: main; position: static; min-height: 0; overflow: auto; margin-top: var(--space-3); padding: 0;
  background: var(--sheet); border: 1px solid var(--rule); font-size: var(--fs); white-space: normal; z-index: auto;
}
#rightFrame label { font-weight: 500; }
.content, #content { margin: 0; padding: var(--gut); }
.content:has(> .listTable), #content:has(> .listTable) { padding: 0; }
.content input, .content textarea, .content select { font-family: inherit; }
/* a sub-section inside the sheet (AddUI2's h3): a label over a hairline */
.aui-sub, #rightFrame h3 { margin: 0; padding: var(--space-8) var(--pad) var(--space-3); border-top: 1px solid var(--rule); background: none; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 20px; letter-spacing: -.005em; }
.aui-section { margin: var(--space-8) 0 var(--space-3); color: var(--ink); font-size: 15px; font-weight: 600; line-height: 20px; letter-spacing: -.005em; }
.aui-section:first-child { margin-top: 0; }
.aui-lead { max-width: 64ch; margin: 0 0 var(--space-4); color: var(--ink-soft); }
.aui-lead strong { color: var(--ink); }
/* figures: a label over a large light number, on a hairline grid */
.aui-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0; border-top: 1px solid var(--rule); }
.aui-figures > div { padding: var(--space-4) var(--pad) var(--space-6); border-right: 1px solid var(--rule); }
.aui-figures > div:last-child { border-right: 0; }
.aui-figures dt, .aui-figures .k { color: var(--ink-soft); font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; }
.aui-figures dd, .aui-figures .v { margin: var(--space-2) 0 0; font-size: 32px; font-weight: 300; line-height: 36px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.aui-figures dd b { font-weight: 500; }

/* ---------- mode: the veil, and one sheet edged in ink ---------- */
#modeOuterDiv { position: fixed; inset: 0; z-index: 10; background: var(--scrim); opacity: 1; filter: none; }
#modeTitle {
  grid-area: title; position: relative; z-index: 20; display: flex; align-items: center; gap: var(--space-2); align-self: end;
  min-height: 64px; margin-top: var(--space-4); padding: 0 var(--space-2) 0 var(--gut);
  background: var(--sheet); border: 1px solid var(--edge); border-top: 3px solid var(--accent); border-bottom: 1px solid var(--rule); color: var(--ink); top: auto; left: auto; right: auto;
}
#modeTitle .ttl { float: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 24px; }
#modeTitle a { float: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ink); text-decoration: none; }
#modeTitle a:hover { background: var(--wash); }
#modeTitle #closeButton, #modeTitle a:hover #closeButton { --icon: var(--i-close); border: 0; width: 20px; height: 20px; background: currentColor; }
#closeBtn { display: none; }
#tabsContainer.moded { position: relative; z-index: 20; padding: 0 var(--gut); background: var(--sheet); border: 1px solid var(--edge); border-top: 0; border-bottom: 1px solid var(--rule); }
#tabsContainer.moded #tabsBar { padding-top: var(--space-1); }
#rightFrame.moded, #rightFrame.modedtabbed { position: relative; z-index: 20; top: auto; margin-top: 0; border: 1px solid var(--edge); border-top: 0; }

/* ---------- footer ---------- */
#footerFrame { grid-area: footer; position: static; width: auto; height: auto; align-self: start; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2) var(--space-4); padding-top: var(--space-3); overflow: visible; font-size: var(--fs-sm); font-weight: 400; color: var(--ink-soft); text-align: right; text-shadow: none; font-variant-numeric: tabular-nums; }
#footerFrame p { margin: 0; padding: 0; }
#footerFrame strong, #footerFrame b { color: var(--ink); font-weight: 600; }
.pager { display: inline-flex; align-items: center; gap: 0; margin-left: auto; }
.pager a, .pager a:visited { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--ink); text-decoration: none; }
.pager a:hover { background: var(--wash); }
.pager a[aria-disabled="true"] { color: var(--ink-faint); pointer-events: none; }

/* ---------- lists ---------- */
.listTable { width: 100%; display: table; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: var(--fs); }
.listTable * { font-size: inherit; text-shadow: none; }
.listTable a, .listTable a:visited, .listTable tr a { color: inherit; text-decoration: none; }
.listTable tbody tr a:hover { text-decoration: underline; text-decoration-color: var(--rule-strong); }
/* header: small caps in ink-soft over the one ink line */
.listTable th, .listTable thead td, .listTable tr.thead td, .listTable tr td.header, .listTable tr td.orderHeader {
  position: sticky; top: 0; z-index: 1; height: 36px; padding: 0 var(--pad); text-align: left; vertical-align: bottom; padding-bottom: 8px; box-sizing: border-box; white-space: nowrap;
  background: var(--sheet); background-image: none; border-bottom: 2px solid var(--cyan);
  color: var(--ink-soft); font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: .08em; text-transform: uppercase;
}
.listTable tr td.orderHeader, .listTable tr td.orderHeader a { color: var(--ink); }
.listTable tr td.orderHeader a::after { content: " ↓"; }
.listTable tbody tr td {
  height: var(--row); padding: 0 var(--pad); border-bottom: 1px solid var(--rule); background: var(--sheet);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default;
}
.listTable tbody tr.odd td { background: var(--sheet); }
.listTable tbody tr td:first-child { font-weight: 500; }
.listTable tbody tr:has(a) td { cursor: pointer; }
.listTable tbody tr:hover td, .listTable tbody tr.over td, .listTable tbody tr.selected td { background: var(--hover); color: var(--ink); }
.listTable td.num, .listTable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.listTable td.code { font-family: var(--font-mono); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.listTable td.actions { text-align: right; }
.listTable td.actions a { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; color: var(--ink-soft); }
.listTable td.actions a:hover { background: var(--wash); color: var(--ink); }
.listTable tfoot td { height: var(--row); padding: 0 var(--pad); border-top: 1px solid var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
/* editable lines (invoice items): inputs inside the cells */
.listTable.lines tbody tr td { height: auto; padding: 6px var(--space-2); overflow: visible; cursor: default; }
.listTable.lines tbody tr td:first-child { padding-left: var(--pad); font-weight: 400; }
.listTable.lines td input, .listTable.lines td select { width: 100%; min-height: 32px; }
.listTable.lines tbody tr:hover td { background: var(--sheet); }

/* status: a square mark, then a word */
.badge { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 400; white-space: nowrap; --mark: var(--ink-faint); }
.badge::before { content: ""; width: 8px; height: 8px; background: var(--mark); flex: none; }
.badge.ok { --mark: var(--ok); }
.badge.info { --mark: var(--cyan); }
.badge.warn { --mark: var(--warn); }
.badge.err { --mark: var(--accent); color: var(--accent); }

.empty { padding: var(--space-12) var(--gut); text-align: left; color: var(--ink-soft); }
.empty strong { display: block; margin-bottom: var(--space-2); color: var(--ink); font-size: 20px; font-weight: 600; line-height: 24px; letter-spacing: -.01em; }

/* loading: square · circle · triangle, the accent stepping across them */
.aui-loading { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); padding: var(--space-12) var(--gut); color: var(--ink-soft); text-align: left; }
.aui-loading::before, #message div.loading::before, .toast.loading::before {
  content: ""; display: block; flex: none; width: 44px; height: 12px;
  background: linear-gradient(90deg, var(--accent) 0 12px, transparent 12px 16px, var(--cyan) 16px 28px, transparent 28px 32px, var(--ink) 32px);
  -webkit-mask: var(--i-shapes) center / contain no-repeat; mask: var(--i-shapes) center / contain no-repeat;
  animation: aui-step 1.2s steps(1) infinite;
}
@keyframes aui-step { 0% { opacity: 1; } 50% { opacity: .35; } }
:root { --i-shapes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 12'%3E%3Crect x='0' y='1' width='10' height='10'/%3E%3Ccircle cx='22' cy='6' r='5.5'/%3E%3Cpath d='M33 11.2L38.5 0.8 44 11.2z'/%3E%3C/svg%3E"); }

/* ---------- search ---------- */
.searchForm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; padding: var(--space-3) var(--pad); border-bottom: 1px solid var(--rule); background: var(--sheet); }
.searchForm input[type="text"], .searchForm input[type="search"] {
  flex: 1 1 200px; padding-left: 34px;
  background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8b86' stroke-width='2' stroke-linecap='square'%3E%3Ccircle cx='10.5' cy='10.5' r='5.5'/%3E%3Cpath d='M15 15l4.5 4.5'/%3E%3C/svg%3E") 10px 50% / 16px no-repeat;
}
.searchForm input, .searchForm select { min-width: 0; }
.searchForm input.sDate { flex: 0 0 112px; width: 112px; padding-left: var(--space-3); background-image: none; font-variant-numeric: tabular-nums; }
.searchForm .actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-left: auto; }
.searchForm .grow { flex: 1 1 260px; }
.searchForm .sep { width: 1px; align-self: stretch; margin: 4px var(--space-1); background: var(--rule); }
.searchForm a:not(.button) { font-size: var(--fs-sm); }

/* ---------- fields ---------- */
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="time"], input[type="search"], input[type="url"], input[type="tel"], select, textarea {
  box-sizing: border-box; max-width: 100%; min-height: var(--ctl); padding: 0 var(--space-3);
  border: 1px solid var(--rule-strong); background-color: var(--sheet); color: var(--ink);
  font: inherit; font-size: var(--fs);
}
select { -webkit-appearance: none; appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8b86' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; }
textarea { padding: var(--space-2) var(--space-3); min-height: calc(var(--ctl) * 3); line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
input.failure, select.failure, textarea.failure, input.errorOnInput, select.errorOnInput, textarea.errorOnInput { border-color: var(--accent) !important; box-shadow: 0 0 0 1px var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: -3px; }
input:disabled, select:disabled, textarea:disabled, input[readonly] { color: var(--ink-soft); background-color: var(--wash); border-color: var(--rule); }
input.sNumber, input.sDecimal, input.sPerc, input.sEuro, input.num { text-align: right; font-variant-numeric: tabular-nums; }
.failureDesc, .errorSp { display: block; padding: 6px 0 0; color: var(--accent); font-size: var(--fs-sm); }
.hint, .sInfo { display: block; padding-top: 6px; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 400; }
.unit { color: var(--ink-soft); font-size: var(--fs-sm); }

.formGrid { display: grid; grid-template-columns: minmax(112px, 160px) minmax(0, 1fr); gap: var(--space-4) var(--space-6); align-items: start; max-width: 720px; }
.formGrid > label, .formGrid > .lbl { padding-top: calc((var(--ctl) - 16px) / 2); color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 500; line-height: 16px; }
.formGrid input[type="text"], .formGrid input[type="email"], .formGrid input[type="password"], .formGrid select, .formGrid textarea { width: 100%; }
.formGrid .inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.formGrid > div > label:has(> input[type="checkbox"]), .formGrid > div > label:has(> input[type="radio"]) { display: inline-flex; align-items: center; min-height: var(--ctl); }
.formActions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--rule); }
.formActions .end { margin-left: auto; }
.formTable { border-collapse: collapse; }
.formTable th, .formTable td { padding: var(--space-1) var(--space-4) var(--space-1) 0; text-align: left; vertical-align: top; }
.formTable th, .formTable td.prop { padding-top: 8px; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 500; }
.aui-q { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: var(--space-2) var(--space-6); align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--rule); }
.aui-q .q { min-width: 0; }
.aui-q .q b { display: inline-block; min-width: 2.6em; color: var(--ink-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.aui-q input[type="text"], .aui-q select { width: 100%; }
.aui-q.total { border-bottom: 1px solid var(--ink); font-weight: 600; }
.aui-q.total input { font-weight: 600; }
.aui-choices { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); grid-column: 1 / -1; padding-left: 2.6em; }
.aui-choices label { font-weight: 400 !important; }

/* ---------- buttons: square; ink is the main action ---------- */
input.button, button.button, a.button, input[type="submit"], input[type="button"], input[type="reset"], .button_out button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box;
  height: var(--ctl); margin: 0; padding: 0 var(--space-4); border: 1px solid var(--rule-strong);
  background: var(--sheet); color: var(--ink); font: inherit; font-size: var(--fs) !important; font-weight: 500; line-height: 1;
  text-decoration: none; text-transform: none; text-shadow: none; cursor: pointer; white-space: nowrap; -webkit-appearance: none; appearance: none;
}
input.button:hover, button.button:hover, a.button:hover, input[type="submit"]:hover, input[type="button"]:hover { border-color: var(--blue); background: var(--sheet); color: var(--blue); text-decoration: none; }
/* AddUI2 colours map onto roles: green and blue are the main action, red is destructive */
.button.primary, .button.green, .button.blue, input[type="submit"].primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover, .button.green:hover, .button.blue:hover, input[type="submit"].primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.button.danger, .button.red { border-color: var(--accent); background: var(--sheet); color: var(--accent); }
.button.danger:hover, .button.red:hover { border-color: var(--accent); background: var(--accent-wash); color: var(--accent); }
.button.ghost { border-color: transparent; background: none; color: var(--ink-soft); }
.button.ghost:hover { border-color: transparent; background: var(--wash); color: var(--ink); }
.button.small { height: 28px; padding: 0 var(--space-3); font-size: var(--fs-sm) !important; }
.button.icon { width: var(--ctl); padding: 0; }
.button.wide { width: 100%; }
.button:disabled, .button[aria-disabled="true"] { opacity: .4; cursor: not-allowed; pointer-events: none; }
.buttonEnd { display: none; }
.button_out { display: inline-flex; }
a.deleteRed, a.deleteRed:visited { color: var(--accent); text-decoration-color: currentColor; }

/* ---------- messages: a flat strip across the top of the sheet ---------- */
#message, #messageDv, #errorDv { grid-area: main; align-self: start; position: relative; top: auto; left: auto; right: auto; z-index: 30; margin-top: calc(var(--space-3) + 1px); opacity: 1; padding: 0; background: none; border: 0; }
#message { display: none; }
#message div, .toast, #messageDv, #errorDv {
  display: flex; align-items: flex-start; gap: var(--space-3); width: auto; height: auto; box-sizing: border-box;
  padding: var(--space-3) var(--pad); background-image: none; box-shadow: none; font-size: var(--fs); line-height: 1.45; color: var(--ink);
}
#message div::before, .toast::before { width: 16px; height: 16px; margin-top: 2px; }
#message div.notice, #remote-objects-message, .toast.notice, #messageDv { background: var(--blue-wash); color: var(--ink); --icon: var(--i-info); }
#message div.notice::before, .toast.notice::before { color: var(--blue); }
#message div.confirmation, .toast.confirmation { background: var(--ok-wash); color: var(--ink); --icon: var(--i-check); }
#message div.confirmation::before, .toast.confirmation::before { color: var(--ok); }
#message div.warning, .toast.warning { background: var(--warn-wash); color: var(--ink); --icon: var(--i-warning); }
#message div.warning::before, .toast.warning::before { color: var(--warn); }
#message div.error, .toast.error, #errorDv { background: var(--accent-wash); color: var(--ink); --icon: var(--i-warning); }
#message div.error::before, .toast.error::before { color: var(--accent); }
#message div.loading, .toast.loading { align-items: center; background: var(--sheet); color: var(--ink-soft); border-bottom: 1px solid var(--rule); }
#message div.loading::before, .toast.loading::before { margin-top: 0; }
.toast .close { margin-left: auto; color: inherit; opacity: .7; text-decoration: none; }
#messageInfo, #errorInfo { display: none !important; }

/* ---------- files ---------- */
#fileList { list-style: none; margin: 0; padding: 0; overflow: hidden; white-space: nowrap; }
#fileList li { display: flex; align-items: center; gap: var(--space-2); min-height: var(--row); padding: 0 var(--pad); background: none; border-bottom: 1px solid var(--rule); font-size: var(--fs); }
#fileList li::before { --icon: var(--i-attachment); color: var(--ink-soft); }
#uploadProgress { width: 100%; height: 2px; border: 0; background: var(--rule); overflow: hidden; }
#uploadBar { display: block; height: 100%; background: var(--blue); }

/* ---------- timer (time.addition.pt) ---------- */
.aui-timer { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-6) var(--space-6); align-items: center; padding: var(--space-8) var(--gut); }
.aui-timer .go { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; padding: 0; border: 0; border-radius: 50%; background: var(--blue); color: var(--on-blue); cursor: pointer; transition: border-radius .18s ease, background-color .18s ease; }
.aui-timer .go::before { content: ""; width: 26px; height: 30px; margin-left: 5px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.aui-timer .go:hover { background: var(--ink); color: var(--sheet); }
.aui-timer.running .go { border-radius: 0; background: var(--accent); color: var(--on-accent); }
.aui-timer.running .go:hover { background: var(--accent-strong); }
.aui-timer.running .go::before { width: 24px; height: 24px; margin-left: 0; clip-path: none; }
.aui-timer .clock { font-size: 64px; font-weight: 300; line-height: 64px; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.aui-timer .since { margin-top: var(--space-2); color: var(--ink-soft); font-size: var(--fs-sm); }
.aui-timer .since b { color: var(--ink); font-variant-numeric: tabular-nums; }
.aui-timer .fields { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 120px 120px; gap: var(--space-4) var(--space-4); align-items: end; padding-top: var(--space-6); border-top: 1px solid var(--rule); }
.aui-timer .fields label { display: grid; gap: 6px; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 500; line-height: 16px; }
.aui-timer .fields input, .aui-timer .fields select, .aui-timer .fields textarea { width: 100%; }
.aui-timer .fields textarea { height: var(--ctl); min-height: var(--ctl); padding-top: 5px; padding-bottom: 5px; resize: vertical; }

/* ---------- login ---------- */
.aui-login { min-height: 100dvh; display: grid; grid-template-rows: 1fr auto 1fr auto; justify-items: center; padding: var(--space-6) max(16px, env(safe-area-inset-right, 0px)) var(--space-6) max(16px, env(safe-area-inset-left, 0px)); box-sizing: border-box; background: var(--ground); color: var(--ink); font: 400 var(--fs)/1.45 var(--font-sans); }
.aui-login { position: relative; overflow: hidden; isolation: isolate; }
/* the login's Bauhaus composition: a cyan disc off the top right, a red square and an ink circle bottom left */
.aui-login::before { content: ""; position: absolute; z-index: -1; top: -18vmin; right: -14vmin; width: 52vmin; height: 52vmin; border-radius: 50%; background: var(--cyan); }
.aui-login::after { content: ""; position: absolute; z-index: -1; left: 0; bottom: 0; width: 22vmin; height: 22vmin; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 100% no-repeat; box-shadow: none; }
.aui-login .panel { grid-row: 2; width: min(400px, 100%); box-sizing: border-box; padding: var(--space-12); background: var(--sheet); border: 1px solid var(--rule); }
.aui-login .brand { display: grid; gap: var(--space-2); padding-bottom: var(--space-6); margin-bottom: var(--space-8); border-bottom: 2px solid var(--accent); }
.aui-login .brand img { display: block; height: 32px; width: auto; max-width: 100%; }
.aui-login .brand .aui-logo-mask { height: 32px; }
.aui-login .brand .caption { color: var(--ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.aui-login h1 { margin: 0 0 var(--space-2); font-size: 20px; font-weight: 600; line-height: 24px; letter-spacing: -.01em; }
.aui-login form { display: grid; gap: var(--space-4); }
.aui-login label.f { display: grid; gap: 6px; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 500; line-height: 16px; }
.aui-login input[type="text"], .aui-login input[type="password"] { width: 100%; }
.aui-login .keep { display: flex; align-items: center; color: var(--ink-soft); font-size: var(--fs-sm); }
.aui-login input[type="submit"] { margin-top: var(--space-2); }
.aui-login .toast { margin: 0 calc(-1 * var(--space-12)); padding-left: var(--space-12); padding-right: var(--space-12); }
.aui-login .help { grid-row: 3; align-self: start; width: min(400px, 100%); margin-top: var(--space-4); color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.5; }
.aui-login .foot { grid-row: 4; width: min(400px, 100%); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-6); }
.aui-login .foot img { display: block; height: 28px; width: auto; }
.aui-login .foot .aui-logo-mask { height: 22px; }
.aui-login .foot #sign { padding: 0; }

/* ---------- collapse control (added by addUI27.js) ---------- */
#navToggle { grid-area: navhead; justify-self: end; align-self: end; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 0 0 0; padding: 0; border: 0; background: none; color: var(--ink-soft); cursor: pointer; }
#navToggle::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--i-collapse) center / contain no-repeat; mask: var(--i-collapse) center / contain no-repeat; }
#navToggle:hover { background: var(--wash); color: var(--ink); }

/* =========================================================
   Wide: the zone column collapses into a drawer and logo, title, tabs and taskbar share one 56px bar.
   class="aui-wide" on <body> (or .aui-shell). addUI27.js toggles it with #navToggle and remembers the choice;
   below 1100px it starts wide unless the zones were pinned open.
   ========================================================= */
@container aui (min-width: 761px) {
  body.aui-wide:has(> #rightFrame), .aui-shell.aui-wide {
    grid-template-columns: auto auto auto minmax(0, 1fr) auto;
    grid-template-rows: var(--topbar-wide-h) auto auto minmax(0, 1fr) auto;
    grid-template-areas: "navhead logo title tabs taskbar" "mode mode mode mode mode" "mtabs mtabs mtabs mtabs mtabs" "main main main main main" "footer footer footer footer footer";
    column-gap: var(--space-6); padding: 0;
  }
  .aui-wide > #leftFrameHead, .aui-wide > #leftFrameHead.auto {
    display: flex; align-self: stretch; align-items: center; justify-content: center; width: var(--topbar-wide-h); padding: 0; gap: 0;
    font-size: 0; cursor: pointer; border-right: 1px solid var(--rule); color: var(--ink);
  }
  .aui-wide > #leftFrameHead::before { content: ""; width: 20px; height: 20px; }
  .aui-wide > #leftFrameHead:hover { background: var(--wash); }
  body.aui-wide:has(> #rightFrame)::before, .aui-shell.aui-wide::before { grid-row: 1; background: linear-gradient(90deg, var(--accent) 0 var(--topbar-wide-h), var(--cyan) var(--topbar-wide-h)); }
  .aui-wide > #logo img, .aui-wide > #logo .aui-img, .aui-wide > #logo .aui-logo-mask { height: 20px; }
  .aui-wide > #logo .indexInfo, .aui-wide > #logo .caption { display: none; }
  .aui-wide > #titleFrame { align-self: center; padding: 0 0 0 var(--space-6); border-left: 1px solid var(--rule); font-size: 20px; line-height: 24px; white-space: nowrap; }
  .aui-wide > #tabsContainer:not(.moded) { align-self: stretch; }
  .aui-wide > #tabsContainer:not(.moded) #tabsBar { height: 100%; padding-top: 0; }
  .aui-wide > #tabsContainer:not(.moded) #tabsBar span a { height: 100%; }
  .aui-wide > #taskbar { padding-right: var(--space-6); }
  .aui-wide > #rightFrame { margin: 0; border: 0; }
  .aui-wide > #message, .aui-wide > #messageDv, .aui-wide > #errorDv { margin-top: 0; }
  .aui-wide > #footerFrame { padding: var(--space-2) var(--space-6) var(--space-2) calc(var(--space-6) + 54px + var(--space-6)); border-top: 1px solid var(--rule); }
  .aui-wide:not(:has(> #sign)) > #footerFrame { padding-left: var(--space-6); }
  .aui-wide > #sign { grid-area: footer; justify-self: start; align-self: center; padding: 0 0 0 var(--space-6); }
  .aui-wide > #leftFrameLogo { display: none; }
  /* a mode takes the full width under the bar */
  .aui-wide > #modeTitle { grid-area: mode; margin: 0; border-left: 0; border-right: 0; border-top: 0; }
  .aui-wide > #tabsContainer.moded { grid-area: mtabs; border-left: 0; border-right: 0; }
  .aui-wide > #rightFrame.moded { border: 0; }
  /* zones: a drawer over the veil */
  .aui-wide > #leftFrame, .aui-wide > #leftFrameControls { position: fixed; left: 0; width: var(--drawer-w); box-sizing: border-box; z-index: 60; margin: 0; transform: translateX(-105%); transition: transform .2s cubic-bezier(.2,.7,.2,1); background: var(--sheet); border-right: 1px solid var(--edge); }
  .aui-wide > #leftFrame { top: 0; bottom: 0; padding: calc(var(--topbar-wide-h) + var(--space-3)) 0 calc(var(--ctl) + var(--space-8)); opacity: 1; pointer-events: auto; }
  .aui-wide > #leftFrameControls { bottom: 0; padding: var(--space-3) var(--space-4) var(--space-4) 12px; z-index: 61; border-top: 1px solid var(--rule); }
  .aui-wide.nav-open > #leftFrame, .aui-wide.nav-open > #leftFrameControls { transform: none; }
  .aui-wide.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 50; background: var(--scrim); }
  /* in the open drawer, #navToggle pins the zones back open */
  .aui-wide > #navToggle { display: none; }
  .aui-wide.nav-open > #navToggle { display: inline-flex; position: fixed; z-index: 62; top: 0; left: calc(var(--drawer-w) - var(--topbar-wide-h)); width: calc(var(--topbar-wide-h) - 1px); height: calc(var(--topbar-wide-h) - 1px); margin: 0; background: var(--sheet); border-bottom: 1px solid var(--rule); box-sizing: content-box; }
  .aui-wide.nav-open > #navToggle::before { -webkit-mask-image: var(--i-expand); mask-image: var(--i-expand); }
  /* the section name heads the open drawer */
  .aui-wide.nav-open > #leftFrameHead, .aui-wide.nav-open > #leftFrameHead.auto { position: fixed; z-index: 62; top: 0; left: 0; width: calc(var(--drawer-w) - var(--topbar-wide-h)); height: var(--topbar-wide-h); box-sizing: border-box; justify-content: flex-start; padding-left: 18px; border-right: 0; border-bottom: 1px solid var(--rule); background: var(--sheet); color: var(--ink-soft); font-size: 11px; }
  .aui-wide.nav-open > #leftFrameHead::before { margin-right: var(--space-3); color: var(--ink); }
}

/* Faixa (AddUI27's band across the top) is retired here: class="aui-faixa" is accepted and renders as Linha. */

/* =========================================================
   Compact: phones and narrow windows
   ========================================================= */
@container aui (max-width: 760px) {
  body, .aui-shell, .aui-login { --ctl: var(--control-h-touch); --row: var(--row-h-touch); --fs: 16px; --fs-nav: 16px; --fs-sm: 13px; --gut: 16px; --pad: 16px; }

  body:has(> #rightFrame), .aui-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: var(--topbar-wide-h) auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "logo taskbar" "navhead navhead" "title title" "tabs tabs" "main main" "footer footer";
    column-gap: var(--space-2); padding: 0 0 env(safe-area-inset-bottom, 0px); background: var(--sheet);
  }
  body:has(> #rightFrame)::before, .aui-shell::before { grid-row: 1; height: 3px; background: linear-gradient(90deg, var(--accent) 0 64px, var(--cyan) 64px); }
  #logo { padding-left: max(16px, env(safe-area-inset-left, 0px)); }
  #logo img, #logo .aui-logo-mask { height: 20px; }
  #logo .indexInfo, #logo .caption { display: none; }
  #taskbar { padding-right: max(4px, env(safe-area-inset-right, 0px)); gap: 0; }
  #taskbar a, #taskbar a:visited, #taskbar a:last-child { width: var(--ctl); padding: 0; justify-content: center; font-size: 0; }
  #taskbar a::before { width: 20px; height: 20px; }
  #taskbar a:not([class*="button-"]) { display: none; }
  #leftFrameLogo, .aui-shell > #sign, body:has(> #rightFrame) > #sign, #navToggle { display: none; }

  /* the section name becomes the drawer toggle */
  #leftFrameHead, #leftFrameHead.auto {
    display: flex; align-self: stretch; min-height: var(--ctl); padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); cursor: pointer;
    background: var(--sheet); border-bottom: 1px solid var(--rule);
  }
  #leftFrameHead::before { content: ""; width: 20px; height: 20px; margin-right: var(--space-3); color: var(--ink); }
  #titleFrame { padding: var(--space-6) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); font-size: 24px; line-height: 28px; }
  #leftFrame, #leftFrameControls { position: fixed; left: 0; width: min(86%, var(--drawer-w)); box-sizing: border-box; z-index: 60; transform: translateX(-105%); transition: transform .2s cubic-bezier(.2,.7,.2,1); background: var(--sheet); margin: 0; border-right: 1px solid var(--edge); }
  #leftFrame { top: 0; bottom: 0; padding: calc(var(--space-6) + env(safe-area-inset-top, 0px)) 0 calc(var(--ctl) + var(--space-8)); }
  #leftFrame li a, #leftFrame li a:visited { padding-left: 16px; }
  #leftFrameControls { bottom: 0; flex-direction: row; flex-wrap: wrap; gap: var(--space-1) var(--space-4); padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom, 0px)) 16px; z-index: 61; border-top: 1px solid var(--rule); }
  .nav-open #leftFrame, .nav-open #leftFrameControls { transform: none; }
  .nav-open::after { content: ""; position: fixed; inset: 0; z-index: 50; background: var(--scrim); }

  #tabsContainer { padding: 0 max(16px, env(safe-area-inset-left, 0px)); background: var(--sheet); border-bottom: 1px solid var(--rule); }
  #tabsBar { padding-top: var(--space-2); }
  #rightFrame { margin: 0; border: 0; }
  #footerFrame { justify-content: space-between; padding: var(--space-2) max(16px, env(safe-area-inset-right, 0px)) var(--space-2) max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--ink); background: var(--sheet); }

  /* a mode is its own screen: the title bar with a back arrow */
  #modeOuterDiv { display: none; }
  #modeTitle {
    position: fixed; inset: 0 0 auto 0; z-index: 70; flex-direction: row-reverse; margin: 0;
    min-height: var(--topbar-wide-h); padding: env(safe-area-inset-top, 0px) var(--space-4) 0 var(--space-1);
    border: 0; border-bottom: 2px solid var(--accent);
  }
  #modeTitle .ttl { font-size: 18px; }
  #modeTitle #closeButton, #modeTitle a:hover #closeButton { --icon: var(--i-back); width: 22px; height: 22px; }
  #tabsContainer.moded { position: fixed; left: 0; right: 0; top: var(--topbar-wide-h); z-index: 70; border: 0; border-bottom: 1px solid var(--rule); padding: 0 16px; }
  #rightFrame.moded, #rightFrame.modedtabbed { position: fixed; inset: var(--topbar-wide-h) 0 0 0; z-index: 69; border: 0; }
  #rightFrame.modedtabbed, body:has(#tabsContainer.moded) #rightFrame.moded, .aui-shell:has(#tabsContainer.moded) #rightFrame.moded { top: calc(var(--topbar-wide-h) + var(--ctl) + var(--space-2) + 1px); }

  /* list rows become cards; addUI27.js copies header text into data-label */
  .listTable, .listTable tbody, .listTable tfoot, .listTable tr, .listTable tbody tr td, .listTable tfoot td { display: block; width: auto; }
  .listTable { table-layout: auto; }
  .listTable thead, .listTable tr.thead, .listTable tr:has(> th), .listTable tr:has(> td.header), .listTable tr:has(> td.orderHeader) { display: none; }
  .listTable tbody tr { display: grid; gap: 4px; padding: var(--space-4) max(16px, env(safe-area-inset-right, 0px)) var(--space-4) max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--rule); background: var(--sheet); }
  .listTable tbody tr:hover, .listTable tbody tr:active { background: var(--hover); }
  .listTable tbody tr td, .listTable tbody tr:hover td { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); height: auto; padding: 0; border: 0; background: none; white-space: normal; overflow: visible; text-align: right; font-size: 15px; }
  .listTable tbody tr td::before { content: attr(data-label); flex: none; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 400; text-align: left; font-family: var(--font-sans); letter-spacing: 0; }
  .listTable tbody tr td:first-child { font-weight: 400; }
  /* the card title is the first linked cell (the record's name), or the first cell when nothing is linked */
  .listTable.listTable tbody tr td:not(.actions):has(> a):not(td:not(.actions):has(> a) ~ td), .listTable.listTable tbody tr:not(:has(td:not(.actions) > a)) td:first-child {
    order: -1; justify-content: flex-start; text-align: left; margin-bottom: 4px; font-family: var(--font-sans); font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
  .listTable tbody tr td:not(.actions):has(> a):not(td:not(.actions):has(> a) ~ td)::before, .listTable tbody tr:not(:has(td:not(.actions) > a)) td:first-child::before, .listTable tbody tr td.actions::before { content: none; }
  .listTable.lines tbody tr td, .listTable.lines tbody tr:hover td, .listTable.lines tbody tr td:first-child { padding: 0; }
  .listTable.lines td input, .listTable.lines td select { width: 60%; }
  .listTable.lines tbody tr td:first-child input { width: 100%; }
  .listTable tbody tr td:empty { display: none; }
  .listTable tfoot tr { display: flex; justify-content: space-between; padding: var(--space-3) max(16px, env(safe-area-inset-right, 0px)) var(--space-3) max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--ink); }
  .listTable tfoot td { height: auto; padding: 0; border: 0; }

  .searchForm { padding: var(--space-3) max(16px, env(safe-area-inset-right, 0px)) var(--space-4) max(16px, env(safe-area-inset-left, 0px)); }
  .searchForm input[type="text"], .searchForm input[type="search"], .searchForm select { flex: 1 1 100%; }
  .searchForm input.sDate { flex: 1 1 40%; width: auto; }
  .searchForm .actions { margin-left: 0; width: 100%; }
  .searchForm .sep { display: none; }
  .content, #content { padding: var(--space-4) max(16px, env(safe-area-inset-right, 0px)) var(--space-6) max(16px, env(safe-area-inset-left, 0px)); }
  .aui-sub, #rightFrame h3 { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-top: var(--space-6); }

  .formGrid { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .formGrid > label, .formGrid > .lbl { padding-top: var(--space-3); }
  .formTable, .formTable tbody, .formTable tr, .formTable th, .formTable td { display: block; width: auto; padding-right: 0; }
  .formTable input[type="text"], .formTable select, .formTable textarea { width: 100%; }
  .formActions { position: sticky; bottom: 0; z-index: 2; margin: var(--space-6) calc(-1 * var(--space-4)) 0; padding: var(--space-3) var(--space-4); background-color: var(--sheet); border-top: 1px solid var(--ink); }
  .formActions .button { flex: 1; }
  .formActions .end { margin-left: 0; }
  .aui-q { grid-template-columns: minmax(0, 1fr) 110px; }

  .aui-timer { grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4) var(--space-4); padding: var(--space-6) max(16px, env(safe-area-inset-right, 0px)) var(--space-6) max(16px, env(safe-area-inset-left, 0px)); }
  .aui-timer .go { width: 72px; height: 72px; }
  .aui-timer .clock { font-size: 48px; line-height: 48px; }
  .aui-timer .fields { grid-template-columns: 1fr 1fr; width: 100%; text-align: left; padding-top: var(--space-4); }
  .aui-timer .fields .wide { grid-column: 1 / -1; }
  .aui-figures { grid-template-columns: 1fr 1fr; }
  .aui-figures > div { border-bottom: 1px solid var(--rule); }
  .aui-figures > div:nth-child(2n) { border-right: 0; }
  .aui-figures dd, .aui-figures .v { font-size: 26px; line-height: 32px; }

  /* on phones a message drops over the top bar for a few seconds, clear of the sticky form actions */
  #message, #messageDv, #errorDv { position: fixed; top: 0; bottom: auto; left: 0; right: 0; margin: 0; z-index: 80; }
  #message div, #messageDv, #errorDv { padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-bottom: 14px; }
  .aui-login { background: var(--sheet); }
  .aui-login::before { top: -64px; right: -56px; width: 176px; height: 176px; }
  .aui-login::after { top: 0; bottom: auto; width: 48px; height: 48px; }
  .aui-login .panel { background: transparent; }
  .aui-login .panel { padding: var(--space-6) 0; border: 0; }
  .aui-login .toast { margin-left: 0; margin-right: 0; padding-left: var(--space-4); padding-right: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  #leftFrame, #leftFrameControls, .aui-wide > #leftFrame, .aui-wide > #leftFrameControls { transition: none; }
  #message div.loading::before, .toast.loading::before, .aui-loading::before { animation: none; }
}

@media print {
  body:has(> #rightFrame) { display: block; height: auto; overflow: visible; padding: 0; background: transparent; }
  body:has(> #rightFrame)::before { content: none; }
  #leftFrame, #leftFrameHead, #leftFrameControls, #leftFrameLogo, #sign, #navToggle, #message, #footerFrame, #taskbar, #modeOuterDiv, #modeTitle, #tabsContainer, .searchForm { display: none; }
  #logo { position: static; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #000; }
  #rightFrame { overflow: visible; position: static; background: transparent; border: none; }
  body { background: transparent; }
}
