/*
   SISTEMA WEB "EVENTOS CAROLINA MEJÍA C28"
   DISEÑO GRÁFICO PREMIUM - LÍNEA GRÁFICA CAROLINA C28
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #1a237e; /* Azul Añil (Indigo Profundo) */
    --primary-hover: #121856;
    --secondary-color: #3f51b5; /* Azul Añil Medio */
    --accent-color: #304ffe; /* Añil Eléctrico */
    --accent-hover: #1a237e;
    --gold-accent: #ffc107; /* Dorado de realce */
    --dark-bg: #0f172a;
    --light-bg: #f8fafc; /* Blanco Puro / Slate suave */
    --card-bg: rgba(255, 255, 255, 0.96); /* Blanco Premium */
    --sidebar-width: 280px;
    --text-dark: #0f172a; /* Slate Oscuro */
    --text-muted: #475569;
    --border-radius: 16px;
    --transition-speed: 0.3s;
    --box-shadow: 0 10px 30px rgba(26, 35, 126, 0.04);
    --glass-blur: blur(8px);
    --sidebar-collapsed-width: 95px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* GRADIENT TEXTS & BACKGROUNDS */
.bg-c28-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.text-c28-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* AUTH / LOGIN PAGE */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #090b20 0%, #1a237e 100%);
    position: relative;
    padding: 20px;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(48, 79, 254, 0.15) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    z-index: 1;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(63, 81, 181, 0.15) 0%, transparent 70%);
    bottom: 10%;
    right: 10%;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border: 1px solid rgba(26, 35, 126, 0.08);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    color: var(--text-dark);
    z-index: 10;
    position: relative;
}

.auth-card .form-control {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-dark);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all var(--transition-speed);
}

.auth-card .form-control:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    color: var(--text-dark);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.15);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo img {
    max-width: 130px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.btn-c28-primary {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.2);
}

.btn-c28-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.35);
    color: white;
    opacity: 0.95;
}

.btn-c28-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 12px;
    transition: all var(--transition-speed);
}

.btn-c28-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* SIDEBAR LAYOUT */
.wrapper {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: linear-gradient(180deg, #121856 0%, #0a0d31 100%);
    color: #fff;
    transition: all var(--transition-speed);
    position: fixed;
    height: 100vh;
    z-index: 999;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

#sidebar.active {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.sidebar-header img {
    max-width: 140px;
}

.sidebar-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
}

.sidebar-logo-img {
    width: 100%;
    max-width: 190px;
    height: auto;
    border-radius: 12px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
    transition: transform 0.3s;
}

.sidebar-logo-img:hover {
    transform: scale(1.03);
}

/* COORDINACIÓN DE ORGANIZACIÓN BADGE */
.sidebar-coord-badge {
    margin: 12px 0 0 0;
    background: linear-gradient(135deg, rgba(230, 59, 15, 0.20) 0%, rgba(230, 59, 15, 0.08) 100%);
    border: 1px solid rgba(230, 59, 15, 0.40);
    border-radius: 10px;
    padding: 8px 12px;
    color: #ff8a65;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
}

.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-user .user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: white;
    margin-right: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 14px 24px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

#sidebar ul li a i {
    margin-right: 15px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-left-color: var(--accent-color);
}

/* MAIN CONTENT */
#content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    transition: all var(--transition-speed);
}

#content.active {
    margin-left: 0;
}

/* GLASS CARD STYLING */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 56, 168, 0.08);
}

.glass-card .card-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(0, 56, 168, 0.1);
    padding-bottom: 10px;
}

/* METRIC CARDS */
.metric-card {
    border-radius: var(--border-radius);
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-speed);
    border: none;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.metric-card i {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 4.5rem;
    opacity: 0.15;
}

.metric-card .metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    font-family: 'Outfit', sans-serif;
}

.metric-card .metric-value.metric-value-sm {
    font-size: 1.8rem;
}

.metric-card .metric-label {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    font-weight: 600;
}

