/* ============================================================
   SembolERP — Premium Design System v2.0
   Theme: Emerald Green + Dark Navy
   Font: Inter (Google Fonts)
   2024 Modern Standards
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&display=swap');

/* ============================================================
   DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */
:root {
    /* Brand Colors */
    --primary:          #10b981;
    --primary-hover:    #059669;
    --primary-light:    #d1fae5;
    --primary-glow:     rgba(16, 185, 129, 0.25);
    --secondary:        #6366f1;
    --secondary-hover:  #4f46e5;
    --accent:           #f59e0b;

    /* Semantic Colors */
    --success:          #10b981;
    --warning:          #f59e0b;
    --danger:           #ef4444;
    --info:             #06b6d4;
    --danger-light:     #fee2e2;
    --warning-light:    #fef3c7;
    --info-light:       #cffafe;

    /* Layout - Light Mode */
    --bg-base:          #f1f5f9;
    --bg-surface:       #ffffff;
    --bg-surface-2:     #f8fafc;
    --bg-sidebar:       #0f172a;
    --bg-sidebar-2:     #1e293b;
    --sidebar-width:    255px;

    /* Text */
    --text-base:        #0f172a;
    --text-muted:       #64748b;
    --text-light:       #94a3b8;

    /* Sidebar Text */
    --sidebar-text:     #94a3b8;
    --sidebar-active:   #10b981;

    /* Borders */
    --border-color:     #e2e8f0;
    --border-focus:     #10b981;

    /* Shadows */
    --shadow-xs:        0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-sm:        0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md:        0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -1px rgba(15, 23, 42, 0.05);
    --shadow-lg:        0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-xl:        0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --card-shadow:      var(--shadow-sm);

    /* Border Radius */
    --radius-sm:        6px;
    --radius-md:        10px;
    --radius-lg:        14px;
    --radius-xl:        20px;
    --radius-full:      9999px;

    /* Transitions */
    --transition-fast:  all 0.15s ease;
    --transition-base:  all 0.2s ease;
    --transition-slow:  all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-bs-theme="dark"] {
    --bg-base:          #0f172a;
    --bg-surface:       #1e293b;
    --bg-surface-2:     #162032;
    --bg-sidebar:       #080f1a;
    --bg-sidebar-2:     #0f172a;
    --text-base:        #f1f5f9;
    --text-muted:       #94a3b8;
    --text-light:       #64748b;
    --border-color:     #1e293b;
    --card-shadow:      0 4px 20px rgba(0, 0, 0, 0.4);
    --primary-light:    rgba(16, 185, 129, 0.15);
    --sidebar-text:     #64748b;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
    50%       { box-shadow: 0 0 0 8px transparent; }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes bounceIn {
    0%   { transform: scale(0.3); opacity: 0; }
    50%  { transform: scale(1.05); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

/* ============================================================
   BASE STYLES
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    background-color: var(--bg-base);
    color: var(--text-base);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page load animation — NOT using transform to avoid creating stacking context that traps modals */
main {
    animation: fadeIn 0.4s ease both;
}

/* ============================================================
   SIDEBAR — Modern Premium
   ============================================================ */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, #0f172a 0%, #0d1626 100%);
    z-index: 100;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Sidebar subtle accent line */
#sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(16, 185, 129, 0.4), transparent);
    pointer-events: none;
}

.sidebar-header {
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    flex-shrink: 0;
    transition: var(--transition-base);
}

.sidebar-brand:hover .sidebar-brand-icon {
    transform: rotate(8deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.sidebar-brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.sidebar-brand-text span {
    color: #10b981;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar-section-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.4);
    padding: 14px 12px 6px;
}

#sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 0.855rem;
    text-decoration: none;
    transition: var(--transition-base);
    position: relative;
    margin-bottom: 2px;
    white-space: nowrap;
}

#sidebar .nav-link .nav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: var(--transition-base);
}

#sidebar .nav-link:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}

#sidebar .nav-link:hover .nav-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

#sidebar .nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.25);
}

#sidebar .nav-link.active .nav-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* Active left border indicator */
#sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #10b981;
    border-radius: 0 3px 3px 0;
}

