/* ==========================================================================
   E-Com Orbit Dashboard - CSS Stylesheet
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Reset and Core Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Sidebar Dimensions */
    --sidebar-width: 60px;
    --sidebar-width-collapsed: 60px;
    --sidebar-width-expanded: 240px;

    /* Color Palette */
    --bg-main: #f1f5f9;
    --surface: #ffffff;
    --sidebar-bg: #09081e;
    --sidebar-bg-to: #110e2f;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: #4f46e5;
    
    /* Semantic Colors */
    --primary: #4f46e5;
    --primary-light: #eef2ff;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #eff6ff;
    
    /* Text Colors */
    --text-dark: #0f172a;
    --text-medium: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Borders and Shadows */
    --border:  #4f46e5;        /* Soft indigo/blue themed border */
    --border-color:  #4f46e5;  /* Soft indigo/blue themed border */
    --card-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 4px 6px -1px rgba(0,0,0,0.04), 0 10px 15px -3px rgba(0,0,0,0.03);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-medium);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-to) 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Brand Header */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-left: 6px;
}
.brand-logo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-info h1 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 60%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand-info p {
    font-size: 9px;
    color: var(--text-light);
    opacity: 0.7;
    margin-top: 1px;
}

/* Profile Card with Interactive Upload */
.profile-card {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(15, 12, 47, 0.9) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}
.profile-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    pointer-events: none;
}
.profile-avatar-wrapper {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid #6366f1;
    transition: transform var(--transition-normal);
    background-color: rgba(255, 255, 255, 0.05);
}
.profile-avatar-wrapper:hover {
    transform: scale(1.05);
}
.profile-avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}
.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.avatar-overlay svg {
    width: 16px;
    height: 16px;
    color: #fff;
}
.profile-upload-input {
    display: none;
}
.profile-info {
    flex-grow: 1;
    min-width: 0;
}
.profile-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.profile-dropdown-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}
.profile-dropdown-btn:hover {
    color: #fff;
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
    flex-grow: 1;
}
.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
}
.menu-item a svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    flex-shrink: 0 !important;
    transition: transform var(--transition-normal);
}
.menu-item a:hover {
    color: #ffffff;
    background-color: var(--sidebar-hover);
}
.menu-item a:hover svg {
    transform: translateX(2px);
}
.menu-item.active a {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sidebar-active) 0%, #312e81 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    font-weight: 600;
}
.menu-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}
.menu-badge.purple {
    background-color: #6366f1;
    color: #ffffff;
}
.menu-badge.green {
    background-color: var(--success);
    color: #ffffff;
}

/* Plan Panel */
.plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-top: auto;
    margin-bottom: 16px;
}
.plan-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    opacity: 0.6;
}
.plan-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 4px 0 12px 0;
}
.plan-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-normal);
    text-decoration: none;
}
.plan-btn:hover {
    background: #ffffff;
    color: var(--sidebar-bg);
    border-color: #ffffff;
}

/* Support Panel */
.support-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 8px;
    font-size: 13px;
    color: #94a3b8;
    text-decoration: none;
    transition: color var(--transition-fast);
}
.support-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}
.support-link:hover {
    color: #ffffff;
}
.support-text span {
    display: block;
    font-size: 10px;
    opacity: 0.5;
}

/* ==========================================================================
   Main Content Area
   ========================================================================= */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px 32px;
    gap: 24px;
}

/* Top Navigation Bar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #ffffff;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.menu-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
}
.menu-toggle svg {
    width: 24px;
    height: 24px;
}
.page-title h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.breadcrumbs span.separator {
    color: var(--text-light);
}
.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.breadcrumbs a:hover {
    color: var(--primary);
}

/* Search Box */
.search-box {
    position: relative;
    width: 320px;
    display: flex;
    align-items: center;
}
.search-input {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 10px 40px 10px 38px;
    font-size: 13px;
    color: var(--text-dark);
    outline: none;
    transition: all var(--transition-normal);
}
.search-input:focus {
    background-color: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}
