/**
 * NOOR FASHION GALLERY — ADMIN PANEL DESIGN SYSTEM
 * Phase: 04 — Admin Panel Foundation
 * Architecture: Vanilla CSS + Bootstrap 5.3 Overrides
 */

/* ==========================================================================
   1. CSS Custom Properties / Design Tokens
   ========================================================================== */
:root {
    /* Brand Colors (Noor Fashion Gallery Royal Luxury Palette) */
    --nfg-primary: #5A0B2C;       /* Royal Wine Burgundy */
    --nfg-primary-light: #74103A;
    --nfg-primary-dark: #3E071E;
    --nfg-accent: #C5A059;        /* Imperial Warm Gold */
    --nfg-accent-light: #E6CA85;  /* Shimmer Gold */
    --nfg-accent-subtle: #FDF8ED; /* Champagne Gold Tint */
    --nfg-crimson: #BE185D;       /* Velvet Rose */

    /* Semantic Tones */
    --nfg-success: #059669;
    --nfg-success-subtle: #ecfdf5;
    --nfg-warning: #d97706;
    --nfg-warning-subtle: #fffbeb;
    --nfg-danger: #dc2626;
    --nfg-danger-subtle: #fef2f2;
    --nfg-info: #0284c7;
    --nfg-info-subtle: #f0f9ff;

    /* Neutral & Background Tones */
    --nfg-bg-body: #f8fafc;
    --nfg-bg-surface: #ffffff;
    --nfg-bg-sidebar: #0f172a;
    --nfg-bg-sidebar-hover: #1e293b;
    --nfg-bg-sidebar-active: #5A0B2C;

    /* Text Colors */
    --nfg-text-main: #0f172a;
    --nfg-text-muted: #64748b;
    --nfg-text-subtle: #94a3b8;
    --nfg-text-sidebar: #cbd5e1;
    --nfg-text-sidebar-active: #ffffff;

    /* Borders & Dividers */
    --nfg-border: #e2e8f0;
    --nfg-border-light: #f1f5f9;
    --nfg-border-sidebar: rgba(255, 255, 255, 0.08);

    /* Shadows */
    --nfg-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --nfg-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --nfg-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --nfg-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);

    /* Dimensions */
    --nfg-sidebar-width: 260px;
    --nfg-sidebar-collapsed-width: 76px;
    --nfg-header-height: 64px;
    --nfg-footer-height: 50px;
    --nfg-radius: 12px;
    --nfg-radius-sm: 8px;
    --nfg-radius-lg: 16px;

    /* Transitions */
    --nfg-transition-fast: 0.15s ease;
    --nfg-transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Tokens (Future-ready Foundation) */
[data-theme="dark"] {
    --nfg-bg-body: #0b0f19;
    --nfg-bg-surface: #111827;
    --nfg-text-main: #f1f5f9;
    --nfg-text-muted: #94a3b8;
    --nfg-border: #1f2937;
    --nfg-border-light: #1e293b;
    --nfg-bg-sidebar: #070b14;
    --nfg-bg-sidebar-hover: #131b2e;
}

/* ==========================================================================
   2. Base Typography & Global Reset
   ========================================================================== */
body {
    background-color: var(--nfg-bg-body);
    color: var(--nfg-text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--nfg-primary);
    text-decoration: none;
    transition: color var(--nfg-transition-fast);
}

a:hover {
    color: var(--nfg-accent);
}

/* ==========================================================================
   3. Admin Layout Structure
   ========================================================================== */
#adminLayout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow-x: hidden;
    background-color: var(--nfg-bg-body);
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1025;
    display: none;
    opacity: 0;
    transition: opacity var(--nfg-transition-normal);
}

body.sidebar-mobile-open .sidebar-backdrop {
    display: block;
    opacity: 1;
}

/* Sidebar */
#adminSidebar {
    width: var(--nfg-sidebar-width);
    background-color: var(--nfg-bg-sidebar);
    color: var(--nfg-text-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    transition: width var(--nfg-transition-normal), transform var(--nfg-transition-normal);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.18);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
    height: var(--nfg-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--nfg-border-sidebar);
    background: rgba(0, 0, 0, 0.25);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.sidebar-brand .brand-logo-img {
    transition: transform var(--nfg-transition-fast);
}

.sidebar-brand:hover .brand-logo-img {
    transform: scale(1.05);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-brand-text .title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #ffffff;
}

