@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');


body {
    font-family: 'Inter', sans-serif;
    background: #f4f6f9;
    color: #334155;
    -webkit-font-smoothing: antialiased;
}

.navbar {
    width: 100% !important;
    max-width: 100% !important;
}

#desktopNav {
    flex-wrap: wrap !important;
}

.navbar-nav {
    flex-wrap: wrap !important;
}

.navbar .nav-link {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    font-size: 0.9rem;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.card {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.table {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 0;
}

/* Page-level sticky tables (below main navbar 56px) */
.sticky-page-table thead.sticky-top,
.table-page-sticky thead.sticky-top,
#watchlist-main-table thead.sticky-top {
    top: 56px !important;
    z-index: 1020;
}
#watchlist-main-table thead th {
    position: sticky;
    top: 56px !important;
    background-color: #f8fafc !important;
    z-index: 1020;
}

/* Container-level & Modal-level sticky table headers (pinned at top: 0) */
.table-responsive thead.sticky-top,
.table-responsive thead.position-sticky,
.modal thead.sticky-top,
.modal thead.position-sticky,
[style*="overflow-y"] thead.sticky-top,
[style*="overflow-y"] thead.position-sticky,
.table-sticky thead,
.sticky-container-table thead {
    top: 0 !important;
}

/* Universal Sticky Header Cells (th) for all container / modal tables */
.table-responsive[style*="max-height"] table,
.modal-body .table-responsive table,
.supplier-scroll-container table,
.table-sticky,
.sticky-container-table,
#watchlist-main-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.table-responsive thead.sticky-top th,
.table-responsive thead.position-sticky th,
.table-responsive[style*="max-height"] thead th,
.modal thead.sticky-top th,
.modal thead.position-sticky th,
.modal-body .table-responsive thead th,
[style*="overflow-y"] thead.sticky-top th,
[style*="overflow-y"] thead.position-sticky th,
.table-sticky thead th,
.sticky-container-table thead th {
    position: sticky !important;
    top: 0 !important;
    background-color: #f8fafc !important;
    z-index: 10;
    box-shadow: inset 0 -1px 0 #cbd5e1, 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Universal Sticky Footer Cells (tfoot) for modal / container summaries */
.table-responsive tfoot.sticky-bottom,
.table tfoot.sticky-bottom,
.modal tfoot.sticky-bottom {
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.table-responsive tfoot.sticky-bottom th,
.table-responsive tfoot.sticky-bottom td,
.table tfoot.sticky-bottom th,
.table tfoot.sticky-bottom td,
.modal tfoot.sticky-bottom th,
.modal tfoot.sticky-bottom td {
    position: sticky !important;
    bottom: 0 !important;
    background-color: #f8fafc !important;
    z-index: 10;
    box-shadow: inset 0 1px 0 #cbd5e1, 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.table thead th {
    border-bottom: 2px solid #e2e8f0;
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
    padding: 12px;
}

.table tbody td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f1f5f9;
}

.small-muted {
    color: #64748b;
    font-size: .875rem;
}

code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 6px;
    font-family: monospace;
    color: #0f172a;
}

/* Modern navigation styling */
.glass-nav {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-offcanvas {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.navbar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: color 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff !important;
}

.offcanvas .nav-link {
    color: #475569 !important;
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.offcanvas .nav-link i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link.active {
    background-color: #e2e8f0;
    color: #0f172a !important;
}

/* Status Badges */
.status-badge-container {
    display: flex;
    align-items: center;
    border-radius: 50rem;
    padding: 0.25rem 0.5rem;
}

/* --- PREMIUM DESIGN SYSTEM --- */

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --header-height: 64px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.premium-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
}

.stat-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px -10px rgba(0,0,0,0.1);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
}

.btn-premium {
    background: var(--primary);
    color: white;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-premium:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Responsive Table Wrappers for Mobile */
.table-responsive-custom {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .stat-value {
        font-size: 1.5rem;
    }
    .card {
        margin-bottom: 1rem;
    }
    .table thead th {
        padding: 8px;
        font-size: 0.85rem;
    }
    .table tbody td {
        padding: 8px;
        font-size: 0.85rem;
    }
}

/* Watchlist Table Virtual Performance & Fluid Scroll */
.watchlist-row {
    content-visibility: auto;
    contain-intrinsic-size: 0 54px;
}