/* ==========================================================================
   Plan.net - Orange & White Design System (Con Fondo de Pantalla Oficial)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --primary-orange: #f97316;
    --primary-orange-hover: #ea580c;
    --primary-orange-dark: #c2410c;
    --primary-orange-light: #fff7ed;
    --primary-orange-subtle: #ffedd5;
    --orange-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --orange-gradient-soft: linear-gradient(145deg, #fff7ed 0%, #ffffff 100%);

    --white: #ffffff;
    --bg-surface: #fdfdfd;
    --bg-subtle: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;

    --border-color: #f1f5f9;
    --border-orange: #fdba74;
    --card-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --card-hover-shadow: 0 18px 30px -8px rgba(234, 88, 12, 0.18), 0 8px 12px -5px rgba(15, 23, 42, 0.06);
}

/* Fondo de pantalla oficial de la carpeta de imágenes */
body {
    font-family: 'Outfit', sans-serif;
    background-color: #fff7ed;
    background-image: url('../img/fondo_usuarios.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-image 0.25s ease-in-out;
}

/* Fondo para Vista de Clientes, Usuarios y Login */
body.body-usuarios,
body.body-usuario,
body.body-login {
    background-image: url('../img/fondo_usuarios.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

/* Fondo oficial para Panel de Técnicos y Administrador */
body.body-tec-admin,
body.body-tecnico,
body.body-admin {
    background-image: url('../img/fondo_tec_admin.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

/* Navbar Principal Naranja & Blanco con efecto Glassmorphism */
.navbar-plannet {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--primary-orange);
    box-shadow: 0 4px 20px -2px rgba(234, 88, 12, 0.12);
}

.brand-title {
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: -0.5px;
    color: #1e293b;
}

.brand-title span {
    color: var(--primary-orange);
}

.brand-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

/* Botones Principales Naranjas */
.btn-primary {
    background: var(--orange-gradient) !important;
    border-color: var(--primary-orange-hover) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
    transition: all 0.25s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
    border-color: var(--primary-orange-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.35);
}

.btn-outline-primary {
    color: var(--primary-orange) !important;
    border-color: var(--primary-orange) !important;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-outline-primary:hover {
    background: var(--orange-gradient) !important;
    color: #ffffff !important;
    border-color: var(--primary-orange-hover) !important;
    transform: translateY(-2px);
}

/* Pestañas de Navegación (Nav Pills) de Alto Contraste */
.nav-pills .nav-link {
    background: rgba(255, 255, 255, 0.92) !important;
    color: #1e293b !important;
    border: 1.5px solid rgba(253, 186, 116, 0.7) !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
    transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
    background: #ffffff !important;
    color: var(--primary-orange-dark) !important;
    border-color: var(--primary-orange) !important;
    transform: translateY(-1px);
}

.nav-pills .nav-link.active {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: #1e293b !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.nav-pills .nav-link.active i {
    color: #fbbf24 !important;
}

/* Botones Circulares de Acciones en Tabla */
.btn-action-circle {
    width: 33px;
    height: 33px;
    border-radius: 50% !important;
    background-color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
}

/* Etiqueta flotante instantánea al pasar el mouse por los circulitos */
.btn-action-circle[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #0f172a;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.18s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    z-index: 50;
}

.btn-action-circle[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Evitar que el último botón (derecha) se corte en el borde de la tabla */
.btn-action-circle:last-child[data-tooltip]::after,
.btn-action-print[data-tooltip]::after {
    left: auto;
    right: 0;
    transform: translateY(4px);
}

.btn-action-circle:last-child[data-tooltip]:hover::after,
.btn-action-print[data-tooltip]:hover::after {
    transform: translateY(0);
}

/* Mini iconos para el menú de simbología de acciones */
.legend-circle-sm {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.btn-action-detail {
    color: var(--primary-orange) !important;
    border: 1.5px solid #fdba74 !important;
}

.btn-action-detail:hover {
    background: var(--orange-gradient) !important;
    color: #ffffff !important;
    border-color: var(--primary-orange-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(249, 115, 22, 0.32);
}

.btn-action-edit {
    color: #2563eb !important;
    border: 1.5px solid #93c5fd !important;
}

.btn-action-edit:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.32);
}

.btn-action-whatsapp {
    color: #16a34a !important;
    border: 1.5px solid #86efac !important;
}

.btn-action-whatsapp:hover {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #15803d !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.32);
}

.btn-action-print {
    color: #1e293b !important;
    border: 1.5px solid #cbd5e1 !important;
}

.btn-action-print:hover {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(30, 41, 59, 0.28);
}

/* Hero ligero de alto rendimiento (sin blur pesado en GPU) */
.hero-plannet {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(253, 186, 116, 0.4);
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.05);
}

/* Tarjetas con fondo blanco para legibilidad perfecta y 60fps */
.card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

/* Tarjetas de Selección de Servicios */
.service-checkbox-card {
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1rem;
    background: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    height: 100%;
}

.service-checkbox-card:hover {
    border-color: var(--border-orange);
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -8px rgba(234, 88, 12, 0.18);
}

.service-checkbox-card.selected {
    border-color: var(--primary-orange);
    background: var(--orange-gradient-soft);
    box-shadow: 0 10px 22px -5px rgba(234, 88, 12, 0.25);
}

.service-checkbox-card .icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.85rem;
    transition: transform 0.25s ease;
}

.service-checkbox-card:hover .icon-wrapper {
    transform: scale(1.08);
}

.service-checkbox-card .check-indicator {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.service-checkbox-card.selected .check-indicator {
    border-color: var(--primary-orange);
    background: var(--primary-orange);
}

/* Tarjetas de Métricas Operativas */
.metric-card {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    padding: 1.3rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
    border: 1.5px solid rgba(255, 237, 213, 0.8);
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
}

/* Colores idénticos a las opciones de filtro por apartado para las tarjetas de métricas */
.metric-card[data-filter="today"]:not(.has-pending-citas) {
    background-color: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: 0 4px 14px rgba(100, 116, 139, 0.08) !important;
    animation: none !important;
}

.metric-card[data-filter="today"]:not(.has-pending-citas):hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 8px 22px rgba(100, 116, 139, 0.16) !important;
    transform: translateY(-3px);
}

.metric-card[data-filter="today"].has-pending-citas {
    border: 1.5px solid #cbd5e1;
}

.metric-card[data-filter="pending"],
.metric-card.border-danger {
    background-color: #fee2e2 !important;
    border: 1.5px solid #fca5a5 !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.12) !important;
}

.metric-card[data-filter="in_progress"],
.metric-card.border-warning.metric-card-static {
    background-color: #fef3c7 !important;
    border: 1.5px solid #fde68a !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12) !important;
}

.metric-card[data-filter="delivered"],
.metric-card.border-success {
    background-color: #d1fae5 !important;
    border: 1.5px solid #a7f3d0 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12) !important;
}

/* Tarjeta Directorio Personal Técnico en Admin */
.metric-card[data-bs-target="#modalDirectorioTecnicos"] {
    background-color: #fff7ed !important;
    border: 1.5px solid #fdba74 !important;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.12) !important;
}

/* Estados Hover y Activo de las tarjetas de métricas */
.metric-card[data-filter="today"]:hover,
.metric-card[data-filter="today"].active {
    background-color: #e2e8f0 !important;
    border-color: #64748b !important;
    box-shadow: 0 8px 22px rgba(100, 116, 139, 0.25) !important;
    transform: translateY(-3px);
}

.metric-card[data-filter="pending"]:hover,
.metric-card[data-filter="pending"].active {
    background-color: #fecaca !important;
    border-color: #ef4444 !important;
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.25) !important;
    transform: translateY(-3px);
}

.metric-card[data-filter="in_progress"]:hover,
.metric-card[data-filter="in_progress"].active {
    background-color: #fde68a !important;
    border-color: #f59e0b !important;
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.25) !important;
    transform: translateY(-3px);
}

.metric-card[data-filter="delivered"]:hover,
.metric-card[data-filter="delivered"].active {
    background-color: #a7f3d0 !important;
    border-color: #10b981 !important;
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.25) !important;
    transform: translateY(-3px);
}

.metric-card[data-bs-target="#modalDirectorioTecnicos"]:hover {
    background-color: #ffedd5 !important;
    border-color: #f97316 !important;
    box-shadow: 0 8px 22px rgba(249, 115, 22, 0.25) !important;
    transform: translateY(-3px);
}
.metric-card[data-filter="delivered"].active {
    background-color: #a7f3d0;
    border-color: #10b981 !important;
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.25);
    transform: translateY(-3px);
}