.sidebar-brand-text .subtitle {
    font-size: 0.65rem;
    color: var(--nfg-accent);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
}

.sidebar-nav-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0.75rem;
}

.sidebar-nav-container::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.nav-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    font-weight: 800;
    color: #C5A059;
    padding: 0.85rem 0.75rem 0.4rem;
    margin-top: 0.5rem;
    opacity: 0.85;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin-bottom: 3px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 0.85rem;
    min-height: 40px;
    color: var(--nfg-text-sidebar);
    border-radius: var(--nfg-radius-sm);
    font-weight: 500;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all var(--nfg-transition-fast);
}

.sidebar-nav-link:focus-visible {
    outline: 2px solid var(--nfg-accent-light);
    outline-offset: 2px;
    background-color: var(--nfg-bg-sidebar-hover);
    color: #ffffff;
}

.sidebar-nav-link i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
    color: var(--nfg-text-subtle);
    transition: color var(--nfg-transition-fast), transform var(--nfg-transition-fast);
}

.sidebar-nav-link:hover {
    background-color: var(--nfg-bg-sidebar-hover);
    color: #ffffff;
}

.sidebar-nav-link:hover i {
    color: var(--nfg-accent-light);
    transform: scale(1.1);
}

.sidebar-nav-link.active {
    background: linear-gradient(90deg, #5A0B2C 0%, #74103A 100%);
    color: #ffffff;
    font-weight: 600;
    border-left: 3.5px solid #C5A059;
    box-shadow: 0 4px 14px rgba(90, 11, 44, 0.28);
}

.sidebar-nav-link.active i {
    color: #E6CA85;
}

.sidebar-nav-link .badge-nav {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    background-color: rgba(197, 160, 89, 0.25);
    color: #E6CA85;
    font-weight: 700;
}

.sidebar-footer {
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--nfg-border-sidebar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, 0.25);
}

/* Collapsed Sidebar State (Desktop) */
body.sidebar-collapsed #adminSidebar {
    width: var(--nfg-sidebar-collapsed-width);
}

body.sidebar-collapsed #adminSidebar .sidebar-brand-text,
body.sidebar-collapsed #adminSidebar .nav-section-title,
body.sidebar-collapsed #adminSidebar .sidebar-nav-link span,
body.sidebar-collapsed #adminSidebar .sidebar-nav-link .badge-nav,
body.sidebar-collapsed #adminSidebar .sidebar-footer span {
    display: none;
}

body.sidebar-collapsed #adminSidebar .sidebar-nav-link {
    justify-content: center;
    padding: 0.75rem 0;
}

body.sidebar-collapsed #adminSidebar .sidebar-nav-link i {
    margin: 0;
    font-size: 1.3rem;
}

body.sidebar-collapsed #adminMain {
    margin-left: var(--nfg-sidebar-collapsed-width);
    width: calc(100% - var(--nfg-sidebar-collapsed-width));
    max-width: calc(100% - var(--nfg-sidebar-collapsed-width));
}

/* Main Content Area */
#adminMain {
    flex: 1 1 auto;
    margin-left: var(--nfg-sidebar-width);
    width: calc(100% - var(--nfg-sidebar-width));
    max-width: calc(100% - var(--nfg-sidebar-width));
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--nfg-bg-body);
    transition: margin-left var(--nfg-transition-normal), width var(--nfg-transition-normal), max-width var(--nfg-transition-normal);
}

@media (max-width: 991.98px) {
    #adminSidebar {
        transform: translateX(-100%);
    }

    body.sidebar-mobile-open #adminSidebar {
        transform: translateX(0);
    }

    #adminMain {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Header */
#adminHeader {
    height: var(--nfg-header-height);
    background-color: #ffffff;
    border-bottom: 1px solid var(--nfg-border);
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-sidebar-toggle {
    background: none;
    border: none;
    color: var(--nfg-text-muted);
    font-size: 1.25rem;
    padding: 0.4rem;
    border-radius: var(--nfg-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--nfg-transition-fast), color var(--nfg-transition-fast);
}

.btn-sidebar-toggle:hover {
    background-color: var(--nfg-border-light);
    color: var(--nfg-text-main);
}

.header-search {
    position: relative;
    max-width: 320px;
}

