/* ============================================================
   MYSTYLE.CSS - ESTILOS BASE DEL SISTEMA JASPHARM
   ============================================================ */

/* ============================================================
   1. RESET Y BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: #f0f2f5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ============================================================
   2. LOGIN (index.php)
   ============================================================ */
.main-wthree {
    width: 100vw;
    height: 100vh;
    background-image: url('../../FONDO.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.main-wthree::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

.main-wthree .container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1980px;
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: 100vh;
}

.main-wthree h1 {
    color: #ffffff;
    font-size: clamp(18px, 3.5vw, 38px);
    font-weight: 500;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7);
    margin-bottom: 4px;
    margin-top: 30px;
    letter-spacing: 3px;
    line-height: 1.2;
    white-space: nowrap;
}

.main-wthree h2 {
    color: #ffffff;
    font-size: clamp(16px, 2.5vw, 30px);
    font-weight: 400;
    letter-spacing: 6px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7);
    margin-bottom: 6px;
}

.main-wthree .logo {
    max-width: min(500px, 70vw);
    height: auto;
    margin: 4px auto 16px;
    display: block;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
}

.sin-w3-agile {
    background: transparent;
    padding: 10px 0;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    text-align: center;
}

.sin-w3-agile .email,
.sin-w3-agile .username {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.20);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.sin-w3-agile .email:focus-within,
.sin-w3-agile .username:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.06);
}

.sin-w3-agile .email span,
.sin-w3-agile .username span {
    width: 28%;
    padding: 12px 14px;
    color: #ffffff;
    font-size: clamp(12px, 1.2vw, 14px);
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.sin-w3-agile .email input,
.sin-w3-agile .username input {
    width: 72%;
    padding: 12px 14px;
    border: none;
    background: transparent;
    font-size: clamp(13px, 1.3vw, 15px);
    color: #ffffff;
    outline: none;
}

.sin-w3-agile .email input::placeholder,
.sin-w3-agile .username input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.sin-w3-agile .login-w3 {
    width: 100%;
    margin-top: 4px;
}

.sin-w3-agile .login-w3 input {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.30);
    border-radius: 10px;
    font-size: clamp(15px, 1.5vw, 17px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    backdrop-filter: blur(4px);
}

.sin-w3-agile .login-w3 input:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.sin-w3-agile h4 {
    color: #fdcb6e;
    font-size: clamp(12px, 1.1vw, 14px);
    margin: 4px 0 10px;
    min-height: 20px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.sin-w3-agile .text-center a {
    color: rgba(255, 255, 255, 0.80);
    font-weight: 400;
    text-decoration: none;
    font-size: clamp(12px, 1.1vw, 14px);
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.sin-w3-agile .text-center a:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   4. HEADER
   ============================================================ */
.header-jaspharm {
    background: linear-gradient(90deg, #0f2f6d 0%, #1754af 35%, #317dce 70%, #6797b9 100%);
    padding: 12px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 75px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 6px 18px rgba(15, 47, 109, .18), 0 2px 6px rgba(0, 0, 0, .05);
}

.header-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.header-logo a i {
    color: #bfe7ff;
    font-size: 24px;
}

/* Perfil de Usuario */
.profile-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    border-radius: 50px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .35);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .25);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name-header {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    margin: 0;
}

.user-role {
    font-size: 10px;
    font-weight: 400;
    color: #dbeafe;
}

.dropdown-toggle .fa-chevron-down {
    color: #fff;
    font-size: 11px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 6px 0;
    display: none;
    z-index: 200;
}

.dropdown-menu.open {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    color: #4a5568;
    font-size: 13px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: #f7fafc;
    color: #1a2a6c;
}

.dropdown-menu a i {
    width: 18px;
    color: #a0aec0;
    font-size: 14px;
}

/* ============================================================
   6. FOOTER - CORREGIDO (FUERA DEL BODY-WRAPPER)
   ============================================================ */
.footer-content {
    text-align: center;
}

.footer-content p {
    color: #dbeafe;
    font-size: 12px;
    margin: 0;
}

.footer-content strong {
    color: #fff;
}

/* ============================================================
   7. BREADCRUMB Y CONTENIDO
   ============================================================ */
.breadcrumb {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-size: 13px;
    margin: 0 0 20px 0 !important;
}

.breadcrumb a {
    color: #0f2f6d;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: #317dce;
}

.breadcrumb .fa-angle-right {
    margin: 0 8px;
    color: #a0aec0;
    font-size: 12px;
}

.breadcrumb-jaspharm {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #718096;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.breadcrumb-jaspharm a {
    color: #1a2a6c;
    font-weight: 500;
    text-decoration: none;
}

.breadcrumb-jaspharm a:hover {
    color: #0d1b4a;
}

.page-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #1a2a6c;
    margin-bottom: 25px;
}

/* ============================================================
   8. DASHBOARD
   ============================================================ */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.dash-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.dash-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(26, 42, 108, 0.08);
    border-color: #1a2a6c;
}

.dash-card a {
    display: flex;
    align-items: center;
    padding: 22px 28px;
    gap: 20px;
    text-decoration: none;
}

