/*
 * Additions on top of the compiled design system (build/assets/app-*.css).
 *
 * The design system is shared verbatim with the original build so the two
 * applications cannot drift. Anything specific to this one lives here.
 */

/* The palette rows are anchors wrapping buttons; the anchor must not add
   its own box, or the row gains a second focus ring and a stray underline. */
.search-results a.palette-row {
    display: block;
    text-decoration: none;
    color: inherit;
}

.search-results a.palette-row.is-active button,
.search-results a.palette-row:hover button {
    background: #f6f8f3;
}

/* Native [hidden] loses to the display rules the design system sets on
   .modal-backdrop (grid) and .search-results (block), so it needs to win. */
[hidden] {
    display: none !important;
}

/* Rail entries are anchors here rather than buttons. */
.screen-group a {
    text-decoration: none;
}

.sidebar a,
.dropdown-menu a,
.quick-grid > a {
    text-decoration: none;
    color: inherit;
}

/* Keyboard users need to see where they are. The design system was built
   mouse-first and ships no focus style of its own. */
:where(a, button, input, select, textarea):focus-visible {
    outline: 2px solid var(--green-2);
    outline-offset: 2px;
    border-radius: 4px;
}

.nav-item:focus-visible,
.workspace-switcher:focus-visible {
    outline-color: var(--gold);
}

/* Helper and error text under an input. The design system styles every
   `label > span` as a field label (bold, dark, spaced below), so these need
   the extra specificity or they render as a second label. */
.form-grid label > span.field-hint,
.scope-grid label > span.field-hint,
.field-hint {
    color: #959d97;
    font-size: var(--fs-1);
    font-weight: 400;
    margin: 5px 0 0;
    display: block;
}

.form-grid label > span.field-error,
.scope-grid label > span.field-error {
    color: #c4493a;
    font-size: var(--fs-1);
    font-weight: 600;
    margin: 5px 0 0;
}

/* Tables scroll horizontally on narrow screens rather than forcing the whole
   page to; the page body must never scroll sideways. */
.data-table,
.compact-table {
    -webkit-overflow-scrolling: touch;
}

/* A plain link rendered inside a data row. */
.row-action {
    color: var(--green-2);
    font-weight: 700;
    text-decoration: none;
}

.row-action:hover {
    text-decoration: underline;
}

/* Recovery codes: shown once, meant to be copied. */
.recovery-codes {
    background: #fafbf8;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 12px 14px;
    font-family: var(--font-mono, ui-monospace, Consolas, monospace);
    font-size: var(--fs-2);
    line-height: 1.9;
    letter-spacing: 0.04em;
    user-select: all;
}

/* ---------------------------------------------------------- sign-in screens */

/* Sizes here are fixed px rather than density tokens: the sign-in screen is
   seen before anyone has chosen a density. */
.auth-shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    background: #fff;
}

/* ---- brand panel ---- */

.auth-aside {
    padding: 40px clamp(36px, 4vw, 64px) 44px;
    background:
        radial-gradient(ellipse 80% 60% at 70% 45%, rgba(246, 201, 0, 0.09), transparent 70%),
        linear-gradient(160deg, #1a4420 0%, #102c14 55%, #0b200e 100%);
}

/* Faint grid behind the voucher: it reads as ledger paper. */
.auth-aside::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
    pointer-events: none;
}

.auth-aside::before {
    border-color: rgba(246, 201, 0, 0.06);
}

/* The logo's "Banana" wordmark and tagline are dark green and vanish on the
   panel, so the logo sits on a light plate. */
.auth-logo-plate {
    align-self: flex-start;
    background: #fff;
    border-radius: 12px;
    padding: 8px 16px 6px 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 2;
}

.auth-aside .auth-logo-plate img.auth-logo {
    display: block;
    width: 168px;
}

/* Sample voucher: fills the middle of the panel with what the product does. */
.auth-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 40px 0;
}

.auth-voucher {
    width: min(100%, 440px);
    background: rgba(255, 255, 255, 0.97);
    color: var(--ink);
    border-radius: 16px;
    padding: 18px 20px 14px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: rotate(-1.5deg);
    font-variant-numeric: tabular-nums;
}

.auth-voucher-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px dashed #dfe3db;
}

