/* ============================================================
   SAC — Sistema de Administración de Credenciales
   Hoja de estilos principal
   ============================================================ */

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
    --sac-sidebar-width: 260px;
    --sac-sidebar-bg: #0d1117;
    --sac-sidebar-border: rgba(255,255,255,.06);
    --sac-topbar-h: 60px;
    --sac-accent: #3b82f6;
    --sac-accent-hover: #2563eb;
    --sac-success: #22c55e;
    --sac-warning: #f59e0b;
    --sac-danger: #ef4444;
    --sac-bg: #0f172a;
    --sac-surface: #1e293b;
    --sac-surface2: #334155;
    --sac-text: #e2e8f0;
    --sac-text-muted: #94a3b8;
    --sac-radius: .75rem;
    --sac-shadow: 0 4px 24px rgba(0,0,0,.4);
    --sac-transition: .2s ease;
}

/* ─── Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--sac-bg);
    color: var(--sac-text);
    font-size: .95rem;
    line-height: 1.6;
}

a { color: var(--sac-accent); text-decoration: none; }
a:hover { color: var(--sac-accent-hover); }

/* ─── Layout wrapper ─────────────────────────────────────── */
#wrapper {
    min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sac-sidebar {
    width: var(--sac-sidebar-width);
    min-height: 100vh;
    background: var(--sac-sidebar-bg);
    border-right: 1px solid var(--sac-sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    z-index: 1040;
    transition: transform var(--sac-transition);
    overflow-y: auto;
}

.sac-sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--sac-sidebar-border);
    min-height: var(--sac-topbar-h);
}

.sidebar-logo {
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
}

.sidebar-title {
    font-weight: 700;
    font-size: .95rem;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Navigation ─────────────────────────────────────────── */
.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

.nav-section {
    padding: .5rem 1rem .25rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sac-text-muted);
    margin-top: .5rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem 1rem;
    color: var(--sac-text-muted);
    border-radius: 0;
    font-size: .875rem;
    font-weight: 500;
    transition: all var(--sac-transition);
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link i {
    font-size: 1rem;
    min-width: 1.1rem;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(59,130,246,.1);
    border-left-color: rgba(59,130,246,.3);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(59,130,246,.18);
    border-left-color: var(--sac-accent);
}

/* ─── Sidebar usage bar ──────────────────────────────────── */
.sidebar-usage {
    padding: 1rem;
    border-top: 1px solid var(--sac-sidebar-border);
    font-size: .8rem;
    color: var(--sac-text-muted);
}

/* ─── Topbar ─────────────────────────────────────────────── */
.sac-topbar {
    height: var(--sac-topbar-h);
    background: var(--sac-sidebar-bg);
    border-bottom: 1px solid var(--sac-sidebar-border);
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* ─── Page content ───────────────────────────────────────── */
#page-content {
    margin-left: var(--sac-sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin var(--sac-transition);
}

#page-content.expanded {
    margin-left: 0;
}

.sac-main {
    padding: 1.75rem;
    flex: 1;
}

/* ─── Cards ──────────────────────────────────────────────── */
.sac-card {
    background: var(--sac-surface);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--sac-radius);
    box-shadow: var(--sac-shadow);
}

.sac-card .card-header {
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.07);
    padding: 1rem 1.25rem;
    border-radius: var(--sac-radius) var(--sac-radius) 0 0;
    font-weight: 600;
}

/* ─── Stat cards (dashboard) ─────────────────────────────── */
.stat-card {
    background: var(--sac-surface);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--sac-radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--sac-shadow);
    transition: transform var(--sac-transition), box-shadow var(--sac-transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
}