.bg-metric-blue {
    background: linear-gradient(135deg, #1a237e 0%, #3f51b5 100%);
}

.bg-metric-pink {
    background: linear-gradient(135deg, #283593 0%, #5c6bc0 100%);
}

.bg-metric-cyan {
    background: linear-gradient(135deg, #303f9f 0%, #7986cb 100%);
}

.bg-metric-gold {
    background: linear-gradient(135deg, #3f51b5 0%, #9fa8da 100%);
}

/* DATATABLES BEAUTIFICATION */
.table-responsive {
    border-radius: 12px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

table.dataTable {
    border-collapse: collapse !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    background-color: white;
}

table.dataTable thead {
    background: var(--primary-color);
    color: white;
}

table.dataTable thead th {
    padding: 14px 18px !important;
    font-weight: 600;
    border-bottom: none !important;
}

table.dataTable tbody td {
    padding: 12px 18px !important;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

table.dataTable tbody tr:hover {
    background-color: rgba(0, 86, 179, 0.03) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px;
    font-weight: 600;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    background-color: #fff !important;
    outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 5px rgba(0, 168, 232, 0.2);
}

/* FORM ELEMENTS */
.form-label {
    font-weight: 600;
    color: var(--text-dark);
}

.form-select, .form-control {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    transition: all var(--transition-speed);
}

.form-select:focus, .form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.15);
}

/* ALERT STYLING */
.alert-c28 {
    border-radius: 12px;
    border: none;
    font-weight: 500;
}

/* MODAL STYLING */
.modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: var(--primary-color);
    color: white;
    border-bottom: none;
    padding: 20px 24px;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 16px 24px;
}

/* LOADER / SEARCH INDICATOR */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: .25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
    color: var(--accent-color);
}

/* FORCED CHANGE PASSWORD LOCK */
.lock-banner {
    background: linear-gradient(90deg, #ff007f 0%, #ff5c8d 100%);
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* UTILITY CLASSES */
.badge-role {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.badge-super_admin {
    background-color: rgba(233, 30, 99, 0.15);
    color: var(--accent-color);
}

.badge-admin {
    background-color: rgba(0, 56, 168, 0.1);
    color: var(--primary-color);
}

.badge-operador {
    background-color: rgba(0, 168, 232, 0.15);
    color: #007bb3;
}

.badge-consulta {
    background-color: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-activo {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.badge-inactivo {
    background-color: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.badge-finalizado {
    background-color: rgba(127, 140, 141, 0.15);
    color: #7f8c8d;
}

.badge-cancelado {
    background-color: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

/* BRANDING & LOGOS */
.logo-c28-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.prm-logo-accent {
    max-height: 45px;
}

.c28-logo-accent {
    max-height: 45px;
}

@media (min-width: 992px) {
    /* Estado permanente (ancho fijo de 95px) */
    #sidebar {
        min-width: 95px;
        max-width: 95px;
        overflow-x: hidden;
    }

    /* Contenedor principal ajustado al nuevo ancho */
    #content {
        margin-left: 95px;
    }

    /* 1. Enlaces en columna: Icono arriba, texto abajo */
    #sidebar ul li a {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 14px 5px;
        text-align: center;
        border-left: 4px solid transparent; /* Mantiene la barra indicadora de activo */
    }

    #sidebar ul li a i {
        margin-right: 0;
        margin-bottom: 6px;
        font-size: 1.4rem;
    }

    /* 2. Texto del menú siempre visible y pequeño */
    .menu-text {
        display: block;
        font-size: 0.7rem;
        line-height: 1.2;
        white-space: normal;
        opacity: 0.85;
    }

    /* 3. Ocultar los textos largos (nombre de usuario y badge) */
    .user-info-text,
    .sidebar-coord-badge {
        display: none;
    }

    /* 4. Ajustar Header, Logo y Avatar al centro */
    .sidebar-header {
        padding: 15px 5px;
    }

    .sidebar-logo-img {
        max-width: 65px;
    }

    .sidebar-user {
        justify-content: center;
        padding: 15px 0;
    }

    .user-avatar {
        margin-right: 0;
        width: 40px;
        height: 40px;
    }
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 991.98px) {
    #sidebar {
        min-width: var(--sidebar-width) !important;
        max-width: var(--sidebar-width) !important;
        margin-left: calc(-1 * var(--sidebar-width));
    }

    #sidebar.active {
        margin-left: 0;
    }

    /* Restauramos el tamaño original del logo */
    .sidebar-logo-img {
        max-width: 160px !important;
    }

    /* En móvil es fila (Icono a la izquierda, texto a la derecha) */
    #sidebar ul li a {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 14px 24px;
        text-align: left;
    }

    #sidebar ul li a i {
        margin-right: 15px;
        margin-bottom: 0;
        font-size: 1.2rem;
    }

    .menu-text {
        font-size: 1.05rem;
        white-space: nowrap;
    }

    /* Aseguramos que los textos ocultos en escritorio se vean en móvil */
    .user-info-text {
        display: block;
    }

    .sidebar-coord-badge {
        display: flex;
    }

    #content {
        margin-left: 0;
        padding: 10px;
    }

    #content.active {
        margin-left: var(--sidebar-width);
    }

    .navbar-toggler-c28 {
        display: block !important;
    }
}

