/*
 * SiNAP Modern Premium Theme v3.2 - Versión Completa
 * Creado por Antigravity para SiNAP
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ==========================================================
   VARIABLES CSS - MODO CLARO (default)
   ========================================================== */
:root {
    --bg-app: #e9eff5;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --primary: #356AA0;
    --primary-light: #eff6ff;
    --primary-hover: #2d5a8a;
    --secondary: #0ea5e9;
    --success: #059669;
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --danger: #e11d48;
    --danger-bg: #fff1f2;
    --danger-text: #be123c;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;
    --info: #0284c7;
    --info-bg: #f0f9ff;
    --info-text: #0369a1;
    --border-color: #cbd5e1;
    --slate-200: #0d3974;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --header-height: 72px;
    --sidebar-width: 260px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================
   VARIABLES CSS - MODO OSCURO
   Se activan instantáneamente con html[data-theme="dark"]
   ========================================================== */
html[data-theme="dark"] {
    --bg-app: #0b1120;
    --card-bg: #162032;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-light: rgba(59, 130, 246, 0.15);
    --primary-hover: #2563eb;
    --secondary: #38bdf8;
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.15);
    --success-text: #6ee7b7;
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.15);
    --danger-text: #fca5a5;
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.15);
    --warning-text: #fcd34d;
    --info: #67e8f9;
    --info-bg: rgba(103, 232, 249, 0.15);
    --info-text: #a5f3fc;
    --border-color: #2d3b52;
    --slate-200: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
}

/* ==========================================================
   BASE
   ========================================================== */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    margin: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* ==========================================================
   HEADER
   ========================================================== */
.main-header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    transition: background var(--transition-normal), border var(--transition-normal);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

html[data-theme="dark"] .main-header-nav {
    background: rgba(17, 26, 48, 0.9);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.system-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.system-logo-icon {
    width: 100px;
    height: 50px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: white;
    padding: 2px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .system-logo-icon {
    background: #1e293b;
}

.navbar-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
}

.company-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.user-nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
    /*  display: flex;
    align-items: center;
    gap: 8px;
    */
    display: inline-block;
    text-align: center;
    min-width: 50px;
}

.nav-theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-theme-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.nav-logout-btn {
    background: var(--danger-bg);
    color: var(--danger);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.nav-logout-btn:hover {
    transform: scale(1.05);
    background: var(--danger);
    color: white;
}

/* ==========================================================
   LAYOUT PRINCIPAL
   ========================================================== */
.container-home {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    margin: calc(var(--header-height) + 24px) 0 40px 0;
    padding: 24px;
    box-sizing: border-box;
    min-height: calc(100vh - var(--header-height) - 64px);
    background: transparent;
    border: none;
    position: relative;
    align-items: flex-start;
}

.container-menu {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    box-shadow: var(--shadow-lg);
    height: fit-content;
    min-height: auto;
    transition: all var(--transition-normal);
    z-index: 10;
    order: 1;
    flex-shrink: 0;
    align-self: flex-start;
}

.container-body {
    position: static;
    flex-grow: 1;
    min-width: 0;
    margin: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    min-height: 500px;
    transition: all var(--transition-normal);
    order: 2;
    width: 100%;
    align-self: flex-start;
}

/* ==========================================================
   SIDEBAR / MENU
   ========================================================== */
.aviso-menu {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 0 0 10px 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aviso-menu img {
    vertical-align: middle;
}

#cssmenu {
    border: none;
    background: transparent;
    width: 100%;
    padding: 0;
}

#cssmenu>ul>li {
    margin-bottom: 4px;
}

#cssmenu>ul>li>a {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    text-shadow: none;
}

#cssmenu>ul>li>a>span {
    border: none;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#cssmenu>ul>li>a img,
#cssmenu>ul>li>a i {
    opacity: 0.75;
    transition: all var(--transition-fast);
}

#cssmenu>ul>li>a i {
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    color: var(--text-secondary);
}

#cssmenu>ul>li>a img {
    filter: grayscale(1);
}

#cssmenu>ul>li>a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

#cssmenu>ul>li>a:hover img,
#cssmenu>ul>li>a:hover i {
    opacity: 1;
}