.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    width: 16px;
    height: 16px;
}
.search-shortcut {
    position: absolute;
    right: 12px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

/* Topbar Actions */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Date Selector Dropdown */
.date-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    transition: all var(--transition-normal);
}
.date-selector:hover {
    border-color: var(--text-light);
    background-color: var(--bg-main);
}
.date-selector svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Notification Bell */
.notification-bell {
    position: relative;
    background: none;
    border: 1px solid var(--border-color);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-normal);
}
.notification-bell:hover {
    background-color: var(--bg-main);
    color: var(--text-dark);
}
.notification-bell svg {
    width: 20px;
    height: 20px;
}
.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--primary);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* User Account Details */
.user-account {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 16px;
    border-left: 1px solid var(--border-color);
}
.user-avatar-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
}
.user-avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}
.user-details {
    display: flex;
    flex-direction: column;
}
.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}
.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   Metrics Grid
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.metric-card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
}
.metric-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.metric-icon-box.sales { background-color: #eef2ff; color: #4f46e5; }
.metric-icon-box.orders { background-color: #ecfdf5; color: #10b981; }
.metric-icon-box.customers { background-color: #fffbeb; color: #f59e0b; }
.metric-icon-box.conversion { background-color: #fdf2f8; color: #ec4899; }
.metric-icon-box.revenue { background-color: #eff6ff; color: #3b82f6; }

.metric-icon-box svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}
.metric-info {
    flex-grow: 1;
}
.metric-title {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}
.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 4px 0;
}
.metric-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
}
.metric-trend.up { color: var(--success); }
.metric-trend.down { color: var(--danger); }
.metric-trend span.trend-text {
    color: var(--text-light);
    font-weight: 400;
}

/* ==========================================================================
   Dashboard Main 3-Column Grid Layout
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1.05fr 0.95fr;
    gap: 24px;
}

.dashboard-card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.card-action-select {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    outline: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}
.card-action-select:hover {
    border-color: var(--text-light);
}

.card-action-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}
.card-action-link:hover {
    opacity: 0.8;
}

/* Sales Overview Card Specifics */
.chart-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.legend-dot.this-period { background-color: var(--primary); }
.legend-dot.prev-period { background-color: var(--text-light); }

.chart-container {
    width: 100%;
    position: relative;
    flex-grow: 1;
    min-height: 220px;
}

/* Chart SVGs styling */
.chart-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}
.chart-grid-line {
    stroke: var(--border-color);
    stroke-width: 1;
}
.chart-axis-text {
    font-size: 10px;
    fill: var(--text-light);
    font-weight: 500;
}
.chart-path-main {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chart-path-prev {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
    stroke-linecap: round;
}
.chart-gradient-fill {
    fill: url(#chart-gradient);
    opacity: 0.08;
}
.chart-node {
    fill: #ffffff;
    stroke: var(--primary);
    stroke-width: 2;
    cursor: pointer;
    transition: r var(--transition-fast), fill var(--transition-fast);
}
.chart-node:hover {
    r: 6;
    fill: var(--primary);
}

/* Tooltip on SVG Chart */
.chart-tooltip-bubble {
    position: absolute;
    background-color: var(--sidebar-bg);
    color: #ffffff;
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    z-index: 10;
    left: 70%;
    top: 35%;
    transform: translate(-50%, -100%) translateY(-8px);
}
.chart-tooltip-bubble::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px 4px 0;
    border-style: solid;
    border-color: var(--sidebar-bg) transparent;
    display: block;
    width: 0;
}
.chart-tooltip-bubble .tooltip-date {
    font-size: 8.5px;
    opacity: 0.6;
    margin-bottom: 2px;
}
.chart-tooltip-bubble .tooltip-value {
    font-weight: 700;
    color: #a5b4fc;
}

/* Order Summary Donut Card */
.order-summary-card {
    align-items: center;
}
.donut-chart-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 12px 0 20px 0;
}
.donut-svg {
    transform: rotate(-90deg);
}
.donut-segment {
    fill: transparent;
    stroke-linecap: round;
    transition: stroke-dasharray var(--transition-normal);
}
.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.donut-center-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}
.donut-center-lbl {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
    text-transform: uppercase;
}

