/* ==========================================================================
   Extensiones de Diseño y Layout para KADENTAL
   ========================================================================== */

/* Variables de Animación y Efectos Visuales */
:root {
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-hero: linear-gradient(135deg, var(--color-verde-oscuro) 0%, #3e6051 50%, var(--color-verde-brillante) 100%);
    --gradient-accent: linear-gradient(90deg, var(--color-verde-oscuro) 0%, var(--color-verde-medio) 100%);
    --shadow-premium: 0 20px 40px -15px rgba(47, 74, 62, 0.15);
    --shadow-hover: 0 30px 60px -10px rgba(183, 200, 106, 0.2);
}

/* Scrollbar Personalizado Estilo Premium */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--kadental-cyan);
}

/* ==========================================================================
   Estructura Global y Contenedores
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

/* ==========================================================================
   Cabecera de Navegación (Sticky Glassmorphic Navbar)
   ========================================================================== */
.header-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition-smooth);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    
    /* Tamaño en pantalla no menor a 4 cm impreso (aprox. 150px total) para legibilidad */
    min-width: 155px; 
    
    /* Área de Respeto: espacio libre mínimo a la altura de la letra "e" del logotipo (X ≈ 14px) */
    --logo-x-height: 14px; 
    padding: var(--logo-x-height); 
    gap: var(--logo-x-height); 
    transition: var(--transition-smooth);
}

.logo-icon-svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.logo-icon-svg path {
    transition: var(--transition-smooth);
}

.logo-link:hover .logo-icon-svg {
    transform: rotate(45deg) scale(1.08);
}

.logo-link:hover .logo-icon-svg path[stroke] {
    stroke: var(--color-verde-brillante);
}

.logo-link:hover .logo-icon-svg path[fill] {
    fill: var(--color-verde-brillante);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--color-verde-brillante);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; /* Forma orgánica dental amigable */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-verde-oscuro);
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(47, 74, 62, 0.15);
    animation: organic-shape 8s ease-in-out infinite alternate;
}

@keyframes organic-shape {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%; }
}

.logo-text {
    font-family: var(--font-header);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-verde-oscuro);
    letter-spacing: -0.04em;
    text-transform: none; /* KaDental */
}

.logo-text span {
    color: var(--color-verde-medio);
    transition: var(--transition-smooth);
}

.logo-link:hover .logo-text span {
    color: var(--color-verde-brillante);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    font-family: 'DM Sans', sans-serif; /* DM Sans para menús e interacción */
    font-size: 0.9rem;
    font-weight: 500; /* DM Sans Medium */
    text-transform: none; /* Sentence/Title case */
    text-decoration: none;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--color-verde-oscuro);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background: var(--gradient-accent);
    border-radius: 5px;
    transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-btn {
    font-family: 'DM Sans', sans-serif; /* DM Sans para botones e interacción */
    font-size: 0.9rem;
    font-weight: 500; /* DM Sans Medium */
    text-transform: none;
    padding: 0.65rem 1.25rem;
    background: var(--color-verde-oscuro);
    color: white !important;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    background: var(--color-verde-brillante);
    color: var(--color-verde-oscuro) !important;
    box-shadow: 0 4px 15px rgba(205, 235, 106, 0.3);
    transform: translateY(-2px);
}

/* Hamburguesa para móvil */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--kadental-blue);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   Sección Hero (Impresionante presentación visual)
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, rgba(47, 74, 62, 0.95) 0%, rgba(47, 74, 62, 0.78) 100%), url('../images/clinic_hero_bg.png') no-repeat center center;
    background-size: cover;
    color: white;
    position: relative;
    overflow: hidden;
    padding: 7rem 0 8rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(205, 235, 106, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.15;
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero-content h1 span {
    color: var(--color-verde-brillante);
    display: block;
    font-weight: 900;
}

.hero-content p {
    font-size: 1.15rem;
    color: rgba(244, 249, 252, 0.85);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions .btn-primary {
    background-color: var(--color-verde-brillante) !important;
    color: var(--color-verde-oscuro) !important;
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 20px -5px rgba(205, 235, 106, 0.4) !important;
}

.hero-actions .btn-primary:hover {
    background-color: var(--color-verde-medio) !important;
    color: var(--color-verde-oscuro) !important;
    box-shadow: 0 15px 25px -5px rgba(183, 200, 106, 0.6) !important;
    transform: translateY(-2px);
}

.hero-actions .btn-secondary {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.hero-actions .btn-secondary:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Ilustración / Tarjeta flotante en Hero */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-dental-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    animation: float 6s ease-in-out infinite alternate;
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-15px); }
}