/* Sidebar Footer - User Info */
.sidebar-footer {
    padding: 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    transition: var(--transition-base);
}

.sidebar-user-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: 0.65rem;
    color: var(--sidebar-text);
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
#content {
    margin-left: var(--sidebar-width);
    padding: 24px 28px;
    min-height: 100vh;
    transition: var(--transition-slow);
}

/* Guest mode */
body.guest-mode #content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
}

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

/* ============================================================
   TOP HEADER BAR
   ============================================================ */
#content > header {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 0.35s ease;
}

body.guest-mode #content > header {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    /* overflow: hidden removed — creates stacking context that traps Bootstrap modals */
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Stat Cards */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-slow);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Glassmorphism card variant */
.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

[data-bs-theme="dark"] .card-glass {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.06);
}

/* ============================================================
   BUTTONS — Premium & Animated
   ============================================================ */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.855rem;
    border-radius: var(--radius-md);
    padding: 8px 18px;
    transition: var(--transition-base);
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

/* Ripple effect */
.btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.btn:active::after {
    width: 200px;
    height: 200px;
    opacity: 0;
}

/* Primary Button — Emerald */
.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
    border-color: transparent;
    color: white;
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    border-color: transparent;
    color: white;
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    color: #1a1a1a;
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
    border-color: transparent;
    color: #1a1a1a;
}

/* Outline Variants */
.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Secondary/Ghost Button */
.btn-secondary {
    background: var(--bg-surface-2);
    border-color: var(--border-color);
    color: var(--text-base);
}

.btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--border-color);
    transform: translateY(-1px);
    color: var(--text-base);
}

/* Icon Buttons */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: visible;
}

/* ============================================================
   FORMS — Polished
   ============================================================ */
.form-control,
.form-select {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    color: var(--text-base);
    border-radius: var(--radius-md);
    padding: 9px 13px;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-surface);
    color: var(--text-base);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-label {
    font-weight: 500;
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.input-group-text {
    background-color: var(--bg-surface-2);
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
}

/* ============================================================
   TABLES — Clean & Modern
   ============================================================ */
.table {
    color: var(--text-base);
    border-color: var(--border-color);
    font-size: 0.855rem;
}

.table thead th {
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    background-color: var(--bg-surface-2);
    border-bottom: 2px solid var(--border-color);
    padding: 12px 16px;
}

.table tbody td {
    padding: 11px 16px;
    vertical-align: middle;
    border-color: var(--border-color);
    transition: background-color 0.15s ease;
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table-hover tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.04);
}

/* ============================================================
   BADGES — Modern Pill Style
   ============================================================ */
.badge {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    border-radius: var(--radius-full);
    padding: 3px 10px;
}

