/**
 * Friendly Japan Tour (FJT) Dashboard — Theme CSS
 * CSS centralizado para el Dashboard. Complementa Tailwind CSS (CDN).
 * 
 * Basado en el theme.css del sistema FJT.
 */

/* =========================================================================
   Variables CSS — Paleta de Colores por Entidad
   ========================================================================= */

:root {
    /* Generales */
    --fjt-bg: #f8fafc;
    /* slate-50 */
    --fjt-card: #ffffff;
    --fjt-text: #1e293b;
    /* slate-800 */
    --fjt-text-muted: #94a3b8;
    /* slate-400 */
    --fjt-border: #f1f5f9;
    /* slate-100 */
    --fjt-border-strong: #e2e8f0;
    /* slate-200 */

    /* Sidebar */
    --fjt-sidebar-bg: #0f172a;
    --fjt-sidebar-dark: #0B1120;

    /* Entidades */
    --fjt-agency-from: #0ea5e9;
    /* sky-500 */
    --fjt-agency-to: #06b6d4;
    /* cyan-500 */
    --fjt-agent-from: #8b5cf6;
    /* violet-500 */
    --fjt-agent-to: #a855f7;
    /* purple-500 */
    --fjt-guide-from: #10b981;
    /* emerald-500 */
    --fjt-guide-to: #14b8a6;
    /* teal-500 */
    --fjt-tour-from: #f59e0b;
    /* amber-500 */
    --fjt-tour-to: #f97316;
    /* orange-500 */

    /* Status */
    --fjt-status-blue: #3b82f6;
    --fjt-status-amber: #f59e0b;
    --fjt-status-emerald: #10b981;
    --fjt-status-purple: #8b5cf6;
    --fjt-status-teal: #14b8a6;
    --fjt-status-red: #ef4444;

    /* Radii */
    --fjt-radius: 0.625rem;
    --fjt-radius-lg: 1rem;
    --fjt-radius-xl: 1.25rem;
}

/* =========================================================================
   Ocultar barra de admin WordPress
   ========================================================================= */

#wpadminbar {
    display: none !important;
}

html {
    margin-top: 0 !important;
}

/* =========================================================================
   Alpine.js — Evitar parpadeo
   ========================================================================= */

[x-cloak] {
    display: none !important;
}

/* =========================================================================
   Base — Tipografía y Scrollbar
   ========================================================================= */

.fjt-dashboard-root,
.fjt-dashboard-root button,
.fjt-dashboard-root input,
.fjt-dashboard-root select,
.fjt-dashboard-root textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fjt-dashboard-root h2.text-2xl {
    font-size: 1.5rem !important;
    /* Restaurado a 2xl original */
}

/* Scrollbar personalizado (Webkit) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =========================================================================
   Sidebar — Link activo con gradiente (Paridad con React Layout.tsx)
   ========================================================================= */

.fjt-nav-link-active {
    background: linear-gradient(to right, var(--fjt-agency-from), var(--fjt-agency-to));
    color: white;
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.25);
}

.fjt-sidebar-collapsed nav button {
    justify-content: center !important;
    /* Centrado para modo colapsado */
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.fjt-sidebar-collapsed nav button i {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* =========================================================================
   Transiciones suaves globales
   ========================================================================= */

.fjt-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================================
   Patrones UI compartidos
   ========================================================================= */

.fjt-filter-bar {
    background: var(--fjt-card);
    border: 1px solid var(--fjt-border);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.fjt-row-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fjt-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hide-scrollbar {
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* =========================================================================
   Tabla — Hover + Scrollbar
   ========================================================================= */

.fjt-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.75rem;
    position: relative;
    /* Sombras de scroll horizontal adaptativas y sutiles */
    background:
        /* Sombra izquierda (blanco a transparente) */
        linear-gradient(to right, #ffffff 30%, rgba(255, 255, 255, 0)),
        /* Sombra derecha (transparente a blanco) */
        linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff 70%) 100% 0,
        /* Sombra real izquierda */
        radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0)),
        /* Sombra real derecha */
        radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0)) 100% 0;
    background-repeat: no-repeat;
    background-color: #ffffff;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

/* Scrollbar específica para tablas para forzar su visibilidad y estilo premium */
.fjt-table-container::-webkit-scrollbar {
    /* height: 6px; */
    /* Grosor ideal para el scroll horizontal en tablas */
}

.fjt-table-container::-webkit-scrollbar-track {
    /* background: #f1f5f9; */
    /* slate-100: pista visible que indica que hay scroll */
    /* border-radius: 9999px; */
    /* border: 2px solid #ffffff; */
    /* Espacio para efecto flotante */
}

.fjt-table-container::-webkit-scrollbar-thumb {
    /* background: #cbd5e1; */
    /* slate-300: tirador visible */
    /* border-radius: 9999px; */
    /* border: 2px solid #ffffff; */
    /* Margen para simular el tirador flotante */
}

.fjt-table-container::-webkit-scrollbar-thumb:hover {
    /* background: #94a3b8; */
    /* slate-400 */
}


/* =========================================================================
   Chart.js — Contenedores responsive
   ========================================================================= */

.fjt-chart-container {
    position: relative;
    width: 100%;
}

/* =========================================================================
   Welcome Banner — Efectos de luz
   ========================================================================= */

.fjt-welcome-banner {
    background: linear-gradient(to right, #0f172a, #1e3a5f, #0e4d6e);
    position: relative;
    overflow: hidden;
}

.fjt-welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 16rem;
    height: 16rem;
    background: #38bdf8;
    border-radius: 50%;
    transform: translate(25%, -50%);
    filter: blur(48px);
    opacity: 0.1;
}

.fjt-welcome-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 33%;
    width: 12rem;
    height: 12rem;
    background: #22d3ee;
    border-radius: 50%;
    transform: translateY(50%);
    filter: blur(48px);
    opacity: 0.1;
}

.fjt-welcome-banner h2 {
    color: white !important;
}

/* .fjt-welcome-banner p {
    color: rgba(255, 255, 255, 0.8) !important;
} */

/* Forzar estilos del TopBar */
.fjt-dashboard-root header {
    background-color: white !important;
    border-bottom: 1px solid #e2e8f0 !important;
}