/* ═══════════════════════════════════════════
   B2B Commerce — Custom Stylesheet
   Aesthetic: Clean Professional / Light
   ═══════════════════════════════════════════ */

:root {
    --bg-primary: #f5f6f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fafb;
    --bg-input: #ffffff;
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    
    --text-primary: #1a1d21;
    --text-secondary: #495057;
    --text-muted: #868e96;
    --text-link: #2563eb;
    
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.08);
    
    --success: #16a34a;
    --warning: #ca8a04;
    --danger: #dc2626;
    --info: #2563eb;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.1);
    
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    --transition: all 0.2s ease;
}

/* ─── Base ─── */
* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display-heading {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--accent-hover); }

/* ─── Top Bar ─── */
.top-bar {
    background: #1a1d21;
    color: #adb5bd;
    padding: 6px 0;
    font-size: 0.78rem;
    border-bottom: 1px solid var(--border-light);
}

/* ─── Navbar ─── */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    z-index: 1050;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--accent) !important;
    letter-spacing: -0.02em;
}
.navbar-brand i { margin-right: 6px; }

.nav-link {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-link:hover {
    color: var(--text-primary) !important;
    background: var(--accent-soft);
}

.navbar-toggler {
    border-color: var(--border-color);
    padding: 4px 10px;
}

.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
}
.dropdown-item {
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.88rem;
}
.dropdown-item:hover {
    background: var(--accent-soft);
    color: var(--text-primary);
}
.dropdown-header { color: var(--text-muted); font-size: 0.78rem; }
.dropdown-divider { border-color: var(--border-light); }

/* ─── Buttons ─── */
.btn-accent {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    transition: var(--transition);
}
.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37,99,235,.25);
}

.btn-outline-accent {
    border: 1.5px solid var(--accent);
    color: var(--accent);
    background: transparent;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-outline-accent:hover {
    background: var(--accent);
    color: #fff;
}

.btn-dark-custom {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.btn-dark-custom:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.bg-accent { background-color: var(--accent) !important; }

/* ─── Cards ─── */
.card-b2b {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.card-b2b:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ─── Product Cards (no image) ─── */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-card .product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card .product-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}
.product-card .product-category {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.product-card .product-ref {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
}
.product-card .product-ean {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-top: 2px;
}
.product-card .product-price {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: auto;
    padding-top: 10px;
}
.product-card .product-price small {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
}

.product-card .product-actions {
    padding: 0 20px 20px;
}

/* Collection Badge */
.collection-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

/* ─── Forms ─── */
.form-control, .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    background: var(--bg-input);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-control::placeholder { color: var(--text-muted); }
.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-text { color: var(--text-muted); font-size: 0.8rem; }

/* ─── Tables ─── */
.table {
    --bs-table-bg: transparent;
    color: var(--text-primary);
}
.table th {
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding: 12px 16px;
}
.table td {
    border-bottom: 1px solid var(--border-light);
    padding: 12px 16px;
    vertical-align: middle;
}
.table-hover > tbody > tr:hover {
    background: var(--accent-soft);
}

/* ─── Badges / Tags ─── */
.badge-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.03em;
}
.badge-pending { background: rgba(202,138,4,.12); color: var(--warning); }
.badge-approved { background: rgba(22,163,74,.12); color: var(--success); }
.badge-rejected { background: rgba(220,38,38,.12); color: var(--danger); }

/* ─── Hero Sections ─── */
.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 48px 0;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
    pointer-events: none;
}

/* ─── Filters Sidebar ─── */
.filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}
.filter-panel h6 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ─── Collection Cards ─── */
.collection-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    display: block;
}
.collection-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.collection-card .collection-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.4rem;
    color: var(--accent);
}
.collection-card h5 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.collection-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

/* ─── Cart Page ─── */
.cart-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    transition: var(--transition);
}
.cart-item:hover {
    border-color: var(--border-color);
    background: var(--bg-card-hover);
}

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    position: sticky;
    top: 100px;
}

/* ─── Qty Input ─── */
.qty-input {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.qty-input button {
    background: var(--bg-primary);
    border: none;
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.qty-input button:hover { background: var(--accent-soft); color: var(--accent); }
.qty-input input {
    width: 48px;
    text-align: center;
    border: none;
    background: var(--bg-input);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 4px;
}
.qty-input input:focus { outline: none; }

/* ─── Auth Pages ─── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: 
        radial-gradient(ellipse at 20% 50%, var(--accent-soft) 0%, transparent 50%),
        var(--bg-primary);
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}
.auth-card .brand {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}
.auth-card .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* ─── Admin Panel ─── */
.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - 110px);
    padding: 20px 0;
}
.admin-sidebar .nav-link {
    padding: 10px 20px !important;
    border-radius: 0 !important;
    font-size: 0.88rem;
}
.admin-sidebar .nav-link.active {
    background: var(--accent-soft);
    color: var(--accent) !important;
    border-right: 3px solid var(--accent);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}
.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Cross/Up Sell Section ─── */
.sell-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 32px;
}
.sell-section h5 {
    font-family: var(--font-display);
    color: var(--accent);
    margin-bottom: 16px;
}

/* ─── Toast Notifications ─── */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}
.toast-success {
    background: var(--bg-card);
    border: 1px solid var(--success);
    color: var(--success);
}
.toast-danger {
    background: var(--bg-card);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* ─── Pending Page ─── */
.pending-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.pending-icon {
    font-size: 4rem;
    color: var(--warning);
    margin-bottom: 20px;
}

/* ─── Footer ─── */
.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    color: #adb5bd;
}
.site-footer h6 { color: #2563eb; font-family: var(--font-body); font-weight: 600; }
.site-footer a { color: #adb5bd; }
.site-footer a:hover { color: var(--accent); }

/* ─── Alerts ─── */
.alert {
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* ─── Search ─── */
.search-bar {
    position: relative;
}
.search-bar .bi-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.search-bar input {
    padding-left: 40px;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .hero-section { padding: 28px 0; }
    .product-card .product-info { padding: 14px; }
    .auth-card { padding: 28px; }
}
