/* ==========================================================================
   LEXIO — Custom Styles
   Complementa Tailwind CSS. Solo estilos que Tailwind no puede resolver.
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Prevent horizontal overflow on mobile */
body {
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100vw;
}

::selection {
    background: rgba(20, 47, 85, 0.15);
    color: #142f55;
}

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, #142f55 0%, #ee9621 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-light {
    background: linear-gradient(135deg, #627d98 0%, #ee9621 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Hero Gradient --- */
.hero-gradient {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 50%, #fef3c7 100%);
}

.hero-gradient-dark {
    background: linear-gradient(135deg, #0f2340 0%, #142f55 50%, #243b53 100%);
}

/* --- Card Hover --- */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(20, 47, 85, 0.2);
}

/* --- Button Glow --- */
.btn-glow {
    position: relative;
    overflow: hidden;
}
.btn-glow::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(238, 150, 33, 0.4), rgba(20, 47, 85, 0.4));
    border-radius: inherit;
    z-index: -1;
    filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.btn-glow:hover::after {
    opacity: 1;
}

/* --- Float Animation --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.btn-primary {
    background: #142f55;
    color: white;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background: #0f2340;
    box-shadow: 0 0 30px rgba(20, 47, 85, 0.3);
}

.btn-amber {
    background: #ee9621;
    color: white;
    transition: all 0.3s ease;
}
.btn-amber:hover {
    background: #d97706;
    box-shadow: 0 0 30px rgba(238, 150, 33, 0.4);
}

/* --- Verified Badge --- */
.badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
    white-space: nowrap;
}

.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #d97706, #ee9621);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(238, 150, 33, 0.3);
    flex-shrink: 0;
    white-space: nowrap;
}

/* --- Line Clamp --- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Scroll Shadows (dark variant for sidebar) --- */
.scroll-shadow {
    background:
        linear-gradient(#0a1628 30%, rgba(10, 22, 40, 0)),
        linear-gradient(rgba(10, 22, 40, 0), #0a1628 70%) 0 100%,
        radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .15), rgba(0, 0, 0, 0)),
        radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .15), rgba(0, 0, 0, 0)) 0 100%;
    background-repeat: no-repeat;
    background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
    background-attachment: local, local, scroll, scroll;
}

/* --- Sidebar Dashboard --- */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.625rem;
    color: #829ab1;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    transform: translateX(2px);
}
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
}
.sidebar-link.active svg {
    color: #ee9621;
}

/* --- Dashboard Cards --- */
.dash-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    border: 1px solid #f1f5f9;
}
.dash-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.dash-stat {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}
.dash-stat:hover {
    border-color: #ee9621;
    box-shadow: 0 0 0 1px rgba(238, 150, 33, 0.1);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #bcccdc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #829ab1; }

/* --- Pulse Dot (online indicator) --- */
.pulse-dot {
    position: relative;
    display: inline-flex;
    width: 0.5rem;
    height: 0.5rem;
}
.pulse-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: #10b981;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.pulse-dot::after {
    content: '';
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background: #10b981;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* --- Stats Counter Animation --- */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* --- Skeleton Loading --- */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .sidebar-desktop { display: none; }
}
@media (min-width: 1025px) {
    .sidebar-mobile-overlay { display: none; }
}

/* --- Print --- */
@media print {
    .no-print { display: none !important; }
    body { font-size: 12pt; }
}

/* --- Hide Scrollbar (Horizontal scroll areas) --- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