.badge.bg-success { background: linear-gradient(135deg, #10b981, #059669) !important; }
.badge.bg-danger  { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }
.badge.bg-warning { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.badge.bg-info    { background: linear-gradient(135deg, #06b6d4, #0891b2) !important; }
.badge.bg-primary { background: linear-gradient(135deg, #10b981, #059669) !important; }
.badge.bg-secondary { background: linear-gradient(135deg, #64748b, #475569) !important; }

/* Status badges */
.badge-pill {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.72rem;
}

/* ============================================================
   DROPDOWN MENUS
   ============================================================ */
.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    padding: 6px;
    background: var(--bg-surface);
    animation: fadeInUp 0.15s ease;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.855rem;
    color: var(--text-base);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

.dropdown-divider {
    border-color: var(--border-color);
    margin: 4px 0;
}

/* ============================================================
   MODALS — Premium
   ============================================================ */
.modal-content {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    background: var(--bg-surface);
    /* overflow: hidden REMOVED — breaks modal-dialog-scrollable and Bootstrap focus-trap */
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    background: var(--bg-surface-2);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.modal-body {
    padding: 24px;
}

.modal-title {
    font-weight: 700;
    font-size: 1rem;
}

/* Ensure modals always appear above sidebar */
.modal { z-index: 1055 !important; }
.modal-backdrop { z-index: 1050 !important; }

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle-btn {
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition-base);
    font-size: 0.9rem;
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: rotate(20deg);
}

/* ============================================================
   LOGIN OFFCANVAS PANEL
   ============================================================ */
#loginPanel {
    width: 400px !important;
    border: none;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.25);
}

.login-panel-header {
    background: linear-gradient(135deg, #0f172a 0%, #0d2340 100%);
    padding: 24px 28px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.login-panel-body {
    background: linear-gradient(180deg, #0f172a 0%, #0d1a2e 100%);
    color: #f1f5f9;
    padding: 32px 28px;
    height: 100%;
}

.login-panel-input {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    color: #f1f5f9 !important;
    border-radius: var(--radius-md) !important;
    transition: var(--transition-base) !important;
}

.login-panel-input:focus {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
    color: #f1f5f9 !important;
}

.login-panel-input::placeholder {
    color: rgba(148, 163, 184, 0.5) !important;
}

.login-panel-icon {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(148, 163, 184, 0.8) !important;
}

/* ============================================================
   PRODUCT CATALOG CARDS
   ============================================================ */
.catalog-product-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    transition: var(--transition-slow);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.catalog-product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, transparent 60%, rgba(16, 185, 129, 0.03) 100%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.catalog-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(16, 185, 129, 0.3);
}

.catalog-product-card:hover::before {
    opacity: 1;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 72%;
    background-color: #f8fafc;
    overflow: hidden;
}

.card-image-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.catalog-product-card:hover .card-image-wrapper img {
    transform: translate(-50%, -50%) scale(1.06);
}

/* Gallery indicators */
.thumbnail-dot-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.dot-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #cbd5e1;
    cursor: pointer;
    transition: var(--transition-base);
}

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

/* Stock Badge */
.card-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

/* Card Body */
.card-body-content {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.card-brand-title {
    font-size: 0.62rem;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 3px;
}

.card-product-name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-base);
    text-decoration: none;
    margin-bottom: 6px;
    height: 36px;
    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.68rem;
    margin-bottom: 8px;
}

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

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

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

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

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

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

.card-add-btn {
    flex-grow: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-color: transparent;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.73rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.card-add-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    color: white;
}

.card-add-btn:disabled {
    background: #e2e8f0;
    border-color: transparent;
    color: #94a3b8;
    transform: none;
    box-shadow: none;
}

.card-qty-input {
    width: 56px;
    padding: 5px 6px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    border: 1.5px solid var(--border-color);
    transition: border-color 0.15s ease;
}

.card-qty-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
    outline: none;
}

/* ============================================================
   VIEW TOGGLE
   ============================================================ */
.view-toggle-btn {
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-muted);
    transition: var(--transition-base);
    border-radius: var(--radius-md);
    padding: 7px 13px;
    font-size: 0.855rem;
}

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

.view-toggle-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border-radius: var(--radius-md);
    border-width: 1.5px;
    font-size: 0.875rem;
    padding: 12px 16px;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg,
        var(--border-color) 25%,
        var(--bg-surface-2) 50%,
        var(--border-color) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ============================================================
   SCROLLBAR (WebKit)
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-primary { color: var(--primary) !important; }
.bg-primary-soft { background: var(--primary-light) !important; }
.border-primary-soft { border-color: rgba(16, 185, 129, 0.3) !important; }

/* Hover lift effect */
.hover-lift {
    transition: var(--transition-slow);
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, #10b981, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    #sidebar {
        left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.active {
        left: 0;
    }
    #content {
        margin-left: 0;
        padding: 16px;
    }
}

@media (max-width: 768px) {
    body.guest-mode #content > header {
        padding: 12px 16px;
    }
    .modal-content {
        border-radius: var(--radius-lg);
    }
}

/* ============================================================
   5-PER-ROW COLUMN (Custom)
   ============================================================ */
@media (min-width: 992px) {
    .col-lg-2half {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* DataTables override */
.dataTables_filter {
    display: none !important;
}