.header-search input {
    height: 38px;
    padding-left: 2.25rem;
    padding-right: 1rem;
    font-size: 0.85rem;
    border-radius: var(--nfg-radius-sm);
    border: 1px solid var(--nfg-border);
    background-color: var(--nfg-bg-body);
    transition: border-color var(--nfg-transition-fast), background-color var(--nfg-transition-fast);
}

.header-search input:focus {
    background-color: #ffffff;
    border-color: var(--nfg-primary);
    box-shadow: 0 0 0 3px rgba(90, 11, 44, 0.12);
}

.header-search .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nfg-text-subtle);
    font-size: 0.95rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--nfg-text-muted);
    font-size: 1.15rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--nfg-transition-fast), color var(--nfg-transition-fast);
}

.header-icon-btn:hover {
    background-color: var(--nfg-border-light);
    color: var(--nfg-primary);
}

.header-icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--nfg-accent);
    box-shadow: 0 0 0 2px #ffffff;
}

/* User Profile Dropdown */
.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--nfg-radius);
    border: 1px solid transparent;
    background: none;
    cursor: pointer;
    text-align: left;
    transition: background-color var(--nfg-transition-fast), border-color var(--nfg-transition-fast);
}

.user-profile-btn:hover {
    background-color: var(--nfg-border-light);
    border-color: var(--nfg-border);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nfg-primary) 0%, var(--nfg-accent) 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(90, 11, 44, 0.25);
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-meta .name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--nfg-text-main);
}

.user-meta .role {
    font-size: 0.72rem;
    color: var(--nfg-accent);
    font-weight: 700;
}

/* Breadcrumb Subheader */
.admin-subheader {
    background-color: #ffffff;
    border-bottom: 1px solid var(--nfg-border);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-breadcrumb {
    margin-bottom: 0;
    font-size: 0.825rem;
}

.admin-breadcrumb .breadcrumb-item a {
    color: var(--nfg-text-muted);
}

.admin-breadcrumb .breadcrumb-item a:hover {
    color: var(--nfg-primary);
}

.admin-breadcrumb .breadcrumb-item.active {
    color: var(--nfg-primary);
    font-weight: 600;
}

/* Main Viewport Content */
#mainContent {
    flex: 1;
    padding: 1.5rem;
    min-width: 0;
    max-width: 100%;
}

/* Footer */
#adminFooter {
    height: var(--nfg-footer-height);
    background-color: #ffffff;
    border-top: 1px solid var(--nfg-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    font-size: 0.8rem;
    color: var(--nfg-text-muted);
}

/* ==========================================================================
   4. Reusable UI Components
   ========================================================================== */

/* Primary & Action Buttons */
.btn-primary {
    background: linear-gradient(135deg, #5A0B2C 0%, #3E071E 100%) !important;
    border-color: #5A0B2C !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: var(--nfg-radius-sm);
    box-shadow: 0 2px 6px rgba(90, 11, 44, 0.2);
    transition: all var(--nfg-transition-fast);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #74103A 0%, #520927 100%) !important;
    border-color: #74103A !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 11, 44, 0.3);
}

.btn-outline-primary {
    color: var(--nfg-primary) !important;
    border-color: var(--nfg-primary) !important;
    font-weight: 600;
    border-radius: var(--nfg-radius-sm);
    transition: all var(--nfg-transition-fast);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--nfg-primary) !important;
    color: #ffffff !important;
    border-color: var(--nfg-primary) !important;
    box-shadow: 0 4px 10px rgba(90, 11, 44, 0.2);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--nfg-primary);
    box-shadow: 0 0 0 3px rgba(90, 11, 44, 0.12);
}

.form-check-input:checked {
    background-color: var(--nfg-primary);
    border-color: var(--nfg-primary);
}

.form-check-input:focus {
    border-color: var(--nfg-primary);
    box-shadow: 0 0 0 3px rgba(90, 11, 44, 0.12);
}

/* Navigation Tabs & Pills (Noor Royal Palette) */
.nav-tabs {
    border-bottom: 2px solid var(--nfg-border);
    gap: 0.25rem;
}

.nav-tabs .nav-link {
    color: var(--nfg-text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.65rem 1.15rem;
    transition: all var(--nfg-transition-fast);
}

.nav-tabs .nav-link:hover {
    color: var(--nfg-primary);
    border-bottom-color: rgba(90, 11, 44, 0.3);
    background-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--nfg-primary);
    border-bottom: 3px solid var(--nfg-primary);
    background-color: transparent;
    font-weight: 700;
}