.floating-dental-card h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
}

.dental-badge-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dental-badge-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.dental-badge-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.dental-badge-icon {
    width: 36px;
    height: 36px;
    background: var(--kadental-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.dental-badge-text h4 {
    color: white;
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
}

.dental-badge-text p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

/* ==========================================================================
   Grillas de Contenido (Servicios, Especialistas, etc.)
   ========================================================================== */
.section-title-wrapper {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.25rem;
    background: var(--color-menta-suave); /* Fondo Menta Suave oficial */
    color: var(--color-verde-oscuro); /* Texto Verde Oscuro oficial */
    border: 1px solid rgba(47, 74, 62, 0.08); /* Borde sutil del color oscuro */
    border-radius: 50px; /* Forma de píldora redonda de la pág 3.5 */
    font-family: 'DM Sans', sans-serif; /* DM Sans según la foto del manual */
    font-size: 0.8rem;
    font-weight: 500; /* Medium */
    text-transform: none; /* Caja mixta/Sentence case */
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(47, 74, 62, 0.04);
}

.section-title {
    font-size: 2.2rem;
    color: var(--kadental-blue);
    font-weight: 800;
}

.section-title span {
    color: var(--kadental-cyan);
}

.section-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.75rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

/* Tarjetas de Servicios */
.service-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(0, 180, 216, 0.2);
}

.service-card:hover::before {
    transform: scaleY(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 180, 216, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kadental-cyan);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
    background: var(--gradient-accent);
    color: white;
    transform: rotate(6deg) scale(1.05);
}

.service-card h3 {
    color: var(--kadental-blue);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Tarjetas de Especialistas */
.doctor-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    text-align: center;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
}

.doctor-avatar-wrapper {
    height: 260px;
    background: linear-gradient(180deg, #f4f9fc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.doctor-avatar-svg {
    width: 150px;
    height: 150px;
    color: var(--kadental-blue);
    opacity: 0.85;
    transition: var(--transition-smooth);
}

.doctor-card:hover .doctor-avatar-svg {
    transform: scale(1.08);
    color: var(--kadental-cyan);
}

.doctor-info {
    padding: 1.5rem;
}

.doctor-info h3 {
    font-size: 1.1rem;
    color: var(--kadental-blue);
    margin-bottom: 0.25rem;
}

.doctor-info span {
    display: block;
    color: var(--kadental-cyan);
    font-family: var(--font-header);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.doctor-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   Sección Agendar Cita (Formulario dinámico y UI)
   ========================================================================== */
.booking-section {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.booking-card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}

.booking-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
}

.booking-info-pane {
    background: var(--kadental-blue);
    color: white;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.booking-info-pane::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(0, 180, 216, 0.1);
    border-radius: 50%;
}

.booking-info-pane h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.booking-contact-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 3rem 0;
}

.booking-contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.booking-contact-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kadental-cyan);
    font-size: 1.25rem;
}

