/* ============================================================
   Syncronos PIM — Design System
   ============================================================ */


/* ═══════════════════════════════════════════════════════════
   0. DESIGN TOKENS
   ═══════════════════════════════════════════════════════════ */
:root {
    /* Brand */
    --brand-indigo:  #1C2453;
    --brand-purple:  #4A1E5A;
    --brand-blue:    #5A7CB2;
    --brand-cyan:    #59C7FF;
    --brand-sky:     #8EDFFF;
    --brand-white:   #F4F7FB;
    --brand-silver:  #B8C1CC;
    --brand-ink:     #0B1020;

    /* Surfaces */
    --page-bg:         #F8FAFC;
    --sidebar-bg:      rgba(255, 255, 255, 0.92);
    --topbar-bg:       rgba(255, 255, 255, 0.92);
    --card-bg:         #FFFFFF;
    --card-bg-soft:    #FCFDFF;
    --card-muted:      #F1F5F9;
    --input-bg:        #F8FAFC;
    --table-head-bg:   #F8FAFC;
    --table-row-hover: rgba(236, 254, 255, 0.60);
    --dark-surface:    rgb(14 21 43 / 0.9);

    /* Borders */
    --border:          rgba(226, 232, 240, 1);
    --border-dark:     rgba(255, 255, 255, 0.10);

    /* Shadows */
    --shadow-soft:     0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-hover:    0 18px 40px rgba(15, 23, 42, 0.12);
    --shadow-panel:    0 24px 60px rgba(15, 23, 42, 0.18);
    --shadow-glow:     0 0 0 1px rgba(89, 199, 255, 0.18), 0 10px 30px rgba(89, 199, 255, 0.12);

    /* Focus ring */
    --focus-ring:      0 0 0 4px rgba(103, 232, 249, 0.15);
    --focus-border:    #67E8F9;

    /* Gradient */
    --hero-gradient:   linear-gradient(135deg, #1C2453 0%, #4A1E5A 55%, #5A7CB2 100%);

    /* Text */
    --t-primary:       #0F172A;
    --t-secondary:     #475569;
    --t-tertiary:      #94A3B8;
    --t-muted:         #CBD5E1;

    /* Radius scale (standard for all elements)
       xs = checkboxes, small controls
       sm = badges, tags, small buttons
       md = inputs, dropdown items, tooltips
       lg = cards, sections, modals, dropdowns
       full = pills, avatars
    */
    --r-xs:   0.1875rem; /* 3px  */
    --r-sm:   0.25rem;   /* 4px  */
    --r-md:   0.5rem;    /* 8px  — inputs, nav items, dropdown items */
    --r-lg:   0.75rem;   /* 12px — dropdowns, tabs wrapper */
    --r-card: 0.875rem;  /* 14px — cards, stat cards, table wrapper */
    --r-xl:   1rem;      /* 16px — sections, modals */
    --r-full: 9999px;    /* pills, badges */

    /* Transition */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
    --page-bg:         #0B1020;
    --sidebar-bg:      rgb(14 21 43 / 0.9);
    --topbar-bg:       rgb(14 21 43 / 0.9);
    --card-bg:         rgba(255, 255, 255, 0.05);
    --card-bg-soft:    rgba(255, 255, 255, 0.03);
    --card-muted:      rgba(255, 255, 255, 0.04);
    --input-bg:        rgba(255, 255, 255, 0.05);
    --table-head-bg:   rgba(255, 255, 255, 0.05);
    --table-row-hover: rgba(255, 255, 255, 0.05);
    --dark-surface:    rgb(14 21 43 / 0.9);

    --border:          rgba(255, 255, 255, 0.10);
    --border-dark:     rgba(255, 255, 255, 0.10);

    --shadow-soft:     0 20px 40px rgba(0, 0, 0, 0.35);
    --shadow-hover:    0 24px 50px rgba(0, 0, 0, 0.45);
    --shadow-panel:    0 24px 60px rgba(0, 0, 0, 0.45);

    --focus-ring:      0 0 0 4px rgba(89, 199, 255, 0.10);
    --focus-border:    rgba(89, 199, 255, 0.40);

    --t-primary:       #F1F5F9;
    --t-secondary:     #CBD5E1;
    --t-tertiary:      #64748B;
    --t-muted:         #334155;

    --a-brand:         #8EDFFF;
}


/* ═══════════════════════════════════════════════════════════
   1. GLOBAL
   ═══════════════════════════════════════════════════════════ */
html { scroll-behavior: smooth; }

.fi-body {
    background: var(--page-bg) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--brand-blue), var(--brand-cyan));
}
::-webkit-scrollbar-track {
    background: transparent;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}
.dark ::-webkit-scrollbar-track {
    border-left-color: rgba(255, 255, 255, 0.1);
}


/* ═══════════════════════════════════════════════════════════
   2. LAYOUT SHELL
   ═══════════════════════════════════════════════════════════ */
.fi-main-ctn {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}
.fi-main-ctn > .fi-topbar { flex-shrink: 0 !important; }
.fi-main-ctn > .fi-main {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    background: var(--page-bg) !important;
    padding-bottom: 2.25rem !important;
}


/* ═══════════════════════════════════════════════════════════
   3. SIDEBAR
   ═══════════════════════════════════════════════════════════ */
.fi-sidebar {
    border-right: 1px solid var(--border) !important;
    background: var(--sidebar-bg) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
}
.fi-sidebar-header {
    background: var(--sidebar-bg) !important;
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    --tw-ring-shadow: none !important;
    --tw-shadow: none !important;
    box-shadow: none !important;
    justify-content: center !important;
}
.fi-sidebar-header a,
.fi-sidebar-header > a {
    justify-content: center !important;
    display: flex !important;
}
.dark .fi-sidebar-header {
    background: transparent !important;
}

/* Nav container */
.fi-sidebar-nav { padding: 0.5rem !important; margin: 0 !important; }
.fi-sidebar-nav-groups { padding: 0 !important; margin: 0 !important; gap: 0 !important; }

