/*
 |------------------------------------------------------------------
 | admin-panel-overrides.css — global Filament-admin tweaks
 |------------------------------------------------------------------
 |
 | Loaded by app/Providers/Filament/AdminPanelProvider.php via a
 | HEAD_END render hook (<link rel="stylesheet" …>).  All styles here
 | are static.  Per-tenant brand color is delivered via the panel's
 | colors() config (not via inline CSS), and the chart-filter widget
 | uses an embedded SVG via background-image data: URI (not a
 | network-loaded asset).
 */

/* ─── Premium Font Import ─── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ─── Chart-filter widget: strip wrapper border/shadow ─── */
.fi-wi-chart-filter.fi-input-wrp {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    ring: none !important;
    outline: none !important;
    --tw-ring-shadow: none !important;
}

/* ─── Chart-filter widget: style the <select> itself ─── */
.fi-wi-chart-filter select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.625rem center;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    outline: none;
    min-width: 8rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.fi-wi-chart-filter select:hover {
    border-color: #a5b4fc;
}

.fi-wi-chart-filter select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* ─── Logo: NO animation, match sidebar bg ─── */
.fi-logo {
    border-radius: 10px;
    animation: none !important;
    filter: none !important;
    background: transparent !important;
}

/* ─── Logo container: blend with sidebar ─── */
.fi-logo img,
.fi-logo svg {
    background: transparent !important;
}

/* ─── Home Row Icons (top nav icons below logo) — BIGGER ─── */
.fi-topbar-item-icon,
.fi-sidebar-nav > ul:first-child .fi-sidebar-item-icon,
nav.fi-sidebar-nav > div:first-child .fi-sidebar-item-icon,
.fi-sidebar-header-icon,
header .fi-icon-btn svg,
.fi-sidebar-nav .fi-sidebar-group:first-child .fi-sidebar-item-icon {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

/* ─── Tooltips ─── */
.tippy-box {
    max-width: min(92vw, 26rem) !important;
}
.tippy-content {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* High-Density Tables (Reduce Padding/Margins) */
.fi-ta-table th {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}
.fi-ta-table td {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}
.fi-ta-record {
    margin-bottom: 0 !important;
}
.fi-ta-cell {
    padding: 0.25rem 0.5rem !important;
}

/* Custom Top Scrollbar Container */
.custom-top-scrollbar-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    height: 12px;
}
.custom-top-scrollbar-inner {
    height: 12px;
}

/* Global UX Overrides Phase 26 */
/* 1. Hide Breadcrumbs globally */
.fi-breadcrumbs {
    display: none !important;
}

/* 2. Force Horizontal Scrollbar for Tabs (Lead Menu) */
.fi-tabs {
    overflow-x: auto !important;
    padding-bottom: 8px !important;
}
.fi-tabs::-webkit-scrollbar {
    display: block !important;
    height: 8px !important;
}
.fi-tabs::-webkit-scrollbar-track {
    background-color: transparent !important;
}
.fi-tabs::-webkit-scrollbar-thumb {
    background-color: #cbd5e1 !important;
    border-radius: 4px;
}
.dark .fi-tabs::-webkit-scrollbar-thumb {
    background-color: #475569 !important;
}

/* =========================================================
   === PREMIUM SIDEBAR DESIGN
   ========================================================= */

/* Base UI Scaling for Admin Panel (13px) */
html {
    font-size: 13px !important;
}

/* Sidebar Container */
aside.fi-sidebar {
    width: 16rem;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    border-right: 1px solid rgba(99, 102, 241, 0.08) !important;
    box-shadow: 4px 0 24px -6px rgba(0, 0, 0, 0.4), 8px 0 12px -8px rgba(0, 0, 0, 0.25) !important;
}

/* Hide Scrollbar but allow scrolling */
aside.fi-sidebar nav {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    transition: box-shadow 0.3s ease;
}
aside.fi-sidebar nav::-webkit-scrollbar {
    display: none !important;
}
aside.fi-sidebar:hover nav {
    box-shadow: inset 0 -20px 20px -20px rgba(99, 102, 241, 0.2);
}

/* Sidebar Nav Padding */
nav.fi-sidebar-nav {

}
.fi-sidebar-nav, .fi-sidebar-group, .fi-sidebar-item-list {
    gap: 0.15rem !important;
}
.fi-sidebar-nav-groups {
    row-gap: calc(var(--spacing) * 2) !important;
}
.fi-sidebar-group {
    margin-bottom: 0 !important;
}

/* ─── GROUP LABELS (LEADS, TOOLS, ACCOUNT) — Premium Styled ─── */
.fi-sidebar-group-label {
    font-family: 'Poppins', sans-serif !important;
    color: #D9A441 !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.19em !important;
    text-align: left !important;
    margin-top: 1rem !important;
    margin-bottom: 0.35rem !important;
    padding-left: 0.6rem !important;
    padding-bottom: 0.2rem !important;
    border-bottom: 1px solid rgba(129, 140, 248, 0.15) !important;
}

/* ─── SIDEBAR ITEMS — Base State ─── */
.fi-sidebar-item > a, .fi-sidebar-item > button {
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
    min-height: 1.9rem !important;
    border-radius: 0.4rem !important;
    transition: all 0.2s ease;
}
.fi-sidebar-item-label {
    font-family: 'Poppins', sans-serif !important;
    color: #cbd5e1 !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    transition: color 0.2s ease;
}
.fi-sidebar-item-icon {
    color: #64748b !important;
    width: 1.125rem !important;
    height: 1.125rem !important;
    margin-right: 0.5rem !important;
    transition: color 0.2s ease;
}

/* ─── HOVER STATE — Crisp White + Subtle Glow ─── */
.fi-sidebar-item > a:hover,
.fi-sidebar-item > button:hover {
    background-color: rgba(99, 102, 241, 0.08) !important;
}
.fi-sidebar-item > a:hover .fi-sidebar-item-label,
.fi-sidebar-item > button:hover .fi-sidebar-item-label {
    color: #e0e7ff !important;
    font-weight: 600 !important;
}
.fi-sidebar-item > a:hover .fi-sidebar-item-icon,
.fi-sidebar-item > button:hover .fi-sidebar-item-icon {
    color: #a5b4fc !important;
}

/* ─── ACTIVE/SELECTED — Bold Indigo Pill ─── */
.fi-sidebar-item-active > a,
.fi-sidebar-item-active > button {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    box-shadow: 0 2px 8px -2px rgba(99, 102, 241, 0.4) !important;
}
.fi-sidebar-item-active .fi-sidebar-item-label {
    color: #ffffff !important;
    font-weight: 700 !important;
}
.fi-sidebar-item-active .fi-sidebar-item-icon {
    color: #e0e7ff !important;
}

/* ─── User profile section ─── */
.fi-sidebar-user {
    color: #ffffff !important;
}

/* Modal Footer Customizations Phase 52 */
.lh-modal-close-btn {
    margin-left: auto !important;
}
.lh-modal-close-btn:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}
.lh-modal-close-btn:hover * {
    color: #ffffff !important;
}