.dash-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: #a3b6e9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.dash-card:hover .dash-card-icon {
    background: #1a2a6c;
}

.dash-card-icon i {
    font-size: 24px;
    color: #1a2a6c;
    transition: all 0.3s ease;
}

.dash-card:hover .dash-card-icon i {
    color: #7599db;
}

.dash-card-info {
    flex: 1;
}

.dash-card-info h3 {
    color: #718096;
    font-size: 13px;
    font-weight: 400;
    margin: 0 0 4px 0;
}

.dash-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1a2a6c;
}

/* ============================================================
   9. VALIDATION SYSTEM (Formularios)
   ============================================================ */
.validation-system {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: 0 8px 30px rgba(15, 47, 109, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.validation-form {
    padding: 0;
}

.alert {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border: none;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e;
}

/* ============================================================
   10. TABS
   ============================================================ */
.nav-tabs-custom {
    background: transparent;
    border-radius: 12px;
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid rgba(15, 47, 109, 0.1);
    padding-bottom: 0;
    margin-bottom: 25px;
    list-style: none;
}

.nav-tabs li {
    margin-bottom: -2px;
}

.nav-tabs li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px 10px 0 0;
    color: #4a5568;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
    border: 2px solid transparent;
    border-bottom: none;
}

.nav-tabs li a:hover {
    background: rgba(15, 47, 109, 0.05);
    color: #0f2f6d;
}

.nav-tabs li.active a {
    background: #0f2f6d;
    color: #ffffff;
    border-color: #0f2f6d;
    box-shadow: 0 4px 15px rgba(15, 47, 109, 0.2);
}

.nav-tabs li a i {
    font-size: 14px;
}

.nav-tabs li a .badge-counter {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 10px;
    padding: 1px 8px;
    border-radius: 12px;
    margin-left: 4px;
}

.nav-tabs li.active a .badge-counter {
    background: rgba(255, 255, 255, 0.3);
}

.nav-tabs li:not(.active) a .badge-counter {
    background: #e2e8f0;
    color: #4a5568;
}

.tab-content {
    padding: 5px 0;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   11. FORMULARIOS - GRID Y INPUTS
   ============================================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-md-3,
.col-md-4,
.col-md-6,
.col-md-12 {
    padding: 0 10px;
}

.col-md-3 {
    width: 25%;
}

.col-md-4 {
    width: 33.333%;
}

.col-md-6 {
    width: 50%;
}

.col-md-12 {
    width: 100%;
}

.form-group {
    margin-bottom: 18px;
}

.form-group .control-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 5px;
}

.input-group {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: #0f2f6d;
    box-shadow: 0 0 0 4px rgba(15, 47, 109, 0.1);
}

.input-group-addon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: #f7fafc;
    color: #4a5568;
    font-size: 14px;
    border-right: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.input-group-addon i {
    font-size: 14px;
    color: #0f2f6d;
}

.input-group .form-control {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: 13px;
    color: #2d3748;
    background: transparent;
    outline: none;
    min-width: 0;
}

.input-group .form-control::placeholder {
    color: #a0aec0;
}

.input-group select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* ============================================================
   12. BOTONES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn i {
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #0f2f6d, #317dce);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(15, 47, 109, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 47, 109, 0.3);
}

.btn-default {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-default:hover {
    background: #cbd5e0;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.btn-success {
    background: #22c55e;
    color: #ffffff;
}

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid rgba(15, 47, 109, 0.08);
}

/* ============================================================
   13. TABLAS
   ============================================================ */
.w3l-table-info {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

.w3l-table-info h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #0f2f6d;
    margin: 0 0 10px 0;
    display: inline-block;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.table-jaspharm {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
}

.table-jaspharm thead {
    background: linear-gradient(135deg, #0f2f6d, #1a4a8a);
}

.table-jaspharm thead th {
    padding: 14px 16px;
    text-align: left;
    color: #ffffff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table-jaspharm tbody tr {
    border-bottom: 1px solid #f0f2f5;
    transition: all 0.2s ease;
}

.table-jaspharm tbody tr:last-child {
    border-bottom: none;
}

.table-jaspharm tbody tr:hover {
    background: #f7fafc;
}

.table-jaspharm tbody td {
    padding: 12px 16px;
    color: #2d3748;
    vertical-align: middle;
}

/* Avatar en tabla */
.avatar-table {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.avatar-table:hover {
    border-color: #0f2f6d;
    transform: scale(1.05);
}

/* Paginación */
.pagination-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination-container a,
.pagination-container span {
    display: inline-block;
    padding: 6px 14px;
    background: #f7fafc;
    color: #4a5568;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.pagination-container a:hover {
    background: #0f2f6d;
    color: #ffffff;
    border-color: #0f2f6d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 47, 109, 0.2);
}

.page-active {
    background: #0f2f6d !important;
    color: #ffffff !important;
    border-color: #0f2f6d !important;
}

/* ============================================================
   14. MODAL
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-dialog {
    position: relative;
    margin: 30px auto;
    padding: 0 15px;
    max-width: 95%;
    width: 1200px;
}

.modal-dialog.modal-lg {
    max-width: 1200px !important;
    width: 95% !important;
}

.modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 47, 109, 0.25);
    border: 1px solid #e2e8f0;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 16px 25px;
    background: linear-gradient(135deg, #0f2f6d, #317dce);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    border-radius: 16px 16px 0 0;
}

.modal-header h4 {
    margin: 0;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.modal-header .close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    padding: 0 8px;
}

.modal-header .close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal-body {
    padding: 20px 25px;
    background: #ffffff;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 25px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 16px 16px;
}

.modal-footer .btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.modal-footer .btn-secondary:hover {
    background: #cbd5e0;
}

/* ============================================================
   15. CITY GRID (Configuración)
   ============================================================ */
.city-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 25px;
    margin-top: 0;
}

.city-form-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.city-form-container .section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #0f2f6d;
    margin: 0 0 20px 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.city-form-container .section-title i {
    color: #317dce;
    margin-right: 10px;
}

.city-form-container .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eef2f7;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.table-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #0f2f6d;
    margin: 0;
}

.table-header h2 i {
    color: #317dce;
    margin-right: 8px;
}

/* ============================================================
   16. PERMISOS (accionpersosol.php)
   ============================================================ */
.permission-section {
    margin-bottom: 30px;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #0f2f6d;
    margin-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.section-title-pending i {
    color: #f39c12;
}

.section-title-accept i {
    color: #22c55e;
}

.section-title-deny i {
    color: #dc2626;
}

.badge-count {
    display: inline-block;
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: #ffffff;
    margin-left: 10px;
}

.badge-pending {
    background: #f39c12;
}

.badge-accept {
    background: #22c55e;
}

.badge-deny {
    background: #dc2626;
}

.badge-id {
    font-weight: 600;
    color: #0f2f6d;
    background: #eef4ff;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 2px;
}

.btn-action:hover {
    transform: scale(1.1);
    text-decoration: none;
}

.btn-action .fa-check {
    color: #22c55e;
}

.btn-action .fa-times {
    color: #dc2626;
}

.btn-action .fa-pencil {
    color: #0f2f6d;
}

.btn-action.btn-accept {
    background: #dcfce7;
}

.btn-action.btn-accept:hover {
    background: #22c55e;
}

.btn-action.btn-accept:hover .fa-check {
    color: #ffffff;
}

.btn-action.btn-deny {
    background: #fee2e2;
}

.btn-action.btn-deny:hover {
    background: #dc2626;
}

.btn-action.btn-deny:hover .fa-times {
    color: #ffffff;
}

.btn-action.edit-btn {
    background: #eef4ff;
}

.btn-action.edit-btn:hover {
    background: #0f2f6d;
}

.btn-action.edit-btn:hover .fa-pencil {
    color: #ffffff;
}

.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #a0aec0;
}

.empty-state i {
    font-size: 20px;
    display: block;
    margin-bottom: 8px;
}

/* ============================================================
   17. SEARCH BAR
   ============================================================ */
.search-bar-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 24px;
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 25px;
}

.search-bar-container .search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex-wrap: wrap;
}

