/* --- 1. SISTEMA DE DISE?O OSCURO (Apple Style) - MODIFICADO A CL?NICA --- */
:root {
    /* Fondos Oscuros de Alto Contraste (Base: Negro/Gris Hospitalario) */
    --bg-body: #000000;         /* Negro puro Apple */
    --bg-card: #1C1C1E;         /* Gris oscuro iOS */
    --bg-input: #2C2C2E;        /* Gris input iOS */
    --bg-elevated: #2C2C2E;     /* Elevado para modals */
    
    /* Colores Principales - Refinados estilo Apple */
    --primary: #0A84FF;         /* Azul iOS */
    --primary-dark: #64D2FF;    /* Azul claro iOS */
    --accent-green: #30D158;    /* Verde ?xito iOS */
    --accent-orange: #FF9F0A;   /* Naranja advertencia iOS */
    --accent-red: #FF453A;      /* Rojo error iOS */
    
    /* Textos - Jerarqu?a Apple */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(235, 235, 245, 0.6);
    --text-tertiary: rgba(235, 235, 245, 0.3);
    --text-muted: #8E8E93;
    
    /* Efectos Glass (iOS style) */
    --glass-bg: rgba(28, 28, 30, 0.72);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Radios y Sombras (Apple style - m?s suaves) */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 999px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.8);
    
    /* Tipograf?a Apple */
    --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    
    /* Spacing System (8px base) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Transiciones suaves Apple */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* COLORES DE IMPRESI?N */
    --print-primary-blue: #0A84FF;
    --print-accent-green: #30D158;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media screen and (-webkit-min-device-pixel-ratio:0) { 
    select, textarea, input { font-size: 16px !important; }
}

body { 
    background-color: var(--bg-body); 
    color: var(--text-primary); 
    font-family: var(--font-system); 
    line-height: 1.5; 
    overflow-x: hidden; 
    padding-bottom: 80px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

h1, h2, h3, h4, h5 { 
    font-family: var(--font-heading); 
    color: var(--text-primary); 
    font-weight: 600; 
    letter-spacing: -0.5px;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 500; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
.hidden { display: none !important; }
.full-width { width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- ANIMACIONES SCROLL --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- HEADER GLASSMORPHISM --- */
#landing-header-container { position: fixed; top: 20px; width: 100%; z-index: 100; display: flex; justify-content: center; pointer-events: none; }
.header-pill { 
    background: var(--glass-bg); 
    backdrop-filter: blur(30px) saturate(180%); 
    -webkit-backdrop-filter: blur(30px) saturate(180%); 
    padding: 15px 30px; 
    border-radius: var(--radius-pill); 
    box-shadow: 0 4px 20px rgba(0,0,0,0.6); 
    width: 90%; 
    max-width: 1200px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    pointer-events: auto; 
    border: 1px solid var(--glass-border);
}
.logo { color: var(--text-main); font-size: 1.5rem; }

/* --- HERO PARALLAX --- */
.hero-parallax {
    position: relative;
    height: 100vh;
    min-height: 650px;
    background-image: url('https://images.unsplash.com/photo-1631217868264-e5b90bb7e133?q=80&w=2091&auto=format&fit=crop');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    flex-direction: column;
}
.overlay-dark {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.95) 100%);
    z-index: 1;
}
.hero-content {
    position: relative; z-index: 2; max-width: 800px; color: white;
    padding-top: 50px;
}
.badge-glass {
    background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
    padding: 8px 20px; border-radius: 30px; display: inline-block;
    font-size: 0.85rem; letter-spacing: 1px; margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.3); color: #fff;
    font-weight: 500;
}
.hero-title {
    font-size: 3.5rem; 
    color: white; margin-bottom: 20px; text-shadow: 0 4px 15px rgba(0,0,0,0.7);
    line-height: 1.2;
}
.hero-text {
    font-size: 1.2rem; margin-bottom: 40px; color: rgba(255,255,255,0.9); font-weight: 400;
}
.hero-actions {
    display: flex; justify-content: center; gap: 20px;
}
.pulse-btn { 
    animation: pulse-shadow 2s infinite; 
    box-shadow: 0 8px 20px rgba(10, 90, 102, 0.3);
}
@keyframes pulse-shadow {
    0% { box-shadow: 0 0 0 0 rgba(10, 90, 102, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(10, 90, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(10, 90, 102, 0); }
}
.btn-outline-light {
    border: 2px solid rgba(255,255,255,0.7); color: white; background: transparent; padding: 14px 40px; border-radius: var(--radius-pill); font-weight: 600; cursor: pointer; transition: 0.3s;
}
.btn-outline-light:hover { background: white; color: black; border-color: white; }

/* --- STATS GLASS --- */
.stats-glass {
    position: absolute; bottom: 50px; z-index: 2;
    background: rgba(20, 24, 30, 0.8); backdrop-filter: blur(25px);
    padding: 20px 50px; border-radius: 20px; display: flex; gap: 40px; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.6); width: 90%; max-width: 900px; justify-content: space-around;
    border: 1px solid var(--glass-border);
}
.stat-item { display: flex; align-items: center; gap: 15px; text-align: left; }
.stat-item i { font-size: 2.2rem; color: var(--primary); }
.stat-item strong { font-size: 1.6rem; display: block; line-height: 1.1; color: white; }
.stat-item span { font-size: 0.85rem; text-transform: uppercase; color: var(--text-muted); }
.stat-divider { width: 1px; height: 50px; background: rgba(255,255,255,0.15); }

/* --- CARRUSEL SERVICIOS --- */
.section-dark { padding: 120px 0; background: var(--bg-body); overflow: hidden; }
.section-heading { text-align: center; margin-bottom: 60px; padding: 0 20px; }
.section-heading h3 { font-size: 3.2rem; margin-bottom: 10px; color: white; }
.section-heading p { color: var(--text-muted); font-size: 1.1rem; }

.slider-container { width: 100%; overflow: hidden; position: relative; }
.slider-container::before, .slider-container::after {
    content: ""; position: absolute; top: 0; width: 100px; height: 100%; z-index: 2;
    pointer-events: none;
}
.slider-container::before { left: 0; background: linear-gradient(to right, var(--bg-body) 30%, transparent 100%); }
.slider-container::after { right: 0; background: linear-gradient(to left, var(--bg-body) 30%, transparent 100%); }

.slider-track {
    display: flex; gap: 30px; 
    width: calc(280px * 14 + 30px * 14); 
    animation: scroll 40s linear infinite; padding: 20px 0;
}
.slide-card {
    width: 280px; height: 320px; background: var(--bg-card);
    border-radius: 25px; padding: 30px; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: 0.4s ease; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.05);
}
.slide-card:hover { transform: translateY(-8px) scale(1.01); box-shadow: 0 20px 40px rgba(10, 90, 102, 0.2); border-color: var(--primary); }
.icon-circle {
    width: 70px; height: 70px; background: rgba(10, 90, 102, 0.1); 
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--primary); margin-bottom: 20px;
    border: 2px solid var(--primary);
}
.slide-card h4 { font-size: 1.4rem; margin-bottom: 10px; color: white; }
.slide-card p { color: var(--text-muted); font-size: 0.95rem; }

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-280px * 7 - 30px * 7)); }
}

