:root {
    color-scheme: light;
    --ink: #112332;
    --muted: #526371;
    --accent: #006554;
    --accent-dark: #004e41;
    --paper: #fff;
    --canvas: #f4f7f8;
    --line: #d8e1e4;
    background: var(--canvas);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 100%;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; }
a { color: var(--accent-dark); text-underline-offset: .18em; }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #1a8a77;
    outline-offset: 3px;
}

.site-header { background: #112a39; color: #fff; }
.header-inner {
    width: min(calc(100% - 2rem), 68rem);
    margin: auto;
    min-height: 4.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 750; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    background: #b7e7d9;
    border-radius: .5rem;
    color: #102b2a;
    font-size: .85rem;
    letter-spacing: -.04em;
    font-weight: 900;
}
.site-header a { color: inherit; text-decoration: none; }
.site-header nav { display: flex; gap: clamp(.5rem, 3vw, 1.25rem); font-size: .9rem; font-weight: 650; }
.site-header nav a:hover { text-decoration: underline; }
.shell { width: min(calc(100% - 2rem), 62rem); margin: 0 auto; padding: clamp(1.5rem, 5vw, 3rem) 0 3rem; }
.intro { margin-bottom: 1.35rem; }
h1, h2, h3 { line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 4.2vw, 2.7rem); letter-spacing: -.045em; }
h2 { font-size: 1.25rem; letter-spacing: -.023em; }
h3 { font-size: 1.05rem; }
p { margin: .55rem 0 0; color: var(--muted); }
.intro p { max-width: 45rem; }
.back-link { display: inline-block; margin-bottom: .8rem; font-size: .9rem; font-weight: 650; }

.grid, .review-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: .9rem; padding: clamp(1rem, 3vw, 1.55rem); margin-bottom: 1rem; }
.card h2 + .grid { margin-top: 1rem; }
.access { max-width: 38rem; margin: 2rem auto 0; }
.access p { margin-top: .75rem; }
.access .button { margin-top: 1.1rem; }
.receipt .status { margin: 0 0 .6rem; }
.receipt .details { margin-top: 1rem; }
.receipt .details div + div { margin-top: .65rem; }

