/* ===== Diseño "liquid glass": superficies translúcidas con desenfoque sobre un fondo vivo ===== */

:root {
    --bg-1: #ffb38a;
    --bg-2: #f4a3d7;
    --bg-3: #9fbcff;
    --bg-4: #8ee8cf;
    --bg-base: #fbe3f1;

    --text: #1d1d1f;
    --text-muted: rgba(29, 29, 31, 0.62);
    --accent: #ff5a4e;
    --accent-2: #ff8a3d;
    --like: #2fb36d;

    --glass-bg: rgba(255, 255, 255, 0.28);
    --glass-bg-strong: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.65);
    --glass-shadow: 0 10px 40px rgba(31, 38, 77, 0.14);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(255, 255, 255, 0.15);
    --glass-blur: blur(22px) saturate(180%);
    --radius: 1.5rem;

    --maui-status-bar-safe-area-background: transparent;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-1: #3a1f4f;
        --bg-2: #13284d;
        --bg-3: #4a1f2e;
        --bg-4: #0f3b3a;
        --bg-base: #1a1530;

        --text: #f5f5f7;
        --text-muted: rgba(245, 245, 247, 0.65);

        --glass-bg: rgba(255, 255, 255, 0.08);
        --glass-bg-strong: rgba(255, 255, 255, 0.14);
        --glass-border: rgba(255, 255, 255, 0.18);
        --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
        --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    }
}

html, body {
    min-height: 100%;
    /* Plus Jakarta Sans si hay conexión; si no, la del sistema */
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
}

/* Fondo: manchas de color difuminadas que dan vida al cristal */
body::before {
    content: "";
    position: fixed;
    inset: -20vmax;
    z-index: -1;
    background:
        radial-gradient(40vmax 40vmax at 15% 20%, var(--bg-1), transparent 60%),
        radial-gradient(35vmax 35vmax at 85% 15%, var(--bg-3), transparent 60%),
        radial-gradient(45vmax 45vmax at 70% 85%, var(--bg-4), transparent 60%),
        radial-gradient(40vmax 40vmax at 20% 90%, var(--bg-2), transparent 60%),
        radial-gradient(25vmax 25vmax at 55% 45%, rgba(255, 255, 255, 0.35), transparent 70%);
    filter: blur(30px) saturate(130%);
    animation: drift 30s ease-in-out infinite alternate;
}

@keyframes drift {
    to { transform: translate3d(4vmax, -3vmax, 0) rotate(8deg) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
}

h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.page-header h1 {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
}

.gradient-text {
    background: linear-gradient(100deg, var(--accent-2), var(--accent) 45%, #c2418f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ----- Mazo de recetas ----- */

.deck {
    position: relative;
}

/* Dos tarjetas de cristal detrás de la actual: se ve que quedan más */
.deck.has-more::before,
.deck.has-more::after {
    content: "";
    position: absolute;
    left: 50%;
    width: min(88vw, 340px);
    height: 440px;
    border-radius: 2rem;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

.deck.has-more::before {
    top: 2.1rem;
    transform: translateX(-50%) rotate(5deg) scale(0.94);
}

.deck.has-more::after {
    top: 1.7rem;
    transform: translateX(-50%) rotate(-3deg) scale(0.97);
}

.deck > * {
    position: relative;
    z-index: 1;
}

h1:focus {
    outline: none;
}

a {
    color: inherit;
}

.muted {
    color: var(--text-muted);
}

.content {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

/* ----- Superficies de cristal ----- */

.glass,
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-highlight);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

.glass-panel {
    border-radius: var(--radius);
    padding: 1.5rem;
}

.glass-panel.login {
    max-width: 380px;
    margin: 8vh auto 0;
}

.page-header {
    margin-bottom: 0.5rem;
}

.page-header h1 {
    margin-bottom: 0.1rem;
}

/* ----- Controles ----- */

.glass-input {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg-strong);
    color: var(--text);
    box-shadow: var(--glass-highlight);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    outline: none;
    transition: box-shadow 150ms, border-color 150ms;
}

.glass-input::placeholder {
    color: var(--text-muted);
}

.glass-input:focus {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--glass-highlight), 0 0 0 4px rgba(255, 90, 78, 0.25);
}

.glass-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg-strong);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--glass-shadow), var(--glass-highlight);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    cursor: pointer;
    transition: transform 120ms ease, background 150ms;
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.6);
}

