/* Bizmart Admin CSS - Enhanced */
:root {
    --biz-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --biz-radius-sm: 8px;
    --biz-radius-md: 10px;
    --biz-radius-lg: 14px;
    --biz-radius-xl: 18px;
    --biz-color-bg-page: #f0f4f8;
    --biz-color-bg-card: #ffffff;
    --biz-color-text-main: #1a2332;
    --biz-color-text-muted: #8c9ab0;
}
body {
    font-family: var(--biz-font-sans);
}

/* Hide default WP admin footer text on Bizmart admin pages (extra selector for compatibility) */
body[class*="bizmart"] #footer-left,
body[class*="bizmart"] #footer-upgrade {
    display: none !important;
}

#biz-supplier-modal {
    display: none;
}

/* Settings Page Enhancements */
.biz-settings-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f7f9fb;
}

.biz-settings-panel {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

/* Invoice Print Styles */
@media print {

    .biz-modal-header,
    .invoice-print-actions,
    .no-print {
        display: none !important;
    }

    body * {
        visibility: hidden;
    }

    .invoice-print-preview,
    .invoice-print-preview * {
        visibility: visible;
    }

    .invoice-print-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
    }
}

/* View Tabs */
.biz-view-tab {
    background: none;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.biz-view-tab:hover {
    color: #1f2937;
    background: #f3f4f6;
}

.biz-view-tab.active {
    color: #059669;
    border-bottom-color: #059669;
}

/* Responsive Tables */
@media screen and (max-width: 768px) {
    .biz-table {
        font-size: 12px;
    }

    .biz-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* DASHBOARD LAYOUT */
.biz-dashboard {
    font-family: 'Inter', system-ui, sans-serif;
    max-width: 100%;
    margin: 0;
    color: #1e293b;
    padding: 20px;
}

.biz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.biz-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.biz-subtitle {
    color: #64748b;
    margin: 5px 0 0 0;
}

.biz-actions {
    display: flex;
    gap: 10px;
}

.biz-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: white;
}

.biz-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
    background: #4f46e5;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.4;
}

.biz-btn.primary {
    background: #4f46e5;
    color: white;
}

.biz-btn.secondary {
    background: white;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.biz-btn:hover {
    transform: translateY(-1px);
    background: #4338ca;
    color: #ffffff;
}

/* GRID SYSTEMS */
.biz-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.biz-grid-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 1000px) {
    .biz-grid-main {
        grid-template-columns: 1fr;
    }
}

/* CARDS */
.biz-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

/* Small info icon next to card labels that shows the data range tooltip */
.biz-range-icon {
    display: inline-block;
    margin-left: 8px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    text-align: center;
    font-weight: 700;
    cursor: help;
    border: 1px solid rgba(67,56,202,0.08);
    vertical-align: middle;
}

/* On small screens reduce spacing */
@media (max-width: 600px) {
    .biz-range-icon { margin-left: 6px; width:16px; height:16px; line-height:16px; font-size:11px; }
}

/* KPI CARDS */
.kpi-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.kpi-icon.income {
    background: #dcfce7;
    color: #15803d;
}

.kpi-icon.expense {
    background: #fee2e2;
    color: #b91c1c;
}

.kpi-icon.profit {
    background: #e0e7ff;
    color: #4338ca;
}

.kpi-icon.debt {
    background: #ffedd5;
    color: #c2410c;
}

.kpi-content {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 2px 0;
}

.kpi-trend {
    font-size: 12px;
    font-weight: 500;
}

.kpi-trend.positive {
    color: #16a34a;
}

.kpi-trend.negative {
    color: #dc2626;
}

/* CHARTS */
.chart-card {
    min-height: 400px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.chart-container {
    position: relative;
    height: 260px;
    width: 100%;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.legend-dot.sales {
    background: #4f46e5;
}

.legend-dot.expenses {
    background: #cbd5e1;
}

/* LISTS */
.biz-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.biz-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.biz-list li:last-child {
    border-bottom: none;
}

.list-name {
    display: block;
    font-weight: 600;
    color: #334155;
}

.list-desc {
    font-size: 12px;
    color: #94a3b8;
}

.list-amount {
    font-weight: 700;
    color: #0f172a;
}

.list-amount.negative {
    color: #dc2626;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-dot.positive {
    background: #16a34a;
}

.status-dot.warning {
    background: #ca8a04;
}

.status-dot.negative {
    background: #dc2626;
}

.card-link {
    display: block;
    margin-top: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
}

/** 
 * FULL WIDTH LAYOUT ENHANCEMENTS 
 * Targets specific WordPress containers to remove margins and paddings
 */
.bizmart-page #wpcontent {
    padding-left: 0 !important;
}

.bizmart-page #wpbody-content {
    padding-bottom: 0 !important;
    float: none !important;
    width: auto !important;
}