.search-bar-container .search-form label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0;
    white-space: nowrap;
}

.search-bar-container .search-form .form-control-sm,
.search-bar-container .search-form select,
.search-bar-container .search-form input[type="text"] {
    padding: 7px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #2d3748;
    background: #ffffff;
    transition: all 0.3s ease;
    height: 36px;
    min-width: 120px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.search-bar-container .search-form .form-control-sm:focus,
.search-bar-container .search-form select:focus,
.search-bar-container .search-form input[type="text"]:focus {
    border-color: #0f2f6d;
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 47, 109, 0.1);
}

.search-bar-container .search-form .btn {
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.search-bar-container .search-form .btn-primary {
    background: linear-gradient(135deg, #0f2f6d, #317dce);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 47, 109, 0.2);
}

.search-bar-container .search-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 47, 109, 0.3);
}

.search-bar-container .search-form .btn-success {
    background: #22c55e;
    color: #ffffff;
}

.search-bar-container .search-form .btn-success:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Ajuste responsivo */
@media (max-width: 768px) {
    .search-bar-container {
        flex-direction: column;
        align-items: stretch;
    }
    .search-bar-container .search-form {
        flex-wrap: wrap;
        width: 100%;
    }
    .search-bar-container .search-form .form-control-sm,
    .search-bar-container .search-form select,
    .search-bar-container .search-form input[type="text"] {
        flex: 1;
        min-width: 100px;
    }
    .search-bar-container .search-form .btn {
        flex: 0 0 auto;
    }
}

/* ============================================================
   18. REPORTES
   ============================================================ */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.report-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #0f2f6d;
    margin: 0;
}

.report-header h2 i {
    margin-right: 10px;
}

.report-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.report-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.report-form label {
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    margin: 0;
}

.report-form .form-control-sm {
    padding: 7px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #2d3748;
    background: #ffffff;
    transition: all 0.3s ease;
    height: 36px;
}

.report-form .form-control-sm:focus {
    border-color: #0f2f6d;
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 47, 109, 0.08);
}

