:root {
  color-scheme: light;
  --ink: #1d2b40;
  --muted: #526178;
  --line: #dbe2eb;
  --accent: #6636ee;
  --accent-soft: #eee7ff;
  --canvas: #f2f5f9;
  --page-block-gap: 18px;
  --panel-padding-inline: 24px;
  --form-row-gap: 14px;
  --form-column-gap: 18px;
  --control-min-height: 36px;
  --control-padding-block: 6px;
  --control-padding-inline: 9px;
  --control-radius: 6px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Each palette is also used by its link in the section menu. */
[data-section] {
  --accent: #6636d9;
  --accent-deep: #452095;
  --accent-end: #3058b8;
  --accent-glow: #bd73fe;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
  --accent-wash: color-mix(in srgb, var(--accent) 5%, white);
  --accent-line: color-mix(in srgb, var(--accent) 20%, white);
  --accent-shadow: color-mix(in srgb, var(--accent) 21%, transparent);
}
[data-section="sales"] { --accent: #007a6b; --accent-deep: #07564f; --accent-end: #1367a2; --accent-glow: #69e2b0; }
[data-section="directories"] { --accent: #a65313; --accent-deep: #753810; --accent-end: #9a4457; --accent-glow: #ffc45b; }
[data-section="accounting"] { --accent: #285cc1; --accent-deep: #203f91; --accent-end: #4b46a9; --accent-glow: #69b5ff; }
[data-section="financial_company"] { --accent: #5445bc; --accent-deep: #3c318e; --accent-end: #285cc1; --accent-glow: #69b5ff; }
[data-section="assets"] { --accent: #477329; --accent-deep: #35501c; --accent-end: #517539; --accent-glow: #c2dc68; }
[data-section="payroll"] { --accent: #ad3c72; --accent-deep: #7c2855; --accent-end: #763e98; --accent-glow: #ff8ab2; }
[data-section="hr"] { --accent: #7643b1; --accent-deep: #573086; --accent-end: #922f7f; --accent-glow: #df9ced; }
[data-section="bank"] { --accent: #17667f; --accent-deep: #12495f; --accent-end: #267176; --accent-glow: #7ed9e7; }
[data-section="taxes"] { --accent: #936117; --accent-deep: #67430d; --accent-end: #803e20; --accent-glow: #f7cc75; }
[data-section="reports"] { --accent: #006f92; --accent-deep: #07516e; --accent-end: #2f56a4; --accent-glow: #62ddf3; }
.section-theme { --topbar-height: 62px; background: var(--canvas); accent-color: var(--accent); }
.section-theme[data-section="configurator"] {
  --accent: #974512;
  --accent-deep: #73320f;
  --accent-end: #684023;
  --accent-glow: #f6b85a;
  --canvas: #f6f3ee;
  --line: #e4dbcf;
  --config-bar: #2e2522;
  --config-bar-text: #faf0e6;
  --config-bar-accent: #fed38f;
}
[data-section="configurator"] .app-topbar {
  background: var(--config-bar);
  color: var(--config-bar-text);
  border-bottom: 2px solid #c68645;
}
[data-section="configurator"] .app-topbar :focus-visible { outline-color: var(--config-bar-accent); }
.configurator-mode-label {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  padding: 5px 10px;
  border: 1px solid #715444;
  border-radius: 7px;
  background: #48342b;
  color: var(--config-bar-accent);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.configurator-mode-label .ui-icon { width: 16px; height: 16px; }
[data-section="configurator"] .topbar-actions > .profile-link { color: var(--config-bar-accent); }
[data-section="configurator"] .mode-switch { border-color: #715444; background: #392c27; }
[data-section="configurator"] .mode-switch a { color: var(--config-bar-text); }
[data-section="configurator"] .mode-switch a:hover { background: #594037; }
[data-section="configurator"] .mode-switch a.is-current {
  background: var(--config-bar-accent);
  color: #492b1a;
}
[data-section="configurator"] .workspace-switch > summary { border-color: #715444; background: #48342b; color: var(--config-bar-text); }
[data-section="configurator"] .workspace-switch-panel { color: var(--ink); }
[data-section="configurator"] .workspace-sidebar { background: #faf6ef; }
[data-section="configurator"] .panel-header { background: #fffcf7; }
[data-section="configurator"] .data-table thead th { background: #f2eade; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
/* Shared native field geometry; context styles may choose a compact density. */
:where(input:not([type]), input:is([type=text], [type=search], [type=email], [type=url], [type=tel], [type=password], [type=number], [type=date], [type=datetime-local], [type=time]), select, textarea) {
  min-width: 0;
  min-height: var(--control-min-height);
  padding: var(--control-padding-block) var(--control-padding-inline);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background-color: #fff;
  color: var(--ink);
  line-height: 1.55;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
form[data-unpost] button:disabled { cursor: not-allowed; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, a { transition: background-color .16s, color .16s, border-color .16s, box-shadow .16s; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.ui-icon { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 16px; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: #fff; }
.skip-link:focus { top: 12px; }
.app-topbar { position: sticky; z-index: 20; top: 0; height: var(--topbar-height); border-bottom: 1px solid var(--line); background: #fffffff5; box-shadow: 0 2px 15px #65508704; backdrop-filter: blur(16px); }
.topbar-inner { display: flex; align-items: center; height: 100%; gap: 18px; padding: 0 24px; }
.app-brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-symbol { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 70%, var(--accent-glow)), var(--accent) 63%, var(--accent-end)); color: #fff; box-shadow: 0 5px 14px var(--accent-shadow), inset 0 1px #ffffff38; }
.brand-symbol .ui-icon { width: 23px; height: 23px; }
.brand-wordmark { font-size: 25px; font-weight: 700; letter-spacing: -1.1px; white-space: nowrap; }
.brand-separator { color: #f26b3c; }
.brand-suffix { margin-inline-start: .1em; font-size: .56em; line-height: 0; vertical-align: super; letter-spacing: -.025em; }
.console-label { margin-left: 8px; border: 1px solid #e5dcf5; border-radius: 6px; padding: 3px 6px; background: #f8f4ff; font-size: 9px; letter-spacing: .12em; color: #8d70ae; font-weight: 650; }
.topbar-inner > .console-label { margin-left: -12px; margin-right: auto; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-inline-start: auto; min-width: 0; }
.workspace-indicator { display: inline-flex; align-items: center; gap: 8px; color: #746a87; font-size: 12px; }
.workspace-indicator::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1e9b74; box-shadow: 0 0 0 4px #1e9b740c; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: #53a17b; }
.workspace-indicator > .status-dot { display: none; }
.module-state { align-items: center; gap: 6px; }
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100dvh - var(--topbar-height)); }
.workspace-sidebar { position: sticky; top: var(--topbar-height); align-self: start; display: flex; flex-direction: column; min-height: calc(100dvh - var(--topbar-height)); max-height: calc(100dvh - var(--topbar-height)); padding: 20px 14px; overflow-y: auto; border-right: 1px solid var(--sidebar-line);
  --sidebar-line: color-mix(in srgb, var(--accent) 8%, var(--line));
  --sidebar-muted: var(--muted);
  --sidebar-hover: var(--accent-soft);
  --sidebar-accent: var(--accent-deep);
  background: color-mix(in srgb, var(--accent) 3%, white);
  color: var(--ink);
}
.workspace-card { display: flex; align-items: center; gap: 11px; margin: 0 0 17px; padding: 0 6px 16px; border-bottom: 1px solid var(--sidebar-line); }
.workspace-avatar { display: grid; place-items: center; width: 35px; height: 35px; flex-shrink: 0; border: 1px solid var(--sidebar-line); border-radius: 8px; background: var(--sidebar-hover); color: var(--sidebar-accent); font-size: 16px; font-weight: 650; }
.workspace-avatar .section-icon { width: 17px; height: 17px; }
.workspace-card strong { display: block; font-size: 14px; font-weight: 650; }
.workspace-card span:not(.workspace-avatar) { display: block; font-size: 11px; color: var(--sidebar-muted); }
.workspace-sidebar :focus-visible { outline-color: var(--sidebar-accent); outline-offset: -2px; }
.sidebar-group-title { margin: 0 12px 11px; color: var(--sidebar-muted); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; font-weight: 650; }
.sidebar-items { display: grid; gap: 2px; }
.sidebar-link { position: relative; display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 7px 10px; border-radius: 6px; color: var(--ink); font-size: 13px; }
.sidebar-link .ui-icon { width: 15px; height: 15px; color: var(--sidebar-muted); }
.sidebar-link > .ui-icon { flex-shrink: 0; }
.sidebar-link-title { min-width: 0; overflow-wrap: anywhere; }
.sidebar-section-hop { display: inline-flex; flex-shrink: 0; margin-inline-start: auto; color: var(--sidebar-accent); }
.sidebar-section-hop .ui-icon { width: 14px; height: 14px; color: inherit; }
a.sidebar-link:hover { background: var(--sidebar-hover); color: var(--sidebar-accent); }
.sidebar-link.is-active { background: var(--sidebar-hover); color: var(--sidebar-accent); font-weight: 650; }
.sidebar-link.is-active .ui-icon { color: var(--sidebar-accent); }
.sidebar-link.is-active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--sidebar-accent); }
.sidebar-link[aria-disabled="true"] { opacity: .6; }
.sidebar-link small { margin-left: auto; font-size: 10px; color: var(--sidebar-muted); }
.workspace-content { width: 100%; min-width: 0; padding: 24px clamp(22px, 2.5vw, 44px) 48px; animation: workspace-in .23s ease-out both; outline: none; }
/* Page fragments share a vertical rhythm; dialogs and printed sheets own theirs. */
@media screen {
  .workspace-content > :where(:not(.page-heading, dialog, script, style, [hidden])) + :where(:not(.script-workspace, dialog, script, style, [hidden])) { margin-block-start: var(--page-block-gap); }
}
.page-heading {
  --heading-deep: color-mix(in srgb, var(--accent) 68%, black);
  --heading-light: color-mix(in srgb, var(--accent) 47%, white);
  position: relative; isolation: isolate; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 126px; margin-bottom: var(--page-block-gap); padding: 20px 24px; border: 1px solid color-mix(in srgb, var(--accent) 88%, white); border-radius: 13px;
  background-color: var(--accent);
  background-image:
    radial-gradient(ellipse at 100% 105%, color-mix(in srgb, var(--heading-light) 20%, transparent), transparent 58%),
    radial-gradient(ellipse at 84% 0%, color-mix(in srgb, var(--heading-light) 14%, transparent), transparent 49%),
    linear-gradient(115deg, var(--heading-deep), var(--accent) 64%, color-mix(in srgb, var(--accent) 87%, black));
  box-shadow: inset 0 1px #ffffff24, 0 3px 12px var(--accent-shadow);
}
.page-heading::before { content: ""; position: absolute; z-index: -1; right: 22px; bottom: -153px; width: 250px; height: 250px; border: 1px solid #ffffff50; border-radius: 50%; box-shadow: 0 0 0 38px #ffffff0e, 0 0 0 76px #ffffff08; pointer-events: none; }
.page-heading::after { content: ""; position: absolute; z-index: -1; right: 103px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--heading-light) 45%, white); box-shadow: 68px 49px 0 2px var(--heading-light), -31px 77px 0 0 color-mix(in srgb, var(--heading-light) 84%, white); pointer-events: none; animation: heading-orbit-in .38s ease-out both; }
.page-eyebrow { margin-bottom: 5px; font-size: 10px; font-weight: 650; letter-spacing: .15em; text-transform: uppercase; color: #fff; }
h1 { font-size: 30px; line-height: 1.2; font-weight: 650; letter-spacing: -.95px; }
.page-heading h1 { font-size: clamp(23px, 2.2vw, 32px); color: #fff; }
.page-description { max-width: 690px; margin-top: 5px; color: #fffffff2; font-size: 13px; line-height: 1.5; }
.invoice-heading-tools { display: grid; gap: 12px; min-width: 0; }
.invoice-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.invoice-heading-metrics { display: flex; flex: 1; flex-wrap: wrap; gap: 8px; margin: 0; }
.invoice-heading-metrics > div { flex: 1; min-width: 125px; padding: 8px 12px; border: 1px solid #ffffff44; border-radius: 12px; background: #0003; }
.invoice-heading-metrics dt { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 11px; }
.invoice-heading-metrics dt::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ffd56b; }
.invoice-heading-metrics .invoice-metric-paid dt::before { background: #54e7ff; }
.invoice-heading-metrics dd { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: 3px 0 0; color: #fff; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.invoice-heading-metrics dd span { white-space: nowrap; }
.invoice-heading-new.primary { color: var(--accent-deep); background: #fff; border-color: #fff; }
.invoice-heading-new.primary:hover { color: var(--accent-deep); background: var(--accent-soft); }
.invoice-heading-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.invoice-heading-filters a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #ffffff44; border-radius: 8px; background: #0003; color: #fff; text-decoration: none; font-weight: 600; font-size: 11px; }
.invoice-heading-filters a:hover { background: #0005; }
.invoice-heading-filters .invoice-status-current { background: var(--accent-wash); color: var(--accent-deep); border-color: var(--accent-wash); }
.invoice-heading-filters .invoice-status-current:hover { background: #fff; }
.invoice-status-count { font-variant-numeric: tabular-nums; }
.page-heading-tools { min-width: 0; max-width: 62%; }
.page-heading:has(> .page-heading-configuration) { padding-inline-end: 66px; }
.page-heading-configuration {
  position: absolute; inset-block-start: 14px; inset-inline-end: 16px;
  display: grid; place-items: center; inline-size: 36px; block-size: 36px;
  border: 1px solid #ffffff80; border-radius: 7px; background: #0004; color: #fff;
}
.page-heading-configuration:hover { border-color: #fff; background: #0007; color: #fff; }
.page-heading-configuration:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.page-heading-configuration .ui-icon { width: 17px; height: 17px; }
.page-heading-tools > :is(.accounting-actions, .header-actions) { justify-content: flex-end; }
.page-heading-tools .primary:not(.report-filter-content *) { color: var(--accent-deep); background: #fff; border-color: #fff; }
.page-heading-tools .primary:not(.report-filter-content *):hover:not(:disabled) { color: var(--accent-deep); background: var(--accent-wash); }
.page-heading-tools .secondary:not(.report-filter-content *) { color: #fff; background: #0004; border-color: #ffffff66; }
.page-heading-tools .secondary:not(.report-filter-content *):hover:not(:disabled) { color: #fff; background: #0006; border-color: #fffc; }
.page-heading-tools :is(a, button):not(.report-filter-content *):focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.page-heading-tools :is(a, button)[aria-current="page"] { color: var(--accent-deep); background: var(--accent-wash); }
.heading-shortcuts > a:not([class]) { color: #fff; text-decoration: underline; }
.heading-shortcuts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-items: center; }
.heading-tabs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.heading-tabs .secondary { min-height: 29px; padding: 4px 8px; font-size: 11px; }
.heading-tabs a[aria-current="page"] { color: #fff; background: var(--accent-deep); border-color: var(--accent-deep); }
.heading-tabs:is(.billing-tabs, .audit-tabs) { justify-content: flex-start; gap: 8px; margin-bottom: var(--page-block-gap); }
.heading-tabs:is(.billing-tabs, .audit-tabs) .secondary { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.heading-tabs.audit-tabs { margin-bottom: 0; }
.script-git-tracking { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 9px 14px; border: 1px solid #d9d3ff; border-radius: 10px; background: #f3f0ff; }
.script-git-tracking p { margin: 0; color: #423578; }
.script-git-activity > summary { cursor: pointer; color: #423578; font-weight: 650; padding: 8px 0; }
.script-git-activity > .accounting-stack { padding-top: 8px; }
.heading-tools-stack { display: grid; gap: 9px; }
.heading-tools-stack > :empty, .page-heading-tools > :empty { display: none; }
.heading-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.heading-counts > div { padding: 4px 10px; border: 1px solid #ffffff55; border-radius: 8px; background: #0003; color: #fff; }
.heading-counts dt { font-size: 10px; }
.heading-counts dd { margin: 0; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.workspace-content :target { scroll-margin-top: calc(var(--topbar-height) + 14px); }
@media (max-width: 900px) {
  .page-heading-with-tools { align-items: stretch; flex-direction: column; gap: 14px; }
  .page-heading-tools { max-width: 100%; }
  .page-heading-tools > :is(.accounting-actions, .header-actions), .heading-shortcuts, .heading-tabs { justify-content: flex-start; }
}
.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; flex-shrink: 0; }
.primary, .secondary, .icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 36px; border: 1px solid transparent; border-radius: 7px; padding: 7px 12px; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.primary { color: #fff; border-color: var(--accent); background: var(--accent); box-shadow: 0 1px 3px var(--accent-shadow); }
.primary:hover:not(:disabled) { background: var(--accent-deep); box-shadow: 0 5px 15px var(--accent-shadow); }
.secondary, .icon-button { color: var(--ink); border-color: var(--line); background: #fff; box-shadow: 0 1px 2px #20335008; }
.secondary:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-deep); }
.primary .ui-icon, .secondary .ui-icon { width: 15px; height: 15px; }
.icon-button { padding: 9px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-bottom: 30px; }
.metric-card { --tile: #6636ee; --tile-soft: #eee7ff; position: relative; min-width: 0; padding: 21px 22px; border: 1px solid color-mix(in srgb, var(--tile) 19%, white); border-radius: 19px; background: linear-gradient(125deg, #fff, var(--tile-soft)); box-shadow: 0 4px 12px #66508005, inset 0 1px #ffffff9c; }
.metric-card:nth-child(3n + 2) { --tile: #007fa8; --tile-soft: #ddf7ff; }
.metric-card:nth-child(3n + 3) { --tile: #c25a08; --tile-soft: #fff0dd; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #685d7b; font-size: 11px; }
.metric-label .ui-icon { box-sizing: content-box; color: #fff; width: 16px; height: 16px; padding: 8px; border-radius: 10px; background: var(--tile); box-shadow: 0 4px 9px color-mix(in srgb, var(--tile) 19%, transparent); }
.metric-value { display: block; margin-top: 11px; color: var(--tile); font-size: 31px; line-height: 1.2; font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -.8px; }
.metric-caption { display: block; margin-top: 9px; color: #6d607d; font-size: 10px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 26px 0 15px; }
.section-heading h2 { font-size: 15px; font-weight: 650; letter-spacing: -.2px; }
.section-heading p, .section-heading span { color: #6e607e; font-size: 11px; }
.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 17px; }
.module-card { --module: #7735ed; --module-soft: #f2eaff; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 15px; min-height: 152px; padding: 24px; border: 1px solid color-mix(in srgb, var(--module) 18%, white); border-radius: 20px; background: linear-gradient(145deg, #fff 25%, var(--module-soft)); box-shadow: 0 4px 14px #66508005; }
.module-card:nth-child(3n + 2) { --module: #087eda; --module-soft: #e8f4ff; }
.module-card:nth-child(3n + 3) { --module: #e56514; --module-soft: #fff0e1; }
a.module-card { transition: transform .18s, box-shadow .18s, border-color .18s; }
a.module-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--module) 45%, white); box-shadow: 0 12px 24px #66508012; }
.module-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid #ffffff38; border-radius: 14px; background: linear-gradient(145deg, color-mix(in srgb, var(--module) 80%, white), var(--module)); color: #fff; box-shadow: 0 6px 13px color-mix(in srgb, var(--module) 23%, transparent), inset 0 1px #ffffff2e; }
.module-copy { min-width: 0; flex: 1; }
.module-kicker { display: block; margin-bottom: 5px; color: color-mix(in srgb, var(--module) 80%, #302d44); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.module-footer { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; margin-top: 3px; padding-top: 15px; border-top: 1px solid color-mix(in srgb, var(--module) 12%, white); }
.module-footer code { font-size: 10px; color: #6e607e; }
.module-footer .module-state { margin-top: 0; }
.module-dependencies { width: 100%; color: #6e607e; font-size: 10px; line-height: 1.7; }
.module-copy h3, .module-copy strong { display: block; margin-top: 1px; font-size: 14px; font-weight: 650; }
.module-copy p { margin-top: 7px; color: #6c607b; font-size: 11px; line-height: 1.7; }
.module-state { display: inline-flex; margin-top: 12px; color: #4e725f; font-size: 9px; font-weight: 550; }
.module-card.is-planned { background: #faf8fd; border-style: dashed; box-shadow: none; }
.module-card.is-planned .module-icon { opacity: .65; }
.module-card.is-planned .module-state { color: #9aa7b1; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 1px 3px #20335008; overflow: hidden; }
.panel-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 14px var(--panel-padding-inline); border-bottom: 1px solid var(--line); background: #fff; }
.panel-header > :is(h2, h3, div) { min-width: 0; overflow-wrap: anywhere; }
.panel-body { display: grid; gap: 12px; min-width: 0; padding: 18px var(--panel-padding-inline); }
.panel-body > :is(p, ul, ol, dl) { margin-block: 0; }
.panel-body > :is(ul, ol) { display: grid; gap: 10px; }
.panel-body > ul > li { min-width: 0; overflow-wrap: anywhere; }
.panel-body > ul > li:has(> form) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.panel-header > .ui-icon { color: #9d85be; }
.panel-title { font-size: 14px; font-weight: 650; }
.panel-header h2 { font-size: 16px; line-height: 1.3; }
.panel-description { margin-top: 4px; color: var(--muted); font-size: 12px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 19px 24px; border-bottom: 1px solid #efebf5; }
.search-form { display: flex; align-items: center; gap: 8px; min-width: 0; }
.panel > .search-form { flex-wrap: wrap; gap: 10px 12px; padding: 14px var(--panel-padding-inline); border-bottom: 1px solid var(--line); }
.panel > .search-form .search-field { flex: 1 1 240px; width: auto; max-width: 420px; }
.search-field { display: inline-flex; align-items: center; gap: 9px; min-width: 0; width: 310px; padding: 9px 11px; border: 1px solid #e0e7ea; border-radius: 9px; background: #fff; }
.search-field .ui-icon { color: #9babb5; width: 15px; height: 15px; }
.search-field input, input.search-field { min-width: 0; width: 100%; border: 0; padding: 0; color: #466171; background: transparent; outline: none; font-size: 12px; }
.search-field input::placeholder { color: #a1aeb6; }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.result-count { color: #91a1ac; font-size: 10px; white-space: nowrap; }
.rich-table-region { min-width: 0; max-width: 100%; overflow-x: auto; }
.table-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px var(--panel-padding-inline); }
.table-pagination[hidden] { display: none; }
.table-pagination-top { border-bottom: 1px solid var(--line); }
.table-pagination-bottom { border-top: 1px solid var(--line); }
.table-pagination .accounting-actions { gap: 8px; }
.table-pagination button:disabled { cursor: default; }
.table-pagination-status { color: var(--muted); font-size: 12px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.data-table thead th { padding: 9px 15px; border-bottom: 1px solid var(--line); background: #edf2f7; color: #42536a; font-size: 11px; font-weight: 650; letter-spacing: .015em; white-space: nowrap; }
.data-table tbody td, .data-table tbody th { padding: 10px 15px; border-bottom: 1px solid #e9eef4; vertical-align: middle; }
.data-table :is(th, td) > .icon-button { width: 24px; height: 24px; min-width: 24px; min-height: 24px; padding: 3px; margin-inline-start: 4px; gap: 0; border-radius: 5px; border-color: transparent; background: transparent; box-shadow: none; vertical-align: middle; }
.data-table :is(th, td) > .icon-button .ui-icon { width: 14px; height: 14px; }
.panel > .rich-table-region > .data-table tr > :nth-child(1 of :not([hidden])) { padding-inline-start: var(--panel-padding-inline); }
.panel > .rich-table-region > .data-table tr > :nth-last-child(1 of :not([hidden])) { padding-inline-end: var(--panel-padding-inline); }
.data-table tbody th { font-weight: 400; }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }
.data-table tbody tr:nth-child(even) { background: #f8fafc; }
.data-table tbody tr:hover, .data-table tbody tr:focus-within { background: var(--accent-wash); }
.entity-name { display: block; max-width: 340px; color: #4f3e68; font-weight: 600; overflow-wrap: anywhere; }
.entity-meta { display: block; margin-top: 4px; color: #7d6d8c; font-size: 10px; }
.amount-cell { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; color: #405e6c; }
.text-right { text-align: right; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid #e2e8ed; border-radius: 6px; font-size: 9px; line-height: 1.5; white-space: nowrap; }
.status-draft { color: #8e7c56; border-color: #eee5d1; background: #fcf8ee; }
.status-confirmed { color: #2d7154; border-color: #d4e9dd; background: #eef8f1; }
.table-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.table-actions .secondary { min-height: 30px; border-radius: 7px; padding: 5px 9px; font-size: 10px; }
.inline-form { display: inline; margin: 0; }
time[data-local-time] { color: #899aa6; font-size: 10px; white-space: nowrap; }
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 52px 28px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 55px; height: 55px; margin-bottom: 18px; border: 1px solid var(--accent-line); border-radius: 17px; background: var(--accent-wash); color: var(--accent); }
.empty-icon .ui-icon { width: 25px; height: 25px; }
.empty-title { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.empty-description { max-width: 420px; margin-top: 9px; color: #82738f; font-size: 12px; line-height: 1.8; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.navigation-status.is-error { border: 1px solid #eed6d6; border-radius: 9px; background: #fff5f4; color: #aa5855; font-size: 12px; line-height: 1.7; }
.overview-section { margin-top: 30px; }
.architecture-layers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 24px; }
.architecture-layers li { --layer: #8455be; --layer-soft: #f2eafd; position: relative; padding: 0 22px; border-left: 1px solid #eee9f5; }
.architecture-layers li:nth-child(4n + 2) { --layer: #2f83a4; --layer-soft: #e9f6fc; }
.architecture-layers li:nth-child(4n + 3) { --layer: #b8793c; --layer-soft: #fff2e5; }
.architecture-layers li:nth-child(4n + 4) { --layer: #b46191; --layer-soft: #fcecf5; }
.architecture-layers li:first-child { padding-left: 0; border-left: 0; }
.architecture-layers strong { display: block; margin-top: 12px; font-size: 12px; font-weight: 600; }
.architecture-layers p { margin-top: 7px; color: #6e607e; font-size: 11px; line-height: 1.8; }
.architecture-layers code { display: block; margin-top: 11px; color: color-mix(in srgb, var(--layer) 85%, #302d44); font-size: 10px; overflow-wrap: anywhere; }
.architecture-panel { margin-top: 28px; }
.layer-number { display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--layer-soft); color: color-mix(in srgb, var(--layer) 80%, #302d44); border: 1px solid color-mix(in srgb, var(--layer) 17%, white); font-size: 11px; font-weight: 650; letter-spacing: .035em; font-variant-numeric: tabular-nums; }
.dependency-cell { color: #7b6a88; font-size: 11px; }
.code-tag { display: inline-block; margin: 2px; padding: 3px 7px; border: 1px solid #e9dff4; border-radius: 6px; background: #f8f3fd; color: #83629e; font-size: 10px; }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 23px; padding: 3px 7px; border-radius: 6px; color: #8662a4; background: #f0e7fa; font-size: 10px; font-weight: 600; }
.error-panel { padding: 28px; }
.notice { margin-top: 22px; padding: 15px 18px; border: 1px solid #e6dbf1; border-radius: 11px; color: #85699c; background: #f8f1fc; font-size: 11px; line-height: 1.8; }
.notice a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.navigation-status { position: fixed; z-index: 30; bottom: 22px; left: calc(50% + 80px); width: min(540px, calc(100vw - 32px)); transform: translateX(-50%); padding: 13px 18px; border: 1px solid #e3d5f0; border-radius: 11px; color: #805b9e; background: #f9f4fd; box-shadow: 0 6px 22px #65447d12; font-size: 12px; }
.navigation-status:empty, .navigation-status[hidden] { display: none; }
.navigation-status.is-loading { display: flex; align-items: center; gap: 12px; color: #373085; border-color: #bcb0f4; background: #f4f1ff; font-size: 14px; }
.navigation-status.is-loading[hidden], .navigation-status.is-loading:empty { display: none; }
.navigation-status.is-loading::before { content: ""; flex: 0 0 18px; height: 18px; border: 3px solid #d6cdf9; border-top-color: #6550cf; border-radius: 50%; animation: navigation-spin 900ms linear infinite; }
.form-submit-status { width: 100%; margin: 10px 0 0; padding: 12px 14px; border: 1px solid #bcb0f4; border-radius: 10px; color: #373085; background: #f4f1ff; line-height: 1.5; }
@keyframes navigation-spin { to { transform: rotate(360deg); } }

#shuttle-toasts {
  position: fixed;
  z-index: 90;
  inset: 86px 16px auto auto;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 102px);
  margin: 0;
  padding: 0 4px 10px;
  overflow: auto;
  border: 0;
  background: transparent;
  color: var(--ink);
  pointer-events: none;
}
#shuttle-toasts[hidden] { display: none; }
.shuttle-toast {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px 12px 12px 14px;
  border: 1px solid #eed6dc;
  border-inline-start: 4px solid #bd394c;
  border-radius: 12px;
  background: #fffafb;
  box-shadow: 0 6px 18px #39224726;
  overflow-wrap: anywhere;
  pointer-events: auto;
}
.shuttle-toast strong { color: #922939; }
.shuttle-toast :is(p, ul) { margin: 4px 0 0; }
.shuttle-toast ul { padding-inline-start: 18px; list-style: disc; }
.shuttle-toast-dismiss {
  flex: 0 0 auto;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #922939;
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}
.shuttle-toast-dismiss:hover { background: #f7e5e8; }
:is(input, select, textarea, .picker-trigger)[aria-invalid="true"] { outline: 1px solid #bd394c; outline-offset: 1px; }
@media (prefers-reduced-motion: no-preference) {
  .shuttle-toast { animation: shuttle-toast-in 160ms ease-out; }
}
@keyframes shuttle-toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media print { #shuttle-toasts { display: none; } }
#shuttle-root[aria-busy="true"] > .section-theme::after { content: ""; position: fixed; z-index: 40; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--accent-glow), var(--accent), var(--accent-end)); animation: loading-pulse 1s ease-in-out infinite alternate; }
@keyframes workspace-in { from { opacity: .86; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heading-orbit-in { from { transform: translate(-5px, 3px); } }
@keyframes loading-pulse { from { opacity: .4; } to { opacity: 1; } }
@media (max-width: 1200px) {
  .workspace-content { padding: 22px; }
  .modules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { padding: 19px; }
  .page-heading { padding: 20px; }
  .data-table thead th, .data-table tbody td, .data-table tbody th { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .workspace-sidebar { padding-left: 12px; padding-right: 12px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  h1 { font-size: 28px; }
  .page-heading h1 { font-size: 31px; }
}
@media (max-width: 760px) {
  .section-theme { --topbar-height: 64px; }
  .topbar-inner { gap: 12px; padding: 0 20px; }
  .brand-wordmark { font-size: 23px; }
  .console-label { margin-left: 3px; font-size: 8px; }
  .workspace-indicator { font-size: 10px; }
  .app-shell { display: block; min-height: calc(100dvh - var(--topbar-height)); }
  .workspace-sidebar { position: sticky; z-index: 15; top: var(--topbar-height); display: block; min-height: 0; max-height: none; padding: 9px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--sidebar-line); }
  .workspace-card, .sidebar-group-title { display: none; }
  .sidebar-items { display: flex; width: max-content; gap: 5px; }
  .sidebar-link { gap: 7px; min-height: 37px; padding: 8px 10px; white-space: nowrap; font-size: 11px; }
  .sidebar-link small { display: none; }
  .sidebar-link.is-active::before { display: none; }
  .workspace-content { padding: 14px 12px 28px; }
  :root { --page-block-gap: 14px; --panel-padding-inline: 16px; --form-column-gap: 14px; }
  .page-heading { min-height: 112px; padding: 15px 16px; border-radius: 10px; }
  .page-heading::before { right: -126px; bottom: -164px; }
  .page-heading::after { right: 23px; top: 28px; opacity: .6; }
  h1 { font-size: 27px; }
  .page-heading h1 { font-size: 24px; }
  .page-description { font-size: 11px; }
  .metrics-grid { gap: 12px; margin-bottom: 24px; }
  .metric-card { padding: 17px; border-radius: 14px; }
  .metric-label { font-size: 10px; }
  .metric-value { font-size: 27px; }
  .metric-caption { font-size: 9px; }
  .modules-grid { gap: 12px; }
  .module-card { flex-direction: column; gap: 13px; min-height: 186px; padding: 19px; border-radius: 15px; }
  .module-copy h3, .module-copy strong { font-size: 13px; }
  .module-copy p { font-size: 10px; }
  .panel-header { padding-block: 12px; }
  .toolbar { flex-wrap: wrap; padding: 16px; gap: 10px; }
  .search-form { flex: 1; }
  .search-field { flex: 1; width: auto; }
  .search-field input { font-size: 16px; }
  .result-count { width: 100%; font-size: 9px; }
  .data-table { min-width: 620px; font-size: 11px; }
  .data-table thead th, .data-table tbody td, .data-table tbody th { padding-left: 16px; padding-right: 16px; }
  .architecture-layers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding: 21px; }
  .architecture-layers li { padding: 0; border: 0; }
  .empty-state { padding: 38px 22px; }
  .navigation-status { left: 50%; bottom: 16px; }
}
@media (max-width: 400px) {
  .workspace-indicator { display: none; }
  .modules-grid { grid-template-columns: 1fr; }
  .module-card { flex-direction: row; min-height: auto; }
  .metrics-grid { gap: 9px; }
  .metric-card { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.mode-switch { display: flex; gap: 4px; padding: 4px; background: var(--accent-wash); border: 1px solid var(--accent-line); border-radius: 12px; }
.mode-switch a { padding: 6px 12px; border-radius: 8px; color: #54466c; font-size: 12px; font-weight: 650; white-space: nowrap; }
.mode-switch a:hover { background: var(--accent-soft); }
.mode-switch a.is-current { color: #fff; background: var(--accent-deep); }
.configuration-tabs { overflow-x: auto; border-bottom: 1px solid var(--line); }
.configuration-tabs ul { display: flex; gap: 6px; width: max-content; padding: 6px 12px 0; }
.configuration-tabs a { display: block; padding: 10px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 650; }
.configuration-tabs a:hover, .configuration-tabs a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); border-radius: 8px 8px 0 0; }
.configuration-tabs a[aria-current="page"] { border-bottom-color: var(--accent); }
.configuration-tabs a:focus-visible { outline-offset: -3px; }
.configuration-note { padding: 16px var(--panel-padding-inline); color: var(--muted); }
.configuration-meta, .configuration-preview, .document-actors { margin: 0; padding: 16px var(--panel-padding-inline); display: flex; gap: 14px 25px; flex-wrap: wrap; }
.configuration-meta > div, .document-actors > div { min-width: 0; overflow-wrap: anywhere; }
.configuration-meta dt, .document-actors dt { color: var(--muted); font-size: 12px; }
.configuration-meta dd, .document-actors dd { margin: 2px 0 0; }
.configuration-meta, .document-actors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 24px; padding-block: 20px; }
.configuration-meta dd, .document-actors dd { min-height: 1.5em; margin-top: 6px; font-size: 14px; font-weight: 600; line-height: 1.5; }
:is(.configuration-meta, .document-actors) time[data-local-time] { color: inherit; font-size: inherit; white-space: normal; }
:is(.configuration-meta, .document-actors) dd a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.panel > :is(.configuration-meta, .document-actors) + .accounting-actions:not(:empty, .panel-body, .accounting-form, .accounting-note) { padding: 16px var(--panel-padding-inline); border-top: 1px solid var(--line); background: var(--accent-wash); }
.panel > .configuration-meta + .accounting-actions + p:not([class]) { margin: 0; padding: 12px var(--panel-padding-inline); }
@media (max-width: 1200px) { .configuration-meta, .document-actors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .configuration-meta, .document-actors { grid-template-columns: minmax(0, 1fr); } }
.migration-plan { padding: clamp(12px, 2.4vw, 24px); display: grid; gap: 12px; }
.migration-plan section { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.migration-plan h4 { margin: 0 0 8px; }
.migration-plan p { margin: 6px 0; }
.migration-plan :is(ol, ul) { margin: 8px 0 0; padding-inline-start: 24px; }
.migration-plan ol { list-style: decimal; }
.migration-plan ul { list-style: disc; }
.migration-plan li { margin-block: 4px; overflow-wrap: anywhere; }
.migration-plan summary { cursor: pointer; color: var(--accent); }
.configuration-steps { padding: 14px 24px 18px 44px; list-style: initial; }
.configuration-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.configuration-preview.preview-inline { display: flex; }
.configuration-preview label { min-width: 0; display: grid; justify-items: start; gap: 6px; color: var(--muted); font-size: 12px; }
.configuration-preview :is(input:not([type=checkbox]), select, textarea) { width: 100%; min-height: 32px; padding: 5px; border: 1px solid var(--line); border-radius: 7px; background: var(--canvas); color: var(--muted); opacity: 1; }
.configuration-preview-rows { grid-column: 1 / -1; padding: 12px; background: var(--accent-soft); border-radius: 10px; }
.configuration-preview-rows p { color: var(--muted); }
.configuration-source pre { margin: 0; padding: 16px var(--panel-padding-inline); overflow: auto; background: var(--canvas); border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .mode-switch a { padding: 6px 8px; font-size: 10px; }
}
@media (max-width: 350px) {
  .topbar-inner:has(.mode-switch) { padding-inline: 10px; gap: 6px; }
  .mode-switch a { padding-inline: 5px; }
}

.accounting-stack { display: grid; gap: var(--page-block-gap); min-width: 0; }

/* Separate completeness findings from the official reference documents. */
.accounting-stack:has(#financial-company-reports) > .panel > ul {
  display: grid; gap: 10px; margin: 0; padding: 18px var(--panel-padding-inline);
}
.accounting-stack:has(#financial-company-reports) > .panel > ul:empty { padding: 0; }
.accounting-stack:has(#financial-company-reports) > .panel > ul > li { min-width: 0; overflow-wrap: anywhere; }
.accounting-stack:has(#financial-company-reports) > .panel:has(> ul):not(:has(> ul > li > a)) > .panel-header {
  background: #fff9f0; border-bottom-color: #f4dfc1;
}
.accounting-stack:has(#financial-company-reports) > .panel > ul:not(:has(> li > a)) > li {
  position: relative; padding: 12px 16px 12px 36px; border: 1px solid #f4dfc1;
  border-radius: 8px; background: #fff9f0; color: #754315; font-size: 14px; line-height: 1.6;
}
.accounting-stack:has(#financial-company-reports) > .panel > ul:not(:has(> li > a)) > li::before {
  content: ""; position: absolute; inset-inline-start: 16px; top: 20px;
  width: 7px; height: 7px; border-radius: 50%; background: #c7791e;
}
.accounting-stack:has(#financial-company-reports) > .panel > ul:has(> li > a) {
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.accounting-stack:has(#financial-company-reports) > .panel > ul > li > a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px;
  height: 100%; min-width: 0; padding: 14px 16px; border: 1px solid var(--accent-line);
  border-radius: 8px; background: var(--accent-wash); color: var(--accent-deep);
  font-size: 14px; font-weight: 600; line-height: 1.5; text-decoration: underline; text-underline-offset: 3px;
}
.accounting-stack:has(#financial-company-reports) > .panel > ul > li > a::after {
  content: "↗"; font-size: 19px; font-weight: 500; text-decoration: none;
}
.accounting-stack:has(#financial-company-reports) > .panel > ul > li > a:hover {
  border-color: var(--accent); background: var(--accent-soft);
}
@media (max-width: 900px) {
  .accounting-stack:has(#financial-company-reports) > .panel > ul:has(> li > a) { grid-template-columns: minmax(0, 1fr); }
}
.row-editor { min-width: 0; }
.purchase-calculated-amount { display: flex; align-items: end; gap: 6px; flex-wrap: wrap; }
.purchase-calculated-amount > span:first-child { flex-basis: 100%; font-size: 13px; }
.purchase-calculated-amount > output { font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; color: var(--accent-deep); }
[data-row-condition-field][hidden] { display: none !important; }
.row-editor .data-table :is(input, select, textarea) { min-width: 0; width: 100%; }
.row-editor .data-table :is(input[type=checkbox], input[type=radio]) { width: auto; }
.row-editor .data-table :is(td, th):has([data-row-output]) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-editor .data-table td:has(button[name=editor_action]) { width: 1%; white-space: nowrap; }
.accounting-entry > .row-editor > .accounting-actions { padding: 12px var(--panel-padding-inline); }
.row-editor .data-table tr > :last-child { position: sticky; right: 0; z-index: 1; box-shadow: -1px 0 var(--line); }
.row-editor .data-table thead tr > :last-child { z-index: 2; }
.row-editor .data-table tbody tr > :last-child { background: #fff; }
.row-editor .data-table tbody tr:nth-child(even) > :last-child { background: #f8fafc; }
.row-editor .data-table tbody tr:is(:hover, :focus-within) > :last-child { background: var(--accent-wash); }

[data-row-preview-status] { margin: 0; min-height: 1.4em; color: var(--muted); }
[data-row-calculating] :is([data-row-total], [data-row-output]) { color: var(--muted); }
[data-row-preview-output]:empty { display: none; }
.accounting-stack > .notice { margin: 0; padding: 18px var(--panel-padding-inline); }
.bank-heading-actions { min-width: 0; }
.bank-heading-actions .bank-heading-primary { color: var(--accent-deep); background: #fff; border-color: #fff; }
.bank-heading-actions .bank-heading-primary:hover { background: var(--accent-soft); }
.bank-heading-actions .secondary { color: #fff; background: #132c4550; border-color: #ffffff60; }
.bank-heading-actions .secondary:hover { color: #fff; background: #132c4580; border-color: #fff; }
.bank-manual-wide { grid-column: 1 / -1; }
.accounting-form { display: grid; align-content: start; gap: var(--form-row-gap) var(--form-column-gap); min-width: 0; padding: 18px var(--panel-padding-inline); }
.accounting-form label { display: grid; align-content: start; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.accounting-form .accounting-check { display: flex; align-items: center; gap: 8px; }
.accounting-form :is(select, input:not([type=checkbox], [type=radio], [type=hidden])),
.accounting-entry :is(select, input:not([type=checkbox], [type=radio], [type=hidden])),
:is(.accounting-form, .accounting-entry) textarea:not(.manifest-editor) {
  min-width: 0; max-width: 100%; width: 100%; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--ink);
}
:is(.accounting-form, .accounting-entry) textarea:not(.manifest-editor) { min-height: 96px; resize: vertical; line-height: 1.55; }
.accounting-form label:not(.icon-choice):has(> input:is([type=checkbox], [type=radio])) { display: flex; align-items: start; gap: 8px; }
:is(.accounting-form, .accounting-entry) :where(input:is([type=checkbox], [type=radio])) { flex: none; width: 16px; height: 16px; margin: 3px 0 0; }
.accounting-form > :is(button, .primary, .secondary) { justify-self: start; max-width: 100%; white-space: normal; }
.accounting-form[action="/accounting/financial-company"] {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px;
  padding-block-end: 12px;
}
.accounting-form[action="/accounting/financial-company"] > label { flex: 0 1 11rem; }
.accounting-form[action="/accounting/financial-company"] > button { flex: 0 0 auto; }
.accounting-form[action="/accounting/financial-company"]:has(> a)::after {
  content: ""; order: 1; flex: 0 0 100%; border-top: 1px solid var(--line);
}
.accounting-form[action="/accounting/financial-company"] > a { order: 2; }
.accounting-form[action="/accounting/financial-company"] ~ .accounting-note { margin: 0; padding-block: 4px; }
.accounting-form[action="/accounting/financial-company"] ~ .accounting-note:last-child { padding-block-end: 14px; }
.accounting-form > fieldset:not([class]) { display: grid; gap: 12px; min-inline-size: 0; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; }
.accounting-form > fieldset:not([class]) > legend { padding-inline: 5px; font-weight: 650; }
.form-fields { display: grid; gap: var(--form-row-gap); min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.form-grid, .accounting-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--form-row-gap) var(--form-column-gap); min-width: 0; }
.form-grid > *, .accounting-fields > * { min-width: 0; }
.checkbox-line { display: flex; align-items: start; gap: 8px; }
.accounting-entry input[name^="amount"] { min-width: 100px; }
.accounting-actions, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; min-width: 0; }
.module-update-status { display: flex; align-items: center; gap: 7px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.module-update-status::before { content: ""; flex: 0 0 auto; width: 10px; height: 10px; border: 2px solid var(--accent-line); border-top-color: var(--accent); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .module-update-status::before { animation: module-update-spin .8s linear infinite; }
}
@keyframes module-update-spin { to { transform: rotate(360deg); } }
.accounting-actions.panel-body { display: flex; }
.financial-workspace-links.accounting-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
  margin: 0;
  list-style: none;
}
.financial-workspace-links > li { min-width: 0; }
.financial-workspace-links a {
  justify-content: flex-start;
  width: 100%;
  min-height: 62px;
  height: 100%;
  padding: 14px 16px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: start;
  background: var(--accent-wash);
  border-color: var(--accent-line);
  color: var(--accent-deep);
}
.directory-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.directory-search > label { min-width: 0; }
.directory-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .directory-search { grid-template-columns: minmax(0, 1fr); } }
:is(.accounting-actions, .form-actions) > :is(form, button, a) { max-width: 100%; }
:is(.accounting-actions, .form-actions) > :is(button, a) { white-space: normal; }
.accounting-entry > :is(.accounting-actions, .form-actions) { padding: 18px var(--panel-padding-inline); }
.accounting-note { padding: 10px var(--panel-padding-inline); color: var(--muted); }
.panel-body > .accounting-note { padding: 0; }
.panel-body > .accounting-form, .accounting-form .accounting-form { padding: 0; }
.form-error { padding: 12px 18px; border-radius: 10px; background: #ffe8e5; color: #7a2421; }
.accounting-error { margin-bottom: 16px; padding: 12px 18px; border-radius: 12px; background: #ffe8e5; color: #7a2421; }

.service-act-form { --act-padding: clamp(14px, 2vw, 24px); }
.service-act-form > .accounting-error { margin: var(--act-padding) var(--act-padding) 0; }
.act-form-section { display: grid; gap: 12px; padding: 17px var(--act-padding); }
.act-form-section + .act-form-section { border-top: 1px solid var(--line); }
.act-form-section h2 { font-size: 16px; line-height: 1.35; }
.act-form-hint { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.act-form-section h2 + .act-form-hint { margin-top: -7px; }
.act-form-grid { display: grid; align-items: start; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; max-width: 960px; }
.act-form-field { display: grid; gap: 5px; min-width: 0; font-size: 13px; font-weight: 600; }
.act-form-field :is(input, select, button, small) { font-weight: 400; }
.act-required { color: #a22c48; font-size: 1em; font-weight: 700; }
.act-form-wide { grid-column: 1 / -1; max-width: 640px; }
.act-party-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; }
.act-party-links a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.act-services .rich-table-region { border: 1px solid var(--line); border-radius: 7px; }
.act-services .data-table { min-width: 630px; }
.act-services .data-table td:first-of-type { width: 46%; min-width: 235px; }
.act-discount { max-width: 220px; }
.act-checks { display: grid; gap: 4px; justify-items: start; }
.act-checks .accounting-check { display: flex; align-items: start; min-height: 38px; gap: 9px; padding: 7px 0; cursor: pointer; }
.act-checks input[type=checkbox] { flex: none; inline-size: 16px; block-size: 16px; margin: 3px 0 0; }
.act-form-footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px var(--act-padding); border-top: 1px solid var(--line); background: #f8fafc; }
@media (max-width: 850px) {
  .act-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .act-form-grid { grid-template-columns: minmax(0, 1fr); }
}
.data-table a { color: var(--accent); text-decoration: underline; }

.configuration-subtypes { display: grid; gap: 3px; margin: 2px 0 3px 20px; padding-left: 7px; border-left: 1px solid var(--sidebar-line); }
.configuration-subtypes .sidebar-link { min-height: 34px; padding: 7px 9px; }
.configuration-subtypes .ui-icon { width: 14px; height: 14px; }
.has-selected-child > .sidebar-link { color: var(--sidebar-accent); }

.handler-source { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.handler-source summary { cursor: pointer; padding: 12px; overflow-wrap: anywhere; }
.handler-source summary span { margin-left: 8px; color: var(--accent); font-size: 12px; }
.configuration-source-path { padding: 0 12px 10px; color: var(--muted); overflow-wrap: anywhere; }

.print-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.document-sheet { max-width: 900px; padding: clamp(16px, 4vw, 40px); overflow-x: auto; color: #222; background: #fff; font-family: "DejaVu Serif", Georgia, serif; line-height: 1.4; }
.document-sheet :is(h1, h2, h3) { margin-block: 0 12px; }
.document-sheet p { margin-block: 8px; }
.document-sheet table { width: 100%; margin-block: 16px; border-collapse: collapse; }
.document-sheet :is(th, td) { padding: 7px 9px; border: 1px solid #bbb; text-align: left; overflow-wrap: anywhere; }
.document-sheet th { background: #f6f6f6; }
.document-sheet .right { text-align: right; }
@media print {
  body:has(.printed-document) { background: #fff; }
  body:has(.printed-document) :is(.app-topbar, .workspace-sidebar, .skip-link, .print-controls, .navigation-status) { display: none; }
  body:has(.printed-document) :is(.app-shell, .workspace-content) { display: block; padding: 0; width: auto; min-height: 0; animation: none; }
  .printed-document { max-width: none; padding: 0; border: 0; box-shadow: none; overflow: visible; }
  .printed-document thead { display: table-header-group; }
  .printed-document tr { break-inside: avoid; }
}

/* Coordinates are relative to the four pages of the published A4 form. */
.fop-tax-sheet.document-sheet {
  width: min(100%, 850px);
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  display: grid;
  gap: 16px;
}
.fop-tax-page {
  position: relative;
  container-type: inline-size;
  background: white;
  color: black;
  font-family: "Times New Roman", serif;
}
@media screen {
  .fop-tax-page { box-shadow: 0 2px 8px rgb(15 23 42 / 12%); }
}
.fop-tax-page img { display: block; width: 100%; height: auto; }
.fop-tax-field {
  position: absolute;
  transform: translateY(-50%);
  font-size: 1.32cqw;
  line-height: 1.06;
  overflow-wrap: anywhere;
}
.fop-tax-field.center { text-align: center; }
.fop-tax-field.amount { text-align: right; font-variant-numeric: tabular-nums; }
.fop-tax-field.ruled:not(:empty) { background: white; }
.fop-tax-field.activity { padding: .65cqw .3cqw; background: white; font-size: 1.15cqw; }
@page fop-tax { size: A4 portrait; margin: 0; }
@media print {
  body:has(.fop-tax-sheet.printed-document) .workspace-content { max-width: none; }
  .fop-tax-sheet.printed-document { display: block; width: 210mm; margin: 0; page: fop-tax; }
  .fop-tax-page { width: 210mm; height: 297mm; break-inside: avoid; }
  .fop-tax-page img { height: 297mm; }
  .fop-tax-field { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .fop-tax-page:not(:last-child) { break-after: page; }
}

.status-unpaid { color: #9b4415; border-color: #f6d0a8; background: #fff1e0; }
.status-partial { color: #17548e; border-color: #bcdaf7; background: #edf6ff; }
.invoice-payment-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), max-content)); align-items: end; }

.section-nav {
  display: flex; align-items: center; flex: 1 1 auto; min-width: 0; gap: 20px;
}
.section-menu { flex: none; }
.section-menu-trigger {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 14px;
  border: 1px solid #633cda; border-radius: 10px; background: #633cda; color: #fff;
  box-shadow: 0 3px 9px #633cda20; font-size: 13px; font-weight: 650;
  cursor: pointer; list-style: none; white-space: nowrap;
}
.section-menu-trigger::-webkit-details-marker { display: none; }
.section-menu-trigger > .ui-icon:first-child { width: 17px; height: 17px; }
.section-menu-trigger > .ui-icon:last-child { width: 13px; height: 13px; margin-inline-start: 3px; }
.section-menu-trigger:hover, .section-menu[open] > .section-menu-trigger { background: #4c28b9; border-color: #4c28b9; }
.section-menu[open] > .section-menu-trigger > .ui-icon:last-child { transform: rotate(90deg); }
.section-nav-current { display: flex; align-items: center; gap: 10px; min-width: 0; border-inline-start: 1px solid #e4dfed; padding-inline-start: 20px; }
.section-nav-current-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.section-nav-current-icon .ui-icon { width: 16px; height: 16px; }
.section-nav-current-copy { display: grid; min-width: 0; line-height: 1.4; }
.section-nav-current-copy small { overflow: hidden; color: #746a85; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.section-nav-current-copy strong { overflow: hidden; color: #302343; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.section-menu:not([open]) > .section-menu-panel { display: none; }
.section-menu-panel {
  position: fixed; z-index: 35; top: calc(var(--topbar-height) + 10px); inset-inline-start: 24px;
  width: min(1080px, calc(100vw - 48px)); max-height: calc(100dvh - var(--topbar-height) - 22px);
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c4b6de transparent;
  border: 1px solid #dfd8ed; border-radius: 18px; background: #fff; color: #302343;
  box-shadow: 0 24px 65px #33204d30, 0 4px 12px #33204d0d;
}
.section-menu-heading { display: flex; align-items: center; gap: 13px; padding: 20px 24px; border-bottom: 1px solid #eae4f3; background: linear-gradient(110deg, #f1eaff, #f4f8ff 70%, #fff5eb); }
.section-menu-heading-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: #633cda; color: #fff; box-shadow: 0 4px 12px #633cda26; }
.section-menu-heading h2 { font-size: 18px; font-weight: 700; letter-spacing: -.025em; }
.section-menu-heading p { margin-top: 2px; color: #6a607b; font-size: 12px; }
.section-menu-categories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 24px; }
.section-menu-category { --category-color: #633cda; min-width: 0; border-top: 3px solid var(--category-color); }
.section-menu-category:nth-child(4n + 2) { --category-color: #0783b0; }
.section-menu-category:nth-child(4n + 3) { --category-color: #d75b19; }
.section-menu-category:nth-child(4n + 4) { --category-color: #aa3c82; }
.section-menu-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 58px; padding: 12px 3px; }
.section-menu-category-heading h3 { color: #584c6c; font-size: 12px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.section-menu-category-heading > span { display: grid; place-items: center; flex: none; min-width: 22px; height: 22px; padding-inline: 5px; border-radius: 6px; background: color-mix(in srgb, var(--category-color) 9%, white); color: color-mix(in srgb, var(--category-color) 70%, #302343); font-size: 11px; font-weight: 700; }
.section-nav-group { display: grid; gap: 5px; }
.section-nav-group a {
  display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px;
  border: 1px solid transparent; border-radius: 11px; color: #3d334c; font-size: 13px; font-weight: 600;
}
.section-nav-group a:is(:hover, [aria-current="page"]) { border-color: var(--accent-line); background: var(--accent-wash); color: var(--accent-deep); }
.section-nav-group a:focus-visible { outline-offset: 1px; }
.section-menu-icon { display: grid; place-items: center; flex: none; width: 33px; height: 33px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.section-menu-icon .ui-icon { width: 17px; height: 17px; }
.section-menu-link-title { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.section-menu-link-arrow { margin-inline-start: auto; color: #a397b6; }
.section-menu-link-arrow .ui-icon { width: 11px; height: 11px; }
.section-nav-group a[aria-current="page"] .section-menu-icon { background: var(--accent); color: #fff; }
.section-nav-group a[aria-current="page"] .section-menu-link-arrow { width: 7px; height: 7px; margin-inline-end: 3px; border-radius: 50%; background: var(--accent); }
.section-nav-group a[aria-current="page"] .section-menu-link-arrow .ui-icon { display: none; }
@media (max-width: 1000px) {
  .section-menu-panel { width: min(720px, calc(100vw - 48px)); }
  .section-menu-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: no-preference) {
  .section-menu-trigger > .ui-icon:last-child { transition: transform .15s ease; }
  .section-menu[open] > .section-menu-panel { animation: section-menu-in .15s ease-out; }
  @keyframes section-menu-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
}
@media print { .section-menu-panel { display: none; } }
.page-heading:has(> .page-heading-tools > .report-toolbar) {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 15px;
}
.page-heading-tools:has(> .report-toolbar) { width: 100%; max-width: none; }
.report-toolbar { container: report-toolbar / inline-size; }
.report-toolbar-actions { margin-top: 12px; }
.report-toolbar .report-filters {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  align-items: stretch;
  gap: 8px;
  padding: 0;
}
.report-generate { min-height: 48px; align-self: stretch; }
@container report-toolbar (min-width: 900px) {
  .report-filters:has(> .report-filter-group:nth-child(4)) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  }
  .report-filters:not(:has(> .report-filter-group:nth-child(4))) {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), max-content));
  }
}
.report-filter-group { min-width: 0; align-self: stretch; }
.report-filter-group[open] { grid-column: 1 / -1; }
.report-filter-trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid #ffffff66;
  border-radius: 7px;
  background: #09273445;
  color: #fff;
  cursor: pointer;
  list-style: none;
  text-align: start;
  transition: background-color .16s, border-color .16s, box-shadow .16s;
}
.report-filter-group:not([open]) > .report-filter-trigger { height: 100%; }
.report-filter-trigger::-webkit-details-marker { display: none; }
.report-filter-trigger:hover, .report-filter-group[open] > .report-filter-trigger {
  border-color: #ffffffe0;
  background: #08233083;
}
.report-filter-trigger:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.report-filter-icon {
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 5px; background: #fff2; color: #fff;
}
.report-filter-icon .ui-icon { width: 18px; height: 18px; }
.report-filter-copy { display: grid; gap: 3px; min-width: 0; }
.report-filter-copy strong { color: #fff; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.report-filter-value {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  color: #ffffffed; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere;
}
.report-filter-arrow { display: grid; place-items: center; color: #fff; }
.report-filter-arrow .ui-icon { width: 16px; height: 16px; }
.report-filter-group[open] .report-filter-arrow { transform: rotate(90deg); }
@container report-toolbar (max-width: 520px) {
  .report-filter-trigger { gap: 7px; padding: 8px; }
  .report-filter-icon { width: 28px; height: 28px; }
  .report-filter-icon .ui-icon { width: 15px; height: 15px; }
  .report-filter-arrow .ui-icon { width: 13px; height: 13px; }
}
.report-filter-content { display: grid; gap: 14px; min-width: 0; padding: 16px; }
.report-filter-group[open] > .report-filter-content { background: #fff; color: var(--ink); border-radius: 0 0 7px 7px; }
.report-filter-content h3 { margin: 0; color: var(--ink); font-size: 16px; }
.report-modal-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.accounting-form[action="/reports/management"] .accounting-check:has(> input[name="consolidate"]) { grid-column: 1 / -1; display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 4px 8px; overflow-wrap: normal; }
.accounting-form[action="/reports/management"] .accounting-check > input[name="consolidate"] { grid-column: 1; grid-row: 1 / span 2; }
.accounting-form[action="/reports/management"] .accounting-check:has(> input[name="consolidate"]) > .entity-meta { grid-column: 2; grid-row: 2; min-width: 0; margin: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.report-filter-dialog { width: min(650px, calc(100vw - 24px)); max-height: 85vh; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 20px 65px #2414403d; }
.report-filter-dialog::backdrop { background: #22123d70; }
.report-modal-actions { display: none; }
.report-filter-dialog .report-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.report-period-actions { display: flex; flex-wrap: wrap; gap: 7px; grid-column: 1 / -1; }
.report-period-pickers { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; grid-column: 1 / -1; }
.report-period-picker { display: flex; align-items: end; gap: 7px; }
.report-table .data-table :is(th, td) { white-space: nowrap; }
.report-table .data-table td.report-description { white-space: normal; min-width: 11rem; }
.report-totals .data-table tbody { font-weight: 650; }
.report-totals .data-table tbody :is(td, th) { background: var(--accent-wash); }
.report-totals .data-table :is(th, td):nth-child(n+2),
.report-balance .data-table :is(th, td):nth-child(n+4),
.report-movements .data-table :is(th, td):nth-child(n+5),
.report-card .data-table :is(th, td):nth-child(n+8) {
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.report-balance .data-table :is(th, td):is(:nth-child(4), :nth-child(6), :nth-child(8)) {
  border-inline-start: 1px solid var(--line);
}
.report-balance .data-table thead :is(:nth-child(8), :nth-child(9)) { background: var(--accent-soft); color: var(--accent-deep); }
.report-export { gap: 0; }
.report-export .secondary { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.report-export .secondary:not(:first-child) { margin-inline-start: -1px; border-start-start-radius: 0; border-end-start-radius: 0; }
.report-export .secondary:not(:last-child) { border-start-end-radius: 0; border-end-end-radius: 0; }
.report-export .secondary:is(:hover, :focus-visible) { position: relative; z-index: 1; }
.report-pagination { justify-content: space-between; }
@media screen and (min-width: 761px) {
  .report-table:not(.report-totals) > .rich-table-region { max-height: min(65dvh, 780px); overflow: auto; }
  .report-table:not(.report-totals) .data-table thead th { position: sticky; top: 0; z-index: 1; }
}
@media (max-width: 760px) {
  .section-theme, .section-theme[data-section="configurator"] { --topbar-height: 99px; }
  .topbar-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 50px 47px;
    gap: 0 9px;
    padding-inline: 12px;
  }
  .configurator-mode-label { justify-self: end; max-width: 100%; }
  .topbar-actions { justify-content: space-between; grid-column: 1 / -1; margin: 0; }
  .workspace-switch .workspace-switch-panel { top: var(--topbar-height); }
}

.manifest-editor { resize: vertical; width: 100%; min-height: 15rem; padding: 12px; background: #f7f4fc; color: #35284c; border: 1px solid var(--line); border-radius: 8px; font: 12px/1.55 ui-monospace, monospace; }
.editor-layout { display: grid; grid-template-columns: repeat(var(--editor-columns, 2), minmax(0, 1fr)); gap: var(--form-row-gap) var(--form-column-gap); min-width: 0; }
.editor-layout > :is(.accounting-actions, .form-actions, .accounting-error, .form-error) { grid-column: 1 / -1; }
.editor-layout > button[type=submit] { grid-column: 1 / -1; justify-self: start; }
.editor-layout > .choice-list { grid-column: 1 / -1; }
.choice-list { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--accent-line); border-radius: 12px; }
.choice-list legend { padding-inline: 6px; font-weight: 600; }
.choice-list [data-row-table] > button { margin-top: 10px; }
.choice-list td:nth-child(2) { width: 100%; min-width: 180px; }
.choice-list textarea { width: 100%; }
.treasury-fields { min-width: 0; margin: 0; padding: 0; border: 0; gap: 14px; }
.treasury-fields > details { grid-column: 1 / -1; min-width: 0; }
.treasury-fields > details > summary { padding: 10px 12px; color: #4338ca; font-weight: 650; cursor: pointer; border-radius: 8px; background: #eef2ff; }
.treasury-fields .accounting-line { margin-block: 12px; }
.editor-preview-field { grid-column: span var(--field-span, 1); min-width: 0; }
.editor-preview-field label { display: grid; gap: 5px; }
.editor-validation-messages { margin: 6px 0 0; color: #8a4470; font-size: 11px; }
@media (max-width: 620px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-preview-field { grid-column: 1 / -1; }
}

.configurator-switch { position: relative; margin-bottom: 10px; }
.configurator-switch > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.configurator-switch > summary::-webkit-details-marker { display: none; }
.configurator-switch > summary > .ui-icon { width: 14px; height: 14px; margin-inline-start: auto; color: var(--sidebar-muted); }
.configurator-switch[open] > summary > .ui-icon { transform: rotate(90deg); }
.configurator-switch-options {
  position: absolute; z-index: 2; inset-block-start: calc(100% + 4px); inset-inline: 0;
  display: grid; gap: 2px; padding: 4px; border: 1px solid var(--sidebar-line);
  border-radius: 8px; background: #fff; box-shadow: 0 8px 18px #2e252222;
}

.script-shell > .workspace-content { padding: 0; background: #fff; }
.script-shell > .workspace-content[hidden] { display: none; }
.configuration-branch-menu code { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.configuration-branch-protected { font-size: 10px; opacity: .8; }
.configuration-branch-menu .service-menu-panel > a { display: block; padding: 8px 10px; border-radius: 6px; color: inherit; }
.configuration-branch-menu .service-menu-panel > a:hover { background: #eee8ff; }
.configuration-branch-picker > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; cursor: pointer; list-style: none; font-weight: 650; }
.configuration-branch-picker > summary::-webkit-details-marker { display: none; }
.configuration-branch-picker > summary .ui-icon { width: 13px; height: 13px; }
.configuration-branch-picker[open] > summary .ui-icon { transform: rotate(90deg); }
.configuration-branch-picker[open] { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.configuration-branch-picker .branch-filter { display: block; padding: 0 10px 7px; }
.configuration-branch-picker input { width: 100%; min-width: 0; }
.configuration-branch-choices { max-height: 17rem; overflow: auto; overscroll-behavior: contain; }
.configuration-branch-choices button { display: flex; align-items: center; gap: 7px; width: 100%; padding: 8px 10px; border: 0; border-radius: 0; background: transparent; text-align: start; color: var(--ink); cursor: pointer; }
.configuration-branch-choices button > span { flex: none; width: 14px; color: var(--accent); }
.configuration-branch-choices button code { flex: 1; max-width: none; }
.configuration-branch-choices button small { color: var(--muted); font-size: 10px; }
.configuration-branch-choices button:is(:hover, :focus-visible), .configuration-branch-choices button[aria-current="true"] { background: var(--accent-soft); }
.configuration-branch-choices button[hidden], .configuration-branch-picker [hidden] { display: none; }
.git-clone-panel .panel-body { gap: 16px; }
.git-clone-panel label { display: grid; gap: 8px; min-width: 0; font-size: 13px; font-weight: 600; }
.git-clone-panel input { width: 100%; min-width: 0; font-family: monospace; font-size: 13px; font-weight: 400; }
.git-clone-command { min-width: 0; margin: 0; padding: 14px 16px; border: 1px solid var(--accent-line); border-radius: 8px; background: var(--accent-wash); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
.git-clone-command code { font: inherit; }
.git-workspace .git-branch-selected > :is(td, th) { background: var(--accent-soft); }
.git-workspace .git-operation { padding: 0; }
.git-operation > summary { display: flex; align-items: center; gap: 9px; padding: 17px 20px; font-weight: 700; cursor: pointer; list-style: none; }
.git-operation > summary::-webkit-details-marker { display: none; }
.git-operation > summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 18px; }
.git-operation[open] > summary { border-bottom: 1px solid var(--line); }
.git-operation[open] > summary::after { content: "−"; }
.git-operation > summary .ui-icon { width: 17px; height: 17px; color: var(--accent); }
.git-operation > .accounting-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.git-operation > .accounting-form > :is(p, .notice, div.accounting-actions) { grid-column: 1 / -1; }
.git-operation > .accounting-form > button { width: fit-content; }
.git-workspace form[aria-busy="true"] { opacity: .65; cursor: progress; }
.git-workspace form[aria-busy="true"] button { pointer-events: none; }
.configuration-save-progress { display: inline-flex; align-items: center; gap: 8px; grid-column: 1 / -1; color: var(--accent); font-size: 12px; }
.configuration-save-progress::before { content: ""; width: 13px; height: 13px; border: 2px solid var(--accent-soft); border-top-color: currentColor; border-radius: 50%; animation: configuration-save-spin .8s linear infinite; }
[data-section="configurator"] form[aria-busy="true"] button { pointer-events: none; opacity: .65; }
@keyframes configuration-save-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .configuration-save-progress::before { animation: none; } }
.git-request-changes { min-width: 0; border-top: 1px solid var(--line); padding-top: 16px; }
.git-request-changes > header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.git-diff-layout { display: grid; grid-template-columns: minmax(160px, 24%) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.git-diff-layout > nav { max-height: 65dvh; overflow: auto; padding: 6px; border-right: 1px solid var(--line); background: var(--accent-soft); }
.git-diff-layout > nav a { display: block; padding: 8px; border-radius: 5px; overflow-wrap: anywhere; font-size: 11px; }
.git-diff-layout > nav a[aria-current="page"] { background: #fff; color: var(--accent-deep); font-weight: 650; }
.git-diff-content { min-width: 0; background: #fff; }
.git-diff-content > p { padding: 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; font-size: 12px; }
.git-diff { max-height: 65dvh; overflow: auto; margin: 0; padding: 10px 0; font: 12px/1.6 ui-monospace, monospace; tab-size: 4; overscroll-behavior: contain; }
.git-diff code > span { display: block; min-width: max-content; min-height: 1.6em; padding-inline: 10px; white-space: pre; }
.git-diff-added { background: #e2f6e9; color: #14582d; }
.git-diff-removed { background: #ffe7e7; color: #8d202c; }
.git-diff-hunk { background: #e8efff; color: #353aa0; }
.git-diff-file { color: #5d438d; font-weight: 650; }
@media (max-width: 760px) { .git-diff-layout { grid-template-columns: minmax(0, 1fr); } .git-diff-layout > nav { max-height: 10rem; border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 760px) { .git-operation > .accounting-form { grid-template-columns: minmax(0, 1fr); } }
.module-origin { max-width: 28rem; overflow-wrap: anywhere; white-space: normal; }
.script-shell > .workspace-content > :not(.script-workspace) { margin: 20px; }
.script-workspace, .script-editor-panel, .script-editor-panel > form {
  display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0;
}
.script-workspace { min-height: 0; }
.script-shell > .workspace-content > .script-git-tracking { flex: none; margin: 0; padding: 6px 12px; border-width: 0 0 1px; border-radius: 0; }
.script-shell > .workspace-content > .script-git-activity { flex: none; margin: 0; padding-inline: 12px; max-height: 30dvh; overflow: auto; }
.script-editor-panel { overflow-y: auto; }
.script-tree summary { padding: 6px; cursor: pointer; font-weight: 650; overflow-wrap: anywhere; }
.script-explorer > summary { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--sidebar-accent); list-style: none; }
.script-explorer > summary::-webkit-details-marker { display: none; }
.script-explorer > summary > .ui-icon { flex: none; width: 15px; height: 15px; }
.script-explorer > summary::after { content: "+"; margin-inline-start: auto; }
.script-explorer[open] > summary::after { content: "−"; }
.script-explorer-files > details + details { margin-top: 3px; }
.script-create { border-top: 1px solid var(--sidebar-line); padding-top: 6px; }
.script-create .access-form { padding: 4px; }
.script-create textarea { width: 100%; }
.script-file-header {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 18px; border-bottom: 1px solid var(--line);
}
.script-file-header h1 { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.script-tree ul { margin: 0 0 0 7px; padding-left: 5px; border-left: 1px solid #dacbf8; }
.script-tree a { display: flex; align-items: center; gap: 5px; height: 25px; padding: 2px 4px; border-radius: 4px; color: #493b5e; white-space: nowrap; overflow: hidden; font: 11px/1.4 ui-monospace, monospace; }
.script-tree a > span:not(.script-draft-dot, .ui-icon) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-tree a .ui-icon { flex: none; width: 14px; height: 14px; color: #7754bb; }
.script-tree a:is(:hover,[aria-current="page"]) { color: #5426ad; background: #eee5fb; }
.script-draft-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #b6782f; }
.script-toolbar { padding: 8px 18px; border-bottom: 1px solid var(--line); }
.script-workspace :is(.script-code, .script-fallback) { flex: 1; min-height: 15rem; width: 100%; }
.script-workspace .script-fallback { display: block; border: 0; border-radius: 0; resize: none; }
.script-editor-panel > details { flex: none; border-width: 1px 0 0; border-radius: 0; }
.script-editor-panel > details ul { max-height: 9rem; overflow: auto; }
.script-workspace [hidden] { display: none !important; }
.script-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 18px; color: #5f4a7b; background: #f5effc; font-size: 11px; }
.script-note { padding: 8px 18px; color: var(--muted); font-size: 11px; }
.script-editor-panel .entity-meta { overflow-wrap: anywhere; }
@media (min-width: 761px) {
  .script-shell { height: calc(100dvh - var(--topbar-height)); min-height: 0; overflow: hidden; }
  .script-shell > .workspace-sidebar { overscroll-behavior: contain; }
  .script-shell > .workspace-content { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar-height)); }
}
@media (max-width: 760px) {
  .configurator-switch { margin-bottom: 4px; }
  .configurator-switch > .workspace-card { display: flex; padding: 0 6px 6px; }
  .configurator-switch > .workspace-card .workspace-avatar { width: 28px; height: 28px; }
  .configurator-switch > .workspace-card div > span { display: none; }
  .script-shell > .workspace-sidebar { position: static; }
  .script-explorer > summary { margin-bottom: 0; }
  .script-explorer-files { max-height: 26dvh; overflow: auto; }
  .script-workspace .script-code { min-height: max(18rem, calc(100dvh - 20rem)); }
}

.handler-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 4px; overflow-wrap: anywhere; }
.handler-source-link { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; }
.handler-source-link code { overflow-wrap: anywhere; }
.handler-identifier { color: var(--muted); font-size: 11px; }
.handler-module { font-size: 12px; }

.access-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1rem; }
.access-panel { padding: 1.25rem; margin-bottom: 1rem; }
.access-panel h2, .access-panel h3, .access-context { margin-block: .25rem 1rem; }
.access-panel details { margin-block: .75rem; }
.access-panel summary { cursor: pointer; font-weight: 600; }
.access-form { display: grid; gap: .7rem; align-content: start; margin-block: .5rem; }
.access-form label, .access-panel > label { display: grid; gap: .25rem; }
.access-form :is(input:not([type="checkbox"]), textarea, select), .access-panel > label input {
    box-sizing: border-box; min-width: 0; width: 100%; padding: .55rem; border: 1px solid #d7ccec;
    border-radius: .5rem; background: #faf8ff; color: inherit;
}
.access-form textarea { font-family: ui-monospace, monospace; resize: vertical; }
.access-form button { justify-self: start; }
.access-form .access-check { display: flex; align-items: center; gap: .55rem; }
.access-options { border: 1px solid #d7ccec; border-radius: .5rem; }
.access-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.access-notice { color: #673404; background: #fff2df; padding: .75rem; border-radius: .5rem; }
.access-codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .5rem; }
.totp-qr svg { display: block; width: 12rem; max-width: 100%; height: auto; background: white; }
.profile-link { color: var(--accent-deep); font-weight: 650; text-decoration: none; }
.profile-link:hover { text-decoration: underline; }
.topbar-actions { display: flex; align-items: center; gap: .65rem; }
@media (max-width: 480px) { .topbar-actions { gap: .35rem; } .profile-link { font-size: .75rem; } }
.access-resource-list { max-height: 16rem; overflow: auto; padding: .5rem .75rem; background: #f4efff; border-radius: .5rem; }
.company-template-list { display: grid; gap: .25rem; margin: .75rem 0; }
.company-template-list dt { font-weight: 650; color: var(--accent-deep); }
.company-template-list dd { margin: 0 0 .5rem; }

.profile-page { max-width: 1160px; margin-inline: auto; }
.profile-header {
  display: flex; align-items: center; gap: 18px; padding: clamp(16px, 3vw, 30px);
  border: 1px solid #e0def3; border-radius: 16px;
  background: radial-gradient(ellipse at right top, #e1efff, transparent 60%), linear-gradient(110deg, #f0e9ff, #fff 70%);
}
.profile-avatar {
  display: grid; place-items: center; width: 58px; height: 58px; flex: none;
  border-radius: 16px; color: #fff; background: linear-gradient(145deg, #6b44dd, #4430a4);
  font-size: 26px; font-weight: 700;
}
.profile-header-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.profile-header h1 { font-size: clamp(22px, 3.2vw, 30px); line-height: 1.15; letter-spacing: -.03em; }
.profile-header p { color: var(--muted); margin-top: 5px; }
.profile-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-block: 18px 22px; }
.profile-nav a {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px;
  border: 1px solid #dce2f1; border-radius: 12px; background: #fff;
}
.profile-nav a:hover { border-color: #a995de; background: #f9f6ff; }
.profile-nav a[aria-current="page"] { border-color: #8c68db; background: #f1ebff; box-shadow: inset 0 -2px #6636d9; }
.profile-nav strong, .profile-nav small { display: block; overflow-wrap: anywhere; }
.profile-nav strong { line-height: 1.3; }
.profile-nav small { color: var(--muted); line-height: 1.35; margin-top: 3px; }
.profile-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 10px; color: #542ab0; background: #eee6ff;
}
.profile-icon[data-tone="blue"], [data-profile-section="personal"] .profile-icon { color: #234e9c; background: #e3efff; }
.profile-icon[data-tone="orange"], [data-profile-section="sessions"] .profile-icon { color: #8a410c; background: #fff0de; }
.profile-content, .profile-card-grid { display: grid; gap: 16px; }
.profile-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.profile-card {
  display: grid; align-content: start; gap: 16px; min-width: 0;
  padding: clamp(16px, 2.3vw, 24px); border: 1px solid #dce2f1; border-radius: 14px;
  background: #fff; box-shadow: 0 2px 8px #30225f08;
}
.profile-company-status { border-color: #d8cdf8; background: linear-gradient(120deg, #f8f4ff, #fff 75%); }
.profile-card-narrow { width: min(100%, 640px); }
.profile-card-heading { display: flex; align-items: flex-start; gap: 12px; overflow-wrap: anywhere; }
.profile-card-heading h2 { font-size: 18px; line-height: 1.3; }
.profile-card-heading p, .profile-muted { color: var(--muted); margin-top: 4px; }
.profile-card .access-form { margin: 0; }
.profile-card label { font-weight: 600; }
.profile-card :is(input, select) { min-height: 42px; font-weight: 400; }
.profile-card summary { cursor: pointer; color: var(--accent-deep); }
.profile-card p a, .profile-requirements a { font-weight: 650; text-decoration: underline; text-underline-offset: .2em; }
.profile-company-picker { grid-template-columns: minmax(0, 360px) auto; justify-content: start; align-items: end; }
.profile-company-picker button { min-height: 42px; }
.profile-readonly { padding: 10px 12px; border-radius: 8px; background: #f1f3f9; overflow-wrap: anywhere; }
.profile-requirements ul { list-style: disc; padding-inline-start: 1.25em; margin-block: 4px; }
@media (max-width: 1100px) { .profile-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .profile-card-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 460px) {
  .profile-header { gap: 10px; }
  .profile-avatar { width: 38px; height: 38px; border-radius: 10px; font-size: 19px; }
  .profile-nav a { align-items: flex-start; flex-direction: column; }
  .profile-company-picker { grid-template-columns: minmax(0, 1fr); }
}

.entrance-canvas {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 48px 24px;
  background:
    radial-gradient(ellipse at 15% 10%, #e5ddff 0, transparent 48%),
    radial-gradient(ellipse at 88% 32%, #dcefff 0, transparent 44%),
    radial-gradient(ellipse at 68% 100%, #fff0df 0, transparent 45%),
    #f8f9ff;
}
.entrance-content { width: min(100%, 460px); min-width: 0; }
.entrance-brand { display: flex; justify-content: center; margin-bottom: 28px; }
.entrance-brand .brand-symbol { width: 40px; height: 40px; border-radius: 11px; }
.entrance-brand .brand-wordmark { font-size: 29px; }
.entrance-card {
  padding: 36px;
  border: 1px solid #dfe3f1;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 60px #30225f0d, 0 3px 12px #30225f06;
}
.entrance-heading { margin-bottom: 26px; }
.entrance-eyebrow { margin-bottom: 10px; color: #5932b2; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.entrance-heading h1 { font-size: clamp(26px, 5vw, 30px); line-height: 1.2; letter-spacing: -.7px; }
.entrance-description { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.entrance-form.access-form { gap: 18px; margin: 0; }
.entrance-form label { gap: 7px; font-size: 14px; font-weight: 600; }
.entrance-form input:not([type="hidden"]) {
  min-height: 48px;
  padding: 11px 13px;
  border-color: #cbd2e4;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
}
.entrance-form input:focus-visible { border-color: var(--accent); outline: 2px solid #b6a0f5; outline-offset: 2px; }
.entrance-hint { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.6; }
.entrance-form button.primary { justify-self: stretch; width: 100%; min-height: 48px; margin-top: 4px; border-radius: 9px; font-size: 15px; }
.entrance-switch { margin-top: 26px; padding-top: 23px; border-top: 1px solid #e7e9f1; color: var(--muted); text-align: center; }
.entrance-card :is(a, button):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.entrance-card a { color: #5932b2; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.entrance-card a:hover { color: #361b74; }
.entrance-invite { margin-bottom: 22px; padding: 12px 14px; border: 1px solid #c9e2fb; border-radius: 9px; background: #f0f8ff; color: #225479; font-size: 13px; line-height: 1.6; }
.entrance-help { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.entrance-back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; }
.entrance-card .access-notice { margin-bottom: 22px; font-size: 13px; line-height: 1.6; }
@media (max-width: 480px) {
  .entrance-canvas { padding: 28px 16px; }
  .entrance-brand { margin-bottom: 23px; }
  .entrance-card { padding: 26px 22px; border-radius: 16px; }
  .entrance-heading { margin-bottom: 24px; }
}

.reference-select, .numbered-field { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.reference-select select, .numbered-field input:not([type="hidden"]) { flex: 1; width: 100%; min-width: 0; }
.reference-trigger, .number-trigger { display: none; flex: none; }
.has-field-controls :is(.reference-trigger, .number-trigger) { display: inline-flex; }
.number-trigger { min-width: 2.2rem; justify-content: center; }
.numbered-field { flex-wrap: wrap; }
.number-feedback:not(:empty) { flex-basis: 100%; color: #603b95; font-size: .78rem; }
.reference-dialog { width: min(720px, 92vw); max-height: 83vh; padding: 0 0 1rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: #302542; box-shadow: 0 20px 65px #2414403d; }
.reference-dialog::backdrop { background: #22123d70; }
.snapshot-dialog { width: min(1160px, calc(100vw - 32px)); max-height: min(88dvh, 1000px); padding: 0; overflow: hidden; }
.snapshot-dialog[open] { display: flex; flex-direction: column; }
.snapshot-dialog > .panel-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; flex: none; background: var(--accent-wash); }
.snapshot-dialog > .panel-header h2 { overflow-wrap: anywhere; }
.snapshot-dialog-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; min-height: 0; padding: 18px var(--panel-padding-inline); overflow: auto; overscroll-behavior: contain; }
.snapshot-dialog-body:focus-visible { outline-offset: -3px; }
.snapshot-dialog-pane { display: grid; align-content: start; gap: 10px; min-width: 0; }
.snapshot-dialog-pane > strong { color: var(--accent-deep); font-size: 13px; }
.snapshot-dialog-pane > pre { min-width: 0; max-width: 100%; margin: 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); color: var(--ink); font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
td > details > summary[aria-haspopup="dialog"] { display: inline-flex; align-items: center; gap: 6px; list-style: none; color: var(--accent-deep); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
td > details > summary[aria-haspopup="dialog"]::-webkit-details-marker { display: none; }
@media (max-width: 760px) {
  .snapshot-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .snapshot-dialog-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
.reference-search { display: grid; gap: .35rem; margin: 1rem; font-weight: 650; }
.reference-search input { width: 100%; border: 1px solid var(--line); padding: .65rem; border-radius: 8px; }
.reference-sort { border: 0; background: transparent; color: var(--accent-deep); font: inherit; cursor: pointer; padding: .2rem 0; }
th[aria-sort="ascending"] .reference-sort::after { content: " ↑"; }
th[aria-sort="descending"] .reference-sort::after { content: " ↓"; }
.reference-empty { padding: 0 1rem; }

.script-code.ace_editor.ace-github { color: #28213d; background: #fcfbff; }
.script-code.ace-github .ace_gutter { color: #6a587f; background: #f0eafa; }
.script-code.ace-github .ace_keyword { color: #6730ad; font-weight: 650; }
.script-code.ace-github .ace_keyword.ace_operator { color: #563794; }
.script-code.ace-github .ace_entity.ace_function { color: #174ca0; font-weight: 650; }
.script-code.ace-github :is(.ace_entity.ace_type, .ace_support.ace_type, .ace_support.ace_function) { color: #00646d; }
.script-code.ace-github .ace_meta.ace_decorator { color: #8e4207; }
.script-code.ace-github .ace_variable.ace_language { color: #903556; }
.script-code.ace-github .ace_constant { color: #9a4405; }
.script-code.ace-github .ace_string { color: #207344; }
.script-code.ace-github .ace_comment { color: #655c70; font-style: italic; }
.script-code.ace-github .ace_paren { color: #4f3372; }
.script-code.ace-github.ace_focus .ace_marker-layer .ace_active-line { background: #eee6fc; }
.script-code .ace_marker-layer .script-error-line { position: absolute; background: #fce0e7; border-left: 3px solid #c92d57; }
.script-diagnostic { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }

.policy-editor { min-width: 8rem; }
.policy-editor summary { width: fit-content; list-style: none; cursor: pointer; }
.policy-editor summary::-webkit-details-marker { display: none; }
.policy-role-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.policy-dialog { width: min(520px, 92vw); max-height: 85vh; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: #302542; box-shadow: 0 20px 65px #2414403d; }
.policy-dialog::backdrop { background: #22123d70; }
.account-settings-dialog { width: min(580px, 92vw); }
.account-settings-dialog[open]:not(:modal) { position: relative; margin: 0 auto; }
.policy-fields { padding: .85rem 1rem; display: grid; gap: .65rem; }
.policy-fields fieldset { margin: 0; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
.policy-fields legend { font-weight: 650; }
.policy-fields .accounting-check { display: flex; gap: .5rem; margin: .35rem 0; }
.policy-search { display: grid; gap: .3rem; }
.policy-search input { width: 100%; padding: .5rem; border: 1px solid var(--line); border-radius: 6px; }
.policy-role-list { max-height: 12rem; overflow: auto; }
.policy-fields [hidden] { display: none !important; }
.policy-actions { display: flex; gap: .5rem; padding: 0 1rem 1rem; }
.policy-editor [data-policy-cancel] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.configuration-tree { display: grid; gap: 7px; min-width: 0; }
.configuration-tree [hidden] { display: none; }
.configuration-tree-search { display: none; }
.has-field-controls .configuration-tree-search { display: grid; gap: 5px; margin-bottom: 4px; }
.configuration-tree-search label { color: var(--sidebar-muted); font-size: 12px; font-weight: 600; }
.configuration-tree-search input { width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid var(--sidebar-line); border-radius: 6px; background: var(--sidebar-hover); color: inherit; font: inherit; font-size: 13px; }
.configuration-tree-search input::placeholder, .configuration-tree-search p { color: var(--sidebar-muted); }
.configuration-tree-search p { font-size: 12px; }
.configuration-tree-branch summary { cursor: pointer; overflow-wrap: anywhere; padding: 8px 9px; border-radius: 6px; color: inherit; font-size: 12px; font-weight: 650; }
.configuration-tree-branch > summary:hover { background: var(--sidebar-hover); }
.configuration-tree-branch[data-config-current] > summary { color: var(--sidebar-accent); }
.configuration-tree > .configuration-tree-branch { border: 1px solid var(--sidebar-line); border-radius: 6px; }
.configuration-tree-children { padding: 0 3px 3px 9px; border-inline-start: 1px solid var(--sidebar-line); margin-inline-start: 8px; }
.configuration-tree-children .configuration-tree-branch > summary { padding: 6px 7px; font-size: 11px; }
.configuration-tree .sidebar-items { display: grid; width: auto; gap: 2px; }
.configuration-tree .sidebar-link { min-height: 34px; padding: 6px 8px; gap: 6px; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
.configuration-tree .sidebar-link .ui-icon { flex-shrink: 0; width: 14px; height: 14px; }
/* Standalone configured pages have the same frame and type as root branches. */
.configuration-tree > .sidebar-items:not(:first-child) > li > .sidebar-link {
  min-height: 0;
  padding: 8px 9px;
  border: 1px solid var(--sidebar-line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
}
@media (max-width: 760px) {
  .workspace-sidebar:has(.configuration-tree) { max-height: 42vh; overflow: auto; }
}


.configuration-version-link { text-decoration: none; }
.configuration-version-link:hover { color: #5426ad; text-decoration: underline; }
.active-manifest { margin-inline-start: .6rem; }

.document-actions { display: grid; gap: 12px; margin: 0; padding: clamp(12px, 2.4vw, 24px); list-style: none; }
.document-action { min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.document-action-header { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--canvas); }
.document-action-header h4 { margin: 0; font-size: 15px; }
.document-action-state { padding: 4px 9px; border-radius: 6px; background: #ebe0ff; color: #512394; }
.document-action-body { display: grid; gap: 8px; padding: 10px 14px; }
.hook-overview, .document-action-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.document-action h5, .document-action h6 { margin: 0 0 5px; font-size: 13px; }
.document-action p { margin: 4px 0; }
.document-action-route { display: block; margin-top: 6px; color: var(--muted); overflow-wrap: anywhere; }
.document-action-details { min-width: 0; }
.document-action-details[open] { border-top: 1px solid var(--line); padding-top: 8px; }
.document-action-contract { display: grid; gap: 15px; margin-top: 12px; }
.document-action-details summary { color: var(--accent); cursor: pointer; font-weight: 600; }
.document-action-details :is(h6, .rich-table-region) { margin-top: 8px; }
.document-action-parameters { margin: 5px 0 0; }
.document-action-parameters > div { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-block: 3px; }
.document-action-parameters dd { margin: 0; }
.document-action pre { margin: 5px 0; padding: 8px 10px; border-radius: 6px; background: var(--canvas); white-space: pre-wrap; overflow-wrap: anywhere; }
.document-action-results > div { min-width: 0; padding: 10px 12px; border-radius: 8px; background: #edf7f6; }
.document-action-results > div + div { background: #fff2ed; }

.document-builder { gap: 18px; padding: clamp(12px, 2.4vw, 24px); }
.document-builder-section { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.document-builder-section legend { padding: 0 6px; font-weight: 700; }
.document-builder-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.document-builder-grid textarea { width: 100%; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; }
.document-builder-grid input[readonly] { background: var(--canvas); }
.document-builder-toolbar { display: flex; gap: 10px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.document-builder-toolbar > label { max-width: 12rem; }
.document-builder-field { display: grid; gap: 12px; min-width: 0; padding: 12px; background: #faf7ff; border: 1px solid #eee5fb; border-radius: 10px; }
.document-builder-options summary { color: var(--accent); cursor: pointer; }
.document-builder-options .document-builder-grid { margin-top: 10px; }
.document-builder-grid:not(:has([data-document-kind] :is(option[value="reference"], option[value="rows"]):checked)) .document-builder-target,
.document-builder-grid:not(:has([data-document-kind] option[value="named"]:checked)) .document-builder-named,
.document-builder-grid:not(:has([data-document-kind] option[value="choice"]:checked)) .document-builder-values,
.document-builder-field:not(:has([data-document-kind] option[value="reference"]:checked)) .document-builder-filter { display: none; }
.document-builder-section .editor-layout { gap: 10px; }
.document-builder-preview-field { display: grid; gap: 5px; grid-column: span var(--field-span, 1); min-width: 0; overflow-wrap: anywhere; }
.document-builder-preview-input { padding: 7px 9px; background: #f4f0fb; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.document-builder-preview-field small { color: var(--muted); }
@media (max-width: 760px) {
  .document-builder-preview-field { grid-column: auto; }
}

.workspace-switch { position: relative; min-width: 0; }
.workspace-switch summary { display: flex; align-items: center; gap: 8px; max-width: 220px; cursor: pointer; list-style: none; }
.workspace-switch summary::-webkit-details-marker { display: none; }
.workspace-switch summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-switch summary::after { content: ""; width: 6px; height: 6px; margin-bottom: 3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); flex-shrink: 0; }
.workspace-switch[open] summary { background: var(--accent-soft); }
.workspace-switch-panel { position: absolute; top: calc(100% + 8px); right: 0; width: min(19rem, calc(100vw - 20px)); display: grid; gap: 10px; padding: 12px; border: 1px solid #e2d6f6; border-radius: 11px; background: white; box-shadow: 0 12px 30px #41237524; }
#new-configuration { scroll-margin-top: 120px; }
#new-configuration:target { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 5px; }
@media (max-width: 760px) {
  .workspace-switch summary { max-width: min(26vw, 12rem); min-height: 30px; padding: 5px 7px; font-size: 11px; gap: 5px; }
  .workspace-switch-panel { position: fixed; top: var(--topbar-height); right: 10px; }
}


.invoice-editor-totals { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; border-top: 1px solid var(--line); }
.invoice-editor-totals > :is(label, div) { display: grid; gap: 5px; }
.invoice-editor-totals > label { max-width: 14rem; }

.report-drilldown-trigger { padding: 2px 0; border: 0; background: transparent; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.report-drilldown-trigger:hover { color: var(--ink); }
.report-drilldown { width: min(420px, calc(100vw - 32px)); max-height: 85vh; margin: auto; padding: 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 20px 65px #2414403d; white-space: normal; font-weight: 400; text-align: left; }
.report-drilldown::backdrop { background: #24144038; }
.report-drilldown-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.report-drilldown-header h3 { margin: 0; font-size: 16px; }
.report-drilldown-header button { min-height: 30px; padding: 2px 9px; }
.report-drilldown-account { margin: 6px 0 0; }
.report-drilldown-links { display: grid; gap: 6px; margin: 14px 0 0; }
.report-drilldown-links a { justify-content: flex-start; text-decoration: none; }

.script-tree [data-script-folder] > summary { display: flex; align-items: center; gap: 5px; min-height: 25px; list-style: none; border-radius: 4px; padding: 2px 3px; font-size: 12px; line-height: 1.4; }
.script-tree [data-script-folder] > summary::-webkit-details-marker { display: none; }
.script-tree [data-script-folder] > summary:hover { background: #f0e7fb; }
.script-tree [data-script-folder] > summary .ui-icon { width: 12px; height: 12px; color: var(--muted); }
.script-tree [data-script-folder][open] > summary .ui-icon { transform: rotate(90deg); }
.script-folder-icon { width: 12px; height: 9px; position: relative; flex: none; border: 1px solid #7958a7; border-radius: 2px; background: #eee4fb; }
.script-folder-icon::before { content: ""; position: absolute; width: 5px; height: 2px; top: -3px; left: -1px; border: 1px solid #7958a7; border-bottom: 0; border-radius: 2px 2px 0 0; background: #eee4fb; }
.script-tabs { display: flex; gap: 3px; max-width: 100%; overflow-x: auto; padding: 4px 7px 0; border-bottom: 1px solid var(--line); background: #f7f2fc; scrollbar-width: thin; }
.script-tab { display: flex; align-items: center; flex: 0 0 auto; max-width: 16rem; min-height: 36px; padding-inline: 8px 4px; border: 1px solid transparent; border-radius: 7px 7px 0 0; }
.script-tab.is-active { background: #fff; border-color: var(--line); border-top-color: var(--accent); }
.script-tab a { overflow: hidden; padding-block: 6px; text-overflow: ellipsis; white-space: nowrap; color: #543972; font: 11px/1.4 ui-monospace, monospace; }
.script-tab button { flex: none; margin-left: 4px; padding: 2px 6px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.script-tab button:hover { background: #eee4fb; color: var(--ink); }
.script-tab.is-dirty::before { content: ""; flex: none; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #b6782f; }

.bank-movement-purpose {
    min-width: 12rem;
    white-space: normal;
    overflow-wrap: anywhere;
}
.bank-classification-note {
    grid-column: 1 / -1;
    color: var(--text-muted, #655f7a);
}
.bank-statement-errors ul {
    margin: .4rem 0 0;
    padding-inline-start: 1.5rem;
}

.asset-category-tree {
    list-style: none;
    margin-block: .4rem;
    padding-inline-start: 1.25rem;
}
.asset-category-tree details > summary {
    cursor: pointer;
    padding-block: .3rem;
    font-weight: 600;
}

.report-matrix .data-table th, .report-matrix .data-table td { white-space: nowrap; }
.report-matrix .data-table td { text-align: end; font-variant-numeric: tabular-nums; }
.report-t-account .data-table :is(td, th):nth-child(3) { border-inline-start: 2px solid #d9c8fb; }
.report-t-account .data-table :is(td, th):nth-child(even) { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.report-matrix .data-table .report-matrix-total, .report-t-account .data-table .report-matrix-total { background: var(--accent-soft); font-weight: 650; }

.service-act-sheet { font-family: "Times New Roman", serif; font-size: 13px; max-width: 210mm; }
.service-act-sheet .center { text-align: center; margin-bottom: 25px; }
.service-act-sheet .center h1 { font-size: 17px; line-height: 1.18; }
.service-act-sheet .center h2 { font-size: 15px; }
.service-act-sheet > p { margin-block: 14px; }
.service-act-sheet :is(th, td) { padding: 3px 5px; border: 1px solid #222; }
.service-act-sheet th { background: #e8eef7; }
.service-act-sheet :is(th, td):nth-child(n+3) { text-align: end; }
.service-act-sheet tbody tr:nth-last-child(-n+2) td:nth-child(-n+5) { border: 0; }
.service-act-sheet .signature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6%; margin-top: 34px; padding-inline: 2%; }
.service-act-sheet .signature-grid > div { display: flex; flex-direction: column; break-inside: avoid; }
.service-act-sheet .signature-grid h3 { text-align: center; margin-bottom: 4px; font-size: 13px; }
.service-act-sheet .signature-grid p { margin-block: 0; overflow-wrap: anywhere; }
.service-act-sheet .signature-grid p:nth-last-child(2) { margin-top: auto; padding-top: 28px; }
.service-act-sheet .signature-grid p:last-child { margin-top: 8px; }
@media print {
  .service-act-sheet.printed-document { font-size: 9pt; margin-inline: 8mm; }
  .service-act-sheet th { print-color-adjust: exact; }
}

.journal-posting .data-table { min-width: 0; table-layout: fixed; }
.journal-posting:has(.journal-posting-fields) .data-table { min-width: 680px; }
.journal-posting .data-table td { vertical-align: top; }
.journal-posting .data-table :is(th, td) + :is(th, td) { border-inline-start: 1px solid var(--line); }
.journal-posting-side { display: grid; gap: 12px; }
.journal-posting-line, .journal-posting-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, auto); gap: 8px 12px; align-items: start; }
.journal-posting-line + .journal-posting-line { border-top: 1px solid var(--line); padding-top: 12px; }
.journal-posting-line .amount-cell { text-align: end; }
.journal-posting-fields { grid-template-columns: minmax(0, 1fr) minmax(100px, 26%); }
.journal-posting-account, .journal-posting-quantity { display: grid; gap: 6px; min-width: 0; }
.journal-posting-quantity { grid-column: 1 / -1; grid-template-columns: minmax(110px, 140px) minmax(75px, 105px); }
.journal-analytic-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.journal-analytic-picker .reference-select { flex: 1 1 145px; }
.journal-posting-quantity[hidden], .journal-analytic-picker[hidden], .journal-analytic-manual[hidden] { display: none; }
[data-journal-analytic-value]:not([hidden]) { margin-block-start: 6px; }
.journal-posting-time { padding: 0 24px; }
.journal-additional-accounts > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.journal-additional-accounts[open] > summary { margin-bottom: 12px; }
.document-sheet.journal-entry-sheet td { vertical-align: top; white-space: pre-line; }
@media (max-width: 600px) {
  .journal-posting-line { grid-template-columns: minmax(0, 1fr); }
  .journal-posting-line .amount-cell { text-align: start; }
  .journal-posting-line strong { overflow-wrap: anywhere; }
}

.invoice-lines-form .data-table { min-width: 720px; }
.invoice-lines-form .data-table td:first-of-type { width: 46%; }
.invoice-lines-form [data-invoice-unit-price] { min-width: 9rem; }
.invoice-lines-form .invoice-payable output { color: var(--accent-deep); font-size: 1.15rem; font-weight: 650; }
.invoice-editor-totals output { white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-editor-totals[aria-busy="true"] output { opacity: .65; }
.invoice-calculation-status { flex-basis: 100%; color: var(--muted); }
.invoice-calculation-status:empty { display: none; }

.reference-select.picker-ready { position: relative; }
.picker-ready > select, .picker-native { position: absolute; inline-size: 1px !important; block-size: 1px; min-height: 0 !important; padding: 0 !important; opacity: 0; pointer-events: none; }
.picker-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; min-height: 39px; padding: 7px 12px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--accent-wash); color: var(--ink); text-align: start; }
.picker-trigger:hover { border-color: var(--accent); background: var(--accent-soft); }
.picker-trigger[aria-invalid="true"] { border-color: #b63852; }
.picker-trigger::after { content: ""; width: 7px; height: 7px; margin: 0 3px 3px 0; border: solid var(--accent-deep); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); flex: none; }
.picker-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-selected td { background: var(--accent-soft); }
.reference-dialog .reference-tree-cell { padding-inline-start: calc(20px + var(--reference-depth, 0) * 15px); }
.reference-tree-cell [data-reference-toggle] { border: 0; padding: 0 6px 0 0; background: transparent; color: var(--accent-deep); }
.reference-dialog[open] { animation: workspace-in .2s ease-out; }
.calendar-dialog { width: min(340px, 92vw); padding: 14px; }
.calendar-header, .calendar-footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.calendar-header strong { text-transform: capitalize; }
.calendar-header button, .calendar-days button { aspect-ratio: 1; min-width: 32px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink); }
.calendar-header button:hover, .calendar-days button:hover { background: var(--accent-soft); }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-block: 9px; text-align: center; }
.calendar-days > span { color: var(--muted); font-size: 12px; }
.calendar-days .calendar-today { border-color: var(--accent-line); }
.calendar-days button[aria-pressed="true"] { background: var(--accent-deep); color: white; }

.invoice-heading-filters .ui-icon, .heading-tabs .ui-icon { width: 15px; height: 15px; }
.invoice-heading-filters a { border-radius: 999px; padding: 6px 9px; }
.invoice-status-count { min-width: 1.4em; padding-inline: 4px; border-radius: 999px; background: #ffffff28; text-align: center; }
.invoice-status-current .invoice-status-count { background: var(--accent-soft); }

.dashboard-tools { display: grid; justify-items: start; min-width: min(300px, 100%); gap: 5px; padding: 15px 18px; border: 1px solid #ffffff36; border-radius: 15px; background: #17104445; color: white; }
.dashboard-tools > strong { font-size: 16px; overflow-wrap: anywhere; }
.dashboard-tools > span { color: #ffffffe3; font-size: 12px; }
.dashboard-tools nav { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.dashboard-tools nav a { padding: 5px 10px; border-radius: 8px; background: #fff2; color: white; font-size: 12px; font-weight: 600; }
.dashboard-tools nav a:is(:hover,[aria-current="page"]) { background: white; color: var(--accent-deep); }
.dashboard-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.dashboard-stack { display: grid; gap: 18px; }
.dashboard-widget { --dashboard-color: var(--accent); --dashboard-secondary: #b95017; }
.dashboard-widget:has(#dashboard-bank) { --dashboard-color: #087e72; }
.dashboard-widget:has(#dashboard-ledger) { --dashboard-color: #285cc1; }
.dashboard-widget header h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.dashboard-widget-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--dashboard-color) 12%, white); color: var(--dashboard-color); }
.dashboard-widget-icon .ui-icon { width: 17px; height: 17px; }
.dashboard-sales { display: grid; gap: 16px; padding: 18px 24px 0; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dashboard-tile { --tile-color: var(--dashboard-color); display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 9px; align-items: center; padding: 14px; border: 1px solid color-mix(in srgb, var(--tile-color) 22%, white); border-radius: 13px; background: color-mix(in srgb, var(--tile-color) 6%, white); color: var(--tile-color); }
.dashboard-tile:nth-child(2) { --tile-color: #a65313; }
.dashboard-tile:nth-child(3) { --tile-color: #087e72; }
.dashboard-tile:nth-child(4) { --tile-color: #285cc1; }
.dashboard-tile:hover { background: color-mix(in srgb, var(--tile-color) 12%, white); }
.dashboard-tile-label { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; }
.dashboard-tile .ui-icon { width: 14px; height: 14px; }
.dashboard-tile strong { font-size: clamp(14px, 1.8vw, 23px); line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; color: var(--ink); }
.dashboard-tile strong small { margin-inline-start: .35em; white-space: nowrap; font-size: .55em; color: var(--muted); }
.dashboard-charts { display: grid; gap: 10px; min-width: 0; }
.dashboard-widget > .dashboard-charts { padding: 18px 24px; }
.dashboard-chart { margin: 0; min-width: 0; padding: 14px 14px 8px; border: 1px solid var(--line); border-radius: 13px; background: #fcfbfe; }
.dashboard-chart figcaption { font-weight: 650; font-size: 13px; }
.dashboard-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-variant-numeric: tabular-nums; font-size: 12px; }
.dashboard-legend a { color: var(--series-color); text-decoration: underline; text-underline-offset: 3px; }
.dashboard-incoming { --series-color: var(--dashboard-color); }
.dashboard-outgoing { --series-color: var(--dashboard-secondary); }
.dashboard-bars { display: grid; grid-template-columns: repeat(var(--points), minmax(0, 1fr)); gap: 2px; }
.dashboard-bar-point { display: grid; grid-template-rows: 110px 1.4rem; min-width: 0; text-align: center; }
.dashboard-bar-point:focus-visible { outline-offset: -1px; }
a.dashboard-bar-point:hover .dashboard-bar-area { background-color: var(--accent-wash); }
.dashboard-bar-area { display: flex; justify-content: center; align-items: end; gap: 2px; margin-top: 10px; padding-inline: 1px; border-bottom: 1px solid var(--line); background-image: linear-gradient(to top, transparent calc(100% - 1px), var(--line) 0); background-size: 100% 33.33%; }
.dashboard-bar { flex: 1; max-width: 24px; border-radius: 4px 4px 0 0; background: var(--series-color); transform-origin: bottom; animation: dashboard-grow .32s ease-out both; }
.dashboard-bar-point small { padding-top: 3px; white-space: nowrap; font-size: 10px; color: var(--muted); }
.dashboard-bar-point:last-child small { justify-self: end; }
.dashboard-bar-point:first-child small { justify-self: start; }
.dashboard-subheading { padding: 16px 24px 10px; }
.dashboard-subheading h3 { font-size: 14px; }
.dashboard-table-badge { display: inline-block; padding: 3px 7px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-deep); font-size: 11px; }
.dashboard-link { color: var(--accent-deep); text-decoration: underline; }
.dashboard-role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 295px), 1fr)); gap: 16px; }
.dashboard-role label.dashboard-widget-option { display: flex; gap: 8px; align-items: center; }
@keyframes dashboard-grow { from { transform: scaleY(.06); } }
@media (max-width: 1080px) { .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 550px) {
  .dashboard-sales, .dashboard-widget > .dashboard-charts { padding-inline: 12px; }
  .dashboard-tile { padding: 10px; }
  .dashboard-chart { padding-inline: 8px; }
  .dashboard-bar-point:not(:first-child):not(:last-child) small { visibility: hidden; }
}

.item-catalog { display: grid; grid-template-columns: minmax(205px, 255px) minmax(0, 1fr); align-items: start; gap: 18px; }
.item-folder-tree { padding-bottom: 12px; }
.item-folder-tree .panel-header { padding-block: 12px; }
.item-folder-link { display: flex; align-items: center; gap: 8px; min-height: 35px; padding: 6px 9px; border-radius: 8px; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.item-folder-link .ui-icon, .item-folder-editor summary .ui-icon { width: 16px; height: 16px; color: var(--accent); }
.item-folder-link:is(:hover,[aria-current="page"]) { background: var(--accent-soft); color: var(--accent-deep); }
.item-folder-root { margin: 9px 12px 5px; font-weight: 650; }
.item-folder-branch { padding-inline: 12px; }
.item-folder-branch ul { padding-inline: 12px 0; margin-inline-start: 10px; border-inline-start: 1px solid var(--line); }
.item-folder-branch summary { color: var(--accent); cursor: pointer; }
.item-folder-branch summary .item-folder-link { display: inline-flex; max-inline-size: calc(100% - 18px); }
.item-folder-path ol { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.item-folder-path li + li::before { content: "/"; margin-inline-end: 5px; color: var(--muted); }
.item-folder-path a { color: var(--accent-deep); }
.item-folder-path a:hover { text-decoration: underline; }
.item-folder-editor summary { color: var(--accent-deep); padding: 12px 16px; cursor: pointer; font-weight: 650; }
.item-folder-editor summary .ui-icon { margin-inline: 5px 8px; }
.item-folder-editor details + details { border-top: 1px solid var(--line); }
@media (max-width: 900px) { .item-catalog { grid-template-columns: minmax(0, 1fr); } }

:is(.report-tree, .directory-tree) { display: grid; gap: 4px; }
:is(.report-tree, .directory-tree) details > summary { padding: 7px 9px; border-radius: 6px; color: var(--ink); font-size: 13px; font-weight: 650; cursor: pointer; }
:is(.report-tree, .directory-tree) details > summary::marker { color: var(--sidebar-muted); }
:is(.report-tree, .directory-tree) details > summary:hover, :is(.report-tree, .directory-tree) details[open] > summary { background: var(--sidebar-hover); }
:is(.report-tree, .directory-tree) details[open] > summary { color: var(--sidebar-accent); }
:is(.report-tree, .directory-tree) .sidebar-items { margin: 4px 0 0 10px; padding-left: 7px; border-left: 1px solid var(--sidebar-line); }
:is(.report-tree, .directory-tree) .sidebar-link { min-height: 34px; padding-block: 6px; }
@media (max-width: 760px) {
  .workspace-sidebar:has(:is(.report-tree, .directory-tree)) { position: static; }
  :is(.report-tree, .directory-tree) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(.report-tree, .directory-tree) li:has(> details[open]) { grid-column: 1 / -1; order: -1; }
  :is(.report-tree, .directory-tree) .sidebar-items { max-width: 100%; margin-inline-start: 0; padding: 2px 0; overflow-x: auto; border: 0; }
}

.directory-row-actions { white-space: nowrap; }
.directory-row-actions a + a { margin-inline-start: 12px; }
.directory-add { padding: 12px 16px; border-top: 1px solid var(--line); }
.directory-modal[open]:not(:modal) { position: static; margin: 16px auto; }
.global-company-editor, .global-record-editor { padding: var(--form-row-gap); }

.counterparty-roles { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }

.posting-time-field { display: grid; gap: 5px; max-width: 26rem; margin-block: 6px 12px; }
.posting-time-field small { color: var(--muted); }
.document-posting-panel { margin-block-start: 14px; }
.act-posting-form {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 18px; border-top: 1px solid var(--line);
}
.act-posting-form .posting-time-field { margin-block: 0; }
.act-posting-form input[type="datetime-local"] { max-width: 18rem; }

#tax-details { scroll-margin-top: 88px; }
.panel + #tax-details { margin-block-start: var(--page-block-gap); }
.tax-declaration-details dd { white-space: pre-line; overflow-wrap: anywhere; }

.config-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
  align-items: start;
}
.config-overview-feedback { margin: 0; }

.constant-value { white-space: pre-wrap; overflow-wrap: anywhere; }
.constant-editor textarea {
  width: 100%; padding: 8px 10px; resize: vertical;
  border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff;
}
.constant-permissions { margin: 0 24px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; }
.constant-permissions legend { padding-inline: 5px; font-weight: 650; }
.constant-permissions p, .constant-editor small { color: var(--muted); font-size: 12px; }
.constant-permissions li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.constant-permissions li code { flex: 0 0 10rem; overflow-wrap: anywhere; }
.constant-permissions label { display: inline-flex; align-items: center; gap: 5px; }

.material-code-search { grid-template-columns: minmax(0, 21rem) auto; align-items: end; justify-content: start; border-bottom: 1px solid var(--line); }
.material-catalog-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere;
}
.material-catalog-row small { display: block; color: var(--muted); }
.material-catalog-row input { accent-color: var(--accent); }
.material-label-controls { align-items: end; justify-content: space-between; }
.material-label-controls form { align-items: end; }
.material-label-controls label { display: grid; gap: 4px; }
.material-label-controls input { width: 7rem; min-height: 36px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.material-label-print-help { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.material-label-sheet { display: grid; gap: 16px; }
.material-label-page {
  display: grid; width: max-content; max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, 85mm)); grid-auto-rows: 36mm; gap: 2mm;
}
.material-label {
  display: grid; justify-items: center; align-content: center; align-items: center;
  min-width: 0; padding: 2mm 4mm; border: .2mm solid #b0b0b0; background: #fff; color: #000;
  font: 8.5pt/1.25 system-ui, sans-serif;
}
.material-label strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; line-clamp: 2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; }
.material-label-sku { max-width: 100%; overflow-wrap: anywhere; text-align: center; font-size: 7.5pt; }
.material-label code { font: 8pt/1.2 ui-monospace, monospace; }
.material-barcode { display: block; width: 100%; max-width: 73mm; height: 15mm; margin-block-start: 1mm; }
@media screen and (max-width: 760px) {
  .material-code-search, .material-label-page { grid-template-columns: minmax(0, 1fr); }
}
@page material-labels { size: A4 portrait; margin: 10mm; }
@media print {
  .material-label-sheet { display: block; page: material-labels; }
  .material-label-page { width: 172mm; max-width: none; margin-inline: auto; break-inside: avoid; }
  .material-label-page + .material-label-page { break-before: page; }
}

.object-route-dialog {
  width: min(1050px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface, #fff);
  color: var(--text);
  overflow: hidden;
}
.object-route-dialog::backdrop { background: rgb(18 28 47 / 48%); }
.object-route-dialog > iframe { display: block; width: 100%; height: min(74dvh, 820px); border: 0; }
.object-editor-frame-page :is(.app-topbar, .workspace-sidebar, .skip-link) { display: none; }
.object-editor-frame-page .app-shell { display: block; padding: 0; min-height: 0; }
.object-editor-frame-page .workspace-content { width: 100%; padding: clamp(12px, 2.2vw, 22px); max-width: none; }
.object-editor-frame-page .page-heading { min-height: auto; padding-block: 16px; }
/* A plain fragment link also exposes the editor without scripting. */
.directory-modal:not([open]):target { display: block; position: static; margin: 16px auto; }

.icon-caption { display: inline-flex; align-items: center; gap: .5em; }
.icon-target-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.icon-target-form label { flex: 1 1 240px; max-width: 440px; }
.icon-picker { border: 0; padding: 0; margin: 0 0 14px; min-inline-size: 0; }
.icon-picker legend { padding: 0; margin-bottom: 10px; font-weight: 700; }
.icon-picker-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(125px, 100%), 1fr)); }
.accounting-form .icon-choice { display: block; position: relative; margin: 0; }
.icon-choice input[type="radio"] { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.icon-choice > span {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 7px; height: 100%; min-height: 70px; padding: 7px; border: 1px solid var(--line);
    border-radius: 8px; text-align: center; line-height: 1.25; cursor: pointer;
}
.icon-choice .ui-icon { width: 20px; height: 20px; color: var(--accent); }
.icon-choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.icon-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-choice input:disabled + span { cursor: default; }
.icon-choice input:not(:disabled) + span:hover { border-color: var(--accent); }

.financial-balance-table tbody tr.balance-section > * {
  background: var(--accent-soft);
  font-weight: 700;
}
.financial-balance-table tbody tr.balance-subtotal > * {
  font-weight: 700;
  border-top: 1px solid var(--line);
}
.financial-balance-table :is(th, td):nth-child(n+3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-journal-filters, .table-tools {
  display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px;
  padding: 12px var(--panel-padding-inline); border-bottom: 1px solid var(--line);
}
.table-journal-filters label, .table-tools-options label {
  display: grid; gap: 5px; min-width: 0; font-size: 12px; font-weight: 650;
}
.table-journal-search { flex: 1 1 220px; }
.table-journal-filters :is(input, select), .table-tools :is(input, select) {
  min-height: 34px; min-width: 0; max-width: 100%; width: 100%;
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; color: inherit; background: var(--panel, #fff);
}
.table-journal-filters input[type=date] { min-width: 135px; }
.table-filter-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.table-tools { align-items: center; gap: 8px 12px; }
.table-tools-search-controls { display: flex; align-items: center; flex-wrap: wrap; flex: 1 1 320px; gap: 8px; min-width: 0; }
.table-tools-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 12px; max-width: 100%; margin-inline-start: auto; }
.table-tools .table-tools-search { flex: 1 1 170px; width: auto; max-width: 340px; }
.table-tools-search-controls > :is(.table-tools-search, .secondary),
.table-tools-actions > label > select {
  min-height: 36px; padding-block: 7px; font-size: 13px; line-height: 20px;
}
.table-tools-options {
  order: 1; flex: 1 0 100%; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  padding: 12px 0 0; border-top: 1px solid var(--line);
}
.table-tools-result { display: flex; align-items: center; min-height: 36px; font-size: 12px; line-height: 20px; color: var(--muted); white-space: nowrap; }
.table-tools-actions > details { min-width: 0; }
@media (max-width: 600px) {
  .table-tools-search-controls { flex-basis: 100%; }
  .table-tools .table-tools-search { max-width: none; }
  .table-tools-actions { position: relative; flex: 1 1 100%; justify-content: flex-start; margin: 0; }
  .table-tools-actions > details { position: static; }
  .table-tools-actions :is(.table-column-settings-panel, .table-filter-presets-panel) { inset-inline: 0; min-width: 0; max-width: none; }
  .table-tools-actions > label { flex: 1 0 100%; }
  .table-tools .table-tools-actions > label > select { flex: 1; width: 0; min-width: 0; max-width: none; }
  .table-tools-result { order: 1; flex: 1 0 100%; min-height: 24px; }
}
.table-tools [hidden], .data-table tr[hidden] { display: none !important; }
.data-table th .table-column-sort {
  display: inline-flex; align-items: center; gap: .45em;
  padding: 0; border: 0; background: none; color: inherit; font: inherit;
  text-decoration: none; text-align: start; cursor: pointer;
}
.data-table th .table-column-sort span { color: var(--accent); }
.data-table th .table-column-sort:hover { color: var(--accent); }
.table-list-pagination span { margin-inline-end: auto; color: var(--muted); }
@media print {
  .table-tools, .table-journal-filters, .table-list-pagination, .table-column-sort span { display: none !important; }
}

.section-menu-config td:last-child .secondary { min-height: 30px; }
.section-menu-config .section-menu-hidden { color: var(--muted); background: var(--accent-wash); }
.section-menu-editor-actions, .section-menu-form-error { grid-column: 1 / -1; }

.custodian-employee { grid-column: 1 / -1; }

.account-analytic-registers {
  min-inline-size: 0; margin: 0; padding: 10px 12px 12px;
  border: 1px solid var(--line); border-radius: 8px;
}
.account-analytic-registers legend { padding-inline: 5px; font-weight: 650; }
.account-analytic-register-options {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px 14px;
}
.account-free-analytics { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* Configurator form workspace */
.designer-modes, .designer-toolbar, .designer-component-controls,
.designer-tab-strip, .designer-tab-controls, .form-layout-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.designer-modes[hidden] { display: none; }
.designer-modes { padding: 12px 20px; border-bottom: 1px solid var(--line); }
:is(.designer-modes, .designer-tab-strip, .form-layout-tab-buttons) button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.designer-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(205px, 255px);
  align-items: start;
  gap: 14px;
  padding: 14px;
  background: var(--canvas);
}
.designer-canvas, .designer-palette, .designer-component {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, white);
}
.designer-palette {
  position: sticky;
  top: calc(var(--topbar-height, 62px) + 12px);
  display: grid;
  gap: 10px;
  padding: 13px;
}
.designer-palette h3, .designer-palette h4, .designer-palette p { margin: 0; }
.designer-palette p, .designer-status { color: var(--muted); font-size: .85rem; }
.designer-palette label { display: grid; gap: 4px; font-size: .84rem; }
.designer-fields, .designer-structures { display: grid; gap: 5px; }
.designer-fields { max-height: 42vh; overflow: auto; padding: 2px; }
.designer-palette button { justify-content: start; text-align: start; white-space: normal; }
.designer-palette button:disabled { opacity: .52; }
.designer-toolbar { justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.designer-toolbar label { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.designer-toolbar input { width: 68px; }
.designer-workspace :is(input:not([disabled]), select:not([disabled])) {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 7px;
  background: var(--surface, white);
  color: inherit;
}
.designer-grid.configuration-preview { margin: 0; padding: 9px; gap: 8px; align-items: start; }
.designer-component { grid-column: 1 / -1; padding: 7px; }
.designer-component-field { grid-column: span var(--field-span, 1); }
.designer-component-controls { flex-wrap: nowrap; margin-bottom: 6px; }
.designer-component-controls button, .designer-tab-controls button { min-height: 26px; padding: 2px 6px; }
.designer-component-label, .designer-title-input { flex: 1; min-width: 0; }
.designer-component-label { overflow-wrap: anywhere; font-size: .8rem; }
.designer-component-field label > span:first-child { display: none; }
.designer-component-group, .designer-component-tabs { background: var(--canvas); }
.designer-component .designer-grid { padding: 8px 0 0; }
.designer-tab-strip, .designer-tab-controls { margin-top: 8px; }
.designer-handle, .designer-palette-entry:not(:disabled) { cursor: grab; }
.designer-drop-zone {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
  padding: 7px;
}
.designer-dragging .designer-drop-zone { border-color: var(--accent); }
.designer-drop-active { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.designer-status { margin: 0; padding: 0 12px 8px; }
.designer-status:empty { display: none; }
.form-layout-group, .form-layout-tabs, .designer-fallback > .configuration-preview > .form-layout-grid {
  grid-column: 1 / -1;
  min-width: 0;
}
.form-layout-group, .form-layout-tabs {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}
.form-layout-group legend { padding-inline: 5px; font-weight: 600; }
.form-layout-grid { gap: 10px; }
.form-layout-tab-buttons { margin-bottom: 10px; }
@media (max-width: 850px) {
  .designer-workspace { grid-template-columns: minmax(0, 1fr); }
  .designer-palette { position: static; grid-row: 1; }
  .designer-component-field { grid-column: 1 / -1; }
  .designer-fields { max-height: 160px; }
}
.object-layout-controls { display: grid; grid-column: 1 / -1; gap: 10px; min-width: 0; }
.designer-component-field > .editor-preview-field { pointer-events: none; }
.designer-dragging, .designer-dragging * { user-select: none; cursor: grabbing; }

.date-list-summary { margin: 5px 0 0; color: var(--muted); font-size: .85rem; }
.date-list-summary:empty, .date-list-outside:empty { display: none; }
.date-list-outside { display: flex; flex-wrap: wrap; gap: 5px; max-height: 9rem; overflow: auto; margin-block: 8px; }
.date-list-outside p { width: 100%; margin: 0; color: var(--muted); }
.calendar-dialog button:disabled { opacity: .45; cursor: default; }
[data-date-list-fallback] textarea { display: block; width: 100%; }

.tax-payment-actions { align-items: end; justify-content: end; margin: 0; }
.tax-payment-actions label { display: grid; gap: 4px; max-width: 24rem; }
.tax-payment-actions select { width: 100%; }

/* Workbench panes position existing frames without moving them in the DOM. */
.workbench {
  --tab-height: 39px;
  position: relative;
  min-width: 0;
  height: calc(100dvh - var(--topbar-height));
  background: color-mix(in srgb, var(--line) 47%, #fff);
  outline: none;
}
.app-shell:has(> .workbench:not([hidden])) { grid-template-rows: auto 1fr; }
.app-shell:has(> .workbench:not([hidden])) > .workspace-sidebar { grid-area: 1 / 1 / 3 / 2; }
.app-shell > .workbench { grid-area: 1 / 2; }
.app-shell:has(> .workbench:not([hidden])) > .workspace-content { grid-area: 2 / 2; }
.workbench[hidden], .workbench-frame[hidden], .workbench-menu[hidden], .workbench-separator[hidden] { display: none; }
.workbench.is-compact:not([hidden]) { display: flex; gap: 1px; height: var(--tab-height); overflow-x: auto; }
.workbench-separator {
  position: absolute;
  z-index: 5;
  touch-action: none;
  outline: none;
}
.workbench-separator::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.workbench-separator[data-axis="right"] { width: 9px; transform: translateX(-50%); cursor: col-resize; }
.workbench-separator[data-axis="right"]::before { inset-inline: 4px; }
.workbench-separator[data-axis="down"] { height: 9px; transform: translateY(-50%); cursor: row-resize; }
.workbench-separator[data-axis="down"]::before { inset-block: 4px; }
.workbench-separator:is(:hover, :focus-visible)::before,
.workbench.is-resizing .workbench-separator::before { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.workbench-separator:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.workbench[data-resize-axis="right"] { --resize-cursor: col-resize; }
.workbench[data-resize-axis="down"] { --resize-cursor: row-resize; }
.workbench.is-resizing, .workbench.is-resizing * { cursor: var(--resize-cursor); user-select: none; }
.workbench.is-resizing .workbench-frame { pointer-events: none; }
.workbench-bar, .workbench-frame {
  position: absolute;
  inset-inline-start: var(--pane-x);
  inline-size: var(--pane-width);
  box-sizing: border-box;
}
.workbench-bar {
  inset-block-start: var(--pane-y);
  height: var(--tab-height);
  display: flex;
  align-items: end;
  gap: 3px;
  padding: 4px 5px 0;
  overflow: auto hidden;
  scrollbar-width: thin;
  border: 1px solid var(--line);
  border-inline-start: 0;
  background: color-mix(in srgb, var(--accent) 6%, #fff);
}
.workbench.is-compact .workbench-bar { position: static; flex: 1 0 max-content; inline-size: auto; order: var(--pane-order); }
.workbench-tab {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  max-width: min(255px, 86%);
  height: 31px;
  padding: 0 4px 0 9px;
  border: 1px solid transparent;
  border-radius: 5px 5px 0 0;
  background: color-mix(in srgb, var(--line) 30%, white);
  color: var(--muted);
}
.workbench-tab:hover { background: #fff; color: var(--ink); }
.workbench-tab.is-visible { border-color: var(--line); border-bottom-color: #fff; background: white; color: var(--ink); }
.workbench-tab.is-active { box-shadow: inset 0 2px var(--accent); color: var(--accent-deep); }
.workbench-tab-label { color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; line-height: 25px; text-decoration: none; }
.workbench-tab-indicator {
  display: inline-grid;
  place-items: center;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  margin-inline: 4px 2px;
  border-radius: 50%;
}
.workbench-tab-indicator[hidden] { display: none; }
.workbench-tab[data-load-state="loading"] .workbench-tab-indicator {
  border: 2px solid var(--accent-line);
  border-block-start-color: var(--accent-deep);
}
@media (prefers-reduced-motion: no-preference) {
  .workbench-tab[data-load-state="loading"] .workbench-tab-indicator {
    animation: workbench-tab-spin .8s linear infinite;
  }
}
@keyframes workbench-tab-spin { to { transform: rotate(1turn); } }
.workbench-tab[data-load-state="error"] .workbench-tab-indicator {
  background: #ffebe8;
  color: #a42120;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.workbench-tab-control {
  display: grid;
  place-items: center;
  flex: 0 0 21px;
  width: 21px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 15px;
  line-height: 1;
}
.workbench-tab-control:hover { background: var(--accent-soft); color: var(--accent-deep); }
.workbench-pin {
  flex: 0 0 11px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(26% 0, 74% 0, 74% 44%, 100% 62%, 100% 76%, 56% 76%, 50% 100%, 44% 76%, 0 76%, 0 62%, 26% 44%);
}
.workbench-frame {
  display: block;
  inset-block-start: calc(var(--pane-y) + var(--tab-height));
  height: calc(var(--pane-height) - var(--tab-height));
  background: white;
  border: 0;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}
.workbench-frame.is-active { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.workbench-load-error { z-index: 2; padding: 24px; background: var(--surface, #fff); }
.workbench-menu {
  position: fixed;
  display: grid;
  z-index: 95;
  min-width: 214px;
  max-width: calc(100vw - 8px);
  padding: 5px;
  border: 1px solid #d7dbe7;
  border-radius: 7px;
  background: #fff;
  color: #23334b;
  box-shadow: 0 8px 24px #1723372e;
}
.workbench-menu button {
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  text-align: start;
  font-size: 13px;
}
.workbench-menu button:is(:hover, :focus-visible):enabled { background: #edf2fc; }
.workbench-menu button:disabled { color: #6b7483; opacity: .7; }
.workbench-frame-page :is(.app-topbar, .workspace-sidebar) { display: none; }
.workbench-frame-page .app-shell { display: block; min-height: 100dvh; }
.workbench-frame-page .workspace-content { max-width: none; padding: clamp(12px, 1.7vw, 30px); animation: none; }
.workbench-frame-page .script-shell > .workspace-content { display: flex; flex-direction: column; padding: 0; height: 100dvh; overflow: hidden; }
.workbench-frame-page .script-shell { height: 100dvh; min-height: 0; overflow: hidden; }
.workbench-frame-page .script-shell > .workspace-content > .script-git-tracking { display: none; }
.workbench-frame-page .script-workspace :is(.script-code, .script-fallback) { min-height: 0; }
.workbench-frame-page .script-shell :is(.script-editor-panel, .script-fallback, .ace_scrollbar) { overscroll-behavior: contain; }
.workbench-frame-page .script-tabs { display: none; }
.workbench-frame-page .script-file-header { padding: 6px 12px; }
.workbench-frame-page .script-toolbar { padding: 6px 12px; gap: 6px; }
.workbench-frame-page .script-toolbar button { padding: 5px 8px; font-size: 12px; }
.workbench-frame-page .script-status { padding: 4px 12px; }
.workbench-frame-page .script-note { padding: 4px 12px; }

@media (max-width: 760px) {
  .workbench-separator { display: none; }
  .workbench:not(.is-compact) { height: max(calc(100dvh - var(--topbar-height)), calc(360px * var(--pane-count))); }
  .workbench:not(.is-compact) :is(.workbench-bar, .workbench-frame) {
    --pane-x: 0% !important;
    --pane-width: 100% !important;
    --pane-y: calc(100% * var(--pane-order) / var(--pane-count)) !important;
    --pane-height: calc(100% / var(--pane-count)) !important;
  }
}

.company-kved { grid-column: 1 / -1; min-width: 0; }
.company-kved-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem 1rem; margin-bottom: 0.5rem; }
.company-kved-heading h3 { margin: 0; }
.company-kved .rich-table-region { border: 1px solid var(--line); border-radius: 0.5rem; }
.company-kved [data-kved-code] { min-width: 10rem; width: 100%; }
.company-kved-name { width: 100%; }
.company-kved .accounting-check { white-space: nowrap; }

.accounting-form[action="/configurator/views"] textarea[name="source"] {
  display: block;
  width: 100%;
  min-height: 20rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  font-family: ui-monospace, monospace;
  line-height: 1.5;
  resize: vertical;
}

.shuttle-toast[data-level="success"] {
  border-color: #d5e9df;
  border-inline-start-color: #247651;
  background: #f7fcf9;
}
.shuttle-toast[data-level="success"] strong { color: #1b6643; }
.shuttle-toast[data-level="info"] {
  border-color: #d3e3f3;
  border-inline-start-color: #2c65a0;
  background: #f8fbff;
}
.shuttle-toast[data-level="info"] strong { color: #205589; }
.form-runtime-dialog {
  position: relative;
  inset: auto;
  width: min(100%, 42rem);
  max-width: 100%;
  padding: 0;
  margin: clamp(1rem, 8vh, 5rem) auto;
  color: inherit;
}
.form-runtime-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.language-switch { display: inline-flex; align-items: center; gap: .2rem; padding: .2rem; border: 1px solid #d7dafa; border-radius: .8rem; background: #f3f2ff; }
.language-switch .secondary { min-height: 2rem; padding: .3rem .45rem; border-color: transparent; background: transparent; font-size: .72rem; font-weight: 750; color: #454579; }
.language-switch .secondary[aria-current="true"] { background: #5145cd; color: #fff; box-shadow: 0 2px 5px #3f359b24; }
.entrance-content > .language-switch { margin: 0 auto 1rem; }
@media (max-width: 720px) { .language-switch .secondary { padding-inline: .3rem; } }

/* Localization keeps the three source translations visible next to each key. */
.localization-editor { border-color: #dddaf3; }
.localization-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px 16px; background: linear-gradient(110deg, #f5f2ff, #f4faff); }
.localization-header h2 { color: #332766; font-size: 18px; letter-spacing: -.02em; }
.localization-header p { margin-top: 5px; color: #675e7d; font-size: 12px; }
.localization-add-link { flex-shrink: 0; color: #4c3abb; border-color: #cfc7f3; background: #fff; }
.localization-stats { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 13px 24px; border-top: 1px solid #e8e4f6; border-bottom: 1px solid #e8e4f6; background: #fbfaff; color: #6d6482; font-size: 12px; }
.localization-stats > span { display: inline-flex; align-items: baseline; gap: 7px; }
.localization-stats strong { color: #4a34a5; font-size: 18px; font-variant-numeric: tabular-nums; }
.localization-stats > span:nth-child(2) strong { color: #0874b9; }
.localization-stats > span:nth-child(3) strong { color: #b64c14; }
.localization-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 12px; padding: 18px 24px; border-bottom: 1px solid #e6e5f1; }
.localization-filters > label { color: #5d5671; font-size: 11px; font-weight: 600; }
.localization-search { position: relative; display: grid; gap: 5px; flex: 1 1 280px; min-width: 200px; }
.localization-search .ui-icon { position: absolute; left: 11px; bottom: 10px; width: 17px; height: 17px; color: #7770a0; pointer-events: none; }
.localization-filters input[type="search"], .localization-category select { width: 100%; min-height: 38px; border: 1px solid #dcd9eb; border-radius: 8px; padding: 8px 10px; background: #fff; color: #352d4d; font-size: 12px; font-weight: 400; }
.localization-search input[type="search"] { padding-left: 35px; }
.localization-search input[type="search"]::placeholder { color: #817994; }
.localization-category { display: grid; flex: 0 1 230px; gap: 5px; }
.localization-filters .localization-missing { display: flex; align-items: center; align-self: end; gap: 7px; min-height: 38px; color: #6d4a2e; font-weight: 500; }
.localization-filters input[type="checkbox"] { accent-color: #694bd0; }
.localization-filters :is(.primary, .secondary) { min-height: 38px; font-size: 12px; }
.localization-filters input:focus, .localization-category select:focus { outline: 2px solid #c9bdf4; outline-offset: 1px; border-color: #7c60cf; }
.localization-table .data-table { min-width: 960px; table-layout: fixed; }
.localization-editor .localization-table .data-table thead th { padding: 12px 14px; background: #f1edfc; color: #554574; }
.localization-table .data-table thead th:first-child { width: 23%; }
.localization-table .data-table thead th:last-child { width: 110px; }
.localization-table .data-table thead th:nth-child(2) { color: #5a37aa; box-shadow: inset 0 3px #8c6be0; }
.localization-table .data-table thead th:nth-child(3) { color: #086c9c; box-shadow: inset 0 3px #38a7d4; }
.localization-table .data-table thead th:nth-child(4) { color: #a55015; box-shadow: inset 0 3px #ef9a4e; }
.localization-table .data-table tbody td { padding: 12px 10px; vertical-align: top; border-color: #eeebf5; }
.localization-table .data-table tbody td:first-child { padding-left: 16px; }
.localization-table .data-table tbody tr:nth-child(even) { background: #fcfbfe; }
.localization-table .data-table tbody tr:hover, .localization-table .data-table tbody tr:focus-within { background: #f6f3ff; }
.localization-table .data-table tbody tr.is-dirty { background: #fff9ee; box-shadow: inset 3px 0 #ed9b38; }
.localization-table .data-table tbody tr:target { background: #f0edff; box-shadow: inset 3px 0 #7756cc; scroll-margin-top: 80px; }
.localization-key code { display: block; margin: 3px 0 9px; overflow-wrap: anywhere; color: #4e3b75; font-size: 11px; font-weight: 600; line-height: 1.6; }
.localization-complete, .localization-incomplete { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 5px; font-size: 10px; font-weight: 500; }
.localization-complete { color: #286448; background: #eaf5ee; }
.localization-incomplete { color: #965019; background: #fff0d8; }
.localization-translation textarea, .localization-new textarea { display: block; width: 100%; min-height: 76px; max-height: 360px; border: 1px solid #dedbea; border-radius: 7px; padding: 8px 9px; background: #fff; color: #302a43; font-size: 12px; line-height: 1.55; resize: vertical; }
.localization-translation textarea::placeholder { color: #9b7f56; }
.localization-translation textarea:focus, .localization-new textarea:focus { border-color: #8c6bd6; outline: 2px solid #e8defc; outline-offset: 1px; }
.localization-translation textarea[readonly] { border-color: transparent; background: transparent; resize: none; }
.localization-table [data-localization-phrase] { display: grid; justify-items: stretch; gap: 6px; padding-top: 2px; }
.localization-table [data-localization-save] { min-height: 31px; padding: 5px 7px; border-color: #e1ddef; background: #fff; color: #62547e; font-size: 10px; }
.localization-table [data-localization-save].is-dirty { border-color: #c8b9ef; color: #fff; background: #6d4bc4; }
.localization-table [data-localization-save].is-dirty:hover { background: #5835b0; }
.localization-table [data-localization-dirty] { color: #9a5f18; font-size: 10px; text-align: center; }
.localization-reset { border: 0; padding: 3px; background: transparent; color: #76638e; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.localization-reset:hover { color: #4e35a0; background: #eee8fa; }
.localization-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 24px; border-top: 1px solid #e8e4f1; color: #766b88; font-size: 12px; }
.localization-pagination > div { display: flex; align-items: center; gap: 8px; }
.localization-pagination .secondary { min-height: 33px; font-size: 11px; }
.localization-hint { padding: 13px 24px 17px; border-top: 1px solid #efebf7; color: #766c87; font-size: 11px; line-height: 1.7; }
.localization-settings > summary, .localization-source > summary, .localization-new > summary { padding: 16px 24px; cursor: pointer; color: #4e3a75; font-size: 13px; font-weight: 650; background: #fbf9fe; }
.localization-settings[open] > summary, .localization-source[open] > summary, .localization-new[open] > summary { border-bottom: 1px solid #e9e2f3; }
.localization-settings .editor-layout { gap: 16px; }
.localization-source nav { display: flex; flex-wrap: wrap; gap: 7px; }
.localization-source nav [aria-current="page"] { border-color: #c7b5ee; color: #5331a1; background: #f1ebff; }
.localization-source textarea { display: block; width: 100%; padding: 12px; border: 1px solid #d9d1e9; border-radius: 8px; background: #faf9fd; color: #3c3152; font-family: ui-monospace, monospace; font-size: 12px; line-height: 1.6; resize: vertical; }
.localization-new-languages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.localization-new .accounting-form > button, .localization-settings .accounting-form > button, .localization-source .accounting-form > button { justify-self: start; }
.localization-new:target { scroll-margin-top: 80px; border-color: #aa8dde; }
@media (max-width: 900px) {
  .localization-header { align-items: start; }
  .localization-header, .localization-filters, .localization-pagination { padding-inline: 16px; }
  .localization-stats, .localization-hint { padding-inline: 16px; }
  .localization-category { flex: 1 1 210px; }
  .localization-new-languages { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .localization-header { flex-direction: column; gap: 12px; }
  .localization-search, .localization-category { flex-basis: 100%; }
  .localization-stats { gap: 8px 18px; }
  .localization-stats strong { font-size: 16px; }
  .localization-settings > summary, .localization-source > summary, .localization-new > summary { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .localization-editor :is(a, button, textarea, input, select) { transition: none; }
}

.localization-empty { display: grid; justify-items: center; gap: 9px; padding: 44px 20px; text-align: center; }
.localization-empty .ui-icon { width: 34px; height: 34px; margin-bottom: 3px; color: #9c86c8; }
.localization-empty strong { color: #574174; font-size: 14px; }
.localization-empty p { max-width: 420px; color: #81748e; font-size: 12px; }

/* A single service disclosure groups language, company and operating mode. */
.service-menu { position: relative; min-width: 0; flex: none; }
.service-menu-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 7px 11px; border: 1px solid #d9d2ed; border-radius: 10px;
  background: #f8f5ff; color: #554096; list-style: none; cursor: pointer;
  font-size: 12px; font-weight: 650; white-space: nowrap;
}
.service-menu-trigger::-webkit-details-marker { display: none; }
.service-menu-trigger > .ui-icon:first-child { width: 18px; height: 18px; }
.service-menu-trigger > .ui-icon:last-child { width: 14px; height: 14px; }
.service-menu-trigger:hover, .service-menu[open] > .service-menu-trigger { border-color: #bcb0df; background: #eee8ff; color: #412c82; }
.service-menu[open] > .service-menu-trigger > .ui-icon:last-child { transform: rotate(90deg); }
[data-section="configurator"] .service-menu-trigger { border-color: #715444; background: #48342b; color: var(--config-bar-text); }
[data-section="configurator"] .service-menu-trigger:hover,
[data-section="configurator"] .service-menu[open] > .service-menu-trigger { border-color: #bd8c57; background: #594034; color: #ffe0ae; }
.service-menu:not([open]) > .service-menu-panel { display: none; }
.service-menu-panel {
  --accent: #6550bd; --accent-deep: #49388c; --accent-line: #ddd5ef;
  --accent-wash: #f4f0fc; --accent-soft: #ede6fb; --line: #e6e0f1;
  --ink: #322741; --muted: #72667f;
  position: absolute; z-index: 35; top: calc(100% + 10px); right: 0;
  width: 340px; max-width: calc(100vw - 24px); max-height: calc(100dvh - var(--topbar-height) - 24px);
  overflow: auto; overscroll-behavior: contain; border: 1px solid #ded6ee; border-radius: 14px;
  background: #fff; color: #322741; box-shadow: 0 16px 44px #33204d2b, 0 3px 10px #33204d0d;
  text-align: start; scrollbar-width: thin; scrollbar-color: #c4b6de transparent;
}
.service-menu-heading { padding: 15px 18px 13px; border-bottom: 1px solid #e8e0f3; background: linear-gradient(115deg, #f3edfc, #f1f7ff); }
.service-menu-heading h2 { color: #47346e; font-size: 15px; font-weight: 700; }
.service-menu-section { display: grid; gap: 10px; padding: 15px 18px; }
.service-menu-section + .service-menu-section { border-top: 1px solid #eee8f5; }
.service-menu-section-title, .service-menu-section > h3 { color: #776488; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.service-menu .language-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-color: #e2d9f3; border-radius: 10px; background: #f7f4fc; }
.service-menu .language-switch .secondary { justify-content: center; min-height: 34px; padding: 6px 10px; color: #695682; font-size: 12px; }
.service-menu .language-switch .secondary:hover { background: #ebe4f7; color: #49338a; }
.service-menu .language-switch .secondary[aria-current="true"] { background: #6850c2; color: #fff; box-shadow: 0 2px 5px #49318f24; }
.service-workspace-body { display: grid; gap: 9px; min-width: 0; }
.service-menu .access-form { gap: 9px; margin: 0; }
.service-menu .access-form :is(input, select) { width: 100%; min-height: 38px; border-color: #dbd1eb; border-radius: 7px; background: #fff; color: #3e3051; font-size: 12px; }
.service-menu .access-form label { color: #70617e; font-size: 12px; }
.service-menu .access-form button { justify-self: stretch; min-height: 35px; font-size: 12px; }
.service-menu .profile-link { color: #5c4599; font-size: 12px; overflow-wrap: anywhere; }
.service-menu .secondary { border-color: #ddd4ed; color: #614b88; background: #faf8fe; white-space: normal; }
.service-menu .secondary:hover { background: #f0eafa; color: #4d3584; }
.service-menu .primary { border-color: #6650bd; background: #6650bd; color: #fff; }
.service-menu .primary:hover { border-color: #533ca9; background: #533ca9; }
.service-menu .mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-color: #e0d7ed; background: #f6f2fc; }
.service-menu .mode-switch a { padding: 8px 7px; border-radius: 7px; color: #725d85; font-size: 11px; text-align: center; white-space: normal; }
.service-menu .mode-switch a:hover { color: #503687; background: #ebe3f7; }
.service-menu .mode-switch a.is-current { color: #fff; background: #6850bd; }
.service-menu-panel :focus-visible,
[data-section="configurator"] .service-menu-panel :focus-visible { outline-color: #8063cb; }
.topbar-inner > .topbar-actions:has(> .service-menu) { flex: none; justify-content: flex-end; margin-inline-start: auto; }
@media (max-width: 760px) {
  .section-theme:has(.topbar-actions > .service-menu),
  .section-theme[data-section="configurator"]:has(.topbar-actions > .service-menu) { --topbar-height: 64px; }
  .topbar-inner:has(> .topbar-actions > .service-menu) {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 64px; gap: 0 10px; padding-inline: 12px;
  }
  .topbar-inner:has(> .topbar-actions > .service-menu) > .app-brand { grid-area: 1 / 1 / 2 / 2; }
  .topbar-inner:has(> .topbar-actions > .service-menu) > .configurator-mode-label { grid-area: 1 / 2 / 2 / 3; justify-self: start; }
  .topbar-inner:has(> .topbar-actions > .service-menu) > .topbar-actions { grid-area: 1 / 3 / 2 / 4; justify-self: end; justify-content: flex-end; margin: 0; }
  .topbar-inner:has(> .topbar-actions > .service-menu) > .section-nav { grid-area: 1 / 2 / 2 / 3; gap: 12px; }
  .section-nav-current { gap: 8px; padding-inline-start: 12px; }
  .section-nav-current-icon { display: none; }
  .section-menu-panel { inset-inline-start: 12px; width: min(720px, calc(100vw - 24px)); }
  .service-menu-panel { position: fixed; top: 70px; right: 12px; max-height: calc(100dvh - 82px); }
}
@media (max-width: 600px) {
  .topbar-inner:has(> .topbar-actions > .service-menu) > .configurator-mode-label { display: none; }
  .app-topbar .brand-wordmark { display: none; }
  .section-nav-current { display: none; }
}
@media (max-width: 520px) {
  .section-menu-categories { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 18px; }
  .section-menu-heading { padding: 18px; }
}
@media (max-width: 400px) {
  .service-menu-trigger-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .service-menu-trigger { min-width: 54px; padding-inline: 10px; gap: 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  .service-menu-trigger > .ui-icon:last-child { transition: transform .15s ease; }
}
@media print { .service-menu-panel { display: none; } }

/* Accounting operation forms remain native and usable without JavaScript. */
.accounting-form .accounting-line { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); gap: 12px; margin: 0; padding: 16px; border: 1px solid #c7d2fe; border-radius: 12px; background: #f5f7ff; min-width: 0; }
.accounting-form .accounting-line legend { color: #4338ca; font-weight: 700; padding: 0 6px; }
.accounting-form .accounting-line label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 8px; }
.operation-extra summary { padding: 10px; color: #4338ca; cursor: pointer; }
.operation-preview { display: grid; gap: 14px; }
.operation-accounts { border: 1px solid #c7d2fe; border-radius: 10px; padding: 12px; }
.operation-accounts details label { display: flex; gap: 8px; padding: 5px; }
.journal-dimensions { display: grid; gap: 8px; }

/* Project names remain readable while financial columns stay compact. */
.workspace-content:has(#asset-report-filters[action="/property/reports/capital_projects"]) .data-table[aria-labelledby="asset-report-0"] tr > :first-child { min-width: 260px; width: 28%; max-width: 360px; white-space: normal; overflow-wrap: break-word; }
.workspace-content:has(#asset-report-filters[action="/property/reports/capital_projects"]) .data-table[aria-labelledby="asset-report-0"] thead th:not(:first-child) { min-width: 90px; max-width: 160px; white-space: normal; }
.workspace-content:has(#asset-report-filters[action="/property/reports/capital_projects"]) .data-table[aria-labelledby="asset-report-0"] tbody :is(th, td):not(:first-child) { white-space: nowrap; }

/* The advance register has one date filter and two adjacent actions. */
#advance-report-filters { display: flex; flex-wrap: wrap; align-items: stretch; }
#advance-report-filters > .report-filter-group[open] { flex-basis: 100%; }
@container report-toolbar (max-width: 480px) {
  #advance-report-filters > .report-filter-group { flex-basis: 100%; }
  #advance-report-filters > :is(button, a) { flex: 1; }
}

/* Keep the selected company visible across workspaces and navigation. */
.topbar-company { display: flex; align-items: center; flex: 0 1 auto; gap: 9px; min-width: 0; max-width: min(38vw, 520px); padding: 6px 12px; border: 1px solid var(--accent-line); border-radius: 9px; background: var(--accent-wash); color: var(--accent-deep); }
.topbar-company:hover { background: var(--accent-soft); border-color: var(--accent); }
.topbar-company > .ui-icon { width: 19px; height: 19px; }
.topbar-company-copy { display: grid; min-width: 0; line-height: 1.35; }
.topbar-company-copy small { font-size: 10px; color: var(--muted); }
.topbar-company-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
@media (max-width: 760px) {
  .section-theme:has(.topbar-company):has(.topbar-actions > .service-menu) { --topbar-height: 110px; }
  .topbar-inner:has(> .topbar-actions > .service-menu):has(> .topbar-company) { grid-template-rows: 64px 46px; }
  .topbar-inner > .topbar-company { grid-area: 2 / 1 / 3 / -1; align-self: start; width: 100%; max-width: none; min-height: 36px; padding: 4px 10px; }
  .topbar-company-copy small { display: none; }
  .topbar-company-copy strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: 12px; line-height: 1.3; }
  .section-theme:has(.topbar-company) .service-menu-panel { top: calc(var(--topbar-height) + 6px); max-height: calc(100dvh - var(--topbar-height) - 18px); }
}

/* Configuration-owned interfaces share a small set of SSR primitives. */
.configured-view, .configured-view-stack { min-width: 0; }
.configured-view-stack { display: grid; gap: 18px; align-content: start; }
.configured-view-grid { display: grid; gap: 18px; min-width: 0; align-items: start; }
.configured-view-grid > * { min-width: 0; }
.configured-view-grid-master-detail { grid-template-columns: minmax(360px, .8fr) minmax(0, 1.25fr); }
.configured-view-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.configured-view-panel { scroll-margin-top: calc(var(--topbar-height, 62px) + 20px); }
.configured-view-panel-header { align-items: flex-start; }
.configured-view-panel-header h2 { min-width: 0; flex: 1 1 180px; overflow-wrap: anywhere; }
.configured-view-panel-header h2[id] { scroll-margin-top: calc(var(--topbar-height, 62px) + 20px); }
.configured-view-panel-body { display: grid; gap: 20px; min-width: 0; padding: 22px var(--panel-padding-inline); }
.configured-view-panel-body:has(> .configured-view-table:only-child) { padding: 0; }
.configured-view-count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; padding: 3px 8px; border-radius: 6px; background: var(--accent-wash); color: var(--accent-deep); font-size: 12px; font-weight: 650; }
.configured-view-text { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.configured-view-muted { color: var(--muted); font-size: 12px; }
.configured-view-panel-body .configured-view-form { padding: 0; }
.configured-view-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, .65fr) auto; align-items: end; gap: 16px; }
.configured-view-form > label { min-width: 0; }
.configured-view-form .accounting-actions { margin: 0; }
.configured-view-grid-master-detail > :first-child .configured-view-table .rich-table-region { max-height: 780px; }
.configured-view-table { min-width: 0; }
.configured-view-table .data-table { min-width: 100%; table-layout: auto; }
.configured-view-table .data-table :is(th, td) { min-width: 8rem; max-width: 32rem; overflow-wrap: break-word; white-space: normal; }
.configured-view-grid-master-detail .configured-view-table .data-table tr > :first-child { width: 52%; }
.configured-view-table .data-table th[scope="row"] a { font-weight: 650; }
.configured-view-table .configured-view-selected > * { background: var(--accent-wash); }
.configured-view-cell-description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.5; }
.configured-view-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; padding: 16px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--accent-wash); }
.configured-view-meta > div { min-width: 0; }
.configured-view-meta > div:last-child { grid-column: 1 / -1; }
.configured-view-meta dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.configured-view-meta dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.configured-view-meta code { font-size: 11px; }
.configured-view-list { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.configured-view-list h3 { margin: 0 0 12px; font-size: 13px; line-height: 1.5; }
.configured-view-list :is(ul, ol) { margin: 0; padding-left: 19px; color: var(--ink); font-size: 12px; line-height: 1.65; }
.configured-view-list li { padding-left: 3px; overflow-wrap: anywhere; }
.configured-view-list li + li { margin-top: 9px; }
.configured-view-list li::marker { color: var(--accent); font-weight: 650; }
.configured-view-source { min-width: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.configured-view-source summary { display: flex; align-items: flex-start; gap: 9px; padding: 12px; color: var(--accent-deep); background: var(--accent-wash); font-size: 12px; cursor: pointer; }
.configured-view-source summary::before { content: "▸"; flex-shrink: 0; }
.configured-view-source[open] summary::before { content: "▾"; }
.configured-view-source summary .ui-icon { flex-shrink: 0; }
.configured-view-source summary span { min-width: 0; overflow-wrap: anywhere; }
.configured-view-source pre { max-width: 100%; max-height: 36rem; margin: 0; padding: 16px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #fbfcff; color: #25334c; font-size: 11px; line-height: 1.65; }
.configured-view-source code { white-space: inherit; }
.configured-view-empty { display: grid; justify-items: start; align-content: start; gap: 12px; padding: 24px var(--panel-padding-inline); }
.configured-view-empty :is(h3, p) { margin: 0; }
.configured-view-empty h3 { font-size: 15px; }
.configured-view-empty p { max-width: 54ch; color: var(--muted); font-size: 13px; line-height: 1.65; }
@media (max-width: 1200px) {
  .configured-view-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .configured-view-form .accounting-actions { grid-column: 1 / -1; }
  .configured-view-grid-master-detail { grid-template-columns: minmax(0, 1fr); }
  .configured-view-grid-master-detail > :first-child .configured-view-table .rich-table-region { max-height: 520px; }
}
@media (max-width: 760px) {
  .configured-view-form, .configured-view-grid-two, .configured-view-meta { grid-template-columns: minmax(0, 1fr); }
  .configured-view-form .accounting-actions { flex-wrap: wrap; }
  .configured-view-form .accounting-actions > * { flex: 1; }
  .configured-view-panel-body { gap: 16px; }
  .configured-view-grid-master-detail .configured-view-table .data-table tr > :first-child { width: 50%; }
}

/* Manifest workspace: SSR tabs/details, enhanced dialogs and relation diagram. */
.manifest-workspace { overflow: clip; }
.manifest-workspace .document-builder { padding: 0; gap: 0; }
.manifest-editor-toolbar { position: sticky; top: 0; z-index: 3; display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #faf8ff; }
.manifest-mode-switch { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid #d8cbff; border-radius: 10px; background: #f0eaff; }
.manifest-mode-switch .secondary { border: 0; background: transparent; }
.manifest-mode-switch .is-active { color: #fff; background: #6636d1; box-shadow: 0 2px 5px #4a249830; }
.manifest-dirty { flex: 1; color: #655781; font-size: 12px; }
.manifest-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 12px 18px 0; border-bottom: 1px solid #dcd1ef; background: #f9f6ff; }
.manifest-tab { flex: 0 0 auto; padding: 12px 16px; color: #635379; background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; font: inherit; cursor: pointer; }
.manifest-tab.is-active { color: #5428b3; background: #ece3ff; border-bottom-color: #743bdb; font-weight: 700; }
.manifest-visual > .document-builder-section { border: 0; border-radius: 0; padding: 22px; }
[data-manifest-pane][hidden], .manifest-visual[hidden], .manifest-text[hidden], .manifest-json-source[hidden], [data-manifest-json-editor][hidden] { display: none !important; }
.manifest-section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.manifest-section-heading h2 { margin: 0 0 7px; font-size: 18px; }
.manifest-section-heading p { max-width: 760px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.manifest-item-list { display: grid; gap: 8px; }
.manifest-item-list > .document-builder-field { display: block; padding: 0; border-color: #e0d7ee; background: #fdfbff; }
.manifest-item-list > .document-builder-field > summary { display: flex; align-items: center; gap: 12px; padding: 13px 15px; cursor: pointer; list-style: none; }
.manifest-item-list summary:hover { background: #f2ecff; }
.manifest-item-list summary::after { content: '›'; margin-left: auto; color: #8a70b3; }
.manifest-item-list summary::-webkit-details-marker { display: none; }
.manifest-item-list summary code { color: #71548e; font-size: 11px; }
.manifest-item-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; background: #e8ddff; color: #6b36d2; }
.manifest-relation .manifest-item-icon { color: #00749e; background: #dff4ff; }
.manifest-method .manifest-item-icon { color: #b35012; background: #fff0dc; }
.manifest-item-target { margin-left: auto; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
[data-manifest-dialog-body] { display: grid; gap: 16px; padding: 18px; }
.manifest-js-only { display: none; }
.document-builder.is-enhanced .manifest-js-only { display: inline-flex; }
.manifest-dialog { width: min(860px, calc(100vw - 36px)); max-height: min(86dvh, 1000px); margin: auto; padding: 0; color: var(--ink); background: #fff; border: 1px solid #d5c5ec; border-radius: 16px; box-shadow: 0 20px 90px #27114545; overflow: auto; }
.manifest-dialog:not([open]) { display: none; }
.manifest-dialog::backdrop { background: #28194666; backdrop-filter: blur(3px); }
.manifest-dialog-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #dfd2ef; background: #f7f1ff; }
.manifest-dialog .document-builder-grid > label, .manifest-dialog label { display: grid; gap: 7px; }
.manifest-dialog input:not([type=checkbox]), .manifest-dialog select, .manifest-dialog textarea { box-sizing: border-box; width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid #d9cfe6; border-radius: 8px; color: var(--ink); background: #fcfaff; font: inherit; }
.manifest-dialog small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.manifest-dialog .accounting-check { display: flex; align-items: center; }
.manifest-dialog textarea.manifest-code, .manifest-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.65; }
.manifest-text { padding: 20px; }
.manifest-text textarea { box-sizing: border-box; width: 100%; min-height: 60dvh; padding: 16px; color: #30234a; background: #fbf8ff; border: 1px solid #d8cce9; border-radius: 10px; tab-size: 2; }
.manifest-empty { padding: 25px; color: #716482; border: 1px dashed #d7c9e9; border-radius: 12px; background: #fbf7ff; line-height: 1.8; }
.manifest-relation:has([data-relation-kind] option[value=many2many]:checked) .manifest-relation-field,
.manifest-relation:not(:has([data-relation-kind] option[value=many2many]:checked)) .manifest-relation-through,
.manifest-field:not(:has([data-document-kind] option[value=reference]:checked)) .document-builder-filter { display: none; }
.manifest-diagram { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(320px, 1.8fr); align-items: center; gap: 36px; padding: 24px; border-radius: 14px; background: radial-gradient(#d6c9ec 1px, transparent 1px) 0 0/14px 14px, #fbf8ff; overflow-x: auto; }
.manifest-diagram-origin, .manifest-diagram-node { display: grid; gap: 8px; padding: 18px; border: 1px solid #bba1e2; border-radius: 12px; background: #fff; box-shadow: 0 4px 16px #72509812; overflow-wrap: anywhere; }
.manifest-diagram-origin { color: #fff; background: linear-gradient(140deg, #7240d6, #3a68cb); border: 0; }
.manifest-diagram-origin span { opacity: .8; font-size: 12px; }
.manifest-diagram-origin code { opacity: .9; font-size: 11px; }
.manifest-diagram-edges { display: grid; gap: 18px; }
.manifest-diagram-edge { display: grid; grid-template-columns: minmax(95px,.65fr) minmax(180px,1fr); align-items: center; gap: 16px; }
.manifest-diagram-link { position: relative; display: grid; gap: 5px; font-size: 12px; color: #664090; }
.manifest-diagram-link::after { content: ''; position: absolute; z-index: 0; top: 50%; left: -36px; right: -16px; border-bottom: 2px solid #ab8ed2; }
.manifest-diagram-link > * { position: relative; z-index: 1; width: fit-content; padding: 2px 5px; background: #fbf8ff; }
.manifest-diagram-link small { color: #b36225; font-size: 10px; }
.manifest-diagram-node { border-left: 4px solid #27a7cb; text-decoration: none; color: var(--ink); }
.manifest-diagram-node code, .manifest-diagram-node small { color: var(--muted); font-size: 10px; }
.manifest-reference-list { margin-top: 16px; color: #6c5882; font-size: 12px; }
.manifest-json-node { display: flex; gap: 8px; align-items: start; min-width: 0; }
.manifest-json-type { width: 145px !important; flex: 0 0 145px; font-size: 12px !important; background: #f1e8ff !important; }
.manifest-json-value { flex: 1; min-width: 0; }
.manifest-json-entries { display: grid; gap: 10px; padding-left: 12px; border-left: 2px solid #e7daf7; margin-bottom: 10px; }
.manifest-json-entry { display: flex; flex-wrap: wrap; align-items: start; gap: 7px; }
.manifest-json-entry > .manifest-json-key { flex: 0 0 140px; width: 140px !important; font-family: ui-monospace, monospace !important; font-size: 12px !important; }
.manifest-json-entry > .manifest-json-node { flex: 1 1 250px; }
@media (max-width: 760px) {
  .manifest-editor-toolbar { flex-wrap: wrap; }
  .manifest-dirty { order: 3; flex-basis: 100%; }
  .manifest-section-heading { flex-wrap: wrap; }
  .manifest-item-target { display: none; }
  .manifest-item-list summary { flex-wrap: wrap; }
  .manifest-json-node { flex-wrap: wrap; }
  .manifest-json-type { width: 100% !important; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .manifest-dialog::backdrop { backdrop-filter: none; } }
.manifest-relation:not(:has([data-relation-kind] option[value=one2one]:checked)) .manifest-relation-inverse { display: none; }

.manifest-json-disclosure { font-size: 11px; padding: 6px 8px; color: #5c28b5; }
.manifest-json-value[hidden], .manifest-json-disclosure[hidden] { display: none !important; }

/* Stable columns for every field, regardless of translated caption length. */
.manifest-item-list > .manifest-field > summary { display: grid; grid-template-columns: 30px minmax(0,1.65fr) minmax(100px,.8fr) minmax(80px,.6fr) 12px; }
.manifest-item-list > .manifest-field > summary::after { margin: 0; }
.manifest-field > summary .manifest-item-target { margin: 0; justify-self: start; }
.manifest-field > summary > strong { min-width: 0; overflow-wrap: anywhere; }
.translatable-phrase { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; max-width: 100%; vertical-align: middle; }
.translatable-phrase .phrase-key { font-size: 10px; font-weight: 400; color: #765a9a; overflow-wrap: anywhere; }
.phrase-trigger { display: inline-grid; place-items: center; flex: 0 0 22px; min-width: 22px; width: 22px; height: 22px; padding: 0; border: 1px solid #d9cbf2; border-radius: 6px; color: #6232bf; background: #f2ebff; font-size: 12px; line-height: 1; box-shadow: none; }
.phrase-trigger:hover, .phrase-trigger:focus-visible { background: #e5d7ff; outline: 2px solid #8960df; outline-offset: 2px; }
.phrase-popover { position: fixed; inset: 18vh auto auto 50%; transform: translateX(-50%); width: min(440px,calc(100vw - 32px)); max-height: 65dvh; overflow: auto; padding: 18px; border: 1px solid #ceb7ed; border-radius: 12px; background: #fff; color: #26334b; box-shadow: 0 14px 65px #29134940; font: 13px/1.55 var(--font-sans, sans-serif); }
.phrase-popover:popover-open { display: grid; gap: 12px; }
.phrase-entry { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid #eee5f7; }
.phrase-entry > code { font-size: 11px; color: #673ea1; overflow-wrap: anywhere; }
.phrase-translation { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; font-weight: 400; }
.phrase-translation[data-current=true] { color: #582abb; }
@media (max-width:700px) { .manifest-item-list > .manifest-field > summary { grid-template-columns: 24px minmax(0,1fr) 65px 12px; gap: 7px; } .manifest-field > summary > code { display: none; } }

/* The same read-only detail window is available to any configured view. */
.detail-dialog { width: min(1120px, calc(100vw - 32px)); max-height: 88dvh; padding: 0; border: 1px solid var(--accent-line); border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 24px 90px #18253c44; }
.detail-dialog::backdrop { background: #18253c88; }
.detail-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.detail-dialog-header h2 { margin: 0; font-size: 18px; }
.detail-dialog-tabs:not([hidden]) { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--accent-wash); }
.detail-dialog-tabs [aria-selected="true"] { background: var(--accent); color: #fff; }
.detail-dialog-content { padding: 20px 22px; }
.detail-dialog-content [data-detail-panel] { display: grid; gap: 16px; }
.detail-dialog-content [data-detail-panel][hidden] { display: none; }
[data-detail-dialog] > summary { cursor: pointer; width: fit-content; }

/* Keep Safari's single-select bezel from overriding the common field geometry.
   This follows component backgrounds so their shorthand cannot erase the arrow. */
:root select:not([multiple]):not([size]),
:root select:not([multiple])[size="1"] {
  -webkit-appearance: none;
  appearance: none;
  padding-inline-end: 2.25em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23526178' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 16px 16px;
}
:root [dir="rtl"] select:not([multiple]):not([size]),
:root [dir="rtl"] select:not([multiple])[size="1"],
:root[dir="rtl"] select:not([multiple]):not([size]),
:root[dir="rtl"] select:not([multiple])[size="1"] { background-position: left 9px center; }
@media (forced-colors: active) {
  :root select:not([multiple]):not([size]),
  :root select:not([multiple])[size="1"] {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none;
  }
}
