:root {
    --primary-red: #991f1f;
    --secondary-red: #b32a2a;
    --light-red: #d63384;
    --dark-red: #721c24;
    --white: #ffffff;
    --black: #000000;
    --gray-light: #f8f9fa;
    --gray-dark: #343a40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--gray-dark);
    overflow-x: hidden;
}

.font-oswald {
    font-family: 'Oswald', sans-serif;
}

/* Header */
.navbar {
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--white) !important;
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #ffd700 !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #ffd700;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
    left: 0;
}

.btn-system {
    background: linear-gradient(45deg, #ffd700, #ffed4e) !important;
    color: var(--primary-red) !important;
    border-radius: 25px !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    margin-left: 10px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.3) !important;
    display: inline-block !important;
    width: auto !important;
}

.btn-system:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4) !important;
    color: var(--primary-red) !important;
}

.btn-system::after {
    display: none !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(153, 31, 31, 0.8), rgba(179, 42, 42, 0.8)), 
                url('https://images.unsplash.com/photo-1581094794329-c8112a89af12?ixlib=rb-4.0.3&auto=format&fit=crop&w=1926&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    position: relative;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary-red), var(--secondary-red));
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn-hero {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: var(--primary-red);
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    color: var(--primary-red);
}

.btn-hero-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-hero-secondary:hover {
    background: var(--white);
    color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--gray-light);
}

.service-card {
    background: var(--white);
    border-radius: 20px;
    padding: 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 3px solid transparent;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: var(--primary-red);
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

.service-content {
    padding: 30px;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-red), var(--secondary-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 1.5rem;
}

.service-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.service-card p {
    color: var(--gray-dark);
    margin-bottom: 30px;
}

.btn-service {
    background: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-service:hover {
    background: var(--secondary-red);
    color: var(--white);
    transform: translateY(-2px);
}

/* System Access Section */
.system-access {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--gray-light), var(--white));
}

.system-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.system-features li {
    padding: 10px 0;
    font-size: 1.1rem;
    color: var(--gray-dark);
}

.btn-system-large {
    background: linear-gradient(45deg, var(--primary-red), var(--secondary-red));
    color: var(--white);
    border: none;
    padding: 15px 35px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(153, 31, 31, 0.3);
}

.btn-system-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(153, 31, 31, 0.4);
    color: var(--white);
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--white);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 30px;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--gray-dark);
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.logo-section {
    text-align: center;
}

.about-logo {
    max-height: 200px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: var(--white);
}

.contact h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
}

