:root {
    --navy-950: #091426;
    --navy-900: #101f36;
    --navy-800: #19304f;
    --blue-700: #1958c7;
    --blue-600: #2468dd;
    --blue-100: #eaf1ff;
    --slate-900: #172033;
    --slate-700: #45536a;
    --slate-500: #718096;
    --slate-300: #cbd4e1;
    --slate-200: #e2e8f0;
    --slate-100: #f2f5f9;
    --canvas: #f6f8fb;
    --green: #138a63;
    --amber: #b7791f;
    --shadow: 0 10px 30px rgba(20, 39, 70, .07);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--slate-900);
    background: var(--canvas);
    font-synthesis: none;
}

* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
a { color: inherit; text-decoration: none; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.topbar { height: 72px; background: var(--navy-950); color: #fff; box-shadow: 0 4px 18px rgba(3, 12, 28, .18); }
.topbar__inner { width: min(1500px, calc(100% - 48px)); height: 100%; margin: auto; display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: .7rem; min-width: 230px; }
.brand__mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(145deg, #4c8dff, #1958c7); font-size: 1.2rem; font-weight: 800; box-shadow: inset 0 1px rgba(255,255,255,.25); }
.brand__copy { display: flex; flex-direction: column; line-height: 1; letter-spacing: .12em; }
.brand__copy strong { font-size: .95rem; }
.brand__copy small { margin-top: .3rem; color: #8fa6c6; font-size: .59rem; letter-spacing: .22em; }
.nav { align-self: stretch; display: flex; gap: .25rem; }
.nav__link { position: relative; display: flex; align-items: center; gap: .55rem; padding: 0 1.1rem; color: #a9b8ce; font-size: .88rem; font-weight: 600; transition: .18s ease; }
.nav__link:hover { color: white; background: rgba(255,255,255,.04); }
.nav__link--active { color: white; }
.nav__link--active::after { content: ""; position: absolute; right: 1rem; bottom: 0; left: 1rem; height: 3px; border-radius: 3px 3px 0 0; background: #4c8dff; }
.nav__link svg { width: 1.1rem; }
.user-menu { margin-left: auto; display: flex; align-items: center; gap: .55rem; color: #a9b8ce; font-size: .76rem; }
.language-switcher { margin: 0 10px 0 0 !important; }.language-switcher select { height: 32px; padding: 0 28px 0 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; outline: none; background: #13233b; color: #dce6f4; font: 650 .69rem/1 inherit; cursor: pointer; }.language-switcher select:hover, .language-switcher select:focus { border-color: #5b7da9; }
.user-menu__avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--navy-800); color: white; font-weight: 800; text-transform: uppercase; }
.user-menu form { margin: 0 0 0 .35rem; }
.user-menu button { padding: .35rem .55rem; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; background: transparent; color: #a9b8ce; font: inherit; cursor: pointer; }
.user-menu button:hover { border-color: rgba(255,255,255,.35); color: white; }

.workspace { width: min(1500px, calc(100% - 48px)); margin: auto; padding: 38px 0 64px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.eyebrow { margin: 0 0 7px; color: var(--blue-600); font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.page-heading h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -.035em; }
.page-heading__description { margin: 9px 0 0; color: var(--slate-500); font-size: .93rem; }
.page-heading__meta { display: flex; align-items: center; gap: .5rem; padding-bottom: .25rem; color: var(--slate-500); font-size: .75rem; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #20b486; box-shadow: 0 0 0 4px rgba(32,180,134,.11); }

.filter-panel, .results { overflow: hidden; border: 1px solid var(--slate-200); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.filter-panel { position: relative; z-index: 5; margin-bottom: 20px; overflow: visible; }
.filter-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--slate-200); }
.filter-panel__head h2, .results__head h2 { margin: 0; font-size: 1rem; letter-spacing: -.01em; }
.filter-panel__head h2 { display: flex; align-items: center; gap: .55rem; }
.filter-panel__head h2 svg { color: var(--blue-600); }
.filter-panel__head p, .results__head p { margin: 5px 0 0; color: var(--slate-500); font-size: .76rem; }
.clear-button { display: flex; align-items: center; gap: .35rem; color: var(--slate-500); font-size: .78rem; font-weight: 600; }
.clear-button:hover { color: #c2413b; }
.clear-button svg { width: .95rem; }

.filter-primary { display: grid; grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(155px, 1fr)); gap: 16px; padding: 22px 24px; }
.form-field label { display: block; margin-bottom: 7px; color: var(--slate-700); font-size: .7rem; font-weight: 700; letter-spacing: .02em; }
.form-field input, .form-field select { width: 100%; height: 42px; padding: 0 12px; outline: none; border: 1px solid var(--slate-300); border-radius: 8px; background: #fff; color: var(--slate-900); font: inherit; font-size: .82rem; transition: border-color .16s, box-shadow .16s; }
.form-field select { padding-right: 34px; cursor: pointer; }
.form-field input::placeholder { color: #9ba8b9; }
.form-field input:hover, .form-field select:hover { border-color: #a8b4c4; }
.form-field input:focus, .form-field select:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(36,104,221,.11); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; z-index: 1; top: 11px; left: 12px; width: 1.15rem; color: #8997aa; pointer-events: none; }
.input-icon input { padding-left: 39px; }
.errorlist { margin: 6px 0 0; padding: 0; list-style: none; color: #c2413b; font-size: .7rem; }
.multi-select { position: relative; }.multi-select__control { position: relative; }.multi-select__control input { padding-right: 52px; }.multi-select__control > i { position: absolute; top: 11px; right: 12px; color: #7c899c; font-style: normal; pointer-events: none; }.multi-select__control > span { position: absolute; top: 10px; right: 29px; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 10px; background: var(--blue-600); color: #fff; font-size: .62rem; font-weight: 800; pointer-events: none; }
.multi-select__menu { position: absolute; z-index: 50; top: calc(100% + 6px); right: 0; left: 0; display: none; max-height: 280px; overflow: auto; padding: 7px; border: 1px solid #cbd6e5; border-radius: 10px; background: #fff; box-shadow: 0 14px 35px rgba(18,39,70,.16); }.multi-select--open .multi-select__menu { display: block; }.multi-select__menu ul { margin: 0; padding: 0; list-style: none; }.multi-select__menu li { border-radius: 7px; }.multi-select__menu li:hover { background: #f1f6ff; }.multi-select__menu label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 8px; color: #314158; font-size: .72rem; font-weight: 600; cursor: pointer; }.multi-select__menu input { width: 15px; height: 15px; padding: 0; accent-color: var(--blue-600); }

.advanced { border-top: 1px solid var(--slate-200); }
.advanced summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 24px; color: var(--slate-700); cursor: pointer; list-style: none; background: #fbfcfe; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary > span { display: flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; }
.advanced summary > span svg { width: 1.05rem; color: var(--blue-600); }
.advanced summary small { color: #91a0b4; font-size: .7rem; }
.advanced .chevron { width: 1rem; transition: transform .2s; }
.advanced[open] .chevron { transform: rotate(180deg); }
.advanced__body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 28px; padding: 22px 24px 26px; border-top: 1px solid var(--slate-200); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 12px; padding: 0; color: var(--navy-800); font-size: .73rem; font-weight: 800; }
.field-grid { display: grid; gap: 10px; }
.field-grid--2 { grid-template-columns: 1fr 1fr; }

.filter-actions { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-top: 1px solid var(--slate-200); background: #fbfcfe; }
.filter-actions p { display: flex; align-items: center; gap: .45rem; margin: 0; color: var(--slate-500); font-size: .72rem; }
.filter-indicator { width: 6px; height: 6px; border-radius: 50%; background: var(--blue-600); }
.primary-button { display: flex; align-items: center; gap: .5rem; min-height: 40px; padding: 0 19px; border: 0; border-radius: 8px; background: var(--blue-600); color: #fff; font-weight: 700; font-size: .78rem; cursor: pointer; box-shadow: 0 5px 12px rgba(36,104,221,.22); transition: transform .15s, background .15s; }
.primary-button:hover { transform: translateY(-1px); background: var(--blue-700); }
.primary-button svg { width: 1rem; }

.metrics { position: relative; z-index: 1; }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.metric { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 19px 20px; overflow: hidden; border: 1px solid var(--slate-200); border-radius: 13px; background: #fff; box-shadow: 0 6px 18px rgba(20,39,70,.045); }
.metric__icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--blue-100); color: var(--blue-700); }
.metric__icon svg { width: 1.25rem; }
.metric__icon span { font-size: .72rem; font-weight: 850; }
.metric p { margin: 0 0 4px; color: var(--slate-500); font-size: .68rem; font-weight: 650; }
.metric strong { display: inline-block; max-width: 100%; overflow: hidden; color: var(--navy-900); font-size: clamp(1.15rem, 2vw, 1.48rem); letter-spacing: -.035em; text-overflow: ellipsis; vertical-align: bottom; }
.metric small { margin-left: .3rem; color: #93a0b1; font-size: .59rem; font-weight: 750; }
.metric--count .metric__icon { background: #ebf7f2; color: var(--green); }
.metric--total { border-color: #ccdaf4; background: linear-gradient(135deg, #fff 30%, #f1f6ff); }
.metric--total .metric__icon { background: var(--blue-600); color: white; box-shadow: 0 5px 12px rgba(36,104,221,.2); }

.results__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--slate-200); }
.results__sort { text-align: right; }
.results__sort span { display: block; color: var(--slate-500); font-size: .62rem; }
.results__sort strong { font-size: .72rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 1120px; border-collapse: collapse; }
th { padding: 12px 14px; border-bottom: 1px solid var(--slate-200); background: #f8fafc; color: #69778b; font-size: .66rem; font-weight: 800; letter-spacing: .035em; text-align: left; text-transform: uppercase; }
td { padding: 14px; border-bottom: 1px solid #edf0f4; color: var(--slate-700); font-size: .76rem; vertical-align: middle; }
tbody tr { transition: background .13s; }
tbody tr:hover { background: #f9fbff; }
tbody tr:last-child td { border-bottom: 0; }
.invoice-row--returned { animation: invoice-return-highlight 1.8s ease-out; }
@keyframes invoice-return-highlight { from { background: #eaf2ff; } to { background: transparent; } }
.invoice-cell { display: flex; align-items: center; gap: 10px; min-width: 215px; }
.supplier-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--navy-900); color: white; font-size: .72rem; font-weight: 800; }
.invoice-cell strong { display: block; max-width: 190px; overflow: hidden; color: var(--navy-900); font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.invoice-cell small, .period-cell small { display: block; margin-top: 4px; color: #8a98aa; font-size: .66rem; }
.date-value { color: var(--navy-800); font-variant-numeric: tabular-nums; }
.period-cell > span { color: var(--navy-800); font-variant-numeric: tabular-nums; }
.period-badge, .category-badge { display: inline-flex; padding: 5px 8px; border-radius: 6px; background: #eff3f8; color: #536177; font-size: .66rem; font-weight: 700; white-space: nowrap; }
.category-badge { background: #f0edff; color: #6453ad; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.money { color: #536177; }
.money--strong { color: var(--navy-900); font-weight: 800; }
.money--strong small { margin-left: 2px; color: #93a0b1; font-size: .57rem; }
.muted { color: #a1adbd !important; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: .65rem; font-weight: 750; white-space: nowrap; }
.status i { width: 5px; height: 5px; border-radius: 50%; }
.status--valid { background: #eaf7f2; color: #11785a; }
.status--valid i { background: #16a276; }
.status--review { background: #fff4e4; color: #9d6416; }
.status--review i { background: #d9942b; }
.status--unverified { background: #eef2f7; color: #64748b; }.status--unverified i { background: #94a3b8; }
.status--invalid_data { background: #fff0ee; color: #b33b32; }.status--invalid_data i { background: #dc4c43; }
.status--ai_verified { background: #eaf2ff; color: #1d5fbf; }.status--ai_verified i { background: #2d72d9; }
.status--human_verified { background: #e8f8f1; color: #0f7a57; }.status--human_verified i { background: #16a276; }
.validation-status-cell{min-width:178px}.status-line{display:flex;align-items:center;gap:7px;min-height:27px;white-space:nowrap}.validator-name{display:block;margin:3px 0 0 7px;color:#8794a7;font-size:.58rem;text-align:left}.undo-validation-form{display:inline-flex;margin:0}.undo-validation-form button{height:25px;padding:0 8px;border:1px solid #e4b7b2;border-radius:6px;background:#fff8f7;color:#a43a32;font:750 .58rem/1 inherit;white-space:nowrap;cursor:pointer}.post-undo-actions{display:contents}
.validation-reasons { max-width: 190px; margin: 6px 0 0; padding: 0; color: #b33b32; font-size: .67rem; line-height: 1.35; list-style: none; }
.validation-reasons li::before { content: "•"; margin-right: 5px; }
.select-cell { width: 36px; text-align: center; }.select-cell input { width: 16px; height: 16px; accent-color: var(--blue-600); cursor: pointer; }.select-cell input:disabled { cursor: not-allowed; opacity: .35; }
.results-tools { display: flex; align-items: center; gap: 14px; }.bulk-export-form{display:flex;align-items:center;gap:6px}.bulk-export-form select{height:36px;padding:0 8px;border:1px solid #ccd7e5;border-radius:8px;background:#fff;color:#40516a;font-size:.68rem}.export-button{height:36px;padding:0 11px;border:1px solid #b8c9e2;border-radius:8px;background:#fff;color:#245ca8;font:750 .68rem/1 inherit;cursor:pointer}.export-button:disabled{opacity:.45;cursor:not-allowed}.bulk-ai-button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--blue-600); color: #fff; font: 750 .69rem/1 inherit; cursor: pointer; box-shadow: 0 5px 12px rgba(36,104,221,.18); }.bulk-ai-button:disabled { background: #b7c2d1; box-shadow: none; cursor: not-allowed; }.bulk-ai-button span { display: inline-grid; place-items:center; min-width: 20px; height: 20px; margin-left: 5px; border-radius: 999px; background: rgba(255,255,255,.2); }.flash-message { margin: 0 0 14px; padding: 11px 14px; border: 1px solid #b9dfd0; border-radius: 9px; background: #eef9f4; color: #176b50; font-size: .78rem; }.flash-message--error { border-color: #efc5c0; background: #fff2f0; color: #a63129; }
.action-cell { width: 1%; }
.preview-button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #cbd8ed; border-radius: 7px; background: #fff; color: var(--blue-700); font-size: .67rem; font-weight: 750; white-space: nowrap; transition: .15s; }
.preview-button svg { width: .95rem; height: .95rem; }
.preview-button:hover { border-color: #92afe0; background: var(--blue-100); transform: translateY(-1px); }
.row-actions { display: flex; align-items: center; gap: 6px; }
.validation-form { margin: 0; }.validation-button { height: 31px; padding: 0 9px; border: 1px solid #cad6e7; border-radius: 7px; background: #fff; color: #42536b; font: 750 .64rem/1 inherit; white-space: nowrap; cursor: pointer; }.validation-button:hover { transform: translateY(-1px); }.validation-button--ai { border-color: #b9d1f7; color: #1c62c5; background: #f5f9ff; }.validation-button--human { border-color: #b8dfd2; color: #117b5b; background: #f2fbf7; }
.preview-button--mail { color: #5a3ec8; border-color: #d9d1fa; }
.preview-button--mail:hover { background: #f2efff; border-color: #b7a9ef; }
.preview-button--active { border-color: var(--blue-600); background: var(--blue-100); box-shadow: 0 0 0 2px rgba(36,104,221,.1); }
.preview-drawer { position: fixed; z-index: 30; top: 72px; right: 0; bottom: 0; width: 58vw; overflow: hidden; border-left: 1px solid #cbd6e5; background: #eef2f7; box-shadow: -8px 0 24px rgba(13,31,56,.1); transform: translateX(102%); transition: transform .24s ease; }
.has-preview-drawer .preview-drawer { transform: translateX(0); }
.preview-drawer__head { display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 15px 0 18px; border-bottom: 1px solid #d8e0eb; background: #fff; }
.preview-drawer__head > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }.preview-drawer__head span { color: var(--blue-600); font-size: .61rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.preview-drawer__head strong { max-width: 46vw; overflow: hidden; color: var(--navy-900); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.preview-drawer__head nav { display: flex; gap: 7px; }.preview-drawer__head a, .preview-drawer__head button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid #d6dfeb; border-radius: 8px; background: #fff; color: #52637b; font: 700 1rem/1 inherit; cursor: pointer; }.preview-drawer__head a:hover, .preview-drawer__head button:hover { border-color: #aebed4; background: #f5f8fc; color: var(--navy-900); }
.preview-tabs { display: flex !important; flex-direction: row !important; gap: 2px !important; padding: 3px; border-radius: 8px; background: #eef3f9; }.preview-tabs button { display: block; width: auto; min-width: 62px; height: 30px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: #68778c; font: 750 .66rem/1 inherit; cursor: pointer; }.preview-tabs .preview-tab--active { background: #fff; color: var(--blue-700); box-shadow: 0 2px 7px rgba(19,44,78,.12); }
.preview-drawer iframe { display: block; width: 100%; height: calc(100% - 58px); border: 0; background: white; }
.workspace, .topbar__inner { transition: width .24s ease, margin .24s ease; }
@media (min-width: 901px) {
    .has-preview-drawer .workspace { width: calc(42vw - 28px); margin-right: calc(58vw + 14px); margin-left: 14px; padding-top: 18px; }
    .has-preview-drawer .page-heading,
    .has-preview-drawer .filter-panel,
    .has-preview-drawer .metrics,
    .has-preview-drawer .breadcrumbs,
    .has-preview-drawer .batch-hero,
    .has-preview-drawer .batch-metrics,
    .has-preview-drawer .batch-info { display: none; }
    .has-preview-drawer .results { border-radius: 11px; box-shadow: 0 5px 18px rgba(20,39,70,.06); }
    .has-preview-drawer .results__head { padding: 15px 16px; }
    .has-preview-drawer .results__sort { display: none; }
    .has-preview-drawer .table-scroll { overflow: hidden; }
    .has-preview-drawer table { min-width: 0; table-layout: auto; }
    .has-preview-drawer .compare-hide { display: none; }
    .has-preview-drawer th, .has-preview-drawer td { padding: 11px 8px; }
    .has-preview-drawer th { font-size: .58rem; }
    .has-preview-drawer .invoice-cell { min-width: 0; gap: 7px; }
    .has-preview-drawer .supplier-avatar { width: 30px; height: 30px; }
    .has-preview-drawer .invoice-cell strong { max-width: 115px; font-size: .7rem; }
    .has-preview-drawer .invoice-cell small { max-width: 115px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .has-preview-drawer .date-value { white-space: nowrap; font-size: .68rem; }
    .has-preview-drawer .money--strong { white-space: nowrap; font-size: .69rem; }
    .has-preview-drawer .preview-button { justify-content: center; width: 31px; height: 31px; padding: 0; }
    .has-preview-drawer .preview-button span { display: none; }
    .has-preview-drawer .validation-button { width: 31px; padding: 0; overflow: hidden; font-size: 0; }
    .has-preview-drawer .validation-button--ai::after { content: "AI"; font-size: .58rem; }
    .has-preview-drawer .validation-button--human::after { content: "人"; font-size: .65rem; }
    .has-preview-drawer .row-actions { gap: 4px; }
    .has-preview-drawer .pagination { padding: 12px 14px; }
}
@media (max-width: 900px) {
    .preview-drawer { top: 0; width: 100vw; }
    .preview-drawer__head strong { max-width: 62vw; }
}
.email-page { margin: 0; min-height: 100vh; background: #f2f5fa; color: var(--ink); }
.email-stage { max-width: 1050px; margin: 34px auto; padding: 0 24px 60px; }
.email-card, .email-empty { background: #fff; border: 1px solid #dce4f0; border-radius: 18px; box-shadow: 0 18px 48px rgba(19,45,82,.09); overflow: hidden; }
.email-card > header { display: flex; align-items: flex-start; gap: 14px; padding: 25px 28px; border-bottom: 1px solid #e7edf6; }
.email-card h1 { margin: 0 0 7px; font-size: 1.2rem; }.email-card header p { margin: 0; color: #60708a; font-size: .85rem; }.email-card time { margin-left: auto; color: #7d8aa0; font-size: .78rem; white-space: nowrap; }
.mail-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #102849; color: #fff; font-weight: 800; }
.mail-meta { margin: 0; padding: 16px 28px; background: #f8faff; border-bottom: 1px solid #e7edf6; }.mail-meta div { display: grid; grid-template-columns: 105px 1fr; padding: 5px 0; font-size: .8rem; }.mail-meta dt { color: #7d8aa0; }.mail-meta dd { margin: 0; color: #33445e; word-break: break-all; }.mail-meta dd span { display: block; }
.mail-body { padding: 32px 38px 50px; font: .9rem/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; color: #27364d; white-space: normal; }.mail-note { font-family: inherit; color: #6f7c91; }
.email-empty { padding: 70px 30px; text-align: center; }.email-empty > span { font-size: 2rem; }.email-empty h1 { margin: 15px 0 8px; }.email-empty p { margin: 0 0 24px; color: #6f7c91; }
.language-page { min-height: 100vh; background: linear-gradient(145deg, #091426 0 42%, #f2f5f9 42%); }
.language-shell { width: min(920px, calc(100% - 40px)); margin: auto; padding: 42px 0 80px; }.language-shell > .brand { width: max-content; color: #fff; }
.language-card { max-width: 720px; margin: 90px auto 0; padding: 42px; border: 1px solid #dce4ef; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(7,20,39,.2); }.language-card h1 { margin: 0; color: var(--navy-900); font-size: 2rem; }.language-card > p:not(.eyebrow) { margin: 10px 0 30px; color: var(--slate-500); }
.language-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }.language-option { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 20px; border: 1px solid #d7e0ec; border-radius: 12px; cursor: pointer; transition: .16s; }.language-option:hover, .language-option--active { border-color: var(--blue-600); background: #f4f8ff; box-shadow: 0 0 0 3px rgba(36,104,221,.08); }.language-option input { position: absolute; top: 12px; right: 12px; accent-color: var(--blue-600); }.language-option span { color: var(--navy-900); font-size: 1rem; font-weight: 800; }.language-option small { color: var(--slate-500); }
.language-back { display: inline-block; margin-top: 25px; color: var(--blue-600); font-size: .76rem; font-weight: 700; }
@media (max-width: 620px) { .language-card { margin-top: 50px; padding: 28px 22px; }.language-options { grid-template-columns: 1fr; } }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state__icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 13px; border-radius: 13px; background: var(--slate-100); color: #8d9aab; }
.empty-state strong { display: block; color: var(--navy-900); font-size: .88rem; }
.empty-state p { margin: 7px 0 13px; color: var(--slate-500); }
.empty-state a { color: var(--blue-600); font-weight: 700; }

.pagination { display: flex; align-items: center; justify-content: space-between; padding: 15px 24px; border-top: 1px solid var(--slate-200); color: var(--slate-500); font-size: .7rem; }
.pagination > div { display: flex; gap: 7px; }
.pagination a, .pagination .disabled { display: inline-flex; gap: .35rem; align-items: center; padding: 7px 10px; border: 1px solid var(--slate-200); border-radius: 7px; background: white; color: var(--slate-700); font-weight: 650; }
.pagination a:hover { border-color: #b6c5dc; color: var(--blue-700); }
.pagination .disabled { opacity: .42; }

.login-page { min-height: 100vh; background: white; }
.login-shell { display: grid; grid-template-columns: minmax(420px, 46%) 1fr; min-height: 100vh; }
.login-brand { position: relative; overflow: hidden; background: var(--navy-950); color: white; }
.login-brand::before { content: ""; position: absolute; width: 620px; height: 620px; right: -330px; top: -240px; border: 1px solid rgba(96,145,221,.15); border-radius: 50%; box-shadow: 0 0 0 90px rgba(70,121,199,.035), 0 0 0 180px rgba(70,121,199,.025); }
.login-brand::after { content: ""; position: absolute; right: -60px; bottom: -120px; width: 420px; height: 420px; background: radial-gradient(circle, rgba(41,105,213,.24), transparent 68%); }
.login-brand__content { position: relative; z-index: 1; display: flex; flex-direction: column; width: min(100% - 80px, 570px); min-height: 100%; margin: auto; padding: 50px 0 38px; }
.brand--login { width: max-content; }
.login-brand__message { margin: auto 0; }
.login-brand__message .eyebrow { color: #6fa2f5; }
.login-brand__message h1 { margin: 0; font-size: clamp(2.5rem, 4.3vw, 4.2rem); line-height: 1.08; letter-spacing: -.055em; }
.login-brand__message > p:last-child { max-width: 440px; margin: 24px 0 0; color: #9eb0ca; font-size: .95rem; line-height: 1.8; }
.login-brand__footer { color: #687e9e; font-size: .58rem; font-weight: 700; letter-spacing: .15em; }
.login-form-panel { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-form-wrap { width: min(100%, 390px); }
.login-form-heading { margin-bottom: 32px; }
.login-form-heading .eyebrow { margin-bottom: 10px; }
.login-form-heading h2 { margin: 0; color: var(--navy-900); font-size: 1.75rem; letter-spacing: -.035em; }
.login-form-heading > p:last-child { margin: 9px 0 0; color: var(--slate-500); font-size: .86rem; }
.mobile-logo { display: none; }
.login-form { display: grid; gap: 19px; }
.login-form .form-field input { height: 48px; padding-left: 42px; }
.login-form .input-icon svg { top: 14px; }
.login-button { display: flex; align-items: center; justify-content: center; gap: .65rem; height: 49px; margin-top: 5px; border: 0; border-radius: 9px; background: var(--blue-600); color: white; font-size: .82rem; font-weight: 750; cursor: pointer; box-shadow: 0 8px 20px rgba(36,104,221,.22); }
.login-button:hover { background: var(--blue-700); }
.login-button svg { width: 1rem; transition: transform .15s; }
.login-button:hover svg { transform: translateX(2px); }
.login-alert { margin-bottom: 20px; padding: 11px 13px; border: 1px solid #f3c7c4; border-radius: 8px; background: #fff3f2; color: #a83832; font-size: .74rem; }
.login-help { margin: 22px 0 0; color: #98a4b4; font-size: .68rem; line-height: 1.55; text-align: center; }

.preview-page { height: 100vh; overflow: hidden; background: #2a3443; }
.preview-toolbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 22px; background: var(--navy-950); color: white; box-shadow: 0 4px 18px rgba(0,0,0,.28); }
.preview-toolbar__identity, .preview-toolbar__meta { display: flex; align-items: center; }
.preview-toolbar__identity { gap: 12px; }
.preview-back { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: #a9b8ce; }
.preview-back:hover { border-color: rgba(255,255,255,.3); color: white; }
.preview-toolbar__identity > div:last-child { display: flex; flex-direction: column; gap: 3px; }
.preview-toolbar__identity strong { max-width: 360px; overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.preview-toolbar__identity div span { color: #8fa1ba; font-size: .67rem; }
.preview-toolbar__meta { gap: 24px; }
.preview-toolbar__meta > span { display: flex; flex-direction: column; gap: 3px; color: #e2e9f3; font-size: .72rem; font-variant-numeric: tabular-nums; }
.preview-toolbar__meta small { color: #758aa7; font-size: .58rem; }
.preview-download { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: 8px; background: var(--blue-600); color: white; font-size: .7rem; font-weight: 750; }
.preview-download:hover { background: var(--blue-700); }
.preview-download svg { width: 1rem; }
.pdf-stage { height: calc(100vh - 72px); padding: 14px; }
.pdf-stage iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 5px; background: white; box-shadow: 0 8px 30px rgba(0,0,0,.24); }

.batch-workspace { padding-top: 28px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; color: #8996a8; font-size: .72rem; }
.breadcrumbs a { color: var(--blue-600); font-weight: 650; }
.breadcrumbs a:hover { text-decoration: underline; }
.batch-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 24px; }
.batch-hero__main { min-width: 0; }
.batch-hero h1 { max-width: 1000px; margin: 0; overflow-wrap: anywhere; color: var(--navy-900); font-size: clamp(1.75rem, 3.2vw, 2.55rem); line-height: 1.16; letter-spacing: -.045em; }
.batch-hero__meta { display: flex; align-items: center; gap: 12px; margin-top: 13px; color: var(--slate-500); font-size: .7rem; }
.batch-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; background: #eaf1ff; color: var(--blue-700); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.batch-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px currentColor; opacity: .65; }
.batch-status--completed { background: #e8f7f1; color: #107b59; }
.batch-status--failed, .batch-status--partially_failed { background: #fff0ef; color: #b43d36; }
.batch-status--needs_review { background: #fff4e4; color: #9d6416; }
.batch-filter-link { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 15px; border: 1px solid #bdcce3; border-radius: 9px; background: white; color: var(--blue-700); font-size: .73rem; font-weight: 750; box-shadow: 0 4px 12px rgba(20,39,70,.05); }
.batch-filter-link:hover { border-color: #8eabe0; background: var(--blue-100); }
.batch-filter-link svg { width: 1rem; }
.batch-alert { margin: -8px 0 20px; padding: 13px 16px; border: 1px solid #f0cf91; border-radius: 10px; background: #fff8e9; color: #8a5b13; font-size: .76rem; font-weight: 650; }
.batch-alert--error { border-color: #efb8b3; background: #fff1ef; color: #a83b34; }
.batch-metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.batch-metric { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--slate-200); border-radius: 12px; background: white; box-shadow: 0 5px 16px rgba(20,39,70,.045); }
.batch-metric__icon { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: #edf3fc; color: var(--blue-700); font-size: .9rem; font-weight: 850; }
.batch-metric__icon svg { width: 1.05rem; }
.batch-metric p { margin: 0 0 3px; overflow: hidden; color: var(--slate-500); font-size: .64rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.batch-metric strong { color: var(--navy-900); font-size: 1.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.batch-metric--success .batch-metric__icon { background: #e8f7f1; color: #10805d; }
.batch-metric--warning .batch-metric__icon { background: #fff4e4; color: #a66b18; }
.batch-metric--danger .batch-metric__icon { background: #fff0ef; color: #b43d36; }
.batch-info { margin-bottom: 20px; overflow: hidden; border: 1px solid var(--slate-200); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.batch-section-head { padding: 18px 22px; border-bottom: 1px solid var(--slate-200); }
.batch-section-head h2 { margin: 0; font-size: .92rem; }
.batch-section-head p { margin: 4px 0 0; color: var(--slate-500); font-size: .7rem; }
.batch-info__grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.batch-info__grid > div { min-width: 0; padding: 18px 22px; border-right: 1px solid var(--slate-200); }
.batch-info__grid > div:last-child { border-right: 0; }
.batch-info dt { margin-bottom: 7px; color: var(--slate-500); font-size: .63rem; font-weight: 750; }
.batch-info dd { margin: 0; overflow: hidden; color: var(--navy-800); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.batch-results { margin-bottom: 40px; }

.import-workspace { padding-top: 34px; }
.import-heading { align-items: center; }
.heading-action { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 15px; border: 1px solid #bdcce3; border-radius: 9px; background: white; color: var(--blue-700); font-size: .73rem; font-weight: 750; box-shadow: 0 4px 12px rgba(20,39,70,.05); }
.heading-action:hover { border-color: #8eabe0; background: var(--blue-100); }
.heading-action svg { width: 1rem; }
.import-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .75fr); gap: 18px; margin-bottom: 22px; }
.import-card, .pipeline-card { overflow: hidden; border: 1px solid var(--slate-200); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.import-card__head { display: flex; align-items: center; gap: 12px; padding: 19px 22px; border-bottom: 1px solid var(--slate-200); }
.import-card__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-100); color: var(--blue-700); }
.import-card__icon svg { width: 1.15rem; }
.import-card__head h2, .pipeline-card h2 { margin: 0; color: var(--navy-900); font-size: .95rem; }
.import-card__head p { margin: 4px 0 0; color: var(--slate-500); font-size: .69rem; }
.secure-badge { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 5px 8px; border-radius: 999px; background: #e8f7f1; color: #107b59; font-size: .62rem; font-weight: 750; }
.secure-badge i { width: 5px; height: 5px; border-radius: 50%; background: #16a276; }
.import-form { padding: 22px; }
.file-input { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.eml-dropzone { display: flex; align-items: center; gap: 15px; min-height: 150px; padding: 26px; border: 1.5px dashed #a9bad2; border-radius: 12px; background: #f8fbff; cursor: pointer; transition: .18s; }
.eml-dropzone:hover, .eml-dropzone.is-dragging, .file-input:focus + .eml-dropzone { border-color: var(--blue-600); background: #f0f5ff; box-shadow: 0 0 0 3px rgba(36,104,221,.09); }
.eml-dropzone__icon { display: grid; place-items: center; flex: 0 0 auto; width: 50px; height: 50px; border-radius: 13px; background: white; color: var(--blue-600); box-shadow: 0 5px 15px rgba(30,70,130,.09); }
.eml-dropzone__icon svg { width: 1.35rem; }
.eml-dropzone__copy { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.eml-dropzone__copy strong { color: var(--navy-900); font-size: .86rem; }
.eml-dropzone__copy > span { color: var(--slate-500); font-size: .72rem; }
.eml-dropzone__copy small { color: #99a5b5; font-size: .62rem; }
.eml-dropzone__button { flex: 0 0 auto; margin-left: auto; padding: 8px 11px; border: 1px solid #c3d0e3; border-radius: 7px; background: white; color: var(--blue-700); font-size: .67rem; font-weight: 750; }
.selected-file { display: flex; align-items: center; gap: 12px; min-height: 82px; padding: 14px; border: 1px solid #b9cae4; border-radius: 11px; background: #f5f8ff; }
.selected-file__type { display: grid; place-items: center; width: 43px; height: 48px; border-radius: 8px; background: var(--blue-600); color: white; font-size: .62rem; font-weight: 850; }
.selected-file > span:nth-child(2) { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.selected-file strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.selected-file small { color: var(--green); font-size: .62rem; }
.selected-file button { border: 0; background: transparent; color: #8996a8; font-size: 1.2rem; cursor: pointer; }
.import-form__footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; }
.import-form__footer p { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--slate-500); font-size: .66rem; }
.import-form__footer p svg { flex: 0 0 auto; width: .95rem; color: var(--blue-600); }
.import-submit { flex: 0 0 auto; margin: 0; }
.pipeline-card { padding: 22px; background: linear-gradient(145deg, var(--navy-950), #142a49); color: white; }
.pipeline-card__head .eyebrow { color: #6fa2f5; }
.pipeline-card h2 { color: white; }
.pipeline { position: relative; display: grid; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; }
.pipeline::before { content: ""; position: absolute; top: 17px; bottom: 17px; left: 16px; width: 1px; background: rgba(142,171,214,.22); }
.pipeline li { position: relative; display: flex; align-items: center; gap: 13px; min-height: 59px; }
.pipeline li > span { z-index: 1; display: grid; place-items: center; flex: 0 0 auto; width: 33px; height: 33px; border: 1px solid rgba(121,161,222,.32); border-radius: 9px; background: #142844; color: #77a8f3; font-size: .58rem; font-weight: 800; }
.pipeline li div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.pipeline li strong { font-size: .72rem; }
.pipeline li small { overflow: hidden; color: #8498b5; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.import-history { margin-bottom: 40px; }
.history-count { color: var(--slate-500); font-size: .67rem; }
.batch-name-cell { display: flex; align-items: center; gap: 10px; min-width: 280px; }
.batch-file-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; background: #edf3fc; color: var(--blue-700); }
.batch-file-icon svg { width: 1rem; }
.batch-name-cell strong { display: block; max-width: 390px; overflow: hidden; color: var(--navy-900); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.batch-name-cell small { display: block; margin-top: 4px; color: #92a0b2; font-size: .61rem; }
.count-value { color: var(--slate-700); }
.count-value--strong { color: var(--navy-900); font-weight: 800; }
.row-arrow { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--slate-200); border-radius: 7px; color: var(--blue-700); font-size: .9rem; }
.row-arrow:hover { border-color: #9eb5db; background: var(--blue-100); }

@media (max-width: 1100px) {
    .advanced__body { grid-template-columns: 1fr 1fr; }
    .filter-primary { grid-template-columns: 2fr 1fr; }
    .metrics { grid-template-columns: 1fr 1fr; }
    .batch-metrics { grid-template-columns: repeat(3, 1fr); }
    .batch-info__grid { grid-template-columns: 1fr 1fr; }
    .batch-info__grid > div:nth-child(2) { border-right: 0; }
    .batch-info__grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--slate-200); }
    .import-grid { grid-template-columns: 1fr; }
    .pipeline { grid-template-columns: 1fr 1fr; column-gap: 20px; }
    .pipeline::before { display: none; }
}

@media (max-width: 720px) {
    .topbar { height: 64px; }
    .topbar__inner, .workspace { width: min(100% - 28px, 1500px); }
    .brand { min-width: 0; }
    .brand__copy, .user-menu__name, .nav__link span { display: none; }
    .nav { margin-left: auto; }
    .nav__link { padding: 0 .85rem; }
    .workspace { padding-top: 26px; }
    .page-heading { align-items: flex-start; }
    .page-heading__meta { display: none; }
    .filter-primary, .advanced__body { grid-template-columns: 1fr; }
    .filter-primary { gap: 13px; padding: 18px; }
    .filter-panel__head, .results__head { padding: 18px; }
    .advanced summary, .filter-actions { padding-right: 18px; padding-left: 18px; }
    .advanced summary small { display: none; }
    .advanced__body { padding: 18px; }
    .metrics { gap: 10px; }
    .metric { align-items: flex-start; padding: 15px; }
    .metric__icon { width: 35px; height: 35px; }
    .metric strong { font-size: 1.05rem; }
    .metric small { display: block; margin: 2px 0 0; }
    .results__sort { display: none; }
    .batch-hero { display: block; }
    .batch-filter-link { margin-top: 18px; }
    .batch-metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
    .batch-metric { padding: 13px; }
    .batch-info__grid { grid-template-columns: 1fr; }
    .batch-info__grid > div { border-right: 0; border-bottom: 1px solid var(--slate-200); }
    .batch-info__grid > div:last-child { border-bottom: 0; }
    .import-heading { display: block; }
    .heading-action { margin-top: 18px; }
    .import-card__head, .import-form, .pipeline-card { padding: 18px; }
    .eml-dropzone { align-items: flex-start; min-height: 180px; padding: 20px; }
    .eml-dropzone__button { display: none; }
    .import-form__footer { align-items: stretch; flex-direction: column; }
    .import-submit { width: 100%; justify-content: center; }
    .pipeline { grid-template-columns: 1fr; }
    .preview-toolbar { height: 64px; padding: 0 12px; }
    .preview-toolbar .brand__mark, .preview-toolbar__meta > span { display: none; }
    .preview-toolbar__identity strong { max-width: 145px; }
    .pdf-stage { height: calc(100vh - 64px); padding: 7px; }
}

@media (max-width: 850px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .login-form-panel { min-height: 100vh; padding: 28px; background: var(--canvas); }
    .login-form-wrap { padding: 30px 24px; border: 1px solid var(--slate-200); border-radius: 16px; background: white; box-shadow: var(--shadow); }
    .mobile-logo { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 24px; border-radius: 11px; background: var(--navy-950); color: white; font-weight: 850; }
}

@media (max-width: 460px) {
    .metrics { grid-template-columns: 1fr; }
    .metric { align-items: center; }
    .metric small { display: inline; margin-left: .2rem; }
    .filter-actions p { display: none; }
    .primary-button { width: 100%; justify-content: center; }
    .pagination > span { display: none; }
    .pagination { justify-content: center; }
}

.import-processing[hidden] { display: none; }
.import-processing { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(6, 20, 39, .38); backdrop-filter: blur(4px); }
.import-processing__card { width: min(360px, 92vw); padding: 30px 28px 27px; border: 1px solid rgba(255,255,255,.7); border-radius: 18px; background: rgba(255,255,255,.97); box-shadow: 0 24px 70px rgba(8,27,52,.25); text-align: center; }
.import-processing__card strong { display: block; margin-top: 17px; color: var(--navy-900); font-size: 1rem; }
.import-processing__card p { margin: 8px 0 0; color: var(--slate-500); font-size: .75rem; line-height: 1.55; }
.import-processing__file { display: block; max-width: 100%; margin-top: 13px; overflow: hidden; color: var(--blue-700); font-size: .69rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.import-processing__spinner { position: relative; display: inline-block; width: 54px; height: 54px; }
.import-processing__spinner i { position: absolute; inset: 0; border: 3px solid transparent; border-top-color: var(--blue-600); border-radius: 50%; animation: import-spin 1s linear infinite; }
.import-processing__spinner i:nth-child(2) { inset: 8px; border-top-color: #16a276; animation-duration: .72s; animation-direction: reverse; }
.import-processing__spinner i:nth-child(3) { inset: 17px; border-width: 4px; border-top-color: #7c5ce7; animation-duration: .52s; }
@keyframes import-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .import-processing__spinner i { animation: none; border-color: #d9e4f3; border-top-color: var(--blue-600); } }
.batch-failures { margin-bottom: 24px; border-color: #efc7c2; }
.batch-failures .results__head { background: #fff9f8; }
.failure-count { color: #b54840; font-size: .75rem; font-weight: 750; }
.failed-file { min-width: 360px; }
.failed-file strong, .failed-file small { display: block; }
.failed-file small { max-width: 620px; margin-top: 5px; color: #7183a1; overflow-wrap: anywhere; }
.failure-reason { min-width: 260px; color: #a33d37; font-weight: 650; }

.selection-scope{display:flex;align-items:center;gap:8px;padding:9px 14px;border-top:1px solid #e7edf5;background:#f8faff;color:#68778d;font-size:.72rem}.selection-scope button{padding:0;border:0;background:none;color:#1f65c7;font:750 .72rem/1 inherit;cursor:pointer}.selection-scope [data-selection-active]{color:#155f49;font-weight:700}.selection-scope [data-selection-active] button{margin-left:8px;color:#a33a32}.job-progress{margin:10px 14px;padding:12px 14px;border:1px solid #cbdcf5;border-radius:10px;background:#f4f8ff}.job-progress>div{display:flex;justify-content:space-between;margin-bottom:8px;color:#34506f;font-size:.72rem}.job-progress progress{display:block;width:100%;height:8px;accent-color:var(--blue-600)}
.undo-dialog{width:min(420px,calc(100% - 32px));padding:26px;border:0;border-radius:16px;background:#fff;color:#17243a;box-shadow:0 24px 70px rgba(10,28,55,.28);text-align:center}.undo-dialog::backdrop{background:rgba(10,24,45,.48);backdrop-filter:blur(2px)}.undo-dialog__icon{display:grid;place-items:center;width:48px;height:48px;margin:0 auto 14px;border-radius:14px;background:#fff0ee;color:#b64036;font-size:1.45rem;font-weight:800}.undo-dialog h2{margin:0 0 8px;font-size:1.2rem}.undo-dialog p{margin:0 auto 22px;color:#6a788c;font-size:.86rem;line-height:1.55}.undo-dialog>div:last-child{display:flex;justify-content:center;gap:9px}.undo-dialog button{min-height:40px;padding:0 16px;border-radius:9px;font-weight:800;cursor:pointer}.undo-dialog__cancel{border:1px solid #d5deea;background:#fff;color:#46566d}.undo-dialog__confirm{border:0;background:#b64036;color:#fff}.undo-dialog__confirm:hover{background:#9f332b}

.export-ready{display:flex!important;align-items:center;justify-content:space-between;margin:10px 0 0!important;padding-top:10px;border-top:1px solid #d8e4f5}.export-ready[hidden]{display:none!important}.export-download{display:inline-flex;align-items:center;min-height:34px;padding:0 13px;border-radius:8px;background:var(--blue-600);color:#fff!important;font-weight:750;text-decoration:none;box-shadow:0 5px 12px rgba(36,104,221,.18)}

.export-dialog{width:min(520px,calc(100vw - 28px));padding:0;border:0;border-radius:20px;background:#fff;color:#14233b;box-shadow:0 28px 80px rgba(15,35,70,.28)}.export-dialog::backdrop{background:rgba(13,27,49,.48);backdrop-filter:blur(3px)}.export-dialog__head{display:flex;justify-content:space-between;gap:20px;padding:24px 26px 16px}.export-dialog__head h2{margin:0 0 7px;font-size:1.25rem}.export-dialog__head p{margin:0;color:#718097;font-size:.78rem;line-height:1.55}.export-dialog__head>button{width:34px;height:34px;border:0;border-radius:9px;background:#f2f5fa;color:#66758b;font-size:1.35rem;cursor:pointer}.export-card-list{display:grid;gap:9px;padding:4px 26px}.export-card{display:grid;grid-template-columns:24px 38px 1fr 22px;align-items:center;gap:10px;min-height:58px;padding:8px 14px;border:1px solid #dbe4f0;border-radius:13px;background:#fff;box-shadow:0 3px 10px rgba(24,54,92,.05);cursor:grab;transition:.15s}.export-card:hover{border-color:#9dbbe8;transform:translateY(-1px)}.export-card.is-dragging{opacity:.5;box-shadow:0 10px 24px rgba(25,76,151,.18)}.export-card--off{opacity:.48;background:#f5f7fa}.export-card__handle{color:#9ba8ba;font-weight:900;letter-spacing:-4px}.export-card__icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#eaf2ff;color:#2265c7;font-weight:800}.export-card__icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.export-card input{width:18px;height:18px;accent-color:#2468dd}.export-folder-preview{margin:16px 26px;padding:12px 14px;border-radius:11px;background:#f3f7fd}.export-folder-preview span{display:block;margin-bottom:5px;color:#7b889b;font-size:.66rem;text-transform:uppercase}.export-folder-preview strong{color:#34506f;font-size:.78rem}.export-dialog__actions{display:flex;justify-content:flex-end;gap:9px;padding:0 26px 24px}.export-dialog__actions button{min-height:40px;padding:0 17px;border-radius:10px;font-weight:750;cursor:pointer}.export-dialog__cancel{border:1px solid #d8e0eb;background:#fff;color:#65748a}.export-dialog__confirm{border:0;background:#2468dd;color:#fff;box-shadow:0 7px 16px rgba(36,104,221,.23)}

.import-progress-card{margin:0 0 18px;padding:20px 22px;border:1px solid #cfddf1;border-radius:16px;background:linear-gradient(135deg,#fff 0%,#f5f9ff 100%);box-shadow:0 10px 28px rgba(33,76,139,.08)}.import-progress-card__top{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.import-progress-card__eyebrow{color:#2368d9;font-size:.65rem;font-weight:850;letter-spacing:.09em;text-transform:uppercase}.import-progress-card h2{margin:5px 0 4px;font-size:1rem}.import-progress-card p{margin:0;color:#74839a;font-size:.72rem}.import-progress-card__top>strong{color:#2368d9;font-size:1.4rem}.import-progress-card progress{display:block;width:100%;height:9px;margin:16px 0 17px;border:0;border-radius:99px;overflow:hidden;accent-color:#2468dd}.import-progress-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:0;padding:0;list-style:none}.import-progress-steps li{display:flex;align-items:center;gap:7px;color:#9aa6b7;font-size:.67rem;font-weight:700}.import-progress-steps i{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#e8edf4;color:#8795a8;font-style:normal}.import-progress-steps li.is-current{color:#2468dd}.import-progress-steps li.is-current i{background:#2468dd;color:#fff;box-shadow:0 4px 10px rgba(36,104,221,.25)}.import-progress-steps li.is-done{color:#31846b}.import-progress-steps li.is-done i{background:#daf3ea;color:#208064}.import-progress-card__counts{margin-top:13px;color:#62738c;font-size:.69rem;text-align:right}@media(max-width:700px){.import-progress-steps{grid-template-columns:1fr 1fr}.import-progress-card__top{align-items:center}.import-progress-card p{display:none}}

.manual-entry-dialog{width:min(650px,calc(100vw - 24px));height:min(510px,calc(100vh - 32px));padding:0;border:0;border-radius:18px;background:#fff;box-shadow:0 28px 80px rgba(15,35,70,.3);overflow:hidden}.manual-entry-dialog::backdrop{background:rgba(13,27,49,.48);backdrop-filter:blur(3px)}.manual-entry-dialog__bar{display:flex;align-items:center;justify-content:space-between;height:52px;padding:0 15px 0 22px;border-bottom:1px solid #e7edf5;background:#f8faff}.manual-entry-dialog__bar strong{font-size:.82rem}.manual-entry-dialog__bar button{width:32px;height:32px;border:0;border-radius:8px;background:#eaf0f8;color:#62738a;font-size:1.25rem;cursor:pointer}.manual-entry-dialog iframe{display:block;width:100%;height:calc(100% - 52px);border:0;background:#fff}

.pending-invoice-row{background:#fffdf8}.supplier-avatar--pending{width:38px;border-radius:9px;background:#fff0d8;color:#a76513;font-size:.58rem}.pending-invoice-row .invoice-cell strong{max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.post-undo-actions[hidden]{display:none!important}

.batch-hero-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.batch-hero-actions form{margin:0}.batch-action{min-height:40px;padding:0 13px;border-radius:9px;background:#fff;font:750 .7rem/1 inherit;cursor:pointer}.batch-action--reparse{border:1px solid #b9ceed;color:#2565bd}.batch-action--undo{border:1px solid #efc3bd;color:#ad4037}.import-undo-dialog{width:min(440px,calc(100vw - 28px));padding:26px;border:0;border-radius:18px;text-align:center;color:#17253c;box-shadow:0 28px 80px rgba(15,35,70,.3)}.import-undo-dialog::backdrop{background:rgba(13,27,49,.5);backdrop-filter:blur(3px)}.import-undo-dialog__icon{display:grid;place-items:center;width:48px;height:48px;margin:0 auto 13px;border-radius:50%;background:#fff0ed;color:#b14338;font-size:1.35rem}.import-undo-dialog h2{margin:0 0 9px;font-size:1.15rem}.import-undo-dialog p{margin:0;color:#697990;font-size:.76rem;line-height:1.6}.import-undo-dialog form>div{display:flex;justify-content:center;gap:9px;margin-top:20px}.import-undo-dialog button{min-height:40px;padding:0 15px;border-radius:9px;font-weight:750;cursor:pointer}.import-undo-cancel{border:1px solid #d4deea;background:#fff;color:#586a82}.import-undo-confirm{border:0;background:#b7443a;color:#fff}

.row-actions>.preview-button,.row-actions .validation-button{box-sizing:border-box;height:32px;min-height:32px;display:inline-flex;align-items:center;justify-content:center;line-height:1}.row-actions .validation-form{display:flex;align-items:center}.row-actions .manual-review-link{vertical-align:middle}


.validation-dashboard{margin:20px 0;padding:22px;border:1px solid var(--slate-200);border-radius:16px;background:#fff;box-shadow:var(--shadow)}
.validation-dashboard__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.validation-dashboard__head .eyebrow{margin:0 0 4px}.validation-dashboard__head h2{margin:0;color:var(--navy-900);font-size:1.05rem}
.validation-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.validation-stat{display:flex;align-items:center;justify-content:space-between;min-height:68px;padding:14px 16px;border:1px solid #dfe7f1;border-radius:12px;background:#f8fafc;color:#40516a;text-decoration:none;transition:.15s}.validation-stat:hover{transform:translateY(-1px);border-color:#aac4ee;box-shadow:0 8px 22px rgba(30,69,128,.09)}.validation-stat span{font-size:.74rem;font-weight:750}.validation-stat strong{font-size:1.35rem;color:#172b49}.validation-stat--unverified{background:#f4f7fb}.validation-stat--invalid_data{background:#fff5f3;border-color:#f5d4cf}.validation-stat--ai_verified{background:#edf5ff;border-color:#cbdfff}.validation-stat--human_verified{background:#eefaf5;border-color:#ccebdc}.validation-stat.is-active{border-color:#2368dc;box-shadow:0 0 0 2px rgba(35,104,220,.14)}
.validation-breakdown{display:grid;grid-template-columns:155px 1fr;gap:14px;align-items:start;margin-top:16px;padding-top:16px;border-top:1px solid #e7edf5}.validation-breakdown h3{margin:8px 0 0;color:#66758b;font-size:.72rem;text-transform:uppercase;letter-spacing:.06em}.validation-pills{display:flex;flex-wrap:wrap;gap:8px}.validation-pill{display:inline-flex;align-items:center;gap:9px;min-height:36px;padding:0 10px 0 13px;border:1px solid #d8e2ef;border-radius:999px;background:#fff;color:#40516a;text-decoration:none;font-size:.72rem;font-weight:700}.validation-pill strong{display:grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:#e9f1ff;color:#1859c9}.validation-pill:hover,.validation-pill.is-active{border-color:#72a0e8;background:#f3f7ff}.validation-pill--undo strong{background:#fff0ed;color:#b54338}.validation-pill--undo:hover,.validation-pill--undo.is-active{border-color:#e7a69e;background:#fff7f5}
@media(max-width:900px){.validation-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.validation-breakdown{grid-template-columns:1fr;gap:8px}}@media(max-width:520px){.validation-status-grid{grid-template-columns:1fr}}

.validator-name a{color:#2467c7;font-weight:750;text-decoration:none}.validator-name a:hover{text-decoration:underline}.validator-name--undo{color:#a34a40}.validator-name--undo a{color:#a34a40}.view-only-badge{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border:1px solid #d9e1ec;border-radius:999px;background:#f6f8fb;color:#77859a;font-size:.62rem;font-weight:700}