.auth-voucher-head small {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a938c;
}

.auth-voucher-head strong {
    font-size: 15px;
    letter-spacing: -0.01em;
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e6f4e8;
    color: #22703a;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 9px 4px 7px;
}

.auth-voucher-row {
    display: grid;
    grid-template-columns: 1fr 96px 96px;
    gap: 8px;
    padding: 7px 0;
    font-size: 12.5px;
    border-bottom: 1px solid #f0f2ec;
}

.auth-voucher-row span:not(:first-child) {
    text-align: right;
}

.auth-voucher-row.is-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9aa29c;
}

.auth-voucher-row.is-total {
    border-bottom: 0;
    border-top: 1.5px solid var(--ink);
    margin-top: 4px;
    padding-top: 10px;
    font-weight: 700;
}

.auth-float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 44, 20, 0.78);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 12px;
    padding: 10px 14px 10px 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.auth-float svg {
    flex: none;
    width: 30px;
    height: 30px;
    padding: 7px;
    border-radius: 8px;
    background: var(--gold);
    color: var(--green-deep);
}

.auth-float strong {
    display: block;
    font-size: 12.5px;
}

.auth-float small {
    display: block;
    font-size: 11px;
    color: #b9c8ba;
}

/* Chips hang off the voucher's corners so they never cover its figures. */
.auth-voucher-wrap {
    position: relative;
    width: min(100%, 440px);
    margin: 44px 0;
}

.auth-voucher-wrap .auth-voucher {
    width: 100%;
}

.auth-float.is-top {
    bottom: calc(100% + 4px);
    right: -24px;
}

.auth-float.is-bottom {
    top: calc(100% + 4px);
    left: -28px;
}

.auth-aside h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 2.4vw, 38px);
    line-height: 1.12;
    max-width: 540px;
}

.auth-aside h2 em {
    font-style: normal;
    color: var(--gold);
}

.auth-aside p {
    font-size: 14.5px;
    max-width: 480px;
    margin: 0;
}

.auth-points {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: clamp(20px, 3vw, 44px);
}

.auth-points div strong {
    font-size: 17px;
}

.auth-points div span {
    font-size: 12px;
}

/*
 * The whole screen fits the window on desktop, at any zoom. The preview takes
 * only the height left over after the logo and copy, and sheds detail to fit:
 * chips first, then the voucher itself.
 */
@media (min-width: 1051px) {
    .auth-shell {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
    }

    .auth-aside {
        min-height: 0;
    }

    .auth-main {
        overflow-y: auto;
    }

    .auth-preview {
        flex: 1 1 0;
        min-height: 0;
        padding: 0;
        margin: 20px 0;
        container-type: size;
    }
}

@container (max-height: 480px) {
    .auth-float {
        display: none;
    }

    .auth-voucher-wrap {
        margin: 0;
    }
}

.auth-voucher-row.is-summary {
    display: none;
}

/* Tighter rows first; below that the three credit lines fold into one
   summary line, which keeps the voucher balanced. */
@container (max-height: 380px) {
    .auth-voucher {
        padding: 12px 16px 10px;
    }

    .auth-voucher-head {
        padding-bottom: 8px;
    }

    .auth-voucher-row {
        padding: 4px 0;
    }
}

@container (max-height: 300px) {
    .auth-voucher-row.is-detail,
    .auth-voucher-row.is-label {
        display: none;
    }

    .auth-voucher-row.is-summary {
        display: grid;
    }

    .auth-voucher {
        transform: rotate(-1deg);
    }
}

.auth-mini {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.5);
    font-variant-numeric: tabular-nums;
}

.auth-mini-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #e6f4e8;
    color: #22703a;
}

.auth-mini strong {
    display: block;
    font-size: 13px;
}

.auth-mini small {
    display: block;
    font-size: 11.5px;
    color: #6c746e;
}

@container (max-height: 175px) {
    .auth-voucher-wrap {
        display: none;
    }

    .auth-mini {
        display: flex;
    }
}

@container (max-height: 56px) {
    .auth-mini {
        display: none;
    }
}

@media (max-height: 640px) {
    .auth-aside h2 {
        font-size: 26px;
    }

    .auth-points {
        margin-top: 18px;
        padding-top: 14px;
    }
}

