/* assets/css/theme-modern.css - Tema minimalista mobile-first */
:root {
    /* Colores minimalistas */
    --primary: #2E86AB;
    --primary-dark: #1B5E7A;
    --primary-light: #5BA4C8;
    --secondary: #6C757D;
    
    /* Escala de grises suave */
    --background: #F8F9FA;
    --surface: #FFFFFF;
    --text: #212529;
    --text-light: #6C757D;
    --border: #DEE2E6;
    
    /* Sin sombras excesivas */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.1);
    
    /* Bordes suaves */
    --radius: 8px;
}

/* Reset mobile-first */
body {
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Contenedores compactos para mobile */
.welcome-container,
.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
}

/* Ventana compacta */
.window {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

/* Header compacto */
.header {
    background: var(--primary);
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Contenido compacto - SIN SCROLL */
.content {
    padding: 1.5rem;
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
    overflow: hidden;
}

/* Logo compacto */
.logo-graphic {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* Textos compactos */
.welcome-logo h1 {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.welcome-message p {
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 0;
}

/* Botones mobile-friendly */
.btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--radius);
    min-height: 44px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Formularios mobile */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.form-input {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--surface);
    min-height: 44px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Checkbox mobile */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.checkbox-input {
    width: 18px;
    height: 18px;
}

/* Mensajes compactos */
.message {
    padding: 0.875rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.3;
}

.message-error {
    background: #FFF5F5;
    border: 1px solid #FED7D7;
    color: #C53030;
}

/* Footer compacto */
.system-info,
.login-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.2;
}

/* ===== ESTILOS DE VALIDACIÓN ===== */
.campo-requerido {
    border-color: var(--error) !important;
    background-color: #fef2f2 !important;
}

.campo-valido {
    border-color: var(--success) !important;
    background-color: #f0fdf4 !important;
}

.mensaje-validacion {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.mensaje-error { 
    color: var(--error); 
}

.mensaje-exito { 
    color: var(--success); 
}

.label-requerido::after { 
    content: " *"; 
    color: var(--error); 
}


/* ===== CLASES FALTANTES ===== */

/* Utilidades de texto */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-light { color: var(--text-light); }
.text-lighter { color: var(--text-lighter); }

/* Utilidades de padding */
.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Utilidades de margin */
.m-0 { margin: 0; }
.m-1 { margin: 0.5rem; }
.m-2 { margin: 1rem; }
.m-3 { margin: 1.5rem; }
.m-4 { margin: 2rem; }

/* Mensaje de búsqueda sin resultados */
.no-results-busqueda {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 1rem 0;
    text-align: center;
    box-shadow: var(--shadow);
}

.no-results-busqueda h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.no-results-busqueda p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.no-results-busqueda small {
    font-size: 0.8rem;
    color: var(--text-lighter);
}

/* Utilidades básicas (opcionales pero útiles) */
.hidden { display: none; }
.block { display: block; }


/* ===== GESTIÓN DE USUARIOS ===== */

/* Estructura móvil */
@media (max-width: 768px) {
    .mobile-view {
        display: block;
        height: 100vh;
        display: flex;
        flex-direction: column;
        background: var(--background);
    }
    
    .mobile-header {
        flex-shrink: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        box-shadow: var(--shadow);
    }
    
    .mobile-title {
        font-size: 1.25rem;
        font-weight: 600;
        color: white;
        margin-bottom: 1rem;
        text-align: center;
        background: var(--primary);
        padding: 0.5rem;
        border-radius: var(--radius);
    }
    
    .mobile-search {
        margin-bottom: 1rem;
        position: relative;
    }
    
    .mobile-search .form-input {
        padding-left: 2.5rem;
    }
    
    .search-icon {
        position: absolute;
        left: 0.875rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-light);
        z-index: 2;
    }
    
    .mobile-actions {
        display: flex;
        gap: 0.75rem;
    }
    
    .mobile-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .mobile-content {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
        padding-bottom: 5rem;
    }
    
    /* Cards de usuarios móvil */
    .user-card {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 1.25rem;
        margin-bottom: 1rem;
        box-shadow: var(--shadow);
        transition: all 0.2s ease;
    }
    
    .user-card:active {
        background: var(--primary);
        color: white;
    }
    
    .user-card:active .user-name,
    .user-card:active .user-email,
    .user-card:active .user-detail,
    .user-card:active .user-badge {
        color: white;
    }
    
    .user-card:active .user-badge {
        background: color-mix(in srgb, white 20%, transparent);
        border-color: color-mix(in srgb, white 30%, transparent);
    }
    
    .user-card-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--border-light);
    }
    
    .user-name {
        font-weight: 600;
        font-size: 1.1rem;
        color: var(--text);
        margin-bottom: 0.5rem;
    }
    
    .user-email {
        color: var(--text-light);
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .user-details {
        margin-bottom: 1rem;
    }
    
    .user-detail {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
        color: var(--text-light);
    }
    
    .user-badge {
        background: color-mix(in srgb, var(--primary) 10%, transparent);
        color: var(--primary);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
        border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    }
    
    .user-role-badge {
        background: color-mix(in srgb, var(--secondary) 10%, transparent);
        color: var(--secondary);
    }
    
    .user-status-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-light);
    }
    
    .status-text {
        font-size: 0.8rem;
        font-weight: 600;
    }
    
    .status-active {
        color: var(--success);
    }
    
    .status-inactive {
        color: var(--error);
    }
    
    .desktop-view {
        display: none;
    }
}