/* Groups */
.fi-sidebar-nav .fi-sidebar-group { padding: 0 !important; margin: 0 !important; gap: 0 !important; }
.fi-sidebar-nav .fi-sidebar-group + .fi-sidebar-group { margin-top: 1rem !important; }
.fi-sidebar-nav .fi-sidebar-group > div,
.fi-sidebar-nav .fi-sidebar-group-items { padding: 0 !important; margin: 0 !important; gap: 1px !important; }

/* Group labels */
.fi-sidebar-nav .fi-sidebar-group-label {
    padding: 0.25rem 0.75rem !important;
    margin: 0 !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.24em !important;
    color: var(--t-tertiary) !important;
}

/* Nav items */
.fi-sidebar-nav .fi-sidebar-item { margin: 0 !important; }
.fi-sidebar-nav .fi-sidebar-item a {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.4rem 1rem !important;
    font-weight: 400 !important;
    font-size: 0.875rem !important;
    border-radius: var(--r-md) !important;
    transition: all 0.15s var(--ease) !important;
    position: relative;
    color: var(--t-secondary) !important;
}
.fi-sidebar-nav .fi-sidebar-item a span { font-weight: 400 !important; font-size: 0.875rem !important; }
.fi-sidebar-nav .fi-sidebar-item a:hover { background: var(--card-muted) !important; color: var(--t-primary) !important; }
.dark .fi-sidebar-nav .fi-sidebar-item a:hover { background: rgba(255, 255, 255, 0.05) !important; }

/* Active item */
.fi-sidebar-nav .fi-sidebar-item-active a,
.fi-sidebar-nav .fi-sidebar-item a[aria-current="page"] {
    background: #E2E8F0 !important;
    color: var(--t-primary) !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}
.dark .fi-sidebar-nav .fi-sidebar-item-active a,
.dark .fi-sidebar-nav .fi-sidebar-item a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
}

/* Active icon — cyan accent */
.fi-sidebar-nav .fi-sidebar-item-active a svg,
.fi-sidebar-nav .fi-sidebar-item a[aria-current="page"] svg {
    color: var(--brand-cyan) !important;
    opacity: 1 !important;
}

/* Icons */
.fi-sidebar-nav .fi-sidebar-item svg,
.fi-sidebar-nav .fi-sidebar-item a svg,
.fi-sidebar-nav .fi-sidebar-item .fi-sidebar-item-icon {
    width: 1.25rem !important;
    height: 1.25rem !important;
    min-width: 1.25rem !important;
    min-height: 1.25rem !important;
    color: var(--t-tertiary) !important;
    transition: color 0.15s var(--ease) !important;
}
.fi-sidebar-nav .fi-sidebar-item a:hover svg { color: var(--t-primary) !important; }

/* Hide sidebar collapse buttons */
.fi-sidebar-close-btn,
.fi-sidebar-open-btn { display: none !important; }

/* Sticky theads in our custom tables need an OPAQUE background or rows
   bleed through when scrolling. --sidebar-bg uses rgba with alpha. */
table.fi-suppliers-table > thead {
    background: #ffffff !important;
}
.dark table.fi-suppliers-table > thead {
    background: #0B1020 !important;
}

@media (min-width: 1024px) {
    .fi-topbar-open-sidebar-btn,
    .fi-topbar-close-sidebar-btn { display: none !important; }
}


/* ═══════════════════════════════════════════════════════════
   4. TOPBAR
   ═══════════════════════════════════════════════════════════ */
.fi-topbar-ctn { background: var(--topbar-bg) !important; }
.fi-topbar-collapse-sidebar-btn-ctn,
.fi-topbar-open-collapse-sidebar-btn,
.fi-topbar-close-collapse-sidebar-btn,
.fi-topbar-open-sidebar-btn,
.fi-topbar-close-sidebar-btn { display: none !important; }
.fi-topbar {
    z-index: 30 !important;
    border-bottom: 1px solid var(--border) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    background: var(--topbar-bg) !important;
}
.fi-topbar-nav {
    border-bottom: 1px solid var(--border) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    background: var(--topbar-bg) !important;
}

/* Topbar icon buttons */
.v1-topbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--r-sm);
    color: var(--t-tertiary);
    transition: all 0.15s var(--ease);
    cursor: pointer;
    background: transparent;
    border: none;
    opacity: 0.75;
}
.v1-topbar-btn:hover { color: var(--t-primary); background: var(--card-muted); opacity: 1; }
.dark .v1-topbar-btn:hover { background: rgba(255, 255, 255, 0.06); }
.v1-topbar-btn:active { transform: scale(0.92); }
.v1-topbar-btn svg { stroke-width: 1; }

/* Unify all topbar icon colors (notifications, user menu) — exclude AI which has its own */
.fi-topbar .fi-icon-btn { color: var(--t-tertiary) !important; opacity: 0.75; }
.fi-topbar .fi-icon-btn:hover { color: var(--t-primary) !important; opacity: 1; }
.fi-topbar .fi-icon-btn svg { stroke-width: 1; }

/* Topbar separator */
.v1-topbar-sep { width: 1px; align-self: stretch; margin: 0.25rem 0; background: var(--border); }


/* ═══════════════════════════════════════════════════════════
   5. PAGE HEADER
   ═══════════════════════════════════════════════════════════ */
.fi-header .fi-header-heading,
.fi-header .fi-breadcrumbs,
.fi-header .fi-header-subheading { display: none !important; }
.fi-header {
    padding-top: 0.5rem !important;
    padding-bottom: 0 !important;
    min-height: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
}
.fi-header-actions { margin-left: auto !important; }


/* ═══════════════════════════════════════════════════════════
   6. FOOTERS
   ═══════════════════════════════════════════════════════════ */
.fi-main-footer,
.fi-sidebar-footer {
    background: var(--sidebar-bg) !important;
    height: 2.25rem !important;
    min-height: 2.25rem !important;
    max-height: 2.25rem !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}
.fi-main-footer {
    border-top: 1px solid var(--border) !important;
    position: fixed !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0;
    z-index: 20 !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}
.fi-sidebar-footer { border-top: 1px solid var(--border) !important; }
.dark .fi-main-footer,
.dark .fi-sidebar-footer { background: var(--sidebar-bg) !important; }