.contact-form {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.contact-form .form-control,
.contact-form .form-select {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 12px 15px;
    color: var(--gray-dark);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    background: var(--white);
    border-color: #ffd700;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

.btn-contact {
    background: #25d366;
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-contact:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.contact-info {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.social-link {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: #ffd700;
    color: var(--primary-red);
    transform: translateY(-3px);
}

/* Payment Methods */
.payment-methods {
    background: var(--gray-light);
    padding: 60px 0;
}

.payment-methods h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--primary-red);
    text-align: center;
    margin-bottom: 30px;
}

.payment-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(153, 31, 31, 0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.payment-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(153, 31, 31, 0.2);
    border-color: var(--primary-red);
}

.payment-header {
    text-align: center;
    margin-bottom: 20px;
}

.payment-header h4 {
    color: var(--primary-red);
    margin-top: 15px;
    font-weight: 600;
}

.payment-description {
    color: var(--gray-dark);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.payment-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.payment-benefits li {
    color: var(--gray-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.payment-benefits i {
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer h5 {
    font-family: 'Oswald', sans-serif;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.footer a {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #ffd700;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    color: var(--white);
}

/* Main Wrapper */
.main-wrapper {
    max-width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
}

/* Responsive */
@media (max-width: 1200px) {
    .hero {
        padding-top: 90px;
        min-height: 120vh;
    }
}

@media (max-width: 992px) {
    .hero {
        padding-top: 100px;
        min-height: 130vh;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.4rem;
        position: fixed;
        left: 50%;
        top: 10px;
        transform: translateX(-50%);
        z-index: 1051;
    }
    
    .hero {
        min-height: 70vh;
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero .text-center {
        margin-top: 3rem;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .service-card {
        margin-bottom: 30px;
    }
    
    .contact-info {
        margin-top: 30px;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-red);
}

/* Waze Map Container */
.map-container {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    margin-top: 30px;
}

.map-container h4 {
    color: var(--white);
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.waze-iframe-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.waze-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
}

/* Google Maps fallback styling */
.google-maps-fallback {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.google-maps-fallback iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 15px;
    min-width: 100%;
    min-height: 400px;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .waze-iframe-container {
        height: 300px;
    }
    
    .google-maps-fallback {
        height: 300px;
    }
    
    .google-maps-fallback iframe {
        min-height: 300px;
    }
    
    .map-container {
        padding: 20px;
    }
    
    .map-container h4 {
        font-size: 1.3rem;
    }
}

/* Estilos para botones de WhatsApp en lista de citas */
.cita-acciones {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Forzar estilos de botones de WhatsApp */
.cita-acciones .btn-cita.whatsapp-cita,
.cita-acciones .btn-cita.whatsapp-repuestos {
    background-color: #28a745 !important;
    color: white !important;
    border: 1px solid #28a745 !important;
    background: #28a745 !important;
}

.cita-acciones .btn-cita.whatsapp-cita:hover,
.cita-acciones .btn-cita.whatsapp-repuestos:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: white !important;
    background: #218838 !important;
}

/* Estilos más específicos para forzar colores */
.cita-acciones button.btn-cita.whatsapp-cita,
.cita-acciones button.btn-cita.whatsapp-repuestos {
    background-color: #28a745 !important;
    color: white !important;
    border: 1px solid #28a745 !important;
    background: #28a745 !important;
}

.cita-acciones button.btn-cita.whatsapp-cita:hover,
.cita-acciones button.btn-cita.whatsapp-repuestos:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: white !important;
    background: #218838 !important;
}

/* Estilos inline para forzar colores */
.cita-acciones .btn-cita.whatsapp-cita *,
.cita-acciones .btn-cita.whatsapp-repuestos * {
    color: white !important;
}

.btn-cita {
    padding: 4px 8px;
    font-size: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.btn-cita.whatsapp-cita {
    background-color: #28a745 !important;
    color: white !important;
    border: 1px solid #28a745 !important;
    background: #28a745 !important;
}

.btn-cita.whatsapp-cita:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: white !important;
    background: #218838 !important;
}

.btn-cita.whatsapp-repuestos {
    background-color: #28a745 !important;
    color: white !important;
    border: 1px solid #28a745 !important;
    background: #28a745 !important;
}

.btn-cita.whatsapp-repuestos:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: white !important;
    background: #218838 !important;
}

.btn-cita.eliminar {
    background-color: #dc3545;
    color: white;
}

.btn-cita.eliminar:hover {
    background-color: #c82333;
    color: white;
}

/* Responsive para botones de citas */
@media (max-width: 768px) {
    .cita-acciones {
        flex-direction: column;
        gap: 3px;
    }
    
    .btn-cita {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

/* =============================================
   ESTILOS MODERNOS PARA BOTONES DE PERÍODO
   ============================================= */

.periodo-group {
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
}

.periodo-btn {
    display: flex !important;
    align-items: center !important;
    padding: 18px 24px !important;
    border-radius: 20px !important;
    border: 3px solid transparent !important;
    background: linear-gradient(135deg, #991f1f 0%, #b32a2a 100%) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 6px 20px rgba(153, 31, 31, 0.3) !important;
    min-width: 160px !important;
    height: auto !important;
    text-align: left !important;
    position: relative !important;
    overflow: hidden !important;
    color: white !important;
    margin: 5px !important;
}

.periodo-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.periodo-btn:hover::before {
    left: 100%;
}

.periodo-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 30px rgba(153, 31, 31, 0.4) !important;
    background: linear-gradient(135deg, #d63384 0%, #dc3545 100%) !important;
}

.periodo-btn.active {
    background: linear-gradient(135deg, #dc3545 0%, #b32a2a 100%) !important;
    border-color: #dc3545 !important;
    color: white !important;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4) !important;
    transform: translateY(-2px) scale(1.05) !important;
}

.periodo-btn.active:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.5) !important;
    transform: translateY(-3px) scale(1.08) !important;
}

.periodo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    margin-right: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.periodo-btn.active .periodo-icon {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.periodo-icon i {
    font-size: 20px;
    color: white;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.periodo-btn:hover .periodo-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.periodo-btn.active:hover .periodo-icon {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.2) rotate(-5deg);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.5);
}

.periodo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.periodo-title {
    font-size: 15px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 3px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.periodo-btn.active .periodo-title {
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.periodo-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.periodo-btn.active .periodo-subtitle {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.periodo-btn:hover .periodo-title {
    color: white;
    text-shadow: 0 3px 6px rgba(0,0,0,0.4);
}

.periodo-btn:hover .periodo-subtitle {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .periodo-btn {
        min-width: 120px !important;
        padding: 12px 16px !important;
    }
    
    .periodo-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    
    .periodo-icon i {
        font-size: 16px;
    }
    
    .periodo-title {
        font-size: 13px;
    }
    
    .periodo-subtitle {
        font-size: 10px;
    }
}

/* Animación de carga */
.periodo-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.periodo-btn.loading .periodo-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Colores específicos para cada período - FORZADOS */
#btnDia.periodo-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3) !important;
    border: 3px solid rgba(102, 126, 234, 0.3) !important;
}

#btnDia.periodo-btn:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    box-shadow: 0 12px 30px rgba(240, 147, 251, 0.4) !important;
    border: 3px solid rgba(240, 147, 251, 0.4) !important;
}

#btnDia.periodo-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4) !important;
    border: 3px solid rgba(255, 107, 107, 0.4) !important;
}

#btnSemana.periodo-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.3) !important;
    border: 3px solid rgba(79, 172, 254, 0.3) !important;
}

#btnSemana.periodo-btn:hover {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
    box-shadow: 0 12px 30px rgba(67, 233, 123, 0.4) !important;
    border: 3px solid rgba(67, 233, 123, 0.4) !important;
}

#btnSemana.periodo-btn.active {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
    box-shadow: 0 8px 25px rgba(250, 112, 154, 0.4) !important;
    border: 3px solid rgba(250, 112, 154, 0.4) !important;
}

#btnMes.periodo-btn {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
    box-shadow: 0 6px 20px rgba(168, 237, 234, 0.3) !important;
    border: 3px solid rgba(168, 237, 234, 0.3) !important;
}

#btnMes.periodo-btn:hover {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
    box-shadow: 0 12px 30px rgba(255, 154, 158, 0.4) !important;
    border: 3px solid rgba(255, 154, 158, 0.4) !important;
}

#btnMes.periodo-btn.active {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) !important;
    box-shadow: 0 8px 25px rgba(255, 236, 210, 0.4) !important;
    border: 3px solid rgba(255, 236, 210, 0.4) !important;
}

#btnAno.periodo-btn {
    background: linear-gradient(135deg, #ff9a8b 0%, #a8e6cf 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 154, 139, 0.3) !important;
    border: 3px solid rgba(255, 154, 139, 0.3) !important;
}

#btnAno.periodo-btn:hover {
    background: linear-gradient(135deg, #ff8a80 0%, #ffb74d 100%) !important;
    box-shadow: 0 12px 30px rgba(255, 138, 128, 0.4) !important;
    border: 3px solid rgba(255, 138, 128, 0.4) !important;
}

#btnAno.periodo-btn.active {
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%) !important;
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4) !important;
    border: 3px solid rgba(255, 107, 157, 0.4) !important;
}