.metric-card-static,
.metric-card-static:hover {
    transform: none !important;
    cursor: default !important;
}

.metric-card-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

/* Folio OT Badge */
.ot-pill {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    background: var(--primary-orange-light);
    border: 1.5px solid var(--border-orange);
    color: var(--primary-orange-dark);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Estados Requeridos con Bootstrap */
.badge-status {
    padding: 0.32rem 0.65rem;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.2px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.badge-status-recibido {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca;
}

.badge-status-recibido .status-dot {
    background-color: #dc2626;
    box-shadow: 0 0 8px #dc2626;
}

.badge-status-proceso {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a;
}

.badge-status-proceso .status-dot {
    background-color: #d97706;
    box-shadow: 0 0 8px #d97706;
}

.badge-status-entregado {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0;
}

.badge-status-entregado .status-dot {
    background-color: #16a34a;
    box-shadow: 0 0 8px #16a34a;
}

/* Tabla y Filas */
.table-responsive {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
}

.table hover tbody tr:hover {
    background-color: var(--primary-orange-light) !important;
}

/* Footer oficial */
footer {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(10px);
}

/* ==========================================================================
   Vista de Usuarios (Barra Naranja Inicio / Nosotros, Servicios y Visión)
   ========================================================================== */

.user-orange-navbar {
    background: linear-gradient(90deg, #e05e0b 0%, #f97316 50%, #e05e0b 100%);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.28);
    border-bottom: 2px solid rgba(255, 255, 255, 0.22);
}

.user-orange-navbar .nav-link {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.12rem;
    font-weight: 600;
    padding: 0.95rem 2.5rem;
    position: relative;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    border-radius: 0 !important;
}

.user-orange-navbar .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    transform: none !important;
}

.user-orange-navbar .nav-link.active {
    color: #ffffff !important;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16) !important;
}

.user-orange-navbar .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: #ffffff;
    box-shadow: 0 -2px 8px rgba(255, 255, 255, 0.7);
}

.user-orange-navbar .nav-link.active i {
    color: #ffffff !important;
}

/* Tarjetas Informativas de Servicios en Inicio (Sin selección) */
.service-showcase-card {
    border: 1.5px solid #f1f5f9;
    border-radius: 18px;
    padding: 1.5rem 1.35rem;
    background: #ffffff;
    box-shadow: 0 8px 22px -6px rgba(15, 23, 42, 0.06);
    transition: all 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-showcase-card:hover {
    border-color: #fdba74;
    transform: translateY(-3px);
    box-shadow: 0 14px 28px -8px rgba(234, 88, 12, 0.14);
}

.service-showcase-card .icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    margin-bottom: 1rem;
}

.location-map-pill {
    transition: all 0.22s ease;
    cursor: pointer;
}

.location-map-pill:hover {
    background: #fff7ed !important;
    border-color: var(--primary-orange) !important;
    color: var(--primary-orange-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.2) !important;
}

/* Chips de servicios en el mini formulario de cita */
.service-mini-chip {
    cursor: pointer;
    padding: 0.42rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    transition: all 0.2s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.service-mini-chip:hover {
    border-color: #fdba74;
    color: #c2410c;
    background: #fff7ed;
}

.service-mini-chip.active {
    background: var(--orange-gradient);
    color: #ffffff;
    border-color: #ea580c;
    box-shadow: 0 3px 10px rgba(234, 88, 12, 0.25);
}

/* Sección Nosotros: Números 1, 2, 3 y Globos de Visión */
.why-item-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 18px;
    padding: 1.25rem 1.4rem;
    box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.06);
    transition: all 0.25s ease;
}

