:root {
    --primary: #0e5811;
    --primary-dark: #053d03;
    --secondary: #486a4a;
    --success: #2d8a30;
    --warning: #d9a300;
    --danger: #c4503a;
    --info: #5b8fa8;
    --dark: #0a2e0a;
    --light: #e8f2dd;
    --body-bg: #f9faf7;
    --body-color: #26272e;
    --card-bg: #ffffff;
    --border-color: #d3ddc9;
    --sidebar-width: 260px;
    --topbar-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--body-bg);
    color: var(--body-color);
    line-height: 1.6;
}

.main-content { padding-top: 72px; }

a { text-decoration: none; }

/* Navbar */
.navbar { padding: 12px 0; background: var(--dark) !important; }
.navbar-brand { font-size: 1.5rem; letter-spacing: -0.5px; }

/* Hero Slideshow */
.hero-slideshow { position: relative; height: 92vh; min-height: 600px; max-height: 900px; overflow: hidden; background: #0f172a; }
.hero-slides { position: relative; width: 100%; height: 100%; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s cubic-bezier(.4,0,.2,1), transform 1.2s cubic-bezier(.4,0,.2,1); transform: scale(1.08); display: flex; align-items: center; }
.hero-slide.active { opacity: 1; visibility: visible; transform: scale(1); z-index: 1; }
.hero-slide[data-bg="0"] { background: linear-gradient(135deg,#0a2e0a 0%,#0e5811 40%,#053d03 100%); }
.hero-slide[data-bg="1"] { background: linear-gradient(135deg,#0a2e0a 0%,#1a6b1a 40%,#0a2e0a 100%); }
.hero-slide[data-bg="2"] { background: linear-gradient(135deg,#0a2e0a 0%,#2d5a1e 40%,#0a2e0a 100%); }
.hero-slide[data-bg="3"] { background: linear-gradient(135deg,#0a2e0a 0%,#1a4a3a 40%,#0a2e0a 100%); }
.hero-overlay { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(14,88,17,.2) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(72,106,74,.1) 0%, transparent 50%); }
.hero-content { position: relative; z-index: 2; width: 100%; }
.min-vh-60 { min-height: 60vh; display: flex; align-items: center; }

/* Hero particles */
.hero-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.hero-particles::before { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle,rgba(14,88,17,.15) 0%,transparent 70%); top: -100px; right: -50px; animation: float-particle 8s ease-in-out infinite; }
.hero-particles::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle,rgba(72,106,74,.12) 0%,transparent 70%); bottom: -50px; left: 10%; animation: float-particle 10s ease-in-out infinite reverse; }
@keyframes float-particle {
    0%,100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(30px,-30px) scale(1.1); }
    66% { transform: translate(-20px,20px) scale(.95); }
}

/* Hero text animations */
.animate-slide-up { opacity: 0; transform: translateY(40px); animation: slideUp .7s cubic-bezier(.4,0,.2,1) forwards; }
.animate-fade-in { opacity: 0; animation: fadeIn .8s cubic-bezier(.4,0,.2,1) forwards; }
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .35s; }
.delay-3 { animation-delay: .55s; }
.delay-4 { animation-delay: .75s; }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }

/* Hero badge */
.hero-badge { display: inline-block; padding: 6px 18px; border-radius: 50px; font-size: .85rem; font-weight: 600; background: rgba(99,102,241,.2); color: #a5b4fc; margin-bottom: 1rem; letter-spacing: .5px; backdrop-filter: blur(4px); }

/* Hero title & gradient */
.hero-title { color: #fff; line-height: 1.15; letter-spacing: -1px; }
.text-gradient { background: linear-gradient(135deg,#6366f1,#a855f7,#06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { color: rgba(255,255,255,.7); max-width: 560px; font-size: 1.15rem; }

/* Hero CTA */
.hero-cta { border-radius: 50px; position: relative; overflow: hidden; transition: all .3s ease; }
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.btn-light.hero-cta { background: #fff; color: #0f172a; }
.btn-light.hero-cta:hover { background: #e2e8f0; }

/* Hero stats */
.hero-stat { text-align: left; }
.hero-stat-value { font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1.2; }
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .5px; }

/* Floating card */
.hero-floating-card { position: relative; display: inline-block; }
.hero-dash-img { border: 2px solid rgba(255,255,255,.1); transition: transform .4s ease; }
.hero-floating-card:hover .hero-dash-img { transform: scale(1.02); }
.hero-floating-badge { position: absolute; top: -10px; right: -10px; padding: 8px 14px; border-radius: 12px; font-size: .8rem; font-weight: 700; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.3); animation: badge-pulse 2s ease-in-out infinite; white-space: nowrap; }
@keyframes badge-pulse {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Hero arrows */
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; transition: all .3s; backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; opacity: 0; }
.hero-slideshow:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(255,255,255,.2); transform: translateY(-50%) scale(1.1); }
.hero-arrow-left { left: 20px; }
.hero-arrow-right { right: 20px; }

/* Hero dots */
.hero-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 10px; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.3); cursor: pointer; transition: all .4s ease; }
.hero-dot.active { width: 30px; border-radius: 5px; background: #fff; }
.hero-dot:hover { background: rgba(255,255,255,.6); }

/* Mobile slideshow */
@media (max-width: 992px) {
    .hero-slideshow { height: auto; min-height: auto; padding: 80px 0 60px; }
    .hero-title { font-size: calc(1.8rem + 1vw) !important; }
    .hero-subtitle { max-width: 100%; }
    .hero-content .row { min-height: auto !important; }
    .hero-floating-card { margin-top: 2rem; }
    .hero-stat { text-align: center; }
    .hero-arrow { display: none; }
    .hero-dots { bottom: 15px; }
    .hero-slide { position: relative; opacity: 1; visibility: visible; transform: scale(1); display: none; }
    .hero-slide.active { display: flex; }
    .hero-slide[data-bg="0"],.hero-slide[data-bg="1"],.hero-slide[data-bg="2"],.hero-slide[data-bg="3"] { background: linear-gradient(135deg,#0f172a,#1e293b); }
}
@media (max-width: 576px) {
    .hero-slideshow { padding: 60px 0 50px; }
    .hero-badge { font-size: .75rem; padding: 4px 14px; }
    .hero-cta { font-size: .9rem; padding: 10px 20px !important; }
    .hero-dash-img { display: none; }
    .hero-floating-badge { display: none; }
}

/* Cards */
.card { border-radius: 12px; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important; }

/* Feature Icons */
.feature-icon { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.bg-primary-soft { background: rgba(99, 102, 241, 0.1); }
.bg-success-soft { background: rgba(16, 185, 129, 0.1); }
.bg-info-soft { background: rgba(6, 182, 212, 0.1); }
.bg-warning-soft { background: rgba(245, 158, 11, 0.1); }
.bg-danger-soft { background: rgba(239, 68, 68, 0.1); }
.bg-purple-soft { background: rgba(139, 92, 246, 0.1); }

/* Auth Pages */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--body-bg); }
.auth-container { max-width: 900px; width: 100%; background: #fff; border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.1); overflow: hidden; }
.auth-bg { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); min-height: 500px; }

/* Dashboard */
.dashboard-wrapper { display: flex; min-height: 100vh; padding-top: 0; }
.dashboard-sidebar { width: var(--sidebar-width); background: var(--dark); color: #fff; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 1000; transition: transform 0.3s; }
.dashboard-sidebar .sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.dashboard-sidebar .sidebar-brand { color: #fff; font-size: 1.3rem; font-weight: 700; }
.dashboard-sidebar .sidebar-nav .nav-link { color: rgba(255,255,255,0.7); padding: 12px 20px; font-size: 0.9rem; display: flex; align-items: center; gap: 12px; transition: all 0.2s; }
.dashboard-sidebar .sidebar-nav .nav-link:hover, .dashboard-sidebar .sidebar-nav .nav-link.active { color: #fff; background: rgba(255,255,255,0.1); }
.dashboard-sidebar .sidebar-nav .nav-link i { width: 20px; text-align: center; }
.dashboard-content { margin-left: var(--sidebar-width); flex: 1; min-height: 100vh; background: #f8fafc; }
.dashboard-topbar { background: #fff; padding: 12px 24px; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 999; }

/* Avatar Circle */
.avatar-circle { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.1rem; }

/* Stat Icons */
.stat-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }

/* Progress Bars */
.progress { border-radius: 10px; background-color: #f1f5f9; }

/* Badges */
.badge { padding: 4px 10px; font-weight: 500; border-radius: 6px; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #cffafe; color: #155e75; }
.badge-secondary { background: #f1f5f9; color: #475569; }
.badge-primary { background: #d1e8d1; color: #0e5811; }

/* Tables */
.table { font-size: 0.9rem; }
.table th { font-weight: 600; color: var(--secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* Alerts */
.alert { border-radius: 12px; border: none; }

/* Buttons */
.btn { border-radius: 8px; font-weight: 500; padding: 8px 20px; }
.btn-lg { padding: 12px 28px; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* Form Controls */
.form-control, .form-select { border-radius: 8px; padding: 10px 16px; border-color: var(--border-color); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 88, 17, 0.1); }
.form-control-lg { padding: 14px 20px; font-size: 1rem; }

/* Footer */
.footer { margin-top: auto; }
.footer a { transition: color .2s ease; }
.footer a:hover { color: #fff !important; }
.footer .list-unstyled li a { opacity: .7; }
.footer .list-unstyled li a:hover { opacity: 1; }
.footer .social-links a { opacity: .5; }
.footer .social-links a:hover { opacity: 1; }

/* Utilities */
.text-primary { color: var(--primary) !important; }
.text-purple { color: #8b5cf6 !important; }
.bg-primary { background: var(--primary) !important; }

/* Step Number */
.step-number { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; }

/* Sidebar overlay on mobile */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; }

/* Responsive */
@media (max-width: 768px) {
    .dashboard-sidebar { transform: translateX(-100%); }
    .dashboard-sidebar.show { transform: translateX(0); }
    .dashboard-content { margin-left: 0; }
    .hero-section { text-align: center; }
    .auth-container { margin: 10px; }
    .sidebar-overlay.active { display: block; }
}

@media (max-width: 576px) {
    .dashboard-topbar h5 { display: none; }
    .container-fluid.p-4 { padding: 1rem !important; }
}

/* Fix dropdown in dark topbar */
.navbar-dark .dropdown-menu { background: #1e293b; }
.navbar-dark .dropdown-item { color: #e2e8f0; }
.navbar-dark .dropdown-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.navbar-dark .dropdown-divider { border-color: rgba(255,255,255,0.1); }

/* Ensure proper navbar z-index */
.navbar.fixed-top { z-index: 1030; }

/* Mall – Product Cards */
.product-card { transition: transform .25s ease, box-shadow .25s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.12) !important; }
.product-card .card-img-top { transition: transform .4s ease; }
.product-card:hover .card-img-top { transform: scale(1.05); }
.product-card .card-body { position: relative; }

/* Mall – Checkout payment radio */
.card-radio { cursor: pointer; transition: border-color .2s, background .2s; }
.card-radio:hover { border-color: var(--primary) !important; background: rgba(14,88,17,.04); }
.card-radio .form-check-input:checked ~ .form-check-label { color: var(--primary); }
.card-radio:has(.form-check-input:checked) { border-color: var(--primary) !important; background: rgba(14,88,17,.06); }

/* Mall – Breadcrumb tweaks */
.breadcrumb { background: transparent; padding: 0; }
.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

/* Mall – Quantity input */
.input-group .btn-outline-secondary { border-color: #e2e8f0; }
.input-group .btn-outline-secondary:hover { background: #f1f5f9; color: var(--dark); }

/* Footer spacing */
html, body { height: 100%; }
.main-content { min-height: calc(100vh - 250px); }
.footer { margin-top: 0; }