#cssmenu>ul>li>a:hover i {
    color: var(--primary);
}

#cssmenu>ul>li>a:hover img {
    filter: none;
}

#cssmenu>ul>li.active>a {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

#cssmenu>ul>li.active>a img,
#cssmenu>ul>li.active>a i {
    opacity: 1;
}

#cssmenu>ul>li.active>a i {
    color: white;
}

#cssmenu>ul>li.active>a img {
    filter: brightness(0) invert(1);
}

#cssmenu>ul>li.active>a span {
    border: none;
}

#cssmenu ul ul {
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-sm);
    margin: 4px 0;
    padding: 4px;
}

html[data-theme="dark"] #cssmenu ul ul {
    background: #0b1120;
}

#cssmenu ul ul li a {
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 12px 8px 36px;
    transition: all var(--transition-fast);
}

#cssmenu ul ul a:hover {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
    border: none;
}

/* ==========================================================
   DASHBOARD Y TARJETAS
   ========================================================== */
.info_panel {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--primary-light);
    padding: 0 0 12px 0;
    margin-top: 24px !important;
    margin-bottom: 4px;
    border-radius: 0;
    letter-spacing: -0.01em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 24px;
    width: 100%;
}

.aviso-user {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    width: 100%;
    height: auto;
    min-height: 9px;
    margin: 0;
    float: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.aviso-user:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.title-aviso {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    background: rgba(79, 70, 229, 0.03);
    padding: 12px 16px;
    width: 100%;
    float: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
    border-left: 5px solid transparent;
}

html[data-theme="dark"] .title-aviso {
    background: rgba(99, 102, 241, 0.05);
}

.title-aviso img {
    filter: grayscale(1) sepia(1) hue-rotate(200deg) saturate(2);
}

.title-content {
    flex-grow: 1;
    padding: 12px 16px;
    float: none;
    width: 100%;
}

#option-panel {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#option-panel li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

#option-panel li img {
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

#option-panel li a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    background: transparent;
    line-height: 1.4;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

#option-panel li:hover img {
    opacity: 1;
}

#option-panel li:hover a {
    color: var(--primary);
    transform: translateX(2px);
}

/* ============================================
   CARD: RESUMEN DE HORAS ACADÉMICAS (lista)
   ============================================ */