/* ===== CORRECCIÓN PARA SELECTS EN MÓVIL ===== */

/* Para móvil - mejorar apariencia de selects de acciones */
@media (max-width: 768px) {
    .actions-select {
        width: 100%;
        padding: 0.75rem;
        border: 2px solid var(--border);
        border-radius: var(--radius);
        font-size: 0.95rem;
        background: var(--surface);
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C757D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 1rem;
        padding-right: 2.5rem;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        min-height: 44px; /* Tamaño táctil */
    }
    
    .actions-select:focus {
        border-color: var(--primary);
        outline: none;
        box-shadow: 0 0 0 3px var(--primary-light);
    }
    
    .actions-select:disabled {
        opacity: 0.6;
        background-color: var(--background);
        border-color: var(--border-light);
    }
    
    /* Para selects dentro de cards */
    .user-card .actions-select {
        margin-top: 0.5rem;
    }
}

/* ===== CORRECCIÓN PARA INPUT DE BÚSQUEDA EN MÓVIL ===== */

@media (max-width: 768px) {
    .search-input {
        width: 100%;
        padding: 0.875rem 1rem 0.875rem 3rem;
        border: 2px solid var(--border);
        border-radius: var(--radius);
        font-size: 1rem;
        background: var(--surface);
        min-height: 44px;
        -webkit-appearance: none;
        appearance: none;
        box-sizing: border-box;
    }
    
    .search-input:focus {
        border-color: var(--primary);
        outline: none;
        box-shadow: 0 0 0 3px var(--primary-light);
    }
    
    /* Icono de búsqueda en móvil */
    .search-box {
        position: relative;
        width: 100%;
    }
    
    .search-box::before {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-light);
        z-index: 2;
        font-size: 1.1rem;
    }
    
    /* Quitar el icono duplicado si existe */
    .mobile-search .search-icon {
        display: none;
    }
}

