/* ===================================
   VARIABLES CSS
   =================================== */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #81C784;
    --secondary-color: #2196F3;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --success-color: #4CAF50;
    --dark-color: #333333;
    --light-color: #f5f5f5;
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* ===================================
   RESET Y ESTILOS BASE
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

/* ===================================
   LOGIN PAGE
   =================================== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.35);
    padding: 45px 40px;
    animation: fadeInUp 0.6s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header .logo {
    font-size: 70px;
    margin-bottom: 20px;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-header h1 {
    font-size: 32px;
    color: #1e293b;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #64748b;
    font-size: 15px;
    font-weight: 400;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    color: #94a3b8;
    font-size: 13px;
}

/* ===================================
   FORMS
   =================================== */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #757575;
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #616161;
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===================================
   MENSAJES
   =================================== */
.mensaje {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: none;
    animation: fadeIn 0.4s ease;
    font-weight: 500;
    font-size: 14px;
}

.mensaje.show {
    display: block;
}

.mensaje.success {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.mensaje.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.mensaje.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ===================================
   CONTAINER Y LAYOUT
   =================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
}

.header {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .header {
        padding: 15px;
        margin-bottom: 15px;
    }
}

.header h1 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.header p {
    color: #666;
}

.content {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .content {
        padding: 20px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 15px;
    }
}

.footer {
    text-align: center;
    padding: 20px;
}

@media (max-width: 768px) {
    .footer {
        padding: 15px 10px;
    }
}

/* ===================================
   GRID DE VEHÍCULOS
   =================================== */
.vehiculos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.vehiculo-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.vehiculo-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.vehiculo-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.vehiculo-card h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.vehiculo-placa {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.vehiculo-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.vehiculo-km {
    color: #999;
    font-size: 13px;
    margin-bottom: 15px;
}

/* ===================================
   MODAL
   =================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ===================================
   UTILIDADES
   =================================== */
.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 18px;
}

