/* ==========================================================================
   Variables y Configuración Base
   ========================================================================== */
:root {
    --color-primary: #30407B;
    --color-primary-hover: #1e2a5a;
    --color-accent: #f83883;
    --color-accent-hover: #d82b6b;
    --color-bg: #ecf0f1;
    --color-sidebar: #30407B;
    --color-text: #333;
    --color-text-light: #7d889b;
    --border-color: #e1e8ed;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.08);
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
}

/* ==========================================================================
   Layout Principal (App)
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: calc(100vh - 100px); /* Aproximadamente altura del header */
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar {
    width: 250px;
    background-color: var(--color-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: url('https://i0.wp.com/sorece.org/wp-content/uploads/2023/05/sorece-administracion.png?fit=2084%2C2084&ssl=1');
    background-size: cover;
    background-blend-mode: overlay;
    background-color: rgba(48, 64, 123, 0.95);
    flex-shrink: 0;
}

.sidebar-logo-container {
    padding: 30px 0;
}
.sidebar-logo-container img {
    width: 80px;
    height: auto;
}

.mobile-menu {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    padding: 15px;
    width: 100%;
    text-align: right;
    cursor: pointer;
}

.menu-options {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.menu-options li a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    transition: background 0.2s;
    font-weight: 500;
    font-size: 15px;
}

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

.menu-options li a.active {
    background: var(--color-accent);
    box-shadow: inset 4px 0 0 white;
}

.menu-options li .icon {
    margin-right: 12px;
    font-size: 18px;
}

/* ==========================================================================
   Contenido Principal
   ========================================================================== */
.app-content {
    flex-grow: 1;
    padding: 30px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.dashboard-title {
    margin: 0 0 25px 0;
    font-size: 28px;
    color: var(--color-primary);
    font-weight: 700;
    font-family: 'Cormorant Garamond', serif;
}

/* Tarjetas y Contenedores */
.stat-card, .graph-container, .filters-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 500;
}
.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}
.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

/* ==========================================================================
   Responsividad
   ========================================================================== */
@media screen and (max-width: 900px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        background-size: cover;
    }
    
    .sidebar-logo-container {
        display: none; /* Ocultar logo extra en móvil */
    }

    .menu-toggle {
        display: block;
    }

    .menu-options {
        display: none;
    }
    
    .menu-options.open {
        display: block;
    }
    
    .app-content {
        padding: 15px;
    }
}

/* ==========================================================================
   Header del Módulo (Título y Filtros tipo Píldora)
   ========================================================================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 20px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-title-bar {
    margin: 0;
    font-size: 20px;
    color: var(--color-primary);
    font-weight: 600;
}

/* Filtros Tipo Píldora (Tabs) */
.panel-filter-container {
    display: flex;
    background: #f0f4f8;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
}

.panel-filter-tab {
    background: transparent;
    color: #666;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.panel-filter-tab:hover {
    color: var(--color-primary);
}

.panel-filter-tab.active {
    background: white;
    color: var(--color-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Selector/Input derecho */
.dynamic-selector-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selector-input {
    padding: 8px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    color: #333;
    background: white;
}
.selector-input:focus {
    border-color: var(--color-primary);
}
/* ==========================================================================
   Tablas
   ========================================================================== */
.table-container {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

th {
    background-color: #f8fafc;
    color: var(--color-text-light);
    font-weight: 600;
    padding: 12px 15px;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--color-text);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8fafc;
}

/* ==========================================================================
   Botones
   ========================================================================== */
.btn-action {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-blue {
    background-color: var(--color-primary);
    color: white !important;
}
.btn-blue:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(48, 64, 123, 0.2);
}

.btn-green {
    background-color: #10b981;
    color: white !important;
}
.btn-green:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-red {
    background-color: #ef4444;
    color: white !important;
}
.btn-red:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.btn-yellow {
    background-color: #f59e0b;
    color: white !important;
}
.btn-yellow:hover {
    background-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);
}

/* ==========================================================================
   Modales
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}
.close:hover, .close:focus {
    color: var(--color-primary);
    text-decoration: none;
}

/* Controles de formulario en Modales y Tablas */
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.form-control:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* ==========================================================================
   Filtros móvil (lista terapeutas)
   ========================================================================== */

.filtros-mobile-btn {
    display: none;
}

.filtros-mobile-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filtros-mobile-form .selector-input {
    width: 100%;
    min-width: 0 !important;
}

@media screen and (max-width: 900px) {
    .filtros-desktop {
        display: none !important;
    }

    .filtros-mobile-btn {
        display: inline-block;
    }

    #popup-filtros .modal-content {
        width: 90%;
        max-width: 420px;
        margin: 20% auto;
    }
}


/* ==========================================================================
   Trabaja con Nosotras - UI Design
   ========================================================================== */
.trabaja-nosotras-body {
    background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 100%);
    min-height: 100vh;
}

.trabaja-nosotras-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.tn-header-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.tn-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #30407B;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.tn-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.tn-step-item {
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}
.tn-step-item.active {
    opacity: 1;
}
.tn-step-item.completed {
    opacity: 1;
}

.tn-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin: 0 auto 10px auto;
    border: 2px solid transparent;
}
.tn-step-item.active .tn-step-circle {
    background-color: #9E81FF;
    color: white;
}
.tn-step-item.completed .tn-step-circle {
    background-color: white;
    border-color: #9E81FF;
    color: #9E81FF;
}

.tn-step-item p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.solicitud-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.registration-card {
    max-width: 600px;
    margin: 0 auto;
}

.info-card {
    border-left: 4px solid #9E81FF;
    color: #555;
    line-height: 1.6;
}
.info-card p {
    margin-bottom: 15px;
}
.info-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 14px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #30407B;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}
.card-title .dashicons {
    color: #9E81FF;
    margin-right: 10px;
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.form-group label:has(input[type="checkbox"]) {
    font-weight: 400;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #fdfdfd;
}
.form-control:focus {
    border-color: #9E81FF;
    box-shadow: 0 0 0 3px rgba(158, 129, 255, 0.15);
    outline: none;
}
.disabled-input {
    background-color: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}

.radio-group {
    display: flex;
    gap: 20px;
}
.radio-vertical {
    flex-direction: column;
    gap: 10px;
}
.radio-group label {
    font-weight: 400 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}
.checkbox-grid label {
    font-weight: 400 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.upload-area {
    border: 2px dashed #9E81FF;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background-color: #fcfbfe;
    cursor: pointer;
    transition: all 0.3s ease;
}
.upload-area:hover {
    background-color: #f4f0ff;
    border-color: #7d5fff;
}
.upload-area .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #9E81FF;
    margin-bottom: 15px;
}
.upload-text {
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}
.upload-subtext {
    color: #888;
    font-size: 12px;
    margin: 0;
}

.tn-btn-submit {
    background-color: #8B5CF6;
    color: white;
    padding: 15px 40px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}
.tn-btn-submit:hover {
    background-color: #7C3AED;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.4);
}