/* --- CONTACTO & MAPA --- */
.contact-section { padding: 100px 0; background: #0A0A0A; }
.contact-container {
    max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr;
    gap: 0; 
    background: var(--bg-card); border-radius: 30px; overflow: hidden;
    box-shadow: var(--shadow-float); border: 1px solid rgba(255,255,255,0.05);
}
.contact-info-card { 
    padding: 50px; 
    display: flex; flex-direction: column; justify-content: center;
}
.contact-info-card h2 { color: white; font-size: 2.5rem; font-family: 'Playfair Display', serif; }
.contact-sub { color: var(--text-muted); margin-bottom: 30px; }

.contact-list { margin-top: 20px; display: flex; flex-direction: column; gap: 15px; }
.contact-item {
    display: flex; align-items: center; gap: 20px; padding: 15px; border-radius: 15px;
    background: rgba(255,255,255,0.03); transition: 0.3s; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    border-left: 5px solid transparent; 
    transition: all 0.3s ease;
}
.contact-item:last-child { border-bottom: none; }
.contact-item:hover { 
    background: rgba(255,255,255,0.1); 
    transform: translateX(0); 
    border-left-color: var(--primary);
}
.icon-box {
    width: 45px; height: 45px; background: var(--primary); color: white; 
    border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
    flex-shrink: 0;
}
.contact-item .label { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.contact-item .value { font-weight: 600; color: white; font-size: 1rem; word-break: break-all; }

.map-container { min-height: 500px; position: relative; }
.map-frame { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    filter: grayscale(80%) invert(0%);
}

/* --- BOTONES ESTILO APPLE --- */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-system);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-base);
    font-size: 15px;
    white-space: nowrap;
    letter-spacing: -0.2px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.96);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(10, 132, 255, 0.3);
}

.btn-primary:hover {
    background: #0077ED;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-outline:active {
    background: rgba(255, 255, 255, 0.08);
}

/* --- RESPONSIVENESS LANDING --- */
@media (max-width: 1200px) {
    .stats-glass { max-width: 800px; padding: 20px 30px; }
}