/* ═══════════════════════════════════════════════════════════
   7. CARDS / SECTIONS
   ═══════════════════════════════════════════════════════════ */
.fi-in-entry-label { color: var(--t-tertiary) !important; font-weight: 500 !important; font-size: 0.75rem !important; letter-spacing: 0.04em !important; text-transform: uppercase !important; }

.fi-section,
.fi-tabs.fi-contained,
.fi-wi-stats-overview-stat,
.fi-wi-chart {
    background: var(--card-bg) !important;
    border-radius: var(--r-xl) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-soft) !important;
    transition: all 0.2s var(--ease) !important;
}
.fi-section-header { border-bottom: 1px solid var(--border) !important; }
.fi-section-heading-title { font-weight: 600 !important; }


/* ═══════════════════════════════════════════════════════════
   8. STAT CARDS (KPI)
   ═══════════════════════════════════════════════════════════ */
.syncronos-stat-card {
    background:
        radial-gradient(circle at top right, rgba(142, 223, 255, 0.10), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-card) !important;
    box-shadow: var(--shadow-soft) !important;
    padding: 1.25rem !important;
    transition: all 0.2s var(--ease) !important;
    position: relative;
    overflow: hidden;
}
.syncronos-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover) !important;
}
.syncronos-stat-card:active {
    transform: translateY(0) scale(0.995) !important;
}
.dark .syncronos-stat-card {
    background: var(--card-bg) !important;
    border-color: var(--border) !important;
    box-shadow: var(--shadow-soft) !important;
}
.dark .syncronos-stat-card:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    box-shadow: var(--shadow-hover) !important;
}


/* ═══════════════════════════════════════════════════════════
   9. TABLES
   ═══════════════════════════════════════════════════════════ */
.fi-ta-ctn {
    background: var(--card-bg) !important;
    border-radius: var(--r-card) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-soft) !important;
    overflow: hidden !important;
    transition: all 0.2s var(--ease) !important;
}
.fi-ta-content { overflow-x: visible !important; overflow-y: visible !important; }

/* Tables: keep Filament's standard sizing/padding — only override
   colors (header/bg/text) and body font-weight (lighter for readability). */
.fi-ta-header-cell {
    color: var(--t-secondary) !important;
    background: var(--table-head-bg) !important;
}

.fi-ta-cell, .fi-ta-cell * {
    font-weight: 300 !important;
    font-size: 0.8rem !important;
}

.fi-ta-row td {
    border-top: 1px solid var(--border) !important;
}
.fi-ta-row { transition: background-color 0.12s var(--ease) !important; }
.fi-ta-row:hover td { background: var(--table-row-hover) !important; }

/* Table toolbar */
[class*="fi-ta-header-toolbar"] { justify-content: space-between !important; padding: 0.75rem 1rem !important; gap: 1rem !important; }
[class*="fi-ta-header-toolbar"] > div { margin-inline-start: 0 !important; }
[class*="fi-ta-header-toolbar"] > div:last-child { margin-inline-start: auto !important; }

/* Table header actions — keep on left (remove ms-auto) */
.fi-ta-header .fi-ta-actions { margin-inline-start: 0 !important; }

.fi-ta-search-field { width: 100% !important; max-width: 32rem !important; }
.fi-ta-search-field .fi-input-wrp {
    border-radius: var(--r-md) !important;
    background: var(--input-bg) !important;
    border-color: var(--border) !important;
}
.fi-ta-search-field .fi-input-wrp:focus-within {
    box-shadow: var(--focus-ring) !important;
    border-color: var(--focus-border) !important;
}

.fi-ta-empty-state { padding: 3rem 1rem !important; }
.fi-ta-empty-state-icon { color: var(--t-muted) !important; }
.fi-ta-actions { gap: 0.25rem !important; }
.fi-ta-actions-header-cell { text-align: center !important; }
.fi-ta-pagination { border-top: 1px solid var(--border) !important; padding: 0.5rem 1rem !important; }
.fi-ta-filters { border-radius: var(--r-lg) !important; border: 1px solid var(--border) !important; background: var(--card-bg) !important; box-shadow: var(--shadow-panel) !important; }
.fi-ta-active-filters-indicator { border-radius: var(--r-md) !important; }

/* Table row selection */
.fi-ta-row-selected td { background: rgba(89, 199, 255, 0.08) !important; }
.dark .fi-ta-row-selected td { background: rgba(89, 199, 255, 0.06) !important; }


/* ═══════════════════════════════════════════════════════════
   10. BADGES
   ═══════════════════════════════════════════════════════════ */
.fi-badge {
    font-size: 0.6rem !important;
    padding: 0.1rem 0.45rem !important;
    min-height: auto !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    border-radius: var(--r-full) !important;
}


/* ═══════════════════════════════════════════════════════════
   11. FORMS & INPUTS
   ═══════════════════════════════════════════════════════════ */
.fi-input-wrp {
    border-radius: var(--r-md) !important;
    transition: all 0.15s var(--ease) !important;
    border-color: var(--border) !important;
    background: var(--input-bg) !important;
}
.fi-input-wrp input,
.fi-input-wrp textarea { background: transparent !important; }
.fi-input-wrp:focus-within {
    border-color: var(--focus-border) !important;
    box-shadow: var(--focus-ring) !important;
}

.fi-select-wrp { border-radius: var(--r-md) !important; }
.fi-select-wrp:focus-within { border-color: var(--focus-border) !important; box-shadow: var(--focus-ring) !important; }

.fi-checkbox-input { border-radius: var(--r-xs) !important; border-color: var(--border) !important; transition: all 0.15s var(--ease) !important; }
.fi-checkbox-input:checked { background: var(--hero-gradient) !important; border-color: transparent !important; }

.fi-toggle-input:checked { background: var(--brand-cyan) !important; }
.fi-radio-input:checked { border-color: var(--brand-cyan) !important; color: var(--brand-cyan) !important; }

.fi-fo-section { border-radius: var(--r-xl) !important; }
.fi-fo-fieldset { border-color: var(--border) !important; border-radius: var(--r-lg) !important; }