.stat-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon-blue   { background: rgba(59,130,246,.15);  color: #60a5fa; }
.stat-icon-green  { background: rgba(34,197,94,.15);   color: #4ade80; }
.stat-icon-yellow { background: rgba(245,158,11,.15);  color: #fbbf24; }
.stat-icon-purple { background: rgba(168,85,247,.15);  color: #c084fc; }

.stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.stat-label {
    font-size: .8rem;
    color: var(--sac-text-muted);
    margin-top: .2rem;
}

/* ─── DataTables override ────────────────────────────────── */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: var(--sac-surface2);
    border: 1px solid rgba(255,255,255,.12);
    color: var(--sac-text);
    border-radius: .5rem;
    padding: .35rem .6rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    color: var(--sac-text-muted);
    font-size: .85rem;
}

table.dataTable thead th {
    border-bottom: 2px solid rgba(255,255,255,.1) !important;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sac-text-muted) !important;
    vertical-align: middle;
}

/* Filas de la tabla (Cuerpo) */
table.dataTable tbody td {
    font-size: .875rem; /* Homologar a .875rem (14px) para mejor legibilidad */
    vertical-align: middle;
    color: var(--sac-text);
}

table.dataTable tbody tr {
    transition: background var(--sac-transition);
}

table.dataTable tbody tr:hover td {
    background: rgba(59,130,246,.06) !important;
}

/* ─── DataTables: Subfilas (Child rows - Responsive) ─────── */
table.dataTable>tbody>tr.child ul.dtr-details {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding: .5rem 0;
    width: 100%;
}

table.dataTable>tbody>tr.child ul.dtr-details>li {
    display: flex;
    align-items: baseline;
    border-bottom: 1px solid rgba(255,255,255,.05);
    padding: .3rem 0;
}

table.dataTable>tbody>tr.child ul.dtr-details>li:last-child {
    border-bottom: none;
}

/* Etiqueta (columna) en la subfila */
table.dataTable>tbody>tr.child ul.dtr-details>li .dtr-title {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sac-text-muted);
    min-width: 140px; /* Ancho fijo para alinear los datos */
    flex-shrink: 0;
}

/* Valor en la subfila */
table.dataTable>tbody>tr.child ul.dtr-details>li .dtr-data {
    font-size: .875rem; /* Homologado con td */
    color: var(--sac-text);
    flex-grow: 1;
    word-break: break-word;
}

/* Evitar que badges en subfilas o celdas hereden font-size grande */
table.dataTable>tbody>tr.child ul.dtr-details>li .dtr-data .badge,
table.dataTable tbody td .badge {
    font-size: .75rem;
}

/* Clave badge: sobreescribir fs-6 de Bootstrap para que no crezca */
table.dataTable tbody td .badge.font-monospace {
    font-size: .78rem !important;
    letter-spacing: .08em;
}

/* btn-group en columna Acciones: evitar que el overflow:hidden de la celda corte las sombras */
table.dataTable tbody td .btn-group {
    flex-wrap: nowrap;
}

/* ─── Tabla compacta y toolbar de filtros ────────────────── */

/* table-sm override: fuente consistente y rows ajustados */
#tablaEmpleados.table-sm > thead > tr > th,
#tablaEmpleados.table-sm > tbody > tr > td {
    font-size: .8rem;
    padding-top: .35rem;
    padding-bottom: .35rem;
}

/* Columna # y Registro más ajustadas */
#tablaEmpleados > tbody > tr > td:nth-child(1),
#tablaEmpleados > tbody > tr > td:nth-child(2) {
    white-space: nowrap;
}

/* thead pegajoso al hacer scroll vertical en pantallas grandes */
@media (min-width: 992px) {
    #tablaEmpleados_wrapper {
        position: relative;
    }
    #tablaEmpleados thead tr:first-child th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--bs-body-bg);
        box-shadow: 0 1px 0 rgba(255,255,255,.08);
    }
}

/* Hover row: transición suave */
#tablaEmpleados tbody tr {
    transition: background-color .12s ease;
}

/* Filtros en toolbar DT: hereden tamaño btn-sm */
#tablaEmpleados_wrapper .dt-buttons .btn-group label.btn,
#tablaEmpleados_wrapper .dt-buttons .btn-group-sm label.btn {
    font-size: .78rem;
    padding: .2rem .55rem;
}

/* Botones Área / Puesto en toolbar: misma altura que btn-sm */
#tablaEmpleados_wrapper .dt-buttons button.btn-sm {
    font-size: .78rem;
}

/* Input de búsqueda DT: fluido en desktop, no desborda */
#tablaEmpleados_wrapper .dataTables_filter {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
}
#tablaEmpleados_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: .4rem;
    width: 100%;
    margin: 0;
    font-size: .8rem;
    white-space: nowrap;
}
#tablaEmpleados_wrapper .dataTables_filter input {
    width: 140px;
    max-width: 100%;
    font-size: .8rem;
    flex: 1 1 auto;
}