/* Estructura desktop */
@media (min-width: 769px) {
    .mobile-view {
        display: none;
    }
    
    .desktop-view {
        display: block;
    }
    
    .usuarios-container {
        width: 100%;
        max-width: 95vw;
        margin: 0 auto;
        padding: 0 1rem;
    }
    
    .usuarios-container .window {
        width: 100%;
        min-width: 300px;
        max-width: 1400px;
        margin: 1rem auto;
        box-sizing: border-box;
    }
    
    .usuarios-container .window .content {
        padding: 1.5rem;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        min-height: auto;
        height: auto;
    }
    
    .fixed-section {
        width: 100%;
        flex-shrink: 0;
    }
    
    .search-container {
        margin-bottom: 1rem;
        position: relative;
        max-width: 600px;
        width: 100%;
    }
    
    .search-input {
        padding: 0.75rem 1rem;
        padding-left: 2.5rem;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        font-size: 1rem;
        width: 100%;
        background: var(--surface);
        transition: all 0.2s ease;
        box-sizing: border-box;
    }
    
    .search-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 2px var(--primary-light);
    }
    
    .search-container .search-icon {
        position: absolute;
        left: 0.875rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-light);
    }

    .table-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
    }
    
    .table-actions .btn {
        white-space: nowrap;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .scrollable-section {
        width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        border-radius: var(--radius);
        flex-grow: 1;
        min-height: 200px;
    }
    
    .table-container {
        background: var(--surface);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        min-width: 800px;
    }
    
    .users-table {
        width: 100%;
        border-collapse: collapse;
        min-width: 800px;
    }
    
    .users-table th {
        background: var(--primary-light);
        color: var(--primary-dark);
        padding: 0.875rem 0.75rem;
        text-align: left;
        font-weight: 600;
        border-bottom: 1px solid var(--border);
        white-space: nowrap;
        font-size: 0.9rem;
    }
    
    .users-table td {
        padding: 0.75rem;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
        white-space: nowrap;
        font-size: 0.9rem;
    }
    
    .users-table tr:last-child td {
        border-bottom: none;
    }
    
    .users-table tr:hover {
        background: color-mix(in srgb, var(--primary) 2%, transparent);
    }
    
    .user-name {
        font-weight: 600;
        color: var(--text);
        min-width: 160px;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .user-email {
        color: var(--text-light);
        min-width: 200px;
        max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .user-department {
        background: color-mix(in srgb, var(--primary) 8%, transparent);
        color: var(--primary);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
        white-space: nowrap;
        display: inline-block;
        min-width: 90px;
        text-align: center;
        border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    }
    
    .user-role {
        background: color-mix(in srgb, var(--secondary) 8%, transparent);
        color: var(--secondary);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
        white-space: nowrap;
        display: inline-block;
        min-width: 100px;
        text-align: center;
        border: 1px solid color-mix(in srgb, var(--secondary) 20%, transparent);
    }
    
    .user-date {
        color: var(--text-light);
        font-size: 0.8rem;
        white-space: nowrap;
        min-width: 100px;
    }
    
    .user-status-cell {
        min-width: 140px;
    }

    .table-status {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    .no-results {
        text-align: center;
        padding: 2rem;
        color: var(--text-light);
        min-width: 800px;
    }
    
    .no-results h3 {
        margin: 0 0 0.5rem 0;
        font-size: 1.1rem;
    }
    
    .no-results p {
        margin: 0;
        font-size: 0.9rem;
    }
    
    /* Scroll para desktop */
    .scrollable-section::-webkit-scrollbar {
        height: 8px;
    }
    
    .scrollable-section::-webkit-scrollbar-track {
        background: color-mix(in srgb, var(--border) 50%, transparent);
        border-radius: 4px;
        margin: 0 4px;
    }
    
    .scrollable-section::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 4px;
    }
    
    .scrollable-section::-webkit-scrollbar-thumb:hover {
        background: var(--primary-dark);
    }
}

/* ===== GESTIÓN DE MOVIMIENTOS ===== */
.color-folder {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
    border: 1px solid var(--border);
}

.search-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.search-box {
    flex: 2;
    min-width: 250px;
}

.filter-box {
    flex: 1;
    min-width: 200px;
}

.user-filter-box {
    flex: 1;
    min-width: 220px;
}

.counter-box {
    flex: 0 0 auto;
    min-width: 180px;
}

.filter-select, 
.user-filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--surface);
}