.fi-date-time-picker-panel,
.fi-color-picker-panel {
    border-radius: var(--r-lg) !important;
    border: 1px solid var(--border) !important;
    background: var(--card-bg) !important;
    box-shadow: var(--shadow-panel) !important;
}

.fi-tags-input-tag { border-radius: var(--r-full) !important; }


/* ═══════════════════════════════════════════════════════════
   12. DROPDOWNS
   ═══════════════════════════════════════════════════════════ */
.fi-dropdown-panel {
    border-radius: var(--r-lg) !important;
    border: 1px solid var(--border) !important;
    background: var(--card-bg) !important;
    box-shadow: var(--shadow-panel) !important;
    overflow: hidden !important;
    padding: 0.5rem !important;
}
.dark .fi-dropdown-panel { background: #11182b !important; }

.fi-dropdown-list-item { border-radius: var(--r-md) !important; transition: all 0.1s var(--ease) !important; }
.fi-dropdown-list-item:hover { background: var(--card-muted) !important; }
.dark .fi-dropdown-list-item:hover { background: rgba(255, 255, 255, 0.10) !important; }
.fi-dropdown-list-item:active { transform: scale(0.98); }


/* ═══════════════════════════════════════════════════════════
   13. MODALS
   ═══════════════════════════════════════════════════════════ */
[x-ref="modalContainer"] .fi-modal-window {
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-xl) !important;
    overflow: hidden !important;
    --tw-ring-shadow: none !important;
    box-shadow: var(--shadow-panel) !important;
}
[x-ref="modalContainer"] .fi-modal-content { background: var(--card-bg) !important; }
[x-ref="modalContainer"] .fi-modal-header { background: transparent !important; border-bottom: none !important; padding: 1.25rem 1.5rem !important; }
[x-ref="modalContainer"] .fi-modal-footer { background: transparent !important; border-top: none !important; padding: 1rem 1.5rem !important; }
.dark [x-ref="modalContainer"] .fi-modal-window { background: #11182b !important; backdrop-filter: blur(20px); }

/* Slide-over panels — no radius */
[x-ref="modalContainer"] .fi-modal-slide-over-window { border-radius: 0 !important; }

/* Modal tabs */
.fi-modal .fi-fo-tabs-tab.fi-active { min-height: 400px !important; overflow-y: auto !important; }
.fi-modal .fi-tabs-nav { display: flex !important; }
.fi-modal .fi-tabs-item { flex: 1 1 0 !important; justify-content: center !important; }
.fi-modal .fi-tabs.fi-contained { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.fi-fo-tabs-tab.fi-active { background: var(--card-bg) !important; }


/* ═══════════════════════════════════════════════════════════
   14. TOOLTIPS
   ═══════════════════════════════════════════════════════════ */
.tippy-box {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: var(--t-primary) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-soft) !important;
    border-radius: var(--r-sm) !important;
    font-size: 0.75rem !important;
    font-weight: 400 !important;
}
.dark .tippy-box {
    background: rgba(14, 21, 43, 0.8) !important;
}
.tippy-box[data-theme~=light] { background: rgba(255, 255, 255, 0.8) !important; }
.dark .tippy-box[data-theme~=light] { background: rgba(14, 21, 43, 0.8) !important; }
.tippy-box > .tippy-arrow::before { border-top-color: rgba(255, 255, 255, 0.8) !important; }
.dark .tippy-box > .tippy-arrow::before { border-top-color: rgba(14, 21, 43, 0.8) !important; }
.tippy-box[data-placement^=bottom] > .tippy-arrow::before { border-bottom-color: rgba(255, 255, 255, 0.8) !important; }
.dark .tippy-box[data-placement^=bottom] > .tippy-arrow::before { border-bottom-color: rgba(14, 21, 43, 0.8) !important; }
.tippy-box[data-placement^=left] > .tippy-arrow::before { border-left-color: rgba(255, 255, 255, 0.8) !important; }
.dark .tippy-box[data-placement^=left] > .tippy-arrow::before { border-left-color: rgba(14, 21, 43, 0.8) !important; }
.tippy-box[data-placement^=right] > .tippy-arrow::before { border-right-color: rgba(255, 255, 255, 0.8) !important; }
.dark .tippy-box[data-placement^=right] > .tippy-arrow::before { border-right-color: rgba(14, 21, 43, 0.8) !important; }
.tippy-box .tippy-content { padding: 0.35rem 0.6rem !important; }


/* ═══════════════════════════════════════════════════════════
   15. NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */
.fi-notification { bottom: 0 !important; top: auto !important; right: 0 !important; }
.fi-notification-ctn .fi-notification {
    border-radius: var(--r-card) !important;
    border: 1px solid var(--border) !important;
    background: var(--card-bg) !important;
    box-shadow: var(--shadow-panel) !important;
}
.dark .fi-notification-ctn .fi-notification { background: #11182b !important; backdrop-filter: blur(16px); }


/* ═══════════════════════════════════════════════════════════
   16. PAGINATION
   ═══════════════════════════════════════════════════════════ */
.fi-pagination nav > span > span:not(:first-child):not(:last-child) { display: none !important; }


/* ═══════════════════════════════════════════════════════════
   17. BUTTONS
   ═══════════════════════════════════════════════════════════ */
.fi-btn { transition: all 0.15s var(--ease) !important; }
.fi-btn:active { transform: scale(0.97) !important; }

.fi-ac-action, .fi-ac-grouped-action { transition: all 0.1s var(--ease) !important; }
.fi-ac-action:hover, .fi-ac-grouped-action:hover { background: rgba(89, 199, 255, 0.06) !important; border-radius: var(--r-sm) !important; }


/* ═══════════════════════════════════════════════════════════
   18. TABS
   ═══════════════════════════════════════════════════════════ */
.fi-tabs-nav { border-bottom: 1px solid var(--border) !important; width: 100% !important; }

/* Active tab item */
.fi-tabs-item.fi-active {
    background: var(--hero-gradient) !important;
    color: #ffffff !important;
    border-radius: var(--r-md) !important;
    box-shadow: 0 10px 24px rgba(28, 36, 83, 0.22);
}
.fi-tabs-item.fi-active * {
    color: #ffffff !important;
}

/* Inactive tab item */
.fi-tabs-item:not(.fi-active) {
    color: var(--t-secondary) !important;
    border-radius: var(--r-md) !important;
    transition: all 0.15s var(--ease) !important;
}
.fi-tabs-item:not(.fi-active):hover {
    background: var(--card-muted) !important;
    color: var(--t-primary) !important;
}

/* Widget tab pills */
.syncronos-tab-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--r-md);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.15s var(--ease);
    cursor: pointer;
    border: none;
    color: var(--t-secondary);
    background: transparent;
}
.syncronos-tab-pill:hover { color: var(--t-primary); background: var(--card-muted); }
.dark .syncronos-tab-pill:hover { background: rgba(255, 255, 255, 0.06); }
.syncronos-tab-pill.active {
    color: #ffffff !important;
    background: var(--hero-gradient) !important;
    box-shadow: 0 10px 24px rgba(28, 36, 83, 0.22);
}