.booking-contact-details h4 {
    color: white;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.booking-contact-details p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.booking-schedule-table {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
}

.booking-schedule-table h4 {
    color: var(--kadental-cyan);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.booking-schedule-table p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.booking-form-pane {
    padding: 3.5rem;
}

.booking-form-pane h3 {
    color: var(--kadental-blue);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Layout del Panel de Control (Dashboard Staff)
   ========================================================================== */
.dashboard-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.dashboard-sidebar {
    background: var(--kadental-blue);
    color: white;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-family: var(--font-header);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.sidebar-link:hover, .sidebar-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    background: var(--gradient-accent);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.2);
}

.sidebar-link-icon {
    font-size: 1.1rem;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--kadental-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.sidebar-user-info h5 {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.sidebar-user-info span {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
}

.dashboard-main {
    background: var(--bg-main);
    padding: 2.5rem;
    overflow-y: auto;
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-topbar h1 {
    margin-bottom: 0;
}

.dashboard-topbar-actions {
    display: flex;
    gap: 1rem;
}

/* Grilla de Métricas en el Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-info h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-header);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-info .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--kadental-blue);
    line-height: 1.2;
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon-blue { background: rgba(15, 42, 74, 0.06); color: var(--kadental-blue); }
.stat-icon-cyan { background: rgba(0, 180, 216, 0.06); color: var(--kadental-cyan); }
.stat-icon-success { background: rgba(16, 185, 129, 0.06); color: var(--color-success); }
.stat-icon-warning { background: rgba(245, 158, 11, 0.06); color: var(--color-warning); }

/* Filtros y Controles del Dashboard */
.filter-bar {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dark-neutral);
    font-family: var(--font-header);
    text-transform: uppercase;
}

/* Modificaciones de Tablas en el Dashboard */
.action-buttons-cell {
    display: flex;
    gap: 0.5rem;
}

.btn-mini {
    padding: 0.4rem 0.75rem;
    font-size: 0.7rem;
    border-radius: 4px;
}

.btn-mini-success { background-color: var(--color-success); color: white; }
.btn-mini-success:hover { background-color: #0d9488; }
.btn-mini-danger { background-color: var(--color-danger); color: white; }
.btn-mini-danger:hover { background-color: #dc2626; }
.btn-mini-warning { background-color: var(--color-warning); color: white; }
.btn-mini-warning:hover { background-color: #d97706; }

/* Modales e Interfaz Interactiva de Popups */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 42, 74, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 580px;
    box-shadow: 0 25px 50px -12px rgba(15, 42, 74, 0.25);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    background: var(--bg-main);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin-bottom: 0;
    color: var(--kadental-blue);
}

.modal-close-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    color: var(--color-danger);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-main);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Notificaciones Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast-message {
    background: white;
    border-left: 4px solid var(--kadental-cyan);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(15, 42, 74, 0.1);
    padding: 1rem 1.5rem;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transform: translateX(120%);
    animation: toast-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast-message.toast-success { border-left-color: var(--color-success); }
.toast-message.toast-danger { border-left-color: var(--color-danger); }
.toast-message.toast-warning { border-left-color: var(--color-warning); }

@keyframes toast-slide-in {
    100% { transform: translateX(0); }
}

.toast-content {
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 500;
}

.toast-close {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    background: var(--kadental-blue);
    color: white;
    padding: 5rem 0 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-info h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-header);
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--kadental-cyan);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Responsividad Avanzada
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid, .booking-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-content p {
        margin: 0 auto 2.5rem auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        margin-top: 2rem;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none; /* Hamburguesa en responsive real */
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .grid-3, .grid-2, .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-wrapper {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        display: none; /* En móvil real haríamos responsive drawer */
    }
    
    .booking-info-pane, .booking-form-pane {
        padding: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
}

/* ==========================================================================
   Estilos del Expediente Multimedia (Adjuntos Clínicos)
   ========================================================================== */
.file-item-card {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.file-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(15, 42, 74, 0.06);
}

.file-item-card img {
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

.file-item-card:hover img {
    opacity: 0.9;
}

.btn-delete-file {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    font-weight: bold;
    z-index: 10;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-delete-file:hover {
    background: #dc2626;
    transform: scale(1.1);
}

#upload-progress-bar div {
    animation: loading-slide 1.5s infinite ease-in-out;
}

@keyframes loading-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}
