.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--app-border);
    padding-top: var(--app-safe-t);
}
.app-header__inner {
    height: var(--app-header-h);
    max-width: 40rem;
    margin: 0 auto;
    padding: 0 .75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.app-header__brand { font-size: 1rem; font-weight: 700; color: var(--app-accent-dark); text-decoration: none; flex-shrink: 0; }
.app-main {
    flex: 1;
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    padding: .75rem .75rem calc(1rem + var(--app-safe-b));
}
@media (min-width: 768px) {
    .app-header__inner,
    .app-main {
        max-width: 52rem;
    }
    .app-main {
        padding: 1.25rem 1.5rem calc(1.5rem + var(--app-safe-b));
    }
    .report-card__header { padding: 1.35rem 1.25rem; }
    .report-card__title { font-size: 1.5rem; }
    .report-card__subtitle { font-size: 1rem; margin-top: .5rem; }
    .report-table th {
        font-size: .8125rem;
        padding: .75rem .65rem;
    }
    .report-table td {
        font-size: .9375rem;
        padding: .75rem .65rem;
    }
    .report-table td.num-cell { font-size: .875rem; }
    .report-table tfoot td { font-size: .875rem; padding: .75rem .65rem; }
    .report-footer {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }
    .iban-row__value { font-size: 1.125rem; }
    .report-summary__amount { font-size: 2.125rem; }
    .report-summary__due { font-size: 1.0625rem; }
    .report-summary__warning { font-size: .9375rem; }
    .btn-copy, .btn-qr { font-size: .8125rem; padding: .45rem .75rem; }
}
.app-main--landing {
    max-width: 72rem;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 768px) {
    .app-main--landing {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
.report-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    overflow: hidden;
    box-shadow: var(--app-shadow);
}
.report-card__header {
    background: linear-gradient(180deg, #f97316, var(--app-accent));
    color: #fff;
    padding: 1rem .75rem;
    text-align: center;
}
.report-card__title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.report-card__subtitle {
    font-size: .8125rem;
    font-weight: 600;
    margin: .35rem 0 0;
    opacity: .95;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.report-table col.col-desc { width: 36%; }
.report-table col.col-amount { width: 22%; }
.report-table col.col-units { width: 14%; }
.report-table col.col-share { width: 28%; }
.report-table th {
    background: #fff7ed;
    color: #b91c1c;
    font-weight: 700;
    padding: .5rem .35rem;
    font-size: .65rem;
    border-bottom: 1px solid #fed7aa;
    border-right: 1px solid #fed7aa;
    line-height: 1.2;
}
.report-table th:last-child { border-right: none; }
.report-table th.text-right, .report-table td.text-right { text-align: right; }
.report-table th.text-center, .report-table td.text-center { text-align: center; }
.report-table td {
    padding: .5rem .35rem;
    font-size: .75rem;
    border-bottom: 1px solid var(--app-border);
    border-right: 1px solid #fed7aa;
    line-height: 1.25;
    word-break: break-word;
}
.report-table td:last-child { border-right: none; }
.report-table td.num-cell { white-space: nowrap; font-size: .7rem; }
.report-table .th-short { display: none; }
@media (max-width: 360px) {
    .report-table .th-full { display: none; }
    .report-table .th-short { display: inline; }
}
.report-table tbody tr:nth-child(even) { background: #fafafa; }
.report-table tfoot td {
    font-weight: 700;
    color: #b91c1c;
    font-size: .7rem;
    padding: .55rem .35rem;
    border-right: 1px solid #fed7aa;
}
.report-table tfoot td:last-child { border-right: none; }
.report-notes {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: .7rem .875rem .8rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: .78rem;
    color: #475569;
    line-height: 1.45;
}
.report-footer .report-notes--inline {
    margin-top: 0;
    width: 100%;
    border-radius: .4rem;
}
.report-footer .payment-sidebar__notes {
    margin-top: .75rem;
    width: 100%;
}
.report-notes__title {
    margin: 0 0 .4rem;
    font-size: .68rem;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.report-notes__text {
    margin: 0;
}
.report-notes__text--secondary {
    margin-top: .45rem;
    padding-top: .45rem;
    border-top: 1px dashed #e2e8f0;
}
.report-notes strong {
    font-weight: 700;
    color: #1e293b;
}
.report-summary {
    padding: 1rem .875rem;
    background: #fff7ed;
    border-top: 2px solid #fed7aa;
    text-align: center;
}
.report-summary__label {
    margin: 0;
    font-size: .75rem;
    font-weight: 700;
    color: #b91c1c;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.report-summary__amount {
    margin: .35rem 0 0;
    font-size: 1.75rem;
    font-weight: 800;
    color: #c2410c;
    line-height: 1.15;
    letter-spacing: -.02em;
}
.report-summary__due {
    margin: .7rem 0 0;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--app-text);
}
.report-summary__warning {
    margin: .45rem 0 0;
    font-size: .8125rem;
    font-weight: 600;
    color: #b45309;
    line-height: 1.4;
}
.report-footer {
    padding: .875rem;
    font-size: .8125rem;
    border-top: 1px solid var(--app-border);
}
.report-footer p { margin: 0 0 .5rem; }
.iban-block { margin-bottom: .65rem; }
.iban-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: .35rem;
}
.iban-row__label { font-weight: 700; }
.iban-row__value {
    font-weight: 400;
    font-size: .875rem;
    letter-spacing: .04em;
    line-height: 1.45;
    word-break: break-word;
}
.iban-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    width: 100%;
}
@media (min-width: 480px) {
    .iban-actions { width: auto; margin-left: auto; }
    .iban-row { justify-content: space-between; }
}
.btn-copy, .btn-qr {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .35rem .6rem;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}
.btn-copy {
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}
.btn-qr {
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.btn-copy--done { background: #f0fdf4; border-color: #86efac; color: #166534; }
.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
.qr-modal[hidden] { display: none !important; }
.qr-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}
.qr-modal__box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 32rem;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--app-surface);
    border-radius: var(--app-radius) var(--app-radius) 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,.15);
}
@media (min-width: 768px) {
    .qr-modal { align-items: center; padding: 1rem; }
    .qr-modal__box {
        max-width: 36rem;
        border-radius: var(--app-radius);
        max-height: 90dvh;
    }
}
.qr-modal__toolbar {
    position: sticky;
    top: 0;
    z-index: 3;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem;
    padding: .65rem .75rem .25rem;
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
}
.qr-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: .75rem 1rem calc(1rem + var(--app-safe-b));
    -webkit-overflow-scrolling: touch;
}
.qr-modal__close {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--app-text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.qr-modal__info {
    font-size: .875rem;
    line-height: 1.5;
}
.qr-modal__info p { margin: 0 0 .45rem; }
.qr-modal__info .iban-row__value { font-size: .9375rem; }
.qr-modal__image-wrap {
    margin-top: 1rem;
    width: 100%;
    background: #f9f9fb;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    overflow: hidden;
}
.qr-modal__image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.btn-qr-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .65rem;
    font-size: .75rem;
    font-weight: 600;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    cursor: pointer;
    margin-right: auto;
}
.btn-qr-download:active { opacity: .85; }
.archive-section { margin-top: 1rem; }
.archive-section__title {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--app-accent-dark);
    text-align: center;
    margin: 0 0 .65rem;
}
.archive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.btn-archive {
    display: block;
    padding: .65rem .5rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--app-radius-sm);
    color: #9a3412;
    font-weight: 600;
    text-align: center;
    font-size: .75rem;
}
.period-chips {
    display: flex;
    gap: .35rem;
    overflow-x: auto;
    padding: .5rem .75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.period-chips::-webkit-scrollbar { display: none; }
.period-chip {
    flex-shrink: 0;
    padding: .35rem .6rem;
    background: #fff7ed;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    color: #9a3412;
    border: 1px solid #fed7aa;
}