.why-item-card:hover {
    transform: translateX(6px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 26px -6px rgba(37, 99, 235, 0.14);
}

.why-number-badge {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 1.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.vision-bubble-card {
    position: relative;
    background: linear-gradient(145deg, #fefce8 0%, #fef9c3 100%);
    border: 1.5px solid #fde047;
    border-radius: 20px;
    padding: 1.65rem 1.85rem;
    color: #1e293b;
    font-size: 1.05rem;
    line-height: 1.65;
    box-shadow: 0 14px 30px -8px rgba(202, 138, 4, 0.18), 0 6px 12px -4px rgba(15, 23, 42, 0.05);
    transition: all 0.28s ease;
}

.vision-bubble-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px -8px rgba(234, 88, 12, 0.22);
    border-color: #facc15;
}

.vision-bubble-right::after {
    content: "";
    position: absolute;
    top: 32px;
    right: -16px;
    border-width: 12px 0 12px 16px;
    border-style: solid;
    border-color: transparent transparent transparent #fef08a;
    filter: drop-shadow(3px 2px 2px rgba(15, 23, 42, 0.06));
}

.vision-bubble-left::before {
    content: "";
    position: absolute;
    top: 32px;
    left: -16px;
    border-width: 12px 16px 12px 0;
    border-style: solid;
    border-color: transparent #fef08a transparent transparent;
    filter: drop-shadow(-3px 2px 2px rgba(15, 23, 42, 0.06));
}

/* ==========================================================================
   Transiciones SPA a 60 FPS entre Vistas (Admin / Técnico / Usuarios)
   ========================================================================== */

.navbar-plannet .navbar-nav {
    position: relative;
}

/* Píldora deslizante animada en el menú superior */
.nav-sliding-pill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 50rem;
    pointer-events: none;
    z-index: 0;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        opacity 0.2s ease;
    will-change: transform, width;
}

.nav-sliding-pill,
.nav-sliding-pill[data-pill-color="tecnico"] {
    background-color: #fef3c7;
    border: 1.5px solid #f59e0b;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.18);
}

.nav-sliding-pill[data-pill-color="clientes"] {
    background-color: #eff6ff;
    border: 1.5px solid #3b82f6;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.18);
}

.nav-sliding-pill[data-pill-color="admin"] {
    background-color: #fee2e2;
    border: 1.5px solid #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.18);
}

.navbar-plannet .navbar-nav .nav-item {
    position: relative;
    z-index: 1;
}

.navbar-plannet .navbar-nav .nav-link {
    border: 1.5px solid transparent;
    transition: color 0.22s ease,
        background-color 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar-plannet .navbar-nav .nav-link:not(.active):hover {
    color: #0f172a !important;
    background-color: rgba(254, 243, 199, 0.85) !important;
    border-color: rgba(245, 158, 11, 0.55) !important;
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.25), 0 3px 8px rgba(234, 88, 12, 0.12);
    transform: translateY(-1px);
}

.navbar-plannet .navbar-nav .nav-link:hover i {
    filter: drop-shadow(0 0 5px rgba(249, 115, 22, 0.45));
    transform: scale(1.08);
    display: inline-block;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.navbar-plannet .navbar-nav.has-sliding-pill .nav-link.active {
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.navbar-plannet .navbar-nav.has-sliding-pill .nav-link.active:hover {
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.38) !important;
}

/* Píldora deslizante animada en los botones de filtro (Todos / Citas de Hoy / +2 Días / Pendientes / En Proceso / Entregados) */
.filter-pills-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 4px;
    padding-right: 4px;
    margin-top: -6px;
    margin-bottom: -6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
}
.filter-pills-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.filter-pills-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    white-space: nowrap;
    padding-top: 2px;
    padding-bottom: 2px;
}