/* ═══════════════════════════════════════════════════════════
   19. PROGRESS BARS
   ═══════════════════════════════════════════════════════════ */
.syncronos-progress-track { height: 4px; width: 100%; border-radius: 2px; background: var(--card-muted); overflow: hidden; margin-top: 0.5rem; }
.syncronos-progress-fill { height: 100%; border-radius: 2px; transition: width 0.5s var(--ease); }


/* ═══════════════════════════════════════════════════════════
   20. LOADING SPINNER
   ═══════════════════════════════════════════════════════════ */
.syncronos-loading-overlay {
    position: fixed !important; inset: 0 !important; z-index: 99999 !important;
    background: rgba(11, 16, 32, 0.3) !important; backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
}
.syncronos-loading-overlay .spinner {
    width: 3.5rem; height: 3.5rem;
    border: 3px solid rgba(89, 199, 255, 0.15);
    border-top-color: var(--brand-cyan);
    border-radius: 50%;
    animation: syncronos-spin 0.7s linear infinite;
}
@keyframes syncronos-spin { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════════════════
   21. SIDEBAR FAVORITES
   ═══════════════════════════════════════════════════════════ */
.fav-star-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 2px; opacity: 0; transition: opacity 0.15s var(--ease); z-index: 10; line-height: 0; }
.fav-star-toggle svg { width: 14px; height: 14px; display: block; }
.fav-star-toggle .fav-s-filled { display: none; color: #FFD700; }
.fav-star-toggle .fav-s-filled svg { fill: #FFD700 !important; color: #FFD700 !important; }
.fav-star-toggle .fav-s-outline { display: block; color: var(--t-muted); }
.fav-star-toggle .fav-s-outline svg { fill: currentColor !important; }
.fav-star-toggle:hover .fav-s-outline { color: #FFD700; }
.fav-star-toggle:hover .fav-s-outline svg { fill: #FFD700 !important; }
.fav-star-toggle.is-fav { opacity: 1; }
.fav-star-toggle.is-fav .fav-s-filled { display: block; }
.fav-star-toggle.is-fav .fav-s-outline { display: none; }
.fi-sidebar-item:hover .fav-star-toggle { opacity: 1; }
.fi-sidebar-item a { position: relative; }


/* ═══════════════════════════════════════════════════════════
   22. AI CHAT WIDGET
   ═══════════════════════════════════════════════════════════ */
.ai-chat-window { width: 380px; height: 480px; background: var(--card-bg); border-radius: var(--r-lg); box-shadow: var(--shadow-panel); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); }
.ai-chat-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--hero-gradient); flex-shrink: 0; }
.ai-chat-close { color: rgba(255, 255, 255, 0.7); background: none; border: none; cursor: pointer; padding: 2px; border-radius: 4px; transition: color 0.15s var(--ease), background 0.15s var(--ease); }
.ai-chat-close:hover { color: white; background: rgba(255, 255, 255, 0.15); }
.ai-chat-body { flex: 1; overflow-y: auto; padding: 12px; min-height: 0; }
.ai-chat-input { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); flex-shrink: 0; }
.ai-chat-input-field { flex: 1; border: 1px solid var(--border); border-radius: var(--r-md); padding: 6px 12px; font-size: 0.8rem; outline: none; background: var(--input-bg); color: inherit; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.ai-chat-input-field:focus { border-color: var(--focus-border); box-shadow: var(--focus-ring); }
.ai-chat-send { background: var(--hero-gradient); color: white; border: none; border-radius: var(--r-md); padding: 6px 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity 0.15s var(--ease); box-shadow: var(--shadow-glow); }
.ai-chat-send:hover { opacity: 0.9; }
.ai-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

.ai-chat-modal { position: fixed !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; width: 820px; height: 480px; z-index: 9999; }

/* AI prompt boxes */
.ai-prompt-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--card-muted); color: var(--t-secondary); font-size: 0.75rem; text-align: left; cursor: pointer; transition: all 0.15s var(--ease); line-height: 1.3; }
.ai-prompt-box:hover { background: rgba(89, 199, 255, 0.06); border-color: rgba(89, 199, 255, 0.2); color: var(--a-brand); }
.ai-prompt-icon { font-size: 1rem; flex-shrink: 0; }
.ai-prompt-square { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1 / 1; padding: 10px 6px; border-radius: var(--r-md); border: 1px solid rgba(89, 199, 255, 0.10); background: linear-gradient(145deg, rgba(89, 199, 255, 0.04), rgba(74, 30, 90, 0.02)); color: var(--t-secondary); text-align: center; cursor: pointer; transition: all 0.2s var(--ease); line-height: 1.2; }
.ai-prompt-square:hover { background: linear-gradient(145deg, rgba(89, 199, 255, 0.1), rgba(74, 30, 90, 0.06)); border-color: rgba(89, 199, 255, 0.3); color: var(--a-brand); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(89, 199, 255, 0.1); }
.ai-prompt-square-icon { font-size: 1.25rem; }
.ai-prompt-square-text { font-size: 0.65rem; line-height: 1.25; font-weight: 500; }


