/*
 |------------------------------------------------------------------
 | 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=Plus+Jakarta+Sans: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: #34d399;
}

.fi-wi-chart-filter select:focus {
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 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(5, 150, 105, 0.1) !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: 'Plus Jakarta Sans', sans-serif !important;
    color: #10b981 !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: 'Plus Jakarta Sans', 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(5, 150, 105, 0.1) !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: #34d399 !important;
}

/* ─── ACTIVE/SELECTED — Bold Indigo Pill ─── */
.fi-sidebar-item-active > a,
.fi-sidebar-item-active > button {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    box-shadow: 0 2px 8px -2px rgba(5, 150, 105, 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: #059669 !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: #059669 !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;
}

/* =========================================================
   === ULTRA-PREMIUM REFINEMENTS (Acreflows CRM)
   ========================================================= */

/* Main Canvas Background */
body, .fi-layout, .fi-main {
    background-color: #F8FAFC !important;
}

/* Topbar Styling */
.fi-topbar {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05) !important;
}

/* Cards & Widgets - Softer shadows, rounded corners, borderless */
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-fo-field-wrp,
.fi-section {
    background-color: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.03) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.04), 0 2px 8px -2px rgba(15, 23, 42, 0.02) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect on Widgets */
.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.06), 0 4px 10px -2px rgba(15, 23, 42, 0.03) !important;
}

/* Input Fields - Premium styling */
.fi-input-wrp {
    border-radius: 8px !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02) !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.2s ease;
}
.fi-input-wrp:focus-within {
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}

/* Primary Action Buttons */
.fi-btn-primary {
    border-radius: 8px !important;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25) !important;
    border: none !important;
    transition: all 0.2s ease;
}
.fi-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35) !important;
}



/* =========================================================
   === EXTRA PREMIUM UI/UX UPGRADES
   ========================================================= */

/* 1. Modern Slim Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(100, 116, 139, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(5, 150, 105, 0.6);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.3) transparent;
}

/* 2. Micro-interactions: Smooth Entry Animations */
@keyframes premiumFadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fi-main {
    animation: premiumFadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 3. Glowing Borders on Hover */
.fi-wi-stats-overview-stat {
    position: relative;
    overflow: hidden;
}
.fi-wi-stats-overview-stat::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0);
    transition: box-shadow 0.4s ease;
    pointer-events: none;
}
.fi-wi-stats-overview-stat:hover::after {
    box-shadow: inset 0 0 0 2px rgba(5, 150, 105, 0.4);
}

/* 4. Sidebar Active Indicator Ribbon */
.fi-sidebar-item-active > a,
.fi-sidebar-item-active > button {
    position: relative;
}
.fi-sidebar-item-active > a::before,
.fi-sidebar-item-active > button::before {
    content: "";
    position: absolute;
    left: -0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background-color: #34d399; /* Bright vibrant green */
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
}

/* 5. Softer, airy table padding (Premium Data Grids) */
.fi-ta-table th {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    background-color: rgba(248, 250, 252, 0.8) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-size: 0.75rem !important;
}
.fi-ta-table td {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* 6. Breadcrumbs restoration - if you want them back, they are often useful in SaaS. 
   Otherwise, keep hidden. We will leave them hidden as per previous rule, but add subtle spacing. */
   
/* 7. Beautiful Focus Rings */
*:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3) !important;
    border-color: #059669 !important;
}

