html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    background: #f5f5f5;
    margin: 0;
}

/* ── Header ─────────────────────────────────────────── */
.app-header {
    background: #003DA5;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    height: 52px;
    font-size: 14px;
}
.header-icon  { font-size: 22px; }
.header-title { font-size: 18px; font-weight: 700; }
.header-sub   { font-size: 11px; color: #AACCFF; margin-top: 3px; }
.header-coffee { margin-left: auto; font-size: 12px; color: #AACCFF; text-decoration: none; }
.header-coffee:hover { color: white; text-decoration: underline; }
.header-about { margin-left: 16px; font-size: 12px; color: #AACCFF; text-decoration: none; }
.header-about:hover { color: white; text-decoration: underline; }

/* ── Main content ───────────────────────────────────── */
.content { padding: 16px; }

/* ── Drop zone ──────────────────────────────────────── */
.drop-zone {
    background: white;
    border: 2px solid #003DA5;
    border-radius: 6px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}
.drop-zone.dragging { background: #E8F0FE; }
.drop-icon  { font-size: 26px; }
.drop-title { font-size: 14px; font-weight: 600; color: #003DA5; }
.drop-sub   { font-size: 12px; color: #888; margin-top: 2px; }
.drop-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hide the real file input, style the label as a button */
.file-input { display: none; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}
.btn:disabled { background: #aaa !important; cursor: default; }
.btn-primary  { background: #003DA5; color: white; }
.btn-primary:hover:not(:disabled) { background: #002D7A; color: white; }
.btn-secondary { background: white; color: #003DA5; border: 1.5px solid #003DA5; }
.btn-secondary:hover { background: #E8F0FE; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ── Summary bar ────────────────────────────────────── */
.summary-bar {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.chip {
    background: #E8F0FE;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
}
.ms-auto { margin-left: auto; }

/* ── Grid ───────────────────────────────────────────── */
.grid-wrapper {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: auto;
    max-height: calc(100vh - 240px);
}
.receipt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.receipt-table thead th {
    background: #003DA5;
    color: white;
    font-weight: 600;
    padding: 8px;
    position: sticky;
    top: 0;
    text-align: left;
    white-space: nowrap;
}
.receipt-table tbody tr:nth-child(even) { background: #FAFCFF; }
.receipt-table tbody tr.row-return      { background: #FFE4E4 !important; }
.receipt-table tbody td {
    padding: 5px 8px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}
.receipt-table .num { text-align: right; }

.cat-select {
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    padding: 1px 4px;
    width: 140px;
}
.notes-input {
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    padding: 1px 4px;
    width: 160px;
}

/* ── About page ─────────────────────────────────────── */
.about-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 32px 40px;
    max-width: 640px;
    margin: 0 auto;
}
.about-logo  { font-size: 48px; text-align: center; }
.about-title { font-size: 22px; font-weight: 700; color: #003DA5; text-align: center; margin: 8px 0 4px; }
.about-edition { text-align: center; color: #888; font-size: 12px; margin-bottom: 24px; }
.about-card section { margin-bottom: 20px; }
.about-card h2 { font-size: 14px; font-weight: 700; color: #003DA5; margin-bottom: 8px; }
.about-card ul { margin: 0; padding-left: 20px; }
.about-card li { margin-bottom: 4px; }
.about-back { text-align: center; margin-top: 28px; }
.about-section-privacy    { background: #F0F7FF; border-left: 3px solid #003DA5; padding: 10px 14px; border-radius: 0 4px 4px 0; }
.about-section-disclaimer { background: #FFF8E6; border-left: 3px solid #B8860B; padding: 10px 14px; border-radius: 0 4px 4px 0; }
.about-section-author     { text-align: center; }
.about-section-author p   { margin: 4px 0; }
.about-coffee { margin-top: 10px !important; font-style: italic; }

/* ── Blazor error UI ────────────────────────────────── */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0; left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    display: none;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem; height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}
.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: #003DA5;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }
