/* ==========================================================================
   Antigravity Admin Theme & KS Technologies ERP Stylesheet
   ========================================================================== */

:root {
    --ag-sidebar-width: 320px;
    --ag-sidebar-collapsed-width: 80px;
    --ag-bg-body: #f8fafc;
    --ag-sidebar-bg: #0f172a;
    --ag-sidebar-hover: #1e293b;
    --ag-sidebar-active: #334155;
    --ag-sidebar-text: #94a3b8;
    --ag-sidebar-text-active: #ffffff;
    --ag-topbar-bg: rgba(255, 255, 255, 0.95);
    --ag-primary: #4f46e5;
    --ag-primary-hover: #4338ca;
    --ag-indigo: #6366f1;
    --ag-cyan: #0891b2;
    --ag-emerald: #10b981;
    --ag-amber: #f59e0b;
    --ag-rose: #f43f5e;
    --ag-purple: #8b5cf6;
    --ag-card-bg: #ffffff;
    --ag-card-border: #e2e8f0;
    --ag-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --ag-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --ag-radius: 12px;
    --ag-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    font-family: var(--ag-font-family);
    background-color: var(--ag-bg-body);
    color: #1e293b;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Custom Thin Scrollbars
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

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

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

/* --------------------------------------------------------------------------
   Layout Wrapper
   -------------------------------------------------------------------------- */
#app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

#main-content {
    flex-grow: 1;
    margin-left: var(--ag-sidebar-width, 320px);
    padding-top: 72px;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--ag-bg-body);
    max-width: calc(100vw - var(--ag-sidebar-width, 320px));
    overflow-x: hidden;
}

#app-wrapper.sidebar-collapsed #main-content {
    margin-left: var(--ag-sidebar-collapsed-width, 80px);
    max-width: calc(100vw - var(--ag-sidebar-collapsed-width, 80px));
}

/* --------------------------------------------------------------------------
   Topbar Navigation
   -------------------------------------------------------------------------- */
.ag-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--ag-sidebar-width, 320px);
    height: 72px;
    background: var(--ag-topbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ag-card-border);
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#app-wrapper.sidebar-collapsed .ag-topbar {
    left: var(--ag-sidebar-collapsed-width, 80px);
}

.ag-global-search {
    position: relative;
    width: 380px;
}

.ag-global-search input {
    border-radius: 50rem;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding-left: 2.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.ag-global-search input:focus {
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    border-color: var(--ag-primary);
}

.ag-global-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.ag-search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--ag-hover-shadow);
    border: 1px solid var(--ag-card-border);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
}

.ag-fy-pill {
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* --------------------------------------------------------------------------
   Sidebar Navigation
   -------------------------------------------------------------------------- */
.ag-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--ag-sidebar-width, 320px);
    min-width: 320px;
    max-width: 480px;
    background-color: var(--ag-sidebar-bg);
    color: var(--ag-sidebar-text);
    z-index: 1030;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    overflow-x: hidden;
    overflow-y: hidden;
    overscroll-behavior: contain;
}

#app-wrapper.sidebar-collapsed .ag-sidebar {
    width: var(--ag-sidebar-collapsed-width, 80px);
    min-width: var(--ag-sidebar-collapsed-width, 80px);
    max-width: var(--ag-sidebar-collapsed-width, 80px);
}

/* Sidebar Resizer Handle */
.ag-sidebar-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 1035;
    user-select: none;
    transition: background-color 0.2s ease;
}

.ag-sidebar-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1px;
    transform: translateY(-50%);
    width: 3px;
    height: 32px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.18);
    transition: all 0.2s ease;
}

.ag-sidebar-resizer:hover,
.ag-sidebar-resizer.is-resizing {
    background-color: rgba(79, 70, 229, 0.35);
}

.ag-sidebar-resizer:hover::after,
.ag-sidebar-resizer.is-resizing::after {
    background-color: var(--ag-primary);
    height: 48px;
    width: 4px;
}