@media (max-width: 900px) { 
    .hero-parallax { height: auto; min-height: 80vh; padding-bottom: 30px; }
    .hero-content { padding-top: 100px; padding-bottom: 30px; text-align: center; }
    .hero-title { font-size: 3rem; }
    .hero-text { font-size: 1.1rem; }
    .hero-actions { flex-direction: column; width: 80%; max-width: 350px; margin: 0 auto; gap: 15px; }
    .btn, .btn-outline-light { width: 100%; }
    
    .stats-glass { 
        position: relative; bottom: 0; width: 90%; max-width: 600px; 
        flex-direction: column; margin: 40px auto 0; gap: 20px; 
        align-items: flex-start; padding: 25px; border-radius: 20px; 
        background: rgba(20, 24, 30, 0.9); border: 1px solid var(--glass-border);
    }
    .stat-divider { display: none; }
    .stat-item strong { font-size: 1.4rem; }
    
    .section-dark { padding: 80px 0; }
    .section-heading h3 { font-size: 2.5rem; }
    
    .contact-container { grid-template-columns: 1fr; border-radius: 20px; overflow: visible; }
    .contact-info-card { padding: 40px; }
    .map-container { min-height: 300px; height: 300px; }

    .slider-track { animation: scroll 25s linear infinite; }
}

@media (max-width: 600px) {
    .contact-info-card { padding: 30px; }
    .contact-info-card h2 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .header-pill { padding: 12px 20px; }
    .logo { font-size: 1.3rem; }
    .hero-title { font-size: 2.2rem; }
    .hero-text { font-size: 1rem; }
    .hero-actions { width: 100%; }
}

/* --- INPUTS MODERNOS ESTILO APPLE --- */
.modern-input { 
    width: 100%; 
    padding: 12px 16px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: var(--radius-sm); 
    font-family: var(--font-system); 
    font-size: 16px; 
    transition: var(--transition-base); 
    -webkit-appearance: none; 
    background: var(--bg-input); 
    color: var(--text-primary);
}

.modern-input:focus { 
    outline: none; 
    border-color: var(--primary); 
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.15); 
    background: #3A3A3C;
}

.modern-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

/* Eliminar flechas de number inputs */
.modern-input[type="number"]::-webkit-inner-spin-button,
.modern-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modern-input[type="number"] {
    -moz-appearance: textfield;
}

/* Select styling mejorado */
.modern-input select,
select.modern-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238E8E93' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-group { margin-bottom: var(--space-lg); }
.form-group label { 
    display: block; 
    margin-bottom: var(--space-sm); 
    font-weight: 500; 
    color: var(--text-secondary); 
    font-size: 14px;
    letter-spacing: -0.2px;
}

/* --- NUEVA FEATURE: SUFIJOS DE UNIDAD AUTOM?TICOS --- */
.unit-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.unit-input {
    padding-right: 50px !important;
}
.unit-suffix {
    position: absolute;
    right: 15px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    pointer-events: none;
    user-select: none;
}

/* Sufijo para papel digital */
.unit-suffix-paper {
    position: absolute;
    right: 10px;
    color: #999;
    font-weight: 600;
    font-size: 0.85rem;
    pointer-events: none;
    user-select: none;
}

/* --- MENU LATERAL --- */
#hamburger-btn { background: none; border: none; width: 30px; height: 20px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; padding: 0; }
#hamburger-btn span { width: 100%; height: 2.5px; background: white; border-radius: 3px; transition: 0.3s; }

#side-menu { 
    position: fixed; top: 0; right: 0; width: 300px; max-width: 90vw; height: 100%; 
    background: rgba(14, 17, 22, 0.98); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); 
    z-index: 1500; padding: 30px 0; transition: transform 0.4s ease-out; 
    box-shadow: -10px 0 40px rgba(0,0,0,0.7);
}
#side-menu.hidden { transform: translateX(100%); display: block !important; }
.side-menu-header { padding: 0 30px; margin-bottom: 30px; display: flex; justify-content: space-between; align-items: center; }
.side-menu-header h2 { color: white; font-size: 1.8rem; }

#side-menu-close-btn { background: rgba(255,255,255,0.05); border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
#side-menu-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--primary); transform: rotate(90deg); }

.side-menu-link { display: flex; align-items: center; gap: 15px; padding: 18px 30px; font-size: 1.05rem; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-main); transition: 0.3s; }
.side-menu-link:hover { background: rgba(255,255,255,0.08); color: var(--primary); padding-left: 40px; }
.side-menu-link i { font-size: 1.2rem; width: 20px; }