/* Estilos para paginación de GridView ASP.NET - Selectores más específicos */
tr.pagination,
tr[class*="pagination"],
table tr[class*="pagination"] {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    margin-top: 25px !important;
}

tr.pagination td,
tr[class*="pagination"] td,
table tr[class*="pagination"] td {
    padding: 20px !important;
    text-align: center !important;
    background: transparent !important;
}

tr.pagination table,
tr[class*="pagination"] table,
table tr[class*="pagination"] table {
    margin: 0 auto !important;
    border-collapse: separate !important;
    border-spacing: 8px !important;
    background: transparent !important;
}

tr.pagination td table td,
tr[class*="pagination"] td table td,
table tr[class*="pagination"] td table td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Estilos para enlaces de paginación - Selectores más agresivos */
tr.pagination a,
tr[class*="pagination"] a,
table tr[class*="pagination"] a,
td a[href*="Page$"],
td a[href*="__doPostBack"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 45px !important;
    height: 45px !important;
    padding: 0 16px !important;
    margin: 0 4px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    color: #6c757d !important;
    text-decoration: none !important;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    position: relative !important;
    overflow: hidden !important;
    backdrop-filter: blur(10px) !important;
}

tr.pagination a::before,
tr[class*="pagination"] a::before,
table tr[class*="pagination"] a::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent) !important;
    transition: left 0.6s ease !important;
}

