a.edit, a.add, a.view_contacts, a.view_media, a.excel-export, button.add,
form.delete button, button.btn-aprobar, button.btn-rechazar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: none;
    transition: transform 0.1s ease, filter 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-white);
    font-size: 14px;
}

a.edit          { background-color: var(--color-black-noir); }
a.add           { background-color: var(--color-primary); }
a.view_contacts { background-color: var(--color-primary); }
a.view_media    { background-color: #6f42c1; }
a.excel-export  { background-color: #1a5c36; }
button.add      { background-color: var(--color-primary); }
form.delete button  { background-color: #e31e24; }
button.btn-aprobar  { background-color: #28a745; }
button.btn-rechazar { background-color: #dc3545; }

a.edit:active, a.add:active, a.view_contacts:active, a.view_media:active, a.excel-export:active, button.add:active,
form.delete button:active, button.btn-aprobar:active, button.btn-rechazar:active {
    transform: scale(0.92);
    filter: brightness(1.2);
}

form.delete button:hover,
button.btn-aprobar:hover,
button.btn-rechazar:hover { color: var(--color-white) !important; }

.page-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tag {
    display: block;
    background-color: var(--color-light-red);
    color: #1e1b4b;
    padding: 3px 8px;
    margin: 2px;
    border-radius: 6px;
    font-size: 12px;
    font-family: sans-serif;
    white-space: nowrap;
    width: fit-content;
}

.enable-copy {
    cursor: pointer;
}

/* Estilos del toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--text-main);
    color: var(--color-white);
    padding: 12px 20px;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}




.dashboard-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;

    /* Cabecera */
    .dashboard-header {
        display: flex;
        align-items: center;
        margin-bottom: 25px;
        justify-content: center;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
        margin: 0;
    }

    .date-badge {
        background: var(--color-red);
        color: white;
        padding: 8px 15px;
        border-radius: 20px;
        font-weight: bold;
        font-size: 0.9rem;
        margin: 0 20px;
    }
}

/* Grid de tarjetas */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(500px, 100%), 1fr));
    gap: 20px;


    /* La Tarjeta */

    .action-card {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: var(--shadow);
        border: 5px solid var(--color-light-red);
        display: flex;
        flex-direction: column;
        transition: transform 0.2s ease;
    }

    .action-card:active {
        transform: scale(0.98); /* Efecto táctil */
    }

    .card-content {
        padding: 20px;
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .card-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 15px;
    }

    .action-id {
        font-weight: bold;
        font-size: 1.1rem;
    }

    .action-date {
        font-size: 0.85rem;
    }

    .store-name {
        font-size: 1.3rem;
        margin: 0 0 15px 0;
        color: #2c3e50;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    .store-name i {
        color: var(--color-red);
        margin-right: 8px;
    }

    /* Caja de resumen */

    .summary-box {
        background: var(--color-background);
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 20px;
        flex-grow: 1; /* Empuja los botones hacia abajo */
    }

    .summary-box strong {
        display: block;
        font-size: 0.8rem;
        text-transform: uppercase;
        margin-bottom: 5px;
    }

    .summary-text {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    /* Botones de acción */

    .card-actions {
        display: flex;
        gap: 10px;
        border-top: 1px solid #eee;
        padding-top: 15px;
    }

    .btn {
        flex: 1;
        text-decoration: none;
        text-align: center;
        padding: 12px;
        border-radius: 8px;
        font-weight: bold;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        gap: 5px;
        background: #f0f0f0;
        color: var(--text-main);
        border: 1px solid #ddd;
    }

    .btn i {
        font-size: 1.2rem;
    }

    /* Estado vacío */

    .empty-state {
        text-align: center;
        padding: 50px;
    }

    .empty-state i {
        font-size: 4rem;
        display: block;
        margin-bottom: 15px;
        opacity: 0.3;
    }
}

/* ── Toggle done (acciones) ── */
.btn-toggle-done {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    color: #aaa;
    font-size: 1.1rem;
    transition: color .15s, background .15s;
}
.btn-toggle-done:hover { background: #f0f0f0; color: #555; }
.btn-toggle-done.is-done { color: #198754; }
.btn-toggle-done.is-done:hover { background: #e9f7ee; }

/* ── Loading overlay para exportaciones ───────────────────── */
.export-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}
.export-loading-overlay.is-visible {
    display: flex;
}
.export-loading-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: exportSpin .7s linear infinite;
}
.export-loading-text {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
@keyframes exportSpin { to { transform: rotate(360deg); } }
