:root,
[data-bs-theme="light"] {
    /* Colors — bridge to SC central theme tokens */
    --bs-primary-rgb: 52, 152, 219;
    --bs-secondary-rgb: 108, 117, 125;
    --bs-success-rgb: 40, 167, 69;
    --bs-danger-rgb: 220, 53, 69;
    --bs-info-rgb: 0, 180, 245;

    --text-dark: var(--sc-heading, #2c3e50);
    --bg-light: var(--sc-page-bg, #f9fafd);
    --border-color: var(--sc-border, #dee2e6);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);

    /* Border Radii */
    --bs-border-radius: 0.5rem;
    --bs-border-radius-sm: 0.25rem;
    --bs-border-radius-lg: 1rem;
    --bs-border-radius-xl: 1.25rem;

    /* Transitions */
    --transition-speed: 0.3s;
    --transition-ease: ease;
}

[data-bs-theme="dark"] {
    --text-dark: var(--sc-heading);
    --bg-light: var(--sc-surface-muted);
    --border-color: var(--sc-border);
    --shadow-light: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* --- Base Typography & Layout --- */
body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--sc-page-bg, var(--bg-light)) !important;
    color: var(--sc-body-text, #555);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.custom-tabs .nav-link {
    font-weight: 600;
}
.brand-group-container .brand-header {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--sc-heading);
}
.summary-row td {
    font-weight: bold;
}
.summary-row .summary-brand-text {
    font-size: 1.05em;
}
.promo-badge {
    font-weight: 600;
    cursor: help;
}
.table .text-nowrap {
    white-space: nowrap;
}
.table td img {
    max-width: 60px;
    height: auto;
    border-radius: var(--bs-border-radius-sm);
}

.text-success {
    color: var(--bs-success) !important;
    font-weight: 600;
}


/* --- DESKTOP ONLY STYLES --- */
@media (min-width: 992px) {

    /* DESKTOP: Auto-hide Sidebar on Hover */
    .sidebar-fixed {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 80px; 
        z-index: 1030;
        overflow-x: hidden;
        transition: width 0.3s ease;
    }

    .sidebar-fixed .sidebar-text {
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.2s ease;
        white-space: nowrap;
    }

    .sidebar-fixed .nav-link {
        justify-content: center;
    }
    .sidebar-fixed .nav-link .me-2 {
        margin-right: 0 !important;
    }

    .sidebar-fixed:hover {
        width: 280px;
    }

    .sidebar-fixed:hover .sidebar-text {
        visibility: visible;
        opacity: 1;
        transition-delay: 0.1s;
    }

    .sidebar-fixed:hover .nav-link {
        justify-content: flex-start;
    }
    .sidebar-fixed:hover .nav-link .me-2 {
        margin-right: 0.5rem !important;
    }

    .main-content {
        margin-left: 80px;
        transition: margin-left 0.3s ease;
    }
    
    .main-footer {
        text-align: center;
        padding: 1.5rem;
        margin-top: 2rem;
        background-color: var(--sc-footer-bg, #ffffff);
        border-top: 1px solid var(--border-color);
        color: var(--sc-muted);
    }
    
    .sidebar-fixed:hover ~ .main-content {
        margin-left: 280px;
    }
}


@media (max-width: 991.98px) {
    .main-content,
    .main-footer {
        margin-left: 0;
    }

    .main-footer {
        text-align: center;
        padding: 1.5rem;
        margin-top: 2rem;
        background-color: var(--sc-footer-bg, #ffffff);
        border-top: 1px solid var(--border-color);
        color: var(--sc-muted);
    }
}