.filtro-container {
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

.filtro-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filtro-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.filtro-group label {
    font-weight: 600;
    font-size: 12px;
    color: #4a5568;
}

/* ============================================================
   19. DOCUMENTOS
   ============================================================ */
.upload-form-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.upload-form-container .form-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f2f6d;
    margin: 0 0 18px 0;
}

.upload-form-container .form-title i {
    color: #317dce;
    margin-right: 8px;
}

.upload-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr auto;
    gap: 15px;
    align-items: end;
}

.upload-form-grid .field-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 5px;
}

.upload-form-grid .btn-subir {
    padding: 9px 28px;
    background: linear-gradient(135deg, #0f2f6d, #317dce);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-form-grid .btn-subir:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 47, 109, 0.25);
}

/* Acordeón Documentos */
.doc-accordion {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    background: #ffffff;
}

.doc-accordion-header {
    background: #f8fafc;
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #0f2f6d;
}

.doc-accordion-header:hover {
    background: #eef2f7;
}

.doc-accordion-header .badge-count {
    background: #0f2f6d;
    color: #ffffff;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.doc-accordion-header .arrow {
    transition: transform 0.3s ease;
    color: #a0aec0;
    font-size: 14px;
}

.doc-accordion-header.active .arrow {
    transform: rotate(180deg);
}

.doc-accordion-body {
    display: none;
    padding: 15px 20px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.doc-accordion-body.open {
    display: block;
}

.doc-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.doc-item:hover {
    border-color: #317dce;
    box-shadow: 0 2px 8px rgba(49, 125, 206, 0.08);
}

.doc-item .doc-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
}

.doc-item .doc-info {
    flex: 1;
    min-width: 0;
}

.doc-item .doc-info .doc-title {
    margin: 0 0 3px 0;
    font-weight: 500;
    color: #2d3748;
    font-size: 13px;
}

.doc-item .doc-info .doc-title i {
    color: #dc2626;
    margin-right: 6px;
}

.doc-item .doc-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.doc-item .doc-actions .btn-icon {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.doc-item .doc-actions .btn-view {
    background: #e8f0fe;
    color: #0f2f6d;
}

.doc-item .doc-actions .btn-view:hover {
    background: #d4e2f7;
}

.doc-item .doc-actions .btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.doc-item .doc-actions .btn-delete:hover {
    background: #fecaca;
}

/* ============================================================
   20. PHOTO PREVIEW
   ============================================================ */
.photo-preview {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.photo-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0f2f6d;
    box-shadow: 0 4px 15px rgba(15, 47, 109, 0.15);
}

.text-muted-small {
    font-size: 11px;
    color: #a0aec0;
}

.required-star {
    color: #dc2626;
}

/* ============================================================
   21. UTILIDADES
   ============================================================ */
.text-center {
    text-align: center;
}

.text-white {
    color: #ffffff;
}

.fw-600 {
    font-weight: 600;
}

.color-gray {
    color: #4a5568;
}

.color-name {
    font-weight: 500;
    color: #1a202c;
}

/* ============================================================
   22. VACACIONES - SECCIONES ESPECIALES
   ============================================================ */
#seccion_periodos_vacaciones {
    background: #f0f4ff;
    border-radius: 10px;
    padding: 15px 18px;
    margin: 10px 0;
    border: 1px solid #d4e2f7;
}

#seccion_adelantadas {
    background: #fff9e6;
    border-radius: 10px;
    padding: 15px 18px;
    margin: 10px 0;
    border: 1px solid #ffeaa7;
}

#seccion_adelantadas .alert-warning {
    background: #fff3cd;
    border-left: 4px solid #f39c12;
    padding: 10px 14px;
    border-radius: 6px;
    color: #856404;
}

#seccion_adelantadas .alert-info {
    background: #e8f4fd;
    border-left: 4px solid #317dce;
    padding: 10px 14px;
    border-radius: 6px;
    color: #0f2f6d;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0f2f6d;
    cursor: pointer;
}

.form-check label {
    font-size: 13px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
    margin: 0;
}

/* ============================================================
   23. SIDEBAR
   ============================================================ */
.sidebar-jaspharm::-webkit-scrollbar {
    width: 4px;
}

.sidebar-jaspharm::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-jaspharm::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}

/* === Encabezado del sidebar === */
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 18px 16px 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    min-height: 65px;
    gap: 12px;
}

.sidebar-toggle {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    font-size: 18px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.20) !important;
    border-color: rgba(255, 255, 255, 0.30);
}

.sidebar-brand {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    color: #ffffff !important;
    font-weight: 700 !important;
    white-space: nowrap;
    letter-spacing: 0.5px;
    opacity: 1;
    transition: opacity 0.25s ease;
}


/* Oculta el brand cuando el sidebar está colapsado */
.page-container.sidebar-collapsed .sidebar-brand {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, width 0.35s ease;
}

.page-container:not(.sidebar-collapsed) .sidebar-brand {
    opacity: 1;
    width: auto;
    overflow: visible;
    display: inline;
}

/* En móvil, si NO está colapsado, mostramos el brand */
@media (max-width: 768px) {
    .page-container:not(.sidebar-collapsed) .sidebar-brand {
        opacity: 1;
        width: auto;
        overflow: visible;
        display: inline;
    }

    .sidebar-toggle {
        margin-left: 4px;
        padding: 6px 10px;
    }

}