/* ═══════════════════════════════════════════════════════════
   23. USER PREFERENCES MODAL
   ═══════════════════════════════════════════════════════════ */
.user-prefs-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 420px; background: var(--card-bg); border-radius: var(--r-xl); box-shadow: var(--shadow-panel); display: flex; flex-direction: column; overflow: hidden; z-index: 9999; border: 1px solid var(--border); }
.user-prefs-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.user-prefs-modal-close { color: var(--t-tertiary); background: none; border: none; cursor: pointer; padding: 4px; border-radius: var(--r-xs); transition: all 0.15s var(--ease); }
.user-prefs-modal-close:hover { color: var(--t-primary); background: var(--card-muted); }
.user-prefs-modal-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.user-prefs-group { display: flex; flex-direction: column; gap: 4px; }
.user-prefs-label { font-size: 0.75rem; font-weight: 500; color: var(--t-tertiary); }
.user-prefs-select { width: 100%; height: 2.75rem; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--r-md); font-size: 0.8rem; background: var(--input-bg); color: inherit; outline: none; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); cursor: pointer; }
.user-prefs-select:focus { border-color: var(--focus-border); box-shadow: var(--focus-ring); }
.user-prefs-modal-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.user-prefs-save-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.6rem 1.25rem; background: var(--hero-gradient); color: white; border: none; border-radius: var(--r-md); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: opacity 0.15s var(--ease); box-shadow: var(--shadow-glow); }
.user-prefs-save-btn:hover { opacity: 0.9; }
.user-prefs-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }


/* ═══════════════════════════════════════════════════════════
   24. SUPPLIER CARDS
   ═══════════════════════════════════════════════════════════ */
.supplier-cards-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; padding: 1rem; }
.supplier-card-stats { display: flex; flex-direction: column; gap: 2px; font-size: 0.7rem; line-height: 1.3; color: var(--t-tertiary); margin-bottom: 0.375rem; }
.supplier-card-stats .font-medium { font-weight: 500; }
.toggle-right { margin-left: auto !important; }


/* ═══════════════════════════════════════════════════════════
   25. REUSABLE UTILITY CLASSES
   ═══════════════════════════════════════════════════════════ */
.v1-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 1.5rem 2rem; color: white; background: var(--hero-gradient); box-shadow: var(--shadow-soft); }
.v1-hero-grid { background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 26px 26px; }
.v1-gradient-orb-cyan { position: absolute; border-radius: var(--r-full); filter: blur(48px); background: rgba(89, 199, 255, 0.24); }
.v1-gradient-orb-purple { position: absolute; border-radius: var(--r-full); filter: blur(48px); background: rgba(168, 85, 247, 0.18); }
.v1-icon-box { display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); padding: 0.6rem; }
.v1-section-eyebrow { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.28em; color: var(--t-tertiary); }

