/* Internal UI only. Font definitions are shared with the public site. */
:root {
  color-scheme: light;
  --font-ui: Tajawal, Tahoma, Arial, sans-serif;
  --brand: #ceb067; --brand-deep: #80632c; --background: #eeece6; --panel: #fbfaf6; --surface: #f1efe8; --selected: #f2eddf;
  --ink: #272824; --muted: #686a62; --line: #e2e1da; --control-border: #93968b;
  --accent: var(--brand); --accent-hover: #dcc184; --accent-ink: #282312; --focus: var(--brand-deep);
  --success: #346044; --warning: #815b18; --danger: #a33c39; --info: #3e6170;
  --success-surface: #eef4ef; --warning-surface: #f8f2e6; --danger-surface: #faf0ef; --info-surface: #eff4f6;
  --radius: 22px; --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --control-height: 44px; --control-font-size: 16px; --control-line-height: 24px;
  --control-radius: 12px; --control-padding-block: 9px; --control-padding-inline: 12px;
  --label-font-size: 14px; --helper-font-size: 14px; --icon-size: 20px; --table-cell-padding-block: 12px; --table-cell-padding-inline: 16px;
  --menu-max-height: 20rem; --menu-layer: 20; --viewport-gutter: 16px;
  --shadow: 0 14px 42px rgb(47 38 23 / 12%);
  --panel-padding: 18px; --section-gap: 16px; --nav-row-height: 40px;
  --form-width: 780px; --reading-width: 1280px; --scene-gutter: 24px; --motion: 240ms ease; --entry-duration: 380ms; --entry-easing: cubic-bezier(.2,.7,.3,1);
  --glass-panel: rgb(255 254 250 / 88%); --glass-card: rgb(255 254 250 / 95%); --glass-overlay: rgb(255 254 250 / 96%);
  --glass-menu: rgb(255 252 242 / 72%); --glass-edge: rgb(255 255 255 / 65%); --glass-blur: 18px; --card-shadow: 0 12px 30px rgb(48 38 22 / 8%);
  --nav-glass: rgb(248 245 234 / 68%); --nav-hover: rgb(255 253 245 / 32%); --nav-active: rgb(255 252 238 / 70%);
  --stage-width: 1760px; --stage-gutter: max(clamp(16px, 3vw, 56px), env(safe-area-inset-left), env(safe-area-inset-right));
  --motion-fast: 180ms; --motion-slow: 440ms; --interaction-glow: 0 0 0 3px rgb(206 176 103 / 15%), 0 5px 16px rgb(71 54 22 / 10%);
  --scrollbar-thumb: #a8a89e; --scrollbar-thumb-hover: #73766b; --scrollbar-track: transparent;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--background); color: var(--ink); font: 400 16px/1.65 var(--font-ui); }
body:is(.app-shell, .public-shell) { background-image: radial-gradient(ellipse at 92% 0, rgb(206 176 103 / 9%), transparent 45%), radial-gradient(ellipse at 2% 100%, rgb(206 176 103 / 5%), transparent 40%); background-attachment: fixed; }
img { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 5px; }
a { text-decoration: none; } a:hover { color: var(--brand-deep); }
button, input, select, textarea { font-family: inherit; font-size: var(--control-font-size); line-height: var(--control-line-height); }
code, kbd, samp, pre { font-family: var(--font-ui); }
button, summary { cursor: pointer; }
:where(a, button, summary, input, select, textarea, [tabindex]) { -webkit-tap-highlight-color: transparent; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid transparent; outline-offset: 4px; box-shadow: 0 2px 0 var(--focus); }
[dir='ltr'] { unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
h1 { font-size: clamp(24px, 2vw, 29px); margin: 0 0 4px; }
h2 { font-size: 19px; font-weight: 500; margin: 0 0 16px; }
h3 { font-size: 17px; font-weight: 500; margin: 24px 0 8px; }
p { margin: 0 0 16px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.icon { width: var(--icon-size); height: var(--icon-size); flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; inset-inline-start: 16px; top: -100px; z-index: 100; padding: 12px 20px; background: var(--accent); color: var(--accent-ink); border-radius: var(--control-radius); }
.skip-link:focus { top: 16px; }
.public-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header, .site-footer { width: min(100% - 64px, 1240px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header { min-height: 104px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand img { display: block; object-fit: contain; }
.public-content { flex: 1; width: min(100% - 40px, 1240px); margin: 48px auto; }
.public-content .panel--narrow { max-width: 500px; padding: 36px; }
.site-footer { padding-block: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.intro { max-width: 760px; padding-block: clamp(32px, 8vw, 100px); }
.intro h1 { font-size: clamp(32px, 6vw, 58px); }
.intro__lead { font-size: 20px; color: var(--muted); }
.app-shell { min-height: 100dvh; padding: 16px; }
.app-body { position: relative; width: min(100%, var(--reading-width)); margin-inline: auto; min-width: 0; display: flex; flex-direction: column; min-height: calc(100dvh - 32px); }
.app-header { position: relative; z-index: 30; min-height: 56px; width: calc(100% - 2 * var(--scene-gutter)); margin: 20px auto 0; display: flex; align-items: center; gap: 14px; padding: 6px 12px; border: 1px solid var(--glass-edge); border-radius: 28px; background: var(--panel); box-shadow: var(--card-shadow); }
.app-header .account-menu { margin-inline-start: auto; }
.dock-brand { flex: none; display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.dock-brand .brand-logo { width: 40px; height: 40px; padding: 4px; background: var(--panel); border-radius: 50%; }
.dock-brand > span { font-weight: 700; font-size: 13px; line-height: 1.4; white-space: nowrap; }
.dock-brand small { display: block; font-size: 10px; font-weight: 400; letter-spacing: .5px; color: var(--muted); }
.dock-page { display: none; }
.desktop-navigation { min-width: 0; flex: 1; }
.app-nav { min-block-size: 0; }
.desktop-navigation .app-nav { display: flex; align-items: center; justify-content: start; gap: 5px; }
.desktop-navigation .nav-group { flex: none; }
.dock-context { flex: none; font-size: 11px; text-align: end; line-height: 1.5; color: var(--muted); }
.dock-context time { display: block; font-size: 12px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.app-header .account-menu > summary > span { display: block; max-inline-size: 100px; font-size: 12px; }
.app-header .account-menu > summary { gap: 8px; border-radius: 24px; padding-block: 3px; padding-inline: 3px 8px; }
.app-header .account-menu > summary small { font-size: 10px; }
.app-header .account-menu > summary:hover { box-shadow: var(--interaction-glow); background: rgb(255 255 255 / 12%); }
.nav-group { min-width: 0; position: relative; }
.app-nav a, .nav-heading { min-height: var(--nav-row-height); display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 24px; text-decoration: none; font-size: 14px; line-height: 1.5; transition: background var(--motion), color var(--motion); }
.app-nav a > span, .nav-heading > span { min-inline-size: 0; overflow-wrap: break-word; }
.app-nav .icon { inline-size: 18px; block-size: 18px; }
.app-nav a:hover, .nav-heading:hover { background: var(--surface); text-decoration: none; }
.app-nav :focus-visible { outline-offset: -2px; }
.app-nav a[aria-current='page'], .nav-group[data-active='true'] > .nav-heading { color: var(--ink); background: var(--selected); font-weight: 500; }
.nav-group[open] > .nav-heading { background: var(--surface); }
.nav-heading { cursor: pointer; list-style: none; font-weight: 500; }
.nav-heading::-webkit-details-marker { display: none; }
.nav-arrow { inline-size: 14px; block-size: 14px; flex-shrink: 0; margin-inline-start: auto; transition: transform 240ms var(--entry-easing); }
.nav-group[open] > .nav-heading .nav-arrow { transform: rotate(180deg); }
.nav-children { padding: 6px; }
.nav-children a { min-height: 40px; border-radius: 10px; font-size: 14px; padding: 8px 12px; }
.desktop-navigation .nav-children { position: absolute; z-index: var(--menu-layer); top: calc(100% + 12px); inset-inline-start: 0; width: 240px; max-width: calc(100dvw - 32px); max-height: min(480px, calc(100dvh - 120px)); overflow-y: auto; background: var(--panel); color: var(--ink); border: 1px solid var(--glass-edge); border-radius: 18px; box-shadow: var(--shadow); }
.desktop-navigation .nav-group:nth-last-child(-n+3) .nav-children { inset-inline-start: auto; inset-inline-end: 0; }
.desktop-navigation .nav-children[data-floating-positioned], .account-menu__content[data-floating-positioned] { position-anchor: auto; position-area: none; }
.desktop-navigation :is(.nav-heading, .nav-group > a) { gap: 0; min-height: 44px; padding: 12px; }
.desktop-navigation :is(.nav-heading, .nav-group > a) > span { max-inline-size: 0; opacity: 0; margin-inline-start: 0; white-space: nowrap; overflow: hidden; transition: max-inline-size var(--motion-fast) ease, opacity var(--motion-fast) ease, margin var(--motion-fast) ease; }
.desktop-navigation :is(.nav-group[data-active='true'] > .nav-heading, .nav-group > a[aria-current='page'], .nav-group:hover > .nav-heading, .nav-group:focus-within > .nav-heading, .nav-group:hover > a, .nav-group:focus-within > a) > span { max-inline-size: 130px; opacity: 1; margin-inline-start: 8px; }
.desktop-navigation .nav-heading { width: auto; height: 44px; justify-content: center; }
.desktop-navigation :is(.nav-heading, .nav-group > a):is(:hover, :focus-visible) { box-shadow: var(--interaction-glow); }
.desktop-navigation .nav-arrow { display: none; }
.desktop-navigation .nav-group > a { min-height: 44px; white-space: nowrap; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding-block: 12px 20px; text-decoration: none; }
.sidebar-brand small { display: block; font-size: 11px; color: var(--muted); }
@media (max-width: 1399px) { .dock-context { display: none; } }
@media (max-width: 1399px) { .app-header .account-menu > summary > span { display: none; } }
.account-menu { position: relative; min-width: 0; max-width: 100%; }
.account-menu summary { display: flex; gap: 12px; align-items: center; min-height: var(--control-height); padding: 0; line-height: var(--control-line-height); list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary .icon { width: 34px; height: 34px; padding: 7px; border: 1px solid var(--line); background: var(--panel); border-radius: 50%; }
.account-menu summary > span { min-width: 0; }
.account-menu strong { display: block; font-weight: 500; overflow-wrap: anywhere; }
.account-menu small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.account-menu__content { position: absolute; inset-inline-end: 0; top: calc(100% + var(--space-2)); width: 15rem; max-width: calc(100dvw - 2 * var(--viewport-gutter)); max-height: min(var(--menu-max-height), calc(100dvh - 2 * var(--viewport-gutter))); overflow-y: auto; padding: var(--space-2); color: var(--ink); background: var(--panel); border: 1px solid var(--control-border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: var(--menu-layer); }
@supports (position-area: block-end) {
  .account-menu summary { anchor-name: --account-trigger; }
  .account-menu__content { position: fixed; position-anchor: --account-trigger; inset: auto; position-area: block-end span-inline-start; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; margin: var(--space-2) 0; }
}
.account-menu__content a, .account-menu__content button { display: block; min-height: var(--control-height); padding: var(--control-padding-block) var(--control-padding-inline); width: 100%; text-align: start; line-height: var(--control-line-height); overflow-wrap: anywhere; border-radius: var(--control-radius); text-decoration: none; }
.account-menu__content a:hover, .account-menu__content button:hover { background: var(--surface); }
.account-menu__content :focus-visible { outline-offset: -2px; }
.account-menu__content form { margin: 0; }
.account-menu__content :is(a, button), .nav-children a { transition: background var(--motion-fast) ease, color var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.app-content { width: 100%; max-inline-size: var(--reading-width); margin-inline: auto; padding: 28px var(--scene-gutter) 32px; flex: 1; min-width: 0; }
.breadcrumbs { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.breadcrumbs li + li { border-inline-start: 1px solid var(--line); padding-inline-start: 12px; }
.page-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: var(--section-gap); }
.page-description { color: var(--muted); font-size: 14px; margin: 0; }
.page-heading h1 { font-weight: 700; }
.app-content:has(> .dashboard-hero) > .breadcrumbs { display: none; }
.eyebrow { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.eyebrow:empty { display: none; }
.app-footer { padding: 20px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 16px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: var(--panel-padding); box-shadow: var(--card-shadow), inset 0 1px 0 var(--glass-edge); }
.panel > h2:not(:first-child), .panel > h3:not(:first-child) { margin-top: 24px; }
.panel--narrow { max-width: 580px; margin-inline: auto; }
.panel--quiet { background: var(--surface); }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 0; }
.section-heading a { font-size: 14px; }
.owner-finance { margin-bottom: 0; }
.report-index, .report-metrics, .report-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.report-index { margin-top: 20px; }
.report-link { color: inherit; text-decoration: none; }
.report-link:hover, .report-link:focus-visible { border-color: var(--ink); }
.report-link :is(h2, h3) { margin: 0 0 8px; font-size: 18px; }
.report-link p { margin: 0; color: var(--muted); }
.report-metrics { margin: 16px 0 20px; }
.report-metrics > div { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-wrap: anywhere; }
.report-metrics dt { color: var(--muted); font-size: 13px; }
.report-metrics dd { margin: 8px 0 0; font-size: clamp(18px, 2vw, 25px); font-weight: 500; font-variant-numeric: tabular-nums; }
.report-metrics small { display: block; color: var(--muted); margin-top: 8px; }
.report-metrics--small dd { font-size: 17px; }
.report-periods { display: flex; flex-wrap: wrap; gap: 8px; }
.report-periods a { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.report-periods a[aria-current=page] { border-color: var(--ink); color: var(--ink); }
.report-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 20px 0; }
.report-filter label { display: grid; gap: 6px; min-width: min(100%, 180px); }
@media (max-width: 600px) { .report-filter label, .report-filter button { width: 100%; } }
.report-charts { direction: ltr; grid-template-columns: minmax(0, 1fr); margin-top: 20px; align-items: stretch; }
.report-charts > section { direction: rtl; display: flex; flex-direction: column; min-inline-size: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--panel); }
html[dir='ltr'] .report-charts > section { direction: ltr; }
.report-charts h3 { margin: 0 0 16px; }
.trend-chart { margin: 0; min-inline-size: 0; }
.trend-chart .section-heading { margin-bottom: 12px; }
.trend-chart .section-heading h3 { margin: 0; }
.trend-visual { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; margin-block: 18px 12px; }
.trend-axis-y { position: relative; height: 200px; text-align: end; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.trend-axis-y > span { position: absolute; inset-inline-end: 0; transform: translateY(-50%); }
.trend-plot { min-inline-size: 0; }
.trend-plot svg { display: block; width: 100%; height: 200px; overflow: visible; }
.trend-grid path { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-zero { fill: none; stroke: var(--control-border); stroke-width: 1; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.trend-area { fill: var(--brand); opacity: .12; }
.trend-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trend-line--income { stroke: var(--brand-deep); }
.trend-line--expense { stroke: var(--ink); stroke-dasharray: 5 5; }
.trend-dot { stroke: var(--panel); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.trend-dot--income, .chart-swatch--income { fill: var(--brand-deep); background: var(--brand-deep); }
.trend-dot--expense, .chart-swatch--expense { fill: var(--ink); background: var(--ink); }
.chart-swatch--other { background: var(--muted); }
.trend-axis-x { display: flex; justify-content: space-between; gap: 4px; padding-inline: 3px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.trend-axis-x abbr { text-decoration: none; }
.chart-legend, .chart-legend > span { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chart-legend { margin: 12px 0 8px; color: var(--muted); font-size: 13px; gap: 16px; }
.chart-legend i { inline-size: 12px; block-size: 8px; border-radius: 2px; }
.chart-data > summary, .dashboard-activity > summary { display: list-item; min-block-size: 44px; align-content: center; font-size: 13px; color: var(--ink); cursor: pointer; }
.chart-data .table-wrap { margin-block: 8px 0; }
.chart-data table { min-inline-size: 0; }
.chart-data :is(th, td) { padding: 8px; font-size: 12px; }
.income-composition { display: grid; grid-template-columns: minmax(140px, 190px) minmax(0, 1fr); align-items: center; gap: 28px; margin: 20px 0; max-width: 720px; }
.income-donut { position: relative; aspect-ratio: 1; min-width: 0; }
.income-donut svg { display: block; width: 100%; height: auto; }
.income-donut circle { fill: none; stroke-width: 12px; }
.donut-track { stroke: var(--line); }
.donut-segment.chart-swatch--income { stroke: var(--brand-deep); }
.donut-segment.chart-swatch--expense { stroke: var(--ink); }
.donut-segment.chart-swatch--other { stroke: var(--muted); }
.donut-center { position: absolute; inset: 24%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.donut-center span, .donut-center small { font-size: 11px; color: var(--muted); }
.donut-center strong { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.income-share-legend { margin: 0 0 12px; }
.income-share-legend > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.income-share-legend dt { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.income-share-legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.income-share-legend dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; }
.income-share-legend small { display: block; color: var(--muted); font-size: 12px; }
.income-distribution { margin: 8px 0 20px; }
.income-distribution > div { margin-block-end: 24px; }
.income-distribution dt { font-size: 14px; color: var(--muted); }
.income-distribution dd { margin: 4px 0 0; font-size: 19px; font-weight: 500; }
.distribution-track { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: 8px; background: var(--surface); border-radius: 3px; margin-block-start: 10px; }
.distribution-track::before { content: ''; position: absolute; top: -3px; left: 50%; height: 14px; border-inline-start: 1px solid var(--control-border); }
.distribution-bar { display: block; grid-row: 1; height: 8px; border-radius: 3px; }
.distribution-bar--positive { grid-column: 2; justify-self: start; transform-origin: left center; }
.distribution-bar--negative { grid-column: 1; justify-self: end; transform-origin: right center; }
.chart-report-link { margin-block-start: auto; display: inline-flex; align-items: center; min-block-size: 44px; font-size: 13px; }
.finance-breakdown { margin-block-start: 20px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--section-gap); margin-block-start: var(--section-gap); }
.count { font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding-inline: 8px; background: var(--selected); border-radius: 50%; margin-inline-start: 8px; }
.summary-list { margin: 0 0 20px; }
.summary-list > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding-block: 12px; }
.summary-list dt { color: var(--muted); font-size: 14px; }
.summary-list dd { margin: 0; font-weight: 500; }
.summary-list dd a { font-size: 12px; margin-inline-start: 12px; white-space: nowrap; }
.activity-list, .attachment-list { padding: 0; margin: 0; list-style: none; }
.activity-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.activity-list small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.empty-state { padding: 28px 16px; background: var(--surface); border-radius: var(--radius); text-align: center; margin-block: 16px; }
.empty-state strong { display: block; font-weight: 500; }
.empty-state p, .empty-state span { display: block; color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.empty-icon { width: 34px; height: 34px; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 4px 10px; border-radius: 4px; font-size: 13px; font-weight: 500; }
.badge--neutral { background: var(--selected); color: var(--ink); }
.badge--success { background: var(--success-surface); color: var(--success); }
.badge--warning { background: var(--warning-surface); color: var(--warning); }
.badge--danger { background: var(--danger-surface); color: var(--danger); }
.badge--info { background: var(--info-surface); color: var(--info); }
.notice, .alert { padding: 16px; background: var(--surface); border-inline-start: 3px solid var(--ink); margin-block: 16px; border-radius: 0 var(--radius) var(--radius) 0; }
.alert { display: grid; gap: 4px; }
.alert--success { background: var(--success-surface); border-color: var(--success); }
.alert--danger { background: var(--danger-surface); border-color: var(--danger); }
.alert--success[data-dismiss-success] { position: relative; padding-inline-end: 72px; }
.alert-dismiss { position: absolute; inset-inline-end: 8px; top: 8px; min-block-size: 44px; padding: 8px; border: 0; border-radius: var(--control-radius); background: transparent; color: inherit; font-size: 14px; }
.alert-dismiss:hover { background: rgb(0 0 0 / 5%); }
.request-progress { display: grid; grid-column: 1 / -1; gap: 6px; color: var(--muted); font-size: 14px; }
.request-progress[hidden] { display: none; }
.request-progress progress { inline-size: 100%; block-size: 6px; accent-color: var(--brand-deep); }
.workflow-progress { margin-block-end: var(--section-gap); }
.workflow-progress .section-heading { margin-block-end: 12px; }
.workflow-stages { display: flex; list-style: none; padding: 0; margin: 12px 0; gap: 8px; }
.workflow-stage { flex: 1; min-inline-size: 0; position: relative; text-align: center; }
.workflow-stage:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 16px; inset-inline-start: calc(50% + 20px); inline-size: calc(100% - 32px); block-size: 2px; background: var(--line); }
.workflow-stage[data-stage-state='complete']::after { background: var(--brand-deep); }
.workflow-marker { display: grid; place-items: center; position: relative; z-index: 1; inline-size: 34px; block-size: 34px; margin: 0 auto 8px; border: 1px solid var(--control-border); border-radius: 50%; background: var(--panel); color: var(--muted); font-size: 14px; }
.workflow-stage[data-stage-state='complete'] .workflow-marker { border-color: var(--brand-deep); background: var(--brand-deep); color: #fff; }
.workflow-stage[data-stage-state='current'] .workflow-marker { border: 2px solid var(--brand-deep); color: var(--ink); box-shadow: 0 0 0 4px var(--selected); }
.workflow-stage strong { display: block; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.workflow-stage small { display: block; margin-block-start: 4px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.workflow-progress > .subtle:last-child { margin-block-end: 0; }
@media (max-width: 700px) {
  .workflow-stages { display: grid; gap: 16px; }
  .workflow-stage { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; text-align: start; }
  .workflow-marker { margin: 0; }
  .workflow-stage:not(:last-child)::after { inset-block-start: 38px; inset-inline-start: 16px; inline-size: 2px; block-size: calc(100% - 22px); }
}
.validation, .field-validation-error { color: var(--danger); }
.validation:empty, .validation-summary-valid, .field-validation-valid { display: none; }
.validation-summary-errors { padding: 12px 16px; border: 1px solid var(--danger); border-radius: var(--radius); background: var(--danger-surface); }
.validation ul { margin: 0; }
.field span, .field small { font-size: var(--helper-font-size); line-height: var(--control-line-height); overflow-wrap: anywhere; }
.form-stack { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.app-content .form-grid { grid-template-columns: minmax(0, 1fr); gap: 12px 16px; align-items: start; }
.app-content .form-grid > :not(.field) { grid-column: 1 / -1; }
@media (min-width: 700px) {
  .app-content .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .app-content .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.reference-control { min-width: 0; max-width: 100%; }
.reference-field { position: relative; min-width: 0; }
.reference-field input { padding-inline-end: 4.5rem; text-overflow: ellipsis; }
.reference-field:dir(rtl) input { padding-left: 4.5rem; padding-right: var(--control-padding-inline); }
.reference-field:dir(ltr) input { padding-right: 4.5rem; padding-left: var(--control-padding-inline); }
.reference-clear { position: absolute; inset-inline-end: 1.5rem; top: 0; min-height: var(--control-height); width: 40px; border: 0; background: transparent; color: var(--muted); }
.reference-clear[hidden], [data-reference-enhanced][hidden], .reference-popup[hidden] { display: none; }
.reference-chevron { position: absolute; inset-inline-end: .5rem; top: calc((var(--control-height) - 16px) / 2); pointer-events: none; transform: rotate(-90deg); }
.reference-popup { box-sizing: border-box; margin: 0; padding: 4px; border: 1px solid var(--control-border); border-radius: var(--control-radius); background: var(--panel); color: var(--ink); box-shadow: var(--shadow); overflow: auto; overscroll-behavior: contain; z-index: 40; font-family: inherit; text-align: start; direction: inherit; }
.reference-popup [role='option'], .reference-add, .reference-more { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; background: transparent; color: var(--ink); text-align: start; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.reference-popup [role='option']:hover, .reference-popup [role='option'][aria-selected='true'] { background: var(--selected); }
.reference-add { border-bottom: 1px solid var(--line); font-weight: 700; }
.reference-add[hidden], .reference-more[hidden] { display: none; }
.reference-popup [role='status'] { margin: 4px 12px; }
.reference-field input[aria-busy='true'] { border-style: dashed; }
@media (forced-colors: active) { .reference-popup [role='option'][aria-selected='true'] { outline: 2px solid Highlight; } }
.field { display: grid; gap: var(--space-1); min-width: 0; }
.field > :is(p, small) { margin-block: 0; }
.entry-progress { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0 0 12px; color: var(--muted); }
.entry-progress [aria-current='step'] { color: var(--ink); font-weight: 700; }
.garment-entry { min-inline-size: 0; overflow-wrap: anywhere; }
.garment-entry .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 0; gap: 12px; }
@media (min-width: 1200px) { .garment-entry .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .garment-entry .filter-grid { grid-template-columns: minmax(0, 1fr); } }
.garment-entry .form-stack { margin-block-start: 8px; gap: 12px; }
.garment-entry .toolbar { flex-wrap: wrap; }
.entry-secondary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px 24px; align-items: end; }
.entry-additional { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px 24px; align-items: start; }
.garment-entry > h2 { margin-block: 0 4px; }
.garment-entry > p { margin-block: 0 8px; }
.garment-entry .form-stack > p { margin-block: 0; }
.garment-entry .optional-fields { padding: 10px 12px; border-radius: var(--control-radius); }
.garment-entry :is(input:not([type='checkbox']), select, textarea) { inline-size: 100%; min-inline-size: 0; }
.entry-classifications { margin: 0; padding: 8px 12px; min-inline-size: 0; }
.entry-classifications legend { font-weight: 500; font-size: var(--label-font-size); }
.checkbox-options { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.checkbox-line { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; cursor: pointer; }
.checkbox-line input[type='checkbox'] { inline-size: 18px; block-size: 18px; min-block-size: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--brand-deep); }
.garment-barcode { margin: 12px 0; inline-size: min(100%, 340px); }
.garment-barcode img { display: block; inline-size: 100%; background: white; }
.garment-camera { inline-size: min(560px, calc(100vw - 24px)); max-block-size: calc(100dvh - 24px); overflow-y: auto; padding: 18px; }
.garment-camera video { display: block; inline-size: 100%; max-block-size: 45dvh; aspect-ratio: 4 / 3; object-fit: contain; background: var(--ink); border-radius: var(--control-radius); }
.garment-camera .section-heading { gap: 12px; flex-wrap: wrap; }
.barcode-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; min-inline-size: 0; }
.barcode-input input { min-inline-size: 0; }
.barcode-trigger { padding-inline: 10px; font-size: 14px; white-space: nowrap; }
label { font-size: var(--label-font-size); line-height: var(--control-line-height); font-weight: 500; overflow-wrap: anywhere; }
input, select, textarea { width: 100%; max-width: 100%; min-height: var(--control-height); border: 1px solid var(--control-border); border-radius: var(--control-radius); padding: var(--control-padding-block) var(--control-padding-inline); color: var(--ink); background: var(--panel); min-width: 0; transition: border-color var(--motion), box-shadow var(--motion); }
input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']), select:not([multiple]):not([size]) { height: var(--control-height); }
select:not([multiple]):not([size]) { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; padding-inline-end: 2.25rem; }
:is(input, select, textarea):not(:disabled):not(.input-validation-error):not([aria-invalid='true']):hover { border-color: var(--ink); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface); color: var(--muted); cursor: not-allowed; }
input:read-only:not([type='checkbox']):not([type='radio']), textarea:read-only { background: var(--surface); }
::placeholder { color: var(--muted); opacity: .85; }
/* Style only the browser's supported in-page picker; legacy OS popups remain native. */
@supports (appearance: base-select) {
  select:not([multiple]):not([size]), select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
  select:not([multiple]):not([size]) { padding-inline-end: var(--control-padding-inline); gap: 12px; }
  select:not([multiple]):not([size])::picker(select) { inline-size: anchor-size(width); min-inline-size: 0; max-inline-size: calc(100dvw - 2 * var(--viewport-gutter)); max-block-size: min(var(--menu-max-height), calc(100dvh - 2 * var(--viewport-gutter))); overflow: auto; margin-block: var(--space-1); border: 1px solid var(--control-border); border-radius: var(--radius); background: var(--background); color: var(--ink); box-shadow: var(--shadow); padding: var(--space-1); white-space: normal; }
  select:not([multiple]):not([size]) option { min-block-size: var(--control-height); padding: var(--space-2) var(--control-padding-inline); line-height: var(--control-line-height); white-space: normal; overflow-wrap: anywhere; text-align: start; }
  select:not([multiple]):not([size]) option:checked { background: var(--selected); font-weight: 500; }
  select:not([multiple]):not([size]) option:hover, select:not([multiple]):not([size]) option:focus-visible { background: var(--surface); outline-offset: -2px; }
  select:not([multiple]):not([size]) option:disabled { color: var(--muted); cursor: not-allowed; }
  select:not([multiple]):not([size]) > button { display: contents; }
  select selectedcontent { display: block; min-inline-size: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  select::picker-icon { flex: none; margin-inline-start: auto; color: var(--muted); }
  @supports (max-block-size: stretch) {
    @media (max-height: 45rem) {
      select:not([multiple]):not([size])::picker(select) { max-block-size: stretch; }
    }
  }
}
textarea { min-height: 68px; resize: vertical; }
input[type='checkbox'], input[type='radio'] { width: 20px; height: 20px; min-height: 20px; padding: 0; flex: none; accent-color: var(--accent); vertical-align: middle; margin-inline-end: 8px; }
:is(input, select, textarea).input-validation-error, :is(input, select, textarea)[aria-invalid='true'] { border-color: var(--danger); }
.field > label { transition: color var(--motion-fast) ease; }
.field:focus-within > label { color: var(--brand-deep); }
.field:has(.input-validation-error, [aria-invalid='true']) > label { color: var(--danger); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: fit-content; min-height: var(--control-height); padding: var(--control-padding-block) 18px; line-height: var(--control-line-height); border: 1px solid var(--accent); border-radius: var(--control-radius); max-width: 100%; overflow-wrap: anywhere; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; cursor: pointer; transition: background var(--motion), border-color var(--motion), box-shadow var(--motion), transform var(--motion-fast) ease; }
.button:disabled, .button[aria-disabled='true'] { opacity: .65; cursor: not-allowed; }
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.button:not(:disabled):not([aria-disabled='true']):hover { box-shadow: var(--interaction-glow); }
.button:not(:disabled):not([aria-disabled='true']):active { transform: translateY(1px); box-shadow: inset 0 1px 3px rgb(47 38 23 / 12%); }
.button--secondary { background: var(--panel); color: var(--ink); border-color: var(--control-border); font-weight: 500; }
.button--secondary:hover { background: var(--surface); border-color: var(--control-border); }
.button--danger { background: var(--danger-surface); color: var(--danger); border-color: var(--danger); }
.button--danger:hover { background: #f5e2e0; border-color: var(--danger); }
.button:disabled:hover { background: var(--surface); border-color: var(--control-border); }
.link-button { background: none; border: 0; padding: 8px 4px; min-height: var(--control-height); color: var(--ink); text-decoration: none; cursor: pointer; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; padding: 10px; width: var(--control-height); height: var(--control-height); background: var(--surface); border: 1px solid var(--line); border-radius: 50%; }
.icon-button { transition: background var(--motion), box-shadow var(--motion); }
.icon-button:not(:disabled):is(:hover, :focus-visible) { box-shadow: var(--interaction-glow); }
.mobile-nav-toggle { display: none; }
.actions:not(td) { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); }
.actions form { margin: 0; }
td.actions { white-space: nowrap; }
td.actions > * { display: inline-flex; align-items: center; min-block-size: var(--control-height); vertical-align: middle; }
td.actions > * + * { margin-inline-start: var(--space-2); }
.filter-grid, .decision-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--space-4); align-items: end; margin-block: var(--space-4); }
.decision-grid form { display: grid; gap: 12px; }
.table-wrap { max-width: 100%; overflow-x: auto; margin-block: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: var(--table-cell-padding-block) var(--table-cell-padding-inline); border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
thead { background: var(--surface); }
th { font-weight: 500; color: var(--muted); font-size: 13px; }
tbody tr { transition: background var(--motion-fast) ease; }
tbody tr:is(:hover, :focus-within) { background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
tfoot { background: var(--selected); }
table caption { text-align: start; font-weight: 500; padding: 12px 16px; }
.table-wrap table input:not([type='checkbox']):not([type='radio']):not([type='hidden']), .table-wrap table select { min-width: 130px; }
.table-wrap table select { width: 16rem; max-width: 100%; }
td .actions, td .toolbar { gap: var(--space-2); }
.ledger-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ledger-nav a { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; font-size: 14px; }
.ledger-nav a[aria-current='page'] { background: var(--selected); font-weight: 500; }
.account-indent { display: inline-block; padding-inline-start: calc(var(--depth) * 16px); }
.detail-list { display: grid; grid-template-columns: minmax(100px, .35fr) minmax(0, 1fr); gap: 12px 24px; margin-block: 24px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.details dt { color: var(--muted); font-size: 14px; margin-top: 16px; }
.details dd { margin: 4px 0 20px; }
.subtle { display: block; font-size: var(--helper-font-size); color: var(--muted); }
.secret, .copy-value { background: var(--surface); padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--font-ui); overflow-wrap: anywhere; }
.break-all, .break-word, code { overflow-wrap: anywhere; }
.code-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; list-style: none; }
.code-list li { padding: 12px; background: var(--surface); text-align: center; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.permission-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.permission-card legend { max-width: 100%; overflow-wrap: anywhere; }
.attachment-list li { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; margin-bottom: 12px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }
dialog { color: var(--ink); border: 1px solid var(--control-border); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); max-width: calc(100dvw - 2 * var(--viewport-gutter)); max-height: calc(100dvh - 2 * var(--viewport-gutter)); overflow-y: auto; }
dialog::backdrop { background: rgb(0 0 0 / 68%); }
.confirmation { width: 480px; padding: var(--space-6); }
.nav-drawer {
  --nav-inset: 12px; --nav-panel-width: 380px; --nav-row-height: 50px; --menu-enter-x: 18px;
  --nav-safe-start: env(safe-area-inset-right); --nav-safe-end: env(safe-area-inset-left);
  margin: 0; inset-block-start: max(var(--nav-inset), env(safe-area-inset-top)); inset-block-end: auto;
  inset-inline-start: max(var(--nav-inset), var(--nav-safe-start)); inset-inline-end: auto;
  width: min(var(--nav-panel-width), calc(100dvw - max(var(--nav-inset), var(--nav-safe-start)) - max(var(--nav-inset), var(--nav-safe-end))));
  height: auto; max-height: calc(100dvh - max(var(--nav-inset), env(safe-area-inset-top)) - max(var(--nav-inset), env(safe-area-inset-bottom)));
  max-width: none; padding: 12px; border: 1px solid var(--glass-edge); border-radius: 26px;
  background: var(--panel); color: var(--ink); overflow: hidden;
  box-shadow: 0 24px 64px rgb(32 29 21 / 20%), inset 0 1px 0 rgb(255 255 255 / 80%);
}
html[dir='ltr'] .nav-drawer { --menu-enter-x: -18px; --nav-safe-start: env(safe-area-inset-left); --nav-safe-end: env(safe-area-inset-right); }
.nav-drawer::backdrop { background: rgb(35 33 28 / 28%); backdrop-filter: blur(7px); }
.nav-drawer[open] { display: flex; flex-direction: column; }
.nav-drawer .drawer-heading { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 4px 12px; margin-bottom: 6px; border-bottom: 1px solid rgb(69 61 40 / 12%); }
.nav-drawer .sidebar-brand { min-width: 0; gap: 10px; padding: 0; }
.nav-drawer .sidebar-brand .brand-logo { width: 40px; height: 40px; object-fit: contain; }
.nav-drawer .sidebar-brand > span { font-size: 15px; font-weight: 500; line-height: 1.4; }
.nav-drawer .sidebar-brand small { font-size: 10px; font-weight: 400; letter-spacing: .4px; }
.nav-drawer .drawer-heading .icon-button { flex: none; width: 44px; height: 44px; border: 1px solid rgb(69 61 40 / 14%); border-radius: 50%; background: rgb(255 253 245 / 28%); }
.nav-drawer .app-nav { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 2px; }
.nav-drawer .nav-group + .nav-group { margin-block-start: 2px; }
.nav-drawer :is(.nav-heading, .app-nav a) {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) 16px; align-items: center; column-gap: 12px;
  min-height: var(--nav-row-height); padding: 11px 14px; border-radius: 14px;
  background: transparent; color: var(--ink); font-size: 16px; font-weight: 400; line-height: 1.5; text-align: start;
}
.nav-drawer .nav-heading { font-weight: 500; }
.nav-drawer .app-nav .icon { inline-size: 20px; block-size: 20px; opacity: .84; }
.nav-drawer .nav-arrow { inline-size: 16px; block-size: 16px; margin: 0; opacity: .65; }
.nav-drawer .nav-group[open] > .nav-heading { background: rgb(206 176 103 / 10%); }
.nav-drawer .nav-group[data-active='true'] > .nav-heading { color: var(--brand-deep); background: rgb(206 176 103 / 10%); }
.nav-drawer .app-nav a:is(:hover, :focus-visible), .nav-drawer .nav-group > .nav-heading:is(:hover, :focus-visible) { background: var(--nav-hover); }
.nav-drawer .app-nav a:active, .nav-drawer .nav-group > .nav-heading:active { background: rgb(206 176 103 / 18%); }
.nav-drawer .app-nav a[aria-current='page'] { background: var(--nav-active); font-weight: 500; box-shadow: inset 0 0 0 1px rgb(206 176 103 / 28%); }
.nav-drawer .nav-children { margin: 4px 0 6px; margin-inline-start: 24px; padding: 0; border-inline-start: 1px solid rgb(128 99 44 / 22%); }
.nav-drawer .nav-children a { grid-template-columns: 18px minmax(0, 1fr); gap: 10px; min-height: 48px; margin-inline-start: 6px; font-size: 15px; border-radius: 10px; padding: 10px 12px; }
.nav-drawer .nav-children .icon { inline-size: 18px; block-size: 18px; opacity: .62; }
.nav-drawer .nav-children a[aria-current='page'] .icon { opacity: 1; }
.nav-drawer .nav-group[open][data-expanded='false'] > .nav-heading { background: transparent; }
.nav-drawer .nav-group[data-expanded='false'] > .nav-heading .nav-arrow { transform: none; }
body:has(dialog[open]) { overflow: hidden; }
@media (max-width: 1399px) {
  .desktop-navigation { display: none; }
  .mobile-nav-toggle { display: inline-flex; flex: none; }
  .app-header { gap: 12px; padding: 8px 12px; min-height: 64px; }
  .account-menu { margin-inline-start: auto; }
}
@media print {
  body:has(.internal-receipt) .app-header,
  body:has(.internal-receipt) .app-footer,
  body:has(.internal-receipt) .breadcrumbs,
  body:has(.internal-receipt) .internal-receipt .toolbar { display: none; }
  body:has(.internal-receipt) .app-shell { display: block; }
  body:has(.internal-receipt) .app-content { width: 100%; padding: 0; }
  body:has(.internal-receipt) .internal-receipt { border: 0; box-shadow: none; }
}
@media screen and (max-width: 600px) {
  .report-document table { min-inline-size: 0; inline-size: 100%; }
  .report-document thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .report-document tbody, .report-document tr { display: block; }
  .report-document tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); margin-block-end: var(--space-4); }
  .report-document td { display: block; min-inline-size: 0; max-inline-size: none; padding: var(--space-3); white-space: normal; }
  .report-document td:nth-child(1), .report-document td:nth-child(3), .report-document td:nth-child(4) { grid-column: 1 / -1; }
  .report-document td[data-label]::before { content: attr(data-label); display: block; font-size: var(--helper-font-size); color: var(--muted); margin-block-end: var(--space-1); }
}

.payment-correction { margin-block: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.payment-correction summary { cursor: pointer; font-weight: 700; }
.payment-correction .form-stack { margin-block-start: 16px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
.account-indent--0 { --depth: 0; }
.account-indent--1 { --depth: 1; }
.account-indent--2 { --depth: 2; }
.account-indent--3 { --depth: 3; }
.account-indent--4 { --depth: 4; }
.account-indent--5 { --depth: 5; }
.section-heading > a, .activity-list a, td > a, .pager a { display: inline-flex; align-items: center; min-height: 44px; }

/* Page compositions reuse the same controls, surfaces and spacing. */
.garment-detail-grid, .garment-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.garment-detail-grid { gap: 16px; align-items: start; }
.garment-detail-grid .summary-list > div { padding-block: 7px; }
.garment-detail-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; margin-block-start: 16px; }
.garment-detail-sections > :is(.panel, details) { min-inline-size: 0; margin-block: 0; }
.garment-detail-sections form.filter-grid { gap: 10px; }
@media (max-width: 767px) { .garment-detail-sections { grid-template-columns: minmax(0, 1fr); } }
.garment-images { gap: var(--space-4); }
.garment-images figure { margin: 0; }
.garment-images img { width: 100%; max-height: 280px; object-fit: contain; background: var(--surface); border-radius: var(--control-radius); }
.garment-images figcaption { padding-block: var(--space-2); }
.measurement-guide > img { background: #f4f4f4; padding: var(--space-3); border-radius: var(--control-radius); }
.garment-detail-grid .summary-list dd { overflow-wrap: anywhere; }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-block: var(--space-4); }
.field input[type='file'] { max-width: 100%; width: 100%; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: var(--control-radius); padding: var(--space-5); }
legend { padding-inline: var(--space-2); }
details:not(.account-menu):not(.nav-group) > summary { cursor: pointer; min-height: var(--control-height); padding-block: var(--space-3); }
.muted { display: block; color: var(--muted); }
@media (max-width: 767px) { .garment-detail-grid, .garment-images { grid-template-columns: minmax(0, 1fr); } }

/* Shared glossary help and brand assets. */
.field-help { display: block; color: var(--muted); font-size: var(--helper-font-size); line-height: 1.6; overflow-wrap: anywhere; }
.brand-name { display: block; color: var(--ink); font-weight: 700; font-size: 20px; line-height: 1.6; overflow-wrap: anywhere; }
.brand-logo { display: block; flex: none; object-fit: contain; width: 112px; height: 112px; }
.brand .brand-logo { width: 92px; height: 92px; }
.sidebar-brand .brand-logo { width: 44px; height: 52px; }
.saved-details { margin: 0; min-width: 0; }
.saved-details dt { font-weight: 500; margin-block-start: var(--space-3); }
.saved-details dd { margin-inline: 0; overflow-wrap: anywhere; }
.saved-details .saved-details { padding-inline-start: var(--space-3); border-inline-start: 1px solid var(--line); }

/* Payroll summary keeps labels and JOD amounts in readable pairs at every width. */
.payroll-summary { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px 16px; margin: 20px 0; }
.payroll-summary dt { color: var(--muted); }
.payroll-summary dd { min-width: 0; margin: 0; text-align: end; overflow-wrap: anywhere; }
@media (max-width: 767px) { .payroll-summary { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
/* Form widths are shared across operational and administrative workflows. */
.app-content .panel--narrow { inline-size: min(100%, var(--form-width)); }
.app-content > .panel:has(> form.form-stack):not(:has(.table-wrap)) { inline-size: min(100%, var(--form-width)); margin-inline: auto; }
.app-content:has(> .panel > form.form-stack):not(:has(> .panel .table-wrap)) > :is(.page-heading, .breadcrumbs) { inline-size: min(100%, var(--form-width)); margin-inline: auto; }
.app-content > .panel + .panel, .app-content > .panel + .report-index { margin-block-start: var(--space-5); }
.app-content .field, .app-content .filter-grid > *, .app-content .form-stack > * { min-inline-size: 0; }
.app-content .filter-grid { align-items: start; }
.app-content .filter-grid > button, .app-content .filter-grid > a.button { align-self: start; margin-block-start: 30px; }
.app-content .filter-more, .app-content .filter-actions { grid-column: 1 / -1; }
.app-content input, .app-content select, .app-content textarea { max-inline-size: 100%; }
.app-content > .panel:is(.transaction-entry, .garment-entry, .panel--form):has(> form.form-stack) { inline-size: min(100%, 1120px); }
.app-content:has(> :is(.transaction-entry, .garment-entry, .panel--form)) > :is(.page-heading, .breadcrumbs) { inline-size: min(100%, 1120px); }
.app-content:has(> :is(.transaction-entry, .garment-entry, .panel--form)) { padding-block-start: 16px; }
.app-content:has(> :is(.transaction-entry, .garment-entry, .panel--form)) > .page-heading h1 { margin-block: 0 6px; }
@media (min-width: 900px) {
  .app-content:has(> :is(.transaction-entry, .garment-entry, .panel--form)) { padding-block-start: 8px; }
  .app-content:has(> :is(.transaction-entry, .garment-entry, .panel--form)) > .page-heading { margin-block-end: 8px; }
  .app-content:has(> :is(.transaction-entry, .garment-entry, .panel--form)) > .page-heading h1 { font-size: 28px; line-height: 1.3; }
}
.transaction-entry fieldset { margin: 0; padding: 14px; }
.transaction-entry fieldset > .field + .field { margin-block-start: 12px; }
.transaction-entry .filter-grid { margin-block: 0; }
.transaction-entry [data-transaction-entry] > :is(.notice, .toolbar) { margin-block: 0; }
.transaction-entry [data-type-announcement]:empty { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
.transaction-entry [data-transaction-line] { padding: 12px; margin-block: 0 12px; box-shadow: none; backdrop-filter: none; }
.transaction-entry [data-transaction-line] > details { margin-block: 0; }
.cash-closing-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-block: 12px; }
.cash-closing-summary strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.cash-closing-steps { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-inline-start: 20px; margin-block: 12px; color: var(--muted); }
@media (min-width: 900px) {
  .transaction-entry [data-transaction-entry] { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 10px; margin-block-start: 0; }
  .transaction-entry [data-transaction-entry] > :is(.filter-grid, .notice, .validation, .toolbar, [data-type-announcement]) { grid-column: 1 / -1; }
  .transaction-entry [data-transaction-entry] > :is(fieldset, .field) { grid-column: span 2; }
  .transaction-entry [data-transaction-line] { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
  .transaction-entry [data-transaction-line] > details { grid-column: 1 / -1; }
  .transaction-entry [data-transaction-line] > .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transaction-entry fieldset[data-kinds='Rental'] > .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .transaction-entry fieldset { padding: 10px; }
  .transaction-entry [data-transaction-entry] > .notice { padding: 12px; }
  .transaction-entry :is(p, small) { line-height: 1.45; }
  .transaction-entry fieldset > p { margin-block: 8px 0; }
  .transaction-entry :is(.field, .filter-grid) { gap: 4px 12px; }
}
.app-content .field:not([hidden]):not([hidden] *):has(> input[required], > select[required], > textarea[required]) > label::after { content: ' *' / ''; color: var(--ink); }
.optional-fields { border: 1px solid var(--line); padding: 16px; border-radius: var(--radius); }
.optional-fields > summary, details.panel > summary { cursor: pointer; font-weight: 700; }
.optional-fields[open] > summary, details.panel[open] > summary { margin-block-end: 16px; }
.optional-fields > .field, .optional-fields > .filter-grid { margin-block-start: 12px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions .button { white-space: normal; text-align: center; }
.action-list, .link-list { list-style: none; padding: 0; margin: 0; }
.action-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; border-block-end: 1px solid var(--line); }
.link-list li, .setup-checklist li { padding-block: 8px; }
.inline-reference-dialog { inline-size: min(560px, calc(100vw - 32px)); max-block-size: calc(100dvh - 32px); overflow-y: auto; padding: 24px; }
.inline-reference-dialog .section-heading { gap: 12px; }
.report-document { min-inline-size: 0; }
.report-document-heading { display: flex; align-items: center; gap: 24px; padding-block: 24px; border-block-end: 1px solid var(--line); margin-block-end: 20px; }
.report-document-heading h2 { margin-block: 4px; }
.report-document-logo { inline-size: 86px; block-size: 86px; object-fit: contain; flex-shrink: 0; background: #fff; padding: 8px; border-radius: var(--control-radius); }
.report-note { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.report-document-footer { border-block-start: 1px solid var(--line); padding-block: 20px; color: var(--muted); font-size: .85rem; }
.report-document td, .report-document th { overflow-wrap: anywhere; max-inline-size: 230px; }
[hidden] { display: none; }
@media(max-width:600px) {
  .report-document-heading { gap: 12px; align-items: flex-start; }
  .report-document-logo { inline-size: 62px; block-size: 62px; }
  .inline-reference-dialog { padding: 16px; }
  .optional-fields { padding: 12px; }
}
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  :root { color-scheme: light; --background: #fff; --panel: #fff; --surface: #f4f4f4; --selected: #efefef; --ink: #111; --muted: #444; --line: #ccc; --control-border: #777; --accent: #111; --success: #245133; --warning: #705011; --danger: #862d2d; --info: #234f69; --success-surface: #f0f5ed; --warning-surface: #faf5e9; --danger-surface: #faf0f0; --info-surface: #edf4f5; }
  body.app-shell { display: block; min-height: 0; padding: 0; background: white; color: black; }
  .app-header, .breadcrumbs, .mobile-nav-toggle, .skip-link, .no-print, .app-footer, .app-content > .page-heading, dialog, #submission-status { display: none !important; }
  .app-body, .app-content, main { margin: 0; padding: 0; max-inline-size: none; inline-size: 100%; }
  .app-body { display: block; min-height: 0; }
  .app-content { flex: none; }
  :is(.report-document, .financial-report-document) .table-wrap { overflow: visible; }
  :is(.report-document, .financial-report-document) table { min-inline-size: 0; inline-size: 100%; font-size: 9pt; table-layout: fixed; }
  :is(.report-document, .financial-report-document) :is(td, th) { padding: 5pt; white-space: normal; max-inline-size: none; }
  :is(.report-document, .financial-report-document) thead { display: table-header-group; }
  :is(.report-document, .financial-report-document) tr, .report-metrics > div, .report-document-heading { break-inside: avoid; }
  .financial-report-document tfoot { display: table-row-group; break-inside: avoid; }
  .financial-report-document :is(td, th) { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; }
  .financial-report-document td small { display: block; }
  .financial-report-document.panel { border: 0; padding: 0; }
  .report-document .panel { box-shadow: none; border: 0; padding: 0; }
  .report-document a { color: black; text-decoration: none; }
  .report-document .report-metrics { grid-template-columns: repeat(3, 1fr); }
  .report-document-footer { font-size: 8pt; }
  .report-document-logo { padding: 0; border-radius: 0; }
  .icon, .nav-arrow, .empty-icon { filter: none; }
}

.owner-mfa-qr { width: min(100%, 18rem); margin-inline: auto; padding: 16px; background: #fff; border-radius: var(--control-radius); }
.owner-mfa-qr svg { display: block; width: 100%; height: auto; }

/* One full-viewport photographic environment, with no separate in-flow image field. */
.app-shell:has(.dashboard-hero) { padding: 0; }
.app-body:has(.dashboard-hero) { width: 100%; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.app-body:has(.dashboard-hero) > .app-header { grid-area: 1 / 1; align-self: start; width: min(calc(100% - 2 * var(--stage-gutter)), var(--stage-width)); margin-block: 18px 0; }
.app-content:has(> .dashboard-hero) { grid-area: 1 / 1; max-inline-size: none; padding: 0; }
.app-body:has(.dashboard-hero) > .app-footer { grid-area: 2 / 1; position: relative; background: var(--background); }
.dashboard-followup { position: relative; isolation: isolate; background: var(--background); padding-block: 28px; }
.dashboard-followup > :is(.owner-dashboard, .staff-workspace, .workspace-quick-actions) { width: min(calc(100% - 2 * var(--stage-gutter)), var(--reading-width)); margin-inline: auto; }
.dashboard-hero { direction: ltr; position: relative; isolation: isolate; display: grid; grid-template-rows: auto 1fr auto; gap: clamp(16px, 2.5svh, 28px); min-height: 100svh; padding: 104px max(var(--stage-gutter), calc((100% - var(--stage-width)) / 2)) 24px; background: #686256; }
.dashboard-hero > :is(.scene-filters, .dashboard-kpis, .workspace-launchers) { direction: rtl; }
html[dir='ltr'] .dashboard-hero > :is(.scene-filters, .dashboard-kpis, .workspace-launchers) { direction: ltr; }
.dashboard-hero--staff { grid-template-rows: 1fr auto; }
.dashboard-backdrop { position: absolute; z-index: -2; inset: 0; overflow: hidden; }
.dashboard-backdrop > picture, .auth-background > picture { display: contents; }
.scene-atmosphere, .auth-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(12px); }
.dashboard-photo, .auth-photo { position: absolute; top: 0; left: 55%; transform: translateX(-50%); width: auto; max-width: none; height: 100%; aspect-ratio: 3 / 4; object-fit: contain; mask-image: linear-gradient(90deg, transparent, #000 24%, #000 76%, transparent); }
.dashboard-hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgb(24 24 21 / 45%), transparent 22%), linear-gradient(90deg, rgb(27 25 21 / 50%), transparent 34%, transparent 62%, rgb(29 26 22 / 25%)); }
/* Paint behind the cards; the matching followup surface also covers fixed tablet imagery. */
.dashboard-hero::after { content: ''; position: absolute; z-index: -1; inset-inline: 0; bottom: 0; height: min(42%, clamp(144px, 24svh, 300px)); background: linear-gradient(180deg, transparent, var(--background)); pointer-events: none; }
@supports (color: color-mix(in srgb, white, transparent)) {
  .dashboard-hero::after { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--background) 16%, transparent) 30%, color-mix(in srgb, var(--background) 62%, transparent) 68%, var(--background)); }
}
.dashboard-stage { direction: ltr; display: grid; grid-template-columns: minmax(320px, 38%) minmax(0, 1fr); grid-template-areas: 'analysis welcome'; align-items: center; gap: clamp(24px, 4vw, 72px); padding-inline-start: 60px; }
.dashboard-stage > * { direction: rtl; min-width: 0; }
html[dir='ltr'] .dashboard-stage > * { direction: ltr; }
.dashboard-welcome { grid-area: welcome; max-inline-size: 330px; justify-self: end; align-self: start; text-align: right; color: #fffdf6; --muted: #eeece4; padding: 8px 0; }
html[dir='ltr'] .dashboard-welcome { text-align: left; }
.dashboard-insight { grid-area: analysis; width: 100%; max-width: 560px; }
.dashboard-welcome h1 { font-weight: 700; font-size: clamp(30px, 3vw, 44px); line-height: 1.25; margin-bottom: 12px; }
.dashboard-greeting { font-size: 15px; line-height: 1.6; font-weight: 500; margin: 0 0 12px; max-width: 28ch; overflow-wrap: anywhere; }
.dashboard-welcome:has([data-local-greeting]) .eyebrow { display: none; }
.dashboard-welcome .eyebrow { font-size: 13px; margin-block-end: 12px; }
.dashboard-welcome .page-description { max-width: 30ch; font-size: 14px; line-height: 1.8; text-wrap: pretty; }
.dashboard-welcome .page-heading { margin-bottom: 20px; }
.dashboard-insight { border: 1px solid rgb(255 255 255 / 60%); border-radius: 24px; background: #eee8da; color: #29291f; padding: 20px 24px; box-shadow: 0 18px 48px rgb(23 22 16 / 14%), inset 0 1px 0 rgb(255 255 255 / 50%); --muted: #55574c; --line: rgb(65 61 46 / 17%); --panel: #f6f2e7; }
.dashboard-hero--staff .dashboard-insight { display: flex; flex-direction: column; }
.dashboard-hero--staff .dashboard-insight > .insight-link { align-self: start; margin-top: auto; }
.dashboard-hero--staff .insight-empty { padding-block: 16px; }
.dashboard-hero--staff .insight-empty h3 { font-size: 18px; }
.dashboard-hero--staff .activity-list { max-block-size: 230px; overflow-y: auto; }
.dashboard-insight .section-heading { margin-bottom: 8px; }
.dashboard-insight .section-heading > h2 { font-size: 20px; font-weight: 400; }
.dashboard-insight > .subtle { font-size: 11px; margin-bottom: 8px; }
.dashboard-insight .icon-button { border-radius: 50%; width: 38px; height: 38px; padding: 9px; min-height: 38px; background: rgb(255 255 255 / 30%); }
.dashboard-insight .trend-chart h3 { font-size: 12px; }
.dashboard-insight .trend-chart { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.dashboard-insight .trend-chart > :is(.section-heading, .trend-visual) { grid-column: 1 / -1; }
.dashboard-insight .trend-chart figcaption { grid-column: 1; }
.dashboard-insight .chart-data { grid-column: 2; }
.dashboard-insight .chart-data[open] { grid-column: 1 / -1; }
.dashboard-insight .trend-chart .section-heading { margin-bottom: 2px; }
.dashboard-insight .trend-chart .section-heading > .subtle { font-size: 10px; }
.dashboard-insight .trend-visual { grid-template-columns: 38px minmax(0, 1fr); margin-block: 8px 6px; gap: 8px; }
.dashboard-insight .trend-axis-y, .dashboard-insight .trend-plot svg { height: 96px; }
.dashboard-insight .trend-chart figcaption > .subtle { font-size: 10px; margin: 0; }
.dashboard-insight .chart-legend { font-size: 11px; margin: 4px 0 0; }
.dashboard-insight .chart-data > summary { min-height: 32px; padding-block: 4px; }
.insight-values { display: flex; flex-wrap: wrap; gap: 28px; margin: 8px 0; }
.insight-values dt { font-size: 12px; color: var(--muted); }
.insight-values dd { margin: 4px 0 0; font-size: 25px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.scene-utilities { position: absolute; left: max(var(--stage-gutter), calc((100% - var(--stage-width)) / 2)); top: 46%; display: grid; gap: 8px; }
.scene-utilities a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fffdf6; background: rgb(40 39 34 / 72%); border: 1px solid rgb(255 255 255 / 24%); text-decoration: none; transition: background var(--motion), transform var(--motion); }
.scene-utilities a:hover { background: #665b43; transform: translateY(-1px); }
.scene-utilities .icon { width: 18px; height: 18px; filter: invert(1); }
.scene-filters { display: flex; flex-wrap: wrap; justify-content: start; justify-self: end; gap: 8px; }
.scene-filters a { min-height: 36px; display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 24px; border: 1px solid rgb(255 255 255 / 24%); background: rgb(40 39 34 / 72%); color: #fffdf6; font-size: 12px; text-decoration: none; }
.scene-filters a[aria-current='page'] { background: #fbf8ee; color: #292a24; }
.insight-link { display: inline-flex; align-items: center; min-height: 32px; font-size: 13px; font-weight: 500; gap: 8px; }
.insight-link::after { content: '←' / ''; }
:dir(ltr) .insight-link::after { content: '→' / ''; }
.insight-empty { padding: 26px 0 20px; }
.insight-empty h3 { margin-top: 12px; }
.insight-empty p { font-size: 14px; color: var(--muted); }
.dashboard-insight .insight-empty { padding-block: 12px 8px; }
.dashboard-insight .insight-empty .empty-icon { width: 28px; height: 28px; }
.dashboard-insight .insight-empty h3 { font-size: 17px; margin-top: 8px; }
.pulse-list { list-style: none; margin: 8px 0 14px; padding: 0; }
.pulse-list li { margin-bottom: 8px; }
.pulse-list a { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; min-height: 28px; align-items: center; }
.pulse-list strong { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pulse-track { display: block; height: 3px; background: rgb(75 66 41 / 9%); border-radius: 2px; margin-top: 5px; }
.pulse-track > span { display: block; height: 100%; border-radius: inherit; background: var(--brand-deep); }
.insight-note { font-size: 12px; color: var(--muted); margin-bottom: 0; }
.dashboard-kpis { position: relative; margin-block-end: 0; }
.app-shell:has(.dashboard-hero) .app-header { background: none; border-color: transparent; box-shadow: none; padding-inline: 0; color: #f8f5eb; --muted: #eeece4; --ink: #faf7ee; --surface: #48483e; --selected: #fffdf6; }
.app-shell:has(.dashboard-hero) .app-header :is(.dock-brand, summary) { color: #f8f5eb; }
.app-shell:has(.dashboard-hero) .app-header .app-nav .nav-group > a, .app-shell:has(.dashboard-hero) .app-header .nav-heading { color: #f8f5eb; background: rgb(40 39 34 / 66%); }
.app-shell:has(.dashboard-hero) .app-header .app-nav .nav-group > a[aria-current='page'], .app-shell:has(.dashboard-hero) .app-header .nav-group[data-active='true'] > .nav-heading { background: #fbf8ee; color: #292a24; }
.app-shell:has(.dashboard-hero) .app-header .icon { filter: invert(1); }
.app-shell:has(.dashboard-hero) .app-header .account-menu summary .icon { background: #fbf8ee; border-color: rgb(255 255 255 / 50%); filter: none; }
.app-shell:has(.dashboard-hero) .mobile-nav-toggle { background: rgb(40 39 34 / 66%); border-color: rgb(255 255 255 / 30%); }
.app-shell:has(.dashboard-hero) .app-header :is([aria-current='page'], [data-active='true']) > .icon, .app-shell:has(.dashboard-hero) .app-header .nav-group[data-active='true'] > summary > .icon { filter: none; }
.app-shell:has(.dashboard-hero) .app-header :is(.nav-children, .account-menu__content) { --ink: #272824; --muted: #686a62; --surface: #f1efe8; --selected: #f2eddf; --panel: #fbfaf6; }
.app-shell:has(.dashboard-hero) .app-header :is(.nav-children, .account-menu__content) .icon { filter: none; }
.account-menu summary > span { max-inline-size: 160px; }
.account-menu summary strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu__identity { padding: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow-wrap: anywhere; }
.account-menu__identity strong { font-weight: 500; }
html:has(.authentication-shell) { background: #686256; }
.authentication-shell { position: relative; isolation: isolate; display: grid; grid-template: 1fr / minmax(0, 1fr); width: 100%; margin: 0; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); min-height: 100dvh; background: #686256; }
.auth-background { position: fixed; z-index: -2; inset: 0; overflow: hidden; }
.auth-photo { left: 38%; }
.auth-background::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(29 26 20 / 8%), transparent 46%, rgb(29 26 20 / 35%)); }
.authentication-shell > :is(.site-header, .public-content, .site-footer) { grid-area: 1 / 1; }
.authentication-shell .site-header { z-index: 1; align-self: start; width: min(100%, var(--stage-width)); min-height: 56px; border: 0; }
.authentication-shell .brand-name { color: #fffdf6; font-size: 16px; }
.authentication-shell .brand .brand-logo { background: var(--panel); border-radius: 50%; padding: 5px; width: 48px; height: 48px; }
.authentication-shell .public-content { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); place-content: center; justify-items: center; min-height: 0; margin: 0; padding-block: 72px; gap: 16px; }
.authentication-shell .public-content > .alert { grid-column: 1 / -1; }
.authentication-shell .panel--narrow { direction: rtl; width: min(100%, 410px); margin: 0; border-color: var(--glass-edge); border-radius: 26px; background: var(--panel); padding: 24px; box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / 65%); }
html[dir='ltr'] .authentication-shell .panel--narrow { direction: ltr; }
.authentication-shell h1 { font-weight: 500; font-size: 28px; }
.authentication-shell .eyebrow { margin-bottom: 4px; }
.authentication-shell .form-stack { margin-top: 20px; gap: 16px; }
.authentication-shell .form-stack > .button { width: 100%; }
.authentication-shell .site-footer { z-index: 1; align-self: end; width: min(100%, var(--stage-width)); padding-block: 8px; border: 0; color: #f8f6ed; font-size: 11px; }
@supports (backdrop-filter: blur(1px)) {
  .panel, .kpi-card { background: var(--glass-panel); backdrop-filter: blur(8px); }
  .app-header { background: var(--glass-overlay); backdrop-filter: blur(var(--glass-blur)); }
  .app-shell:has(.dashboard-hero) .app-header { background: none; backdrop-filter: none; }
  .scene-utilities a, .scene-filters a, .app-shell:has(.dashboard-hero) .app-header .nav-heading, .app-shell:has(.dashboard-hero) .app-header .app-nav .nav-group > a { backdrop-filter: blur(10px); }
  .dashboard-insight { background: rgb(255 250 233 / 68%); backdrop-filter: blur(22px) saturate(1.12); }
  .account-menu__content, .desktop-navigation .nav-children { background: var(--glass-menu); backdrop-filter: blur(24px) saturate(1.1); border-color: var(--glass-edge); box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / 75%); }
  dialog, .reference-popup { background: var(--glass-overlay); backdrop-filter: blur(var(--glass-blur)); }
  .nav-drawer { background: linear-gradient(140deg, rgb(255 255 255 / 12%), transparent 45%), var(--nav-glass); backdrop-filter: blur(26px) saturate(1.1); border-color: var(--glass-edge); }
  .authentication-shell .panel--narrow { background: rgb(255 252 241 / 74%); backdrop-filter: blur(24px) saturate(1.1); }
}
@media (max-width: 899px) {
  .dashboard-hero, .dashboard-hero--staff { gap: 16px; padding-top: 96px; align-content: start; }
  .dashboard-hero { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto; grid-template-areas: 'tools filters' 'stage stage' 'kpis kpis'; column-gap: 12px; }
  .dashboard-hero--staff { grid-template-areas: 'tools tools' 'stage stage' 'kpis kpis'; }
  .dashboard-stage { grid-area: stage; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'welcome' 'analysis'; gap: 18px; padding: 0; }
  .dashboard-kpis, .dashboard-hero > .workspace-launchers { grid-area: kpis; }
  .dashboard-welcome { max-width: 330px; width: 100%; padding: 0; }
  .dashboard-insight { width: 100%; max-width: none; padding: 16px; backdrop-filter: blur(12px); }
  .dashboard-insight .insight-empty { padding-block: 12px; }
  .dashboard-insight .insight-empty h3 { margin-top: 8px; }
  .scene-utilities { position: static; grid-area: tools; align-self: start; justify-self: start; display: flex; gap: 6px; }
  .scene-filters { grid-area: filters; align-self: start; }
  .dashboard-hero::before { background: linear-gradient(180deg, rgb(24 25 20 / 65%), rgb(28 27 22 / 15%) 600px, rgb(28 27 22 / 30%)); }
  .dashboard-photo, .auth-photo { left: 0; transform: none; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: 39% center; mask-image: none; }
  .scene-atmosphere, .auth-backdrop { display: none; }
}
@media (max-width: 640px) {
  .app-shell { padding: 12px; --scene-gutter: 14px; }
  .dashboard-hero::after { height: min(36%, clamp(96px, 18svh, 168px)); }
  .app-header { width: 100%; margin-top: 0; }
  .dashboard-welcome { max-width: calc(100% - 52px); }
  .dashboard-welcome h1 { font-size: 30px; margin-bottom: 8px; }
  .dashboard-welcome .page-description { max-width: 29ch; }
  .dashboard-insight .section-heading > h2 { font-size: 19px; }
  .dashboard-insight .trend-plot svg, .dashboard-insight .trend-axis-y { height: 128px; }
  .scene-utilities { gap: 6px; }
  .scene-utilities a { width: 40px; height: 40px; }
  .scene-utilities .icon { width: 18px; height: 18px; }
  .scene-filters a { font-size: 12px; min-height: 36px; padding: 6px 12px; }
  .pulse-list strong { font-size: 18px; }
  .authentication-shell .panel--narrow { padding: 22px 20px; }
  .authentication-shell .brand-name { font-size: 14px; }
  .authentication-shell h1 { font-size: 26px; }
  .kpi-card { backdrop-filter: none; background: var(--glass-card); }
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .app-header, .panel, .kpi-card, .dashboard-insight, .authentication-shell .panel--narrow, .account-menu__content, .nav-drawer, .reference-popup, .desktop-navigation .nav-children, dialog { backdrop-filter: none; background: var(--panel); }
  .dashboard-insight { background: #f3eee1; }
  .nav-drawer::backdrop { backdrop-filter: none; }
}
@media (forced-colors: active) {
  .dashboard-welcome { max-inline-size: 330px; justify-self: start; color: CanvasText; background: Canvas; }
  .dashboard-insight { color: CanvasText; background: Canvas; }
  .dashboard-photo, .dashboard-backdrop, .auth-background { display: none; }
  .dashboard-hero::after { display: none; }
}
@media print {
  .dashboard-photo, .dashboard-backdrop, .dashboard-hero::before, .dashboard-hero::after, .scene-utilities, .scene-filters { display: none; }
  .dashboard-followup { padding: 0; background: white; }
  .dashboard-hero { display: block; min-height: 0; margin: 0; padding: 0; background: white; }
  .dashboard-stage { display: block; min-height: 0; }
  .dashboard-welcome { max-inline-size: 330px; justify-self: start; color: black; --muted: #444; }
  .dashboard-insight, .panel, .kpi-card { backdrop-filter: none; background: white; box-shadow: none; }
}
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.kpi-card { display: flex; flex-direction: column; min-inline-size: 0; gap: 10px; padding: 18px; border: 1px solid var(--glass-edge); border-radius: var(--radius); background: var(--glass-card); box-shadow: var(--card-shadow); color: var(--ink); text-decoration: none; transition: border-color var(--motion), box-shadow var(--motion), transform var(--motion); }
.kpi-card :is(dt, .kpi-label) { display: flex; justify-content: space-between; align-items: start; gap: 8px; font-size: 13px; font-weight: 400; color: var(--muted); }
.kpi-card dt a { text-decoration: none; }
.kpi-card .icon { inline-size: 18px; block-size: 18px; opacity: .65; }
.kpi-card :is(dd, .kpi-value) { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: clamp(22px, 1.8vw, 28px); font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-card dd small { font-size: 12px; color: var(--muted); font-weight: 400; }
.kpi-card .metric-unavailable { font-size: 16px; }
.kpi-card p { margin: auto 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.kpi-card .kpi-value::after, .kpi-card dd::after { content: ''; inline-size: 16px; block-size: 2px; margin-inline-start: auto; background: var(--brand); align-self: center; }
.kpi-card:hover { border-color: var(--control-border); box-shadow: 0 4px 14px rgb(39 40 36 / 5%); }
.owner-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.owner-action { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-content: center; align-items: center; column-gap: 8px; row-gap: 2px; min-height: 60px; padding: 10px 12px; min-width: 0; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--panel); color: var(--ink); text-decoration: none; overflow-wrap: break-word; transition: border-color var(--motion), background var(--motion); }
.owner-action:hover { border-color: var(--control-border); background: var(--surface); }
.owner-action .icon { grid-row: span 2; width: 20px; height: 20px; }
.owner-action strong { font-size: 15px; font-weight: 500; }
.owner-action[data-owner-action='new'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.owner-action[data-owner-action='new']:hover { background: var(--accent-hover); }
.owner-action[data-owner-action='new'] .icon { filter: none; }
.owner-action span { grid-column: 2; font-size: 12px; color: var(--muted); line-height: 1.5; }
.owner-action[data-owner-action='new'] span { color: #4f4123; }
.owner-dashboard { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--section-gap); align-items: start; }
.owner-summary, .owner-tools { grid-column: 1 / -1; }
.owner-search { border-block-start: 1px solid var(--line); margin-block-start: 16px; padding-block-start: 16px; }
.owner-search .filter-grid { grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; margin-block: 0; }
.owner-search .filter-grid > :is(button, a.button) { margin-block-start: 30px; }
.owner-search .filter-grid > a:not(.button) { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; margin-block-start: 30px; font-size: 13px; }
.owner-attention .empty-state { margin: 0; padding: 20px 12px; }
.owner-attention .action-list:empty { display: none; }
.schedule-list { margin: 0; padding: 0; list-style: none; }
.schedule-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.schedule-list li:last-child { border-bottom: 0; padding-block-end: 0; }
.schedule-list a { display: inline-flex; align-items: center; min-block-size: 32px; font-size: 14px; text-decoration: none; }
.schedule-list a:hover { color: var(--brand-deep); background: var(--selected); border-radius: 8px; }
.schedule-list small { display: block; color: var(--muted); font-size: 12px; }
.schedule-list .count { flex: none; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.dashboard-activity { margin-block-start: 16px; border-top: 1px solid var(--line); padding-block-start: 8px; }
.dashboard-activity time { color: var(--muted); font-size: 12px; }
.staff-workspace { margin-block-start: 0; align-items: start; grid-template-columns: minmax(0, 1fr); }
.staff-workspace .empty-state { padding: 20px 16px; }
.workspace-launchers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.workspace-launcher { display: flex; flex-direction: column; align-items: start; gap: 10px; min-width: 0; padding: 18px; border-radius: var(--radius); background: var(--glass-card); box-shadow: var(--card-shadow); color: var(--ink); text-decoration: none; }
.workspace-launcher .icon { width: 20px; height: 20px; opacity: .7; }
.workspace-launcher strong { font-size: 17px; font-weight: 500; }
.workspace-launcher span { font-size: 12px; color: var(--muted); }
.workspace-launcher:hover { background: var(--panel); }
.workspace-quick-actions { margin-block-start: var(--section-gap); }
.workspace-quick-actions > p { margin: 12px 0 0; }

@media (max-width: 1023px) { .kpi-grid, .workspace-launchers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1199px) { .report-charts { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1024px) and (max-width: 1199px), (max-width: 767px) { .owner-dashboard { grid-template-columns: minmax(0, 1fr); } }
@media (pointer: coarse) { .app-nav { --nav-row-height: 44px; } .app-nav .nav-children a { min-height: 44px; } }

/* Tablet content flows independently of the desktop's vertically staged scene. */
@media screen and (min-width: 641px) and (max-width: 1399px) {
  :root { --control-height: 48px; --control-padding-block: 11px; --stage-gutter: max(clamp(24px, 3vw, 40px), env(safe-area-inset-left), env(safe-area-inset-right)); }
  .app-header { min-height: 72px; gap: 16px; margin-block-start: 8px; }
  .dock-brand { gap: 10px; }
  .dock-brand .brand-logo { width: 48px; height: 48px; }
  .dock-brand > span { font-size: 15px; }
  .dock-brand small { font-size: 11px; }
  .dock-page { display: block; min-width: 0; max-width: 26ch; padding: 6px 14px; border: 1px solid var(--glass-edge); border-radius: 24px; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .app-header .account-menu > summary { min-height: 48px; padding: 2px; }
  .app-header .account-menu summary .icon { width: 44px; height: 44px; padding: 10px; }
  .nav-drawer { --nav-inset: 24px; --nav-panel-width: 400px; padding: 14px; }
  .dashboard-hero, .dashboard-hero--staff { min-height: 0; align-content: start; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto; grid-template-areas: 'tools filters' 'stage stage' 'kpis kpis'; gap: 24px; padding-block: 112px 28px; background: transparent; }
  .dashboard-hero--staff { grid-template-areas: 'tools tools' 'stage stage' 'kpis kpis'; }
  .dashboard-backdrop, .dashboard-hero::before { position: fixed; }
  .scene-atmosphere, .auth-backdrop { display: block; }
  .dashboard-photo, .auth-photo { left: 50%; transform: translateX(-50%); width: auto; height: 100%; aspect-ratio: 3 / 4; object-fit: contain; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
  .dashboard-hero::before { background: linear-gradient(180deg, rgb(24 24 21 / 56%), rgb(24 24 21 / 12%) 55%, rgb(24 24 21 / 32%)), linear-gradient(90deg, rgb(27 25 21 / 28%), transparent 50%, rgb(29 26 22 / 26%)); }
  .dashboard-stage { grid-area: stage; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: 'analysis welcome'; gap: 32px; padding: 0; align-items: start; }
  .dashboard-welcome { width: 100%; max-inline-size: 360px; padding: 8px 0 0; }
  .dashboard-greeting { font-size: 19px; margin-bottom: 10px; }
  .dashboard-welcome h1 { font-size: clamp(32px, 3.5vw, 40px); margin-bottom: 12px; }
  .dashboard-welcome .page-description { font-size: 16px; line-height: 1.8; }
  .dashboard-welcome .page-heading { margin-bottom: 0; }
  .dashboard-insight { max-width: none; padding: 24px; }
  .dashboard-insight .section-heading > h2 { font-size: 22px; font-weight: 500; }
  .dashboard-insight > .subtle { font-size: 14px; }
  .dashboard-insight .icon-button { width: 44px; height: 44px; min-height: 44px; padding: 11px; }
  .dashboard-insight .insight-empty h3 { font-size: 19px; }
  .dashboard-insight .insight-empty p { font-size: 15px; }
  .dashboard-insight .trend-chart h3, .dashboard-insight .trend-chart .section-heading > .subtle, .dashboard-insight .trend-chart figcaption > .subtle { font-size: 12px; }
  .dashboard-insight .chart-data > summary, .insight-link { min-height: 44px; }
  .insight-link, .pulse-list a { font-size: 15px; }
  .pulse-list a { min-height: 44px; }
  .scene-utilities { position: static; grid-area: tools; display: flex; align-self: start; justify-self: start; gap: 8px; }
  .scene-utilities a { width: 48px; height: 48px; }
  .scene-utilities .icon { width: 20px; height: 20px; }
  .scene-filters { grid-area: filters; align-self: start; align-items: center; }
  .scene-filters a { min-height: 48px; padding: 10px 18px; font-size: 14px; }
  .dashboard-kpis, .dashboard-hero > .workspace-launchers { grid-area: kpis; }
  .kpi-grid, .workspace-launchers { gap: 16px; }
  .kpi-card, .workspace-launcher { padding: 20px; }
  .kpi-card :is(dt, .kpi-label), .kpi-card p, .workspace-launcher span { font-size: 14px; }
  .kpi-card :is(dd, .kpi-value) { font-size: 28px; }
  .workspace-launcher strong { font-size: 18px; }
  .workspace-launcher { border: 1px solid var(--glass-edge); }
  .owner-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-list a { min-height: 44px; }
  .app-content:not(:has(> .dashboard-hero)) { padding-block-start: 24px; }
  .table-wrap { overscroll-behavior-inline: contain; }
  .authentication-shell { padding-inline: var(--stage-gutter); }
  .authentication-shell .site-header { min-height: 64px; }
  .authentication-shell .brand-name { font-size: 18px; }
  .authentication-shell .panel--narrow { width: min(100%, 440px); padding: 28px; }
  .authentication-shell .public-content { padding-block: 88px; }
}
@media screen and (min-width: 641px) and (max-width: 1399px) and (orientation: portrait) {
  .dashboard-stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'welcome' 'analysis'; gap: 28px; }
  .dashboard-welcome { max-inline-size: 38ch; padding: 0; }
  .dashboard-insight { width: min(100%, 680px); justify-self: end; }
  .kpi-grid, .workspace-launchers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-dashboard, .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-photo, .auth-photo { left: 0; transform: none; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: 48% center; mask-image: none; }
  .app-content .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-content .filter-grid > :is(button, a.button) { margin-block-start: 0; align-self: end; }
  .owner-search .filter-grid > :first-child { grid-column: 1 / -1; }
  .owner-search .filter-grid > a:not(.button) { margin-block-start: 0; align-self: end; }
}
@media screen and (min-width: 641px) and (max-width: 1399px) and (orientation: landscape) {
  .kpi-grid, .workspace-launchers { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  :root { --label-font-size: 13px; --helper-font-size: 13px; --table-cell-padding-block: 10px; --panel-padding: 16px; --section-gap: 16px; }
  h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
  .app-header { min-height: 60px; padding: 8px 10px; gap: 10px; }
  .account-menu { margin-inline-start: auto; } .account-menu strong { font-size: 14px; }
  .account-menu summary { gap: 8px; } .account-menu summary .icon { width: 40px; height: 40px; padding: 9px; }
  .account-menu > summary > span { display: none; } .dock-brand > span { font-size: 13px; } .dock-brand .brand-logo { width: 38px; height: 38px; }
  .app-content { padding: 20px var(--scene-gutter) 28px; }
  .app-content .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-content .filter-grid > :not(button):not(a.button) { grid-column: 1 / -1; }
  .app-content .filter-grid > button, .app-content .filter-grid > a.button { margin-block-start: 0; width: 100%; }
  .page-heading { flex-direction: column; gap: 12px; margin-block-end: 16px; }
  .breadcrumbs { margin-bottom: 8px; }
  .workspace-grid, .permission-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-list { grid-template-columns: minmax(0, 1fr); gap: 6px; } .detail-list dd { margin-bottom: 12px; }
  .summary-list > div { flex-wrap: wrap; } .summary-list dd a { margin-inline-start: 8px; }
  .app-footer { flex-direction: column; gap: 4px; padding-inline: 16px; }
  .activity-list li { align-items: start; flex-wrap: wrap; }
  .site-header, .site-footer { width: calc(100% - 32px); gap: 16px; }
  .public-content { width: calc(100% - 32px); }
  .public-content .panel--narrow { padding: 24px 20px; }
  .site-footer { flex-direction: column; align-items: start; gap: 4px; }
  .brand .brand-logo { width: 64px; height: 64px; } .brand .brand-name { font-size: 18px; }
  .code-list { grid-template-columns: minmax(0, 1fr); }
  .owner-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .owner-action { grid-template-columns: 20px minmax(0, 1fr); min-height: 60px; padding: 10px; column-gap: 6px; }
  .owner-action .icon { grid-row: 1; width: 20px; height: 20px; padding: 0; border-radius: 0; background: transparent; }
  .owner-action strong { font-size: 14px; font-weight: 500; }
  .owner-action span { grid-column: 1 / -1; font-size: 12px; }
  .kpi-grid { gap: 10px; }
  .workspace-launchers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .workspace-launcher { padding: 14px; gap: 8px; }
  .kpi-card { padding: 14px; gap: 8px; }
  .kpi-card :is(dt, .kpi-label) { font-size: 12px; }
  .kpi-card :is(dd, .kpi-value) { font-size: 25px; }
  .kpi-card p { font-size: 12px; }
  .report-charts > section { padding: 12px; }
  .income-composition { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .income-donut { width: 174px; justify-self: center; }
  .owner-search .filter-grid { grid-template-columns: minmax(0, 1fr); }
  .owner-search .filter-grid > :is(button, a.button) { margin-block-start: 0; }
  .owner-search .filter-grid > a:not(.button) { margin-block-start: 0; }
  .schedule-list a { min-block-size: 44px; }
  .public-content { margin-block: 24px; }
}

/* Arrival only: native requests and form submission are never intercepted. */
@keyframes ui-arrive { from { opacity: .82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ui-card-arrive { from { opacity: .78; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes ui-bar-arrive { from { transform: scaleX(.2); opacity: .6; } to { transform: scaleX(1); opacity: 1; } }
@keyframes ui-chart-reveal { from { clip-path: inset(0 100% 0 0); opacity: .65; } to { clip-path: inset(0); opacity: 1; } }
@keyframes ui-donut-reveal { from { stroke-dasharray: 0 100; opacity: .65; } to { opacity: 1; } }
@keyframes ui-image-reveal { from { opacity: .82; } to { opacity: 1; } }
@keyframes ui-menu-arrive { from { opacity: 0; transform: translate(var(--menu-enter-x, 0px), 6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .app-header { view-transition-name: workspace-navigation; }
  ::view-transition-old(root) { animation: ui-image-reveal 180ms ease reverse; }
  ::view-transition-new(root) { animation: ui-image-reveal 320ms ease; }
  ::view-transition-group(workspace-navigation) { animation-duration: 320ms; animation-timing-function: var(--entry-easing); }
  .app-content:not(:has(> .dashboard-hero)), .public-content { animation: ui-arrive var(--entry-duration) var(--entry-easing); }
  .kpi-card { animation: ui-card-arrive var(--entry-duration) var(--entry-easing) backwards; }
  .kpi-card:nth-child(2) { animation-delay: 40ms; } .kpi-card:nth-child(3) { animation-delay: 80ms; } .kpi-card:nth-child(4) { animation-delay: 120ms; }
  .distribution-bar { animation: ui-bar-arrive 400ms var(--entry-easing); }
  .trend-plot svg { animation: ui-chart-reveal 400ms var(--entry-easing); }
  .workspace-launcher, .dashboard-greeting, .dashboard-insight { animation: ui-card-arrive var(--entry-duration) var(--entry-easing) backwards; }
  .donut-segment { animation: ui-donut-reveal 650ms var(--entry-easing) backwards; }
  .donut-center, .income-share-legend > div { animation: ui-card-arrive var(--motion-slow) var(--entry-easing) backwards; }
  .income-share-legend > div:nth-child(2) { animation-delay: 60ms; }
  .income-share-legend > div:nth-child(3) { animation-delay: 100ms; }
  .report-link { transition: background var(--motion), border-color var(--motion); }
  .reference-popup { animation: ui-arrive var(--motion-fast) var(--entry-easing); }
  .authentication-shell :is(.brand, .panel--narrow, .form-stack > .field) { animation: ui-arrive var(--entry-duration) var(--entry-easing) backwards; }
  .authentication-shell .panel--narrow > h1 { animation: ui-card-arrive var(--motion-slow) var(--entry-easing); }
  .nav-drawer[open] .nav-group { animation: ui-card-arrive 300ms var(--entry-easing) backwards; }
  .nav-drawer[open] .nav-group:nth-child(2) { animation-delay: 20ms; }
  .nav-drawer[open] .nav-group:nth-child(3) { animation-delay: 40ms; }
  .nav-drawer[open] .nav-group:nth-child(n+4) { animation-delay: 60ms; }
  .nav-drawer .nav-children { opacity: 1; transform: none; transition: opacity 200ms ease, transform 240ms var(--entry-easing); }
  .nav-drawer .nav-group[data-expanded='false'] > .nav-children { opacity: 0; transform: translateY(-4px); }
  @starting-style { .nav-drawer .nav-group[open] > .nav-children { opacity: 0; transform: translateY(-4px); } }
  .authentication-shell .form-stack > .field:nth-child(2) { animation-delay: 40ms; }
  .validation:not(:empty), .field-validation-error { animation: ui-card-arrive var(--motion-fast) ease; }
  @supports selector(details::details-content) {
    :is(.desktop-navigation .nav-group, .account-menu)::details-content { opacity: 0; transition: opacity 260ms ease, content-visibility 260ms allow-discrete; }
    :is(.desktop-navigation .nav-group, .account-menu)[open]::details-content { opacity: 1; }
    .desktop-navigation .nav-children, .account-menu__content { opacity: 0; transform: translateY(-6px); transition: opacity 260ms ease, transform 260ms var(--entry-easing); }
    .desktop-navigation .nav-group[open] > .nav-children, .account-menu[open] > .account-menu__content { opacity: 1; transform: none; }
    @starting-style {
      .desktop-navigation .nav-group[open] > .nav-children, .account-menu[open] > .account-menu__content { opacity: 0; transform: translateY(-6px); }
    }
  }
  @supports not selector(details::details-content) {
    .desktop-navigation .nav-group[open] > .nav-children, .account-menu[open] > .account-menu__content { animation: ui-arrive var(--motion-fast) var(--entry-easing); }
  }
  dialog[open] { animation: ui-menu-arrive 220ms var(--entry-easing); }
  .nav-drawer[open] { animation-duration: 300ms; }
  @supports (transition-behavior: allow-discrete) {
    dialog { opacity: 0; transform: translate(var(--menu-enter-x, 0px), 6px); transition: opacity 220ms ease, transform 220ms var(--entry-easing), display 220ms allow-discrete, overlay 220ms allow-discrete; }
    dialog[open] { opacity: 1; transform: none; animation: none; }
    .nav-drawer { transition: opacity 220ms ease, transform 220ms var(--entry-easing), display 220ms allow-discrete, overlay 220ms allow-discrete; }
    .nav-drawer[open] { transition-duration: 300ms; }
    .nav-drawer::backdrop { opacity: 0; transition: opacity 220ms ease, display 220ms allow-discrete, overlay 220ms allow-discrete; }
    .nav-drawer[open]::backdrop { opacity: 1; }
    @starting-style { dialog[open] { opacity: 0; transform: translate(var(--menu-enter-x, 0px), 6px); } }
    @starting-style { .nav-drawer[open]::backdrop { opacity: 0; } }
  }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .kpi-card:hover, .workspace-launcher:hover { transform: translateY(-2px); box-shadow: var(--interaction-glow); }
  .workspace-launcher { transition: transform var(--motion), box-shadow var(--motion); }
}
@media print { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Dense reports scroll inside their table region; phone cards and print retain their existing layouts. */
@media screen and (min-width: 768px) {
  .table--wide { min-inline-size: 80rem; }
  .report-document .table--wide :is(th, td) { min-inline-size: 7rem; overflow-wrap: break-word; }
}

.evidence-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; max-inline-size: 100%; }
