/* UEX — Japanese flat interface.
   This layer shares the application's established selectors and form/JS hooks. */
:root {
    --bs-body-font-family: var(--font-sans);
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-primary-rgb: 41, 62, 86;
    --bs-success-rgb: 40, 112, 72;
    --bs-danger-rgb: 180, 55, 55;
    --bs-warning-rgb: 145, 93, 19;
    --bs-info-rgb: 50, 102, 126;
    --bs-border-color: var(--border);
    --bs-link-color: var(--primary);
    --bs-link-hover-color: var(--primary-hover);
    --bs-border-radius: 4px;
    --bs-border-radius-sm: 3px;
    --bs-border-radius-lg: 4px;
}
html { scroll-padding-top: 84px; }
body { background: var(--bg); }
html:lang(ja) { font-feature-settings: "palt"; }
h1, h2, h3, h4, h5, h6 { color: var(--text); letter-spacing: 0; }
button, input, select, textarea { font: inherit; }
a, button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 1100; padding: 10px 18px; background: var(--primary); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: none; color: #fff; }

/* Navigation is deliberately quiet: a line, a label and the current section. */
.sidebar { background: #fff; border-right: 1px solid var(--border); box-shadow: none; }
.sidebar-brand { min-height: 98px; padding: 22px 22px 20px; border-bottom: 1px solid var(--border); gap: 8px; }
.brand-mark { display: flex; align-items: center; gap: 12px; color: var(--primary); min-width: 0; }
.brand-symbol { flex: none; width: 26px; height: 30px; position: relative; display: inline-block; color: var(--primary); }
.brand-symbol::before, .brand-symbol::after { content: ""; position: absolute; width: 17px; height: 17px; background: currentColor; }
.brand-symbol::before { left: 0; top: 0; }
.brand-symbol::after { right: 0; bottom: 0; border: 2px solid #fff; box-sizing: content-box; }
.brand-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-label strong { font-size: 1.5rem; font-weight: 750; line-height: 1.2; letter-spacing: .05em; }
.brand-label small { font-size: .75rem; line-height: 1.5; font-weight: 500; color: var(--text-muted); letter-spacing: 0; white-space: normal; }
.sidebar-nav { gap: 3px; padding: 12px; scrollbar-width: thin; }
.sidebar-nav .nav-section { color: var(--text-muted); font-size: .75rem; letter-spacing: .04em; padding: 18px 12px 8px; }
.sidebar-nav .nav-link { min-height: 42px; gap: 12px; padding: 11px 13px; border-radius: 3px; font-size: .8125rem; font-weight: 500; letter-spacing: 0; color: var(--sidebar-fg); border-left: 2px solid transparent; }
.sidebar-nav .nav-link i { font-size: 1.05rem; color: inherit; opacity: 1; -webkit-text-fill-color: currentColor; }
.sidebar-nav .nav-link:hover { color: var(--primary); background: #f5f7f9; transform: none; text-decoration: none; }
.sidebar-nav .nav-link.active { color: var(--primary); background: var(--primary-soft); border-left-color: var(--primary); box-shadow: none; font-weight: 700; }
.sidebar-nav .nav-link:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.sidebar-foot { border-top: 1px solid var(--border); background: #fff; padding: 10px 12px; }
.sidebar-close { color: var(--text); min-width: 36px; min-height: 36px; }
.sidebar-brand i { background: none; -webkit-text-fill-color: currentColor; }
.sidebar-backdrop { background: rgb(24 35 48 / 35%); backdrop-filter: none; }
.topbar { min-height: 66px; padding: 12px 32px; background: #fff; gap: 16px; }
.topbar-title { font-size: .8125rem; font-weight: 600; letter-spacing: 0; }
.topbar-crumb { font-size: .8125rem; gap: 12px; }
.topbar-right { gap: 8px; flex-shrink: 0; }
.sidebar-collapse-btn { background: transparent; border-color: transparent; border-radius: 3px; color: var(--text-muted); width: 36px; height: 36px; }
.sidebar-toggle { width: 40px; height: 40px; }
.topbar-user, .lang-switch .dropdown-toggle { min-height: 36px; background: transparent; border-color: transparent; border-radius: 3px; font-size: .75rem; padding: 7px 9px; }
.topbar-user span { max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .dropdown-menu { padding: 5px; border-radius: 4px; box-shadow: none; border-color: var(--border-strong); }
.topbar .dropdown-item { border-radius: 2px; padding: 10px 12px; font-size: .8125rem; line-height: 1.5; }
.topbar-help, .notification-trigger { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.content { padding: 32px; min-width: 0; flex: 1; }
.content > :last-child { margin-bottom: 0; }
.app-footer { padding: 16px 32px; font-size: .75rem; color: var(--text-muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; background: #fff; }
.app-footer span:last-child { text-align: right; }
.page-head { align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.page-title, .page-head h5, .page-head > div > h5, .page-hero .hero-title { font-size: 1.5rem; font-weight: 700; line-height: 1.45; letter-spacing: 0; }
.page-sub, .page-hero .hero-sub { font-size: .8125rem; color: var(--text-muted); line-height: 1.7; margin-top: 6px; }
.page-actions { gap: 8px; }
.page-kicker { display: block; font-size: .625rem; line-height: 1.5; color: var(--text-muted); font-weight: 600; letter-spacing: .12em; margin-bottom: 7px; }

/* One component system across operations, forms, settings and portals. */
.card, .glass, .filter-card, .stat-card, .plan-approval, .settings-tile, .truck-card, .intake-box { border-radius: 4px; box-shadow: none; border-color: var(--border); background: #fff; }
.card-header { padding: 16px 20px; font-size: .875rem; letter-spacing: 0; line-height: 1.6; }
.card-body { padding: 20px; }
.card-footer { background: #fafbfc; border-top-color: var(--border); padding: 14px 20px; }
.card-header strong, .card-header h6 { font-weight: 650; }
.card .card { border-color: var(--border); }
.filter-card { padding: 18px 20px; margin-bottom: 20px; }
.filter-bar { gap: 12px; }
.filter-card .form-label { font-size: .75rem; color: var(--text-muted); }
.form-label { font-size: .8125rem; font-weight: 600; letter-spacing: 0; color: var(--text); }
.form-control, .form-select, .cselect-btn { background-color: #fff; border-color: var(--border-strong); border-radius: 3px; min-height: 40px; font-size: .875rem; line-height: 1.6; }
.form-control-sm, .form-select-sm { min-height: 36px; font-size: .8125rem; border-radius: 3px; }
.form-control:focus, .form-select:focus { border-color: var(--primary); outline: 2px solid var(--primary-soft); outline-offset: 1px; box-shadow: none; }
.form-control:disabled, .form-select:disabled { background-color: #f2f4f6; color: var(--text-muted); }
.form-control::placeholder { color: var(--text-faint); }
.form-check-input { border-color: var(--border-strong); border-radius: 2px; }
.form-check-input:focus { box-shadow: none; outline: 2px solid var(--primary-soft); outline-offset: 2px; }
.form-check-label, .form-text { line-height: 1.65; }
.form-section-title { font-size: .8125rem; padding-top: 20px; margin-top: 12px; }
.btn { border-radius: 3px; min-height: 38px; padding: 8px 14px; font-size: .8125rem; font-weight: 600; line-height: 1.5; box-shadow: none; transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover, .btn:active { transform: none; box-shadow: none; }
.btn-sm { min-height: 34px; padding: 6px 11px; border-radius: 3px; font-size: .75rem; }
.btn-lg { min-height: 44px; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-hover); --bs-btn-hover-border-color: var(--primary-hover); --bs-btn-active-bg: var(--primary-hover); --bs-btn-active-border-color: var(--primary-hover); --bs-btn-disabled-bg: #8794a3; --bs-btn-disabled-border-color: #8794a3; background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:disabled, .btn-primary.disabled { background: #8794a3; border-color: #8794a3; color: #fff; }
.btn-secondary, .btn-outline-secondary, .btn-light { background: #fff; border: 1px solid var(--border-strong); color: var(--text); }
.btn-secondary:hover, .btn-outline-secondary:hover, .btn-light:hover { background: #f2f5f7; border-color: #8c99a8; color: var(--text); }
.btn-outline-primary { border-color: var(--border-strong); color: var(--primary); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-info { background: var(--info); border-color: var(--info); color: #fff; }
.btn-link { background: transparent; }
.input-group-text { background: #f7f8fa; border-color: var(--border-strong); color: var(--text-muted); border-radius: 3px; font-size: .8125rem; }
.cselect-menu, .modal-content, .dropdown-menu, .swal2-popup { border-radius: 4px; border: 1px solid var(--border-strong); box-shadow: none; }
.cselect-option { border-radius: 2px; min-height: 36px; }
.modal-header, .modal-footer { padding: 18px 22px; border-color: var(--border); }
.modal-title { font-size: 1rem; }
.modal-body { padding: 22px; }

/* Dense information with generous row rhythm; numbers align by value. */
.table { --bs-table-border-color: var(--border); font-size: .8125rem; }
.table thead th { padding: 12px 16px; background: #f4f6f8; color: var(--text-muted); font-size: .75rem; font-weight: 600; text-transform: none; letter-spacing: .02em; line-height: 1.6; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; font-size: .8125rem; line-height: 1.65; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table-hover > tbody > tr:nth-child(even) { background: transparent; }
.table-hover > tbody > tr:hover { background: #f7f9fb; }
.table tbody td .small { font-size: .75rem; }
.table tbody td a.fw-semibold { font-size: .8125rem; }
.table td:not([colspan]) .btn.btn-sm { min-width: 32px; min-height: 32px; height: auto; border-radius: 3px; line-height: 1.5; }
.num, .text-end, .stat-value, .summary-value, .list-pager-range, .tz { font-variant-numeric: tabular-nums; }
code { border-radius: 2px; padding: .16em .4em; background: #f0f3f6; color: var(--primary); font-size: .83em; }
.badge, .oauth-pill, .chip, .stat-delta, .intake-code { border-radius: 3px; font-size: .75rem; line-height: 1.5; font-weight: 600; letter-spacing: 0; }
.badge { padding: 4px 8px; white-space: normal; }
.badge.bg-primary, .badge.text-bg-primary { background: var(--primary-soft) !important; color: var(--primary) !important; }
.badge.bg-success, .badge.text-bg-success { background: var(--success-tint) !important; color: #24613e !important; }
.badge.bg-danger, .badge.text-bg-danger { background: var(--danger-tint) !important; color: #9b2d2d !important; }
.badge.bg-warning, .badge.text-bg-warning { background: var(--amber-tint) !important; color: #80500b !important; }
.badge.bg-info, .badge.text-bg-info { background: var(--accent-tint) !important; color: #29586d !important; }
.badge.bg-secondary, .badge.text-bg-secondary, .badge.bg-light, .badge.text-bg-light { background: #eef1f4 !important; color: var(--text-muted) !important; }
.alert { padding: 14px 16px; border-radius: 3px; font-size: .8125rem; border: 1px solid var(--border); border-left-width: 3px; }
.alert-warning { background: var(--amber-tint); border-color: #e5cfab; border-left-color: var(--warning); color: #754b10; }
.alert-danger { background: var(--danger-tint); border-color: #e9c1c1; border-left-color: var(--danger); color: #922d2d; }
.alert-success { background: var(--success-tint); border-color: #c9dfce; border-left-color: var(--success); color: #275e3c; }
.alert-info { background: var(--accent-tint); border-color: #c9dce4; border-left-color: var(--info); color: #2c586b; }

/* The operations KPI is a single quiet band, not four floating tiles. */
.kpi-grid, .kpi-grid.kpi-fit { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border-block: 1px solid var(--border); background: #fff; }
.kpi-grid .stat-card { padding: 22px 24px; border: 0; border-right: 1px solid var(--border); border-radius: 0; background: #fff; }
.kpi-grid .stat-card:last-child { border-right: 0; }
.stat-card:hover, a.stat-card.stat-link:hover { transform: none; box-shadow: none; }
.stat-card .stat-label { font-size: .75rem; font-weight: 500; color: var(--text-muted); margin-bottom: 10px; }
.stat-card .stat-value { font-size: 2rem; font-weight: 650; letter-spacing: -.025em; color: var(--primary); }
.stat-icon, .settings-tile-icon { width: 28px; height: 28px; border-radius: 0; background: transparent !important; color: var(--primary); font-size: 1.25rem; }
.stat-card.is-alert { background: #fff; }
.stat-card.is-alert .stat-value, .stat-icon.is-danger { color: var(--danger); }
.stat-icon.is-amber { color: var(--warning); }
.stat-icon.is-success { color: var(--success); }
.summary-bar { gap: 0; border: 1px solid var(--border); border-radius: 3px; background: #fff; }
.summary-item { background: #fff; border: 0; border-right: 1px solid var(--border); border-radius: 0; padding: 14px 18px; box-shadow: none; }
.summary-item:last-child { border-right: 0; }
.summary-item.is-primary, .summary-item.is-warning, .summary-item.is-danger { background: #fff; }
.summary-item .summary-label { line-height: 1.6; }
.summary-item .summary-value { font-size: 1.4rem; }

/* Shared task navigation, including job detail and approval stages. */
.nav-pills, .seg-tabs { gap: 4px; background: transparent; border-radius: 0; border-bottom: 1px solid var(--border); padding: 0; }
.nav-pills .nav-link, .seg-tabs .seg { border-radius: 0; color: var(--text-muted); background: transparent; border-bottom: 2px solid transparent; padding: 10px 14px; font-size: .8125rem; }
.nav-pills .nav-link.active, .seg-tabs .seg.active { color: var(--primary); background: transparent; border-bottom-color: var(--primary); font-weight: 700; box-shadow: none; }
.job-tabs { margin-top: 0; }
.job-tab { padding: 12px 16px; }
/* Beside the sidebar there is room for five tabs only just: from a tablet up they wrap to a
   second row rather than scroll out of sight with no hint that more are there. */
@media (min-width: 768px) {
    .job-tabs { flex-wrap: wrap; overflow-x: visible; }
    .job-tab { padding: 12px 12px; }
}
.job-tab:hover { text-decoration: none; }
.steps { gap: 8px; }
.steps .step { border-radius: 3px; padding: 7px 10px; background: #f0f3f6; }
.steps .step-num { border-radius: 3px; }
.plan-approval { padding: 18px 20px; }
.truck-group, .truck-card { border-radius: 3px; }
.truck-group { background: #f7f9fa; padding: 14px; }
.truck-card { padding: 14px; }
.sl-item.is-current { box-shadow: none; border-left: 3px solid var(--primary); }
.sl-changes { border-radius: 3px; }

/* Source review keeps the original alongside the extracted fields. */
.intake-list-card, .intake-panel { border-radius: 4px; }
.intake-list-head, .intake-panel-head { padding: 18px 20px; }
.intake-state-tabs { border-bottom-color: var(--border); }
.intake-item { padding: 16px 18px; }
.intake-item.is-selected, .intake-item.active { background: var(--primary-soft); border-left-color: var(--primary); }
.intake-body { border-radius: 3px; background: #f7f8fa; line-height: 1.85; }
.intake-file, .intake-timeline { border-radius: 3px; }
.intake-grid { gap: 12px; }
.intake-next { border-top: 1px solid var(--border); background: #fafbfc; padding: 18px 20px; }
.intake-field { padding: 10px 0; align-items: flex-start; }
.intake-field dt { flex-basis: 115px; }
.intake-fields { column-gap: 20px; }
.intake-change { border-radius: 3px; }
.ocr-box { border-color: var(--info); }

/* Settings, integrations, help and external work use the same visual language. */
.settings-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.settings-group { margin-bottom: 32px; }
.settings-group-title { font-size: .75rem; font-weight: 600; color: var(--text-muted); letter-spacing: .03em; text-transform: none; margin-bottom: 12px; }
.settings-tile { padding: 20px; gap: 14px; min-height: 100px; }
.settings-tile:hover { background: #fafbfc; border-color: var(--border-strong); transform: none; box-shadow: none; }
.settings-tile-title { font-size: .875rem; }
.settings-tile-desc { font-size: .75rem; margin-top: 5px; line-height: 1.7; }
.oauth-card:hover { transform: none; box-shadow: none; }
.oauth-card::before { display: none; }
.oauth-logo { background: var(--primary-soft); color: var(--primary); border-radius: 3px; box-shadow: none; }
.oauth-copy, .oauth-redirect, .oauth-verify-result { border-radius: 3px; }
.oauth-pill.is-on .dot { animation: none; }
.guide-content h2 { border-color: var(--border); line-height: 1.7; }
.empty-state { padding: 44px 24px; color: var(--text-muted); }
.empty-state > i { color: var(--primary); font-size: 2rem; opacity: .65; }
.page-link, .pager-links .pager-sizes, .pager-links .pager-size-opt, .list-pager-btn { border-radius: 3px; }
.page-link { min-width: 34px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; }
.pager-links { padding-block: 14px; }
.list-pager-btn { min-width: 34px; height: 34px; }
.drawer { border-left: 1px solid var(--border); box-shadow: none; }
#toast-container > div { box-shadow: none; border-radius: 3px; opacity: 1; }

/* Standalone account screens: product context on the left, one clear form on the right. */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; justify-content: stretch; min-height: 100svh; padding: 0; background: #fff; overflow: visible; }
.auth-intro { padding: clamp(32px, 6vw, 88px); background: #f4f6f8; border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.auth-intro .brand-mark { margin-bottom: 64px; }
.auth-intro .brand-label strong { font-size: 2rem; }
.auth-intro .brand-label small { font-size: .75rem; }
.auth-intro h2 { max-width: 480px; text-wrap: balance; line-break: strict; font-size: clamp(1.6rem, 2.5vw, 2.25rem); line-height: 1.6; font-weight: 650; margin-bottom: 20px; }
.auth-intro p { max-width: 420px; color: var(--text-muted); font-size: .875rem; line-height: 1.9; }
.auth-intro-flow { list-style: none; padding: 24px 0 0; margin: 24px 0 0; border-top: 1px solid var(--border-strong); display: flex; flex-wrap: wrap; gap: 16px; font-size: .75rem; color: var(--text-muted); }
.auth-intro-flow li { display: inline-flex; align-items: center; gap: 6px; }
.auth-intro-flow li:not(:last-child)::after { content: "→"; margin-left: 10px; color: #8793a1; }
.auth-card { align-self: center; justify-self: center; width: calc(100% - 64px); max-width: 420px; border: 0; border-radius: 0; background: #fff; padding: 48px 8px; box-shadow: none; }
.auth-brand { text-align: left; font-size: .875rem; color: var(--primary); font-weight: 700; letter-spacing: .08em; margin-bottom: 16px; }
.auth-brand i { margin-right: 5px; -webkit-text-fill-color: currentColor; }
.auth-title { text-align: left; font-size: 1.5rem; font-weight: 700; line-height: 1.5; margin: 0 0 24px; }
.auth-sub { text-align: left; font-size: .8125rem; line-height: 1.8; margin-bottom: 28px; }
.auth-card .form-control { min-height: 44px; }
.auth-card button[type=submit] { min-height: 44px; margin-top: 6px; }
.auth-lang { padding-top: 22px; margin-top: 28px; border-top: 1px solid var(--border); display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 8px; }
.auth-lang a { margin: 0; padding: 4px; }
.auth-lang a.text-muted { color: var(--text-muted) !important; }

@media (min-width: 992px) {
    html.sidebar-collapsed .sidebar-brand { min-height: 98px; padding: 22px 0; }
    html.sidebar-collapsed .sidebar-brand .brand-mark { background: transparent; border: 0; border-radius: 0; width: auto; }
    html.sidebar-collapsed .sidebar-nav .nav-link { border-radius: 3px; border-left: 0; }
    html.sidebar-collapsed .sidebar-nav .nav-link.active::before { background: var(--primary); border-radius: 0; }
    html.sidebar-collapsed .sidebar-nav .nav-link .nav-text { border-radius: 3px; border-color: var(--primary); background: var(--primary); box-shadow: none; padding: 9px 12px; }
    html.sidebar-collapsed .sidebar-nav .nav-link .nav-text::before { border-right-color: var(--primary); }
    html.sidebar-collapsed .sidebar-nav .nav-link:focus-visible .nav-text { opacity: 1; visibility: visible; }
    html.sidebar-collapsed .brand-label { display: none; }
    .vendor-worklist .card-header { min-height: 70px; }
}
@media (max-width: 1199.98px) {
    .content { padding: 24px; }
    .topbar { padding-inline: 24px; }
    .intake-fields { grid-template-columns: 1fr; }
}
@media (max-width: 991.98px) {
    .sidebar { width: min(288px, calc(100vw - 48px)); }
    .sidebar-brand { min-height: 80px; }
    .topbar { padding: 10px 16px; min-height: 62px; gap: 8px; }
    .topbar-right { gap: 2px; }
    .topbar-crumb { gap: 6px; }
    .topbar-user span { max-width: 110px; }
    .app-footer { padding-inline: 24px; }
    .auth-intro { padding: 40px 28px; }
    .auth-intro .brand-mark { margin-bottom: 40px; }
    .auth-card { width: calc(100% - 40px); }
    .intake-panel { position: static; }
}
@media (max-width: 767.98px) {
    .content { padding: 22px 16px; }
    .page-head { margin-bottom: 20px; }
    .page-title, .page-head h5, .page-head > div > h5 { font-size: 1.3rem; }
    .page-actions { width: 100%; flex-wrap: wrap; }
    .page-actions .btn { min-height: 40px; }
    .topbar-user span, .lang-label, .topbar-help { display: none; }
    .topbar-user, .lang-switch .dropdown-toggle { min-height: 40px; padding: 8px; }
    .topbar-title { max-width: 38vw; }
    .card-header, .card-body, .filter-card { padding: 16px; }
    .kpi-grid, .kpi-grid.kpi-fit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi-grid .stat-card { padding: 18px 16px; border-bottom: 1px solid var(--border); }
    .kpi-grid .stat-card:nth-child(2n) { border-right: 0; }
    .stat-card .stat-value { font-size: 1.7rem; }
    .stat-icon { width: 22px; font-size: 1.1rem; }
    .table td { padding-block: 12px; }
    .table-cards tbody tr { border-radius: 3px; border-color: var(--border); box-shadow: none; }
    .form-control, .form-select, .cselect-btn, .btn { min-height: 44px; }
    .table td:not([colspan]) .btn.btn-sm { min-width: 40px; min-height: 40px; }
    .filter-bar > div { min-width: 0; max-width: 100%; }
    .filter-bar .filter-search { flex-basis: 100%; }
    .settings-grid { grid-template-columns: 1fr; }
    .settings-tile { min-height: 86px; padding: 18px 16px; }
    .intake-fields { grid-template-columns: 1fr; }
    .intake-field dt { flex-basis: 105px; }
    .intake-panel-head { flex-wrap: wrap; }
    .app-footer { padding: 16px; font-size: .625rem; flex-wrap: wrap; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-intro { padding: 28px 24px; border-right: 0; border-bottom: 1px solid var(--border); }
    .auth-intro .brand-mark { margin-bottom: 20px; }
    .auth-intro h2 { font-size: 1.25rem; margin-bottom: 10px; }
    .auth-intro p { margin-bottom: 0; }
    .auth-intro-flow { display: none; }
    .auth-card { padding: 28px 8px 40px; width: calc(100% - 32px); }
    .auth-title { font-size: 1.3rem; }
    .job-tabs { gap: 0; }
    .job-tab { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
    .sidebar, .topbar, .app-footer, .page-actions, .skip-link { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .content { padding: 0; }
    .card { break-inside: avoid; }
}

/* Queue labels retain their state but use the same restrained shapes. */
.intake-src, .intake-pill, .intake-channel, .intake-count, .intake-tab-count,
.intake-source-select, .intake-search .form-control { border-radius: 3px; }
.intake-row { padding: 16px 18px; }
.intake-src { background: #f0f3f6; }
.intake-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
body.sidebar-open { overflow: hidden; }

/* Screen purpose stays separate from customer identifiers and state badges. */
.page-purpose {
    max-width: 88ch;
    margin: -10px 0 24px;
    color: var(--text-muted);
    font-size: .875rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
@media (max-width: 767.98px) {
    .page-purpose { margin-top: -6px; margin-bottom: 20px; }
}

@media print {
    .finance-draft-document { padding-top: 26mm; }
    .finance-draft-document .draft-status { position: fixed; top: 0; left: 0; right: 0; z-index: 10; background: white !important; border: 2px solid black; color: black; padding: 3mm; font-size: 9pt; }
    .finance-draft-document .table-responsive { overflow: visible !important; }
    .finance-draft-document table { font-size: 9pt; }
    .finance-draft-document thead { display: table-header-group; }
    .finance-draft-document tr { break-inside: avoid; }
}