/* --- FOOTER --- */
#main-footer { background-color: #000000; color: #F5F5F5; padding: 80px 20px 0; border-top: 1px solid rgba(255,255,255,0.1); }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 50px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-col h4 { color: white; margin-bottom: 20px; font-size: 1.2rem; }
.footer-col ul li { margin-bottom: 12px; display: flex; gap: 10px; opacity: 0.8; font-size: 0.95rem; }
.footer-col i { color: var(--primary); }
.footer-bottom { text-align: center; padding: 30px 0; opacity: 0.7; font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary); }

@media (max-width: 768px) {
    .footer-content { grid-template-columns: 1fr; gap: 30px; padding-bottom: 30px; }
    .footer-col:first-child { order: 2; }
    .footer-col:last-child { order: 1; }
    #main-footer { padding: 50px 20px 0; }
}

/* --- APP HEADER (DESKTOP) --- */
#app-header-container { position: sticky; top: 15px; z-index: 100; display: flex; justify-content: center; margin-bottom: 30px; padding: 0 10px; }
.app-pill { 
    width: 100%; max-width: 1200px; pointer-events: auto; 
    background: var(--glass-bg); 
    border: 1px solid var(--glass-border); 
    padding: 10px 20px; border-radius: var(--radius-pill); 
    box-shadow: 0 5px 20px rgba(0,0,0,0.5); 
    display: flex; justify-content: space-between; align-items: center; 
    backdrop-filter: blur(20px);
}
.app-nav { display: flex; gap: 8px; background: #222224; padding: 4px; border-radius: var(--radius-pill); overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.app-nav::-webkit-scrollbar { display: none; }
.app-nav button { background: none; border: none; padding: 10px 20px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-radius: var(--radius-pill); transition: 0.3s; white-space: nowrap; font-size: 0.9rem; }
.app-nav button.active { background: var(--bg-card); color: white; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.app-main { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; }

/* --- NAVEGACI?N M?VIL INFERIOR (APPLE STYLE) --- */
#mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0 max(env(safe-area-inset-bottom), 20px);
    z-index: 5000;
    justify-content: space-around;
    align-items: flex-end;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

.mobile-nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    gap: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
    width: 20%;
    padding: 8px 0;
    letter-spacing: -0.1px;
    font-weight: 500;
}

.mobile-nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
    transition: var(--transition-fast);
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

.mobile-fab {
    background: linear-gradient(135deg, var(--primary) 0%, #0066CC 100%);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 4px solid var(--bg-body);
    box-shadow: 0 4px 20px rgba(10, 132, 255, 0.4);
    transform: translateY(-20px);
    cursor: pointer;
    transition: var(--transition-base);
}

.mobile-fab:hover {
    transform: translateY(-22px) scale(1.05);
    box-shadow: 0 6px 25px rgba(10, 132, 255, 0.5);
}

.mobile-fab:active {
    transform: translateY(-18px) scale(0.95);
}

/* --- TABLES & CARDS ESTILO APPLE --- */
.pharmacy-card { 
    background: var(--bg-card); 
    border-radius: var(--radius-lg); 
    padding: var(--space-xl); 
    box-shadow: var(--shadow-md); 
    max-width: 100%; 
    margin: 0 auto; 
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
}

.pharmacy-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: var(--space-xl); 
    flex-wrap: wrap; 
    gap: var(--space-md); 
}

.pharmacy-header h2 { 
    font-size: 28px; 
    display: flex; 
    align-items: center; 
    gap: var(--space-md); 
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.pharmacy-search-container { 
    position: relative; 
    margin-bottom: var(--space-xl); 
}

.pharmacy-search-input { 
    width: 100%; 
    padding: 14px 20px 14px 48px; 
    border-radius: var(--radius-md); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    background: var(--bg-input); 
    font-size: 16px; 
    color: var(--text-primary);
    transition: var(--transition-base);
}

.pharmacy-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.15);
    background: #3A3A3C;
}

.search-icon { 
    position: absolute; 
    left: 18px; 
    top: 16px; 
    color: var(--text-tertiary); 
    font-size: 16px; 
}
.table-responsive { 
    width: 100%; 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    margin-top: var(--space-md); 
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pharmacy-table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
    min-width: 700px; 
}

.pharmacy-table th { 
    text-align: left; 
    padding: 16px 20px; 
    background: rgba(255, 255, 255, 0.03); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.06); 
    color: var(--text-secondary); 
    font-size: 12px; 
    letter-spacing: 0.5px; 
    text-transform: uppercase;
    font-weight: 600;
}

.pharmacy-table td { 
    padding: 16px 20px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.04); 
    color: var(--text-primary);
    font-size: 15px;
}

.pharmacy-table td:last-child { 
    text-align: right; 
}

.pharmacy-table tbody tr { 
    transition: var(--transition-fast);
}

.pharmacy-table tbody tr:hover { 
    background: rgba(255, 255, 255, 0.03);
}