.filter-sliding-pill {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50rem;
    pointer-events: none;
    z-index: 0;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        opacity 0.2s ease;
    will-change: transform, width;
}

/* Acabado visual de las vistas (fondo tenue/pastel + borde fino 1.5px + sombra suave con el color de cada apartado) */
.filter-sliding-pill[data-pill-color="all"] {
    background-color: #ffedd5;
    border: 1.5px solid #f97316;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.2);
}

.filter-sliding-pill[data-pill-color="today"] {
    background-color: #f1f5f9;
    border: 1.5px solid #64748b;
    box-shadow: 0 4px 14px rgba(100, 116, 139, 0.2);
}

.filter-sliding-pill[data-pill-color="pending"] {
    background-color: #fee2e2;
    border: 1.5px solid #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.filter-sliding-pill[data-pill-color="in_progress"] {
    background-color: #fef3c7;
    border: 1.5px solid #f59e0b;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.filter-sliding-pill[data-pill-color="delivered"] {
    background-color: #d1fae5;
    border: 1.5px solid #10b981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.filter-sliding-pill[data-pill-color="delayed"] {
    background-color: #fee2e2;
    border: 1.5px solid #dc2626;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
}

button.filter-pill-btn {
    position: relative;
    z-index: 1;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-weight: 500;
    font-size: 0.81rem;
    padding: 0.34rem 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.22s ease,
        background-color 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Colores estáticos y de respaldo para cada botón de filtro cuando está activo */
button.filter-pill-btn[data-filter="all"].active {
    background-color: #ffedd5 !important;
    border-color: #f97316 !important;
    color: #9a3412 !important;
}

button.filter-pill-btn[data-filter="today"].active {
    background-color: #f1f5f9 !important;
    border-color: #64748b !important;
    color: #1e293b !important;
}

button.filter-pill-btn[data-filter="pending"].active {
    background-color: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
}

button.filter-pill-btn[data-filter="in_progress"].active {
    background-color: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #92400e !important;
}

button.filter-pill-btn[data-filter="delivered"].active {
    background-color: #d1fae5 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
}

/* Con píldora deslizante activa: el botón transparenta su fondo para que la píldora se deslice por debajo */
.filter-pills-container.has-sliding-filter-pill button.filter-pill-btn.active {
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

.filter-pills-container.has-sliding-filter-pill button.filter-pill-btn[data-filter="all"].active {
    color: #9a3412 !important;
}

.filter-pills-container.has-sliding-filter-pill button.filter-pill-btn[data-filter="today"].active {
    color: #1e293b !important;
}

.filter-pills-container.has-sliding-filter-pill button.filter-pill-btn[data-filter="pending"].active {
    color: #991b1b !important;
}

.filter-pills-container.has-sliding-filter-pill button.filter-pill-btn[data-filter="in_progress"].active {
    color: #92400e !important;
}

.filter-pills-container.has-sliding-filter-pill button.filter-pill-btn[data-filter="delivered"].active {
    color: #065f46 !important;
}

.filter-pills-container button.filter-pill-btn.active i,
.filter-pills-container.has-sliding-filter-pill button.filter-pill-btn.active i {
    color: inherit;
    transform: scale(1.1);
}

.filter-pills-container button.filter-pill-btn.active .status-dot,
.filter-pills-container.has-sliding-filter-pill button.filter-pill-btn.active .status-dot {
    transform: scale(1.2);
}

/* Transición suave de la tabla al cambiar de filtro */
#techTicketsTable {
    width: 100% !important;
    table-layout: auto;
}

#techTicketsTable th,
#techTicketsTable td {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.86rem;
}

