.area-proof-actions { display: flex; gap: .5rem; }
.area-proof-actions .btn { min-height: 44px; }
@media (max-width: 767.98px) {
    .area-proof-actions .btn { flex: 1 1 0; }
}

.area-context, .area-money { display: grid; align-items: start; gap: .75rem; }
.area-context { max-width: 36rem; }
.area-money { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.area-money label, .area-choice-field { min-width: 0; }
.area-money label > span, .area-choice-field > label,
.area-recipient > span { display: block; font-weight: 700; margin-bottom: .35rem; }
.area-balance { background: #eaf4f3; color: var(--ink); border-radius: .75rem; padding: .45rem .75rem; }
.area-balance output { display: block; font-weight: 800; overflow-wrap: anywhere; }
.area-activity { min-width: 0; }
.area-activity summary { font-size: 1.12rem; font-weight: 800; cursor: pointer; }
.area-activity summary:focus-visible { outline: 2px solid var(--deep-teal); outline-offset: 2px; }
.area-activity-content { padding-top: .75rem; }
.area-entry-area,
.area-entry-activities > .area-activity { margin-bottom: 1rem; }
.area-advance-balance { width: fit-content; max-width: 100%; }
.area-recipient { display: block; margin: 0 0 .8rem; }
.area-stock-table { width: 100%; table-layout: fixed; }
.area-stock-table th, .area-stock-table td { padding: .4rem .45rem; vertical-align: middle; }
.area-stock-table th { background: #eaf4f3; font-size: .875rem; }
.area-stock-table td { border-bottom: 1px solid #d9e6e4; }
.area-stock-table th:first-child { border-radius: .5rem 0 0 .5rem; }
.area-stock-table th:last-child { border-radius: 0 .5rem .5rem 0; }
.area-stock-count { width: 18%; text-align: right; font-variant-numeric: tabular-nums; }
.area-stock-count output { font-weight: 700; overflow-wrap: anywhere; }
.area-stock-quantity { width: 18%; }
.area-stock-condition { width: 23%; }
.area-stock-action { width: 3.25rem; text-align: right; }
.area-remove-item {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
}
.area-cell-label { display: none; }
.area-choice-field [hidden], .area-stock-condition [hidden], .area-picker [hidden] { display: none; }
.area-choice-error { color: #a12630; margin: .35rem 0 0; font-size: .875rem; }
.area-picker-trigger { text-align: left; white-space: normal; overflow-wrap: anywhere; }
.area-picker-trigger[aria-invalid="true"] { border-color: #a12630; }
.area-picker:not([open]) { display: none; }
.area-picker[open] {
    position: fixed;
    inset: auto 0 var(--area-picker-bottom, 0px);
    display: flex;
    flex-direction: column;
    gap: .65rem;
    width: min(100%, 35rem);
    max-width: none;
    max-height: min(75dvh, var(--area-picker-height, 75dvh), 32rem);
    margin: 0 auto;
    padding: .85rem max(1rem, env(safe-area-inset-right, 0px)) calc(.85rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
    border: 0;
    border-radius: 1.15rem 1.15rem 0 0;
    background: #fff;
    color: var(--ink);
}
.area-picker::backdrop { background: #102c2a80; }
.workspace-page:has(.area-picker[open]) { overflow: hidden; }
.area-picker-header { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.area-picker-header h2 { margin: 0; font-size: 1.16rem; font-weight: 800; }
.area-picker-header button, .area-picker input { min-height: 2.75rem; }
.area-picker input { flex-shrink: 0; }
.area-picker-options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.area-picker-option {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    padding: .55rem .65rem;
    border: 0;
    border-bottom: 1px solid #d9e6e4;
    border-radius: .35rem;
    background: #fff;
    color: inherit;
    text-align: left;
    overflow-wrap: anywhere;
}
.area-picker-option[aria-pressed="true"] { background: #dcefeb; font-weight: 750; }
.area-picker-option:focus-visible { outline: 2px solid var(--deep-teal); outline-offset: -2px; }
.area-picker-empty { margin: 0; padding: .35rem .15rem; }
.area-activity-detail + .area-activity-detail { border-top: 1px solid #dae6e5; padding-top: .65rem; }
.thermal-proof .area-activity-detail { border-top: 1px dashed; padding-top: .8mm; }
.thermal-proof .area-activity-detail h2 { font: bold 10pt/1.25 ui-monospace, monospace; margin-bottom: 1mm; }
.thermal-proof .area-activity-detail li { border: 0; padding: .5mm 0; }

@media (max-width: 767.98px) {
    .workspace-content > header.workspace-heading.area-entry-heading {
        justify-content: flex-start;
        align-items: center;
        gap: .5rem;
        margin-bottom: .55rem;
        padding: 0;
        border-bottom: 0;
    }
    .workspace-content > header.workspace-heading.area-entry-heading h1 {
        font-size: clamp(1.2rem, 5.2vw, 1.45rem);
    }
    .area-entry-heading .area-entry-history {
        order: -1;
        display: grid;
        place-items: center;
        flex: 0 0 44px;
        height: 44px;
        padding: 0;
        border-radius: .8rem;
    }
    form.area-entry .area-entry-activities {
        padding: .75rem;
        border: 1px solid #f9fffc;
        border-radius: 1rem;
        background: #f3fdf9;
        box-shadow: 0 4px 10px #00624b17;
    }
    form.area-entry .area-entry-activities > .area-activity {
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    .area-entry .area-entry-area { margin-bottom: .65rem; }
    form.area-entry .area-context .area-picker-trigger {
        border-color: #a3ccbe;
        background: #e4f6ee;
        text-align: center;
        font-size: .9rem;
        font-weight: 750;
    }
    .area-entry .area-activity summary {
        min-height: 44px;
        padding-block: .68rem;
        font-size: .92rem;
    }
    .area-entry .area-activity-content { padding: .25rem 0 .35rem; }
    .workspace-content form.area-entry .area-money {
        grid-template-columns: minmax(0, 1fr);
        gap: .55rem;
    }
    .area-entry .area-money label > span { margin-bottom: .25rem; font-size: .9rem; }
    .workspace-content form.area-entry .area-money .area-money-total {
        padding: 0;
        background: transparent;
        font-size: .9rem;
    }
    .area-entry .area-money-total output { display: inline; margin-left: .25rem; }
    .area-entry .area-entry-actions { margin-top: .65rem; }
    .area-entry .area-entry-actions > .btn { width: 100%; border-radius: .7rem; }
    .area-stock-table, .area-stock-table tbody { display: block; }
    .area-stock-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .area-stock-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
        gap: .6rem .65rem;
        padding: .65rem;
        border: 1px solid #d9e6e4;
        border-radius: .8rem;
        background: #f5faf9;
    }
    .area-stock-table tbody tr + tr { margin-top: .65rem; }
    .area-stock-table td { width: auto; padding: 0; border: 0; min-width: 0; }
    .area-stock-table .area-stock-voucher { grid-area: 1 / 1 / 2 / -1; }
    .area-stock-table .area-stock-action { grid-area: 3 / 2; place-self: center end; }
    .area-stock-table .area-stock-quantity { grid-area: 2 / 1; }
    .area-stock-table-return .area-stock-condition { grid-area: 2 / 2; }
    .area-stock-table .area-stock-count {
        grid-area: 3 / 1 / 4 / -1;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        align-self: center;
        gap: .45rem;
        padding-right: 3.25rem;
        text-align: left;
    }
    .area-stock-table .form-control, .area-stock-table .form-select, .area-context .form-select {
        min-height: 2.75rem;
        font-size: 1rem;
    }
    .area-remove-item { width: 2.75rem; min-height: 2.75rem; }
    .area-cell-label { display: block; font-size: .8125rem; font-weight: 700; margin-bottom: .2rem; }
}