.nav-pills .nav-link {
    color: var(--nfg-text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--nfg-radius-sm);
    padding: 0.5rem 1rem;
    transition: all var(--nfg-transition-fast);
}

.nav-pills .nav-link:hover {
    color: var(--nfg-primary);
    background-color: var(--nfg-accent-subtle);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--nfg-primary) 0%, var(--nfg-primary-light) 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(90, 11, 44, 0.25);
}

/* Pagination (Noor Luxury Branding) */
.pagination {
    gap: 3px;
    margin-bottom: 0;
}

.page-link {
    color: var(--nfg-text-main);
    border-color: var(--nfg-border);
    border-radius: var(--nfg-radius-sm) !important;
    font-size: 0.825rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    transition: all var(--nfg-transition-fast);
}

.page-link:hover {
    color: var(--nfg-primary);
    background-color: var(--nfg-accent-subtle);
    border-color: var(--nfg-accent);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--nfg-primary) 0%, var(--nfg-primary-light) 100%);
    border-color: var(--nfg-primary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(90, 11, 44, 0.2);
}

.page-item.disabled .page-link {
    color: var(--nfg-text-subtle);
    border-color: var(--nfg-border-light);
    background-color: #f8fafc;
}

/* Custom Progress Bars */
.progress-bar {
    background-color: var(--nfg-primary);
}

/* Dropdown Menu Enhancements */
.dropdown-menu {
    border: 1px solid var(--nfg-border);
    box-shadow: var(--nfg-shadow-lg);
    border-radius: var(--nfg-radius);
    padding: 0.5rem;
}

.dropdown-item {
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--nfg-radius-sm);
    padding: 0.5rem 0.85rem;
    transition: all var(--nfg-transition-fast);
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--nfg-accent-subtle);
    color: var(--nfg-primary);
}

.dropdown-item.active, .dropdown-item:active {
    background: var(--nfg-primary);
    color: #ffffff;
}

/* Cards */
.nfg-card {
    background-color: #ffffff;
    border: 1px solid var(--nfg-border);
    border-radius: var(--nfg-radius);
    box-shadow: var(--nfg-shadow-xs);
    margin-bottom: 1.5rem;
    transition: box-shadow var(--nfg-transition-fast), border-color var(--nfg-transition-fast);
}

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

.nfg-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--nfg-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    border-top-left-radius: var(--nfg-radius);
    border-top-right-radius: var(--nfg-radius);
}

.nfg-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--nfg-text-main);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nfg-card-body {
    padding: 1.25rem;
}

.nfg-card-footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--nfg-border);
    background-color: var(--nfg-border-light);
    border-bottom-left-radius: var(--nfg-radius);
    border-bottom-right-radius: var(--nfg-radius);
}

/* Metric / Stat Cards */
.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card .metric-icon-bg {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    width: 48px;
    height: 48px;
    border-radius: var(--nfg-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-card .metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--nfg-text-main);
    line-height: 1.2;
    margin: 0.35rem 0 0.15rem;
}

.metric-card .metric-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--nfg-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card .metric-trend {
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    margin-top: 0.4rem;
}