.filter-select:focus, 
.user-filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.actions-select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--surface);
}

.registros-counter {
    font-size: 14px;
    color: var(--text-light);
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    white-space: nowrap;
    text-align: center;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.departamento-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    font-weight: 600;
}

/* Responsive para movimientos */
@media (max-width: 1024px) {
    .search-filters {
        flex-wrap: wrap;
    }
    .search-box {
        flex: 1 1 100%;
    }
    .filter-box, .user-filter-box, .counter-box {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box, .filter-box, .user-filter-box, .counter-box {
        min-width: auto;
        flex: 1 1 100%;
    }
}

/* Desktop más grande */
@media (min-width: 1200px) {
    .usuarios-container {
        max-width: 1200px;
    }
    
    .usuarios-container .window {
        min-width: 300px;
        max-width: 1200px;
    }
    
    .table-container,
    .users-table,
    .no-results {
        min-width: 900px;
    }
}

@media (min-width: 1400px) {
    .usuarios-container {
        max-width: 1400px;
    }
    
    .usuarios-container .window {
        min-width: 300px;
        max-width: 1400px;
    }
    
    .table-container,
    .users-table,
    .no-results {
        min-width: 1000px;
    }
}

/* Móvil más pequeño */
@media (max-width: 480px) {
    .mobile-header {
        padding: 0.75rem;
    }
    
    .mobile-content {
        padding: 0.75rem;
        padding-bottom: 5rem;
    }
    
    .user-card {
        padding: 1rem;
    }
    
    .user-name {
        font-size: 1rem;
    }
}

/* ===== FORMULARIO DE CONTACTO ===== */
.contact-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
}