/* El contenedor de la lista ocupa TODO el ancho sobrante */
.hours-align {
    width: 100% !important;
    flex: 1;               /* si el padre es flex, crece */
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

/* Cada renglón empuja el valor al extremo derecho */
.hours-align li {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    gap: 16px;
    padding-right: 16px;   /* separación del borde derecho de la card */
}

/* El badge/número se pega a la derecha */
.hours-align li > span:last-child,
.hours-align li > .info-good,
.hours-align li > .info-danger {
    margin-left: auto;
}


/* ============================================
   CARD: ACTAS CORRECTIVAS (tabla original)
   ============================================ */

/* Alinea la columna de números a la derecha */
.card-module a[href*="register_actas_docente"] table td:last-child {
    text-align: right !important;
    padding-right: 20px;
}

/* ==========================================================
   ESTILOS CONTENEDOR LISTAS
   ========================================================== */
/* Clase para el contenedor de la lista */
.menu-item-flex {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

/* Forzar que la imagen no tenga márgenes residuales */
.menu-item-flex img {
    display: block !important;
}

/* Clase para el enlace interno que distribuye el texto y el badge */
.menu-link-flex {
    flex-grow: 1 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-decoration: none; /* Opcional: quita el subrayado si lo deseas */
}
.flex-grow-1 {
    flex-grow: 1 !important;
}


/* ==========================================================
   ESTILOS GENERALES PARA FIELDSET
   ========================================================== */
fieldset {
    border: 1px solid var(--border-color) !important;
    background: color-mix(in srgb, var(--card-bg) 95%, var(--text-primary) 5%) !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 25px 10px 25px  !important;
    margin-top: 10px !important;
    box-shadow: var(--shadow-sm) !important;
    box-sizing: border-box !important;
}

legend {
    background: var(--primary) !important;
    color: #ffffff !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm) !important;
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

fieldset legend {
    background-color: var(--primary); /* Toma el color principal (azul) */
    color: #ffffff;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.aviso-backup-fieldset {
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-bottom: 24px;
    color: var(--warning-text);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.aviso-backup-fieldset button {
    background-color: var(--warning);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 8px 16px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.aviso-backup-fieldset button:hover {
    transform: translateY(-1px);
    background-color: #d97706;
}


/* Colores distintos por seccion */
.dashboard-grid .aviso-user:nth-of-type(1) .title-aviso {
    background: var(--primary-light);
    border-left: 5px solid var(--primary);
    color: var(--primary);
}

.dashboard-grid .aviso-user:nth-of-type(2) .title-aviso {
    background: var(--success-bg);
    border-left: 5px solid var(--success);
    color: var(--success-text);
}

.dashboard-grid .aviso-user:nth-of-type(3) .title-aviso {
    background: rgba(139, 92, 246, 0.1);
    border-left: 5px solid #8b5cf6;
    color: #6d28d9;
}

.dashboard-grid .aviso-user:nth-of-type(4) .title-aviso {
    background: var(--warning-bg);
    border-left: 5px solid var(--warning);
    color: var(--warning-text);
}

.dashboard-grid .aviso-user:nth-of-type(5) .title-aviso {
    background: var(--info-bg);
    border-left: 5px solid var(--info);
    color: var(--info-text);
}

.dashboard-grid .aviso-user:nth-of-type(6) .title-aviso {
    background: var(--danger-bg);
    border-left: 5px solid var(--danger);
    color: var(--danger-text);
}

.dashboard-grid .aviso-user:nth-of-type(7) .title-aviso {
    background: rgba(99, 102, 241, 0.1);
    border-left: 5px solid #6366f1;
    color: #4338ca;
}

.dashboard-grid .aviso-user:nth-of-type(8) .title-aviso {
    background: rgba(20, 184, 166, 0.1);
    border-left: 5px solid #14b8a6;
    color: #0f766e;
}

/* ==========================================================
   TABLAS Y DATATABLES (FORZADO AL 100%)
   ========================================================== */
.creditos,
.dataTables_wrapper,
.responsive-table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.dataTables_wrapper::after {
    content: "";
    clear: both;
    display: table;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin: 10px 0;
}

.dataTables_wrapper .dataTables_length {
    float: left;
}

.dataTables_wrapper .dataTables_filter {
    float: right;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.dataTables_wrapper select,
.dataTables_wrapper input,
#register-table td select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    background-color: var(--card-bg);
    color: var(--text-secondary);
    outline: none;
    width: auto;
    max-width: 100%;
    display: inline-block;
}

.dataTables_filter input {
    width: 250px;
}

table.dataTable,
table#register,
.container-body table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 10px 0;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    table-layout: auto;
}

.title-table,
table.dataTable th {
    background: var(--primary);
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: none;
    padding: 12px 16px;
}

table.dataTable td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

table.dataTable tbody tr {
    background-color: var(--card-bg);
    transition: background-color var(--transition-fast);
}

table.dataTable tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.03);
}

html[data-theme="dark"] table.dataTable tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

.dataTables_wrapper .dataTables_info {
    float: left;
    padding-top: 15px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.dataTables_wrapper .dataTables_paginate {
    float: right;
    padding-top: 12px;
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    cursor: pointer;
    position: relative;
    padding-right: 30px;
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
    position: absolute;
    right: 10px;
    opacity: 0.5;
}

table.dataTable thead th.sorting::after {
    content: "↕";
}

table.dataTable thead th.sorting_asc::after {
    content: "↑";
    opacity: 1;
}

table.dataTable thead th.sorting_desc::after {
    content: "↓";
    opacity: 1;
}

/* ==========================================================
   QUITAR HOVER A .register-table / #register-table
   ========================================================== */
table.register-table tbody tr:hover,
.register-table tbody tr:hover,
#register-table tbody tr:hover {
    background-color: var(--card-bg) !important;
    transform: none !important;
    box-shadow: none !important;
}

html[data-theme="dark"] table.register-table tbody tr:hover,
html[data-theme="dark"] .register-table tbody tr:hover,
html[data-theme="dark"] #register-table tbody tr:hover {
    background-color: var(--card-bg) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Badges */
.info-sucess,
.info-danger,
.info-good,
.info-curso,
.info-oferta,
.info-aviso {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    border: none;
    display: inline-block;
}

.info-sucess {
    background: var(--success-bg);
    color: var(--success-text);
}

.info-danger,
.info-aviso {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.info-good {
    background: var(--info-bg);
    color: var(--info-text);
}

.info-curso,
.info-oferta {
    background: var(--warning-bg);
    color: var(--warning-text);
}

/* Acciones Tablas */
.link-accion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-app);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    margin-right: 4px;
    transition: all var(--transition-fast);
}

.link-accion:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.link-accion img {
    transition: filter var(--transition-fast);
}

.link-accion:hover img {
    filter: brightness(0) invert(1);
}

/* Controles DataTables */
.dataTables_length select,
.dataTables_filter input {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 0.9rem;
}

.dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.dataTables_info {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 10px;
}

.dataTables_paginate {
    padding-top: 10px;
}

.dataTables_paginate .paginate_button {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dataTables_paginate .paginate_button:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.dataTables_paginate .paginate_button.current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.dataTables_filter label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.dataTables_filter input {
    width: 200px;
    margin: 0;
}

.dataTables_length select {
    width: auto;
    padding: 4px 8px;
}

/* ==========================================================
FORMULARIOS (Mantiene Modo Claro por defecto de forma limpia)
========================================================== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea,
.dataTables_wrapper select,
.dataTables_wrapper input,
.dataTables_filter input,
.dataTables_length select {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: #0f172a !important;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus,
.dataTables_filter input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
}

select {
    cursor: pointer;
    padding-right: 28px;
}

.input-corto {
    width: 60px !important;
    text-align: left;
    box-sizing: border-box;
}

.input-corto-mediano {
    width: 100px !important;
    box-sizing: border-box;
}

.input-mediano {
    width: 150px !important;
    box-sizing: border-box;
}

.input-mediano-largo {
    width: 300px !important;  /* Aumentado de 200px a 300px */
    box-sizing: border-box;
}

.input-largo {
    width: 400px !important;  /* Cambiado de 100% a 400px fijo */
    min-width: 400px;
    box-sizing: border-box;
}

/* Para campos muy largos como direcciones completas */
.input-muy-largo {
    width: 500px !important;
    min-width: 500px;
    box-sizing: border-box;
}

/* ==========================================================
   BOTONES Y ACCIONES
   ========================================================== */
.button,
input[type="submit"],
input[type="button"],
button {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: auto;
    box-sizing: border-box;
    border: none;
}

.button.primary,
input[type="submit"] {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.button.primary:hover,
input[type="submit"]:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.button:not(.primary),
input[type="button"]:not([type="submit"]) {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.button:not(.primary):hover,
input[type="button"]:not([type="submit"]):hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-return {
    display: inline-flex;
    align-items: center;
    text-align: center;
    gap: 8px;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-return:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-return img {
    transition: transform var(--transition-fast);
}

.btn-return:hover img {
    transform: translateX(-2px);
    filter: sepia(1) hue-rotate(200deg) saturate(3);
}


/* ==========================================================
   .btn-return EN BOTONES (ancho por contenido)
   ========================================================== */
button.btn-return,
input[type="submit"].btn-return,
input[type="button"].btn-return {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    background: var(--bg-app) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    
    padding: 8px 16px !important;
    border-radius: var(--radius-sm) !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    
    /* ESTO ES LO CRÍTICO PARA EL ANCHO */
    width: auto !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
    min-width: 0 !important;
    max-width: none !important;
    
    white-space: nowrap !important;
    height: auto !important;
    line-height: normal !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
    text-transform: none !important;
    margin: 0 !important;
    vertical-align: middle !important;
    
    /* Evita que el navegador imponga su propio estilo */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

button.btn-return:hover,
input[type="submit"].btn-return:hover,
input[type="button"].btn-return:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    transform: translateY(-1px);
}

button.btn-return img,
input[type="submit"].btn-return img,
input[type="button"].btn-return img {
    transition: transform var(--transition-fast);
    display: inline-block;
    flex-shrink: 0;
}

button.btn-return:hover img,
input[type="submit"].btn-return:hover img,
input[type="button"].btn-return:hover img {
    transform: translateX(-2px);
    filter: sepia(1) hue-rotate(200deg) saturate(3);
}
/* ==========================================================
   DIALOGOS UI
   ========================================================== */
.ui-dialog {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    background: var(--card-bg) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0 !important;
    overflow: hidden;
    font-family: 'Inter', sans-serif !important;
}

.ui-dialog-titlebar {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: none !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    padding: 14px 20px !important;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ui-dialog-titlebar-close {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.ui-dialog-titlebar-close:hover {
    opacity: 1;
}

.ui-dialog-content {
    color: var(--text-secondary) !important;
    padding: 24px !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
}

.ui-dialog-content p {
    margin: 0 0 16px 0;
}

.ui-dialog-content ul {
    margin: 16px 0;
    padding-left: 20px;
}

.ui-dialog-content ul li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.ui-dialog-buttonpane {
    background: var(--bg-app) !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 14px 20px !important;
    margin-top: 0 !important;
}

.ui-dialog-buttonpane button {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 20px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all var(--transition-fast) !important;
    cursor: pointer;
}

.ui-dialog-buttonpane button:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md) !important;
}
/* ==========================================================
   LOADER
   ========================================================== */
.premium-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    animation: fadeInLoader 0.25s forwards ease-out;
}

html[data-theme="dark"] .premium-loader-overlay {
    background: rgba(9, 13, 22, 0.8);
}

.premium-spinner {
    width: 54px;
    height: 54px;
    border: 3.5px solid rgba(79, 70, 229, 0.15);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: premium-spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.15);
}

@keyframes premium-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInLoader {
    to {
        opacity: 1;
    }
}

/* ==========================================================
   CORRECCIONES DE ALINEACION
   ========================================================== */
.container-menu {
    padding: 0 16px 16px 16px;
    margin: 0;
    align-self: flex-start;
    top: calc(var(--header-height) - 74px);
}

.aviso-menu {
    margin: 0 0 12px 0;
    padding: 8px 0 10px 4px;
}

#cssmenu>ul {
    margin: 0;
    padding: 0;
}

#cssmenu>ul>li:first-child {
    margin-top: 0;
}