.bizmart-page .wrap,
.bizmart-page .biz-container,
.bizmart-page .biz-dashboard,
.bizmart-page .biz-quick-products {
    padding: 30px 50px !important;
    max-width: 1600px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    .bizmart-page .wrap,
    .bizmart-page .biz-container,
    .bizmart-page .biz-dashboard,
    .bizmart-page .biz-quick-products {
        padding: 16px 12px !important;
    }
}

/* Ensure the content fills the bottom space as much as possible */
.bizmart-page #wpfooter {
    display: none !important;
}

/* ────────────────────────────────────────────────────────────────────── */
/* DASHBOARD STYLES (moved from inline <style> in dashboard.php)        */
/* ────────────────────────────────────────────────────────────────────── */

.biz-wrap { max-width:1200px; margin:0 auto; }
.biz-row { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:12px; }

/* Dashboard cards */
#biz-analytics-dashboard .biz-card {
    background:#fff;
    border-radius:12px;
    padding:16px 20px;
    box-shadow:0 2px 10px rgba(0,0,0,0.05);
    flex:1;
    min-width:220px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
#biz-analytics-dashboard .biz-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
#biz-analytics-dashboard .biz-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
}
#biz-analytics-dashboard .biz-card.nocard-accent::before { display: none; }
#biz-analytics-dashboard .biz-card.nocard-accent { overflow: visible; }

