﻿/* ==========================================
   LAYOUT Y CONTENEDORES BASE
   ========================================== */
.main-content-wrapper {
    background-color: #F4F6F9;
    padding: 5rem 0 10rem 0;
    min-height: calc(100vh - 70px);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    margin-top: 0;
}

    .main-content-wrapper.demo-active {
        padding-top: 2rem;
    }

.content-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

.main-panel {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 3rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.main-panel, .content-container {
    overflow: visible !important;
}

    .main-panel .text-center.mb-5 {
        margin-bottom: 2.5rem !important;
    }

/* ==========================================
   TIPOGRAFÍA Y ENCABEZADOS
   ========================================== */
.panel-main-title {
    color: #0F1E3D;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.page-title {
    color: #495057;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.breadcrumb-item.active {
    color: #17A2B8;
    font-weight: 600;
}

/* ==========================================
   FORMULARIOS E INPUTS
   ========================================== */
.form-label {
    margin-bottom: 0.4rem;
    display: block;
    font-weight: 600;
    color: #334155;
}

.custom-input {
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    color: #1E293B;
    transition: all 0.2s;
    background-color: #FFFFFF;
    resize: none;
}

textarea.custom-input {
    resize: none;
    overflow-y: auto;
}

    .custom-input:focus {
        background-color: #fff;
        border-color: #17A2B8;
        color: #1E293B;
        box-shadow: 0 0 0 4px rgba(23, 162, 184, 0.1);
    }

    .custom-input option {
        color: #1E293B;
        background-color: #FFFFFF;
    }

    .custom-input.border-end-0 {
        border-right: none !important;
    }

.form-select.custom-input {
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

select.custom-input:focus {
    outline: none;
}

.input-group-text {
    border-color: #E2E8F0;
    background-color: #F8FAFC;
    color: #94A3B8;
}

/* ==========================================
   TABLAS Y DATOS
   ========================================== */
.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: #94A3B8;
    background-color: #F8FAFC;
    border-bottom: 2px solid #EDF2F7;
    padding: 0.75rem 1rem;
}

.table tbody td {
    padding: 0.85rem 1rem;
    color: #1E293B;
    font-size: 0.9rem;
    border-bottom: 1px solid #F1F5F9;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #F8FAFC;
    transition: background-color 0.2s ease;
}

.table-info-light {
    background-color: rgba(23, 162, 184, 0.05) !important;
}

.table-responsive {
    overflow: visible !important;
}
/* ==========================================
   BOTONES Y ACCIONES
   ========================================== */
.btn-plantel-primary {
    background-color: #17A2B8;
    color: white !important;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-plantel-primary:hover:not(:disabled) {
        background-color: #138496;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(23, 162, 184, 0.2);
    }

    .btn-plantel-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-back-minimal {
    background: none;
    border: none;
    color: #64748B;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    padding: 0;
    transition: color 0.2s ease;
}

    .btn-back-minimal i {
        font-size: 1.4rem;
    }

    .btn-back-minimal:hover {
        color: #0F1E3D;
        text-decoration: underline;
    }

.btn-search-icon {
    border: 1.5px solid #E2E8F0;
    padding: 0 1.2rem;
    background: white;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-search-icon:hover {
        background-color: #F8FAFC !important;
    }

.btn-action-dots {
    color: #94A3B8;
    background: transparent;
    border: none;
    padding: 0.4rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .btn-action-dots:hover {
        background-color: #F1F5F9;
        color: #17A2B8;
    }

.btn-light {
    background-color: #FFFFFF;
}

.btn-plantel-secondary {
    background-color: #FFFFFF;
    color: #64748B !important;
    border: 1px solid #E2E8F0;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-plantel-secondary:hover:not(:disabled) {
        background-color: #F8FAFC;
        color: #0F1E3D !important;
        border-color: #CBD5E1;
    }

.btn-primary-custom {
    background-color: #17A2B8;
    color: white;
    border: none;
    border-radius: 8px;
    height: 46px;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .btn-primary-custom:hover {
        background-color: #138496;
        transform: translateY(-1px);
    }
/* ==========================================
   UTILIDADES 
   ========================================== */

.rounded-8 {
    border-radius: 8px !important;
    overflow: hidden;
}

.alert {
    margin-top: 1rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    font-weight: 500;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.badge {
    font-size: 0.8rem;
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
}

.modal-backdrop {
    background-color: rgba(15, 30, 61, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.text-cyan {
    color: #17A2B8 !important;
}

.text-slate {
    color: #64748B !important;
}

.info-value {
    font-size: 0.85rem;
    color: #4A5568;
    font-weight: 600;
}
/* ==========================================
   BUSCADORES Y RESULTADOS 
   ========================================== */
.search-container {
    position: relative;
    width: 100%;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group > .btn-search-icon {
    border-left: none; 
}

.search-results-wrapper {
    position: absolute;
    z-index: 1050;
    width: 100%;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 5px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.search-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #F8FAFC;
    font-size: 0.9rem;
    transition: all 0.2s;
}

    .search-item:hover {
        background-color: #F1F5F9;
        color: #17A2B8;
    }

    .search-item.selected {
        background-color: #F1F5F9;
        font-weight: 600;
        border-left: 4px solid #17A2B8;
    }

    .search-item:last-child {
        border-bottom: none;
    }
/* ==========================================
   PAGINACIÓN
   ========================================== */
.pagination .page-link {
    color: #17A2B8;
    border: 1px solid #E2E8F0;
    min-width: 35px;
    text-align: center;
    margin: 0 2px;
    border-radius: 4px !important;
    transition: all 0.2s;
}

.pagination .page-item.active .page-link {
    background-color: #17A2B8;
    border-color: #17A2B8;
    color: white;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}
/* ==========================================
   BADGES Y ESTADOS
   ========================================== */
.badge-plantel {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.badge-info {
    background-color: #E0F2FE;
    color: #0369A1;
}

.badge-success {
    background-color: #D1E7DD;
    color: #0F5132;
}

.badge-doc {
    background-color: #EDF2F7;
    color: #4A5568;
    font-weight: 500;
    font-size: 0.75rem;
}


/* ==========================================
   ANIMACIONES
   ========================================== */
.animate-fade-in {
    animation: fadeIn 0.3s ease-in;
}

.animate__fadeInDown {
    animation: fadeInDown 0.5s ease both;
}

.animate-zoom-in {
    animation: zoomIn 0.3s ease-out both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20%, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}
/* ==========================================
   MODALES Y ALERTAS
   ========================================== */
.modal-backdrop {
    background-color: rgba(15, 30, 61, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.alert {
    border-radius: 10px;
    font-weight: 500;
    border: none;
}

.alert-success {
    background-color: #D1E7DD;
    color: #0F5132;
}

.alert-danger {
    background-color: #F8D7DA;
    color: #842029;
}

.modal.show.d-block {
    z-index: 1050;
    display: block;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: block;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}
.custom-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.custom-modal-container {
    width: 100%;
    max-width: 600px;
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0,0,0,0.18);
    animation: zoomIn 0.2s ease;
}

.custom-modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #EDF2F7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-modal-body {
    padding: 1.5rem;
    color: #475569;
    line-height: 1.7;
    /*white-space: pre-wrap;*/
    max-height: 400px;
    overflow-y: auto;
}

.custom-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #EDF2F7;
    display: flex;
    justify-content: flex-end;
}
/* ==========================================
   NAVEGACIÓN 
   ========================================== */
.nav-tabs {
    border-bottom: 2px solid #E2E8F0;
    gap: 0.5rem;
}

    .nav-tabs .nav-link {
        border: none;
        color: #8A94A6;
        font-weight: 600;
        padding: 1rem 1.5rem;
        background: transparent;
        transition: all 0.3s;
        border-bottom: 3px solid transparent;
    }

        .nav-tabs .nav-link:hover {
            color: #495057;
            background-color: #F8FAFC;
        }

        .nav-tabs .nav-link.active {
            color: #17A2B8;
            border-bottom: 3px solid #17A2B8;
            background: transparent;
        }
/* ==========================================
   MENÚS DESPLEGABLES (DROPDOWNS) 
   ========================================== */
.dropdown-item {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #475569;
}

    .dropdown-item:hover {
        background-color: #F8FAFC;
        color: #17A2B8;
    }

    .dropdown-item.text-danger:hover {
        background-color: #FEF2F2;
        color: #DC2626;
    }

.dropdown-header {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94A3B8;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
}

.dropdown-menu {
    position: absolute;
    z-index: 1050;
    margin-top: 5px !important;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
}
/* ==========================================
   COMPONENTES DE CARGA (SPINNERS)
   ========================================== */
.search-spinner {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: center;
}
/* Para cuando el spinner está dentro de un contenedor específico */
.search-spinner-inner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}