/* Mobile: sin scroll horizontal, búsqueda centrada y ancho completo */
@media (max-width: 767.98px) {
    #tablaEmpleados_wrapper {
        overflow-x: hidden;
    }
    #tablaEmpleados_wrapper > .row {
        margin-left: 0;
        margin-right: 0;
    }
    /* Búsqueda en su propia fila (col-12) centrada */
    #tablaEmpleados_wrapper .dataTables_filter {
        justify-content: center;
        width: 100%;
    }
    #tablaEmpleados_wrapper .dataTables_filter label {
        width: 100%;
        max-width: 420px;    /* cap elegante en pantallas anchas de mobile */
    }
    #tablaEmpleados_wrapper .dataTables_filter input {
        width: 100%;
        max-width: 100%;
    }
}


/* ─── Modals ─────────────────────────────────────────────── */
.modal-content {
    background: var(--sac-surface);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--sac-radius);
}

.modal-header {
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.modal-footer {
    border-top: 1px solid rgba(255,255,255,.08);
}

/* ─── Form controls ─────────────────────────────────────── */
.form-control,
.form-select {
    background-color: var(--sac-surface2);
    border: 1px solid rgba(255,255,255,.12);
    color: var(--sac-text);
    border-radius: .6rem;
    transition: border-color var(--sac-transition), box-shadow var(--sac-transition);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--sac-surface2);
    border-color: var(--sac-accent);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}

.form-label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--sac-text-muted);
    margin-bottom: .35rem;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
    background: var(--sac-accent);
    border-color: var(--sac-accent);
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--sac-accent-hover);
    border-color: var(--sac-accent-hover);
}

/* ─── Page titles ────────────────────────────────────────── */
.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .25rem;
}

.page-subtitle {
    font-size: .875rem;
    color: var(--sac-text-muted);
    margin-bottom: 1.5rem;
}

/* ─── Foto empleado thumbnail ────────────────────────────── */
.foto-thumb {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.1);
}

.foto-placeholder {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--sac-surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sac-text-muted);
    font-size: 1.1rem;
}

/* ─── Gafete (badge digital) — Tarjeta ISO 85.6×54mm ─────── */
.gafete-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Wrapper con guías de corte (crop marks) para captura */
.gafete-crop-wrapper {
    position: relative;
    /* Tarjeta ISO: 323×204px @96dpi ≈ 85.6×54mm */
    width: 323px;
    height: 204px;
}

/* Crop marks — 4 esquinas */
.gafete-crop-wrapper::before,
.gafete-crop-wrapper::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: rgba(150,150,150,.5);
    border-style: solid;
    z-index: 10;
}
.gafete-crop-wrapper::before {
    top: -5px; left: -5px;
    border-width: 1px 0 0 1px;
}
.gafete-crop-wrapper::after {
    bottom: -5px; right: -5px;
    border-width: 0 1px 1px 0;
}

/* La tarjeta en sí — ocupa exactamente el wrapper */
.gafete-tarjeta {
    width: 323px;
    height: 204px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.55);
    position: absolute;
    top: 0; left: 0;
    background: #fff;
    color: #1a1a1a;
    transition: opacity .25s ease, transform .25s ease;
}

/* ── Anverso layout ── */
.gafete-anverso {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
}