/* Badges */
.badge-nfg {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.3em 0.7em;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-nfg-active, .badge-nfg-success {
    background-color: var(--nfg-success-subtle);
    color: var(--nfg-success);
    border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-nfg-inactive, .badge-nfg-secondary {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.badge-nfg-locked, .badge-nfg-danger {
    background-color: var(--nfg-danger-subtle);
    color: var(--nfg-danger);
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.badge-nfg-warning, .badge-nfg-pending {
    background-color: var(--nfg-warning-subtle);
    color: var(--nfg-warning);
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-nfg-info, .badge-nfg-role {
    background-color: var(--nfg-info-subtle);
    color: var(--nfg-info);
    border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-nfg-primary {
    background-color: #fdf2f8;
    color: var(--nfg-primary);
    border: 1px solid rgba(90, 11, 44, 0.2);
}

/* Data Tables */
.nfg-table-container {
    background-color: #ffffff;
    border: 1px solid var(--nfg-border);
    border-radius: var(--nfg-radius);
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.nfg-table-toolbar {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--nfg-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.nfg-table {
    margin-bottom: 0;
    width: 100%;
    min-width: 700px;
}

.nfg-table thead th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--nfg-border);
    white-space: nowrap;
}

.nfg-table tbody td {
    padding: 0.95rem 1.25rem;
    vertical-align: middle;
    color: var(--nfg-text-main);
    font-size: 0.88rem;
    border-bottom: 1px solid var(--nfg-border-light);
}

.nfg-table tbody tr:last-child td {
    border-bottom: none;
}

.nfg-table tbody tr:hover td {
    background-color: rgba(248, 250, 252, 0.8);
}

/* Empty, Loading, and Error States */
.state-box {
    text-align: center;
    padding: 3.5rem 1.5rem;
}

.state-icon {
    font-size: 3rem;
    color: var(--nfg-text-subtle);
    margin-bottom: 1rem;
}

.state-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--nfg-text-main);
    margin-bottom: 0.35rem;
}

.state-desc {
    color: var(--nfg-text-muted);
    font-size: 0.88rem;
    max-width: 420px;
    margin: 0 auto 1.25rem;
}

/* Skeleton loader */
.skeleton-box {
    display: inline-block;
    height: 1em;
    position: relative;
    overflow: hidden;
    background-color: #e2e8f0;
    border-radius: var(--nfg-radius-sm);
}

.skeleton-box::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.4) 20%,
        rgba(255, 255, 255, 0.7) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 1.8s infinite;
    content: '';
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Floating Toasts */
#toastContainer {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.toast-nfg {
    background-color: #ffffff;
    border-radius: var(--nfg-radius);
    box-shadow: var(--nfg-shadow-lg);
    border-left: 4px solid var(--nfg-primary);
    min-width: 320px;
    max-width: 420px;
    overflow: hidden;
}

.toast-nfg.toast-success { border-left-color: var(--nfg-success); }
.toast-nfg.toast-danger { border-left-color: var(--nfg-danger); }
.toast-nfg.toast-warning { border-left-color: var(--nfg-warning); }
.toast-nfg.toast-info { border-left-color: var(--nfg-info); }


/* ==========================================================================
   5. Responsive Media Queries
   ========================================================================== */

/* Tablet & Mobile Screens (<= 991px) */
@media (max-width: 991.98px) {
    #adminSidebar {
        transform: translateX(-100%);
    }

    body.sidebar-mobile-open #adminSidebar {
        transform: translateX(0);
    }

    body.sidebar-mobile-open .sidebar-backdrop {
        display: block;
    }

    #adminMain {
        margin-left: 0 !important;
    }

    .header-search {
        display: none;
    }
}

/* Small Devices (<= 576px) */
@media (max-width: 575.92px) {
    #adminHeader {
        padding: 0 1rem;
    }

    #mainContent {
        padding: 1rem;
    }

    .user-meta {
        display: none;
    }

    .admin-subheader {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
}

/* ==========================================================================
   6. Category & Catalog Tree Styles (Phase 05)
   ========================================================================== */
.category-thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--nfg-border);
    background-color: var(--nfg-border-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--nfg-text-muted);
    font-size: 1.15rem;
}

.tree-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tree-card {
    background: #ffffff;
    border: 1px solid var(--nfg-border);
    border-radius: var(--nfg-radius);
    transition: box-shadow var(--nfg-transition);
}

.tree-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.tree-card-header {
    padding: 0.85rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fafbfd;
    border-top-left-radius: var(--nfg-radius);
    border-top-right-radius: var(--nfg-radius);
}

.tree-subs-list {
    padding: 0.5rem 1.15rem 0.75rem 2.5rem;
    border-top: 1px dashed var(--nfg-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tree-sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #edf2f7;
}

.tree-sub-item:hover {
    background: #f8fafc;
}

.image-preview-box {
    width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 2px dashed var(--nfg-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f8fafc;
}

.image-preview-box img {
    max-height: 190px;
    max-width: 100%;
    object-fit: contain;
}

/* ==========================================================================
   7. Product & Variant Styles (Phase 06)
   ========================================================================== */
.product-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--nfg-border);
    background-color: var(--nfg-border-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--nfg-text-muted);
    font-size: 1.25rem;
}

.variant-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.2);
    margin-right: 4px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.gallery-card {
    position: relative;
    border: 1px solid var(--nfg-border);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow var(--nfg-transition-fast);
}

.gallery-card:hover {
    box-shadow: var(--nfg-shadow-md);
}

