/* Sistema de Gestión de Itinerarios Formativos - Estilos */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    color: var(--dark-color);
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1rem;
}

.form-group .required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.05rem;
    transition: border-color 0.3s;
    min-height: 44px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table thead {
    background-color: var(--light-color);
}

.table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.table-info {
    width: 100%;
    border-collapse: collapse;
}

.table-info th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    width: 40%;
}

.table-info td {
    padding: 10px;
    color: var(--dark-color);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

/* Row Layout */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.col-md-6 {
    width: 100%;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 0.9rem;
    }

    .table th,
    .table td {
        padding: 8px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

/* ============================================
   BADGES CON CLASES bg-* (Bootstrap)
   Asegurar texto blanco en fondos oscuros
   ============================================ */

/* Badges con fondo oscuro → texto blanco */
.badge.bg-primary,
.badge.bg-success,
.badge.bg-info,
.badge.bg-danger,
.badge.bg-dark {
    color: #ffffff !important;
}

/* Badges con fondo claro → texto oscuro */
.badge.bg-warning,
.badge.bg-light {
    color: #212529 !important;
}

/* Badge secondary puede variar, pero generalmente texto blanco */
.badge.bg-secondary {
    color: #ffffff !important;
}

/* ============================================
   ESTILOS PARA BOTONES OUTLINE
   ============================================ */

/* Botones outline-primary - borde visible y color completo al hover */
.btn.btn-outline-primary,
a.btn.btn-outline-primary,
button.btn.btn-outline-primary {
    border: 2px solid #3b82f6 !important;
    color: #3b82f6 !important;
    background-color: transparent !important;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn.btn-outline-primary:hover,
a.btn.btn-outline-primary:hover,
button.btn.btn-outline-primary:hover {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

/* Estado activo (p. ej. IND1–IND4 en asistencias): el transparent !important de arriba ocultaba .active de Bootstrap */
.btn.btn-outline-primary.active,
a.btn.btn-outline-primary.active,
button.btn.btn-outline-primary.active,
.btn.btn-outline-primary.active:focus,
a.btn.btn-outline-primary.active:focus,
button.btn.btn-outline-primary.active:focus {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
    text-decoration: none;
}

.btn.btn-outline-primary.active:hover,
a.btn.btn-outline-primary.active:hover,
button.btn.btn-outline-primary.active:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    transform: translateY(-1px);
    text-decoration: none;
}

/* Botones outline-secondary */
.btn.btn-outline-secondary,
a.btn.btn-outline-secondary,
button.btn.btn-outline-secondary {
    border: 2px solid #64748b !important;
    color: #64748b !important;
    background-color: transparent !important;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn.btn-outline-secondary:hover,
a.btn.btn-outline-secondary:hover,
button.btn.btn-outline-secondary:hover {
    background-color: #64748b !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(100, 116, 139, 0.3);
    text-decoration: none;
}

/* Botones outline-success */
.btn.btn-outline-success,
a.btn.btn-outline-success,
button.btn.btn-outline-success {
    border: 2px solid #10b981 !important;
    color: #10b981 !important;
    background-color: transparent !important;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn.btn-outline-success:hover,
a.btn.btn-outline-success:hover,
button.btn.btn-outline-success:hover {
    background-color: #10b981 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    text-decoration: none;
}

/* Botones outline-danger */
.btn.btn-outline-danger,
a.btn.btn-outline-danger,
button.btn.btn-outline-danger {
    border: 2px solid #ef4444 !important;
    color: #ef4444 !important;
    background-color: transparent !important;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn.btn-outline-danger:hover,
a.btn.btn-outline-danger:hover,
button.btn.btn-outline-danger:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
    text-decoration: none;
}

/* Botones outline-warning */
.btn.btn-outline-warning,
a.btn.btn-outline-warning,
button.btn.btn-outline-warning {
    border: 2px solid #f59e0b !important;
    color: #f59e0b !important;
    background-color: transparent !important;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn.btn-outline-warning:hover,
a.btn.btn-outline-warning:hover,
button.btn.btn-outline-warning:hover {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
    text-decoration: none;
}

/* Botones outline-info */
.btn.btn-outline-info,
a.btn.btn-outline-info,
button.btn.btn-outline-info {
    border: 2px solid #3b82f6 !important;
    color: #3b82f6 !important;
    background-color: transparent !important;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn.btn-outline-info:hover,
a.btn.btn-outline-info:hover,
button.btn.btn-outline-info:hover {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

/* ============================================
   CORRECCIONES GENERALES DE COLORES Y TEXTO
   ============================================ */

/* Asegurar que el texto del dashboard sea visible y que el footer sea visible en páginas cortas */
.dashboard-main-wrapper {
    flex-wrap: nowrap;
}
.dashboard-body {
    flex: 1;
    min-height: 0;
}
.dashboard-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(0,0,0,0.08);
}
.dashboard-body,
.dashboard-body * {
    color: inherit;
}

.dashboard-body h1,
.dashboard-body h2,
.dashboard-body h3,
.dashboard-body h4,
.dashboard-body h5,
.dashboard-body h6 {
    color: #1e293b !important;
}

.dashboard-body p,
.dashboard-body span,
.dashboard-body label {
    color: #475569;
}

.dashboard-body .card {
    background-color: #fff;
}

.dashboard-body .card-header h4 {
    color: #1e293b !important;
}

.dashboard-body .card-body {
    color: #1e293b;
}

/* Botones principales */
.btn-main {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #fff !important;
}

.btn-main:hover {
    background-color: #059669 !important;
    border-color: #059669 !important;
}

/* Links */
.dashboard-body a:not(.btn) {
    color: #0d9488;
}

.dashboard-body a:not(.btn):hover {
    color: #0f766e;
}

/* ============================================
   SIDEBAR SUBMENU STYLES - Dashboard Layout
   Funciona con jQuery slideToggle de main-.js
   ============================================ */

/* Sidebar: flex para que el menú pueda hacer scroll hasta el final (Recursos, Cuenta, Mi Perfil) */
.sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
}
.sidebar .sidebar__logo {
    flex-shrink: 0;
}
.sidebar .sidebar-menu-wrapper {
    flex: 1;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Menú principal: sin viñetas ni puntos de lista */
.sidebar .sidebar-menu,
.sidebar .sidebar-menu .sidebar-menu__item {
    list-style: none !important;
}

/* Submenú del Sidebar */
.sidebar .sidebar-submenu {
    padding-left: 12px !important;
    margin-left: 12px !important;
    margin-top: 8px !important;
    background-color: rgba(0,0,0,0.02);
    border-radius: 0 0 8px 8px;
    border-left: 2px solid rgba(16, 185, 129, 0.3);
    list-style: none;
}

/* Items del submenú */
.sidebar .sidebar-submenu__item {
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: 4px !important;
}

/* Links del submenú */
.sidebar .sidebar-submenu__link {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 12px !important;
    color: #475569 !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 4px;
}

.sidebar .sidebar-submenu__link::before {
    display: none !important;
}

.sidebar .sidebar-submenu__link:hover {
    color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.1) !important;
    padding-left: 16px !important;
}

.sidebar .sidebar-submenu__link.active,
.sidebar .sidebar-submenu__item.activePage .sidebar-submenu__link {
    color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.15) !important;
    font-weight: 600 !important;
}

.sidebar .sidebar-submenu__link i {
    font-size: 1rem;
    min-width: 18px;
    color: inherit;
}

/* Títulos de sección dentro del submenú */
.sidebar .sidebar-submenu__title {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 4px 12px !important;
    color: #1e293b !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.sidebar .sidebar-submenu__item:first-child .sidebar-submenu__title {
    margin-top: 0;
    border-top: none;
    padding-top: 4px !important;
}

.sidebar .sidebar-submenu__title i {
    font-size: 0.875rem;
    color: #10b981 !important;
}

/* Estado activo del dropdown padre */
.sidebar .sidebar-menu__item.has-dropdown.activePage > .sidebar-menu__link {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}

/* ============================================
   DASHBOARD CARD IMPROVEMENTS
   ============================================ */

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: hsl(var(--main));
}

.stats-card .icon-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.stats-card .icon-box.bg-main {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stats-card .icon-box.bg-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stats-card .icon-box.bg-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stats-card .icon-box.bg-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    border: none;
    padding: 0;
}

.stats-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   IMPROVED TABLE STYLES
   ============================================ */

/* Asegurar colores de texto en tablas */
.table tbody td {
    color: #1e293b !important;
    vertical-align: middle;
}

.table thead th {
    color: #1e293b !important;
    font-weight: 600;
    background-color: #f8fafc;
}

/* ============================================
   DATATABLES - Estilos Completos
   ============================================ */

.dataTables_wrapper {
    color: #1e293b !important;
    font-size: 14px;
}

/* Contenedor superior con controles (length + filter) */
.dataTables_wrapper .dt-layout-row:first-child,
.dataTables_wrapper > .row:first-child {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px;
    margin-bottom: 24px !important;
    padding: 16px 20px !important;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* Selector de cantidad de registros */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dt-length {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dt-length label {
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    margin: 0 !important;
    font-weight: 500;
    font-size: 14px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dt-length select {
    border: 1px solid #e0e0e0 !important;
    border-radius: 999px !important;
    padding: 10px 20px !important;
    color: #1e293b !important;
    background-color: #fff !important;
    font-size: 14px !important;
    cursor: pointer;
    min-width: 70px;
    height: 44px !important;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px !important;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dt-length select:focus {
    outline: none;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Buscador */
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dt-search {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dt-search label {
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    margin: 0 !important;
    font-weight: 500;
    font-size: 14px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dt-search input {
    border: 1px solid #e0e0e0 !important;
    border-radius: 999px !important;
    padding: 10px 24px 10px 42px !important;
    color: #1e293b !important;
    background-color: #fff !important;
    font-size: 14px !important;
    min-width: 240px;
    height: 44px !important;
    box-shadow: none;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m21 21l-4.35-4.35M11 19a8 8 0 1 0 0-16a8 8 0 0 0 0 16z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
}

.dataTables_wrapper .dataTables_filter input::placeholder,
.dataTables_wrapper .dt-search input::placeholder {
    color: #9ca3af !important;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dt-search input:focus {
    outline: none;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dt-search input:focus {
    outline: none;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.dataTables_wrapper .dataTables_filter input::placeholder {
    color: #9ca3af;
}

/* Contenedor inferior con info y paginación */
.dataTables_wrapper .dt-layout-row:last-child,
.dataTables_wrapper > .row:last-child {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px;
    margin-top: 0 !important;
    margin-bottom: 0;
    padding: 20px !important;
    background-color: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

/* Información de registros */
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dt-info {
    color: #475569 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 0 !important;
}

/* Paginación */
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dt-paging {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 !important;
}

.dataTables_wrapper .dataTables_paginate span,
.dataTables_wrapper .dt-paging nav {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Botones de paginación */
.dataTables_wrapper .paginate_button,
.dataTables_wrapper .dt-paging-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    color: #475569 !important;
    background-color: transparent !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

.dataTables_wrapper .paginate_button:hover,
.dataTables_wrapper .dt-paging-button:hover {
    background-color: #f0fdf4 !important;
    color: #10b981 !important;
}

.dataTables_wrapper .paginate_button.current,
.dataTables_wrapper .dt-paging-button.current {
    background-color: #10b981 !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.dataTables_wrapper .paginate_button.disabled,
.dataTables_wrapper .dt-paging-button.disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background-color: transparent !important;
    color: #9ca3af !important;
}

/* Ellipsis */
.dataTables_wrapper .ellipsis {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    height: 44px !important;
    color: #6b7280 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .dataTables_wrapper .dt-layout-row:first-child,
    .dataTables_wrapper > .row:first-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
        padding: 12px 16px !important;
    }
    
    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dt-search input {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    .dataTables_wrapper .dt-layout-row:last-child,
    .dataTables_wrapper > .row:last-child {
        flex-direction: column !important;
        gap: 12px;
        padding: 16px !important;
    }
    
    .dataTables_wrapper .dataTables_paginate,
    .dataTables_wrapper .dt-paging {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    .dataTables_wrapper .dataTables_paginate,
    .dataTables_wrapper .dt-paging {
        justify-content: center !important;
        flex-wrap: wrap !important;
        width: 100%;
    }
}

/* Botones de acción en tablas */
.table .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.table .btn i {
    font-size: 1rem;
}

/* Custom action buttons in tables */
.action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btns .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* ============================================
   DATATABLES TABLE STYLING
   ============================================ */

/* Card contenedora de la tabla */
.card.overflow-hidden {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

/* Tabla principal */
.table-striped {
    margin-bottom: 0 !important;
}

.table-striped thead {
    background-color: #f8fafc;
}

.table-striped thead th {
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 20px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    white-space: nowrap;
}

.table-striped tbody td {
    padding: 16px 20px !important;
    vertical-align: middle;
    color: #475569;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9 !important;
}

.table-striped tbody tr:hover {
    background-color: #f8fafc !important;
}

/* Quitar el efecto zebra striped si lo hay */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: transparent;
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: #f8fafc !important;
}

/* Card body sin padding cuando tiene tabla */
.card-body.p-0 {
    padding: 0 !important;
}

/* Card footer para paginación */
.card-footer {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 16px 20px;
}

/* ============================================
   FORM IMPROVEMENTS
   ============================================ */

/* Form card wrapper */
.form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}

.form-card .card-header {
    background-color: #f8fafc;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.form-card .card-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark-color);
}

.form-card .card-body {
    padding: 24px;
}

/* Better input focus states */
.form-control:focus,
.form-select:focus {
    border-color: hsl(var(--main)) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Spacing utilities */
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }

/* Flex utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-align {
    display: flex;
    align-items: center;
}

.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

/* Border utilities */
.border-gray-100 {
    border-color: var(--border-color) !important;
}

/* Background utilities */
.bg-main-50 {
    background-color: rgba(16, 185, 129, 0.1) !important;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1199px) {
    .sidebar-submenu {
        padding-left: 15px;
    }
}

@media (max-width: 991px) {
    .stats-card {
        padding: 20px;
    }
    
    .stats-card h3 {
        font-size: 1.5rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Card hover effect */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* ============================================
   CHECKBOX PERSONALIZADO - Sistema propio
   ============================================ */

/* Contenedor del item seleccionable */
.competencia-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.competencia-item:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.competencia-item.selected {
    background-color: #eff6ff;
    border-color: #3b82f6;
}

.competencia-item.selected-green {
    background-color: #f0fdf4;
    border-color: #22c55e;
}

/* Checkbox visual personalizado */
.custom-checkbox {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background-color: #fff;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.competencia-item:hover .custom-checkbox {
    border-color: #94a3b8;
}

.competencia-item.selected .custom-checkbox {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.competencia-item.selected-green .custom-checkbox {
    background-color: #22c55e;
    border-color: #22c55e;
}

.custom-checkbox i {
    color: #fff;
    font-size: 14px;
    display: none;
}

.competencia-item.selected .custom-checkbox i,
.competencia-item.selected-green .custom-checkbox i {
    display: block;
}

/* Label de la competencia */
.competencia-label {
    flex: 1;
    font-size: 0.9em;
    line-height: 1.5;
    color: #334155;
}

.competencia-label strong {
    font-weight: 600;
}

/* Input oculto */
.competencia-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* ============================================
   CHECKBOX ESTÁNDAR - Periodos y otros
   ============================================ */

/* Reseteo completo para form-check */
.periodos-container .form-check,
.form-check-custom {
    display: flex !important;
    align-items: center !important;
    padding: 8px 12px !important;
    margin-bottom: 8px !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

.periodos-container .form-check:hover,
.form-check-custom:hover {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

/* Forzar visibilidad del checkbox nativo */
.periodos-container .form-check input[type="checkbox"],
.form-check-custom input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    margin-right: 10px !important;
    cursor: pointer !important;
    accent-color: #3b82f6 !important;
}

.periodos-container .form-check label,
.form-check-custom label {
    cursor: pointer !important;
    margin: 0 !important;
    font-size: 0.9em !important;
    color: #334155 !important;
}

/* ============================================
   PERIODOS - Selección visual de periodos
   ============================================ */

.periodo-item {
    cursor: pointer;
    position: relative;
}

.periodo-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.periodo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 70px;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.periodo-item:hover .periodo-box {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.periodo-item.selected .periodo-box {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.periodo-num {
    font-size: 1.4em;
    font-weight: 700;
    color: #1e293b;
}

.periodo-item.selected .periodo-num {
    color: #fff;
}

.periodo-text {
    font-size: 0.7em;
    color: #64748b;
    text-transform: uppercase;
}

.periodo-item.selected .periodo-text {
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   DATATABLES - Ocultar flechas de ordenamiento
   ============================================ */

/* Ocultar TODAS las flechas de ordenamiento en DataTables */
.dataTable thead th::before,
.dataTable thead th::after,
.dataTable thead td::before,
.dataTable thead td::after,
table.dataTable thead th::before,
table.dataTable thead th::after,
table.dataTable thead td::before,
table.dataTable thead td::after,
.dataTables_wrapper .dataTable thead th::before,
.dataTables_wrapper .dataTable thead th::after,
.dataTables_wrapper .dataTable thead td::before,
.dataTables_wrapper .dataTable thead td::after,
th.sorting::before,
th.sorting::after,
th.sorting_asc::before,
th.sorting_asc::after,
th.sorting_desc::before,
th.sorting_desc::after,
td.sorting::before,
td.sorting::after,
td.sorting_asc::before,
td.sorting_asc::after,
td.sorting_desc::before,
td.sorting_desc::after {
    display: none !important;
    content: "" !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

/* Quitar el background-image de ordenamiento */
.dataTable thead th,
.dataTable thead td,
table.dataTable thead th,
table.dataTable thead td,
th.sorting,
th.sorting_asc,
th.sorting_desc {
    background-image: none !important;
}

/* Quitar el padding extra que se agrega para las flechas */
.dataTable thead th,
.dataTable thead td,
table.dataTable thead th,
table.dataTable thead td {
    padding-right: 10px !important;
}

/* Quitar el cursor de ordenamiento */
.dataTable thead th,
table.dataTable thead th,
th.sorting,
th.sorting_asc,
th.sorting_desc {
    cursor: default !important;
}

/* ============================================
   AVATAR UPLOAD - Tamaño más grande en formularios
   ============================================ */

/* Avatar upload en formularios de perfil - tamaño más grande como en el ejemplo */
.card-body .avatar-upload .avatar-preview {
    width: 120px !important;
    height: 120px !important;
}

/* ============================================
   ESTILOS ESPECÍFICOS PARA PÁGINA DE PERFIL
   ============================================ */

/* Card de perfil - extender de borde a borde */
.dashboard-body .profile-card-full-width {
    margin-left: -24px !important;
    margin-right: -24px !important;
    border-radius: 16px 16px 0 0 !important;
    width: calc(100% + 48px) !important;
    max-width: none !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06) !important;
}

@media screen and (max-width: 1499px) {
    .dashboard-body .profile-card-full-width {
        margin-left: -16px !important;
        margin-right: -16px !important;
        width: calc(100% + 32px) !important;
    }
}

/* Card body sin padding */
.profile-card-full-width .card-body.p-0 {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* Contenedor de portada - ocupar todo el ancho */
.profile-card-full-width .cover-img {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    position: relative;
    display: block;
    overflow: hidden;
}

/* Avatar upload dentro de cover-img */
.profile-card-full-width .cover-img .avatar-upload {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
    position: relative;
}

/* Preview de la portada */
.profile-card-full-width .cover-img .avatar-upload .avatar-preview {
    width: 100% !important;
    height: 168px !important;
    min-height: 168px !important;
    border-radius: 0 !important;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
    position: relative;
}

/* Div interno de la portada con la imagen de fondo */
.profile-card-full-width .cover-img .avatar-upload .avatar-preview > div {
    width: 100% !important;
    height: 100% !important;
    min-height: 168px !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
}

/* Sección de perfil - superponer con la portada */
.profile-card-full-width .setting-profile {
    position: relative;
    margin-top: -24px !important;
    padding-top: 0 !important;
    background-color: transparent;
    z-index: 1;
}

/* Asegurar que el contenido del perfil tenga el padding correcto */
.profile-card-full-width .setting-profile.px-24 {
    padding-left: 24px !important;
    padding-right: 24px !important;
}

/* Foto de perfil - posicionamiento correcto */
.profile-card-full-width .setting-profile .position-relative img {
    display: block;
    border: 4px solid #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Botón de editar portada - asegurar z-index */
.profile-card-full-width .cover-img label[for="coverImageUpload"] {
    z-index: 10 !important;
    position: absolute !important;
}


