:root {
    --bg: #f5f6f5;
    --fg: #1a1a1a;
    --accent: #3f86c2;
    --accent-fg: #ffffff;
    --border: #d4d6d4;
    --muted: #6b6e6b;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--fg);
}
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
}
.topnav {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.25rem;
    background: var(--accent);
    color: var(--accent-fg);
}
.topnav a, .topnav .link-button {
    color: var(--accent-fg);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}
.topnav a:hover, .topnav .link-button:hover { background: rgba(255,255,255,0.15); }
.topnav .brand { font-weight: 700; font-size: 1.1rem; }
.topnav nav { display: flex; gap: 0.25rem; }
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.topnav-right .callsign { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.lang-switcher select {
    background: rgba(255,255,255,0.12);
    color: var(--accent-fg);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}
/* Embed mode (?embed=1): page is iframed inside the WP site, which already
   shows its own top nav. Slim the Django topnav down to a neutral bar that
   only carries the language switcher so it doesn't clash with whatever
   colour scheme WP is using above it. */
.embed-mode header.topnav {
    background: transparent;
    color: inherit;
    padding: 0.25rem 0.75rem;
    min-height: 0;
}
.embed-mode .lang-switcher select {
    background: rgba(0,0,0,0.06);
    color: #222;
    border: 1px solid rgba(0,0,0,0.15);
}
.embed-mode { background: #ffffff; }
/* Dropdown options render on the OS default (white) background — the
   .topnav's white text would be invisible there. Force readable
   dark-on-white for the dropdown items. */
.lang-switcher select option {
    background: #ffffff;
    color: #222222;
}
.inline-form { display: inline; margin: 0; }
.link-button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

h1 { color: var(--accent); margin-top: 0; }
.form-row { margin-bottom: 0.9rem; }
.form-row label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.form-row input { width: 100%; padding: 0.5rem; border: 1px solid var(--border); border-radius: 3px; }
button[type="submit"], input[type="submit"] {
    background: var(--accent);
    color: var(--accent-fg);
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: 3px;
    cursor: pointer;
}
button[type="submit"]:disabled, input[type="submit"]:disabled {
    background: #bbb;
    color: #f0f0f0;
    cursor: not-allowed;
}
.submit-rules-confirm {
    margin: 1.25rem 0 0.75rem;
    padding: 0.75rem 1rem;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 3px;
}
.submit-rules-confirm label { display: flex; gap: 0.5rem; align-items: flex-start; cursor: pointer; }
.submit-rules-confirm input[type="checkbox"] { margin-top: 0.2rem; flex-shrink: 0; }
.form-errors, .errorlist { color: #c0392b; }

.flash { list-style: none; padding: 0; margin: 0; }
.flash li {
    padding: 0.5rem 1.25rem;
    background: #fff7c2;
    border-bottom: 1px solid var(--border);
}
.flash-error { background: #ffd6d6; }
.flash-success { background: #d6f5dc; }

footer { color: var(--muted); padding-bottom: 2rem; }

.reg-form fieldset {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.reg-form legend { font-weight: 600; padding: 0 0.5rem; }
.reg-form .form-row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.reg-form .hint { display: block; color: var(--muted); margin-top: 0.25rem; }
.reg-form .has-error input,
.reg-form .has-error select,
.reg-form .has-error textarea { border-color: #c0392b; }
.reg-form input[type="checkbox"], .reg-form input[type="radio"] {
    width: auto;
    margin-right: 0.4rem;
}
.reg-form select, .reg-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 3px;
}

.reg-map {
    height: 400px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 1rem;
}
/* Override Leaflet's default `grab` cursor — clicking is the primary action
   here, so signal that with a crosshair on the map background and a `move`
   cursor on the draggable marker itself. Specificity has to beat Leaflet's
   single-class .leaflet-grab rule, hence the .reg-map prefix. */
.reg-map.leaflet-container,
.reg-map .leaflet-grab,
.reg-map .leaflet-interactive {
    cursor: crosshair;
}
.reg-map .leaflet-marker-draggable {
    cursor: move;
}
.reg-map.leaflet-dragging,
.reg-map.leaflet-dragging .leaflet-grab,
.reg-map .leaflet-marker-dragging {
    cursor: grabbing;
}
/* Read-only variant: no picking, so use the default grab cursor instead of crosshair. */
.reg-map-readonly.leaflet-container,
.reg-map-readonly .leaflet-grab,
.reg-map-readonly .leaflet-interactive {
    cursor: grab;
}
.reg-map-status {
    min-height: 1.25rem;
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.reg-map-status.warn { color: #b8860b; }
.altitude-info {
    min-height: 1.25rem;
    margin: -0.5rem 0 0.75rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.altitude-info.warn { color: #b8860b; }
.reg-form input[readonly] {
    background: #f5f6f5;
    color: var(--muted);
    cursor: not-allowed;
}

.kv {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
    margin: 0.5rem 0 1.25rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.kv dt { font-weight: 600; }
.kv dd { margin: 0; }

.actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.actions .btn,
.actions a.btn,
.actions button {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 3px;
    text-decoration: none;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--accent-fg);
    cursor: pointer;
}
.btn-danger,
.actions .btn-danger,
.actions a.btn-danger,
.actions a.btn.btn-danger,
.actions button.btn-danger {
    background: #c0392b !important;
    border-color: #a93226 !important;
    color: #ffffff !important;
}
.btn-danger:hover,
.actions .btn-danger:hover,
.actions a.btn-danger:hover,
.actions a.btn.btn-danger:hover,
.actions button.btn-danger:hover {
    background: #a93226 !important;
    border-color: #922b21 !important;
    color: #ffffff !important;
}
.actions a:not(.btn) { color: var(--accent); }

.placeholder-list { color: var(--muted); }

/* QSO log table */
.qso-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}
.qso-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.qso-table th, .qso-table td {
    padding: 0.4rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.qso-table thead th {
    background: #ecefe9;
    font-size: 0.85rem;
    font-weight: 600;
}
.qso-table tfoot td {
    background: #fafbfa;
    border-top: 2px solid var(--border);
}
.qso-cell.qso-utc, .qso-cell.qso-rst, .qso-cell.qso-mode,
.qso-cell.qso-call {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.qso-cell.qso-call { font-weight: 600; }
.qso-cell.qso-actions { white-space: nowrap; text-align: right; }

.row-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--fg);
}
.row-btn:hover { background: #ecefe9; }
.row-btn-danger { color: #c0392b; border-color: #e6b3ad; }
.row-btn-danger:hover { background: #fbe6e3; }

.qso-cell.invalid-cell { color: #c0392b; }
.qso-cell.dupe-cell::after { content: " ⚠"; color: #b8860b; }
.qso-cell.typo-cell { color: #b8860b; }
.qso-cell.typo-cell::after { content: " ⚠"; }
.qso-cell .typo-hint { display: block; font-size: 0.8em; font-weight: normal; color: #b8860b; }
.qso-row-dupe { background: #fff8e1; }
.qso-empty td { text-align: center; color: var(--muted); padding: 1rem; }

.qso-entry-form {
    background: #fafbfa;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}
.qso-entry-grid {
    display: grid;
    grid-template-columns: 5em 9em 4em 1fr 4em 1fr auto;
    gap: 0.4rem 0.6rem;
    align-items: end;
}
.qso-entry-grid .qso-field { display: flex; flex-direction: column; font-size: 0.8rem; }
.qso-entry-grid .qso-field span {
    color: var(--muted);
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
}
.qso-entry-grid input[type="text"] {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.qso-entry-grid input.invalid-input { border-color: #c0392b; background: #fff7f5; }
.qso-field-action { display: flex; gap: 0.4rem; align-items: center; }
.qso-field-action button {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--accent-fg);
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
}
.qso-field-action .qso-cancel-edit {
    background: transparent;
    color: var(--fg);
    border-color: var(--border);
}

.qso-upload {
    background: #fafbfa;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.qso-upload h2 { margin: 0 0 0.25rem; font-size: 1rem; }
.qso-upload .hint { margin: 0 0 0.5rem; }
.qso-upload-form {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}
.qso-upload-form input[type="file"] {
    padding: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #fff;
}
/* Station description form. The outer <fieldset> only exists so we can
   apply `disabled` to the whole form when the log has been submitted —
   it has no visual role. Inner fieldsets (Station type, Operating modes,
   Other, Location) inherit the reg-form bordered look. */
.station-form > fieldset { border: 0; padding: 0; margin: 0; }
.station-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.station-section h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.station-section .hint { margin: -0.25rem 0 0.75rem; }
.station-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}
.station-grid .form-row { display: flex; flex-direction: column; gap: 0.2rem; }
.station-grid label { font-weight: 600; font-size: 0.9rem; }
.station-grid input { padding: 0.4rem 0.5rem; border: 1px solid var(--border); border-radius: 3px; background: #fff; }
.station-grid input:disabled { background: #f0f0f0; color: #555; }
.station-grid-span { grid-column: 1 / -1; max-width: calc(50% - 0.5rem); }

.station-row {
    display: grid;
    grid-template-columns: 14rem 1fr 7rem auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}
.station-row:last-of-type { border-bottom: 0; }
.station-row label { font-weight: 600; }
.station-row input[type="text"] { width: 100%; padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: 3px; }
.station-row input[type="number"], .station-row .station-weight-input {
    width: 100%; padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: 3px; text-align: right;
}
.station-row-watt input { width: 7rem; text-align: right; }
.station-row-watt { grid-template-columns: 14rem 7rem auto; }
.station-unit { color: var(--muted); font-size: 0.9rem; }

.station-total {
    grid-template-columns: 14rem 1fr 7rem auto;
    background: #f6f8f4;
    border-radius: 3px;
    padding: 0.6rem 0.5rem;
    margin-top: 0.5rem;
    border-bottom: 0;
}
.station-total label { font-weight: 700; }
.station-total strong { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.1rem; grid-column: 3; }
#station-total-display.over-limit { color: #c0392b; }
#station-weight-warning { color: #c0392b; min-height: 1.25rem; margin: 0.4rem 0 0; }

.banner { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.banner-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.banner-warn { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.banner-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.warn-text { color: #c0392b; }
.actions .btn-primary { background: #2c7a4a; border-color: #2c7a4a; color: #fff; }

.qso-upload-form button {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--accent-fg);
    border-radius: 3px;
    cursor: pointer;
}

/* --- Scoring review (staff manual inspection page) ---------------------------------- */
.year-switcher { font-size: 0.9rem; color: var(--muted); margin: 0 0 1rem; }
.year-switcher .year-link { display: inline-block; padding: 0.1rem 0.55rem; margin-left: 0.2rem; border: 1px solid #ddd; border-radius: 3px; text-decoration: none; color: inherit; }
.year-switcher .year-link.active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.year-switcher .year-link:hover:not(.active) { background: #f4f4f4; }

.scoring-review { display: grid; grid-template-columns: 18rem 1fr; gap: 1.5rem; align-items: start; }
.scoring-sidebar { position: sticky; top: 0.5rem; }
.scoring-sidebar h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.scoring-summary { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.scoring-summary th, .scoring-summary td { padding: 0.25rem 0.4rem; text-align: right; border-bottom: 1px solid #eee; }
.scoring-summary th:first-child, .scoring-summary td:first-child { text-align: left; }
.scoring-summary tr.selected { background: #e8f4fd; }
.scoring-summary a { color: inherit; text-decoration: none; }
.scoring-summary tr:hover { background: #f4f4f4; }

.scoring-detail .hint { color: var(--muted); }
.scoring-qso-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.scoring-qso-table th, .scoring-qso-table td { padding: 0.3rem 0.4rem; vertical-align: top; border-bottom: 1px solid #eee; }
.scoring-qso-table th { text-align: left; background: #fafafa; font-weight: 600; }
.scoring-qso-table .cell-utc, .scoring-qso-table .cell-peer, .scoring-qso-table .cell-rst { white-space: nowrap; }
.scoring-qso-table .cell-text { max-width: 32rem; }
.scoring-qso-table .cell-points { text-align: right; font-weight: 600; }
.scoring-qso-table .text-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scoring-qso-table .text-tag { display: inline-block; width: 3rem; color: var(--muted); font-size: 0.75rem; }
.scoring-qso-table .match-info { margin-top: 0.2rem; padding-top: 0.2rem; border-top: 1px dashed #ddd; color: #666; }
.scoring-qso-table .suspect, .scoring-qso-table .admin-note { font-size: 0.75rem; color: #666; margin-top: 0.2rem; }
.scoring-qso-table .bad { color: #c0392b; }

.scoring-breakdown { border-collapse: collapse; margin-bottom: 1rem; }
.scoring-breakdown th, .scoring-breakdown td { padding: 0.35rem 0.75rem; border-bottom: 1px solid #eee; text-align: right; }
.scoring-breakdown th { background: #fafafa; font-weight: 600; }
.scoring-breakdown th:first-child, .scoring-breakdown td:first-child { text-align: left; }
.scoring-breakdown-total td { background: #f7f7f7; }

.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 3px; font-size: 0.7rem; font-weight: 600; white-space: nowrap; }
/* Full match: green = 4 points. */
.badge-full_match { background: #d4edda; color: #155724; }
/* Admin-accepted + sufficient match: yellow = still 4 points, but the
   match was imperfect (text errors within tolerance, or admin override). */
.badge-admin_accepted,
.badge-sufficient_match { background: #fff3cd; color: #856404; }
/* Valid non-NMD: blue = 1 point. */
.badge-hb9_qso, .badge-dx_qso { background: #d1ecf1; color: #0c5460; }
/* Duplicate: grey + strikethrough = 0 points (deducted). */
.badge-dupe_deducted { background: #e9ecef; color: #495057; text-decoration: line-through; }
/* Everything else that scores 0 points: red. */
.badge-text_mismatch,
.badge-suspected_call_mismatch,
.badge-unmatched,
.badge-invalid_call { background: #f8d7da; color: #721c24; }
.badge-none { background: #f0f0f0; color: #777; font-style: italic; }

.scoring-row-dupe_deducted { opacity: 0.55; }

/* --- Admin module (staff workflow UI) ---------------------------------------------- */
.admin-overview, .admin-counts, .admin-tools, .admin-recent, .admin-transitions, .admin-setup-new { margin-bottom: 1.5rem; }
.admin-transition-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.admin-transition-row button { padding: 0.5rem 1rem; }
.admin-transition-row .btn-danger { background: #fff3cd; border-color: #ffeeba; color: #856404; }
.admin-transition-row .btn-revert { background: #fafafa; border: 1px solid #ddd; color: #555; padding: 0.5rem 1rem; }
.admin-transition-row .btn-revert:hover { background: #f0f0f0; }
.admin-setup-new form { display: flex; gap: 0.75rem; align-items: end; }
.admin-setup-new label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; }
.admin-setup-new input[type="number"] { padding: 0.3rem 0.4rem; width: 6rem; font-size: 0.95rem; }
.admin-setup-new .btn-danger { background: #f8d7da; border-color: #f5c6cb; color: #721c24; padding: 0.5rem 1rem; }
.admin-card-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.admin-card { flex: 1 1 8rem; min-width: 8rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 4px; background: #fafafa; }
.admin-card-num { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.admin-card-label { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }
.admin-tools-list { list-style: none; padding: 0; }
.admin-tools-list li { padding: 0.3rem 0; }

.admin-audit-mini { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-audit-mini th, .admin-audit-mini td { padding: 0.3rem 0.5rem; border-bottom: 1px solid #eee; text-align: left; }
.admin-audit-mini th { background: #fafafa; font-weight: 600; }

.admin-audit-filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.admin-audit-filters label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; }
.admin-audit-filters input, .admin-audit-filters select { padding: 0.3rem 0.4rem; font-size: 0.9rem; }
.admin-audit-count { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.5rem; }
.admin-audit-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-audit-table th, .admin-audit-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid #eee; vertical-align: top; text-align: left; }
.admin-audit-table th { background: #fafafa; font-weight: 600; }
.admin-audit-table .cell-when { white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }
.admin-audit-table .cell-payload { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; color: #555; max-width: 28rem; word-break: break-word; }
.admin-pagination { margin-top: 1rem; display: flex; gap: 1rem; align-items: center; color: var(--muted); font-size: 0.9rem; }

.admin-filter { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.admin-filter label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; }
.admin-filter input, .admin-filter select { padding: 0.3rem 0.4rem; font-size: 0.9rem; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 0.4rem 0.6rem; border-bottom: 1px solid #eee; text-align: left; vertical-align: top; }
.admin-table th { background: #fafafa; font-weight: 600; }
.admin-table tr:hover td { background: #f7f7f7; }


/* Report + pictures (F3) */
.report-form textarea {
    width: 100%; min-height: 12rem;
    padding: 0.5rem; border: 1px solid var(--border); border-radius: 3px;
    font-family: inherit; font-size: 0.95rem;
}
.report-pictures { margin-top: 2rem; }
.picture-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
    gap: 0.75rem;
    max-width: 36rem;
    margin: 1rem 0;
}
.picture-slot {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: #fafafa;
}
.picture-slot.empty {
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 1.5rem; font-weight: 600;
    background: repeating-linear-gradient(45deg, #f4f4f4 0 8px, #fafafa 8px 16px);
}
.picture-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picture-delete {
    position: absolute; top: 4px; right: 4px;
    margin: 0; display: inline;
}
.picture-delete button {
    background: rgba(0,0,0,0.55); color: #fff;
    border: 0; border-radius: 50%;
    width: 1.6rem; height: 1.6rem;
    font-size: 1rem; line-height: 1;
    cursor: pointer;
    padding: 0;
}
.picture-delete button:hover { background: #c0392b; }
.picture-cell { display: flex; flex-direction: column; gap: 0.35rem; }
.picture-caption {
    width: 100%; box-sizing: border-box;
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 3px;
}
.picture-upload { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }

.admin-report-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}
.admin-report-card > header { display: flex; gap: 0.75rem; align-items: baseline; margin-bottom: 0.5rem; }
.admin-report-card > header strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.admin-report-card > header .muted { color: var(--muted); }
.admin-report-text { white-space: pre-line; margin: 0.25rem 0 0.75rem; }
.admin-report-pictures { margin-top: 0.5rem; max-width: 24rem; }
.admin-report-pictures a { display: block; }
.picture-caption-display {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    word-break: break-word;
}

/* QRB modal (registration form) */
.modal[hidden] { display: none; }
.modal {
    position: fixed; inset: 0;
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.modal-dialog {
    position: relative;
    background: #fff;
    max-width: 32rem; width: 100%;
    padding: 1.25rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.modal-dialog h2 { margin-top: 0; }
.modal-dialog ul { margin: 0.75rem 0 1rem; padding-left: 1.25rem; }
.modal-actions {
    display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap;
    margin-top: 1rem;
}
.modal-actions button {
    padding: 0.45rem 0.9rem;
    border-radius: 3px;
    border: 1px solid var(--border);
    background: #f4f4f4;
    cursor: pointer;
}
.modal-actions #qrb-confirm {
    background: var(--accent); color: var(--accent-fg); border-color: var(--accent);
}