#app-wrapper.sidebar-collapsed .ag-sidebar-resizer {
    display: none;
}

#app-wrapper.sidebar-resizing .ag-sidebar,
#app-wrapper.sidebar-resizing #main-content,
#app-wrapper.sidebar-resizing .ag-topbar {
    transition: none !important;
    user-select: none !important;
}

.ag-sidebar-brand {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0.85rem;
    flex-shrink: 0;
    overflow: hidden;
}

.ag-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ag-primary), var(--ag-cyan));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
    flex-shrink: 0;
}

.ag-brand-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-brand-subtitle {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-sidebar-nav {
    padding: 1rem 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.ag-nav-group-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    font-weight: 700;
    padding: 0.75rem 0.85rem 0.35rem 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.72rem 0.85rem;
    color: var(--ag-sidebar-text);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.ag-nav-item:hover {
    background-color: var(--ag-sidebar-hover);
    color: #ffffff;
}

.ag-nav-item.active {
    background-color: var(--ag-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.ag-nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.ag-nav-text {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ag-nav-badge {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
}

.ag-nav-badge-alert {
    background-color: #f59e0b !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    font-size: 0.72rem !important;
    padding: 0.28rem 0.65rem !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

#app-wrapper.sidebar-collapsed .ag-brand-title,
#app-wrapper.sidebar-collapsed .ag-brand-subtitle,
#app-wrapper.sidebar-collapsed .ag-nav-group-title,
#app-wrapper.sidebar-collapsed .ag-nav-text,
#app-wrapper.sidebar-collapsed .ag-nav-badge {
    display: none;
}

/* --------------------------------------------------------------------------
   Cards & KPI Components
   -------------------------------------------------------------------------- */
.ag-card {
    background: var(--ag-card-bg);
    border: 1px solid var(--ag-card-border);
    border-radius: var(--ag-radius);
    box-shadow: var(--ag-card-shadow);
    transition: all 0.25s ease;
    margin-bottom: 1.5rem;
}

.ag-card:hover {
    box-shadow: var(--ag-hover-shadow);
}

.ag-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--ag-card-border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ag-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ag-card-body {
    padding: 1.5rem;
}

.kpi-card {
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.kpi-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.kpi-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.kpi-subtext {
    font-size: 0.75rem;
    margin-top: 0.4rem;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Badges & Custom Soft Background Colors
   -------------------------------------------------------------------------- */
.bg-primary-soft { background-color: #e0e7ff; }
.bg-info-soft { background-color: #cff4fc; }
.bg-warning-soft { background-color: #fef3c7; }
.bg-indigo-soft { background-color: #e0e7ff; }
.bg-purple-soft { background-color: #f3e8ff; }
.bg-emerald-soft { background-color: #d1fae5; }
.bg-success-soft { background-color: #d1fae5; }
.bg-danger-soft { background-color: #ffe4e6; }
.bg-secondary-soft { background-color: #f1f5f9; }

.text-indigo { color: var(--ag-indigo); }
.text-cyan { color: var(--ag-cyan); }
.text-emerald { color: var(--ag-emerald); }
.text-amber { color: var(--ag-amber); }
.text-rose { color: var(--ag-rose); }
.text-purple { color: var(--ag-purple); }

.badge {
    padding: 0.4em 0.75em;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.76rem;
}

/* --------------------------------------------------------------------------
   Table Action Bar, Scroll Containers & Sticky Headers
   -------------------------------------------------------------------------- */
.ag-table-action-bar {
    padding: 0.85rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid var(--ag-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ag-table-scroll-container,
.table-responsive {
    overflow-x: auto !important;
    overflow-y: auto;
    white-space: nowrap;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    scrollbar-color: #4f46e5 #e2e8f0;
}

/* Custom Visible Horizontal Scrollbar */
.table-responsive::-webkit-scrollbar,
.ag-table-scroll-container::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.table-responsive::-webkit-scrollbar-track,
.ag-table-scroll-container::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 6px;
}

.table-responsive::-webkit-scrollbar-thumb,
.ag-table-scroll-container::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.ag-table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #3730a3;
}

.table.ag-table {
    margin-bottom: 0;
    width: 100%;
    min-width: 1100px;
}

.table.ag-table thead th {
    background-color: #f8fafc !important;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--ag-card-border);
    position: sticky;
    top: 0;
    z-index: 15;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.table.ag-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.table.ag-table th.sortable:hover {
    background-color: #e2e8f0 !important;
}

.table.ag-table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
}

.table.ag-table tbody tr:hover {
    background-color: #f8fafc;
}

.ag-table-footer {
    padding: 0.85rem 1.25rem;
    background: #ffffff;
    border-top: 1px solid var(--ag-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Modal Body Scrollable
   -------------------------------------------------------------------------- */
.modal-body-scroll {
    max-height: 70vh;
    overflow-y: auto;
}

/* --------------------------------------------------------------------------
   POS Counter Billing Specifics
   -------------------------------------------------------------------------- */
.pos-cart-panel {
    background: #ffffff;
    border-radius: var(--ag-radius);
    border: 1px solid var(--ag-card-border);
    height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
}

.pos-cart-items {
    flex-grow: 1;
    overflow-y: auto;
}

.pos-product-card {
    border: 1px solid var(--ag-card-border);
    border-radius: 10px;
    padding: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    height: 100%;
}

.pos-product-card:hover {
    border-color: var(--ag-primary);
    transform: translateY(-2px);
    box-shadow: var(--ag-card-shadow);
}

/* --------------------------------------------------------------------------
   Print Styles (Thermal & A4)
   -------------------------------------------------------------------------- */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-area, #printable-area * {
        visibility: visible;
    }
    #printable-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .no-print {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   Custom Button Themes & Responsive Tab Pills
   -------------------------------------------------------------------------- */
.btn-indigo {
    background-color: var(--ag-indigo);
    border-color: var(--ag-indigo);
    color: #ffffff !important;
}
.btn-indigo:hover, .btn-indigo:focus {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff !important;
}

.btn-rose {
    background-color: var(--ag-rose);
    border-color: var(--ag-rose);
    color: #ffffff !important;
}
.btn-rose:hover, .btn-rose:focus {
    background-color: #e11d48;
    border-color: #e11d48;
    color: #ffffff !important;
}

.btn-emerald {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}
.btn-emerald:hover, .btn-emerald:focus {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

.btn-outline-emerald {
    background-color: transparent !important;
    border-color: #10b981 !important;
    color: #059669 !important;
}
.btn-outline-emerald:hover, .btn-outline-emerald:focus {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

.bg-emerald {
    background-color: #10b981 !important;
    color: #ffffff !important;
}

.bg-emerald-soft {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
}

.text-emerald {
    color: #059669 !important;
}

.bg-indigo {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
}
.bg-indigo-soft {
    background-color: #e0e7ff !important;
    color: #3730a3 !important;
}
.text-indigo {
    color: #4f46e5 !important;
}

.bg-amber {
    background-color: #f59e0b !important;
    color: #ffffff !important;
}
.bg-amber-soft {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}
.text-amber {
    color: #d97706 !important;
}

.bg-purple {
    background-color: #8b5cf6 !important;
    color: #ffffff !important;
}
.bg-purple-soft {
    background-color: #f3e8ff !important;
    color: #6b21a8 !important;
}
.text-purple {
    color: #7c3aed !important;
}

.bg-rose {
    background-color: #f43f5e !important;
    color: #ffffff !important;
}
.bg-rose-soft {
    background-color: #ffe4e6 !important;
    color: #9f1239 !important;
}
.text-rose {
    color: #e11d48 !important;
}

/* Nav Pills Responsive Tabs */
.nav-pills .nav-link {
    color: #475569;
    background-color: #ffffff;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-pills .nav-link:hover {
    background-color: #f1f5f9;
    color: var(--ag-primary);
    border-color: var(--ag-primary) !important;
}

.nav-pills .nav-link.active {
    background-color: var(--ag-primary) !important;
    color: #ffffff !important;
    border-color: var(--ag-primary) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

@media (max-width: 768px) {
    .nav-pills {
        flex-direction: column;
        width: 100%;
    }
    .nav-pills .nav-item, .nav-pills .nav-link {
        width: 100%;
        text-align: left;
    }
}

/* --------------------------------------------------------------------------
   Searchable Select Dropdown Component
   -------------------------------------------------------------------------- */
.ag-searchable-wrapper {
    position: relative;
    width: 100%;
}

.ag-searchable-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.475rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    color: #1e293b;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    min-height: 38px;
}

.ag-searchable-trigger:hover {
    border-color: #94a3b8;
}

.ag-searchable-wrapper.is-open .ag-searchable-trigger,
.ag-searchable-trigger:focus {
    border-color: var(--ag-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
    outline: none;
}

.ag-searchable-wrapper.is-invalid .ag-searchable-trigger {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18);
}

.ag-searchable-trigger-text {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 500;
}

.ag-searchable-trigger-text.is-placeholder {
    color: #64748b !important;
    font-weight: normal !important;
    background: transparent !important;
    opacity: 1 !important;
}

.ag-searchable-trigger-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.8rem;
}

.ag-searchable-clear-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 0;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.ag-searchable-clear-btn:hover {
    color: #e11d48;
}

.ag-searchable-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1090;
    display: none;
    overflow: hidden;
    animation: agDropdownFadeIn 0.15s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes agDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ag-searchable-wrapper.is-open .ag-searchable-dropdown {
    display: block;
}

.ag-searchable-search-wrapper {
    position: sticky;
    top: 0;
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    z-index: 3;
}

.ag-searchable-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.ag-searchable-search-icon {
    position: absolute;
    left: 10px;
    color: #94a3b8;
    font-size: 0.82rem;
    pointer-events: none;
}

.ag-searchable-search-input {
    width: 100%;
    padding: 6px 28px 6px 30px;
    font-size: 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ag-searchable-search-input:focus {
    border-color: var(--ag-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.ag-searchable-search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px;
}

.ag-searchable-search-clear:hover {
    color: #475569;
}

.ag-searchable-options-list {
    max-height: 220px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
}

.ag-searchable-option {
    padding: 8px 12px;
    font-size: 0.86rem;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.ag-searchable-option-text {
    flex-grow: 1;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    color: inherit;
}

.ag-searchable-option:hover,
.ag-searchable-option.is-focused {
    background-color: #e0e7ff;
    color: var(--ag-primary);
    font-weight: 600;
}

.ag-searchable-option.is-selected {
    background-color: #ede9fe;
    color: #4338ca;
    font-weight: 700;
}

.ag-searchable-option.is-selected::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.78rem;
    color: var(--ag-primary);
    margin-left: 8px;
    flex-shrink: 0;
}

.ag-searchable-match-highlight {
    background-color: #fef08a;
    color: #713f12;
    padding: 1px 2px;
    border-radius: 3px;
    font-weight: 700;
    display: inline;
}

.ag-searchable-empty {
    padding: 16px 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.84rem;
}

.ag-searchable-footer-action {
    border-top: 1px solid #f1f5f9;
    padding: 6px 10px;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #64748b;
}

.ag-searchable-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Auto-fill field glow & transition effect */
@keyframes agFieldFlash {
    0% {
        background-color: #ecfdf5;
        border-color: #10b981;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    }
    100% {
        background-color: #ffffff;
        border-color: #cbd5e1;
        box-shadow: none;
    }
}

.form-control.is-autofilled,
.form-select.is-autofilled {
    animation: agFieldFlash 1.6s ease-out;
}