/* ============================================================
   25. SIDEBAR - RESPONSIVE
   ============================================================ */
/* Ajuste para móviles muy pequeños */
@media (max-width: 480px) {

    .sidebar-toggle {
        font-size: 15px;
        padding: 4px 8px;
        min-width: 30px;
    }

    .sidebar-header {
        padding: 14px 10px 12px 10px;
        min-height: 60px;
    }

    .sidebar-menu>li>a {
        padding: 9px 10px !important;
    }

    .sidebar-menu>li>a i {
        font-size: 17px !important;
        min-width: 20px;
    }
}

/* ============================================================
   26. SIDEBAR - ESTILOS COMPLETOS (CORREGIDO)
   ============================================================ */

/* === MENÚ PRINCIPAL === */
.sidebar-nav {
    padding: 8px 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu>li {
    position: relative;
}

.sidebar-menu>li>a {
    display: flex;
    align-items: center;
    padding: 11px 18px;
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.25s ease;
    gap: 14px;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-menu>li>a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(255, 255, 255, 0.30);
}

.sidebar-menu>li>a.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12);
    border-left-color: #ffd700;
}

.sidebar-menu>li>a i {
    font-size: 18px;
    min-width: 22px;
    color: rgba(255, 255, 255, 0.60);
    text-align: center;
    transition: color 0.3s ease;
}

.sidebar-menu>li>a:hover i {
    color: rgba(255, 255, 255, 0.90);
}

.sidebar-menu>li>a.active i {
    color: #ffd700;
}

.sidebar-menu>li>a span {
    flex: 1;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.75) !important;
}

.sidebar-menu>li>a:hover span {
    color: #ffffff !important;
}

.sidebar-menu>li>a.active span {
    color: #ffffff !important;
}

/* === SUBMENÚS === */
.submenu-arrow {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    transition: transform 0.3s ease;
    margin-left: auto;
}

.has-submenu.open>.submenu-toggle .submenu-arrow {
    transform: rotate(90deg);
    color: rgba(255, 255, 255, 0.60);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.20);
    display: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

.has-submenu.open>.submenu {
    display: block;
}

.submenu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu li a {
    display: flex;
    align-items: center;
    padding: 10px 18px 10px 52px;
    color: rgba(255, 255, 255, 0.65) !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.25s ease;
    position: relative;
}

.submenu li a::before {
    content: '▸';
    position: absolute;
    left: 32px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 10px;
    transition: color 0.3s ease;
}

.submenu li a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06);
}

.submenu li a:hover::before {
    color: rgba(255, 255, 255, 0.60);
}

.submenu li a.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
}

.submenu li a.active::before {
    color: #ffd700;
}

/* === SCROLLBAR DEL SIDEBAR === */
.sidebar-jaspharm::-webkit-scrollbar {
    width: 4px;
}

.sidebar-jaspharm::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-jaspharm::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.20);
    border-radius: 4px;
}

.sidebar-jaspharm::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ============================================================
   LAYOUT DEFINITIVO - SIDEBAR FIJO Y FOOTER AL FINAL
   ============================================================ */

/* Contenedor principal: flex column, ocupa toda la pantalla */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f0f2f5;
}

/* Header: fijo arriba */
.header-jaspharm {
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-shrink: 0;
}

/* Wrapper que contiene el contenido principal (sin sidebar) */
.body-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-height: 0;
    /* ← IMPORTANTE para flex */
}