.status-badge { 
    padding: 6px 12px; 
    border-radius: 12px; 
    font-size: 12px; 
    font-weight: 600; 
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.status-optimal { 
    background: rgba(48, 209, 88, 0.15); 
    color: var(--accent-green); 
    border: 1px solid rgba(48, 209, 88, 0.3);
}

.status-warning { 
    background: rgba(255, 159, 10, 0.15); 
    color: var(--accent-orange); 
    border: 1px solid rgba(255, 159, 10, 0.3);
}

.status-critical { 
    background: rgba(255, 69, 58, 0.15); 
    color: var(--accent-red); 
    border: 1px solid rgba(255, 69, 58, 0.3);
}
.action-btn-circle { 
    width: 38px; height: 38px; border-radius: 50%; 
    border: 1px solid rgba(255,255,255,0.15); 
    background: rgba(255,255,255,0.05); 
    cursor: pointer; 
    display: inline-flex; align-items: center; justify-content: center; 
    margin-left: 5px; transition: 0.2s; 
    color: var(--text-muted); 
    font-size: 0.9rem;
}
.action-btn-circle:hover { background: var(--primary); color: white; border-color: var(--primary); }
.action-btn-circle:disabled { opacity: 0.5; cursor: not-allowed; background: rgba(255,255,255,0.01); border-color: rgba(255,255,255,0.05); }

@media (max-width: 600px) {
    .pharmacy-card { padding: 20px; }
    .pharmacy-header { flex-direction: column; align-items: flex-start; }
    .pharmacy-header h2 { font-size: 1.5rem; }
    .pharmacy-table th, .pharmacy-table td { padding: 12px; }
}

/* --- ALERTAS STOCK BAJO --- */
.alert-box {
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    font-size: 1rem;
}
.alert-warning {
    background-color: rgba(230, 184, 0, 0.1);
    border: 1px solid rgba(230, 184, 0, 0.4);
    color: #ffc107;
}

/* --- MODALS --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; z-index: 2000; padding: 10px; }
.modal-box { 
    background: var(--bg-card); 
    width: 100%; max-width: 600px; max-height: 98vh; 
    overflow-y: auto; position: relative; -webkit-overflow-scrolling: touch; 
    border-radius: 20px; padding: 40px; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.7); 
    border: 1px solid rgba(255,255,255,0.15); 
    transform: scale(0.95); opacity: 0;
    transition: all 0.3s cubic-bezier(.17,.67,.83,.67);
}
.modal-overlay:not(.hidden) .modal-box { transform: scale(1); opacity: 1; }
.wide-modal { max-width: 900px; }
.close-modal-btn { position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.05); border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); z-index: 10; line-height: 1; padding: 5px 10px; border-radius: 50%; width: 40px; height: 40px; }
.close-modal-btn:hover { color: white; background: rgba(255,255,255,0.1); }

.modal-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; flex-wrap: wrap; gap: 15px; }
.dashed-form-container { border: 2px dashed rgba(255,255,255,0.15); border-radius: 15px; padding: 25px; margin-bottom: 25px; background: rgba(255,255,255,0.02); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.span-2 { grid-column: 1 / -1; }
.btn-brown-block { 
    display: flex; width: 100%; 
    background: var(--accent-brown); 
    color: white; 
    padding: 15px; 
    border-radius: 10px; 
    border: 1px solid var(--accent-brown); 
    font-weight: 600; cursor: pointer; 
    margin-bottom: 20px; 
    align-items: center; 
    justify-content: center; 
    gap: 10px;
}
.btn-brown-block:hover { background: #b0816b; color: white; border-color: #b0816b; }

.compact-form-row { display: flex; align-items: flex-end; gap: 15px; background: rgba(255,255,255,0.05); padding: 15px 20px; border-radius: 15px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; }
.compact-input-group { flex: 1; min-width: 120px; }
.compact-input-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; margin-left: 5px; }

/* --- PAPEL DIGITAL (NUEVA FEATURE) --- */
.digital-sheet-container {
    background: #FFFCFB;
    color: #333;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    min-height: 500px;
    position: relative;
}

.paper-input {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(200, 200, 200, 0.4);
    border-radius: 0;
    padding: 8px 5px;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    width: 100%;
}

.paper-input:focus {
    outline: none;
    border-bottom: 2px solid var(--primary);
    background: rgba(10, 90, 102, 0.05);
}

.paper-input::placeholder {
    color: #aaa;
    font-style: italic;
    font-weight: 300;
}

textarea.paper-input {
    resize: vertical;
    min-height: 60px;
    line-height: 1.6;
}

.paper-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.paper-form-grid .form-group {
    margin-bottom: 0;
}

.paper-form-grid .form-group label {
    color: #555;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
}

/* --- SPLIT VIEW (NUEVA FEATURE) --- */
.split-view-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 140px);
    overflow: hidden;
}