tr.pagination a:hover,
tr[class*="pagination"] a:hover,
table tr[class*="pagination"] a:hover,
td a[href*="Page$"]:hover,
td a[href*="__doPostBack"]:hover {
    background: linear-gradient(135deg, #991f1f 0%, #b32a2a 100%) !important;
    color: white !important;
    text-decoration: none !important;
    border-color: #991f1f !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 12px 28px rgba(153, 31, 31, 0.4) !important;
}

tr.pagination a:hover::before,
tr[class*="pagination"] a:hover::before,
table tr[class*="pagination"] a:hover::before {
    left: 100% !important;
}

/* Estilos para página activa - Selectores más agresivos */
tr.pagination span,
tr[class*="pagination"] span,
table tr[class*="pagination"] span,
td span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 45px !important;
    height: 45px !important;
    padding: 0 16px !important;
    margin: 0 4px !important;
    background: linear-gradient(135deg, #991f1f 0%, #b32a2a 100%) !important;
    color: white !important;
    border: 2px solid #991f1f !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    transform: translateY(-2px) scale(1.1) !important;
    box-shadow: 0 8px 24px rgba(153, 31, 31, 0.5) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Estilos para botones de navegación - Selectores más específicos */
tr.pagination a[href*="Page$1"],
tr[class*="pagination"] a[href*="Page$1"],
table tr[class*="pagination"] a[href*="Page$1"],
tr.pagination a[title*="Primera"], 
tr[class*="pagination"] a[title*="Primera"],
tr.pagination a[title*="Anterior"],
tr[class*="pagination"] a[title*="Anterior"],
tr.pagination a[title*="Siguiente"], 
tr[class*="pagination"] a[title*="Siguiente"],
tr.pagination a[title*="Última"],
tr[class*="pagination"] a[title*="Última"] {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    color: white !important;
    border-color: #6c757d !important;
    font-weight: 700 !important;
}

tr.pagination a[href*="Page$1"]:hover,
tr[class*="pagination"] a[href*="Page$1"]:hover,
table tr[class*="pagination"] a[href*="Page$1"]:hover,
tr.pagination a[title*="Primera"]:hover, 
tr[class*="pagination"] a[title*="Primera"]:hover,
tr.pagination a[title*="Anterior"]:hover,
tr[class*="pagination"] a[title*="Anterior"]:hover,
tr.pagination a[title*="Siguiente"]:hover, 
tr[class*="pagination"] a[title*="Siguiente"]:hover,
tr.pagination a[title*="Última"]:hover,
tr[class*="pagination"] a[title*="Última"]:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%) !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 12px 28px rgba(73, 80, 87, 0.4) !important;
}

/* Estilos para dropdown de tamaño de página */
.form-select-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Estilos adicionales para forzar la aplicación */
#MainContent_gvRepuestos tr.pagination,
#MainContent_gvRepuestos tr[class*="pagination"],
#MainContent_gvRepuestos table tr[class*="pagination"] {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    margin-top: 25px !important;
}

#MainContent_gvRepuestos tr.pagination a,
#MainContent_gvRepuestos tr[class*="pagination"] a,
#MainContent_gvRepuestos table tr[class*="pagination"] a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 45px !important;
    height: 45px !important;
    padding: 0 16px !important;
    margin: 0 4px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    color: #6c757d !important;
    text-decoration: none !important;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    position: relative !important;
    overflow: hidden !important;
}

#MainContent_gvRepuestos tr.pagination a:hover,
#MainContent_gvRepuestos tr[class*="pagination"] a:hover,
#MainContent_gvRepuestos table tr[class*="pagination"] a:hover {
    background: linear-gradient(135deg, #991f1f 0%, #b32a2a 100%) !important;
    color: white !important;
    text-decoration: none !important;
    border-color: #991f1f !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 12px 28px rgba(153, 31, 31, 0.4) !important;
}