/* Badge variants */
.v1-badge { display: inline-flex; align-items: center; border-radius: var(--r-full); padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600; }
.v1-badge-info { background: rgba(89, 199, 255, 0.12); color: #0e7490; }
.dark .v1-badge-info { background: rgba(89, 199, 255, 0.15); color: #67e8f9; }
.v1-badge-success { background: rgba(16, 185, 129, 0.12); color: #047857; }
.dark .v1-badge-success { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
.v1-badge-warning { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.dark .v1-badge-warning { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }
.v1-badge-danger { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.dark .v1-badge-danger { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.v1-badge-neutral { background: rgba(148, 163, 184, 0.15); color: var(--t-secondary); }
.dark .v1-badge-neutral { background: rgba(255, 255, 255, 0.10); }

/* Button variants */
.v1-button-primary { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); padding: 0.75rem 1.25rem; font-size: 0.875rem; font-weight: 600; color: white; background: var(--hero-gradient); box-shadow: var(--shadow-glow); border: none; cursor: pointer; transition: all 0.15s var(--ease); }
.v1-button-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.v1-button-secondary { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); padding: 0.75rem 1.25rem; font-size: 0.875rem; font-weight: 600; color: var(--t-primary); background: var(--card-bg); border: 1px solid var(--border); cursor: pointer; transition: all 0.15s var(--ease); }
.v1-button-secondary:hover { background: var(--card-muted); }

/* Standalone input */
.v1-input { height: 2.75rem; border-radius: var(--r-md); border: 1px solid var(--border); padding: 0 1rem; font-size: 0.875rem; outline: none; background: var(--input-bg); color: var(--t-primary); transition: all 0.15s var(--ease); }
.v1-input:focus { box-shadow: var(--focus-ring); border-color: var(--focus-border); }

/* Standalone card */
.v1-card { border-radius: var(--r-xl); border: 1px solid var(--border); padding: 1.5rem; background: var(--card-bg); box-shadow: var(--shadow-soft); transition: all 0.2s var(--ease); }
.v1-card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.v1-card-muted { border-radius: var(--r-lg); padding: 1rem; background: var(--card-muted); }

/* Standalone table */
.v1-table-wrap { overflow: hidden; border-radius: var(--r-card); border: 1px solid var(--border); background: var(--card-bg); box-shadow: var(--shadow-soft); }
.v1-table thead { color: var(--t-tertiary); background: var(--table-head-bg); }
.v1-table th { padding: 1rem 1.25rem; text-align: left; font-size: 0.875rem; font-weight: 600; }
.v1-table td { padding: 1rem 1.25rem; font-size: 0.875rem; }
.v1-table tbody tr { transition: background-color 0.12s var(--ease); border-top: 1px solid var(--border); }
.v1-table tbody tr:hover { background: var(--table-row-hover); }

/* Standalone tabs */
.v1-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; border-radius: var(--r-lg); border: 1px solid var(--border); padding: 0.5rem; background: var(--card-bg); box-shadow: var(--shadow-soft); }
.v1-tab { border-radius: var(--r-md); padding: 0.625rem 1rem; font-size: 0.875rem; font-weight: 600; color: var(--t-secondary); cursor: pointer; transition: all 0.15s var(--ease); background: transparent; border: none; }
.v1-tab:hover { background: var(--card-muted); color: var(--t-primary); }
.dark .v1-tab:hover { background: rgba(255, 255, 255, 0.06); }
.v1-tab-active { color: white !important; background: var(--hero-gradient) !important; box-shadow: 0 10px 24px rgba(28, 36, 83, 0.22); }


/* ═══════════════════════════════════════════════════════════
   26. FOCUS & INTERACTION STATES
   ═══════════════════════════════════════════════════════════ */
*:focus-visible { outline: none !important; box-shadow: 0 0 0 2px var(--page-bg), 0 0 0 4px rgba(89, 199, 255, 0.45) !important; }
.fi-btn:focus-visible { box-shadow: 0 0 0 2px var(--page-bg), 0 0 0 4px rgba(89, 199, 255, 0.45) !important; }
.fi-sidebar-nav .fi-sidebar-item a:focus-visible { box-shadow: 0 0 0 2px var(--page-bg), 0 0 0 4px rgba(89, 199, 255, 0.45) !important; }
.fi-sidebar-nav .fi-sidebar-item a:active { transform: scale(0.98) !important; }


/* ═══════════════════════════════════════════════════════════
   27. SPACING
   ═══════════════════════════════════════════════════════════ */
.fi-main > * { --fi-page-content-max-w: 100% !important; }
.fi-widgets { gap: 1rem !important; }
.fi-section-content-ctn { padding: 0 !important; }
.fi-fo-component-ctn { gap: 1rem !important; }
.fi-in-entry-wrp { border-radius: var(--r-lg) !important; }


/* ═══════════════════════════════════════════════════════════
   28. THEME SWITCHING TRANSITIONS
   ═══════════════════════════════════════════════════════════ */
.fi-body, .fi-sidebar, .fi-sidebar-header, .fi-topbar-nav,
.fi-main-ctn > .fi-main, .fi-main-footer, .fi-sidebar-footer,
.fi-section, .fi-ta-ctn, .syncronos-stat-card {
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease) !important;
}


/* ═══════════════════════════════════════════════════════════
   29. PRINT
   ═══════════════════════════════════════════════════════════ */
/* Table header column separators */
.fi-ta-header-cell + .fi-ta-header-cell {
    border-left: 1px solid rgba(148, 163, 184, 0.15);
}
.dark .fi-ta-header-cell + .fi-ta-header-cell {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Global Product Search Modal ─── */
/* Search modal — aligned with Filament modal style */
.v1-search-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
}
.dark .v1-search-modal-backdrop { background: rgba(0, 0, 0, 0.6); }

.v1-search-modal {
    width: 780px;
    max-width: 92vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-xl) !important;
    box-shadow: var(--shadow-panel) !important;
    overflow: hidden;
}
.dark .v1-search-modal {
    background: #182039 !important;
    border-color: rgba(89, 199, 255, 0.12) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(89, 199, 255, 0.06) !important;
}

/* Header — title + subtitle + close */
.v1-search-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.dark .v1-search-modal-header { border-bottom-color: rgba(255, 255, 255, 0.08); }
.v1-search-modal-header-text { flex: 1; min-width: 0; }
.v1-search-modal-title {
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--t-primary);
    margin: 0;
    line-height: 1.4;
}
.v1-search-modal-subtitle {
    font-size: 0.75rem;
    color: var(--t-tertiary);
    margin: 2px 0 0;
    line-height: 1;
}

/* Search bar */
.v1-search-modal-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1rem 1.5rem 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--input-bg);
    transition: border-color 0.15s var(--ease);
}
.v1-search-modal-search:focus-within {
    border-color: var(--focus-border);
    box-shadow: var(--focus-ring);
}
.v1-search-modal-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--t-tertiary);
}
.v1-search-modal-input {
    flex: 1;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--t-primary);
    font-size: 0.875rem;
    outline: none;
}
.v1-search-modal-input::placeholder { color: var(--t-tertiary); }
.v1-search-modal-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--t-tertiary);
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: all 0.15s var(--ease);
}
.v1-search-modal-clear:hover { color: var(--t-primary); background: var(--card-muted); }
.v1-search-modal-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--t-tertiary);
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: all 0.15s var(--ease);
    flex-shrink: 0;
}
.v1-search-modal-close-btn:hover { color: var(--t-primary); background: var(--card-muted); }
.dark .v1-search-modal-close-btn:hover { background: rgba(255, 255, 255, 0.08); }
.v1-search-modal-kbd {
    font-size: 0.625rem;
    font-family: var(--font-mono, ui-monospace, monospace);
    padding: 2px 6px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    color: var(--t-tertiary);
    background: var(--card-muted);
    line-height: 1;
    flex-shrink: 0;
}

/* Body */
.v1-search-modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 80px;
}

.v1-search-modal-count {
    padding: 10px 1.5rem 4px;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--t-tertiary);
    font-weight: 500;
}

.v1-search-modal-list { padding: 4px 8px; }

.v1-search-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s var(--ease);
}
.v1-search-modal-item:hover,
.v1-search-modal-item:focus {
    background: var(--card-muted);
    outline: none;
}
.dark .v1-search-modal-item:hover,
.dark .v1-search-modal-item:focus {
    background: rgba(255, 255, 255, 0.06);
}

.v1-search-modal-thumb {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3px;
}
.dark .v1-search-modal-thumb { background: rgba(255, 255, 255, 0.06); }
.v1-search-modal-thumb img { width: 100%; height: 100%; object-fit: contain; }