/* ---- form column ---- */

.auth-main {
    flex-direction: column;
    border-left: 0;
    padding: 40px clamp(24px, 5vw, 72px) 24px;
}

.auth-card {
    max-width: 400px;
    margin: auto 0;
}

.auth-mobile-logo {
    display: none;
}

.auth-card .eyebrow {
    font-size: 11px;
}

.auth-card h1 {
    font-size: 32px;
    letter-spacing: -0.035em;
    margin: 14px 0 6px;
}

.auth-card > p {
    font-size: 15px;
    margin-bottom: 30px;
}

.auth-field {
    margin-bottom: 18px;
}

/* Labels: the login view uses real <label>s, the other auth views spans. */
.auth-field > label,
.auth-field > span,
.auth-field-head label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    color: #3f4a42;
    margin-bottom: 7px;
}

.auth-field-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.auth-field-head a {
    font-size: 12.5px;
    font-weight: 650;
    color: var(--green-2);
    text-decoration: none;
}

.auth-field-head a:hover {
    text-decoration: underline;
}

.auth-field input {
    height: 46px;
    font-size: 14.5px;
    border-radius: 10px;
    border-color: #dce1d8;
    background: #fbfcfa;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-field input:hover {
    border-color: #c5ccc2;
}

.auth-field input:focus {
    background: #fff;
    border-color: var(--green-2);
    box-shadow: 0 0 0 4px rgba(36, 90, 42, 0.12);
}

.auth-field input::placeholder {
    color: #a3aaa4;
}

.auth-input {
    position: relative;
}

.auth-input > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #97a098;
    pointer-events: none;
    transition: color 0.15s;
}

.auth-input:focus-within > svg {
    color: var(--green-2);
}

.auth-field .auth-input input {
    padding-left: 40px;
}

.auth-field .auth-input input[name="password"] {
    padding-right: 68px;
}

.auth-reveal {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--green-2);
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 10px;
    border-radius: 7px;
    cursor: pointer;
}

.auth-reveal:hover {
    background: #eef2ea;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 22px;
    font-size: 13.5px;
    color: #56605a;
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--green);
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: 10px;
    font-size: 15px;
    background: linear-gradient(180deg, #245a2a, #173d1a);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 8px 18px -8px rgba(23, 61, 26, 0.7);
    transition: transform 0.12s, box-shadow 0.15s;
}

.auth-submit svg {
    transition: transform 0.15s;
}