/* ─── CLUSTER / SUB-NAVIGATION SIDEBAR (white background panel) ─── */
/* The cluster nav (Settings, Integrations, etc.) renders on a white  */
/* background — override the dark-sidebar gray so text is legible.    */
.fi-page-sub-navigation-sidebar-ctn .fi-sidebar-item-label,
.fi-page-sub-navigation-sidebar .fi-sidebar-item-label {
    color: #111827 !important; /* near-black, matches Tailwind gray-900 */
}
.fi-page-sub-navigation-sidebar-ctn .fi-sidebar-item-icon,
.fi-page-sub-navigation-sidebar .fi-sidebar-item-icon {
    color: #4b5563 !important; /* gray-600 — visible on white */
}
/* Hover state inside cluster nav */
.fi-page-sub-navigation-sidebar-ctn .fi-sidebar-item > a:hover .fi-sidebar-item-label,
.fi-page-sub-navigation-sidebar-ctn .fi-sidebar-item > button:hover .fi-sidebar-item-label,
.fi-page-sub-navigation-sidebar .fi-sidebar-item > a:hover .fi-sidebar-item-label,
.fi-page-sub-navigation-sidebar .fi-sidebar-item > button:hover .fi-sidebar-item-label {
    color: #4f46e5 !important; /* indigo on hover — matches primary */
    font-weight: 600 !important;
}
.fi-page-sub-navigation-sidebar-ctn .fi-sidebar-item > a:hover .fi-sidebar-item-icon,
.fi-page-sub-navigation-sidebar-ctn .fi-sidebar-item > button:hover .fi-sidebar-item-icon,
.fi-page-sub-navigation-sidebar .fi-sidebar-item > a:hover .fi-sidebar-item-icon,
.fi-page-sub-navigation-sidebar .fi-sidebar-item > button:hover .fi-sidebar-item-icon {
    color: #4f46e5 !important;
}
/* Active item inside cluster nav — keep indigo highlight */
.fi-page-sub-navigation-sidebar-ctn .fi-sidebar-item-active .fi-sidebar-item-label,
.fi-page-sub-navigation-sidebar .fi-sidebar-item-active .fi-sidebar-item-label {
    color: #ffffff !important;
}
.fi-page-sub-navigation-sidebar-ctn .fi-sidebar-item-active .fi-sidebar-item-icon,
.fi-page-sub-navigation-sidebar .fi-sidebar-item-active .fi-sidebar-item-icon {
    color: #e0e7ff !important;
}