.container-body {
    align-self: flex-start;
    margin: 0;
    padding: 16px 24px 24px 24px;
}

.container-body .info_panel {
    margin-top: 0;
    padding-top: 0;
}

/* ==========================================================
   LEYENDA
   ========================================================== */
.leyenda {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 15px;
}

.leyenda span {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 5px;
}

.leyenda img {
    display: inline-block;
    vertical-align: middle;
}

/* ==========================================================
   TABLA DE CORREOS
   ========================================================== */
.container-login {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
    width: 100%;
    box-sizing: border-box;
}

.responsive-table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1em 0;
}

.info-intro {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: justify;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-secondary);
    background-color: var(--card-bg);
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table-header-main {
    background-color: var(--primary);
    color: #FFFFFF;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 14px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.table-subheader {
    background-color: #2c5282;
    color: #FFFFFF;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.table-section-title {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-top: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
}

.styled-table tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.03);
}

.styled-table a {
    color: var(--primary);
    text-decoration: none;
}

.styled-table a:hover {
    text-decoration: underline;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.container-footer {
    width: 100%;
    max-width: 1600px;
    margin: 20px auto 0;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
}
/* ==========================================================
Contenedor del input con icono 
   ========================================================== */
.password-container {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    /*   max-width: 280px;*/
}

.password-container input {
    /*   width: 100%;*/
    padding: 8px 40px 8px 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.toggle-btn {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Validación de requisitos */
#password-requirements {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

#password-requirements li {
    color: #d9534f;
    font-size: 11px;
}

#password-requirements li.valid {
    color: #5cb85c;
}

#password-requirements li.valid::before {
    content: "✔ ";
}