.donut-legend {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}
.donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
}
.donut-legend-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-muted);
}
.donut-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.donut-legend-dot.completed { background-color: var(--success); }
.donut-legend-dot.processing { background-color: var(--primary); }
.donut-legend-dot.pending { background-color: var(--warning); }
.donut-legend-dot.cancelled { background-color: var(--danger); }

.donut-legend-stats {
    font-weight: 700;
    color: var(--text-dark);
}
.donut-legend-percent {
    font-weight: 500;
    color: var(--text-light);
    margin-left: 4px;
}

.card-footer-btn {
    width: 100%;
    border: none;
    background-color: #f8fafc;
    color: var(--text-medium);
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: 14px;
    transition: all var(--transition-normal);
    text-align: center;
}
.card-footer-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Connected Channels Card */
.channels-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
    width: 100%;
}
.channel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.channel-row:last-child {
    border-bottom: none;
}
.channel-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.channel-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.channel-logo.fb { background-color: #eff6ff; color: #1877f2; }
.channel-logo.ig { background-color: #fff1f2; color: #e1306c; }
.channel-logo.google { background-color: #f8fafc; color: #ea4335; }
.channel-logo.amazon { background-color: #fffbeb; color: #ff9900; }
.channel-logo.flipkart { background-color: #f0fdf4; color: #2874f0; }

.channel-logo svg {
    width: 18px;
    height: 18px;
}
.channel-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}
.channel-status {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 1px;
}
.channel-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}
.add-channel-btn {
    border: 1px dashed var(--primary);
    background-color: transparent;
    color: var(--primary);
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    transition: all var(--transition-normal);
}
.add-channel-btn:hover {
    background-color: var(--primary-light);
}

/* ==========================================================================
   Table & Second Grid Components
   ========================================================================== */
.table-container {
    width: 100%;
    overflow-x: auto;
}
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.dashboard-table th {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}
.dashboard-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-medium);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.dashboard-table tr:last-child td {
    border-bottom: none;
}

/* Recent Orders Specifics */
.customer-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-dark);
}
.customer-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main);
}
.customer-icon svg {
    width: 14px;
    height: 14px;
}
.order-id {
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.order-id:hover {
    color: var(--primary);
}
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}
.badge.completed { background-color: var(--success-light); color: var(--success); }
.badge.processing { background-color: var(--info-light); color: var(--info); }
.badge.pending { background-color: var(--warning-light); color: var(--warning); }
.badge.cancelled { background-color: var(--danger-light); color: var(--danger); }

/* Top Performing Products Card */
.product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-dark);
}
.product-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-img svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
}
.product-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Right Panel Column: Notifications + Quick Actions */
.right-panel-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Notifications Specifics */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.notification-item {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.notification-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.notif-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notif-icon-box.low-stock { background-color: var(--danger-light); color: var(--danger); }
.notif-icon-box.order { background-color: var(--warning-light); color: var(--warning); }
.notif-icon-box.campaign { background-color: var(--success-light); color: var(--success); }
.notif-icon-box.sync { background-color: var(--info-light); color: var(--info); }

.notif-icon-box svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}
.notif-details {
    flex-grow: 1;
}
.notif-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
}
.notif-time {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 3px;
}