#techTicketsTable tbody {
    opacity: 1;
    transform: none;
    transition: opacity 0.18s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

#techTicketsTable tbody.filter-fade-out {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
}

#techTicketsTable tbody.filter-fade-in-start {
    opacity: 0;
    transform: translate3d(0, -5px, 0);
    transition: none !important;
}

button.filter-pill-btn:hover {
    transform: translateY(-1px);
}

.filter-pills-container.has-sliding-filter-pill button.filter-pill-btn.active:hover {
    transform: none !important;
}

button.filter-pill-btn[data-filter="all"]:not(.active):hover {
    color: #9a3412 !important;
    background-color: #ffedd5 !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.32), 0 3px 8px rgba(234, 88, 12, 0.14) !important;
}

button.filter-pill-btn[data-filter="today"]:not(.active):hover {
    color: #1e293b !important;
    background-color: #f1f5f9 !important;
    border-color: #64748b !important;
    box-shadow: 0 0 15px rgba(100, 116, 139, 0.4), 0 3px 8px rgba(71, 85, 105, 0.18) !important;
}

/* Destello brillante y resplandor gris para la tarjeta y botón de Citas de Hoy cuando hay citas programadas */
@keyframes pulseGlowTodayCitas {
    0%, 100% {
        background-color: #ffffff;
        border-color: #cbd5e1;
        box-shadow: 0 4px 14px rgba(100, 116, 139, 0.12);
    }
    45%, 60% {
        background-color: #f1f5f9;
        border-color: #64748b;
        box-shadow: 0 0 24px rgba(100, 116, 139, 0.7), 0 0 10px rgba(71, 85, 105, 0.45);
    }
}