.field { display: grid; align-content: start; gap: .3rem; min-width: 0; font-size: .91rem; font-weight: 670; }
.field small { font-size: .81rem; color: var(--muted); font-weight: 500; }
.field input, .field select {
    width: 100%;
    min-width: 0;
    min-height: 2.8rem;
    padding: .55rem .65rem;
    border: 1px solid #aebdc3;
    background: #fff;
    border-radius: .48rem;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 450;
}
.field input[readonly] { background: #f4f7f8; }
.field input::placeholder { color: #5f707b; }
.currency-input {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding-left: .65rem;
    border: 1px solid #aebdc3;
    border-radius: .48rem;
    background: #fff;
    color: var(--muted);
}
.field .currency-input input { border: 0; padding-left: .1rem; background: transparent; font-variant-numeric: tabular-nums; }
.currency-input:focus-within { outline: 3px solid #1a8a77; outline-offset: 3px; }
.currency-input input:focus-visible { outline: none; }
.section-head { margin-bottom: .8rem; }
.section-head p { margin-top: .3rem; font-size: .94rem; }
.section-head .file-limit { font-size: .85rem; }
.payment {
    margin: 0 0 1rem;
    position: relative;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: .65rem;
    padding: .9rem;
}
.payment legend { padding: 0 .3rem; font-weight: 740; }
.payment .remove { margin: -.3rem 0 .45rem auto; display: block; }
.payment-grid { display: flex; flex-wrap: wrap; }
.payment-grid .field { flex: 1 1 8rem; }
.payment-grid .method-field { flex: 2 1 14rem; }
.upload { margin-top: .8rem; }
.upload input { padding: .45rem; border-style: dashed; font-size: .9rem; }
.upload input::file-selector-button {
    margin-right: .5rem;
    padding: .32rem .55rem;
    border: 1px solid var(--line);
    border-radius: .3rem;
    background: #edf4f1;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}
.payment-estimate {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .3rem .85rem;
    margin-top: .75rem;
    padding: .6rem .7rem;
    border-radius: .48rem;
    background: #f2f7f5;
    color: #185447;
    font-size: .88rem;
    font-variant-numeric: tabular-nums;
}
.payment-estimate strong { color: var(--accent-dark); }

.button, .text-button { border: 1px solid transparent; border-radius: .5rem; font-size: .94rem; font-weight: 720; text-decoration: none; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .55rem .95rem; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { background: #f1f8f5; color: var(--accent-dark); border-color: #cbe1d8; }
.button.secondary:hover { background: #e4f1eb; }
.text-button { background: transparent; color: #873d32; padding: .2rem .45rem; }
.text-button:hover { text-decoration: underline; }
.total { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; margin-top: .95rem; border-radius: .5rem; background: #edf4f2; color: #153b33; }
.total strong { white-space: nowrap; font-size: 1.15rem; }
.request-total {
    display: grid;
    gap: .4rem;
    margin-top: .95rem;
    padding: .8rem .9rem;
    border-radius: .55rem;
    background: #edf4f2;
    color: #153b33;
    font-variant-numeric: tabular-nums;
}
.request-total > div { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.request-total strong { white-space: nowrap; }
.request-net { margin-top: .15rem; padding-top: .55rem; border-top: 1px solid #c9ded4; font-weight: 720; }
.request-net strong { color: var(--accent-dark); font-size: 1.22rem; }
.request-total p { margin: 0; font-size: .88rem; }
.check { display: flex; align-items: flex-start; gap: .7rem; margin: 1rem 0; max-width: 52rem; }
.check input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: .18rem 0 0; accent-color: var(--accent); }
.submit-box .check { margin-top: 0; }
.notice { border: 1px solid; border-radius: .65rem; padding: .75rem .9rem; margin: 0 0 1rem; }
.notice.error { color: #791e18; background: #fff1ee; border-color: #efc0b8; }
.notice.success { color: #17503a; background: #eaf7ef; border-color: #b8dcc9; }

.table-wrap { overflow-x: auto; margin-top: .65rem; }
table { border-collapse: collapse; width: 100%; font-size: .89rem; text-align: left; }
th, td { padding: .7rem .65rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); }
td a { white-space: nowrap; font-weight: 650; }
.status { display: inline-block; white-space: nowrap; padding: .15rem .5rem; border-radius: .35rem; font-size: .84rem; font-weight: 740; }
.status.pending { background: #f8efdc; color: #624512; }
.status.reviewed { background: #e6effa; color: #2d4975; }
.status.paid { background: #e2f1e7; color: #1b5638; }
.status + span { margin-left: .25rem; }
.actions { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem; }
.settings .actions, .pagination { margin-top: .85rem; }
.settings .field { flex: 0 1 24rem; }
.details { margin: .65rem 0 0; }
.details dt { font-size: .86rem; color: var(--muted); }
.details dd { margin: .1rem 0 0; font-weight: 670; overflow-wrap: anywhere; }
.review-item { border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .9rem; }
.review-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.attachments { margin: .65rem 0; padding-left: 1.25rem; overflow-wrap: anywhere; }
.attachments li { margin-bottom: .25rem; }
.fee-field { margin-top: .7rem; max-width: 20rem; }
.cielo-values { margin: .75rem 0 0; border: 1px solid var(--line); border-radius: .55rem; padding: .65rem .8rem .8rem; min-width: 0; }
.cielo-values legend { font-weight: 720; padding: 0 .3rem; }
.cielo-values p, .cielo-breakdown { font-size: .92rem; }
.cielo-values p { margin: 0 0 .7rem; }
.cielo-rate { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; margin-bottom: .65rem; }
.cielo-rate .field { flex: 0 1 13rem; }
.cielo-values .cielo-reference { font-size: .84rem; }
.cielo-installments { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .65rem; }
.review-value { color: var(--ink); }
.notice-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .5rem; }
.notice-row p { margin: 0; }

@media (max-width: 42rem) {
    .review-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 31rem) {
    .grid, .review-meta { grid-template-columns: minmax(0, 1fr); }
    .payment-grid .field, .payment-grid .method-field { flex-basis: 100%; }
    .header-inner { width: calc(100% - 1.25rem); }
    .brand { font-size: .88rem; }
    .shell { width: calc(100% - 1.25rem); }
    .total strong { font-size: 1.02rem; }
    .card .button.primary { width: 100%; }
}
