/* Estilos para checkouts mejorados */
/* Indicador de cobro */
.charge-indicator {
    color: #28a745;
    font-weight: bold;
    background: #d4edda;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

.charge-indicator.red-charge {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.no-charge {
    color: #cbd5e1;
    font-style: italic;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8em;
}

.status-indicator.pending {
    background: #ffc107;
    color: #856404;
}

.status-indicator.completed {
    background: #28a745;
    color: white;
}

/* Galería de imágenes */
.images-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.images-gallery img {
    max-width: 150px;
    max-height: 150px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.images-gallery img:hover {
    transform: scale(1.05);
    border-color: #007bff;
}

/* Contador de notificaciones */
.nav-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    min-width: 20px;
    padding: 0 4px;
}

.nav-item {
    position: relative;
}

/* Sistema de permisos */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding: 15px;
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
}

.permission-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #1e293b;
    border-radius: 6px;
    border: 1px solid #334155;
    transition: all 0.2s ease;
}

.permission-item:hover {
    background: #334155;
    border-color: #2196f3;
}

.permission-item input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.permission-item label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: #f8fafc;
    display: flex;
    align-items: center;
}

.permission-item label i {
    margin-right: 6px;
    width: 16px;
    color: #cbd5e1;
}

.permission-item input[type="checkbox"]:checked + label {
    color: #2196f3;
}

.permission-item input[type="checkbox"]:checked + label i {
    color: #2196f3;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0f172a;
    min-height: 100vh;
    color: #f8fafc;
}

/* Contenedor de login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: #1e293b;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    color: #f8fafc;
}

.login-header {
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #f8fafc;
    margin-bottom: 5px;
    font-size: 1.8rem;
}

.login-header p {
    color: #cbd5e1;
    font-size: 1rem;
}

.filters-bar {
    background: #1e293b;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #334155;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #94a3b8;
    font-size: 13px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 14px;
    background: #0f172a;
    color: #f8fafc;
}

@media (max-width: 768px) {
    .filters-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        min-width: 100%;
    }
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #cbd5e1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #334155;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: #0f172a;
    color: #f8fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f26c4f;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Botones */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #f26c4f;
    color: white;
}

.btn-primary:hover {
    background: #e85a3d;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Mensajes */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #c3e6cb;
}

.info-message {
    background: #d1ecf1;
    color: #0c5460;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #bee5eb;
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #1e293b;
    border-radius: 8px;
    font-size: 12px;
    color: #cbd5e1;
}

/* Contenedor principal */
.main-container {
    min-height: 100vh;
    background: #0f172a;
}

.header {
    background: #1e293b;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.header h1 {
    color: #f8fafc;
    font-size: 1.5rem;
}