.gallery-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.gallery-card .gallery-badge {
    position: absolute;
    top: 6px;
    left: 6px;
}

.gallery-card .gallery-actions {
    padding: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-top: 1px solid var(--nfg-border);
}

.product-preview-gallery {
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--nfg-border);
}

.product-preview-gallery img {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
}

.size-pill {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--nfg-border);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: default;
    background: #ffffff;
}

.color-pill {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--nfg-border);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    background: #ffffff;
}

/* ==========================================================================
   Phase 07: Inventory Management
   ========================================================================== */
.stock-badge-in {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 600;
}

.stock-badge-low {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-weight: 600;
}

.stock-badge-out {
    background-color: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-weight: 600;
}

.qty-positive {
    color: #059669;
    font-weight: 700;
}

.qty-negative {
    color: #dc2626;
    font-weight: 700;
}

.inv-subnav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--nfg-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.inv-subnav .btn {
    font-size: 0.85rem;
    border-radius: 6px;
}

.trx-type-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.trx-stock-in { background-color: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.trx-stock-out { background-color: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.trx-adjust { background-color: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.trx-transfer { background-color: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.trx-reserve { background-color: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.trx-release { background-color: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ==========================================================================
   Admin Executive Dashboard Command Center Styles
   ========================================================================== */

/* 1. Global Dashboard Container & Density */
.dash-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    width: 100%;
    max-width: 100%;
}

/* 2. Top Header Toolbar Card */
.dash-header-card {
    background: linear-gradient(135deg, #ffffff 0%, #fbfcfd 100%);
    border: 1px solid var(--nfg-border);
    border-radius: 14px;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.dash-header-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(90, 11, 44, 0.08);
    border: 1px solid rgba(90, 11, 44, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 0.18rem 0.6rem;
    border-radius: 9999px;
}

.dash-controls-wrap {
    gap: 0.5rem;
}

.dash-select-group .form-select {
    box-shadow: none;
    border-color: var(--nfg-border);
}

.dash-select-group .form-select:focus {
    border-color: var(--nfg-primary);
}

/* 3. Quick Actions Toolbar Strip */
.dash-quick-bar-wrapper {
    background: #ffffff;
    border: 1px solid var(--nfg-border);
    border-radius: 14px;
    padding: 0.5rem 0.85rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    position: relative;
}

.dash-quick-bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.dash-quick-bar::-webkit-scrollbar {
    height: 4px;
}

.dash-quick-bar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dash-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    padding: 0.42rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
    flex-shrink: 0;
}

.dash-quick-btn:hover {
    background: var(--nfg-primary);
    color: #ffffff;
    border-color: var(--nfg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 11, 44, 0.22);
}

.dash-quick-btn:hover i {
    color: #E6CA85 !important;
}

/* 4. Order Intelligence Alert Cards */
.dash-intel-alerts-wrapper {
    margin-bottom: 0.5rem;
}

.dash-intel-alert-card {
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--nfg-border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
    min-height: 72px;
}

.dash-intel-alert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.dash-intel-alert-danger {
    border-left: 4.5px solid #ef4444 !important;
    background: linear-gradient(135deg, #fffafa 0%, #ffffff 100%);
}

.dash-intel-alert-warning {
    border-left: 4.5px solid #f59e0b !important;
    background: linear-gradient(135deg, #fffdfa 0%, #ffffff 100%);
}

.dash-intel-alert-info {
    border-left: 4.5px solid #0ea5e9 !important;
    background: linear-gradient(135deg, #f8fcff 0%, #ffffff 100%);
}

.dash-intel-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 5. Action Required Center (Triage Center) */
.dash-triage-card {
    border: 1px solid #fecaca;
    background: linear-gradient(135deg, #fffdfd 0%, #ffffff 100%);
    border-left: 5px solid #dc2626;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.06);
}

.dash-triage-card-normal {
    border-color: #a7f3d0 !important;
    border-left-color: #10b981 !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%) !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.06) !important;
}

.dash-triage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    min-height: 64px;
}

.dash-triage-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
}

.dash-triage-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

/* 6. Top 5 KPI Cards */
.dash-kpi-card {
    background: #ffffff;
    border: 1px solid var(--nfg-border);
    border-radius: 14px;
    padding: 1.25rem 1.15rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
}

.dash-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px -3px rgba(15, 23, 42, 0.08);
    border-color: rgba(197, 160, 89, 0.5);
}

.dash-kpi-val {
    font-size: clamp(1.2rem, 1.4vw, 1.55rem) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-kpi-card-attention {
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
    border-top: 3.5px solid #d97706;
}

.dash-kpi-subbadge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.72rem;
    color: #475569;
}

.dash-kpi-subbadge.active-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
    font-weight: 600;
}

.dash-kpi-subbadge.active-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
    font-weight: 600;
}

.dash-kpi-subbadge.active-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    font-weight: 600;
}

.dash-kpi-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.dash-kpi-sparkline {
    width: 100%;
    height: 38px;
    overflow: hidden;
    margin-top: 0.5rem;
}

/* 7. Live Today Hero Strip */
.dash-hero-card {
    background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 45%, #42061e 100%) !important;
    border: 1px solid rgba(197, 160, 89, 0.35) !important;
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.dash-hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.dash-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: dashPulse 2s infinite;
}

@keyframes dashPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.dash-today-metric {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    min-height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all var(--nfg-transition-fast);
}

.dash-today-metric:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dash-today-val {
    font-size: clamp(1.1rem, 1.3vw, 1.35rem) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 8. Order Funnel Pipeline */
.dash-funnel-container {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.65rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.dash-funnel-container::-webkit-scrollbar {
    height: 5px;
}

.dash-funnel-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dash-funnel-step {
    flex: 1 1 0;
    min-width: 100px;
    padding: 0.85rem 0.6rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dash-funnel-step:hover {
    background: #ffffff;
    border-color: var(--nfg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(90, 11, 44, 0.08);
}

.dash-funnel-step .fs-5 {
    font-size: 1.15rem !important;
}

.dash-funnel-step .small {
    font-size: 0.72rem !important;
    white-space: nowrap;
}

.dash-funnel-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* 9. Inventory Health */
.dash-health-bar-wrapper {
    height: 14px;
    border-radius: 8px;
    background: #e2e8f0;
    overflow: hidden;
    display: flex;
}

.dash-health-seg-instock { background-color: #10b981; }
.dash-health-seg-lowstock { background-color: #f59e0b; }
.dash-health-seg-outstock { background-color: #ef4444; }

/* 10. Responsive Product Thumbnails */
.dash-prod-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* 11. Interactive SVG Charts Container */
.dash-chart-container {
    position: relative;
    width: 100%;
    min-height: 280px;
}

.dash-chart-tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 100;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease;
    transform: translate(-50%, -100%);
    margin-top: -8px;
}

/* 12. Bangladesh COD Operations Badge & Distinction */
.dash-cod-card {
    border: 1px solid #fed7aa;
    background: linear-gradient(180deg, #fffaf5 0%, #ffffff 100%);
    border-left: 4.5px solid #f97316;
    border-radius: 14px;
}

/* 13. Accounting & Waterfall Summary */
.dash-accounting-card {
    border: 1px solid #c7d2fe;
    background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
    border-radius: 14px;
}

/* 14. Responsive Layout & Mobile Priority Ordering */
@media (max-width: 991.98px) {
    .dash-funnel-container {
        flex-direction: row;
        overflow-x: auto;
    }
}

@media (max-width: 767.98px) {
    .dash-mobile-order-1 { order: 1 !important; } /* Action Required */
    .dash-mobile-order-2 { order: 2 !important; } /* Top KPIs */
    .dash-mobile-order-3 { order: 3 !important; } /* Live Today Strip */
    .dash-mobile-order-4 { order: 4 !important; } /* Inventory Alerts */
    .dash-mobile-order-5 { order: 5 !important; } /* Payments / COD */
    .dash-mobile-order-6 { order: 6 !important; } /* Courier Logistics */
    .dash-mobile-order-7 { order: 7 !important; } /* Main Chart */
    .dash-mobile-order-8 { order: 8 !important; } /* Recent Orders */
    .dash-mobile-order-9 { order: 9 !important; } /* Secondary Analytics */

    .dash-kpi-card {
        padding: 1rem;
        min-height: auto;
    }
    .dash-hero-card {
        padding: 1rem !important;
    }
    .dash-quick-bar {
        padding-bottom: 0.5rem;
    }
    .dash-funnel-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    .dash-funnel-arrow {
        transform: rotate(90deg);
        height: 18px;
    }
    .dash-controls-wrap {
        width: 100%;
        justify-content: stretch;
    }
    .dash-select-group {
        width: 100% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dash-pulse-dot { animation: none; }
    .dash-kpi-card { transition: none; }
    .dash-triage-item { transition: none; }
    .dash-quick-btn { transition: none; }
}

/* ==========================================================================
   GLOBAL RESPONSIVE CRUD & TABLE ENHANCEMENTS (MOBILE & TABLET UI/UX)
   ========================================================================== */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--nfg-radius-sm);
    max-width: 100%;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

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

.table-responsive > .table:not(.table-condensed):not(.table-sm) {
    min-width: 680px;
    margin-bottom: 0;
}

.table-responsive > .table.table-sm {
    min-width: 520px;
}

/* Force horizontal scrolling for tables inside cards on mobile/tablet */
@media (max-width: 991.98px) {
    .nfg-card-body {
        padding: 1rem !important;
    }

    .table th, .table td {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .table td.wrap-cell, .table th.wrap-cell {
        white-space: normal;
        min-width: 140px;
    }

    /* Modal dialogs on mobile */
    .modal-dialog {
        margin: 0.5rem auto;
        max-width: calc(100% - 1rem) !important;
    }

    .modal-content {
        max-height: 92vh;
        overflow-y: auto;
    }

    /* Touch-friendly buttons and controls */
    .btn-sm {
        padding: 0.35rem 0.65rem;
        font-size: 0.8125rem;
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .form-control-sm, .form-select-sm {
        min-height: 34px;
        font-size: 0.85rem;
    }

    /* Admin top header and search */
    #adminHeader {
        height: 56px;
    }

    /* Subheader spacing */
    .admin-subheader {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 575.98px) {
    /* Full width modal footer buttons on small phones */
    .modal-footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    .modal-footer > * {
        width: 100%;
        margin: 0 !important;
    }

    /* Stack filter buttons on mobile */
    .filter-actions-col {
        width: 100% !important;
        justify-content: stretch !important;
    }
    .filter-actions-col .btn {
        flex: 1;
    }
}

/* ==========================================================================
   NOOR FASHION GALLERY — PRINTABLE INVOICE & COURIER PACKING SLIP STYLES
   ========================================================================== */
.nfg-invoice-container {
    background: #ffffff;
    padding: 2.25rem;
    color: #1e293b;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    max-width: 820px;
    margin: 0 auto;
}

.nfg-thermal-container {
    background: #ffffff;
    padding: 1.5rem;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    max-width: 480px;
    margin: 0 auto;
    border: 2px dashed #000000;
    border-radius: 4px;
}

.invoice-header-brand {
    border-bottom: 2px solid #5A0B2C;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
}

.invoice-logo-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    color: #5A0B2C;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.invoice-pill-cod {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #f87171;
}

.invoice-pill-paid {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
}

.thermal-cod-box {
    border: 2px solid #000000;
    padding: 0.75rem;
    text-align: center;
    background: #fafafa;
    margin: 1rem 0;
}

.thermal-cod-box .amount {
    font-size: 1.6rem;
    font-weight: 900;
}

.thermal-barcode-box {
    text-align: center;
    margin: 0.75rem 0;
    letter-spacing: 4px;
    font-family: monospace;
    font-weight: 900;
    font-size: 1.1rem;
}

/* @media print formatting rules */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #adminLayout, #adminSidebar, #adminHeader, #adminFooter, .admin-subheader,
    .sidebar, .topbar, .nfg-modal-backdrop,
    .modal-backdrop, .modal-header, .modal-footer, .btn, .nav, .sidebar-backdrop, #toastContainer,
    .btn-toolbar, .print-hide {
        display: none !important;
        visibility: hidden !important;
    }

    .modal {
        position: static !important;
        display: block !important;
        overflow: visible !important;
        background: none !important;
        padding: 0 !important;
    }

    .modal-dialog {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .modal-content {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        background: transparent !important;
    }

    .modal-body {
        padding: 0 !important;
    }

    #printableOrderDoc {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0.5cm !important;
        box-shadow: none !important;
        border: none !important;
        background: #ffffff !important;
    }

    #printableOrderDoc * {
        visibility: visible !important;
    }

    .table {
        border-color: #000000 !important;
    }

    .table th, .table td {
        border-color: #e2e8f0 !important;
        color: #000000 !important;
    }
}