.navbar-toggler-c28 {
    display: none;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* SIDEBAR LOGO - tighten padding for real logo */
.sidebar-header {
    padding: 16px 16px 14px 16px;
}

/* CLICKABLE EVENT ROWS */
.evento-row {
    transition: background-color 0.18s, transform 0.15s;
}

.evento-row:hover {
    background-color: rgba(26, 35, 126, 0.04) !important;
}

.evento-link {
    font-size: 0.95rem;
    transition: color 0.2s;
}

.evento-link:hover {
    color: var(--accent-color) !important;
}

/* EVENT PROFILE HERO CARD */
.evento-hero-card {
    position: relative;
    background: linear-gradient(135deg, #121856 0%, #1a237e 60%, #3f51b5 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(26, 35, 126, 0.2);
    margin-bottom: 0;
}

.evento-hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.evento-hero-content {
    position: relative;
    z-index: 2;
    padding: 36px 40px;
}

.evento-hero-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.9rem;
    color: #ffffff;
    line-height: 1.2;
    margin: 10px 0 8px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.evento-hero-location {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.evento-hero-geo {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.evento-asistencia-counter {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px 30px;
    backdrop-filter: blur(8px);
    min-width: 130px;
}

.counter-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    color: #ffffff;
    line-height: 1;
}

.counter-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* SMALL USER AVATAR (event profile) */
.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

/* MODAL DATA BLOCKS (attendee detail) */
.modal-data-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    height: 100%;
}

.modal-data-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #94a3b8;
    margin-bottom: 5px;
}

.modal-data-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}


/* PRINT MEDIA CONFIGURATION (Strict A4 Layout) */
@media print {
    body {
        background-color: white !important;
        color: black !important;
        font-size: 12pt;
    }

    #sidebar, .navbar-toggler-c28, .btn, .dataTables_length, .dataTables_filter, .dataTables_info, .dataTables_paginate, .card-title::after, .filter-section {
        display: none !important;
    }

    #content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .glass-card {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    table.dataTable {
        width: 100% !important;
        border: 1px solid #000 !important;
    }

    table.dataTable thead {
        background: #f1f5f9 !important;
        color: #000 !important;
    }

    table.dataTable thead th, table.dataTable tbody td {
        border: 1px solid #ccc !important;
        padding: 8px !important;
    }
}

/* RESPONSIVE TABLE DATA WRAPPING OVERRIDES */
@media (max-width: 767.98px) {
    table.dataTable tbody td, table.dataTable thead th {
        white-space: nowrap; /* Prevent ugly wrapping for code values like Cédula and phone */
    }

    table.dataTable tbody td:first-child,
    table.dataTable tbody td.allow-wrap {
        white-space: normal; /* Allow full names and text fields to wrap naturally */
        /*min-width: 150px;*/
    }
}