.text-center {
    text-align: center;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* Menu Toggle Button for Mobile */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10001;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.menu-toggle:active {
    transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ===================================
   ANIMACIONES
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .vehiculos-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .login-card {
        padding: 25px 18px;
    }
    
    .btn {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .main-content {
        padding: 80px 10px 15px 10px;
    }
    
    .dashboard-header h1 {
        font-size: 22px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-icon {
        font-size: 32px;
    }
    
    .servicio-heading {
        font-size: 18px;
    }
    
    .servicio-icon {
        font-size: 28px;
    }
    
    .no-servicio-icon {
        font-size: 48px;
    }
    
    .no-servicio-card h3 {
        font-size: 18px;
    }
    
    .btn-iniciar-servicio {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .card {
        border-radius: 8px;
    }
    
    .form-grid {
        padding: 15px;
    }
    
    .modal-content {
        padding: 25px 18px;
    }
    
    .install-banner {
        width: 98%;
        border-radius: 12px;
    }
    
    .install-banner-content {
        padding: 12px;
        gap: 12px;
    }
}

/* ===================================
   PWA - INSTALACIÓN
   =================================== */
.install-prompt {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 999;
    max-width: 90%;
}

.install-prompt.show {
    display: block;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ===================================
   SERVICIOS Y HISTORIAL
   =================================== */
.servicio-activo-alert {
    background: #d1ecf1;
    border-left: 4px solid var(--secondary-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
}

.servicio-activo-alert h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.acciones-rapidas {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.acciones-rapidas h3 {
    margin-bottom: 15px;
}

.info-card {
    background: var(--white);
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
}

.info-card p {
    margin-bottom: 8px;
}

.footer-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Estadísticas */
.estadisticas-card {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Historial */
.historial-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.historial-item {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 15px;
    transition: var(--transition);
}

.historial-item:hover {
    box-shadow: var(--box-shadow);
    transform: translateX(5px);
}

.historial-item.en_curso {
    border-left-color: var(--warning-color);
    background: #fffef5;
}

.historial-item.finalizado {
    border-left-color: var(--success-color);
}

.historial-item.cancelado {
    border-left-color: var(--danger-color);
    opacity: 0.7;
}

.historial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.historial-fecha {
    font-weight: 500;
    color: var(--dark-color);
}

.historial-estado {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.estado-en_curso {
    background: #fff3cd;
    color: #856404;
}

.estado-finalizado {
    background: #d4edda;
    color: #155724;
}

.estado-cancelado {
    background: #f8d7da;
    color: #721c24;
}

.historial-body p {
    margin-bottom: 8px;
    color: #555;
}

.historial-metrics {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.metric {
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
}

.historial-notas {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.historial-notas p {
    margin-top: 5px;
    color: #666;
    font-style: italic;
}

/* Formulario de servicio */
.servicio-form {
    max-width: 600px;
    margin: 0 auto;
}

.servicio-form h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ===================================
   SIDEBAR LAYOUT
   =================================== */
body {
    display: flex;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Overlay para cerrar sidebar en móvil */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .sidebar {
        z-index: 10000;
    }
}

.sidebar-collapsed {
    width: 70px;
}

.sidebar-collapsed .nav-text,
.sidebar-collapsed .user-info,
.sidebar-collapsed .sidebar-footer {
    display: none;
}

.sidebar-collapsed .sidebar-header h2 {
    font-size: 18px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    font-size: 15px;
    margin-bottom: 2px;
}

.user-info small {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    padding: 20px 0;
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 12px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left: 4px solid white;
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    font-size: 15px;
    font-weight: 500;
}

.nav-link-logout {
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-link-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Dropdown menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 12px;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.nav-dropdown-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-dropdown-toggle.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.nav-dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 12px;
}

.nav-dropdown-toggle.open .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background: rgba(0,0,0,0.2);
}

.nav-dropdown-menu.show {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scroll personalizado para el dropdown */
.nav-dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.nav-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    margin: 4px 0;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.2);
}

.nav-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.6);
}

/* Para Firefox */
.nav-dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.4) rgba(0,0,0,0.2);
}

/* Scrollbar para el sidebar completo */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) rgba(0,0,0,0.2);
}

.nav-dropdown-menu .nav-link {
    padding-left: 56px;
    font-size: 14px;
}

.nav-dropdown-menu .nav-link:hover {
    background: rgba(255,255,255,0.15);
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-footer small {
    font-size: 12px;
    opacity: 0.7;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background: #f3f4f6;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.content-expanded {
    margin-left: 70px;
}

.dashboard-header h1 {
    font-size: 32px;
    color: #1e293b;
    margin-bottom: 5px;
}

.dashboard-header .text-muted {
    color: #64748b;
    font-size: 16px;
}

.dashboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.dashboard-empty h3 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 10px;
}

.dashboard-empty p {
    color: #64748b;
    font-size: 16px;
}

/* ===================================
   ESTADÍSTICAS ADMINISTRADOR
   =================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border-left: 4px solid #e2e8f0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.stat-card-primary {
    border-left-color: #3b82f6;
}

.stat-card-success {
    border-left-color: #10b981;
}

.stat-card-warning {
    border-left-color: #f59e0b;
}

.stat-card-info {
    border-left-color: #06b6d4;
}

.stat-card-purple {
    border-left-color: #8b5cf6;
}

.stat-card-teal {
    border-left-color: #14b8a6;
}

.stat-icon {
    font-size: 48px;
    line-height: 1;
    opacity: 0.9;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #94a3b8;
}

.stat-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Servicios Recientes */
.recent-services-section {
    margin-top: 40px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.section-header h2 {
    font-size: 22px;
    color: #1e293b;
    margin: 0;
}

.btn-view-all {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-view-all:hover {
    background: #eff6ff;
}

.services-table-container {
    overflow-x: auto;
}

.services-table {
    width: 100%;
    border-collapse: collapse;
}

.services-table thead {
    background: #f8fafc;
}

.services-table th {
    text-align: left;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.services-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 14px;
}

.services-table tbody tr:hover {
    background: #f8fafc;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-operativo {
    background: #dcfce7;
    color: #166534;
}

.badge-mantenimiento {
    background: #fef3c7;
    color: #92400e;
}

.badge-administrativo {
    background: #dbeafe;
    color: #1e40af;
}

.badge-emergencia {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.sidebar-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-expanded {
        margin-left: 0;
    }
    
    /* Estadísticas en móvil */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        font-size: 40px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .services-table-container {
        overflow-x: auto;
        
    }
    
    .services-table {
        min-width: 700px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ===================================
   ADMIN TABLES & CARDS
   =================================== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 20px;
    overflow: hidden;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-help-install {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    font-size: 14px;
}

.btn-help-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-help-install span {
    font-size: 18px;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-icon {
    display: inline-block;
    padding: 5px 10px;
    text-decoration: none;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* ===================================
   FORM STYLES - PROFESSIONAL
   =================================== */
.form-container {
    max-width: 900px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 32px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #334155;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    margin-top: 8px;
}

.form-actions .btn {
    padding: 12px 28px;
    font-weight: 500;
    border-radius: 8px;
}

.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #22c55e;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #ef4444;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #3b82f6;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
}

.page-header .text-muted {
    color: #64748b;
    font-size: 14px;
}

.text-muted {
    color: #64748b;
}

/* ===================================
   FORMULARIO REGISTRAR SERVICIO - DISEÑO EJECUTIVO
   =================================== */
#formRegistrarServicio input:focus,
#formRegistrarServicio select:focus,
#formRegistrarServicio textarea:focus {
    outline: none;
    border-color: #667eea !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
    transform: translateY(-2px);
}

#formRegistrarServicio input:hover,
#formRegistrarServicio select:hover,
#formRegistrarServicio textarea:hover {
    border-color: #cbd5e1;
}

#formRegistrarServicio button[type="submit"]:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5) !important;
}

#formRegistrarServicio a[href*="dashboard"]:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-2px);
}

/* Responsive para formulario */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        z-index: 10000;
    }
    
    .sidebar.sidebar-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 15px 20px 15px;
    }
    
    .content-expanded {
        margin-left: 0;
    }
    
    .dashboard-header h1 {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 18px;
        gap: 15px;
    }
    
    .stat-icon {
        font-size: 36px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .servicio-activo-card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .servicio-heading {
        font-size: 20px;
    }
    
    .servicio-details-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .servicio-actions {
        width: 100%;
        margin-top: 15px;
    }
    
    .btn-finalizar-servicio {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .no-servicio-card {
        padding: 30px 20px;
    }
    
    .no-servicio-icon {
        font-size: 56px;
    }
    
    .container {
        padding: 15px;
    }
    
    .content {
        padding: 20px;
    }
    
    .card {
        margin-top: 15px;
    }
    
    .table-responsive {
        margin: 0 -15px;
        padding: 0 15px;
        overflow-x: auto;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    #formRegistrarServicio div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    #formRegistrarServicio .form-actions {
        flex-direction: column !important;
    }
    
    #formRegistrarServicio button[type="submit"],
    #formRegistrarServicio a[href*="dashboard"] {
        flex: 1 !important;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column !important;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .vehiculos-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons .btn {
        width: 100%;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .main-content {
        padding: 75px 10px 15px 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .content {
        padding: 15px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .login-card {
        padding: 25px 18px;
    }
    
    .dashboard-header h1 {
        font-size: 22px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-icon {
        font-size: 32px;
    }
    
    .servicio-heading {
        font-size: 18px;
    }
    
    .servicio-icon {
        font-size: 28px;
    }
    
    .no-servicio-icon {
        font-size: 48px;
    }
    
    .no-servicio-card h3 {
        font-size: 18px;
    }
    
    .btn {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .btn-iniciar-servicio {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .form-grid {
        padding: 15px;
    }
    
    .modal-content {
        padding: 25px 18px;
    }
    
    .install-banner {
        width: 98%;
        border-radius: 12px;
        top: 10px;
    }
    
    .install-banner-content {
        padding: 12px;
        gap: 10px;
    }
    
    .install-banner-icon {
        font-size: 32px;
    }
    
    .install-banner-text strong {
        font-size: 15px;
    }
    
    .install-banner-text p {
        font-size: 12px;
    }
}
/* ===================================
   ESTILOS PARA GASTOS
   =================================== */

/* Formulario de gastos */
.form-gasto .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-gasto .form-group {
    margin-bottom: 20px;
}

.form-gasto .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.form-gasto .form-label.required::after {
    content: ' *';
    color: #ef4444;
}

.form-gasto .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.form-gasto .form-control:focus {
    outline: none;
    border-color: #667eea;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-gasto .form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #64748b;
}

.form-gasto .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Tabla de gastos */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

.data-table .text-center {
    text-align: center;
}

.data-table .text-right {
    text-align: right;
}

/* Badges para tipos de gasto */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.badge-tanqueo {
    background: #dbeafe;
    color: #1e40af;
}

.badge-arreglo {
    background: #fef3c7;
    color: #92400e;
}

.badge-neumatico {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-mantenimiento {
    background: #d1fae5;
    color: #065f46;
}

.badge-compra {
    background: #fce7f3;
    color: #831843;
}

.badge-otro {
    background: #f3f4f6;
    color: #374151;
}

/* Info cards */
.info-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label {
    font-size: 13px;
    color: #64748b;
}

.info-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

/* Help card */
.help-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.help-card h3 {
    margin-bottom: 15px;
    color: #78350f;
}

.help-list {
    list-style: none;
    padding-left: 0;
}

.help-list li {
    padding: 8px 0;
    color: #92400e;
}

.help-list strong {
    color: #78350f;
}

/* Date info */
.date-info {
    display: flex;
    flex-direction: column;
}

.date-info small {
    font-size: 12px;
    color: #64748b;
}

/* Vehicle info */
.vehicle-info {
    display: flex;
    flex-direction: column;
}

.vehicle-info strong {
    color: #1e293b;
}

.vehicle-info small {
    font-size: 12px;
    color: #64748b;
}

/* Description cell */
.description-cell {
    max-width: 300px;
}

.description-cell small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

/* Amount styling */
.amount {
    color: #059669;
    font-size: 16px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #475569;
    margin-bottom: 10px;
}

.empty-state p {
    color: #64748b;
    margin-bottom: 25px;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 40px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

/* Alert */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-warning {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

/* Card header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

/* Button variants */
.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Text utilities */
.text-muted {
    color: #94a3b8 !important;
}

/* ===================================
   SERVICIO ACTIVO - DASHBOARD
   =================================== */
.servicio-activo-card {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 8px 24px rgba(245,158,11,0.4);
}

.servicio-activo-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-wrap: wrap;
    gap: 20px;
}

.servicio-info {
    flex: 1;
    min-width: 250px;
}

.servicio-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.servicio-icon {
    font-size: 32px;
}

.servicio-heading {
    font-size: 24px;
    font-weight: 700;
}

.servicio-fecha {
    font-size: 14px;
    opacity: 0.9;
}

.servicio-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.servicio-detail-card {
    background: rgba(255,255,255,0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 12px;
}

.detail-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 6px;
}

.detail-value {
    font-size: 16px;
    font-weight: 600;
}

.servicio-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
}

.btn-finalizar-servicio {
    background: white;
    color: #059669;
    padding: 16px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-finalizar-servicio:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.btn-finalizar-servicio span {
    font-size: 20px;
}

/* ===================================
   NO SERVICIO ACTIVO
   =================================== */
.no-servicio-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.no-servicio-icon {
    font-size: 72px;
    margin-bottom: 16px;
}

.no-servicio-card h3 {
    color: #1e293b;
    margin-bottom: 12px;
    font-size: 24px;
}

.no-servicio-card p {
    color: #64748b;
    margin-bottom: 28px;
    font-size: 16px;
}

.btn-iniciar-servicio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 17px;
    box-shadow: 0 4px 16px rgba(102,126,234,0.4);
    transition: all 0.3s;
}

.btn-iniciar-servicio:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.5);
}

.btn-iniciar-servicio span {
    font-size: 24px;
}

/* ===================================
   MODAL FINALIZAR SERVICIO
   =================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-title {
    color: #1e293b;
    margin-bottom: 24px;
    font-size: 26px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-title span {
    font-size: 32px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 15px;
}

.form-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #f8fafc;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
}

.form-textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8fafc;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
}

.form-hint {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-modal-submit {
    flex: 1;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(16,185,129,0.3);
    transition: all 0.3s;
}

.btn-modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16,185,129,0.4);
}

.btn-modal-cancel {
    flex: 0.5;
    background: #f1f5f9;
    color: #64748b;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modal-cancel:hover {
    background: #e2e8f0;
}

/* ===================================
   REPORTES Y ANÁLISIS
   =================================== */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.report-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.report-header {
    padding: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.report-header h3 {
    font-size: 18px;
    color: #1e293b;
    margin: 0;
}

.report-content {
    padding: 20px;
}

.metric-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    margin-bottom: 15px;
}

.metric-large:last-child {
    margin-bottom: 0;
}

.metric-value {
    font-size: 48px;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Gastos por Tipo */
.gastos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gasto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    transition: all 0.2s ease;
}

.gasto-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.gasto-tipo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tipo-icon {
    font-size: 24px;
}

.tipo-nombre {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.gasto-stats {
    text-align: right;
}

.gasto-monto {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.gasto-cantidad {
    font-size: 12px;
    color: #64748b;
}

/* Vehículos por Tipo */
.vehiculos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vehiculo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.vehiculo-item:hover {
    background: #f1f5f9;
}

.vehiculo-icon {
    font-size: 28px;
    margin-right: 12px;
}

.vehiculo-tipo {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.vehiculo-cantidad {
    font-size: 24px;
    font-weight: 700;
    color: #3b82f6;
}

/* Resumen de Actividad */
.activity-summary {
    margin-top: 30px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.summary-card h3 {
    font-size: 22px;
    color: #1e293b;
    margin-bottom: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
}

.summary-icon {
    font-size: 40px;
    line-height: 1;
}

.summary-content {
    flex: 1;
}

.summary-label {
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.empty-state {
    padding: 40px;
    text-align: center;
    color: #94a3b8;
}

.empty-state p {
    margin: 0;
}

/* Responsive Reportes */
@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-large {
        padding: 15px;
    }
    
    .metric-value {
        font-size: 36px;
    }
}

/* ===================================
   PESTAÑAS DE REPORTES
   =================================== */
.reports-tabs {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;

}

.tab-btn {
    padding: 15px 25px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #3b82f6;
    background: #f8fafc;
}

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.tab-icon {
    font-size: 18px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-title {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

/* Filtros */
.filters-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.filter-select,
.filter-input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
    transition: all 0.2s ease;
    background: white;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-filter {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Resultados de Reportes */
.report-results {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-height: 200px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table thead {
    background: #f8fafc;
}

.report-table th {
    text-align: left;
    padding: 15px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.report-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 14px;
}

.report-table tbody tr:hover {
    background: #f8fafc;
}

.empty-result {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 16px;
}

.empty-result::before {
    content: "📊";
    display: block;
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #3b82f6;
    font-size: 18px;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite;
}

.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #ef4444;
    font-size: 16px;
    background-color: #fee;
    border-radius: 8px;
    border: 1px solid #fcc;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.text-muted {
    color: #94a3b8;
    font-size: 13px;
}

/* Badges en reportes */
.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-info {
    background: #e0f2fe;
    color: #075985;
}

/* Responsive Pestañas */
@media (max-width: 768px) {
    .reports-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
    }
    
    .report-table {
        font-size: 13px;
    }
    
    .report-table th,
    .report-table td {
        padding: 10px;
    }
}

/* ===================================
   PWA - INSTALACIÓN
   =================================== */

/* Banner de instalación flotante */
.install-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    z-index: 9998;
    max-width: 600px;
    width: 90%;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    flex-wrap: wrap;
}

.install-banner-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.install-banner-text {
    flex: 1;
    min-width: 200px;
}

.install-banner-text strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.install-banner-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

.install-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.install-banner-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.install-banner-actions .btn-primary {
    background: white;
    color: #667eea;
}

.install-banner-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.install-banner-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.install-banner-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Botón en el sidebar */
.install-app-container {
    padding: 15px;
    margin: 15px 0;
}

.btn-install {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-install:active {
    transform: translateY(0);
}

/* PWA - Indicador de app instalada */
@media all and (display-mode: standalone) {
    .install-app-container,
    .install-banner {
        display: none !important;
    }
    
    body::before {
        content: "📱 Modo App";
        position: fixed;
        top: 0;
        right: 0;
        background: rgba(34, 197, 94, 0.9);
        color: white;
        padding: 4px 12px;
        font-size: 11px;
        border-bottom-left-radius: 8px;
        z-index: 9999;
    }
}

/* Responsive para el banner */
@media (max-width: 768px) {
    .install-banner {
        top: 10px;
        width: 95%;
    }
    
    .install-banner-content {
        padding: 15px;
        gap: 15px;
    }
    
    .install-banner-icon {
        font-size: 36px;
    }
    
    .install-banner-text strong {
        font-size: 16px;
    }
    
    .install-banner-text p {
        font-size: 13px;
    }
    
    .install-banner-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .install-banner-actions .btn {
        flex: 1;
    }
    
    .btn-help-install {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Mejoras adicionales para móvil */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .recent-services-section {
        padding: 20px;
    }
    
    .section-header h2 {
        font-size: 18px;
    }
    
    .info-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .info-item {
        width: 100%;
    }
    
    /* Mejorar legibilidad de tablas */
    .services-table th,
    .services-table td {
        min-width: 100px;
        white-space: nowrap;
    }
    
    /* Scrollbar más visible en móvil */
    .services-table-container::-webkit-scrollbar {
        height: 8px;
    }
    
    .services-table-container::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 4px;
    }
    
    .services-table-container::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }
    
    .services-table-container::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
    
    /* Ajustar historial items */
    .historial-item {
        padding: 12px;
    }
    
    .historial-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .historial-metrics {
        flex-direction: column;
        gap: 8px;
    }
    
    .metric {
        width: 100%;
    }
}

/* ===================================
   MODAL DE AYUDA INSTALACIÓN
   =================================== */
.install-instructions {
    padding: 10px 0;
}

.install-step {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.step-content h4 {
    margin: 0 0 10px 0;
    color: #1e293b;
    font-size: 16px;
}

.step-content p {
    margin: 0 0 10px 0;
    color: #64748b;
}

.step-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.step-content li {
    margin: 8px 0;
    color: #475569;
    line-height: 1.6;
}

.platform-instructions {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.platform-instructions strong {
    display: block;
    color: #1e293b;
    margin: 15px 0 8px 0;
    font-size: 15px;
}

.platform-instructions strong:first-child {
    margin-top: 0;
}

.install-benefits {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.install-benefits h4 {
    margin: 0 0 15px 0;
    color: #065f46;
    font-size: 16px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.benefit-item {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #047857;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .install-step {
        gap: 15px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   MEJORAS ADICIONALES PARA MÓVIL
   =================================== */

/* Mejor UX en inputs de formulario */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    select,
    textarea {
        font-size: 16px !important; /* Evita zoom en iOS */
    }
    
    /* Gastos: tipos de gasto en móvil */
    .expense-types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .expense-type-card {
        padding: 16px 12px;
    }
    
    .expense-type-icon {
        font-size: 36px;
    }
    
    .expense-type-title {
        font-size: 13px;
    }
    
    /* Stats de gastos */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    /* Historial de gastos */
    .description-cell {
        max-width: 200px;
        word-wrap: break-word;
    }
    
    /* Páginas de administrador */
    .page-header h1 {
        font-size: 22px;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 6px;
    }
    
    /* Badges más compactos */
    .badge {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    /* Botones de acción en tablas */
    .btn-icon {
        font-size: 16px;
        padding: 4px 8px;
    }
    
    /* Cards de reportes */
    .report-card {
        margin-bottom: 15px;
    }
    
    .report-header,
    .report-content {
        padding: 15px;
    }
    
    .metric-value {
        font-size: 36px;
    }
    
    .gasto-item,
    .vehiculo-item {
        padding: 12px;
    }
    
    .gasto-monto {
        font-size: 16px;
    }
    
    /* Modal responsive */
    .modal-content {
        max-width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .form-input,
    .form-textarea {
        font-size: 16px;
    }
    
    /* Espacio para el botón flotante */
    body {
        padding-bottom: 20px;
    }
}

@media (max-width: 480px) {
    /* Tipos de gasto: una columna en pantallas muy pequeñas */
    .expense-types-grid {
        grid-template-columns: 1fr;
    }
    
    .expense-type-card {
        padding: 18px;
    }
    
    /* Tabla de gastos más compacta */
    .data-table th,
    .data-table td {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    /* Historial más compacto */
    .historial-item {
        padding: 10px;
    }
    
    .historial-fecha,
    .historial-body p {
        font-size: 13px;
    }
    
    /* Stats más pequeños */
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* Reportes compactos */
    .metric-value {
        font-size: 28px;
    }
    
    .gasto-monto {
        font-size: 14px;
    }
    
    .vehiculo-cantidad {
        font-size: 20px;
    }
    
    /* Botones de acción */
    .btn-help-install {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Header de página */
    .page-header h1 {
        font-size: 20px;
    }
    
    .page-header .text-muted {
        font-size: 13px;
    }
}

/* ===================================
   ESTILOS PARA GESTIÓN DE TURNOS
   =================================== */

/* Contenedor principal de turnos */
.turno-container {
    margin-bottom: 25px;
}

/* Contenedor de turnos en el sidebar */
.turno-container-sidebar {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 15px 0;
}

/* Versión compacta para sidebar */
.turno-container-sidebar .turno-activo-card {
    background: rgba(102, 126, 234, 0.15);
    border-radius: 8px;
    padding: 12px;
    color: white;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.turno-container-sidebar .turno-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.turno-container-sidebar .turno-icon {
    font-size: 20px;
}

.turno-container-sidebar .turno-codigo {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
}

.turno-container-sidebar .turno-nombre {
    font-size: 12px;
    opacity: 0.9;
}

.turno-container-sidebar .turno-horario {
    font-size: 11px;
    opacity: 0.85;
    margin: 5px 0;
}

.turno-container-sidebar .btn-cambiar-turno {
    width: 100%;
    padding: 6px 12px;
    font-size: 12px;
    margin-top: 8px;
    background: rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.5);
}

.turno-container-sidebar .btn-cambiar-turno:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* Selector de turno compacto para sidebar */
.turno-container-sidebar .seleccionar-turno-card {
    background: rgba(255, 193, 7, 0.15);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.turno-container-sidebar .seleccionar-turno-header {
    margin-bottom: 10px;
}

.turno-container-sidebar .seleccionar-turno-header h3 {
    font-size: 14px;
    color: #ffc107;
    margin: 0;
}

.turno-container-sidebar .seleccionar-turno-header p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin: 5px 0 0;
}

.turno-container-sidebar .turnos-disponibles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.turno-container-sidebar .turno-opcion {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.turno-container-sidebar .turno-opcion:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.6);
}

.turno-container-sidebar .turno-opcion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.turno-container-sidebar .turno-codigo-badge {
    background: #667eea;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.turno-container-sidebar .turno-opcion-header h4 {
    font-size: 13px;
    color: white;
    margin: 0;
}

.turno-container-sidebar .turno-opcion-horario {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

.turno-container-sidebar .btn-seleccionar-turno {
    display: none; /* Ocultar en sidebar, el clic es en toda la tarjeta */
}

/* Alerta cuando no hay turno en sidebar */
.turno-container-sidebar .alerta-turno {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.turno-container-sidebar .alerta-icon {
    font-size: 20px;
}

.turno-container-sidebar .alerta-turno strong {
    display: block;
    color: #ffc107;
    margin-bottom: 3px;
    font-size: 13px;
}

.turno-container-sidebar .alerta-turno p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
}

/* Tarjeta de turno activo */
.turno-activo-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.turno-activo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.turno-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.turno-icon {
    font-size: 32px;
}

.turno-codigo {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
}

.turno-nombre {
    font-size: 14px;
    opacity: 0.9;
}

.btn-cambiar-turno {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-cambiar-turno:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.turno-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.turno-horario,
.turno-tiempo {
    font-size: 14px;
    opacity: 0.95;
}

.btn-finalizar-turno {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-finalizar-turno:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Selector de turno */
.seleccionar-turno-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px dashed #667eea;
}

.seleccionar-turno-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.seleccionar-turno-header .turno-icon {
    font-size: 40px;
}

.seleccionar-turno-header h3 {
    margin: 0;
    color: #333;
    font-size: 22px;
}

.seleccionar-turno-header p {
    margin: 5px 0 0;
    color: #666;
    font-size: 14px;
}

.turnos-disponibles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.turno-opcion {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.turno-opcion:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.turno-opcion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.turno-codigo-badge {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
}

.turno-opcion-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.turno-opcion-horario {
    color: #555;
    font-size: 14px;
    margin: 10px 0;
}

.turno-opcion-descripcion {
    color: #666;
    font-size: 13px;
    margin: 10px 0;
    line-height: 1.5;
}

.btn-seleccionar-turno {
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s;
}

.btn-seleccionar-turno:hover {
    background: #5568d3;
}

/* Alerta cuando no hay turno */
.alerta-turno {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alerta-icon {
    font-size: 32px;
}

.alerta-turno strong {
    display: block;
    color: #856404;
    margin-bottom: 5px;
    font-size: 16px;
}

.alerta-turno p {
    color: #856404;
    margin: 0;
    font-size: 14px;
}

/* Alerta de turno expirado */
.alerta-turno-expirado {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.alerta-turno-expirado strong {
    display: block;
    color: #721c24;
    margin-bottom: 5px;
    font-size: 16px;
}

.alerta-turno-expirado p {
    color: #721c24;
    margin: 0;
    font-size: 14px;
}

.btn-accion-alerta {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-accion-alerta:hover {
    background: #c82333;
}

/* Modal para cambiar turno */
.modal-turno {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-turno-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-turno-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-turno-header h3 {
    margin: 0;
    color: #333;
    font-size: 22px;
}

.btn-cerrar-modal {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: color 0.3s;
}

.btn-cerrar-modal:hover {
    color: #333;
}

.modal-turno-body {
    padding: 25px;
}

.modal-turno-body > p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.turno-opcion-modal {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    margin-bottom: 12px;
}

.turno-opcion-modal:hover {
    transform: translateX(5px);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive para turnos */
@media (max-width: 768px) {
    .turno-activo-header {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-cambiar-turno {
        width: 100%;
    }

    .turnos-disponibles {
        grid-template-columns: 1fr;
    }

    .modal-turno-content {
        width: 95%;
        max-height: 90vh;
    }
}