/* Sidebar: fijo a la izquierda, debajo del header */
.sidebar-jaspharm {
    position: fixed;
    top: 75px;
    left: 0;
    width: 250px;
    height: calc(100vh - 75px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999;
    background: linear-gradient(180deg, #0f2f6d 0%, #1a4a8a 100%);
    transition: width 0.35s ease;
    box-shadow: 4px 0 25px rgba(15, 47, 109, 0.25);
}

/* Contenedor del contenido: con margen izquierdo igual al ancho del sidebar */
.main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 250px;
    /* Espacio para el sidebar fijo */
    transition: margin-left 0.35s ease;
    overflow: hidden;
    min-height: 0;
}

/* El contenido principal (scroll interno) */
.main-content {
    flex: 1;
    padding: 25px 30px;
    background: #f0f2f5;
    overflow-y: auto;
    /* Scroll solo dentro del contenido */
}

/* Footer: con el mismo margen que el contenido, siempre al final */
.footer-jaspharm {
    margin-left: 250px;
    transition: margin-left 0.35s ease;
    flex-shrink: 0;
    background: linear-gradient(90deg, #317dce, #6797b9);
    padding: 14px 25px;
    text-align: center;
    width: auto;
    /* para que ocupe el ancho restante */
}

/* ============================================================
   ESTADO COLLAPSADO (sidebar reducido)
   ============================================================ */
.page-container.sidebar-collapsed .sidebar-jaspharm {
    width: 60px;
}

.page-container.sidebar-collapsed .main-content-wrapper {
    margin-left: 60px;
}

.page-container.sidebar-collapsed .footer-jaspharm {
    margin-left: 60px;
}

/* ===== NUEVAS REGLAS PARA OCULTAR TEXTOS Y FLECHAS ===== */
.page-container.sidebar-collapsed .sidebar-menu>li>a span,
.page-container.sidebar-collapsed .sidebar-menu .submenu span,
.page-container.sidebar-collapsed .sidebar-menu .submenu-arrow {
    display: none !important;
}

/* ============================================================
   AJUSTES PARA MÓVILES (se integran con mymobile.css)
   ============================================================ */
@media (max-width: 768px) {
    .sidebar-jaspharm {
        width: 60px;
        /* Por defecto colapsado en móvil */
    }

    .main-content-wrapper {
        margin-left: 60px;
    }

    .footer-jaspharm {
        margin-left: 60px;
    }

    /* Cuando se expande en móvil (toggle) */
    .page-container:not(.sidebar-collapsed) .sidebar-jaspharm {
        width: 250px;
    }

    .page-container:not(.sidebar-collapsed) .main-content-wrapper {
        margin-left: 250px;
    }

    .page-container:not(.sidebar-collapsed) .footer-jaspharm {
        margin-left: 250px;
    }
}

@media (max-width: 480px) {
    .sidebar-jaspharm {
        width: 54px;
    }

    .main-content-wrapper {
        margin-left: 54px;
    }

    .footer-jaspharm {
        margin-left: 54px;
    }

    .page-container:not(.sidebar-collapsed) .sidebar-jaspharm {
        width: 220px;
    }

    .page-container:not(.sidebar-collapsed) .main-content-wrapper {
        margin-left: 220px;
    }

    .page-container:not(.sidebar-collapsed) .footer-jaspharm {
        margin-left: 220px;
    }
}

/* ============================================================
   ESTILOS MEJORADOS PARA FILTROS DE REPORTES
   ============================================================ */

/* Contenedor principal de filtros */
.filtro-container,
.filter-container,
.report-filters {
    background: #ffffff;
    padding: 18px 22px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 25px;
}

/* Grid de filtros */
.filtro-form,
.filter-form,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: flex-end;
}

/* Cada grupo de filtro (label + input/select) */
.filtro-group,
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    flex: 0 1 auto;
}

.filtro-group label,
.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Selects e inputs dentro de filtros */
.filtro-group select,
.filtro-group input,
.filter-group select,
.filter-group input {
    padding: 8px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #2d3748;
    background: #ffffff;
    transition: all 0.3s ease;
    width: 100%;
    min-width: 130px;
    height: 38px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Efecto focus */
.filtro-group select:focus,
.filtro-group input:focus,
.filter-group select:focus,
.filter-group input:focus {
    border-color: #0f2f6d;
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 47, 109, 0.1);
}

/* Botones dentro de filtros */
.filtro-group .btn,
.filter-group .btn,
.filter-actions .btn {
    padding: 8px 20px;
    height: 38px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filtro-group .btn-primary,
.filter-group .btn-primary {
    background: linear-gradient(135deg, #0f2f6d, #317dce);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 47, 109, 0.2);
}

.filtro-group .btn-primary:hover,
.filter-group .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(15, 47, 109, 0.3);
}

.filtro-group .btn-success,
.filter-group .btn-success {
    background: #22c55e;
    color: #ffffff;
}

.filtro-group .btn-success:hover,
.filter-group .btn-success:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

/* Botón secundario (limpiar filtros) */
.filter-actions .btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.filter-actions .btn-secondary:hover {
    background: #cbd5e0;
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .filtro-form,
    .filter-form,
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filtro-group,
    .filter-group {
        min-width: 100%;
    }
    
    .filtro-group select,
    .filtro-group input,
    .filter-group select,
    .filter-group input {
        min-width: 100%;
    }
    
    .filter-actions {
        flex-direction: row;
        justify-content: flex-start;
    }
}

/* ============================================================
   PERFIL DE USUARIO (mínimo para verse bien)
   ============================================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 15px 0;
    border-bottom: 2px solid #eef2f7;
    margin-bottom: 20px;
}

.profile-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0f2f6d;
    box-shadow: 0 4px 15px rgba(15, 47, 109, 0.15);
}

.profile-title h1 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    color: #0f2f6d;
}

.profile-id {
    margin: 2px 0 0 0;
    color: #718096;
    font-size: 14px;
}

.profile-role {
    display: inline-block;
    padding: 2px 14px;
    background: #22c55e;
    color: #ffffff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}


/* ============================================================
   NUEVOS ESTILOS - DASHBOARD MEJORADO Y DOCUMENTOS
   ============================================================ */

/* ============================================================
   27. DASHBOARD - TARJETAS MEJORADAS
   ============================================================ */

/* Grid de tarjetas principales */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Tarjetas principales - versión mejorada */
.dashboard-grid .dash-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.dashboard-grid .dash-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    border-color: #0f2f6d;
}

