/* Shared Aceri primitives. Page composition remains owned by each page. */
:root {
    --foreasy-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --foreasy-muted: #526158;
    --foreasy-radius: 8px;
    --foreasy-focus: #986315;
    --foreasy-sage-soft: #edf4ec;
    --foreasy-sage-ink: #315a40;
    --foreasy-amber-soft: #fff0d2;
    --foreasy-amber-ink: #7a4b00;
    --foreasy-teal-soft: #eaf5f2;
    --foreasy-teal-ink: #245e54;
    --foreasy-danger: #a23b2a;
    --foreasy-danger-soft: #fcf0ec;
    --foreasy-neutral-soft: #f3f5f1;
}
html { font-size: 16px; }
body { font-family: var(--foreasy-font); font-weight: 400; line-height: 1.5; }
body:is(.public-shell, .app-shell) :is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--foreasy-focus); outline-offset: 3px; box-shadow: 0 0 0 2px var(--foreasy-white); }
body.app-shell { background: var(--foreasy-paper); }
body.app-shell :is(h1, h2, h3, h4, h5, h6) { font-weight: 650; }
body.app-shell :is(input, select, textarea, button) { font-family: inherit; }
body.app-shell :is(label, th) { font-weight: 600; }
.app-shell :is(.btn, .account-button, .document-type-label) { font-weight: 600; }
.app-shell :is(.btn-foreasy, .btn-outline-foreasy) { border-radius: var(--foreasy-radius); padding: 9px 14px; font-size: .875rem; line-height: 1.4; }
.app-shell .btn-foreasy { background: var(--foreasy-green-dark); border: 1px solid var(--foreasy-green-dark); color: var(--foreasy-white); }
.app-shell .btn-foreasy:is(:hover, :focus) { background: var(--foreasy-green); border-color: var(--foreasy-green); color: var(--foreasy-white); }
.app-shell .btn-outline-foreasy { border: 1px solid #9dad9f; background: var(--foreasy-white); color: var(--foreasy-green-dark); }
.app-shell .btn-outline-foreasy:is(:hover, :focus) { background: #edf2ed; border-color: var(--foreasy-green); color: var(--foreasy-green-dark); }
.app-shell :is(.btn, button):disabled, .app-shell .btn.disabled { opacity: .65; cursor: not-allowed; }
.app-shell :is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--foreasy-focus); outline-offset: 3px; box-shadow: 0 0 0 2px var(--foreasy-white); }
.app-shell :is(.form-control, .form-select, .account-form input, .account-form select, .account-form textarea) { font-size: 1rem; font-weight: 400; border-radius: var(--foreasy-radius); }
.app-shell .account-status-pill { font-weight: 600; }
.app-shell .site-header { box-shadow: 0 1px 4px #10382805; }
.app-shell .foreasy-nav { padding: 10px 0; }
.app-shell .foreasy-nav > .container { max-width: 1600px; padding-inline: 24px; }
.app-shell .foreasy-brand { flex-shrink: 0; font-size: 1.3rem; font-weight: 750; }
.app-shell .foreasy-brand img { width: 30px; height: 30px; }
.app-shell .navbar-nav-wrap { gap: 12px; min-width: 0; }
.app-shell .account-nav { gap: 3px; min-width: 0; padding-left: 12px; }
.app-shell .foreasy-nav .nav-link { font-size: .875rem; font-weight: 600; line-height: 1.3; white-space: nowrap; margin-left: 0; padding: 9px 8px; }
.app-shell .foreasy-nav .nav-link[aria-current="page"] { background: #edf2ed; border-radius: 6px; color: var(--foreasy-green-dark); }
.app-shell .foreasy-add-toggle { font-weight: 600; padding-inline: 12px !important; }
.app-shell .foreasy-dropdown-menu .dropdown-item { font-size: .9375rem; font-weight: 500; line-height: 1.5; }
.app-shell .foreasy-dropdown-header { font-weight: 600; letter-spacing: .035em; }
.app-shell .account-switcher-host { min-width: 180px; width: clamp(180px, 18vw, 260px); flex-shrink: 1; }
.app-shell .current-year-host { min-width: 76px; width: 80px; flex-shrink: 0; }
.app-shell :is(.account-switcher, .current-year-switcher) { margin: 0; }
.app-shell :is(.account-switcher, .current-year-switcher) label { gap: 5px; }
.app-shell :is(.account-switcher, .current-year-switcher) span { font-size: .6875rem; line-height: 1.2; letter-spacing: .025em; font-weight: 600; text-transform: uppercase; }
.app-shell :is(.account-switcher, .current-year-switcher) select { font-size: .875rem; font-weight: 500; min-height: 36px; padding: 6px 8px; text-overflow: ellipsis; }
.account-switcher-placeholder { display: grid; gap: 4px; padding: 4px 0; }
.account-switcher-placeholder strong { font-size: .875rem; font-weight: 500; overflow-wrap: anywhere; }
.app-shell .language-switch { font-size: .8125rem; font-weight: 500; gap: 4px; margin-left: 5px; white-space: nowrap; }
.app-shell .language-switch button { padding: 6px 2px; }
.app-shell .notification-badge { font-size: .625rem; min-width: 18px; }
.app-shell .site-breadcrumbs { padding-block: 12px; font-size: .8125rem; }
.app-shell .site-breadcrumbs .breadcrumb { margin: 0; }
.app-shell .site-breadcrumbs a { font-weight: 500; }
.app-shell .context-help-button { width: 42px; height: 42px; font-size: 1rem; bottom: 18px; right: 18px; box-shadow: 0 3px 12px #10382818; }
.app-shell .site-footer { font-size: .8125rem; }
.app-shell .site-footer > .container { max-width: 1440px; padding-inline: 24px; }
@media (min-width: 1200px) {
    .app-shell .navbar-collapse { min-width: 0; }
    .app-shell .account-nav { flex-direction: row; flex-wrap: nowrap; }
}
@media (max-width: 1199px) {
    .app-shell .foreasy-nav > .container { padding-inline: 16px; }
    .app-shell .navbar-nav-wrap { align-items: stretch; flex-direction: column; gap: 4px; padding-top: 12px; }
    .app-shell .account-nav { align-items: stretch; border-left: 0; border-top: 1px solid var(--foreasy-line); padding: 12px 0 0; width: 100%; gap: 6px; }
    .app-shell :is(.account-switcher-host, .current-year-host) { min-width: 0; width: 100%; }
    .app-shell .foreasy-nav .nav-link { padding: 10px 4px; }
    .app-shell .foreasy-dropdown-menu { box-shadow: none; margin-block: 4px; }
    .app-shell .language-switch { align-self: flex-start; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Page introductions: scoped classes leave card and report headings intact. */
.page-surface { padding-block: 24px 32px; min-height: 0; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; width: 100%; max-width: none; margin: 0 0 16px; }
.page-header .page-header-copy { flex: 1 1 0; min-width: 0; max-width: none; }
.page-header .page-header-copy > h1 { color: var(--foreasy-green-dark); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 650; line-height: 1.2; max-width: none; margin: 0 0 6px; overflow-wrap: anywhere; }
.page-header .page-header-copy > p { color: var(--foreasy-muted); font-size: 1rem; font-weight: 400; line-height: 1.5; max-width: 85ch; margin: 0; overflow-wrap: anywhere; }
.page-header .page-header-actions { display: flex; align-items: flex-start; justify-content: flex-end; flex: 0 1 auto; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; margin: 0; }
.page-header-actions > *, .page-header-actions .btn { max-width: 100%; }
.page-header-actions :is(.current-year-switcher, .hero-actions, .map-records-header-actions) { margin: 0; flex-wrap: wrap; gap: 8px; }
.page-header + * { margin-top: 0; }
.page-utility { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.page-utility > .page-breadcrumbs { flex: 1 1 200px; min-width: 0; margin: 0; }
.page-utility .breadcrumb { margin: 0; font-size: .8125rem; line-height: 1.5; overflow-wrap: anywhere; }
.page-utility > .form-page-navigation { margin: 0; flex: 0 0 auto; }
.page-content-note { margin: 0 0 16px; color: var(--foreasy-muted); font-size: .875rem; line-height: 1.5; }
.list-filter { min-width: 0; margin: 0 0 16px; color: var(--foreasy-muted); font-size: .8125rem; }
.list-filter > label { display: block; font-weight: 600; color: var(--foreasy-ink); margin-bottom: 6px; }
.list-filter-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 520px; }
.list-filter-controls input { flex: 1 1 180px; min-width: 0; width: 100%; border: 1px solid var(--foreasy-line); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 1rem; color: var(--foreasy-ink); background: white; }
.list-filter > small, .list-filter-count { display: block; line-height: 1.5; margin-top: 4px; }
.list-filter-empty { margin: 8px 0 0; color: var(--foreasy-ink); }
.list-filter-hidden { display: none !important; }
@media (max-width: 575px) { .list-filter-controls { max-width: none; } }
@media print { .list-filter { display: none !important; } .list-filter-hidden { display: revert !important; } }
.sale-action-unavailable { color: var(--foreasy-muted); white-space: normal; }
.sale-action-unavailable small { display: block; font-size: .75rem; line-height: 1.4; margin-top: 4px; }
.app-shell .sale-action-unavailable:disabled { opacity: 1; color: var(--foreasy-muted); cursor: not-allowed; }
.inventory-sale-action { display: flex; flex-direction: column; align-items: flex-start; max-width: 250px; }
.app-shell .sale-action-unavailable .btn:disabled { opacity: 1; color: var(--foreasy-muted); background: var(--foreasy-neutral-soft); border-color: var(--foreasy-line); }
.auth-page-content > .signup-form { max-width: 560px; }
.home-page-content > .hero-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; padding: 16px; box-shadow: 0 3px 12px #10382809; }
.home-page-content .panel-header { grid-column: 1 / -1; margin-bottom: 0; }
.home-page-content .metric-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 8px 0; border: 0; }
.home-page-content .metric-row > * { overflow-wrap: anywhere; }
.home-page-content .store-links { margin-block: 12px 0; flex-wrap: wrap; }
.page-surface .status-card { padding: 24px; text-align: left; }
.page-surface .status-icon { width: 36px; height: 36px; font-size: 1.25rem; margin: 0 0 12px; }
.page-surface .status-card .page-header { text-align: left; }
.legal-hero.page-surface .legal-links { margin-top: 12px; }
:is(.public-shell, .app-shell) .page-header :is(a, button, input, select):focus-visible { outline: 2px solid var(--foreasy-focus); outline-offset: 3px; }
@media (max-width: 991px) {
    .page-header { flex-direction: column; }
    .page-header .page-header-copy { flex-basis: auto; width: 100%; }
    .page-header .page-header-actions { justify-content: flex-start; width: 100%; }
}
@media (max-width: 575px) {
    .page-surface { padding-top: 16px; }
    .home-page-content > .hero-panel { grid-template-columns: 1fr; gap: 8px; }
    .page-surface .status-card { padding: 16px; }
}