/* Franja lateral de color */
.gafete-strip {
    width: 28px;
    min-height: 100%;
    background: linear-gradient(180deg, #1e40af 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gafete-strip-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: .42rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.7);
    white-space: nowrap;
}

/* Cuerpo del anverso */
.gafete-anverso-body {
    flex: 1;
    display: flex;
    flex-direction: row;
    padding: 10px 10px 10px 8px;
    gap: 8px;
    overflow: hidden;
}

/* Columna izquierda: foto + QR */
.gafete-col-foto {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 82px;
    flex-shrink: 0;
}

.gafete-foto-nueva {
    width: 76px;
    height: 76px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #3b82f6;
    display: block;
}

.gafete-col-foto .gafete-clave-badge {
    font-size: .58rem;
    font-weight: 800;
    font-family: monospace;
    background: #1e40af;
    color: #fff;
    border-radius: 4px;
    padding: 1px 5px;
    letter-spacing: .05em;
    text-align: center;
    width: 100%;
}

/* Columna derecha: datos */
.gafete-col-datos {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-width: 0;
}

.gafete-header-empresa {
    border-bottom: 1.5px solid #3b82f6;
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.gafete-empresa-nombre {
    font-size: .6rem;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gafete-empresa-logo {
    max-height: 22px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin-bottom: 2px;
}

.gafete-empleado-nombre {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #111;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gafete-empleado-nombres {
    font-size: .62rem;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gafete-empleado-puesto {
    font-size: .6rem;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gafete-campo-row {
    display: flex;
    gap: 3px;
    align-items: baseline;
}

.gafete-campo-label {
    font-size: .5rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
    flex-shrink: 0;
    width: 28px;
}

.gafete-campo-valor {
    font-size: .55rem;
    font-family: monospace;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.gafete-footer-vigencia {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f7ff;
    border-radius: 4px;
    padding: 2px 5px;
    margin-top: 3px;
}

.gafete-vig-label {
    font-size: .48rem;
    font-weight: 700;
    color: #3b82f6;
    text-transform: uppercase;
}

.gafete-vig-fecha {
    font-size: .52rem;
    font-weight: 700;
    font-family: monospace;
    color: #1e40af;
}

.gafete-vig-fecha.vencida {
    color: #dc2626;
}

/* ── Reverso layout ── */
.gafete-reverso-nueva {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px;
    gap: 6px;
    text-align: center;
}

.gafete-reverso-qr {
    background: #fff;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gafete-reverso-qr img,
.gafete-reverso-qr canvas {
    width: 90px !important;
    height: 90px !important;
}

.gafete-reverso-clave {
    font-size: .9rem;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: .12em;
    color: #60a5fa;
}

.gafete-reverso-vigencia {
    font-size: .52rem;
    color: rgba(255,255,255,.6);
    letter-spacing: .03em;
}

.gafete-reverso-instruccion {
    font-size: .48rem;
    color: rgba(255,255,255,.4);
    max-width: 200px;
    line-height: 1.4;
}

.gafete-reverso-armas {
    font-size: .5rem;
    color: #fbbf24;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 4px;
    width: 100%;
}

/* Ocultar tarjeta inactiva */
.gafete-tarjeta.d-none {
    display: none !important;
}



/* ─── Verification page ──────────────────────────────────── */
.verify-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--sac-surface);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: var(--sac-shadow);
}

.verify-foto {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--sac-accent);
    margin: 0 auto 1rem;
    display: block;
}

/* ─── Alerts con ícono ──────────────────────────────────── */
.sac-alert {
    border-radius: var(--sac-radius);
    font-size: .9rem;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
}

/* ─── Loader spinner en botón ────────────────────────────── */
.btn-loading .spinner-border {
    width: 1rem; height: 1rem;
    border-width: .15em;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .sac-sidebar {
        transform: translateX(-100%);
    }

    .sac-sidebar.show {
        transform: translateX(0);
    }

    #page-content {
        margin-left: 0;
    }
}

/* ─── Login / Auth pages ─────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    background: var(--sac-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--sac-surface);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: var(--sac-shadow);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo .sac-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--sac-accent);
    letter-spacing: -.03em;
}

.auth-logo .sac-tagline {
    font-size: .8rem;
    color: var(--sac-text-muted);
    margin-top: .25rem;
}

/* ─── Error pages ────────────────────────────────────────── */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sac-bg);
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 7rem;
    font-weight: 800;
    color: var(--sac-accent);
    line-height: 1;
    opacity: .15;
}

/* ─── Animaciones ────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn .3s ease forwards;
}

.sac-main > * {
    animation: fadeIn .25s ease;
}

/* ─── DataTables: fila de filtros por columna ────────────── */
tr.dt-filters th {
    padding: .35rem .4rem !important;
    background: rgba(255,255,255,.025);
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
}

tr.dt-filters input.form-control {
    background: var(--sac-surface2);
    border: 1px solid rgba(255,255,255,.1);
    color: var(--sac-text);
    border-radius: .45rem;
    font-size: .78rem;
    padding: .25rem .5rem;
    height: auto;
}

tr.dt-filters input.form-control:focus {
    border-color: var(--sac-accent);
    box-shadow: 0 0 0 2px rgba(59,130,246,.2);
    outline: none;
}

/* ─── DataTables: botón Exportar XLSX ────────────────────── */
.dt-buttons .btn {
    font-size: .82rem;
    font-weight: 500;
    border-radius: .5rem;
    padding: .35rem .85rem;
}

.dt-buttons .btn-outline-success {
    color: #4ade80;
    border-color: rgba(74,222,128,.4);
}

.dt-buttons .btn-outline-success:hover {
    background: rgba(74,222,128,.12);
    color: #4ade80;
    border-color: rgba(74,222,128,.6);
}

@keyframes spinOnce {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin-once {
    animation: spinOnce .6s ease-out forwards;
    display: inline-block;
}