.biz-label { font-size:12px; color:#6B7280; margin-bottom:4px; font-weight: 500; }
.biz-value { font-size:20px; font-weight:700; color:#111827; margin-bottom: 2px; }
.biz-small { font-size:11px; color:#6B7280; }

.biz-panel {
    background:#fff;
    padding:16px 20px;
    border-radius:12px;
    box-shadow:0 2px 12px rgba(0,0,0,0.06);
    margin-top:16px;
    transition: all 0.3s ease;
}
.biz-panel:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.10); }

.biz-chip {
    background:#eef2ff;
    color:#1d4ed8;
    padding:7px 14px;
    border-radius:20px;
    text-decoration:none;
    margin-left:0;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 13px;
}
.biz-chip:hover { background: #1d4ed8; color: white; }
.biz-chip.active { background: #1d4ed8; color: white; font-weight: 600; box-shadow: 0 2px 8px rgba(29,78,216,0.3); }

.biz-table { width:100%; border-collapse:collapse; border-radius:8px; overflow: hidden; }
.biz-table th, .biz-table td { padding:10px 12px; border-bottom:1px solid #f1f5f9; text-align:left; vertical-align:middle; font-size: 13px; }
.biz-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}
.biz-table tr:hover td { background: #f9fafb; }

.biz-badge {
    display:inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color:#fff;
    padding:6px 12px;
    border-radius:20px;
    font-weight:600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.biz-flex { display:flex; justify-content:space-between; align-items:center; }

/* Stats grid */
.biz-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.biz-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}
.biz-stat-card:hover { transform: scale(1.01); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.biz-stat-card.positive { background: linear-gradient(135deg, #48bb78 0%, #38b2ac 100%); }
.biz-stat-card.negative { background: linear-gradient(135deg, #f56565 0%, #ed64a6 100%); }
.biz-stat-card.neutral { background: linear-gradient(135deg, #ed8936 0%, #ecc94b 100%); }
.biz-stat-value { font-size: 26px; font-weight: bold; margin: 4px 0; }
.biz-stat-label { font-size: 12px; opacity: 1; font-weight: 500; text-transform: none; letter-spacing: 0; }

/* Compact tables */
.biz-scroll { width:100%; }
.biz-table-compact th, .biz-table-compact td { padding: 8px 10px; font-size:12px; }
.biz-table-compact tbody tr td { border-bottom: 1px solid #eef2f7; }
.biz-scroll thead th { position: sticky; top: 0; z-index: 3; background: #ffffff; }

/* Custom scrollbars */
.biz-scroll::-webkit-scrollbar { width: 10px; height:10px; }
.biz-scroll::-webkit-scrollbar-track { background: transparent; }
.biz-scroll::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.12); border-radius: 8px; }
.biz-scroll:hover::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.18); }
.biz-scroll { scrollbar-width: thin; scrollbar-color: rgba(15,23,42,0.12) transparent; }

/* Enhanced header */
.biz-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 32px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.biz-header h1 { margin: 0; font-size: 24px; font-weight: 700; color: #ffffff !important; }
.biz-header p { margin: 6px 0 0; opacity: 0.9; font-size: 14px; color: #ffffff !important; }

/* Responsive */
@media (max-width:720px) {
    .biz-value { font-size:20px; }
    .biz-stat-value { font-size:24px; }
}
@media (max-width: 768px) {
    .biz-table, .biz-table-compact {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
#biz-analytics-dashboard .biz-card,
#biz-analytics-dashboard .biz-panel {
    animation: fadeInUp 0.4s ease-out;
}

/* Period metric cards */
.biz-period-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 900px) {
    .biz-period-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .biz-period-grid { grid-template-columns: 1fr; }
}
.biz-period-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 3px solid #6366f1;
    border-radius: 10px;
    padding: 12px 16px;
    transition: box-shadow 0.2s;
}
.biz-period-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.biz-period-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
}
.biz-period-value {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}
.biz-period-sub {
    font-size: 11px;
    color: #9ca3af;
}
.biz-range-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 50%;
    background: #eef2ff;
    color: #6366f1;
    font-size: 10px;
    text-align: center;
    font-weight: 700;
    cursor: help;
    vertical-align: middle;
    margin-left: 4px;
}
.biz-period-card:hover .biz-range-icon { background: #6366f1; color: #fff; }

/* Dashboard button variants */
.biz-btn-secondary {
    background: white !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}
.biz-btn-secondary:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
}
.biz-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}
.biz-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

/* ==========================================================================
   BIZMART UNIFIED DESIGN SYSTEM
   ========================================================================== */

/* Page Background & Base wash */
body.bizmart-page,
.bizmart-page #wpwrap,
.bizmart-page #wpbody,
.bizmart-page #wpbody-content,
.bizmart-page #wpcontent,
.biz-analytics-wrapper,
#biz-analytics-dashboard,
.biz-dashboard {
    background: #f0f4f8 !important;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #1a2332;
    -webkit-font-smoothing: antialiased;
}

/* Typography Overrides */
#biz-analytics-dashboard h1,
#biz-analytics-dashboard h2,
#biz-analytics-dashboard h3,
.biz-premium-panel-title {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #1a2332 !important;
}

/* Accent Modules */
.kpi-blue {
    --accent-base: #3a8ef6;
    --accent-border: #b8d4f8;
    --accent-badge-bg: #e8f1fd;
    --accent-glow: rgba(58,142,246,0.13);
}
.kpi-violet {
    --accent-base: #7c5cf8;
    --accent-border: #c4b8f8;
    --accent-badge-bg: #eeebfd;
    --accent-glow: rgba(124,92,248,0.13);
}
.kpi-teal {
    --accent-base: #10b981;
    --accent-border: #9de8cb;
    --accent-badge-bg: #e1f5ee;
    --accent-glow: rgba(16,185,129,0.13);
}
.kpi-amber {
    --accent-base: #f59e0b;
    --accent-border: #fcd397;
    --accent-badge-bg: #fef3e2;
    --accent-glow: rgba(245,158,11,0.13);
}

/* KPI Card Grid */
.biz-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 2rem;
}
@media (max-width: 768px) {
    .biz-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .biz-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* KPI Card Base Component */
.biz-kpi-card {
    border-radius: 18px;
    border: 1.5px solid var(--accent-border);
    background: #ffffff;
    padding: 18px 16px 16px;
    min-height: 140px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}
.biz-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* Glow Effect */
.biz-kpi-card-glow {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--accent-base);
    opacity: 0.13;
    filter: blur(24px);
    pointer-events: none;
    z-index: 1;
}

/* Top Row styling */
.biz-kpi-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 2;
}
.biz-kpi-card-label {
    font-size: 12px;
    font-weight: 500;
    color: #8c9ab0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.biz-kpi-info-trigger {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid #c5cfe0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-style: normal;
    color: #8c9ab0;
    cursor: help;
}

.biz-kpi-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-badge-bg);
    color: var(--accent-base);
    display: flex;
    align-items: center;
    justify-content: center;
}
.biz-kpi-card-icon span {
    font-size: 18px;
}

/* Main Value */
.biz-kpi-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a2332;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin: 8px 0 6px;
    z-index: 2;
}
.biz-kpi-card-value .biz-curr-suffix {
    font-size: 18px;
    font-weight: 700;
}

/* Bottom Row */
.biz-kpi-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    z-index: 2;
}

/* Profit block */
.biz-kpi-card-profit {
    display: flex;
    flex-direction: column;
}
.biz-kpi-profit-val {
    font-size: 12px;
    font-weight: 600;
}
.biz-kpi-profit-val.positive {
    color: #10b981;
}
.biz-kpi-profit-val.negative {
    color: #ef4444;
}
.biz-kpi-profit-lbl {
    font-size: 10px;
    color: #8c9ab0;
    margin-top: 1px;
}

/* Orders block */
.biz-kpi-card-orders {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}
.biz-kpi-orders-val {
    font-size: 13px;
    font-weight: 600;
    color: #1a2332;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.biz-kpi-orders-val span {
    color: var(--accent-base);
}
.biz-kpi-orders-lbl {
    font-size: 10px;
    color: #8c9ab0;
}

/* Data table custom styling */
.biz-premium-panel,
.biz-panel {
    background: #ffffff !important;
    border-radius: 14px !important;
    border: 1px solid #e8edf4 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02) !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}

.biz-premium-table-container {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e8edf4;
    width: 100%;
}

.biz-premium-table,
.biz-table {
    width: 100%;
    border-collapse: collapse;
}

.biz-premium-table thead tr th,
.biz-table thead tr th {
    background: #f8fafc !important;
    border-bottom: 1.5px solid #e8edf4 !important;
    padding: 10px 12px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    color: #8c9ab0 !important;
}

.biz-premium-table tbody tr td,
.biz-table tbody tr td {
    padding: 10px 12px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #1a2332 !important;
    border-bottom: 0.5px solid #f0f4f8 !important;
}

.biz-premium-table tbody tr:hover td,
.biz-table tbody tr:hover td {
    background: #f8fafc !important;
}

/* Table links */
.biz-premium-table-link,
.biz-zw-table-link {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}
.biz-premium-table-link:hover,
.biz-zw-table-link:hover {
    text-decoration: underline;
}

/* Status Badges */
.biz-status-badge {
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}
.biz-status-badge.paid,
.biz-status-badge.active {
    background: #e1f5ee;
    color: #0f6e56;
}
.biz-status-badge.unpaid,
.biz-status-badge.pending {
    background: #fef3e2;
    color: #854f0b;
}
.biz-status-badge.draft {
    background: #f0f4f8;
    color: #5f6b7a;
}
.biz-status-badge.cancelled {
    background: #fde8e8;
    color: #a32d2d;
}

/* Buttons */
.biz-btn-primary {
    background: var(--accent-base) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 8px 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: transform 0.1s, filter 0.1s !important;
    display: inline-block !important;
    text-decoration: none !important;
}
.biz-btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.biz-btn-primary:active {
    transform: scale(0.97);
}

.biz-btn-secondary-outline {
    background: transparent !important;
    color: var(--accent-base) !important;
    border: 1.5px solid var(--accent-border) !important;
    border-radius: 10px !important;
    padding: 7px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: transform 0.1s, filter 0.1s !important;
    display: inline-block !important;
    text-decoration: none !important;
}
.biz-btn-secondary-outline:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.biz-btn-secondary-outline:active {
    transform: scale(0.97);
}

/* Form Inputs */
.biz-form-input,
#biz-analytics-dashboard input[type="text"],
#biz-analytics-dashboard input[type="date"],
#biz-analytics-dashboard select {
    border: 1.5px solid #d8e4f0 !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    color: #1a2332 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}
.biz-form-input:focus,
#biz-analytics-dashboard input[type="text"]:focus,
#biz-analytics-dashboard input[type="date"]:focus,
#biz-analytics-dashboard select:focus {
    border-color: var(--accent-base) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
    outline: none !important;
}

/* 2 Column Layout for dashboard tables */
.biz-premium-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 1024px) {
    .biz-premium-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Nav Highlights */
#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu {
    border-left: 3px solid #3a8ef6 !important;
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
    .biz-dark-theme-check { /* marker */ }
    
    .bizmart-page #wpcontent,
    #biz-analytics-dashboard,
    .biz-dashboard {
        background: #0f1924 !important;
        color: #e4ecf7 !important;
    }

    #biz-analytics-dashboard h1,
    #biz-analytics-dashboard h2,
    #biz-analytics-dashboard h3,
    .biz-premium-panel-title {
        color: #e4ecf7 !important;
    }

    /* KPI Card in Dark Mode */
    .biz-kpi-card {
        background: #172031 !important;
        border-color: rgba(var(--accent-base), 0.3) !important;
    }
    .biz-kpi-card-value {
        color: #e4ecf7 !important;
    }
    .biz-kpi-orders-val {
        color: #e4ecf7 !important;
    }

    /* Panels & Tables in Dark Mode */
    .biz-premium-panel,
    .biz-panel {
        background: #172031 !important;
        border-color: #2a3d58 !important;
    }

    .biz-premium-table-container {
        border-color: #2a3d58;
    }

    .biz-premium-table thead tr th,
    .biz-table thead tr th {
        background: #1e2d42 !important;
        border-bottom-color: #2a3d58 !important;
        color: #6b7e99 !important;
    }

    .biz-premium-table tbody tr td,
    .biz-table tbody tr td {
        color: #e4ecf7 !important;
        border-bottom-color: #1e2d42 !important;
    }

    .biz-premium-table tbody tr:hover td,
    .biz-table tbody tr:hover td {
        background: #1e2d42 !important;
    }

    /* Inputs in Dark Mode */
    .biz-form-input,
    #biz-analytics-dashboard input[type="text"],
    #biz-analytics-dashboard input[type="date"],
    #biz-analytics-dashboard select {
        background: #1e2d42 !important;
        border-color: #2a3d58 !important;
        color: #e4ecf7 !important;
    }

    .biz-kpi-card-glow {
        opacity: 0.18;
    }
}

