/* SembolERP Premium Corporate CSS Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ========================================
   Guest / Landing Page Layout
   (when sidebar is hidden for non-auth users)
======================================== */
body.guest-mode #content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
}

body.guest-mode #content > header {
    padding: 16px 24px;
    margin-bottom: 0 !important;
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Light Mode Variables */
    --bg-base: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-sidebar: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active-bg: #1e293b;
    --sidebar-active-text: #ffffff;
    --text-base: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 8px -1px rgba(15, 23, 42, 0.03);
}

[data-bs-theme="dark"] {
    /* Dark Mode Variables */
    --bg-base: #0f172a;
    --bg-surface: #1e293b;
    --bg-sidebar: #0b0f19;
    --sidebar-text: #64748b;
    --sidebar-active-bg: #1e293b;
    --sidebar-active-text: #6366f1;
    --text-base: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #334155;
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3), 0 2px 8px -1px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-base);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sidebar Styling */
#sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--bg-sidebar);
    color: var(--sidebar-text);
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

#sidebar .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border-radius: 8px;
    margin: 4px 12px;
    transition: all 0.2s ease;
}

#sidebar .nav-link i {
    font-size: 1.1rem;
    width: 24px;
}

#sidebar .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

#sidebar .nav-link.active {
    background-color: var(--primary);
    color: #ffffff;
}

/* Main Content Wrapper */
#content {
    margin-left: 260px;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Custom Card Styles */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Dashboard Statistics Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

/* Form Styling */
.form-control, .form-select {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-base);
    border-radius: 8px;
    padding: 10px 14px;
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-surface);
    color: var(--text-base);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-base);
    border: none;
    background: none;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.theme-toggle-btn:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

/* Custom Table Layouts */
.table {
    color: var(--text-base);
    border-color: var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
}

/* Badges */
.badge-pill {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Responsiveness */
@media (max-width: 992px) {
    #sidebar {
        left: -260px;
    }
    #sidebar.active {
        left: 0;
    }
    #content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    body.guest-mode #content > header {
        padding: 12px 16px;
    }
}
/* Catalog View Toggle & Grid View Styling */
.view-toggle-btn {
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-base);
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 6px 12px;
}

.view-toggle-btn:hover {
    background-color: var(--border-color);
}

.view-toggle-btn.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Premium Product Card */
.catalog-product-card {
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.catalog-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background-color: #ffffff;
    overflow: hidden;
}

.card-image-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: opacity 0.4s ease-in-out;
}

/* Gallery indicators */
.thumbnail-dot-indicator {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 4px 8px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.catalog-product-card:hover .thumbnail-dot-indicator {
    opacity: 1;
}

.dot-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dot-indicator:hover, .dot-indicator.active {
    background-color: var(--primary);
    transform: scale(1.2);
}

/* Stock Badges */
.card-stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Card details styling */
.card-body-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-brand-title {
    font-size: 0.65rem;
    letter-spacing: 1px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.card-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-base);
    text-decoration: none;
    margin-bottom: 8px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.card-product-name:hover {
    color: var(--primary);
}

.card-rating-stars {
    color: #fbbf24;
    font-size: 0.75rem;
    margin-bottom: 12px;
}

.card-prices-box {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-bottom: 12px;
}

.card-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.card-price-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-price-value {
    font-weight: 700;
    font-size: 0.95rem;
}

.card-price-value.retail {
    color: var(--text-base);
}

.card-price-value.dealer {
    color: var(--primary);
}

.card-actions-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-add-btn {
    flex-grow: 1;
    background-color: #0b2240; /* Dark blue from screenshot */
    border-color: #0b2240;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.card-add-btn:hover {
    background-color: #123563;
    border-color: #123563;
}

.card-add-btn:disabled {
    background-color: #cbd5e1;
    border-color: #cbd5e1;
    color: #64748b;
}

.card-qty-input {
    width: 60px;
    padding: 6px;
    text-align: center;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}