.header h1 i {
    color: #f26c4f;
    margin-right: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Dashboard */
.dashboard {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.module-card {
    background: #1e293b;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s;
    border: 1px solid #334155;
}

.module-card:hover {
    transform: translateY(-5px);
}

.module-icon {
    font-size: 3rem;
    color: #f26c4f;
    margin-bottom: 20px;
}

.module-card h3 {
    margin-bottom: 15px;
    color: #f8fafc;
}

.module-card p {
    color: #94a3b8;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Tablas */
.table-container {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    border: 1px solid #334155;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #334155;
    color: #f8fafc;
}

.table th {
    background: #334155;
    font-weight: 600;
    color: #f8fafc;
}

.table tbody tr:hover {
    background: #334155;
}

/* Estados y badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* Prioridades */
.priority-baja { color: #28a745; }
.priority-media { color: #ffc107; }
.priority-alta { color: #fd7e14; }
.priority-urgente { color: #dc3545; }

/* Estilos para el modal de imagen */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.image-modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    margin-top: 5%;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Aviso de cobro de desperfectos */
.damage-warning {
    background-color: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    margin-left: 8px;
    font-weight: bold;
    display: inline-block;
    animation: pulse 2s infinite;
}

.damage-warning i {
    margin-right: 2px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

/* Estilos específicos para el modal de edición de mediciones */
.measurement-info-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #334155;
}

.info-card {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.info-item i {
    font-size: 24px;
    color: #f26c4f;
}

.info-item div {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 2px;
    font-weight: 500;
}

.info-item span {
    font-size: 16px;
    font-weight: 600;
}

.edit-section {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.edit-section h3 {
    color: #f8fafc;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    border-bottom: 2px solid #334155;
    padding-bottom: 10px;
}

.edit-section h3 i {
    color: #007bff;
    font-size: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.edit-section .form-group {
    margin-bottom: 0;
}

.edit-section .form-group label {
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 5px;
    display: block;
}

.edit-section .form-group input,
.edit-section .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #334155;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #0f172a;
    color: #f8fafc;
}

.edit-section .form-group input:focus,
.edit-section .form-group textarea:focus {
    outline: none;
    border-color: #f26c4f;
    box-shadow: 0 0 0 3px rgba(242, 108, 79, 0.15);
}

.edit-section .form-group input[readonly] {
    background-color: #334155;
    color: #cbd5e1;
}

.modal-content {
    background-color: #1e293b;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #334155;
    color: #f8fafc;
}

.modal-content.large {
    max-width: 1100px;
    width: 95%;
    max-height: 90vh;
    padding: 24px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #334155;
}

.modal-header h3 {
    margin: 0;
    color: #f8fafc;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #f8fafc;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: #28a745;
}

.notification-error {
    background: #dc3545;
}

.notification-info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Filtros y búsqueda */
.filters {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

/* Estilos para formulario expandido */
.form-section {
    background: #1e293b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #f26c4f;
}

.form-section h4 {
    color: #f26c4f;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-help {
    display: block;
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-top: 5px;
}

/* Estilos para remesas */
.company-item {
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #1e293b;
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.company-header h5 {
    margin: 0;
    color: #f8fafc;
    font-weight: 600;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

#companiesContainer {
    max-height: 400px;
    overflow-y: auto;
}

/* Estilos para campos de archivo */
input[type="file"] {
    padding: 8px;
    border: 2px dashed #007bff;
    border-radius: 5px;
    background: #1e293b;
    width: 100%;
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: #0056b3;
    background: #334155;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .header-right {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .header-right .btn {
        font-size: 0;
        padding: 8px 10px;
    }
    .header-right .btn i {
        font-size: 14px;
        margin: 0;
    }
    .header-right img {
        height: 30px;
    }

    .dashboard {
        padding: 20px;
    }

    .module-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }

    .table-container {
        overflow-x: auto;
    }

    .filters-row {
        grid-template-columns: 1fr;
    }

    .main-container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .dashboard {
        padding: 15px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-button {
        border-radius: 5px;
        margin-bottom: 5px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .modal-content {
        margin: 10px;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-section {
        padding: 15px;
        margin-bottom: 15px;
    }
}

/* Animaciones de carga */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pestañas */
.tabs {
    display: flex;
    background: #1e293b;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    gap: 5px;
    border: 1px solid #334155;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button:hover {
    background: #334155;
    color: #f8fafc;
}

.tab-button.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #334155;
}

.section-header h2 {
    margin: 0;
    color: #f8fafc;
}

/* Tarjetas de reportes */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.report-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s;
    border: 1px solid #334155;
}

.report-card:hover {
    transform: translateY(-3px);
}

.report-card h3 {
    color: #f8fafc;
    margin-bottom: 10px;
}

.report-card p {
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Configuración */
.config-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.config-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.config-card h3 {
    color: #f8fafc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.security-options,
.notification-settings,
.maintenance-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.maintenance-options {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

/* Gráficos */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.chart-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.chart-card h3 {
    margin-bottom: 20px;
    color: #f8fafc;
    text-align: center;
}

/* Detalles de incidencia */
.incident-details {
    max-height: 60vh;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #334155;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h4 {
    color: #f8fafc;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.comment {
    background: #1e293b;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #f26c4f;
}

.material-usage {
    align-items: center;
}

.material-usage select,
.material-usage input {
    flex: 1;
}

/* Utilidades */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #94a3b8; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none !important; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }

/* Estilos para modal de detalles de habitación */
.large-modal .modal-content {
    max-width: 800px;
    width: 90%;
}

.details-container {
    padding: 0;
}

.details-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #1e293b;
    border-radius: 8px;
    border-left: 4px solid #f26c4f;
}

.details-section h4 {
    margin-bottom: 15px;
    color: #f8fafc;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-section h4 i {
    color: #007bff;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #f8fafc;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #1e293b;
    border-radius: 0 0 10px 10px;
}

/* Estilos para botones de acción en tabla */
.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Estilos específicos para gestión de incidencias */
.incidents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.incident-card {
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #334155;
}

.incident-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.incident-card.completed {
    background: #1e293b;
    border-left-color: #28a745;
}

.incident-card.priority-alta {
    border-left-color: #dc3545;
}

.incident-card.priority-media {
    border-left-color: #ffc107;
}

.incident-card.priority-baja {
    border-left-color: #17a2b8;
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.incident-title h4 {
    margin: 0 0 5px 0;
    color: #f8fafc;
    font-size: 1.1rem;
}

.incident-priority {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.incident-priority.priority-alta {
    background: #dc3545;
    color: white;
}

.incident-priority.priority-media {
    background: #ffc107;
    color: #333;
}

.incident-priority.priority-baja {
    background: #17a2b8;
    color: white;
}

.completion-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #ffc107;
    transition: color 0.3s ease;
}

.completion-toggle:hover {
    color: #28a745;
}

.completion-toggle.completed {
    color: #28a745;
}

.completion-toggle.in-progress {
    color: #007bff;
}

.incident-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.incident-description {
    color: #cbd5e1;
    line-height: 1.4;
    margin-bottom: 15px;
}

.incident-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #334155;
    padding-top: 15px;
}

.incident-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.incident-status {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.status-pendiente {
    background: #ffeaa7;
    color: #d63031;
}

.status-en_progreso {
    background: #74b9ff;
    color: white;
}

.status-completada {
    background: #00b894;
    color: white;
}

.incident-date {
    font-size: 0.8rem;
    color: #cbd5e1;
}

.incident-assigned {
    font-size: 0.8rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-incidents {
    text-align: center;
    padding: 60px 20px;
    color: #cbd5e1;
    grid-column: 1 / -1;
}

.no-incidents i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #64748b;
}

.no-incidents h3 {
    margin-bottom: 10px;
    color: #f8fafc;
}

/* Filtros */
.filters-container {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid #334155;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: #f8fafc;
    white-space: nowrap;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Detalles de incidencia en modal */
.incident-detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #334155;
}

.incident-detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.incident-detail-section h4 {
    color: #f8fafc;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 600;
    color: #f8fafc;
    font-size: 0.9rem;
}

.detail-item span {
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #f8fafc;
}

.status-badge, .priority-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.materials-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.material-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #1e293b;
    border-radius: 6px;
    border: 1px solid #334155;
}

.material-name {
    font-weight: 500;
    color: #f8fafc;
}

.material-quantity {
    color: #cbd5e1;
}

.material-cost {
    font-weight: 600;
    color: #28a745;
}

.notes-content {
    padding: 15px;
    background: #1e293b;
    border-radius: 6px;
    border: 1px solid #334155;
    line-height: 1.6;
    color: #f8fafc;
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1e293b;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    min-width: 300px;
    animation: slideIn 0.3s ease;
    border: 1px solid #334155;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left: 4px solid #28a745;
    color: #155724;
}

.notification.error {
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.notification.warning {
    border-left: 4px solid #ffc107;
    color: #856404;
}

.notification.info {
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.notification button {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #cbd5e1;
    margin-left: auto;
}

.notification button:hover {
    color: #f8fafc;
}

/* Navegación de módulos */
.nav-modules {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Estilos para tabla compacta de incidencias */
.incidents-table-container {
    background: #1e293b;
    border-radius: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.incidents-table {
    width: 100%;
    border-collapse: collapse;
}

.incidents-table th {
    background: #1e293b;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #f8fafc;
    border-bottom: 2px solid #334155;
    font-size: 0.9rem;
}

.incidents-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #334155;
    vertical-align: middle;
}

.incident-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.incident-row:hover {
    background-color: #334155;
}

.incident-row.completed {
    background-color: #0f2817;
}

.completion-cell {
    width: 40px;
    text-align: center;
}

.title-cell {
    min-width: 200px;
}

.incident-title-compact {
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 2px;
}

.incident-description-compact {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.3;
}

.location-cell {
    min-width: 150px;
}

.location-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.location-type {
    font-size: 0.8rem;
    color: #f8fafc;
    font-weight: 500;
}

.location-block {
    font-size: 0.8rem;
    color: #cbd5e1;
}

.location-detail {
    font-size: 0.85rem;
    color: #f8fafc;
    font-weight: 500;
}

.priority-cell, .status-cell {
    width: 100px;
    text-align: center;
}

.assigned-cell {
    width: 120px;
    font-size: 0.85rem;
    color: #f8fafc;
}

.date-cell {
    width: 100px;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.actions-cell {
    width: 80px;
    text-align: center;
}

.btn-icon {
    background: none;
    border: none;
    padding: 5px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #334155;
    color: #f8fafc;
}

.no-incidents-row {
    text-align: center;
    padding: 40px 20px;
    color: #cbd5e1;
}

.no-incidents-row i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #64748b;
}

/* Estilos para historial de ubicación */
.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    padding: 15px;
    border: 1px solid #334155;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: #1e293b;
    border-color: #f26c4f;
}

.history-item.completed {
    background: #f0f8f0;
    border-color: #28a745;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #f8fafc;
}

.history-date {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.history-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.history-description {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.4;
}

/* Estilos para vista anual de remesas */
.year-selector {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.year-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.year-controls h2 {
    margin: 0;
    color: white;
    font-size: 2rem;
    font-weight: 300;
}

.remesas-annual-view {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    min-height: 80vh;
}

.month-section {
    background: #1e293b;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    overflow: hidden;
    border: 1px solid #334155;
}

.month-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.month-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
}

.month-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.remesa-dates {
    font-size: 0.9rem;
    opacity: 0.9;
}

.month-total {
    font-size: 1.2rem;
    font-weight: 600;
}

.remesa-days {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.remesa-day {
    padding: 20px;
    border-right: 1px solid #334155;
    min-height: 200px;
}

.remesa-day:last-child {
    border-right: none;
}

.remesa-day.has-remesas {
    background: #0f2817;
    border-left: 4px solid #28a745;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #334155;
}

.day-header h4 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.1rem;
}

.day-total {
    font-weight: 600;
    color: #28a745;
    font-size: 1.1rem;
}

.day-remesas {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.remesa-item {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remesa-item:hover {
    border-color: #4facfe;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.2);
    transform: translateY(-1px);
}

.remesa-info {
    flex: 1;
}

.company-name {
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 5px;
}

.invoice-number {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 5px;
}

.remesa-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: #28a745;
}

.remesa-actions {
    display: flex;
    gap: 5px;
}

.no-remesas {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
    color: #cbd5e1;
    text-align: center;
}

.no-remesas i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #64748b;
}

.no-remesas span {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Estilos para módulos de mediciones y pagos */
.measurements-container,
.pagos-container {
    background: #1e293b;
    padding: 30px;
    border-radius: 15px;
    min-height: 70vh;
}

.module-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
}

.module-header h2 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 300;
}

.module-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.measurements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.measurement-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    border-left: 4px solid #f26c4f;
}

.measurement-card h3 {
    margin: 0 0 15px 0;
    color: #f8fafc;
    font-size: 1.2rem;
}

.measurement-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.measurement-input label {
    flex: 1;
    font-weight: 500;
    color: #f8fafc;
}

.measurement-input input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #334155;
    border-radius: 6px;
    text-align: center;
}

.measurement-unit {
    color: #cbd5e1;
    font-size: 0.9rem;
    min-width: 30px;
}

/* Estilos adicionales para mediciones */
.date-selector {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.date-selector label {
    font-weight: 600;
    color: #f8fafc;
}

.date-selector input[type="date"] {
    padding: 10px 15px;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 1rem;
}

.measurement-actions {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.measurements-history {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.measurements-history h3 {
    margin: 0 0 20px 0;
    color: #f8fafc;
    border-bottom: 2px solid #334155;
    padding-bottom: 10px;
}

.history-table-container {
    overflow-x: auto;
}

.measurements-table {
    width: 100%;
    border-collapse: collapse;
}

.measurements-table th,
.measurements-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.measurements-table th {
    background: #1e293b;
    font-weight: 600;
    color: #f8fafc;
}

.measurements-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.measurements-table tbody tr:hover {
    background-color: #334155;
}

.measurement-card textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #334155;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
}

/* Estilos para contenedor principal de pagos */
.pagos-table-container {
    background: #1e293b;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

/* Mejoras visuales generales */
.main-content {
    background: #0f172a;
    min-height: calc(100vh - 80px);
    padding: 20px;
}

.filters-container {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

/* Estilos para botones de navegación de año */
.year-controls .btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    transition: all 0.3s ease;
}

.year-controls .btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

/* ============================================
   DASHBOARD NAVIGATION — Residgest Dark Theme
   ============================================ */

.dashboard-nav {
    background: #1e293b;
    padding: 10px 20px;
    border-bottom: 1px solid #334155;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-nav::-webkit-scrollbar {
    height: 4px;
}

.dashboard-nav::-webkit-scrollbar-track {
    background: #0f172a;
}

.dashboard-nav::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 2px;
}

.nav-right {
    display: flex;
    justify-content: center;
}

.nav-modules {
    display: inline-flex;
    gap: 8px;
    flex-wrap: nowrap;
    padding: 4px;
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid #334155;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.25s ease;
    position: relative;
}

.nav-link:hover {
    background: #334155;
    color: #f8fafc;
}

.nav-link.active,
.nav-link[href=""],
#incidenciasLink.active,
#checkoutLink.active,
#inventoryLink.active,
#measurementsLink.active,
#remesasLink.active,
#pagosLink.active,
#cleaningLink.active,
#inRoomLink.active,
#inRoomDashboardLink.active,
#directionLink.active {
    background: #f26c4f;
    color: white;
    box-shadow: 0 4px 12px rgba(242, 108, 79, 0.35);
}

.nav-link i {
    font-size: 14px;
}

/* Responsive nav */
@media (max-width: 768px) {
    .dashboard-nav {
        padding: 6px 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .nav-right {
        display: flex;
        justify-content: flex-start;
        width: 100%;
    }
    .nav-modules {
        gap: 3px;
        padding: 3px;
        flex-wrap: nowrap;
    }
    .nav-link {
        padding: 6px 8px;
        font-size: 10px;
        gap: 3px;
        white-space: nowrap;
    }
    .nav-link i {
        display: none;
    }
}

/* Correcciones de fondos restantes */
.main-content {
    background: #0f172a;
    min-height: calc(100vh - 80px);
    padding: 20px;
}

.filters-container {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.pagos-table-container {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.measurements-table tbody tr:hover {
    background-color: #334155;
}

.measurement-card textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #334155;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    background: #0f172a;
    color: #f8fafc;
}

/* ============ MODULO CLIENTES ============ */
.form-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.form-section-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #334155;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.form-section-card h3 {
    color: #60a5fa;
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #334155;
}

.form-section-card h3 i {
    color: #3b82f6;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="month"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #0f172a;
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #475569;
}

.form-group select option {
    background: #0f172a;
    color: #f8fafc;
}

/* Subida de fotos */
.photo-row {
    align-items: flex-start;
}

.photo-upload {
    text-align: center;
}

.photo-upload label {
    display: block;
    margin-bottom: 8px;
    color: #94a3b8;
    font-weight: 500;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: #0f172a;
    border: 2px dashed #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    margin: 0 auto 8px;
    overflow: hidden;
    transition: border-color 0.2s;
    cursor: pointer;
}

.photo-preview:hover {
    border-color: #3b82f6;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview i {
    font-size: 2rem;
    margin-bottom: 4px;
}

.photo-preview span {
    font-size: 0.75rem;
}

.photo-upload input[type="file"] {
    display: none;
}

.photo-upload small {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 4px;
    cursor: pointer;
}

.photo-upload .photo-preview + small {
    cursor: pointer;
    color: #60a5fa;
}

.photo-upload .photo-preview + small:hover {
    text-decoration: underline;
}

/* Barra de acciones del formulario */
.form-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid #334155;
    margin-top: 8px;
}

/* Badges de tabla */
.entry-id-badge {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.room-badge {
    background: #f1f5f9;
    color: #0f172a;
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.block-badge {
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.block-a { background: #dbeafe; color: #1d4ed8; }
.block-b { background: #d1fae5; color: #047857; }
.block-c { background: #fef3c7; color: #b45309; }
.block-e { background: #fce7f3; color: #be185d; }

.regimen-badge {
    background: #f3e8ff;
    color: #7c3aed;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Ficha de cliente detalle */
.client-detail-grid {
    display: grid;
    grid-template-columns: 150px 1fr 1fr 1fr;
    gap: 20px;
}

.client-detail-photo {
    text-align: center;
}

.client-detail-photo img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #334155;
}

.client-detail-photo .no-photo {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #475569;
    margin: 0 auto;
}

.client-detail-info h4,
.client-detail-stay h5,
.client-detail-payment h5,
.client-detail-dni h5,
.client-detail-notes h5 {
    margin-bottom: 12px;
    color: #f8fafc;
}

.client-detail-stay h5,
.client-detail-payment h5,
.client-detail-dni h5,
.client-detail-notes h5 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #60a5fa;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #334155;
}

.detail-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 500;
    text-align: right;
    color: #f8fafc;
}

.client-detail-dni .dni-images {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.dni-img {
    width: 280px;
    text-align: center;
}

.dni-img img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #334155;
}

.dni-img span {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.dni-img.no-img {
    width: 280px;
    height: 170px;
    background: #1e293b;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #475569;
}

.client-detail-notes p {
    background: #1e293b;
    padding: 12px;
    border-radius: 8px;
    color: #f8fafc;
    line-height: 1.5;
}

.client-detail-meta {
    grid-column: 1 / -1;
    background: #1e293b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.client-detail-meta strong {
    color: #f8fafc;
}

/* Mini foto en tabla */
.client-photo-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.2rem;
}

.client-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
    .form-sections {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 12px;
    }
    .client-detail-grid {
        grid-template-columns: 1fr;
    }
    .dni-images {
        flex-direction: column;
    }
    .dni-img, .dni-img.no-img {
        width: 100%;
    }
}

/* Móvil: los botones del pie de los modales pasan a varias filas en vez de salirse de la pantalla */
@media (max-width: 768px) {
    .modal-footer {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .modal-footer .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 130px;
        justify-content: center;
        padding: 10px 12px;
    }
}


/* El menú superior se muestra cuando se sabe a qué páginas puede entrar el usuario */
.dashboard-nav .nav-modules .nav-link { visibility: hidden; }
body.nav-ready .dashboard-nav .nav-modules .nav-link { visibility: visible; }

/* Menú superior: en pantallas anchas pasa a dos filas si hay muchas páginas, en vez de salirse de la pantalla */
@media (min-width: 769px) {
    .nav-modules {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }
    .nav-link {
        padding: 8px 12px;
    }
}

/* Permisos de acceso por usuario: casilla + icono + nombre en una fila */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 8px;
}
.permission-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
}
.permission-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: none;
    accent-color: #f26c4f;
}
.permission-item label {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    cursor: pointer;
    font-size: .9rem;
    line-height: 1.2;
    text-align: left;
}


/* Tarjeta de suscripción en Dirección */
.sub-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #1e293b; border: 1px solid #334155; border-left: 4px solid #4ade80; border-radius: 12px; padding: 16px 20px; margin-bottom: 18px; }
.sub-card.warn { border-left-color: #fbbf24; }
.sub-card.bad { border-left-color: #f87171; }
.sub-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 260px; }
.sub-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(242,108,79,.15); color: #f26c4f; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex: none; }
.sub-info { flex: 1; }
.sub-title { font-weight: 700; }
.sub-text { color: #cbd5e1; font-size: .92rem; margin: 2px 0 8px; }
.sub-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; margin-left: 6px; background: rgba(74,222,128,.15); color: #4ade80; }
.sub-card.warn .sub-badge { background: rgba(251,191,36,.15); color: #fbbf24; }
.sub-card.bad .sub-badge { background: rgba(248,113,113,.18); color: #f87171; }
.sub-bar { height: 8px; background: #0f172a; border-radius: 999px; overflow: hidden; }
.sub-bar span { display: block; height: 100%; width: 0; background: #4ade80; border-radius: 999px; transition: width .4s; }
.sub-card.warn .sub-bar span { background: #fbbf24; }
.sub-card.bad .sub-bar span { background: #f87171; }
.sub-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Aviso de vencimiento (se muestra en todas las páginas al director) */
.expiry-banner { background: #92400e; color: #fff; text-align: center; padding: 9px 16px; font-size: .9rem; }
.expiry-banner a { color: #fde68a; font-weight: 700; margin-left: 8px; }