.auth-submit:hover {
    background: linear-gradient(180deg, #2a6931, #1b471f);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 12px 22px -8px rgba(23, 61, 26, 0.75);
}

.auth-submit:hover svg {
    transform: translateX(3px);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:disabled {
    cursor: not-allowed;
    background: #8fa593;
    box-shadow: none;
}

.auth-submit.is-busy {
    cursor: progress;
    opacity: 1 !important;
    background: linear-gradient(180deg, #245a2a, #173d1a);
}

.auth-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: auth-spin 0.7s linear infinite;
}

.auth-submit.is-busy .auth-spinner {
    display: block;
}

.auth-submit.is-busy svg,
.auth-submit:disabled svg {
    display: none;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Field-level messages: empty slots take no space. */
.auth-field-error {
    margin: 6px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    color: #c0412f;
}

.auth-field-error:empty {
    display: none;
}

.auth-field input[aria-invalid="true"] {
    border-color: #e0806f;
    background: #fffafa;
}

.auth-field input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 4px rgba(192, 65, 47, 0.12);
}

.auth-caps {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    color: #9a6b00;
}

.auth-card > p.auth-help {
    margin: 22px 0 0;
    text-align: center;
    text-wrap: balance;
    font-size: 13px;
    color: #7b847d;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13.5px;
    line-height: 1.45;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid #f5c9c2;
    margin-bottom: 20px;
}

.auth-alert.is-info {
    border-color: #c4e4ca;
}

.auth-alert svg {
    flex: none;
    margin-top: 1px;
}

.auth-note {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    padding: 12px 14px;
    background: #f6f8f3;
    border-radius: 10px;
    color: #6b746d;
}

.auth-note svg {
    flex: none;
    margin-top: 2px;
    color: #8c958e;
}

.auth-note p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
}

.auth-note strong {
    color: #3f4a42;
    font-weight: 650;
}

.auth-footer {
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 24px;
    font-size: 12px;
    color: #9aa29c;
}

.auth-footer span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* The panel is hidden on narrow screens (design system), which also hid the
   only logo; show a small one above the form instead. */
@media (max-width: 1050px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-main {
        min-height: 100vh;
        padding: 28px 20px 20px;
    }

    .auth-mobile-logo {
        display: block;
        width: 150px;
        margin-bottom: 26px;
    }

    .auth-card h1 {
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit,
    .auth-submit svg,
    .auth-field input {
        transition: none;
    }
}

/* The 403 page stands alone, outside the workspace shell. */
.bare-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.bare-page h1 {
    font-size: 26px;
    letter-spacing: -0.03em;
    margin: 14px 0 6px;
    font-weight: 600;
}

.bare-page p {
    color: var(--muted);
    font-size: var(--fs-6);
    max-width: 420px;
    margin: 0 auto 18px;
    line-height: 1.6;
}

.bare-page code {
    background: var(--gold-soft);
    color: #725c00;
    border-radius: 5px;
    padding: 2px 6px;
    font-size: var(--fs-4);
}

/* ------------------------------------------------------ trade documents */

.line-table-wrap {
    overflow-x: auto;
}

.line-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: var(--fs-3);
}

.line-table th {
    text-align: left;
    padding: 9px 8px;
    background: #fafbf8;
    color: #7c857e;
    font-size: var(--fs-1);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}

.line-table td {
    padding: 7px 6px;
    border-bottom: 1px solid #f0f2ed;
    vertical-align: top;
}

.line-table .num {
    text-align: right;
}

.line-table input,
.line-table select {
    width: 100%;
    height: 32px;
    border: 1px solid #dfe3db;
    border-radius: 7px;
    padding: 0 8px;
    font-size: var(--fs-3);
    background: #fff;
}

.line-table input.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.line-table td > select + input {
    margin-top: 5px;
}

.line-table tr.doc-line {
    display: table-row;
}

/* On/off switch in resource lists (resource/index.php, format "switch"). */
.lb-switch-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.lb-switch {
    position: relative;
    width: 38px;
    height: 22px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: #cfd5c8;
    cursor: pointer;
    padding: 0;
    transition: background .15s;
}

.lb-switch span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    transition: transform .15s;
}