.glass-button:active {
    transform: scale(0.96);
}

.glass-button:disabled {
    opacity: 0.6;
    cursor: default;
}

.glass-button.primary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    box-shadow: 0 10px 24px rgba(255, 90, 78, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.glass-button.primary:hover {
    background: linear-gradient(135deg, #ff9b52, #ff4a3d);
}

.glass-button.round {
    width: 3.75rem;
    height: 3.75rem;
    padding: 0;
    font-size: 1.4rem;
}

.glass-button.round {
    font-weight: 800;
}

.glass-button.round:not(.like) {
    color: #e2574c;
}

.glass-button.round.like {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    background: linear-gradient(135deg, #5be39b, var(--like));
    box-shadow: 0 10px 24px rgba(47, 179, 109, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.swipe-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0 0.75rem;
}

.swipe-actions .glass-button.round {
    width: 4.25rem;
    height: 4.25rem;
    font-size: 1.6rem;
}

.error {
    color: #c62828;
    font-size: 0.9rem;
}

/* ----- Menú semanal ----- */

.week-progress {
    height: 0.6rem;
    margin-top: 0.85rem;
    border-radius: 999px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.week-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent), #c2418f);
    transition: width 400ms ease;
}

.menu-week {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: grid;
    gap: 0.75rem;
}

.menu-day {
    display: grid;
    grid-template-columns: 3.75rem 1fr;
    gap: 0.75rem;
    align-items: stretch;
}

.menu-day.past {
    opacity: 0.55;
}

.menu-date {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 1.1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-highlight);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

.menu-date-weekday {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.menu-date-number {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.menu-day.today .menu-date {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    background: linear-gradient(160deg, var(--accent-2), var(--accent));
    box-shadow: 0 10px 22px rgba(255, 90, 78, 0.35);
}

.menu-day.today .menu-date-weekday {
    color: rgba(255, 255, 255, 0.85);
}

.menu-today-badge {
    position: absolute;
    bottom: -0.55rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent);
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.menu-slot {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 4.5rem;
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 26px rgba(31, 38, 77, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: transform 120ms ease;
}

a.menu-slot:active {
    transform: scale(0.98);
}

.menu-slot a {
    color: inherit;
    text-decoration: none;
}

.menu-slot-emoji {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.menu-slot-text .small {
    opacity: 0.9;
}

.menu-slot.empty {
    color: var(--text-muted);
    background: transparent;
    border: 1.5px dashed var(--glass-border);
    box-shadow: none;
}

.menu-slot.empty .menu-slot-emoji {
    font-size: 1.6rem;
    width: 2.2rem;
    text-align: center;
    filter: none;
}

.menu-day.today .menu-slot.empty {
    border-color: var(--accent);
    color: var(--text);
}

.menu-unassigned {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: grid;
    gap: 0.75rem;
}

.menu-unassigned .glass-input {
    max-width: 12rem;
    color: var(--text);
}

/* ----- Errores de Blazor ----- */

.blazor-error-boundary {
    padding: 1rem;
    border-radius: var(--radius);
    background: rgba(179, 33, 33, 0.85);
    color: white;
}

.blazor-error-boundary::after {
    content: "Se ha producido un error.";
}

/* ----- Lista de la compra ----- */

.list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.list-add {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.list-category {
    margin: 1.25rem 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.list-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 1.1rem;
    transition: opacity 200ms;
}

.list-row.checked {
    opacity: 0.6;
}

.list-row.checked .list-name {
    text-decoration: line-through;
}

.list-check {
    flex-shrink: 0;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    border: 1.5px solid var(--glass-border);
    background: var(--glass-bg-strong);
    color: #fff;
    font-weight: 700;
    box-shadow: var(--glass-highlight);
    cursor: pointer;
}

.list-row.checked .list-check {
    background: var(--like);
    border-color: transparent;
}

.list-name {
    flex: 1;
    font-weight: 600;
}

.list-name::first-letter {
    text-transform: uppercase;
}

.list-qty {
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.list-remove {
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* ----- Ficha de receta ----- */

a.menu-day-recipe {
    text-decoration: none;
}

a.menu-day-recipe:hover {
    color: var(--accent);
}

.back-link {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}

.recipe-hero {
    padding: 1.75rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    color: #fff;
    background:
        radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, 0.35), transparent 55%),
        linear-gradient(160deg, #ffb37b 0%, #ff7a59 45%, #e2574c 100%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 16px 40px rgba(226, 87, 76, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.recipe-hero h1 {
    margin: 0 0 0.25rem;
}

.recipe-hero p {
    margin: 0;
    opacity: 0.9;
}

.recipe-section {
    margin-bottom: 1rem;
}

.recipe-ingredients {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recipe-ingredients li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.recipe-ingredients li:last-child {
    border-bottom: none;
}

.recipe-ingredient-name::first-letter {
    text-transform: uppercase;
}

.recipe-steps {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.6rem;
}

.list-total {
    margin: 1rem 0 0;
    padding: 1rem 1.25rem;
}

.list-total-amount {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.list-qty {
    text-align: right;
}

.list-price {
    font-weight: 700;
    color: var(--text);
}

/* ----- Panel interno ----- */

.admin-run {
    margin-bottom: 1rem;
    padding: 0.85rem 1.1rem;
}

.admin-run.failed {
    border-color: rgba(198, 40, 40, 0.6);
}

.admin-filter {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.admin-ingredient {
    margin-bottom: 0.75rem;
    padding: 1rem 1.25rem;
}

.admin-ingredient h2::first-letter {
    text-transform: uppercase;
}

.admin-ok {
    color: var(--like);
    margin-left: 0.25rem;
}

.admin-candidates {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    display: grid;
    gap: 0.35rem;
}

.admin-candidates li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.admin-candidates label {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.admin-search {
    display: flex;
    gap: 0.5rem;
}

.glass-button.small {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

/* ----- Tickets y despensa ----- */

.receipt-upload {
    margin-bottom: 1rem;
}

.receipt-upload label {
    cursor: pointer;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    padding: 0.85rem 1.1rem;
    text-decoration: none;
}

.receipt-status {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.receipt-status.parsed { color: var(--like); }
.receipt-status.needs_review { color: var(--accent); }
.receipt-status.failed { color: #c62828; }
.receipt-status.pending,
.receipt-status.processing { color: var(--text-muted); }

.receipt-alert {
    padding: 0.85rem 1.1rem;
    border-color: rgba(255, 90, 78, 0.55);
}

.receipt-line.doubtful {
    border: 1.5px solid var(--accent);
}

.receipt-raw {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.9rem;
}

.receipt-amount {
    max-width: 6.5rem;
    text-align: right;
}

.pantry-row {
    flex-wrap: wrap;
}

.pantry-row.soon {
    border-color: rgba(255, 138, 61, 0.8);
}

.pantry-row.urgent {
    border: 1.5px solid #e2574c;
}

.pantry-date {
    max-width: 10rem;
}

.expiring-banner {
    display: block;
    margin-bottom: 1rem;
    padding: 0.85rem 1.1rem;
    text-decoration: none;
    border-color: rgba(255, 138, 61, 0.8);
}

.receipt-upload-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.glass-button.danger {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #f0625a, #c62828);
}

.glass-button.danger-ghost {
    color: #c62828;
}

.receipt-delete-confirm {
    padding: 1rem 1.25rem;
}

.receipt-delete-confirm .glass-button {
    margin-right: 0.5rem;
}

.admin-tabs,
.admin-chains {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}

.alias-row {
    flex-wrap: wrap;
}

.alias-select {
    max-width: 14rem;
}

/* ----- Menú: comida y cena por día ----- */

.menu-meals {
    display: grid;
    gap: 0.5rem;
}

.menu-meal-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
}

.menu-day-off {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0 1rem;
    border-radius: 1.25rem;
    color: var(--text-muted);
    font-style: italic;
    border: 1px dashed var(--glass-border);
}

/* ----- Ajustes del hogar ----- */

.settings-section {
    margin-bottom: 1rem;
}

.slot-grid {
    display: grid;
    grid-template-columns: 1fr 5.5rem 5.5rem;
    gap: 0.5rem 0.75rem;
    align-items: center;
    margin: 1rem 0;
}

.slot-grid-head {
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-muted);
}

.slot-grid-day {
    font-weight: 600;
}

.slot-toggle {
    height: 2.6rem;
    border-radius: 0.9rem;
    border: 1.5px dashed var(--glass-border);
    background: var(--glass-bg);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 120ms ease, background 150ms;
}

.slot-toggle:active {
    transform: scale(0.94);
}

.slot-toggle.on {
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    box-shadow: 0 8px 18px rgba(255, 90, 78, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.slot-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.settings-save {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ----- Invitación ----- */

.join-card {
    max-width: 420px;
    margin: 3rem auto;
    padding: 2rem 1.5rem;
}

.join-emoji {
    display: block;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.invite-code {
    display: block;
    margin: 0.5rem 0;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    text-align: center;
}

.invite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.glass-button.whatsapp {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #3be27b, #1fa855);
    box-shadow: 0 10px 22px rgba(31, 168, 85, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.name-form {
    display: flex;
    gap: 0.5rem;
}

/* ----- Backoffice: resumen, usuarios, hogares y auditoría ----- */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 1rem 1.15rem;
    color: inherit;
    text-decoration: none;
}

a.admin-stat:hover {
    border-color: rgba(255, 90, 78, 0.6);
}

.admin-stat.warning {
    border-color: rgba(198, 40, 40, 0.6);
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.admin-stat-label {
    font-weight: 600;
}

.admin-section {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
}

.admin-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-table-wrap {
    padding: 0.25rem 0.5rem;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.6rem 0.5rem;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.55rem 0.5rem;
    border-top: 1px solid var(--glass-border);
    vertical-align: top;
}

.admin-email {
    word-break: break-all;
}

.admin-member + .admin-member::before {
    content: " · ";
    color: var(--text-muted);
}

.admin-badge {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
}

.admin-badge.ok {
    color: var(--like);
}

.admin-badge.warning {
    color: #b26a00;
}

.admin-badge.danger {
    color: #fff;
    background: #c62828;
    border-color: transparent;
}

.admin-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1rem;
    margin: 0;
}

.admin-facts dt {
    font-weight: 600;
    color: var(--text-muted);
}

.admin-facts dd {
    margin: 0;
}

.admin-members {
    margin: 0;
    padding-left: 1.1rem;
}

.admin-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    max-width: 30rem;
}

.admin-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0 1.5rem;
}

.admin-audit-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
}

.admin-audit-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-audit-scope {
    grid-column: 1 / -1;
}

.audit-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.audit-item {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 0.1rem 0.75rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--glass-border);
}

.audit-item:first-child {
    border-top: none;
}

.audit-item.warning .audit-what strong {
    color: #c62828;
}

.audit-when {
    grid-row: span 2;
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.audit-who {
    grid-column: 2;
}

@media (max-width: 640px) {
    .audit-item {
        grid-template-columns: 1fr;
    }

    .audit-when {
        grid-row: auto;
    }

    .audit-who {
        grid-column: 1;
    }

    .admin-facts {
        grid-template-columns: 1fr;
    }

    .admin-facts dd {
        margin-bottom: 0.4rem;
    }
}

.admin-audit-filters .field {
    display: grid;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