/* Quick Actions Specifics */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.action-item {
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 12px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    border: 1px solid transparent;
}
.action-item:hover {
    background-color: #ffffff;
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}
.action-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}
.action-item:hover .action-icon {
    background-color: #ffffff;
}
.action-icon.add-product { background-color: #eef2ff; color: #4f46e5; }
.action-icon.campaign { background-color: #ecfdf5; color: #10b981; }
.action-icon.analytics { background-color: #fffbeb; color: #f59e0b; }
.action-icon.inventory { background-color: #eff6ff; color: #3b82f6; }

.action-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}
.action-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-medium);
}

/* ==========================================================================
   Bottom Promo Banner
   ========================================================================== */
.bottom-banner {
    grid-column: span 3;
    background: linear-gradient(135deg, #4f46e5 0%, #312e81 100%);
    border-radius: var(--radius-lg);
    padding: 17px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.3);
}

.bottom-banner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' opacity='0.15'%3E%3Cpath d='M10 90 Q 60 40, 110 70 T 210 30 T 290 80' fill='none' stroke='white' stroke-width='4'/%3E%3C/svg%3E") no-repeat right center;
    background-size: contain;
    pointer-events: none;
}
.banner-left {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}
.rocket-svg-wrapper {
    width: 56px;
    height: 56px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
.rocket-svg-wrapper svg {
    width: 32px;
    height: 32px;
    fill: none;
}
.banner-info h3 {
    font-size: 16px;
    font-weight: 700;
}
.banner-info p {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}
.banner-btn {
    background-color: #ffffff;
    color: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 2;
}
.banner-btn:hover {
    background-color: var(--primary-light);
    transform: translateX(3px);
}
.banner-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 1400px) {
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .metric-card:nth-child(4),
    .metric-card:nth-child(5) {
        grid-column: span 1;
    }
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sales-overview-card {
        grid-column: span 2;
    }
    .order-summary-card {
        grid-column: span 1;
    }
    .channels-card {
        grid-column: span 1;
    }
    .recent-orders-card {
        grid-column: span 2;
    }
    .top-products-card {
        grid-column: span 1;
    }
    .right-panel-column {
        grid-column: span 1;
    }
    .bottom-banner {
        grid-column: span 2;
    }
}

@media (max-width: 992px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        width: var(--sidebar-width);
        background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-to) 100%);
        color: #ffffff;
        display: flex;
        flex-direction: column;
        padding: 20px 16px;
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 100;
        overflow-y: auto;
        border-right: 1px solid rgba(255, 255, 255, 0.05);
        flex-shrink: 0;
    }
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        margin-bottom: 12px;
    }
    .menu-item a {
        padding: 8px 12px;
    }
    .plan-card, .support-link {
        display: none;
    }
    .main-content {
    padding: 16px;
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
    transition: margin-left 0.2s cubic-bezier(0.4, 0, 0.2, 1), width 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .search-box {
        width: 100%;
    }
    .topbar-right {
        justify-content: space-between;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .sales-overview-card,
    .order-summary-card,
    .channels-card,
    .recent-orders-card,
    .top-products-card,
    .right-panel-column,
    .bottom-banner {
        grid-column: span 1;
    }
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bottom-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .banner-btn {
        justify-content: center;
    }
}

/* ==========================================================================
   PREMIUM ENTERPRISE SAAS DESIGN OVERRIDES
   ========================================================================== */

/* 1. Global Mesh Gradient Background & Page Load Animations */
body {
    background-color: #f8fafc !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.04) 0px, transparent 50%),
        radial-gradient(at 50% 0%, rgba(139, 92, 246, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(249, 115, 22, 0.03) 0px, transparent 50%) !important;
    background-attachment: fixed !important;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-body {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 2. Base Dashboard Shell Layout */
.topbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid #c7d2fe !important;
    padding: 16px 28px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(9, 8, 30, 0.02) !important;
}

.topbar-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.3px !important;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.page-body {
    padding: 28px;
    flex: 1;
}

/* 3. Cards Redesign with Layered Depth & Lift Interactions */
.stat-card, .kpi-card, .marketplace-card, .operation-card, 
.activity-timeline-card, .dashboard-card, .form-card, .data-table, .metric-card {
    background: #ffffff !important;
    border: 1px solid #c7d2fe !important; /* Premium soft indigo border line */
    border-radius: 16px !important;
    box-shadow: 0 1px 3px rgba(9, 8, 30, 0.01), 0 10px 20px -5px rgba(9, 8, 30, 0.03) !important;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.22s !important;
}

.stat-card:hover, .kpi-card:hover, .marketplace-card:hover, .operation-card:hover, 
.activity-timeline-card:hover, .dashboard-card:hover, .form-card:hover, .metric-card:hover {
    transform: translateY(-4px) !important;
    border-color: #a5b4fc !important;
    box-shadow: 0 12px 32px -4px rgba(79, 70, 229, 0.08), 
                0 4px 12px -2px rgba(9, 8, 30, 0.03) !important;
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.02);
}

.stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.stat-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
}

/* 4. Modern Forms, Inputs, & Validations */
.form-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #c7d2fe;
    padding: 28px;
}