.dashboard-grid .dash-card .card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.dashboard-grid .dash-card .card-icon {
    font-size: 22px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-grid .dash-card .card-icon.blue { background: #eef4ff; color: #0f2f6d; }
.dashboard-grid .dash-card .card-icon.yellow { background: #fef3c7; color: #f59e0b; }
.dashboard-grid .dash-card .card-icon.green { background: #dcfce7; color: #22c55e; }
.dashboard-grid .dash-card .card-icon.red { background: #fee2e2; color: #dc2626; }
.dashboard-grid .dash-card .card-icon.purple { background: #f3e8ff; color: #7c3aed; }

.dashboard-grid .dash-card .card-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.dashboard-grid .dash-card .card-badge.success { background: #dcfce7; color: #22c55e; }
.dashboard-grid .dash-card .card-badge.danger { background: #fee2e2; color: #dc2626; }
.dashboard-grid .dash-card .card-badge.warning { background: #fef3c7; color: #92400e; }
.dashboard-grid .dash-card .card-badge.info { background: #eef4ff; color: #0f2f6d; }

.dashboard-grid .dash-card .card-number {
    font-size: 32px;
    font-weight: 700;
    color: #0f2f6d;
    margin: 4px 0 2px 0;
    line-height: 1.2;
}

.dashboard-grid .dash-card .card-label {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
    margin: 0;
}

.dashboard-grid .dash-card .card-sub {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 4px;
}

.dashboard-grid .dash-card .card-trend {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.dashboard-grid .dash-card .card-trend.up { color: #22c55e; }
.dashboard-grid .dash-card .card-trend.down { color: #dc2626; }

/* ============================================================
   28. DASHBOARD - BARRAS DE PROGRESO
   ============================================================ */

.progress-bar {
    height: 6px;
    background: #eef2f7;
    border-radius: 4px;
    margin: 12px 0 4px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #0f2f6d, #317dce);
    transition: width 1s ease;
}

/* ============================================================
   29. DASHBOARD - ESTADÍSTICAS AVANZADAS
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.stat-card h4 {
    font-size: 13px;
    color: #718096;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.stat-card h4 i {
    color: #0f2f6d;
    margin-right: 8px;
}

.stat-card .stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #4a5568;
    min-width: 100px;
}

.stat-card .stat-track {
    flex: 1;
    height: 10px;
    background: #eef2f7;
    border-radius: 6px;
    overflow: hidden;
}

.stat-card .stat-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s ease;
}

.stat-card .stat-fill.blue { background: linear-gradient(90deg, #0f2f6d, #317dce); }
.stat-card .stat-fill.green { background: linear-gradient(90deg, #22c55e, #4ade80); }
.stat-card .stat-fill.yellow { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card .stat-fill.red { background: linear-gradient(90deg, #dc2626, #ef4444); }
.stat-card .stat-fill.purple { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.stat-card .stat-value {
    font-size: 13px;
    font-weight: 600;
    color: #0f2f6d;
    min-width: 30px;
    text-align: right;
}

/* ============================================================
   30. DASHBOARD - GÉNERO (2 columnas)
   ============================================================ */

.stat-gender {
    display: flex;
    gap: 40px;
    padding: 5px 0;
}

.stat-gender .gender-item {
    display: flex;
    flex-direction: column;
}

.stat-gender .gender-number {
    font-size: 28px;
    font-weight: 700;
    color: #0f2f6d;
}

.stat-gender .gender-label {
    font-size: 13px;
    color: #718096;
}

.stat-gender .gender-label i { 
    margin-right: 4px; 
}

/* ============================================================
   31. DASHBOARD - TÍTULOS DE SECCIÓN
   ============================================================ */

.section-title-dash {
    font-size: 16px;
    font-weight: 600;
    color: #0f2f6d;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-dash i { 
    color: #317dce; 
}

/* ============================================================
   32. DOCUMENTOS - TARJETAS DE RESUMEN
   ============================================================ */

.doc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 15px 0 20px 0;
}

.doc-stat-item {
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.2s ease;
}

.doc-stat-item:hover {
    border-color: #0f2f6d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.doc-stat-item .doc-number {
    font-size: 22px;
    font-weight: 700;
    color: #0f2f6d;
}

.doc-stat-item .doc-label {
    font-size: 11px;
    color: #718096;
    margin-top: 2px;
}

.doc-stat-item.total {
    background: #f8fafc;
    border-color: #0f2f6d;
}

.doc-stat-item.total .doc-number {
    color: #0f2f6d;
}

/* ============================================================
   33. DOCUMENTOS - TAGS (etiquetas de tipo)
   ============================================================ */

.doc-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin: 2px 3px;
}

.doc-tag.contrato { background: #eef4ff; color: #0f2f6d; }
.doc-tag.anexo { background: #dcfce7; color: #166534; }
.doc-tag.extracto { background: #fef3c7; color: #92400e; }
.doc-tag.carta { background: #fee2e2; color: #991b1b; }
.doc-tag.liquidacion { background: #f3e8ff; color: #5b21b6; }
.doc-tag.certificado { background: #ecfdf5; color: #065f46; }
.doc-tag.otros { background: #f1f5f9; color: #475569; }

/* ============================================================
   34. DOCUMENTOS - ESTADO Y BARRAS VISUALES
   ============================================================ */

.doc-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.doc-status.completo { background: #dcfce7; color: #166534; }
.doc-status.incompleto { background: #fef3c7; color: #92400e; }
.doc-status.sin-docs { background: #fee2e2; color: #991b1b; }

.doc-status .doc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.doc-status.completo .doc-dot { background: #22c55e; }
.doc-status.incompleto .doc-dot { background: #f59e0b; }
.doc-status.sin-docs .doc-dot { background: #dc2626; }

/* Barra de documentos (mini gráfico) */
.doc-bar {
    display: flex;
    gap: 3px;
    align-items: center;
    height: 24px;
    margin-top: 4px;
}

.doc-bar-segment {
    height: 100%;
    border-radius: 4px;
    min-width: 4px;
    transition: all 0.3s ease;
}

.doc-bar-segment.has-doc { 
    background: #22c55e; 
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.doc-bar-segment.no-doc { 
    background: #e2e8f0; 
}

.doc-bar-segment:hover {
    transform: scaleY(1.2);
    opacity: 0.8;
}

/* ============================================================
   35. DOCUMENTOS - TABLA (fila clickeable)
   ============================================================ */

.doc-employee-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-employee-row:hover {
    background: #f8fafc !important;
}

.doc-employee-row td {
    vertical-align: middle;
}

/* ============================================================
   36. BADGE DE CUMPLEAÑOS
   ============================================================ */

.birthday-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.birthday-badge.today { 
    background: #dcfce7; 
    color: #166534; 
}

/* ============================================================
   37. FILTROS MEJORADOS - VARIANTES
   ============================================================ */

.filter-container-modern {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.filter-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filter-actions-bar {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    align-items: center;
}

.filter-actions-bar .btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Botones de filtro rápido */
.btn-outline-filter {
    padding: 4px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    color: #4a5568;
    background: #ffffff;
    transition: all 0.2s ease;
}

.btn-outline-filter:hover {
    background: #0f2f6d;
    color: #ffffff;
    border-color: #0f2f6d;
}

/* ============================================================
   38. FILTROS - TARJETAS MINI DE ESTADÍSTICAS
   ============================================================ */

.stats-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-mini-card {
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-mini-card:hover {
    border-color: #0f2f6d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-mini-number {
    font-size: 20px;
    font-weight: 700;
    color: #0f2f6d;
}

.stat-mini-label {
    font-size: 11px;
    color: #718096;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ============================================================
   39. BADGE DE FILTRO CON CONTADOR
   ============================================================ */

.badge-filter-count {
    background: #0f2f6d;
    color: #ffffff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 6px;
    display: inline-block;
}

.badge-filter-count.success { background: #22c55e; }
.badge-filter-count.danger { background: #dc2626; }
.badge-filter-count.warning { background: #f59e0b; }

/* ============================================================
   40. ESTADÍSTICAS DE PERMISOS - BADGES AGRUPADOS
   ============================================================ */

.stats-badge-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.stats-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.stats-badge-pending { background: #fef3c7; color: #92400e; }
.stats-badge-accept { background: #dcfce7; color: #166534; }
.stats-badge-deny { background: #fee2e2; color: #991b1b; }
.stats-badge-total { background: #eef4ff; color: #0f2f6d; }

/* Badge en modal de detalle */
.badge-status-modal {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-left: 10px;
}

/* ============================================================
   41. RESPONSIVE PARA ESTADÍSTICAS
   ============================================================ */

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .stat-gender {
        gap: 20px;
    }
    
    .filter-row-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-badge-group {
        gap: 6px;
    }
    
    .stats-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .doc-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================
   42. ANIMACIONES
   ============================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-grid .dash-card {
    animation: fadeInUp 0.5s ease forwards;
}

.dashboard-grid .dash-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-grid .dash-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-grid .dash-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-grid .dash-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.2s; }
.stat-card:nth-child(2) { animation-delay: 0.3s; }
.stat-card:nth-child(3) { animation-delay: 0.4s; }
.stat-card:nth-child(4) { animation-delay: 0.5s; }

/* ============================================================
   43. UTILIDADES ADICIONALES
   ============================================================ */

.text-muted-small {
    font-size: 11px;
    color: #a0aec0;
}

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.flex-wrap { flex-wrap: wrap; }

/* ============================================================
   44. COLORES PARA ESTADOS DE DOCUMENTOS
   ============================================================ */

.doc-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.doc-status.completo { background: #dcfce7; color: #166534; }
.doc-status.incompleto { background: #fef3c7; color: #92400e; }
.doc-status.sin-docs { background: #fee2e2; color: #991b1b; }

.doc-status .doc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.doc-status.completo .doc-dot { background: #22c55e; }
.doc-status.incompleto .doc-dot { background: #f59e0b; }
.doc-status.sin-docs .doc-dot { background: #dc2626; }

/* ============================================================
   45. BADGE DE CONTADOR EN TABS
   ============================================================ */

.badge-counter {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 10px;
    padding: 1px 8px;
    border-radius: 12px;
    margin-left: 4px;
}

.nav-tabs li.active .badge-counter {
    background: rgba(255, 255, 255, 0.3);
}

.nav-tabs li:not(.active) .badge-counter {
    background: #e2e8f0;
    color: #4a5568;
}