.split-sidebar {
    width: 30%;
    min-width: 280px;
    background: rgba(20, 24, 30, 0.6);
    border-right: 1px solid var(--glass-border);
    padding: 20px;
    overflow-y: auto;
    border-radius: var(--radius-card);
}

.split-main {
    width: 70%;
    flex: 1;
    overflow-y: auto;
    border-radius: var(--radius-card);
    position: relative;
}

.patient-summary-card {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 15px;
    margin-top: 10px;
}

.patient-summary-card .data-item {
    background: #222224;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.patient-summary-card .data-item small {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 3px;
}

.patient-summary-card .data-item strong {
    color: white;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .split-view-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    .split-sidebar, .split-main {
        width: 100%;
        min-width: 0;
        height: auto;
        margin-bottom: 20px;
    }

    .paper-form-grid {
        grid-template-columns: 1fr;
    }
}

/* --- FICHAS CL?NICAS --- */
.clinical-sheet-item { background: var(--bg-input); border: 1px solid rgba(255,255,255,0.1); margin-bottom: 15px; border-radius: 10px; overflow: hidden; }
.sheet-header { background: rgba(10, 90, 102, 0.15); padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; font-weight: 600; color: var(--primary); font-size: 0.95rem; flex-wrap: wrap; gap: 5px; }
.sheet-body { padding: 15px 20px; font-size: 0.9rem; color: #ccc; }
.sheet-row { margin-bottom: 8px; display: flex; flex-direction: column; }
@media (min-width: 600px) { .sheet-row { flex-direction: row; } }
.sheet-label { font-weight: 600; width: 140px; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; flex-shrink: 0; }
.sheet-val { flex: 1; }

/* --- CALENDARIO --- */
.calendar-grid-header { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-weight: 700; color: var(--primary); padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 10px; font-size: 0.85rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-day { min-height: 80px; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 5px; position: relative; transition: 0.3s; border: 1px solid transparent; font-size: 0.8rem; cursor: pointer; }
.calendar-day:hover { background: rgba(255,255,255,0.1); border-color: var(--primary); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.day-number { font-weight: 700; color: white; position: absolute; top: 5px; right: 8px; font-size: 1rem; }
.day-event { background: var(--primary); color: white; font-size: 0.7rem; padding: 2px 5px; border-radius: 4px; margin-top: 20px; font-weight: 600; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- PORTAL PACIENTE --- */
.patient-info-box { background: rgba(255,255,255,0.05); padding: 30px; border-radius: 15px; height: 100%; display: flex; flex-direction: column; }
.patient-info-box h3 { font-size: 1.4rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; margin-bottom: 20px; color: var(--primary); }
.patient-data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-top: 20px; }
.data-item { background: #222224; padding: 15px; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.data-item small { color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; display: block; margin-bottom: 3px; }
.data-item strong { color: white; font-size: 1.05rem; word-break: break-word; }
.prescription-list { margin-top: 15px; flex-grow: 1; }
.prescription-item { background: var(--bg-input); border: 1px solid rgba(255,255,255,0.05); margin-bottom: 10px; border-radius: 10px; display: flex; flex-direction: column; gap: 10px; transition: 0.2s; color: white; }
.prescription-item:hover { border-color: var(--primary); }
.item-header { display: flex; justify-content: space-between; align-items: center; width: 100%; flex-wrap: wrap; gap: 10px; }
.action-group { display: flex; gap: 8px; justify-content: flex-end; margin-top: 5px; }
.btn-mini-action { 
    width: 32px; height: 32px; border-radius: 50%; 
    border: 1px solid rgba(255,255,255,0.1); 
    background: rgba(255,255,255,0.05); 
    cursor: pointer; color: var(--text-muted); 
    transition: 0.2s; 
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; 
    font-size: 0.8rem;
}
.btn-mini-action:hover { background: var(--primary); color: white; border-color: var(--primary); }

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    background: #1C2128;
    padding: 20px;
    border-radius: 10px;
}

/* --- TABS & TOGGLES --- */
.tabs-container { display: flex; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 25px; padding-bottom: 10px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.btn-tab { 
    background: none; border: none; font-size: 1rem; padding: 10px 15px; cursor: pointer; 
    color: var(--text-muted); border-bottom: 3px solid transparent; 
    transition: 0.3s; flex-shrink: 0; font-weight: 500;
}
.btn-tab:hover { color: var(--primary); }
.btn-tab.active { color: white; font-weight: 700; border-bottom-color: var(--primary); }

.cita-type-toggle { display: flex; background: rgba(255,255,255,0.05); padding: 5px; border-radius: var(--radius-pill); margin-bottom: 20px; flex-wrap: wrap; }
.toggle-option { 
    flex: 1; text-align: center; padding: 10px 15px; border-radius: var(--radius-pill); 
    cursor: pointer; color: var(--text-muted); font-weight: 600; transition: 0.3s; 
    min-width: 140px; font-size: 0.95rem;
}
.toggle-option.selected { background: #3A3A3C; color: var(--primary); box-shadow: 0 2px 5px rgba(0,0,0,0.3); }

/* --- CODE DISPLAY --- */
#modal-generated-code { z-index: 2200; }
.code-display-box { 
    margin: 25px 0; background: var(--bg-input); padding: 20px; 
    border-radius: 10px; border: 2px dashed var(--primary); 
    position: relative; word-break: break-all;
}

/* --- ANIMATIONS & FEEDBACK --- */
.modern-input.input-error { border-color: #ef5350; background-color: rgba(239, 83, 80, 0.15); box-shadow: 0 0 0 4px rgba(239, 83, 80, 0.2); animation: pulse-red 0.5s ease; }
.login-feedback-msg { color: #ef5350; font-size: 0.9rem; margin: 15px 0 20px; background: rgba(239, 83, 80, 0.15); padding: 12px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(239, 83, 80, 0.4); animation: fadeIn 0.3s ease; }
.shake-animation { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* --- TOAST --- */
#toast-notification { 
    position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); 
    background: white; color: black; padding: 15px 30px; 
    border-radius: var(--radius-pill); opacity: 0; transition: all 0.4s ease-out; 
    z-index: 3000; pointer-events: none; width: 90%; max-width: 350px; 
    text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    font-weight: 600; font-size: 0.9rem;
}
.show { opacity: 1 !important; transform: translateX(-50%) translateY(-10px); }

/* --- CONTRASE?A TOGGLE --- */
.password-input-container {
    position: relative;
    width: 100%;
}
.password-input-container .modern-input {
    padding-right: 50px;
}
.toggle-password-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 10px;
    font-size: 1.1rem;
    transition: color 0.2s;
    line-height: 1;
}
.toggle-password-btn:hover {
    color: var(--primary-dark);
}

/* --- PORTAL MODAL PAPEL --- */
.paper-modal-content { 
    color: #333 !important;
}

.paper-title { 
    font-size: 1.8rem; 
    color: #0A5A66; 
    font-weight: 700; 
    margin-bottom: 15px; 
    border-bottom: 3px double #0A5A66; 
    padding-bottom: 10px;
}

.paper-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 10px 0; 
    border-bottom: 1px dotted #bbb; 
    align-items: flex-start;
    font-size: 0.95rem;
}

.paper-label { 
    font-weight: 700; 
    color: #444; 
    width: 130px; 
    flex-shrink: 0;
    text-transform: uppercase;
}

.paper-value { 
    flex: 1; 
    text-align: right; 
    color: #000; 
    font-weight: 500;
}

@media (max-width: 600px) {
    .modal-box { padding: 25px; }
    .paper-title { font-size: 1.5rem; }
    .paper-row { flex-direction: column; text-align: left; }
    .paper-label { width: 100%; margin-bottom: 5px; font-size: 0.85rem;}
    .paper-value { text-align: left; }
}

/* --- IMPRESI?N --- */
#printable-area { display: none; }
@media print {
    body * { visibility: hidden; }
    #printable-area, #printable-area * { visibility: visible; }
    #printable-area { 
        position: absolute; left: 0; top: 0; 
        width: 100%; display: block; padding: 20px; 
        background: white; color: black; 
        font-family: 'Times New Roman', serif;
    }
    
    .print-paper { 
        width: 100%; max-width: 100%; border: none; padding: 10px; 
        box-shadow: none;
    }
    
    .print-header-template {
        display: flex; justify-content: space-between; align-items: flex-start;
        margin-bottom: 15px;
        padding-bottom: 5px;
        border-bottom: 1px solid #aaa;
    }
    
    .print-header-logo-box {
        display: flex; align-items: center;
        flex-grow: 1;
    }
    
    .print-logo-icon {
        font-size: 3rem; 
        color: var(--print-accent-green);
        margin-right: 15px;
    }

    .print-logo-text {
        line-height: 1;
    }
    .print-logo-title { 
        font-size: 0.8rem; font-weight: bold; margin-bottom: 2px;
        color: var(--print-primary-blue);
        text-transform: uppercase;
        font-family: Arial, sans-serif;
    }
    .print-logo-subtitle {
        font-size: 1.2rem; font-weight: bold; 
        color: var(--print-primary-blue);
        font-family: 'Playfair Display', serif;
    }

    .print-doctor-info {
        text-align: right;
        font-size: 0.85rem;
        line-height: 1.2;
    }
    .print-doctor-name { font-weight: bold; color: #333; }
    .print-doctor-title { font-size: 0.75rem; color: #555; }
    .print-doctor-jvpm { font-size: 0.75rem; color: #555; }
    
    .print-patient-info-row {
        margin-top: 15px;
        font-size: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }
    .print-underline {
        display: inline-block;
        min-width: 100px;
        border-bottom: 1px solid #000;
        margin-right: 20px;
        padding-bottom: 2px;
        font-weight: bold;
        color: #000;
    }
    
    .print-divider-line { 
        border-bottom: 2px solid #ccc; 
        margin: 5px 0 10px 0;
    }
    .print-divider-line-sub {
        border-bottom: 1px solid #ddd;
        margin: 5px 0 15px 0;
    }
    
    .print-section { margin-bottom: 20px; }
    .print-section h3 { 
        text-align: left; 
        border-bottom: 1px solid #aaa; 
        text-transform: uppercase; 
        font-size: 1.1rem; 
        margin-bottom: 10px; 
        padding-bottom: 5px; 
        color: black;
    }
    .print-content-text { 
        font-size: 1rem; 
        line-height: 1.6; 
        white-space: pre-line; 
        color: #333;
    }

    .print-footer { margin-top: 50px; text-align: center; page-break-inside: avoid; }
    .signature-line { 
        border-top: 1px solid #000; 
        width: 250px; 
        margin: 30px auto 10px; 
        padding-top: 10px;
    }
    .print-address {
        font-size: 0.75rem;
        color: #555;
        margin-bottom: 5px;
    }
    
    #print-full-expediente-section { display: block; }
    
    .print-content-text table th {
        background-color: #f5f5f5 !important;
        font-weight: bold;
        color: #333;
    }
}

/* --- MEDIA QUERIES NAVEGACI?N --- */
@media (max-width: 768px) {
    #app-header-container {
        display: none !important;
    }
    #mobile-bottom-nav {
        display: flex;
    }
    .hero-parallax {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 50px;
    }

    /* Ajustar padding del body para nav m?vil */
    body {
        padding-bottom: 90px;
    }
}

/* --- TIME PICKER ESTILO BISEL (Apple Watch Style) --- */
.time-picker-bezel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    position: relative;
}

.time-picker-input {
    width: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-system);
    -moz-appearance: textfield;
}

.time-picker-input::-webkit-inner-spin-button,
.time-picker-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.time-picker-input:focus {
    outline: none;
}

.time-separator {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-secondary);
}

.time-picker-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--primary);
    font-size: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.time-picker-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    transform: scale(1.05);
}