.form-control, .form-select, .form-input {
    background-color: #f8fafc !important;
    border: 1.5px solid #c7d2fe !important;
    border-radius: 10px !important;
    padding: 10px 16px !important;
    font-size: 0.88rem !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.form-control:focus, .form-select:focus, .form-input:focus {
    background-color: #ffffff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12) !important;
    outline: none !important;
}

.form-label {
    font-weight: 700 !important;
    font-size: 0.76rem !important;
    color: #475569 !important;
    margin-bottom: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
}

/* 5. Custom Sidebar Navigation Updates (Gradients & Animated indicators) */
.sidebar {
    background: linear-gradient(180deg, #09081e 0%, #110e2f 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.sidebar-menu .menu-item a {
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
    position: relative;
    padding: 10px 14px !important;
}

.sidebar-menu .menu-item a:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.sidebar-menu .menu-item.active a {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(79, 70, 229, 0.35) !important;
    font-weight: 600 !important;
}

.profile-card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
}

/* Glassmorphism for notifications dropdown widget */
#notif-dropdown {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid #c7d2fe !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 30px rgba(9, 8, 30, 0.12) !important;
}

/* 6. Clean Enterprise Tables with Opaque Headers & Hover Rows */
.data-table, .listings-table-card {
    overflow: hidden !important;
}

.data-table .table, .listings-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.data-table .table thead th, .listings-table th {
    background-color: #f8fafc !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    font-size: 0.76rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    border-bottom: 2px solid #c7d2fe !important;
    padding: 16px 20px !important;
}

.data-table .table tbody td, .listings-table td {
    padding: 16px 20px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 0.88rem !important;
    color: #334155 !important;
}

.data-table .table tbody tr:hover, .listings-table tbody tr:hover {
    background-color: #f8fafc !important;
}

.product-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #c7d2fe;
}

.product-thumb-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.1rem;
    border: 1px solid #c7d2fe;
}

/* 7. Premium Action Button Gradients */
.btn-primary-custom, .btn-primary-connect {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    border: none !important;
    color: white !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 10px 24px !important;
}

.btn-primary-custom:hover, .btn-primary-connect:hover {
    background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35) !important;
    color: white !important;
}

/* 8. Standardized Status Badges & Chips */
.badge-active, .badge-status.success, .badge-health.healthy {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    padding: 4px 12px !important;
    font-size: 0.72rem !important;
}

.badge-inactive, .badge-status.danger, .badge-status.failed {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    padding: 4px 12px !important;
    font-size: 0.72rem !important;
}

.badge-pending, .badge-status.warning, .badge-health.attention {
    background-color: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid #fde68a !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    padding: 4px 12px !important;
    font-size: 0.72rem !important;
}

/* 9. Sync Card Components styling */
.sync-channel-card {
    background: #f8fafc !important;
    border: 1px solid #c7d2fe !important;
    border-radius: 12px !important;
    padding: 11px !important;
    transition: all 0.2s ease !important;
}

.sync-channel-card:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(9, 8, 30, 0.04) !important;
}