@keyframes pulseGlowTodayBtn {
    0%, 100% {
        background-color: #ffffff;
        border-color: #cbd5e1;
        box-shadow: 0 2px 8px rgba(100, 116, 139, 0.1);
    }
    45%, 60% {
        background-color: #f1f5f9;
        border-color: #64748b;
        box-shadow: 0 0 16px rgba(100, 116, 139, 0.65), 0 0 6px rgba(71, 85, 105, 0.35);
    }
}

.metric-card.filter-pill-btn[data-filter="today"].has-pending-citas {
    animation: pulseGlowTodayCitas 2.2s ease-in-out infinite !important;
}

.metric-card.filter-pill-btn[data-filter="today"].has-pending-citas:hover {
    animation: none !important;
    background-color: #f1f5f9 !important;
    border-color: #64748b !important;
    box-shadow: 0 0 26px rgba(100, 116, 139, 0.8), 0 8px 20px rgba(71, 85, 105, 0.25) !important;
    transform: translateY(-3px);
}

button.filter-pill-btn[data-filter="today"].has-pending-citas:not(.active) {
    animation: pulseGlowTodayBtn 2.2s ease-in-out infinite !important;
}

button.filter-pill-btn[data-filter="today"].has-pending-citas:not(.active):hover {
    animation: none !important;
    background-color: #f1f5f9 !important;
    border-color: #64748b !important;
    box-shadow: 0 0 18px rgba(100, 116, 139, 0.7) !important;
}

button.filter-pill-btn[data-filter="pending"]:not(.active):hover {
    color: #991b1b !important;
    background-color: #fee2e2 !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.32), 0 3px 8px rgba(220, 38, 38, 0.14) !important;
}

button.filter-pill-btn[data-filter="in_progress"]:not(.active):hover {
    color: #92400e !important;
    background-color: #fef3c7 !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.35), 0 3px 8px rgba(217, 119, 6, 0.14) !important;
}

button.filter-pill-btn[data-filter="delivered"]:not(.active):hover {
    color: #065f46 !important;
    background-color: #d1fae5 !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.32), 0 3px 8px rgba(5, 150, 105, 0.14) !important;
}

button.filter-pill-btn:hover .status-dot {
    transform: scale(1.25);
    box-shadow: 0 0 6px currentColor;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#appMainContent {
    opacity: 1;
    transform: none;
    transition: opacity 0.18s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

#appMainContent.spa-fade-out {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
    pointer-events: none;
}

#appMainContent.spa-fade-in-start {
    opacity: 0;
    transform: translate3d(0, -6px, 0);
    transition: none !important;
}

/* Suavizar también el cambio de pestañas internas (Inicio / Agendar Cita / Nosotros) */
.tab-content>.tab-pane.fade {
    transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    transform: translate3d(0, 6px, 0);
}

.tab-content>.tab-pane.fade.show {
    transform: none;
}

/* Estilos de Impresión Tamaño Carta 50% / 50% */
@media print {
    body {
        background: white !important;
        background-image: none !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 11px !important;
    }

    .no-print {
        display: none !important;
    }

    .sheet-container {
        width: 215.9mm !important;
        height: 278.8mm !important;
        max-height: 278.8mm !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        padding: 6mm 8mm !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
        break-inside: avoid !important;
    }

    .half-sheet {
        height: 129.4mm !important;
        max-height: 129.4mm !important;
        box-sizing: border-box !important;
        padding: 8px 12px !important;
        border: 1.5px solid #ea580c !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}

/* ==========================================================================
   11. Clientes Frecuentes & Alertas de Demora (+2 Días)
   ========================================================================== */
.cliente-frecuente-option {
    cursor: pointer;
    transition: background-color 0.15s ease, border-left 0.15s ease;
    border-left: 3px solid transparent;
}

.cliente-frecuente-option:hover,
.cliente-frecuente-option.active {
    background-color: #fff7ed !important;
    border-left: 3px solid #ea580c !important;
}

.row-alerta-demora {
    background-color: rgba(254, 242, 242, 0.45) !important;
}

.row-alerta-demora:hover {
    background-color: rgba(254, 226, 226, 0.7) !important;
}

@keyframes pulseDelay {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.75;
    }
}

.animate-pulse {
    display: inline-block;
    animation: pulseDelay 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}