.time-picker-btn:active {
    transform: scale(0.95);
}

.time-picker-ampm {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 8px;
}

.ampm-btn {
    width: 40px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ampm-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.ampm-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
    .time-picker-bezel {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .time-picker-input {
        font-size: 20px;
        width: 45px;
    }
    
    .time-picker-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* === ELIMINAR FLECHAS DE TODOS LOS NUMBER INPUTS === */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
    display: none;
}

input[type="number"]:hover::-webkit-inner-spin-button,
input[type="number"]:hover::-webkit-outer-spin-button,
input[type="number"]:focus::-webkit-inner-spin-button,
input[type="number"]:focus::-webkit-outer-spin-button {
    -webkit-appearance: none;
    display: none;
}

/* === TIME PICKER MEJORADO - ESTILO BISEL === */
.time-picker-bezel {
    background: linear-gradient(145deg, #2C2C2E, #1C1C1E);
    box-shadow: 
        inset 2px 2px 5px rgba(0, 0, 0, 0.5),
        inset -2px -2px 5px rgba(255, 255, 255, 0.05),
        0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.time-picker-input {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-variant-numeric: tabular-nums;
}

.time-picker-btn {
    background: linear-gradient(145deg, #3A3A3C, #2C2C2E);
    box-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.4),
        -3px -3px 6px rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.time-picker-btn:hover {
    background: linear-gradient(145deg, #4A4A4C, #3A3A3C);
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.4),
        -2px -2px 4px rgba(255, 255, 255, 0.05),
        0 0 10px rgba(10, 132, 255, 0.3);
}

.time-picker-btn:active {
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.5),
        inset -1px -1px 2px rgba(255, 255, 255, 0.03);
}

.ampm-btn {
    background: linear-gradient(145deg, #3A3A3C, #2C2C2E);
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.4),
        -2px -2px 4px rgba(255, 255, 255, 0.03);
}

.ampm-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, #0066CC 100%);
    box-shadow: 
        inset 1px 1px 3px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(10, 132, 255, 0.4);
}