.lb-switch.is-on {
    background: var(--green, #173d1a);
}

.lb-switch.is-on span {
    transform: translateX(16px);
}

.lb-switch:focus-visible {
    outline: 2px solid var(--green-2, #2e7d32);
    outline-offset: 2px;
}

.lb-switch-form em {
    font-style: normal;
    font-size: var(--fs-2);
    color: #6c746e;
}

.lb-switch-form .lb-switch.is-on + em {
    color: var(--green, #173d1a);
    font-weight: 600;
}

/* Locked: payroll (or the controller) says this one may not be flipped. */
.lb-switch-form.is-locked {
    cursor: not-allowed;
}

.lb-switch-form.is-locked .lb-switch {
    cursor: not-allowed;
    opacity: .45;
}

.lb-switch-form.is-locked em,
.lb-switch-form.is-locked .lb-switch.is-on + em {
    color: #8b938d;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.line-table input.is-invalid,
.form-grid input.is-invalid {
    border-color: #b4412f;
    box-shadow: 0 0 0 2px rgba(180, 65, 47, 0.12);
}

.line-amount {
    padding-top: 14px !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.line-remove {
    width: 28px;
    height: 28px;
    margin-top: 2px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #b4412f;
    font-size: 18px;
    cursor: pointer;
}

.line-remove:hover {
    background: #fdecea;
}

.line-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 14px 16px 16px;
    flex-wrap: wrap;
}

.line-totals {
    margin: 0;
    min-width: 280px;
    font-variant-numeric: tabular-nums;
}

.line-totals > div,
.doc-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 5px 0;
    font-size: var(--fs-4);
}

.line-totals dt,
.doc-totals dt {
    color: #6c746e;
}

.line-totals dd,
.doc-totals dd {
    margin: 0;
    font-weight: 650;
}

.line-totals .grand,
.doc-totals .grand {
    border-top: 1px solid var(--line);
    margin-top: 4px;
    padding-top: 9px;
    font-size: var(--fs-7);
}

.line-totals .grand dd,
.doc-totals .grand dd {
    font-weight: 800;
}

/* Read-only document view */
.doc-sheet {
    padding: 22px 24px;
}

.doc-parties {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.doc-parties small {
    display: block;
    color: #8b938d;
    font-size: var(--fs-1);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.doc-parties strong {
    display: block;
    font-size: var(--fs-6);
}

.doc-parties p {
    margin: 2px 0 0;
    color: #6c746e;
    font-size: var(--fs-3);
    line-height: 1.5;
}

.doc-lines {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-3);
    font-variant-numeric: tabular-nums;
}

.doc-lines th {
    text-align: left;
    padding: 8px;
    background: #fafbf8;
    color: #7c857e;
    font-size: var(--fs-1);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}

.doc-lines td {
    padding: 9px 8px;
    border-bottom: 1px solid #f0f2ed;
}

.doc-lines .num {
    text-align: right;
}

.doc-totals {
    margin: 14px 0 0 auto;
    max-width: 340px;
    font-variant-numeric: tabular-nums;
}

.doc-words {
    margin-top: 10px;
    color: #6c746e;
    font-size: var(--fs-3);
}

.inline-form {
    display: inline;
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.action-bar form {
    display: inline-flex;
}

.danger-button {
    border: 1px solid #f1c4bd;
    color: #b4412f;
    background: #fff;
    cursor: pointer;
    border-radius: 9px;
    align-items: center;
    gap: 8px;
    height: 37px;
    padding: 0 12px;
    font-size: var(--fs-4);
    font-weight: 650;
    display: inline-flex;
}

.danger-button:hover {
    background: #fdecea;
}

.kv-list {
    display: grid;
    gap: 0;
}

.kv-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f2ed;
    font-size: var(--fs-3);
}

.kv-list > div:last-child {
    border-bottom: 0;
}

.kv-list span {
    color: #6c746e;
}

.kv-list strong {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-3);
    font-variant-numeric: tabular-nums;
}

.report-table th,
.report-table td {
    padding: 8px 14px;
    border-bottom: 1px solid #f0f2ed;
    text-align: left;
}

.report-table th {
    background: #fafbf8;
    color: #7c857e;
    font-size: var(--fs-1);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.report-table .num {
    text-align: right;
}

.report-table tr.is-group td {
    font-weight: 750;
    background: #fcfdfb;
}

.report-table tr.is-total td {
    font-weight: 800;
    border-top: 1.5px solid var(--ink);
}

.report-table td.indent-1 { padding-left: 30px; }
.report-table td.indent-2 { padding-left: 46px; }
.report-table td.indent-3 { padding-left: 62px; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.filter-bar label {
    display: grid;
    gap: 4px;
    font-size: var(--fs-1);
    color: #7c857e;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-bar input,
.filter-bar select {
    height: 34px;
    border: 1px solid #dfe3db;
    border-radius: 8px;
    padding: 0 9px;
    font-size: var(--fs-3);
    background: #fff;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--ink);
}

@media print {
    .sidebar,
    .topbar,
    .screen-rail,
    .product-heading-actions,
    .action-bar,
    .no-print,
    .toast-stack {
        display: none !important;
    }

    .app-shell,
    .workspace,
    .module-layout,
    .screen-main {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* The shell scrolls inside fixed-height panes on screen; on paper the
       whole page must flow or the printer sees one blank sheet. */
    html,
    body,
    .app-shell,
    .workspace,
    .screen-main {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    .sidebar {
        position: static !important;
    }

    .workspace {
        width: 100% !important;
    }

    .surface {
        box-shadow: none !important;
        border: 0 !important;
    }
}

/* ------------------------------------------------------- notification bell */

.notification-menu {
    width: 340px;
    max-width: calc(100vw - 24px);
}

.dropdown-menu .notification-item {
    align-items: flex-start;
}

.notification-item span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.notification-item strong {
    font-weight: 650;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item small {
    color: #8b938d;
    font-size: var(--fs-2);
    white-space: normal;
}