.contact-card {
    width: 100%;
    max-width: 800px;
    height: 85vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.contact-card .card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.contact-card .card-scroll-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.contact-method {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

/* Estilos de prioridad */
.priority-high { border-left: 4px solid var(--error); }
.priority-medium { border-left: 4px solid var(--warning); }
.priority-low { border-left: 4px solid var(--success); }

.char-count {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: right;
    margin-top: 0.5rem;
}

.char-count.warning { color: var(--warning); }
.char-count.error { color: var(--error); }

/* Ajustes específicos para pantallas muy pequeñas */
@media (max-width: 360px) {
    .content {
        padding: 1rem;
    }
    
    .welcome-logo h1 {
        font-size: 1.1rem;
    }
    
    .header {
        padding: 0.875rem;
        font-size: 1rem;
    }
}

/* Asegurar que no haya scroll */
@media (max-height: 600px) {
    .welcome-container,
    .login-container {
        padding: 0.5rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .logo-graphic {
        width: 50px;
        height: 50px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
}

/* Estados de carga */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Utilidades para evitar scroll */
.no-scroll {
    overflow: hidden;
}

.compact {
    margin: 0;
    padding: 0;
}

/* ===== FORMULARIO CAMBIAR CONTRASEÑA ===== */
.password-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.password-strength {
    margin-top: 0.5rem;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-weak { 
    background: var(--error); 
    width: 33%; 
}

.strength-medium { 
    background: var(--warning); 
    width: 66%; 
}

.strength-strong { 
    background: var(--success); 
    width: 100%; 
}

.password-requirements {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--radius);
    font-size: 0.8rem;
    border: 1px solid var(--border);
}

.requirement {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.requirement.valid {
    color: var(--success);
    font-weight: 600;
}

.requirement.valid::before {
    content: "✓ ";
    font-weight: bold;
}

.requirement.invalid {
    color: var(--error);
}

.requirement.invalid::before {
    content: "✗ ";
    font-weight: bold;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background: var(--border-light);
    color: var(--text);
}

.input-group {
    position: relative;
}

.password-match {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    min-height: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.password-match.valid {
    color: var(--success);
}

.password-match.invalid {
    color: var(--error);
}

/* Indicadores de requisitos debajo del input */
.password-hints {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    font-size: 0.75rem;
}

.password-hint {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    background: var(--background);
    transition: all 0.3s ease;
}

.password-hint.valid {
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: var(--success);
    font-weight: 600;
}

.password-hint.invalid {
    background: color-mix(in srgb, var(--error) 10%, transparent);
    color: var(--text-light);
}

.password-hint-icon {
    font-size: 0.9rem;
}

/* Action Cards para permisos */
.action-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: all 0.2s ease;
}

.action-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.action-card .checkbox-group {
    margin: 0;
    align-items: flex-start;
}

.action-card strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.action-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.4;
}

.acciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Responsive para cambiar contraseña */
@media (max-width: 480px) {
    .password-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .password-requirements {
        padding: 0.75rem;
    }
    
    .password-hints {
        grid-template-columns: 1fr;
    }
}

/* Responsive para contacto */
@media (max-width: 768px) {
    .contact-container {
        padding: 1rem;
    }
    
    .contact-card {
        height: 90vh;
        max-height: none;
    }
    
    .contact-card .card-scroll-content {
        padding: 1.5rem;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .contact-container {
        padding: 0.5rem;
    }
    
    .contact-card {
        height: 95vh;
    }
    
    .contact-card .card-scroll-content {
        padding: 1rem;
    }
    
    .contact-card .card-header {
        padding: 1rem;
    }
    
    .contact-card .card-header h3 {
        font-size: 1.1rem;
        margin: 0;
    }
}

@media (min-height: 900px) {
    .contact-card {
        height: 80vh;
    }
}

/* ===== MEJORAS ESPECÍFICAS PARA IPAD ===== */

/* Rango específico para iPad (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait),
       (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    
    /* Forzar vista móvil en iPad */
    .mobile-view {
        display: flex !important;
        height: 100vh;
        height: 100dvh;
    }
    
    .desktop-view {
        display: none !important;
    }
    
    /* Mejorar header para iPad */
    .mobile-header {
        padding: 1rem 1.5rem;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    
    .mobile-title {
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 1rem;
        text-align: center;
        background: var(--primary);
        color: white;
        padding: 0.75rem;
        border-radius: var(--radius);
    }
    
    .mobile-actions {
        display: flex;
        gap: 1rem;
    }
    
    .mobile-actions .btn {
        flex: 1;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        min-height: 54px;
        border-radius: 12px;
    }
    
    /* Contenedor principal mejorado */
    .mobile-content {
        flex: 1;
        overflow-y: auto;
        padding: 1.5rem;
        padding-bottom: 2rem;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mejorar cards para tacto iPad */
    .user-card {
        background: var(--surface);
        border: 2px solid var(--border);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 1.25rem;
        box-shadow: var(--shadow);
        transition: all 0.2s ease;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .user-card:active {
        transform: scale(0.98);
        background: var(--primary-light);
        color: white;
    }
    
    /* Textos más grandes para iPad */
    .user-name {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .user-email {
        font-size: 1.1rem;
        color: var(--text-light);
        margin-bottom: 1rem;
    }
    
    .user-detail {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Badges más grandes */
    .user-badge {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        border-radius: 8px;
        margin: 0.25rem;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Barra de búsqueda mejorada */
    .search-container {
        position: sticky;
        top: 0;
        background: var(--background);
        z-index: 100;
        padding: 1rem 0;
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        border-bottom: 1px solid var(--border);
    }
    
    .search-input {
        padding: 1rem 1rem 1rem 3rem;
        font-size: 1.1rem;
        border-radius: 12px;
        border: 2px solid var(--border);
        min-height: 54px;
    }
    
    /* Mejorar formularios para iPad */
    .form-input, 
    .form-select {
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 12px;
        border: 2px solid var(--border);
        min-height: 54px;
    }
    
    .form-label {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
    }
    
    /* Botones de acción más grandes */
    .user-status-section .btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px;
        border-radius: 8px;
    }
    
    /* Checkboxes más grandes para iPad */
    .checkbox-input {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }
    
    .checkbox-group {
        font-size: 1.1rem;
        gap: 0.75rem;
    }
}

/* Landscape específico para iPad */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .mobile-header {
        padding: 0.75rem 1.5rem;
    }
    
    .mobile-title {
        font-size: 1.2rem;
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .mobile-actions .btn {
        padding: 0.75rem 1rem;
        min-height: 44px;
        font-size: 1rem;
    }
    
    .mobile-content {
        padding: 1rem 1.5rem;
    }
    
    .user-card {
        padding: 1.25rem;
        min-height: 100px;
    }
}

/* iPad Pro 12.9" */
@media (min-width: 1024px) and (max-width: 1366px) {
    .mobile-view {
        max-width: 800px;
        margin: 0 auto;
    }
    
    .user-card {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===== CORRECCIÓN ESPECÍFICA PARA SELECTS EN iOS/iPad ===== */
/* Solo para mejorar apariencia sin romper layout */

/* Reset básico para selects en iOS */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C757D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Para iPad - Solo mejora visual, no cambia layout */
@media (min-width: 768px) and (max-width: 1024px) {
    select {
        min-height: 44px; /* Tamaño táctil adecuado */
    }
    
    .filter-select,
    .user-filter-select {
        font-size: 1rem;
        border: 2px solid var(--border);
    }
    
    .actions-select {
        min-height: 40px;
        font-size: 0.95rem;
    }
}

/* Eliminar flecha nativa en Firefox */
select::-moz-focus-inner {
    border: 0;
}

select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 var(--text);
}

/* Para navegadores WebKit (Safari/Chrome en iOS) */
select::-webkit-inner-spin-button,
select::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}





/* Estilos específicos para modales */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow: auto;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header.bg-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background);
    flex-shrink: 0;
}

/* Mini modales */
.mini-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.mini-modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    width: 100%;
}

.mini-modal-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.mini-modal-header.bg-primary {
    background: var(--primary);
}

.mini-modal-header.bg-purple {
    background: var(--purple);
}

.mini-modal-body {
    padding: 1rem;
}

/* Utilidades adicionales */
.hidden {
    display: none !important;
}

.btn-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.section-title {
    margin: 0 0 0.75rem 0;
    color: var(--text);
    padding-bottom: 0.5rem;
    font-size: 1.1rem;
}

.badge {
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge.bg-primary {
    background: var(--primary);
}

.bg-primary-light {
    background: var(--primar-light);
}

.border-l-4 {
    border-left-width: 4px;
}

.border-primary {
    border-color: var(--primary);
}

.border-success {
    border-color: var(--success);
}

.max-h-150 {
    max-height: 150px;
}

.max-h-200 {
    max-height: 200px;
}

.bg-blue-50 {
    background: #f0f9ff;
}

.border-blue-500 {
    border-color: #3b82f6;
}

.text-blue-700 {
    color: #1e40af;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-purple {
    background: var(--purple);
    color: white;
    border: none;
}

.btn-purple:hover {
    background: var(--purple-dark);
}

.btn-gray {
    background: var(--secondary);
    color: white;
    border: none;
}

.btn-gray:hover {
    background: var(--text-light);
}

.btn-error {
    background: var(--error);
    color: white;
    border: none;
}

.btn-error:hover {
    background: #dc2626;
}

.search-input {
    padding-left: 2.5rem !important;
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 2;
}

.summary-box {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius);
}

/* Estados de botón */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive para modales */
@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .modal-body {
        max-height: calc(95vh - 140px);
    }
    
    .mini-modal-content {
        margin: 0.5rem;
    }
}
