/* Pactcheq public asset */
/* Pactcheq design tokens (build document 7.1) */
:root {
    --navy: #0E1B2C;
    --bg: #F4F6F8;
    --card: #FFFFFF;
    --border: #E3E7EC;
    --border-soft: #EEF1F4;
    --input-border: #CBD2DB;
    --control-border: #B9C1CC;
    --brand-green: #1F9D6B;
    --green: #17805A;
    --green-hover: #0F5E41;
    --green-text: #0F6B49;
    --green-soft: #E7F4ED;
    --orange: #8A4708;
    --orange-soft: #FDF1E3;
    --orange-row: #FFFAF3;
    --red: #B42318;
    --red-soft: #FDECEA;
    --blue: #1D4ED8;
    --blue-soft: #E8EEFD;
    --text-2: #4A5563;
    --text-3: #33404F;
    --radius-card: 0.75rem;
    --radius-input: 0.375rem;
    --focus: 0 0 0 0.1875rem rgba(23, 128, 90, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }

/* Keep mobile at the browser’s normal size; use a denser scale on mouse-driven desktops. */
html { font-size: 100%; background: var(--bg); }
html.public-document { font-size: 100%; background: #fff; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html.public-document { scroll-behavior: auto; } }
@media (min-width: 64rem) and (hover: hover) and (pointer: fine) {
    html:not(.public-document) { font-size: 90%; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--navy);
    font-family: Poppins, system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.45;
}

a { color: var(--green); }
a:hover { color: var(--green-hover); }

h1, h2, h3 { margin: 0; }
h1 { font-size: 1.875rem; font-weight: 500; }
h2 { font-size: 1.125rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }

p { margin: 0; }

.muted { color: var(--text-2); }
.small { font-size: 0.8125rem; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
/* Link-style action inside tables and lists. */
.link-button { min-height: 2.25rem; padding: 0 0.5rem; background: none; border: none; color: var(--text-2); font-size: 0.8125rem; font-weight: 500; cursor: pointer; border-radius: 0.375rem; }
.link-button:hover { color: var(--navy); background: var(--bg); }
.link-button.danger:hover { color: var(--red); background: var(--red-soft); }

.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.625rem; }
.row { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.row > .grow { flex: 999 1 32.5rem; min-width: 0; }
.row > .side { flex: 1 1 20rem; min-width: 0; }
.inline { display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: center; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: 1.375rem 1rem; }

/* Plain tables inside DataTable */
table.data { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.data th { text-align: left; color: var(--text-2); font-size: 0.8125rem; font-weight: 500; padding: 0.75rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 1rem 0.75rem; border-top: 1px solid var(--border-soft); vertical-align: middle; }
table.data .num { text-align: right; }
table.data tr:first-child td { border-top: none; }
table.data th:first-child, table.data td:first-child { padding-left: 1.5rem; }
table.data th:last-child, table.data td:last-child { padding-right: 1.5rem; }
table.data tr.attention td { background: var(--orange-row); }
table.data tfoot td { border-top: 1.5px solid #DDE2E8; font-weight: 600; }
table.data a.row-link { color: var(--navy); text-decoration: none; font-weight: 500; }
table.data a.row-link:hover { text-decoration: underline; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.validation-message, .field-error { color: var(--red); font-size: 0.8125rem; }

.notice { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.875rem 1.125rem; border-radius: 0.625rem; font-size: 0.875rem; }
.notice.info { background: var(--blue-soft); color: #1A3EA8; }
.notice.warning { background: var(--orange-soft); color: #6E3906; }
.notice.danger { background: var(--red-soft); color: #8F1C13; }
.notice.neutral { background: var(--border-soft); color: var(--navy); }

button, input, select, textarea { font-family: inherit; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
/* Headings receive focus after navigation for screen readers; they are not interactive, so no visible ring. */
h1:focus, h1:focus-visible, [tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

#blazor-error-ui {
    background: var(--orange-soft);
    color: var(--navy);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* Shared mobile foundations: content can shrink without clipping controls or text. */
body.navigation-open { overflow: hidden; }
img, iframe { max-width: 100%; }
input, select, textarea { max-width: 100%; }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); }
.row > *, .form-grid > *, .inline > * { min-width: 0; }
table.data { min-width: var(--table-min-width, 0); }
@media (max-width: 63.99rem) {
    h1 { font-size: clamp(1.4rem, 5vw, 1.875rem); overflow-wrap: anywhere; }
    input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
    button, .link-button, input:not([type="checkbox"]):not([type="radio"]), select { min-height: 44px; }
    input[type="checkbox"], input[type="radio"] { min-width: 22px; min-height: 22px; margin: 11px; vertical-align: middle; }
    .row { flex-direction: column; align-items: stretch; }
    .row > .grow, .row > .side { flex: 0 1 auto; width: 100%; }
    .notice { flex-wrap: wrap; overflow-wrap: anywhere; }
}
/* A table adapts to its available space, including narrow detail panels on desktop.
   Until labels are attached it remains a conventional, scrollable table. */
@container (max-width: 47.99rem) {
    table.data.mobile-ready { display: block; min-width: 0; width: 100%; }
    table.data.mobile-ready thead { display: block; }
    table.data.mobile-ready thead tr { display: flex; overflow-x: auto; gap: .5rem; padding: .5rem .75rem; }
    table.data.mobile-ready th { border: 0; padding: 0; flex-shrink: 0; }
    table.data.mobile-ready th:not(:has(.sort-button)):not(:has(input)) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    table.data.mobile-ready th:has(input) { display: flex; align-items: center; width: auto; }
    table.data.mobile-ready th:has(input)::after { content: attr(data-action-label); }
    table.data.mobile-ready .sort-button { min-height: 44px; border: 1px solid var(--border); border-radius: .5rem; padding: .5rem .75rem; }
    table.data.mobile-ready tbody, table.data.mobile-ready tfoot { display: block; padding: .5rem .75rem; }
    table.data.mobile-ready tbody tr, table.data.mobile-ready tfoot tr { display: block; padding: .6rem; border: 1px solid var(--border); border-radius: .65rem; margin-bottom: .75rem; background: white; }
    table.data.mobile-ready td { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem .75rem; padding: .5rem .25rem; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
    table.data.mobile-ready td::before { content: attr(data-label); color: var(--text-2); font-size: .75rem; font-weight: 400; margin-right: auto; }
    table.data.mobile-ready td[data-label=""]::before { display: none; }
    table.data.mobile-ready td.check-col { width: 100%; }
    table.data.mobile-ready td > * { min-width: 0; max-width: 100%; }
    table.data.mobile-ready .nowrap { white-space: normal; }
    table.data.mobile-ready tr.has-explanation { margin-bottom: 0; border-radius: .65rem .65rem 0 0; }
    table.data.mobile-ready tr.explanation-row { border-top: 0; border-radius: 0 0 .65rem .65rem; background: var(--bg); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