/* ==========================================================================
   UNIFIED TABS & NAVIGATION OVERRIDES
   ========================================================================== */
.biz-fin-tabs,
.biz-cf-nav,
.biz-view-tabs {
    font-family: var(--biz-font-sans) !important;
    display: flex !important;
    gap: 8px !important;
    border-bottom: 1px solid #e8edf4 !important;
    padding-bottom: 8px !important;
    margin-bottom: 20px !important;
    flex-wrap: wrap !important;
}

.biz-tabs-container {
    font-family: var(--biz-font-sans) !important;
    display: grid !important;
    grid-template-columns: 300px 1fr !important;
    gap: 24px !important;
    align-items: start !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.biz-nav-sidebar {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    border-bottom: none !important;
    border-right: 1.5px solid #e8edf4 !important;
    padding: 12px !important;
    padding-right: 14px !important;
    padding-bottom: 0 !important;
    min-width: unset !important;
    width: 300px !important;
    position: sticky !important;
    top: 2rem !important;
    background: var(--bg-surface, #fff) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    border: 1px solid #e8edf4 !important;
}

.biz-nav-item,
.biz-fin-tab,
.biz-cf-nav-btn,
.biz-view-tab {
    font-family: var(--biz-font-sans) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #5f6b7a !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border: none !important;
    background: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
}

.biz-nav-item:hover,
.biz-fin-tab:hover,
.biz-cf-nav-btn:hover,
.biz-view-tab:hover {
    background: #f0f4f8 !important;
    color: #1a2332 !important;
    text-decoration: none !important;
}

.biz-nav-item.active,
.biz-fin-tab.active,
.biz-cf-nav-btn.active,
.biz-view-tab.active {
    background: var(--accent-badge-bg, #e8f1fd) !important;
    color: var(--accent-base, #3a8ef6) !important;
    font-weight: 600 !important;
}

@media (max-width: 900px) {
    .biz-tabs-container {
        grid-template-columns: 1fr !important;
    }
    .biz-nav-sidebar {
        position: static !important;
        width: 100% !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        border-right: none !important;
        border-bottom: 1.5px solid #e8edf4 !important;
        padding: 8px !important;
    }
    .biz-nav-item {
        white-space: nowrap !important;
        width: auto !important;
    }
}

/* Adjustments for WooCommerce native items styling integration */
#biz-analytics-dashboard .biz-chip-row {
    font-family: var(--biz-font-sans) !important;
    gap: 8px !important;
}
#biz-analytics-dashboard .biz-chip {
    font-family: var(--biz-font-sans) !important;
    font-size: 13px !important;
    border-radius: var(--biz-radius-sm) !important;
    padding: 7px 14px !important;
}

@media (max-width: 600px) {
    .biz-fin-tabs,
    .biz-cf-nav,
    .biz-view-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px !important;
        border-bottom: 1.5px solid #e8edf4 !important;
        width: 100% !important;
    }
    .biz-fin-tab,
    .biz-cf-nav-btn,
    .biz-view-tab {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        width: auto !important;
    }
}

/* Modern Dashboard Grid Layout */
.biz-dash-layout-grid-two {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.biz-dash-layout-grid-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .biz-dash-layout-grid-two,
    .biz-dash-layout-grid-half {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