.v1-search-modal-info { flex: 1; min-width: 0; }
.v1-search-modal-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--t-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}
.v1-search-modal-meta {
    font-size: 0.6875rem;
    color: var(--t-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}
.v1-search-modal-sku { font-family: var(--font-mono, ui-monospace, monospace); }
.v1-search-modal-sep { opacity: 0.4; }

.v1-search-modal-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.v1-search-modal-price {
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: var(--font-mono, ui-monospace, monospace);
    color: var(--t-primary);
}
.v1-search-modal-price--na { color: var(--t-tertiary); font-weight: 400; }
.v1-search-modal-stock {
    font-size: 0.6875rem;
    font-family: var(--font-mono, ui-monospace, monospace);
}
.v1-search-modal-stock--ok { color: #22c55e; }
.v1-search-modal-stock--none { color: #ef4444; }

/* Hint / empty state */
.v1-search-modal-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--t-tertiary);
    font-size: 0.8125rem;
}
.dark .v1-search-modal-hint { color: var(--t-secondary); }

/* Footer */
.v1-search-modal-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    font-size: 0.6875rem;
    color: var(--t-tertiary);
}
.dark .v1-search-modal-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
    color: var(--t-secondary);
}
.v1-search-modal-footer kbd {
    display: inline-block;
    font-size: 0.625rem;
    font-family: var(--font-mono, ui-monospace, monospace);
    padding: 1px 5px;
    border-radius: var(--r-xs);
    border: 1px solid var(--border);
    background: var(--card-muted);
    margin-right: 2px;
}
.dark .v1-search-modal-footer kbd {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}
.dark .v1-search-modal-kbd {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

/* ═══════════════════════════════════════════════════════════
   SERVER INFRASTRUCTURE TREE
   ═══════════════════════════════════════════════════════════ */

.server-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 1rem 0;
}

/* ── Root node (Olympus) ── */
.server-tree__root {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ── Connector lines ── */
.server-tree__connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.server-tree__line-down {
    width: 2px;
    height: 32px;
    background: var(--brand-blue);
    opacity: 0.4;
}

.server-tree__line-horizontal {
    height: 2px;
    background: var(--brand-blue);
    opacity: 0.4;
    width: min(80%, 900px);
}

/* ── Branches (remote servers) ── */
.server-tree__branches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    padding: 0 1rem;
}

.server-tree__branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: 320px;
    max-width: 400px;
    flex: 1;
}

.server-tree__branch-line {
    width: 2px;
    height: 24px;
    background: var(--brand-blue);
    opacity: 0.4;
}

/* ── Sites (leaf nodes) ── */
.server-tree__sites {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px dashed rgba(90, 124, 178, 0.2);
}

/* ── Empty state ── */
.server-tree__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem 0;
    color: var(--brand-silver);
}

/* ═══════════ Server Cards ═══════════ */

.server-card {
    width: 100%;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.server-card:hover {
    transform: translateY(-2px);
}

/* ── Olympus card ── */
.server-card--olympus {
    max-width: 540px;
    background: linear-gradient(135deg, var(--brand-indigo) 0%, var(--brand-purple) 100%);
    color: #fff;
    box-shadow: 0 8px 32px rgba(28, 36, 83, 0.35);
    border: 1px solid rgba(89, 199, 255, 0.2);
}

.server-card--olympus:hover {
    box-shadow: 0 12px 40px rgba(28, 36, 83, 0.45);
}

.server-card--olympus .server-card__stat-label {
    color: rgba(255, 255, 255, 0.55);
}

.server-card--olympus .server-card__stat-value {
    color: #fff;
}

/* ── Server card ── */
.server-card--server {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.server-card--server:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.server-card--pending {
    opacity: 0.7;
    border-style: dashed;
}

/* ── Site card ── */
.server-card--site {
    padding: 0.625rem 1rem;
    border-radius: 8px;
    background: var(--surface-input);
    border: 1px solid var(--border-default);
}

.server-card--site:hover {
    transform: none;
    background: var(--surface-card);
}

/* ═══════════ Card internals ═══════════ */

.server-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.server-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.server-card__icon--olympus {
    background: rgba(89, 199, 255, 0.2);
    color: var(--brand-cyan);
}

.server-card__icon--completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.server-card__icon--pending {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.server-card__icon--provisioning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    animation: pulse-icon 2s infinite;
}

.server-card__icon--failed {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.server-card__icon--site-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.server-card__icon--site-provisioning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.server-card__icon--site-failed,
.server-card__icon--site-pending,
.server-card__icon--site-suspended {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.server-card__name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.server-card__name--site {
    font-size: 0.85rem;
}

.server-card__host {
    font-size: 0.75rem;
    opacity: 0.6;
    font-family: 'JetBrains Mono', monospace;
}

.server-card__badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    flex-shrink: 0;
}

.server-card__badge--active,
.server-card__badge--completed {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.server-card__badge--pending {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.server-card__badge--provisioning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.server-card__badge--failed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.server-card__badge--suspended {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.server-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.server-card__meta-item {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--surface-input);
    opacity: 0.8;
    font-family: 'JetBrains Mono', monospace;
}

.server-card--olympus .server-card__meta-item {
    background: rgba(255, 255, 255, 0.1);
}

.server-card__stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(90, 124, 178, 0.1);
}

.server-card__stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.server-card__stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
}

.server-card__stat-value {
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.server-card__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
}

.server-card__action {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--brand-blue);
    text-decoration: none;
    transition: color 0.15s;
}

.server-card__action:hover {
    color: var(--brand-cyan);
}

.server-card__tenant {
    font-size: 0.75rem;
    margin-top: 0.35rem;
    padding-left: 2.75rem;
    opacity: 0.7;
}

.server-card__version {
    font-size: 0.65rem;
    margin-top: 0.2rem;
    padding-left: 2.75rem;
    opacity: 0.5;
    font-family: 'JetBrains Mono', monospace;
}

/* ═══════════ Dark mode adjustments ═══════════ */

[data-theme="dark"] .server-card--server {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .server-card--site {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .server-card--site:hover {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .server-card__meta-item {
    background: rgba(255, 255, 255, 0.06);
}

@media print {

    .fi-sidebar, .fi-topbar, .fi-main-footer, .fi-sidebar-footer { display: none !important; }
    .fi-main-ctn { height: auto !important; max-height: none !important; overflow: visible !important; }
    .fi-main-ctn > .fi-main { overflow: visible !important; padding-bottom: 0 !important; }
    * { box-shadow: none !important; border-radius: 0 !important; backdrop-filter: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   User Preferences / simple-page form actions
   ═══════════════════════════════════════════════════════════ */
.syncronos-form-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