#MainContent_gvRepuestos tr.pagination span,
#MainContent_gvRepuestos tr[class*="pagination"] span,
#MainContent_gvRepuestos table tr[class*="pagination"] span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 45px !important;
    height: 45px !important;
    padding: 0 16px !important;
    margin: 0 4px !important;
    background: linear-gradient(135deg, #991f1f 0%, #b32a2a 100%) !important;
    color: white !important;
    border: 2px solid #991f1f !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    transform: translateY(-2px) scale(1.1) !important;
    box-shadow: 0 8px 24px rgba(153, 31, 31, 0.5) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Responsive para paginación ASP.NET */
@media (max-width: 768px) {
    tr.pagination td,
    tr[class*="pagination"] td,
    #MainContent_gvRepuestos tr.pagination td {
        padding: 15px !important;
    }
    
    tr.pagination table,
    tr[class*="pagination"] table,
    #MainContent_gvRepuestos tr.pagination table {
        border-spacing: 6px !important;
    }
    
    tr.pagination a,
    tr.pagination span,
    tr[class*="pagination"] a,
    tr[class*="pagination"] span,
    #MainContent_gvRepuestos tr.pagination a,
    #MainContent_gvRepuestos tr.pagination span {
        min-width: 40px !important;
        height: 40px !important;
        padding: 0 12px !important;
        font-size: 14px !important;
        margin: 0 3px !important;
    }
}

@media (max-width: 480px) {
    tr.pagination td,
    tr[class*="pagination"] td,
    #MainContent_gvRepuestos tr.pagination td {
        padding: 12px !important;
    }
    
    tr.pagination table,
    tr[class*="pagination"] table,
    #MainContent_gvRepuestos tr.pagination table {
        border-spacing: 4px !important;
    }
    
    tr.pagination a,
    tr.pagination span,
    tr[class*="pagination"] a,
    tr[class*="pagination"] span,
    #MainContent_gvRepuestos tr.pagination a,
    #MainContent_gvRepuestos tr.pagination span {
        min-width: 35px !important;
        height: 35px !important;
        padding: 0 10px !important;
        font-size: 13px !important;
        margin: 0 2px !important;
    }
}

/* Estilos para badges de estado de citas */
.badge {
    font-size: 0.75em;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.bg-success {
    background-color: #28a745 !important;
    color: white !important;
}

.bg-primary {
    background-color: #007bff !important;
    color: white !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

/* Loading Modal para Dashboard */
.loading-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease-in-out;
}

.loading-dialog {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    border: 1px solid #e9ecef;
    max-width: 450px;
    width: 90%;
    animation: modalSlideIn 0.4s ease-out;
    transform: translateY(0);
    position: relative;
    margin: 0 auto;
    flex-shrink: 0;
}

.loading-content {
    padding: 0;
}

.loading-header {
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: 1px solid #f8f9fa;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 16px 16px 0 0;
}

.loading-title-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.loading-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.loading-title-text {
    flex: 1;
}

.loading-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
}

.loading-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.loading-body {
    padding: 1.5rem;
    text-align: center;
}

.loading-spinner-container {
    margin-bottom: 1rem;
}

.loading-spinner-container .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.25em;
    color: #007bff;
}

.loading-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.loading-progress-container {
    margin-top: 1rem;
}

.loading-progress-container .progress {
    height: 8px;
    border-radius: 4px;
    background-color: #f8f9fa;
    overflow: hidden;
}

.loading-progress-container .progress-bar {
    border-radius: 4px;
    transition: width 0.3s ease;
}

.loading-progress-container small {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Asegurar centrado del modal */
.loading-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Estilos para gráficos con altura igual */
.chart-pie,
.chart-area {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-pie canvas,
.chart-area canvas {
    max-height: 100%;
    max-width: 100%;
}

/* Asegurar que las tarjetas de gráficos tengan la misma altura */
.card.h-100 {
    display: flex;
    flex-direction: column;
}

.card.h-100 .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Optimización para KPIs en una fila */
.col-xl {
    flex: 1;
    min-width: 0;
}

/* Ajustar texto en KPIs para pantallas grandes */
@media (min-width: 1200px) {
    .col-xl .text-xs {
        font-size: 0.7rem;
        line-height: 1.2;
    }
    
    .col-xl .h5 {
        font-size: 1.1rem;
    }
    
    .col-xl .fa-2x {
        font-size: 1.5rem !important;
    }
}

/* Ajustar para pantallas extra grandes */
@media (min-width: 1400px) {
    .col-xl .text-xs {
        font-size: 0.75rem;
    }
    
    .col-xl .h5 {
        font-size: 1.25rem;
    }
}

/* Responsive */
@media (max-width: 576px) {
    .loading-dialog {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .loading-header,
    .loading-body {
        padding: 1rem;
    }
    
    .loading-title {
        font-size: 1rem;
    }
    
    .chart-pie,
    .chart-area {
        height: 250px;
    }
}