.sync-channel-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sync-channel-logo {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sync-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sync-status-dot.connected { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.sync-status-dot.error { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.sync-status-dot.untested { background: #9ca3af; box-shadow: 0 0 0 3px rgba(156,163,175,0.15); }

.sync-last-checked {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 6px;
}

.btn-sync-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-sync-action:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    background: #f5f3ff;
}

.btn-sync-test-link {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin-top: 8px;
    font-size: 0.72rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
}

.btn-sync-test-link:hover {
    color: #4f46e5;
}

@media (min-width: 992px) {
    .sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        z-index: 1000 !important;
    }
    .main-content {
        margin-left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
        transition: margin-left 0.2s cubic-bezier(0.4, 0, 0.2, 1), width 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
}

/* Override sidebar-width variable when expanded on hover */
body.sidebar-expanded {
    --sidebar-width: var(--sidebar-width-expanded) !important;
}

/* Sidebar default collapsed layout (when NOT expanded) */
body:not(.sidebar-expanded) .sidebar {
    width: var(--sidebar-width-collapsed) !important;
    padding: 20px 8px !important;
    overflow: visible !important;
}

/* Hide text labels, plan card, support copy in default collapsed state */
body:not(.sidebar-expanded) .sidebar .brand-info,
body:not(.sidebar-expanded) .sidebar .profile-info,
body:not(.sidebar-expanded) .sidebar .menu-item a span,
body:not(.sidebar-expanded) .sidebar .menu-badge,
body:not(.sidebar-expanded) .sidebar .plan-card,
body:not(.sidebar-expanded) .sidebar .support-link span,
body:not(.sidebar-expanded) .sidebar .support-link .support-text {
    display: none !important;
}

/* Center elements and clean brand logo in default collapsed state */
body:not(.sidebar-expanded) .sidebar .brand {
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

body:not(.sidebar-expanded) .sidebar .brand-logo {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

body:not(.sidebar-expanded) .sidebar .brand-logo svg {
    width: 32px !important;
    height: 32px !important;
}

body:not(.sidebar-expanded) .sidebar .profile-card {
    justify-content: center !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
}

body:not(.sidebar-expanded) .sidebar .profile-avatar-wrapper {
    width: 32px !important;
    height: 32px !important;
    margin: 0 auto !important;
}

body:not(.sidebar-expanded) .sidebar-menu-scroll,
body:not(.sidebar-expanded) .sidebar-menu {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body:not(.sidebar-expanded) .sidebar .menu-item {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

body:not(.sidebar-expanded) .sidebar .menu-item a {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px !important;
    gap: 0 !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto !important;
}

body:not(.sidebar-expanded) .sidebar .support-link {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px !important;
    gap: 0 !important;
    width: 40px !important;
    height: 40px !important;
    margin: 8px auto 0 auto !important;
}

/* Sidebar Unified Header Card Component */
.sidebar-header-card {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-bg-to) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-lg) !important;
    padding: 14px !important;
    position: relative !important;
    z-index: 500 !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    transition: padding 0.2s cubic-bezier(0.4, 0, 0.2, 1), gap 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body:not(.sidebar-expanded) .sidebar-header-card {
    padding: 10px 4px !important;
    gap: 8px !important;
}

.sidebar-header-card .brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 0 !important;
    padding-left: 0 !important;
    width: 100% !important;
    justify-content: flex-start !important;
}

.sidebar-header-card .brand-logo {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    transition: width 0.2s ease, height 0.2s ease !important;
}

.sidebar-header-card .brand-logo svg {
    width: 36px !important;
    height: 36px !important;
    transition: width 0.2s ease, height 0.2s ease !important;
}

.sidebar-header-divider {
    height: 1px !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    width: 100% !important;
    margin: 2px 0 !important;
    transition: margin 0.2s ease !important;
}

.sidebar-header-card .profile-card {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    justify-content: flex-start !important;
}

.sidebar-header-card .profile-avatar-wrapper {
    flex-shrink: 0 !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin: 0 !important;
    transition: width 0.2s ease, height 0.2s ease !important;
}

/* Collapsed Overrides for Header Card elements */
body:not(.sidebar-expanded) .sidebar-header-card .brand {
    justify-content: center !important;
}

body:not(.sidebar-expanded) .sidebar-header-card .brand-logo {
    width: 32px !important;
    height: 32px !important;
    margin: 0 auto !important;
}

body:not(.sidebar-expanded) .sidebar-header-card .brand-logo svg {
    width: 32px !important;
    height: 32px !important;
}

body:not(.sidebar-expanded) .sidebar-header-card .profile-card {
    justify-content: center !important;
}

body:not(.sidebar-expanded) .sidebar-header-card .profile-avatar-wrapper {
    width: 32px !important;
    height: 32px !important;
    margin: 0 auto !important;
}

/* Scrollable Menu Area styling */
.sidebar-menu-scroll {
    flex-grow: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
}

.sidebar-menu-scroll::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari and Opera */
}

/* Ensure all icons render and prevent scrolling layout clipping when collapsed */
body:not(.sidebar-expanded) .sidebar-menu-scroll {
    overflow: visible !important;
    height: auto !important;
    flex-grow: 0 !important;
}

/* Transition for expanded state components */
.sidebar {
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1), padding 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* profile card fixes */
.profile-card {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
}

.profile-avatar-wrapper {
    flex-shrink: 0 !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
}

.profile-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

.profile-info {
    flex-grow: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.profile-name {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #fff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
}

/* active state styling (translucent snug highlight) */
.sidebar-menu .menu-item.active a {
    background: rgba(79, 70, 229, 0.15) !important;
    color: #a5b4fc !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   Main Dashboard Compact Sizing & Structure Overrides
   ========================================================================== */
.main-content .dashboard-card {
    padding: 16px !important;
}

.main-content .dashboard-card .card-header {
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
}

.main-content .dashboard-card .card-title {
    font-size: 0.88rem !important;
}

.main-content .dashboard-grid,
.main-content .charts-row-1 {
    gap: 16px !important;
}

/* Limit line chart wrapper height (override inline styles in templates/dashboard.html) */
.main-content .dashboard-card div[style*="height:320px"],
.main-content .channel-performance-card div[style*="height:320px"] {
    height: 220px !important;
    margin-top: 6px !important;
}

/* Shrink donut chart container size */
.main-content .dashboard-card div[style*="width:170px"],
.main-content .dashboard-card div[style*="height:170px"] {
    width: 130px !important;
    height: 130px !important;
}

.main-content #dashboard-sync-activity-chart {
    width: 130px !important;
    height: 130px !important;
}

/* Tighten dashboard table spacing and font size */
.main-content .dashboard-table th,
.main-content .dashboard-table td {
    padding: 8px 12px !important;
}

.main-content .dashboard-table td {
    font-size: 0.78rem !important;
}

/* ==========================================================================
   Channel Sync Banner & Modal
   ========================================================================== */
.sync-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}
.sync-banner-no_channels {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid #c7d2fe;
}
.sync-banner-expired {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
}
.sync-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.sync-banner-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sync-banner-text strong {
    font-size: 0.92rem;
    color: var(--text-dark);
    font-weight: 700;
}
.sync-banner-text span {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.sync-banner-btn {
    padding: 8px 18px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.sync-banner-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
}
.sync-banner-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    color: #ffffff;
}
.sync-banner-btn-secondary {
    background: #ffffff;
    color: var(--text-medium);
    border: 1px solid var(--border-color);
}
.sync-banner-btn-secondary:hover {
    background: var(--bg-main);
}
.sync-banner-dismiss {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.sync-banner-dismiss:hover {
    color: var(--text-dark);
}

/* Blocking modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(9, 8, 30, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}
.modal-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.modal-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.modal-btn {
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.modal-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
}
.modal-btn-secondary {
    background: var(--bg-main);
    color: var(--text-medium);
}