#password-requirements li.invalid::before {
    content: "✘ ";
}

.match-msg {
    font-size: 11px;
    font-weight: bold;
    margin-top: 5px;
    display: block;
}

/* ==========================================================
   GRID DE CARDS (docente.php)
   ========================================================== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 24px;
    width: 100%;
}

.grid-container .card-module {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.grid-container .card-module:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.grid-container .card-header {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--primary);
    color: #ffffff;
    padding: 12px 16px;
}

.grid-container .card-body {
    padding: 16px;
}

.grid-container .card-body table {
    width: 100%;
}

.grid-container #option-panel {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grid-container #option-panel li a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.grid-container #option-panel li a:hover {
    color: var(--primary);
}

/* ==========================================================
   RESPONSIVIDAD
   ========================================================== */
@media (max-width: 1024px) {
    .container-home {
        flex-direction: column;
        gap: 20px;
        padding: 0 16px;
        margin-top: calc(var(--header-height) + 16px);
    }

    .container-menu {
        position: static;
        width: 100%;
        min-width: 100%;
        order: 1;
    }

    .container-body {
        width: 100%;
        min-width: 100%;
        order: 2;
        padding: 20px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .main-header-nav {
        padding: 0 16px;
    }

    .brand-title {
        font-size: 1.05rem;
    }

    /*
    .user-badge span {
        display: none;
    }
*/
    .user-badge {
        padding: 6px;
    }

    .container-home {
        padding: 0 12px;
        margin-top: calc(var(--header-height) + 12px);
    }

    .container-body {
        padding: 16px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .aviso-user {
        min-height: auto;
    }

    table.dataTable th,
    table.dataTable td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .container-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }

    .input-corto,
    .input-corto-mediano,
    .input-mediano,
    .input-mediano-largo {
        width: 100% !important;
        max-width: 100%;
    }
}

/* ==========================================================
   MODO OSCURO - SOBRESCRITURAS DE COLOR
   ========================================================== */
html[data-theme="dark"] table.dataTable th {
    background: #1e2a45;
}

html[data-theme="dark"] table.dataTable td {
    border-bottom-color: var(--border-color);
}

html[data-theme="dark"] table.dataTable tbody tr:nth-child(even) {
    background-color: #0f172a;
}

html[data-theme="dark"] .table-subheader {
    background-color: #1e2a45;
    color: #e2e8f0;
}

html[data-theme="dark"] .table-section-title {
    background-color: #0f172a;
    color: #60a5fa;
    border-top-color: #3b82f6;
    border-bottom-color: #3b82f6;
}

html[data-theme="dark"] .styled-table tbody tr:hover {
    background-color: #1e293b;
}

html[data-theme="dark"] .styled-table a {
    color: #60a5fa;
}

html[data-theme="dark"] .styled-table a:hover {
    color: #93c5fd;
}

html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .alert-custom,
html[data-theme="dark"] .card-module,
html[data-theme="dark"] .card-panel,
html[data-theme="dark"] .panel-egresados-card,
html[data-theme="dark"] .seccion-enlaces,
html[data-theme="dark"] .columna-formulario,
html[data-theme="dark"] .columna-visor,
html[data-theme="dark"] .info,
html[data-theme="dark"] #regster,
html[data-theme="dark"] .reg-performance,
html[data-theme="dark"] .datagrid table,
html[data-theme="dark"] .link-card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="dark"] .card-module .card-header,
html[data-theme="dark"] .card-header {
    background: var(--primary-light);
    color: var(--text-primary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .card-panel-header {
    background: #1e3a6f;
    color: #ffffff;
}

html[data-theme="dark"] .card-panel .alert-link {
    background: #1e293b;
    color: #e2e8f0;
    border-color: var(--border-color);
}

html[data-theme="dark"] .card-panel .alert-link:hover {
    background: #2d3b52;
    border-color: var(--primary);
}

html[data-theme="dark"] .card-panel .val-badge {
    background: #e11d48;
    color: #ffffff;
}

html[data-theme="dark"] .card-panel .alert-link.bg-empty {
    background: #0f172a;
    color: #94a3b8;
    border-color: #1e293b;
}

html[data-theme="dark"] .error-msj {
    background: #2d1b2b;
    color: #fca5a5;
    border-color: #4c0519;
}

html[data-theme="dark"] .observacion {
    background: #1e293b;
    color: #f1f5f9;
    border-left-color: var(--warning);
}

html[data-theme="dark"] .observacion strong {
    color: #fbbf24;
}

html[data-theme="dark"] .intensivos-badge {
    background: #4c0519;
    color: #fca5a5;
    border-color: #881337;
}

html[data-theme="dark"] .alerta-fechas {
    background-color: #2b1d1d;
    color: #fca5a5;
    border-color: #7f1d1d;
}

html[data-theme="dark"] .filtros-cuerpo {
    background-color: #1e293b;
    border-color: var(--border-color);
}

html[data-theme="dark"] .title-trayecto td {
    background: #0f172a;
    color: #f1f5f9;
}

html[data-theme="dark"] .title-trayecto td font {
    color: #f87171;
}

html[data-theme="dark"] .reg-saberes tr[bgcolor="#E9EBEE"] td {
    background: #1e293b;
}

html[data-theme="dark"] .reg-saberes tr[bgcolor="#FFFDBC"] td,
html[data-theme="dark"] .reg-saberes tr[bgcolor="#F7F9A7"] td {
    background: #162032;
}

html[data-theme="dark"] tr[height="30"] td label {
    color: #f1f5f9;
}

html[data-theme="dark"] .link-card:hover {
    background-color: #0f172a;
    border-color: #356AA0;
    color: #60a5fa;
    box-shadow: 0 4px 12px rgba(53, 106, 160, 0.4);
}

html[data-theme="dark"] .link-card span {
    color: var(--text-primary);
}

html[data-theme="dark"] .link-card:hover span {
    color: #60a5fa;
}

html[data-theme="dark"] .welcome-card {
    background: var(--card-bg);
    border-left-color: var(--primary);
}

html[data-theme="dark"] .welcome-card h4,
html[data-theme="dark"] .columna-formulario h3,
html[data-theme="dark"] .columna-visor h4,
html[data-theme="dark"] .columna-vacia h4 {
    color: #60a5fa;
}

html[data-theme="dark"] .main-dashboard,
html[data-theme="dark"] .dashboard-wrapper {
    background: var(--bg-app);
    color: var(--text-primary);
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .columna-vacia,
html[data-theme="dark"] .columna-vacia p {
    color: var(--text-muted);
}

html[data-theme="dark"] .info-intro,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .links-list li a,
html[data-theme="dark"] .responsive-table table td,
html[data-theme="dark"] .responsive-table-notif td,
html[data-theme="dark"] .responsive-table-notif td ul,
html[data-theme="dark"] .responsive-table-notif td ul li,
html[data-theme="dark"] #dialog-message p,
html[data-theme="dark"] #regster td,
html[data-theme="dark"] .reg-performance td,
html[data-theme="dark"] .reg-saberes td,
html[data-theme="dark"] .main-dashboard p {
    color: var(--text-secondary);
}

html[data-theme="dark"] .badge {
    background: var(--primary-light);
    color: var(--text-primary);
}

html[data-theme="dark"] .badge-active {
    background: var(--success-bg);
    color: var(--success-text);
}

html[data-theme="dark"] .badge-danger,
html[data-theme="dark"] .profile-card .badge-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

html[data-theme="dark"] .badge-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

html[data-theme="dark"] .links-list li a:hover {
    color: var(--primary);
}

html[data-theme="dark"] .links-list li a i {
    color: var(--primary);
}

html[data-theme="dark"] #option-panel li a {
    color: #cbd5e1;
}

html[data-theme="dark"] #option-panel li a:hover {
    background: var(--primary);
    color: #ffffff;
}

html[data-theme="dark"] .responsive-table-notif td a[style*="color:red"] {
    color: #f87171;
}

html[data-theme="dark"] .responsive-table-notif td a[style*="color:red"]:hover {
    color: #fca5a5;
}

html[data-theme="dark"] .card-module .icon-box img,
html[data-theme="dark"] .card-body .icon-box img {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

html[data-theme="dark"] .dashboard-wrapper h5 img {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

html[data-theme="dark"] .aviso-importante {
    color: #ffffff;
    font-weight: 900;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
    background: #0f172a;
    border-left: 4px solid #3b82f6;
}

/* ==========================================================
   AVISO REQUISITOS CARD
   ========================================================== */
.aviso-requisitos-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin: 20px 0;
    transition: all var(--transition-normal);
}

.aviso-requisitos-card:hover {
    box-shadow: var(--shadow-md);
}

.aviso-header {
    background: var(--warning);
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.icono-alerta {
    font-style: normal;
    font-size: 1.2rem;
    line-height: 1;
}

.aviso-body {
    padding: 16px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.aviso-body p {
    margin: 0 0 10px 0;
}

.aviso-body p:last-child {
    margin-bottom: 0;
}

.aviso-body strong {
    color: var(--danger);
    font-weight: 700;
}

.aviso-footer-text {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================================
   MODO OSCURO - AVISO REQUISITOS
   ========================================================== */
html[data-theme="dark"] .aviso-requisitos-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

html[data-theme="dark"] .aviso-header {
    background: #d97706; /* tono warning sólido para contraste */
    color: #ffffff;
}

html[data-theme="dark"] .aviso-body {
    color: var(--text-secondary);
}

html[data-theme="dark"] .aviso-body strong {
    color: var(--danger-text);
}

html[data-theme="dark"] .aviso-footer-text {
    color: var(--text-muted);
}

/* ==========================================================
   ELIMINAR LÍNEA BLANCA/SEPARADORA ENTRE HEADER Y BODY EN CARDS
   ========================================================== */

/* Quita cualquier borde inferior del header de la card */
.card-module .card-header,
.grid-container .card-header {
    border-bottom: none !important;
}

/* Quita cualquier borde superior del cuerpo de la card */
.card-module .card-body,
.card-module .title-content,
.grid-container .card-body {
    border-top: none !important;
}

/* Si dentro de la card hay una tabla, quita su borde superior 
   (común en los módulos antiguos que aún usan tablas internas) */
.card-module .card-body > table:first-child,
.card-module .title-content > table:first-child {
    border-top: none !important;
    margin-top: 0 !important;
}

/* Modo oscuro: fuerza transición limpia sin líneas intermedias */
html[data-theme="dark"] .card-module .card-header {
    border-bottom-color: transparent !important;
}

html[data-theme="dark"] .card-module .card-body,
html[data-theme="dark"] .card-module .title-content {
    border-top-color: transparent !important;
}

/* ==========================================================
   ELIMINAR LÍNEAS SEPARADORAS ENTRE ITEMS DE LISTA EN CARDS
   ========================================================== */

/* Modo oscuro: quita cualquier borde inferior de los <li> dentro de cards */
html[data-theme="dark"] .card-module #option-panel li,
html[data-theme="dark"] .card-module .links-list li {
    border-bottom: none !important;
    border-top: none !important;
}

/* Por si el borde viene del enlace <a> o de un <span> intermedio */
html[data-theme="dark"] .card-module #option-panel li a,
html[data-theme="dark"] .card-module .links-list li a {
    border-bottom: none !important;
}

/* Si usas .title-content en otras cards, también limpiamos ahí */
html[data-theme="dark"] .card-module .title-content #option-panel li {
    border-bottom: none !important;
}

/* Responsive modo oscuro */
@media (max-width: 768px) {
    html[data-theme="dark"] .card-module table td {
        display: block;
        width: 100%;
        text-align: center;
    }

    html[data-theme="dark"] .card-module table td ul#option-panel {
        text-align: center;
    }

    html[data-theme="dark"] .responsive-table table th,
    html[data-theme="dark"] .responsive-table table td {
        font-size: 0.75rem;
        padding: 4px 2px;
        white-space: nowrap;
    }
    .input-corto,
    .input-corto-mediano,
    .input-mediano,
    .input-mediano-largo {
        width: 100% !important;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    html[data-theme="dark"] .card-module .card-header {
        font-size: 0.85rem;
        padding: 10px 12px;
    }

    html[data-theme="dark"] .card-module table td img {
        width: 48px;
        height: 48px;
    }
}