/* PREMIUM DATATABLES RESPONSIVE STYLE SYSTEM */
.dt-responsive {
    border-radius: 12px;
    overflow: auto !important;
    width: 100% !important;
}

/* Base control column styling to accommodate premium button */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
    position: relative;
    padding-left: 42px !important;
    cursor: pointer;
}

/* Modern circular expand (+) button with high-end gradient and shadow */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    top: 50% !important;
    left: 12px !important;
    height: 20px !important;
    width: 20px !important;
    margin-top: -10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35) !important;
    box-sizing: border-box !important;
    text-align: center;
    text-indent: 0 !important;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
    line-height: 1 !important;
    content: "+" !important;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important; /* Premium brand indigo/blue gradient */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

/* Modern circular collapse (-) button when row is expanded */
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control::before {
    content: "-" !important;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important; /* Premium warning/danger red gradient */
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35) !important;
    transform: rotate(180deg) !important;
}

/* Interactive hover feedback on the toggle button */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:hover::before {
    transform: scale(1.18);
    filter: brightness(1.1);
}

/* Reset standard table child row border & background */
table.dataTable > tbody > tr.child {
    background-color: transparent !important;
}

table.dataTable > tbody > tr.child:hover {
    background-color: transparent !important;
}

table.dataTable > tbody > tr.child td.child {
    padding: 16px 20px !important;
    background-color: #f8fafc !important; /* Premium slate bg for contrast */
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Modern CSS Grid of white cards for details */
table.dataTable > tbody > tr.child ul.dtr-details {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 12px !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Style each collapsed detail row as a mini premium card */
table.dataTable > tbody > tr.child ul.dtr-details > li {
    background: #ffffff !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    border-bottom: none !important; /* Override standard DT underline */
}

/* Slate uppercase title in cards */
table.dataTable > tbody > tr.child span.dtr-title {
    font-weight: 700 !important;
    color: #64748b !important; /* slate-500 */
    font-size: 0.72rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Dark bold data in cards */
table.dataTable > tbody > tr.child span.dtr-data {
    font-weight: 600 !important;
    color: #0f172a !important; /* slate-900 */
    font-size: 0.88rem !important;
    word-break: break-all !important;
}

.invalid-feedback {
    font-size: 12px;
    color: #58151c;
    font-weight: 600 !important;
}

.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-link:hover {
    color: #fff;
    background-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
}

.container-tabla {
    container-type: inline-size;
}

/* Estado móvil */
.tb-desktop-cell {
    display: none;
}

.tb-mobile-only {
    display: table-cell;
}

/* Cuando el contenedor tenga suficiente ancho */
@container (min-width: 900px) {

    .tb-desktop-cell {
        display: table-cell;
    }

    .tb-mobile-only {
        display: none;
    }
}

/* RESPONSIVE METRIC CARDS OVERRIDES (MOBILE 768px AND BELOW) */
@media (max-width: 767.98px) {
    /* Enforce exact same height and spacing for all 4 cards to keep them perfectly aligned */
    .metric-card {
        padding: 16px 8px !important;
        min-height: 105px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* Make standard single digit metric values slightly smaller so they fit beautifully */
    .metric-card .metric-value {
        font-size: 2rem !important;
        margin-bottom: 2px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
    }

    /* Scale long date and time values down fluidly so they never overflow or wrap */
    .metric-card .metric-value.metric-value-sm {
        font-size: 1.25rem !important; /* Date & Time fit perfectly on a single line on any screen */
    }

    /* Uniform, beautiful styling for metric labels, preventing unequal height wrapping */
    .metric-card .metric-label {
        font-size: 0.68rem !important;
        letter-spacing: 0.5px !important;
        line-height: 1.2 !important;
        opacity: 0.85 !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        width: 100% !important;
        text-align: center !important;
    }

    /* Scale down the absolute font awesome background icons */
    .metric-card i {
        font-size: 2.2rem !important;
        right: 8px !important;
        bottom: 8px !important;
    }
}


