:root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1d2b42;
    background: #f3f5f9;
    line-height: 1.6;
    font-size: 15px;
    --navy: #16243b;
    --blue: #245fce;
    --blue-hover: #1b4da9;
    --blue-soft: #edf3ff;
    --muted: #58677d;
    --border: #dce3ed;
    --surface: #fff;
    --shadow: 0 4px 18px rgb(22 36 59 / 4%);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #2059bf; text-underline-offset: 4px; }
a:hover { color: #153f8c; }
p { margin: 0 0 16px; }
strong { font-weight: 650; }
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 84px;
    padding: 16px 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.brand-lockup { display: flex; align-items: center; gap: 24px; }
.brand { text-decoration: none; color: var(--navy); font-weight: 800; font-size: 25px; letter-spacing: -1.1px; white-space: nowrap; }
.brand:hover { color: var(--navy); }
.brand span { color: var(--blue); }
.tag { border-left: 1px solid var(--border); padding-left: 24px; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.shell { display: flex; max-width: 1680px; min-height: calc(100vh - 160px); margin: auto; }
.sidebar {
    width: 250px;
    flex-shrink: 0;
    align-self: stretch;
    background: var(--navy);
    padding: 28px 16px;
    color: #e9eff8;
}
.sidebar-inner { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
.sidebar summary { color: #b9c8df; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; padding: 8px 12px 20px; }
.sidebar-links { display: grid; gap: 6px; }
.sidebar a { display: block; padding: 13px 14px; border: 1px solid transparent; border-radius: 10px; color: #d2ddef; text-decoration: none; font-size: 13px; font-weight: 550; }
.sidebar a:hover { background: #223653; color: #fff; }
.sidebar a[aria-current] { background: #294c82; border-color: #4269a2; color: #fff; box-shadow: inset 3px 0 0 #9fc4ff; }
.sidebar-account { margin: 36px 12px 0; padding-top: 20px; border-top: 1px solid #34445d; overflow-wrap: anywhere; }
.sidebar-account span { display: block; color: #b9c8df; font-size: 12px; }
.sidebar-account strong { font-size: 13px; }
main { min-width: 0; flex: 1; padding: 28px 40px 48px; max-width: 1280px; margin: 0 auto; }
.public-page main { max-width: 1200px; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; }
h1 { font-size: clamp(28px, 3vw, 36px); font-weight: 750; letter-spacing: -1.15px; margin: 8px 0 18px; }
h2 { font-size: 21px; letter-spacing: -.45px; margin: 0 0 16px; }
h3 { font-size: 17px; letter-spacing: -.2px; margin: 0 0 12px; }
section { margin-bottom: 28px; }
section[id], div[id] { scroll-margin-top: 24px; }
.eyebrow { font-size: 10px; font-weight: 750; letter-spacing: 1.6px; color: #46658d; margin: 0 0 10px; }
.page-heading { margin: 8px 0 28px; }
.page-heading h1 { margin-bottom: 12px; }
.page-description { max-width: 680px; color: var(--muted); margin-bottom: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 36px 0 20px; }
.section-heading h2 { margin-bottom: 8px; }
.section-heading p:last-child { margin-bottom: 0; }
.hero { padding: 64px 48px; margin: 24px 0 48px; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(120deg, #fff, #eaf0fa); }
.hero h1 { font-size: clamp(38px, 6vw, 68px); max-width: 850px; letter-spacing: -2.5px; }
.lead { font-size: 19px; max-width: 700px; color: var(--muted); margin: 24px 0 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 20px; margin: 20px 0 28px; }
.grid > * { min-width: 0; }
.grid > section { margin-bottom: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card .card { box-shadow: none; background: #fafbfe; border-radius: 12px; }
.narrow { max-width: 480px; margin: 56px auto; }
.auth-card { padding: 36px; border-top: 4px solid var(--blue); box-shadow: 0 16px 48px rgb(22 36 59 / 8%); }
.auth-card h1 { font-size: 30px; }
.auth-card form { margin: 28px 0 20px; }
.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--blue);
    color: white;
    padding: 11px 18px;
    text-decoration: none;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    transition: background-color 150ms, border-color 150ms, box-shadow 150ms;
}
button:hover, .button:hover { background: var(--blue-hover); color: #fff; box-shadow: 0 3px 8px rgb(36 95 206 / 14%); }
.secondary { background: #fff; color: #31435f; border-color: #cbd5e3; }
.secondary:hover { background: var(--blue-soft); color: #194b9f; border-color: #a8bcdd; box-shadow: none; }
input, select, textarea { display: block; width: 100%; min-width: 0; min-height: 44px; font: inherit; padding: 11px 13px; border: 1px solid #b8c4d6; border-radius: 10px; background: #fff; color: var(--navy); }
input::placeholder, textarea::placeholder { color: #6b7890; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #8297b8; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
textarea { resize: vertical; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
input[type="checkbox"], input[type="radio"] { display: inline-block; width: 18px; height: 18px; min-height: 18px; margin: 0 8px 0 0; vertical-align: middle; accent-color: var(--blue); flex: none; }
.stack { display: grid; gap: 10px; }
.stack > label:not(:first-child) { margin-top: 8px; }
.stack > button { margin-top: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.full { grid-column: 1 / -1; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.row h2, .row h3 { margin-bottom: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.toolbar form { display: flex; gap: 8px; flex: 1; max-width: 540px; }
.toolbar input { font-size: 13px; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; }
.filters > div { flex: 1; min-width: min(100%, 180px); }
.metric { font-size: 42px; font-weight: 700; line-height: 1.15; letter-spacing: -1.7px; font-variant-numeric: tabular-nums; }
.metric-card { border-top: 3px solid #8bafea; }
.metric-card .metric { display: block; color: #214e92; margin: 20px 0 12px; }
.metric-card > p:first-child { font-weight: 600; color: #53647f; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 5px 10px; background: #eef2f8; border: 1px solid #dce4f0; color: #425673; border-radius: 999px; }
.notice, .error { padding: 16px 20px; margin: 16px 0 24px; border-radius: 12px; }
.notice { background: #edf3ff; border: 1px solid #a9c1ed; color: #214e92; }
.error { background: #fff1f1; border: 1px solid #dbabae; color: #8b2630; }
.error ul { margin-bottom: 0; }
dt { font-weight: 650; font-size: 12px; color: #53647f; }
dd { margin: 3px 0 18px; color: var(--navy); white-space: pre-wrap; }
dl:last-child dd:last-child { margin-bottom: 0; }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; color: #2a4e83; }
main details { margin-block: 12px; }
main details[open] > summary { margin-bottom: 12px; }
.timeline { list-style: none; padding-left: 12px; }
.timeline li { position: relative; padding: 0 0 24px 24px; border-left: 2px solid #dce5f3; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #527dbb; box-shadow: 0 0 0 1px #9db5d8; }
.timeline p { margin: 6px 0; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding: 24px; font-size: 13px; color: var(--muted); }
footer { text-align: center; padding: 24px; color: var(--muted); font-size: 11px; }
.skip, .sr-only { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: white; z-index: 10; padding: 12px; }
:focus-visible { outline: 3px solid #709be2; outline-offset: 3px; }
main:focus { outline: none; }
.permission { display: flex; gap: 12px; align-items: center; padding: 10px; background: #f6f8fc; border-radius: 8px; }
.permission input { width: 18px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
code { font-size: .9em; color: #34517e; overflow-wrap: anywhere; }
fieldset { min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
legend { padding: 0 8px; font-weight: 600; }
table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; margin: 16px 0; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #edf2f9; color: #364e70; font-weight: 650; }
tbody tr:nth-child(even) { background: #f9fbfe; }
.section-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: 20px 0 28px; border: 1px solid var(--border); border-radius: 12px; background: #e9eef6; }
.section-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border-radius: 8px; text-decoration: none; font-size: 12px; font-weight: 600; color: #4b5f7e; }
.section-tabs a:hover { background: #f7f9fd; }
.section-tabs a[aria-current] { background: #fff; color: #214e92; box-shadow: 0 1px 5px rgb(22 36 59 / 8%); }
.action-card { position: relative; display: flex; align-items: flex-start; flex-direction: column; border-top: 3px solid #8bafea; margin-bottom: 0; }
.action-card > p:not(.eyebrow) { color: var(--muted); flex: 1; }
.action-card .button { margin-top: 6px; }
.text-action { display: inline-block; margin-top: 16px; font-size: 12px; }
.operation > .row { margin-bottom: 18px; }
.partner-name { font-size: 16px; font-weight: 600; margin: 18px 0 24px; }
.card-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; font-size: 13px; padding-top: 20px; border-top: 1px solid var(--border); }
.dossier-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.dossier-card { max-width: 100%; }
.dossier-card .row { align-items: flex-start; }
.empty-state { color: var(--muted); padding: 32px; }
.attention-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; margin-bottom: 20px; }
.attention-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; background: #fafbfe; font-size: 13px; }
.attention-item:hover { border-color: #a7bde0; background: var(--blue-soft); }
.attention-count { border-radius: 8px; background: #e8effb; color: #214e92; min-width: 32px; padding: 3px 8px; text-align: center; font-variant-numeric: tabular-nums; }
.quote-total { display: block; font-size: clamp(20px, 3vw, 32px); line-height: 1.3; }
.contribution-bar { margin-block: 12px; }
.contribution-bar label { display: block; overflow-wrap: anywhere; }
.contribution-bar meter { display: block; width: 100%; height: 24px; accent-color: var(--blue); }
.upload-panel { border: 1px solid #c4d4ed; border-radius: 14px; padding: 24px; margin-block: 24px; background: #f3f7fe; }
.upload-panel h3 { color: #214e92; }
.upload-panel > p { color: var(--muted); }
.steps { display: flex; flex-wrap: wrap; gap: 16px 24px; list-style: none; counter-reset: upload-step; padding: 20px 24px; margin: 24px 0; background: #e9eff8; border: 1px solid var(--border); border-radius: 14px; }
.steps li { counter-increment: upload-step; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: #40577b; flex: 1; }
.steps li::before { content: counter(upload-step); display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; background: #fff; color: #214e92; border: 1px solid #c0cfe5; border-radius: 50%; }
.import-layout { display: grid; grid-template-columns: 1.1fr 1fr; align-items: start; gap: 24px; }
.import-layout > section { margin-bottom: 0; }
.import-history-heading { margin-top: 32px; }
.import-layout .upload-panel { margin-top: 0; }
.import-layout td:first-child code { white-space: nowrap; overflow-wrap: normal; }
input[type="file"] { width: 100%; max-width: 100%; padding: 16px; border: 1px dashed #819dc7; background: #fff; font-size: 13px; }
input[type="file"]::file-selector-button { padding: 9px 12px; margin: 0 12px 8px 0; border: 1px solid #c4d4ed; border-radius: 7px; background: var(--blue-soft); color: #214e92; font: inherit; font-weight: 600; cursor: pointer; }
[data-file-feedback] { overflow-wrap: anywhere; font-size: 13px; color: #214e92; }
[data-file-feedback]:empty { display: none; }
[data-upload-status] { padding: 12px; border-radius: 8px; background: #e5edfc; color: #214e92; font-size: 13px; }
[data-upload-form] button:disabled { opacity: .65; cursor: wait; }
@media (min-width: 1680px) { .shell { border-inline: 1px solid var(--border); } }
@media (max-width: 1100px) {
    .sidebar { width: 220px; padding-inline: 12px; }
    main { padding-inline: 28px; }
    .import-layout { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
    .app-header { min-height: 72px; padding: 14px 16px; gap: 12px; }
    .brand { font-size: 21px; }
    .tag { display: none; }
    .app-header button, .app-header .button { padding-inline: 12px; font-size: 12px; }
    .shell { display: block; }
    .sidebar { width: 100%; padding: 10px 16px; }
    .sidebar-inner { position: static; max-height: none; overflow: visible; }
    .sidebar summary { padding: 12px 0; }
    .sidebar-links { grid-template-columns: 1fr 1fr; padding-bottom: 12px; }
    .sidebar a { padding: 12px; font-size: 12px; }
    .sidebar-account { display: none; }
    main { padding: 24px 20px 40px; }
    h1 { font-size: 28px; letter-spacing: -.8px; }
    .form-grid { grid-template-columns: 1fr; }
    .toolbar { align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 28px; padding-bottom: 20px; }
    .toolbar form { width: 100%; max-width: none; }
    .toolbar input { flex: 1; width: 0; }
    .toolbar .button { width: 100%; }
    .hero { padding: 32px 24px; }
    .hero h1 { letter-spacing: -1.5px; }
    .card { padding: 22px; border-radius: 14px; }
    .narrow { margin: 28px auto; }
    .auth-card { padding: 28px 24px; }
    .grid { gap: 16px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .section-tabs { gap: 4px; }
    .section-tabs a { flex: 1 1 auto; text-align: center; }
    .upload-panel { padding: 20px; }
    .steps { flex-direction: column; padding: 18px 20px; }
    .filters > button { width: 100%; }
    .pagination { gap: 12px; padding-inline: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
