/* CodePulse Design System: Green Harmony Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --c-black-forest: #10451d; --c-dark-emerald: #155d27; --c-turf-green: #1a7431;
  --c-forest-green: #208b3a; --c-medium-jungle: #25a244; --c-jade-green: #2dc653;
  --c-malachite: #4ad66d; --c-light-green: #6ede8a; --c-celadon: #92e6a7; --c-celadon-2: #b7efc5;
  --bg-main: #f8fbf9; --bg-surface: #ffffff; --bg-subtle: #f0f7f2; --bg-hover: #e3f2e7;
  --border: #d8ebd9; --border-hover: #92e6a7; --border-focus: #208b3a;
  --text-main: #0a1c10; --text-muted: #3d5a45; --text-dim: #6e8875;
  --primary: #208b3a; --primary-hover: #155d27; --primary-subtle: #edf8ef;
  --accent: #2dc653; --accent-subtle: #e6f9ec;
  --success: #208b3a; --success-subtle: #edf8ef;
  --danger: #dc2626; --danger-subtle: #fef2f2;
  --warning: #d97706; --warning-subtle: #fffbeb;
  --gold: #f59e0b;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-full: 9999px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --shadow-sm: 0 1px 3px rgba(16, 69, 29, 0.06), 0 1px 2px rgba(16, 69, 29, 0.04);
  --shadow-md: 0 4px 14px -2px rgba(16, 69, 29, 0.1), 0 2px 6px -1px rgba(16, 69, 29, 0.04);
  --shadow-lg: 0 16px 32px -8px rgba(16, 69, 29, 0.14), 0 6px 16px -4px rgba(45, 198, 83, 0.08);
}

[data-theme="dark"] {
  --bg-main: #06130b; --bg-surface: #0a1d10; --bg-subtle: #102d1a; --bg-hover: #155d27;
  --border: #155d27; --border-hover: #208b3a; --border-focus: #2dc653;
  --text-main: #f0fdf4; --text-muted: #92e6a7; --text-dim: #6ede8a;
  --primary: #2dc653; --primary-hover: #4ad66d; --primary-subtle: rgba(45, 198, 83, 0.16);
  --accent: #4ad66d; --accent-subtle: rgba(74, 214, 109, 0.16);
  --success: #2dc653; --success-subtle: rgba(45, 198, 83, 0.16);
  --danger: #f87171; --danger-subtle: rgba(239, 68, 68, 0.16);
  --warning: #fbbf24; --warning-subtle: rgba(245, 158, 11, 0.16);
  --gold: #fbbf24;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.6);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.7);
  --shadow-lg: 0 16px 32px rgba(0,0,0,0.8);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { width: 100%; max-width: 100%; overflow-x: hidden; }
body { font-family: var(--font-sans); background: var(--bg-main); color: var(--text-main); line-height: 1.5; font-size: 14px; min-height: 100vh; width: 100%; max-width: 100%; overflow-x: hidden; position: relative; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; }
input, textarea, [contenteditable="true"], .allow-select, .wallet-address, .license-key, pre, code { user-select: text !important; -webkit-user-select: text !important; }
main, section, header, footer { width: 100%; max-width: 100%; box-sizing: border-box; }
a { color: var(--primary); text-decoration: none; transition: color 0.15s; } a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; -webkit-user-drag: none; user-drag: none; }
svg { stroke-width: 2; vertical-align: middle; flex-shrink: 0; }
.gradient-text { background: linear-gradient(135deg, #10451d 0%, #1a7431 40%, #25a244 80%, #2dc653 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
[data-theme="dark"] .gradient-text { background: linear-gradient(135deg, #4ad66d 0%, #2dc653 60%, #b7efc5 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-4); box-sizing: border-box; }
.header-nav { background: #15803d; border-bottom: 1px solid #166534; position: sticky; top: 0; z-index: 50; width: 100%; box-shadow: 0 4px 18px rgba(21, 128, 61, 0.3); }
.navbar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--space-3); }
.nav-brand { font-size: 20px; font-weight: 800; color: #ffffff !important; display: flex; align-items: center; gap: var(--space-2); text-decoration: none; flex-shrink: 0; letter-spacing: -0.4px; }
.nav-brand svg { color: #86efac; }
.nav-brand:hover { color: #ffffff !important; }
.nav-brand-badge { font-size: 11px; padding: 2px 8px; background: rgba(0, 0, 0, 0.25); color: #86efac; border-radius: 4px; font-weight: 800; letter-spacing: 0.5px; border: 1.5px solid #86efac; }
.nav-links { display: flex; align-items: center; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.nav-link { color: #ffffff !important; font-weight: 600 !important; font-size: 14.5px; padding: 7px 12px; border-radius: var(--radius-sm); transition: all 0.15s ease; opacity: 0.95; }
.nav-link:hover, .nav-link.active { color: #ffffff !important; background: rgba(255, 255, 255, 0.2); opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.nav-actions .btn-icon { background: rgba(0, 0, 0, 0.2) !important; border: 1.5px solid rgba(255, 255, 255, 0.35) !important; color: #ffffff !important; border-radius: var(--radius-md); }
.nav-actions .btn-icon:hover { background: rgba(255, 255, 255, 0.2) !important; border-color: #ffffff !important; color: #86efac !important; }
.nav-actions .btn-outline { color: #ffffff !important; border: 1.5px solid #ffffff !important; background: rgba(255, 255, 255, 0.15) !important; font-weight: 700 !important; font-size: 13.5px !important; padding: 7px 16px !important; border-radius: var(--radius-md); }
.nav-actions .btn-outline:hover { background: #ffffff !important; color: #15803d !important; }
.nav-actions .btn-primary { background: #ffffff !important; color: #15803d !important; font-weight: 800 !important; font-size: 13.5px !important; padding: 7px 16px !important; border: 1.5px solid #ffffff !important; border-radius: var(--radius-md); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important; }
.nav-actions .btn-primary:hover { background: #f0fdf4 !important; color: #166534 !important; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28) !important; }
.nav-actions .btn-secondary { background: rgba(255, 255, 255, 0.2) !important; color: #ffffff !important; border: 1.5px solid rgba(255, 255, 255, 0.35) !important; font-weight: 700 !important; font-size: 13px !important; }
.nav-actions .btn-secondary:hover { background: #ffffff !important; color: #15803d !important; }
.nav-actions .badge-primary { background: #ffffff !important; color: #15803d !important; font-weight: 800 !important; border: none; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.nav-mobile-auth { display: none; }

.subnav-bar { background: #14532d; border-bottom: 1px solid #166534; border-top: 1px solid rgba(255, 255, 255, 0.12); width: 100%; max-width: 100vw; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.subnav-bar::-webkit-scrollbar { display: none; }
.subnav-container { display: flex; align-items: center; gap: var(--space-5); height: 44px; font-size: 13.5px; font-weight: 600; white-space: nowrap; width: max-content; padding: 0 var(--space-4); margin: 0 auto; }
.subnav-item { color: #dcfce7 !important; height: 44px; display: inline-flex; align-items: center; border-bottom: 2.5px solid transparent; transition: all 0.15s ease; text-decoration: none; font-weight: 600; padding: 0 6px; box-sizing: border-box; }
.subnav-item:hover { color: #ffffff !important; border-bottom-color: #86efac !important; }
.subnav-item.active { color: #ffffff !important; border-bottom: 2.5px solid #ffffff !important; font-weight: 800 !important; text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 9px 18px; font-size: 13.5px; font-weight: 600; border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; transition: all 0.18s ease; text-decoration: none; line-height: 1.25; user-select: none; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, #25a244 0%, #1a7431 100%); color: #ffffff !important; box-shadow: 0 2px 8px rgba(32, 139, 58, 0.28), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn-primary:hover { background: linear-gradient(135deg, #208b3a 0%, #155d27 100%); box-shadow: 0 6px 18px rgba(32, 139, 58, 0.38); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-surface); color: var(--text-main); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-subtle); border-color: var(--border-hover); color: var(--text-main); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--c-medium-jungle); }
.btn-outline:hover { background: var(--primary-subtle); border-color: var(--primary-hover); color: var(--primary-hover); }
.btn-danger { background: var(--danger); color: #ffffff !important; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 6px 13px; font-size: 12.5px; font-weight: 500; border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 26px; font-size: 15px; font-weight: 700; border-radius: var(--radius-md); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; }
.btn-icon:hover { color: var(--primary); background: var(--primary-subtle); border-color: var(--c-celadon); }

.hero-search-wrapper { display: flex; align-items: stretch; width: 100%; max-width: 700px; margin: 0 auto var(--space-4); background: var(--bg-surface); border: 2px solid var(--c-celadon); border-radius: var(--radius-lg); box-shadow: 0 10px 28px -6px rgba(32, 139, 58, 0.14), 0 2px 6px -1px rgba(0,0,0,0.03); overflow: hidden; transition: all 0.2s ease; }
.hero-search-wrapper:focus-within { border-color: var(--primary); box-shadow: 0 14px 34px -6px rgba(32, 139, 58, 0.25), 0 0 0 4px rgba(45, 198, 83, 0.2); }
.hero-search-input { flex-grow: 1; border: none; padding: 14px 18px; font-size: 14px; outline: none; background: transparent; color: var(--text-main); font-family: inherit; min-width: 0; }
.hero-search-select { border: none; border-left: 1px solid var(--border); padding: 0 16px; font-size: 13px; background: var(--bg-subtle); color: var(--text-main); outline: none; cursor: pointer; font-family: inherit; font-weight: 500; }
.hero-search-btn { background: linear-gradient(135deg, #25a244 0%, #1a7431 100%); color: #ffffff; border: none; padding: 0 24px; font-weight: 600; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); transition: all 0.2s ease; flex-shrink: 0; }
.hero-search-btn:hover { background: linear-gradient(135deg, #208b3a 0%, #155d27 100%); }

.form-group { margin-bottom: var(--space-4); text-align: left; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: var(--space-1); }
.form-control, .form-select { width: 100%; padding: 10px 14px; font-size: 14px; font-family: inherit; background: var(--bg-surface); color: var(--text-main); border: 1px solid var(--border); border-radius: var(--radius-md); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.form-control:focus, .form-select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(32, 139, 58, 0.18); }
.form-control::placeholder { color: var(--text-dim); }
.form-error { font-size: 12px; color: var(--danger); margin-top: var(--space-1); }

.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: border-color 0.18s, box-shadow 0.18s; width: 100%; }
.card-header { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); }
.card-body { padding: var(--space-5); }
.card-footer { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border); background: var(--bg-subtle); }

.product-card { display: flex; flex-direction: column; height: 100%; border-radius: var(--radius-lg); transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s, border-color 0.22s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -8px rgba(16, 69, 29, 0.14), 0 4px 12px -2px rgba(45, 198, 83, 0.1); border-color: var(--c-malachite); }
.product-thumb { aspect-ratio: 16/9; background: #06130b; border-bottom: 1px solid var(--border); overflow: hidden; position: relative; width: 100%; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.product-card:hover .product-thumb img { transform: scale(1.03); }
.product-thumb-overlay { position: absolute; inset: 0; background: rgba(10, 29, 16, 0.8); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; gap: var(--space-2); opacity: 0; transition: opacity 0.2s; }
.product-card:hover .product-thumb-overlay { opacity: 1; }
.product-badge-type { position: absolute; top: var(--space-2); left: var(--space-2); font-size: 11px; padding: 3px 8px; border-radius: var(--radius-sm); font-weight: 700; text-transform: uppercase; z-index: 2; letter-spacing: 0.3px; }
.product-badge-version { position: absolute; top: var(--space-2); right: var(--space-2); font-size: 11px; padding: 2px 7px; border-radius: var(--radius-sm); background: rgba(0,0,0,0.65); color: #fff; font-weight: 600; z-index: 2; backdrop-filter: blur(4px); }
.product-content { padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; flex-grow: 1; }
.product-author { font-size: 12px; color: var(--text-muted); margin-bottom: var(--space-1); }
.product-title { font-size: 15px; font-weight: 700; margin-bottom: var(--space-2); line-height: 1.35; word-break: break-word; }
.product-title a { color: var(--text-main); } .product-title a:hover { color: var(--primary); }
.product-rating-row { display: flex; align-items: center; gap: var(--space-2); font-size: 12px; margin-bottom: var(--space-3); color: var(--text-muted); flex-wrap: wrap; }
.star-rating { color: var(--gold); display: inline-flex; align-items: center; letter-spacing: 1px; }
.product-sales { font-weight: 600; margin-left: auto; color: var(--text-muted); }
.product-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: var(--space-4); }
.product-meta { display: flex; align-items: center; justify-content: space-between; padding-top: var(--space-3); border-top: 1px solid var(--border); margin-top: auto; gap: var(--space-2); flex-wrap: wrap; }
.product-price { font-size: 19px; font-weight: 800; color: var(--text-main); letter-spacing: -0.4px; }
.product-price-old { font-size: 13px; color: var(--text-dim); text-decoration: line-through; margin-left: var(--space-1); font-weight: 400; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: 11px; font-weight: 600; border-radius: var(--radius-full); line-height: 1.35; max-width: 100%; white-space: normal; }
.badge-primary { background: #edf8ef; color: var(--c-black-forest); border: 1px solid var(--c-celadon); }
[data-theme="dark"] .badge-primary { background: rgba(45, 198, 83, 0.18); color: var(--c-celadon); border-color: var(--c-dark-emerald); }
.badge-success { background: #e3f6e8; color: var(--c-dark-emerald); border: 1px solid var(--c-light-green); }
[data-theme="dark"] .badge-success { background: rgba(74, 214, 109, 0.18); color: var(--c-malachite); border-color: var(--c-forest-green); }
.badge-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-neutral { background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border); transition: all 0.15s; }
.badge-neutral:hover { border-color: var(--c-medium-jungle); color: var(--c-black-forest); background: #edf8ef; }

.grid { display: grid; gap: var(--space-6); width: 100%; }
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-6); width: 100%; }
.layout-catalog { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-6); align-items: start; width: 100%; }
.layout-detail { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-6); align-items: start; width: 100%; }
.layout-cart { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-6); align-items: start; width: 100%; }
.layout-checkout { display: grid; grid-template-columns: 1fr 360px; gap: var(--space-6); align-items: start; width: 100%; }

.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.data-table, .table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13.5px; }
.data-table th, .table th { background: var(--bg-subtle); padding: 12px 16px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.data-table td, .table td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text-main); vertical-align: middle; }
.data-table tr:last-child td, .table tr:last-child td { border-bottom: none; }
.data-table tr:hover td, .table tr:hover td { background: var(--bg-subtle); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(6, 19, 11, 0.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.2s; padding: var(--space-4); }
.modal-backdrop.active { opacity: 1; pointer-events: auto; }
.modal-dialog { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); transform: scale(0.95); transition: transform 0.2s; overflow: hidden; }
.modal-backdrop.active .modal-dialog { transform: scale(1); }
.modal-header { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 700; color: var(--c-black-forest); }
.modal-body { padding: var(--space-5); }
.modal-footer { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: var(--space-2); background: var(--bg-subtle); }

.toast-container { position: fixed; top: 20px; right: 20px; display: flex; flex-direction: column; gap: var(--space-2); z-index: 9999; pointer-events: none; max-width: calc(100vw - 32px); }
.toast { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 18px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: var(--space-3); min-width: 280px; max-width: 380px; pointer-events: auto; transform: translateY(-20px); opacity: 0; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); font-size: 13.5px; font-weight: 500; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { border-left: 4px solid var(--c-forest-green); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--c-jade-green); }

.empty-state { text-align: center; padding: var(--space-12) var(--space-4); width: 100%; }
.empty-icon { width: 48px; height: 48px; margin: 0 auto var(--space-4); color: var(--text-dim); }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: var(--space-1); }
.empty-desc { font-size: 13px; color: var(--text-muted); margin-bottom: var(--space-4); max-width: 360px; margin-left: auto; margin-right: auto; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-section { padding: var(--space-10) 0 var(--space-6); text-align: center; border-bottom: 1px solid var(--border); background: radial-gradient(1000px 480px at 50% -20px, rgba(45, 198, 83, 0.12) 0%, rgba(183, 239, 197, 0.2) 40%, transparent 80%), var(--bg-surface); position: relative; overflow: hidden; width: 100%; }
[data-theme="dark"] .hero-section { background: radial-gradient(1000px 480px at 50% -20px, rgba(45, 198, 83, 0.2) 0%, rgba(21, 93, 39, 0.25) 50%, transparent 80%), #0a1d10; }
.hero-title { font-size: clamp(24px, 5.5vw, 40px); font-weight: 800; line-height: 1.25; margin-bottom: var(--space-3); color: var(--text-main); letter-spacing: -0.7px; word-break: break-word; }
.hero-subtitle { font-size: 14.5px; color: var(--text-muted); max-width: 680px; margin: 0 auto var(--space-5); line-height: 1.6; word-break: break-word; }
.trust-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4); padding: var(--space-4) 0 0; font-size: 13px; color: var(--text-muted); width: 100%; }
.trust-item { display: inline-flex; align-items: center; gap: var(--space-2); text-align: left; }
.trust-item svg { color: var(--c-forest-green); }

.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--bg-surface); padding: var(--space-8) 0; font-size: 13px; color: var(--text-muted); width: 100%; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-6); margin-bottom: var(--space-6); width: 100%; }
.footer-heading { font-weight: 700; color: var(--text-main); margin-bottom: var(--space-3); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); padding: 0; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: var(--space-4); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3); }

.mobile-bottom-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 56px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); z-index: 100; align-items: center; justify-content: space-around; box-shadow: 0 -3px 12px rgba(16, 69, 29, 0.08); padding-bottom: env(safe-area-inset-bottom, 0); }
[data-theme="dark"] .mobile-bottom-bar { background: rgba(10, 29, 16, 0.95); }
.bottom-bar-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-muted); font-size: 11px; font-weight: 500; text-decoration: none; flex: 1; height: 100%; position: relative; transition: color 0.15s ease; -webkit-tap-highlight-color: transparent; }
.bottom-bar-item:hover, .bottom-bar-item.active { color: var(--c-forest-green) !important; font-weight: 700; }
.bottom-bar-item.active::before { content: ''; position: absolute; top: 0; width: 32px; height: 2.5px; background: linear-gradient(90deg, #25a244, #4ad66d); border-radius: 0 0 3px 3px; }
.bottom-bar-badge { position: absolute; top: 6px; right: calc(50% - 16px); background: var(--primary); color: #ffffff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; }

.admin-layout { display: flex; min-height: 100vh; width: 100%; position: relative; }
.admin-sidebar { width: 240px; background: var(--bg-surface); border-right: 1px solid var(--border); flex-shrink: 0; display: flex; flex-direction: column; transition: margin-left 0.25s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1); z-index: 40; }
.admin-sidebar.collapsed { margin-left: -240px; }
.admin-sidebar-header { height: 64px; display: flex; align-items: center; padding: 0 var(--space-4); border-bottom: 1px solid var(--border); font-weight: 700; gap: var(--space-2); }
.admin-nav { padding: var(--space-4); list-style: none; display: flex; flex-direction: column; gap: 4px; flex-grow: 1; }
.admin-nav-item a { display: flex; align-items: center; gap: var(--space-3); padding: 8px 12px; border-radius: var(--radius-md); color: var(--text-muted); font-weight: 500; font-size: 13px; text-decoration: none; }
.admin-nav-item a:hover, .admin-nav-item a.active { background: var(--primary-subtle); color: var(--c-black-forest); font-weight: 700; }
.admin-main { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; width: 100%; }
.admin-topbar { height: 64px; background: var(--bg-surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-4); gap: var(--space-3); min-width: 0; }
.admin-topbar-left { display: flex; align-items: center; gap: var(--space-3); min-width: 0; flex: 1 1 auto; overflow: hidden; }
.admin-topbar-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; line-height: 1.3; }
.admin-topbar-right { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.admin-topbar-user { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.admin-content { padding: var(--space-4); flex-grow: 1; width: 100%; }
.admin-sidebar-backdrop { display: none; }

@media (max-width: 860px) {
  .layout-catalog, .layout-detail, .layout-cart, .layout-checkout, .layout-tools { grid-template-columns: 1fr !important; width: 100%; }
  .grid-cols-4, .grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { flex-direction: row; }
  .admin-sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 280px; max-width: 82vw; height: 100vh; z-index: 1000; box-shadow: 0 16px 36px rgba(0,0,0,0.25); transform: translateX(-100%); margin-left: 0 !important; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(6, 19, 11, 0.65); backdrop-filter: blur(4px); z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
  .admin-sidebar-backdrop.active { opacity: 1; pointer-events: auto; }
  .admin-sidebar-close { display: inline-flex !important; }
  .admin-topbar { padding: 0 var(--space-3); gap: var(--space-2); }
  .admin-topbar-left { gap: var(--space-2); }
  .admin-topbar-right { gap: var(--space-2); }
  .admin-topbar-user { display: none; }
  .admin-topbar-title { font-size: 13.5px; }
}

@media (max-width: 768px) {
  body:not(.admin-body) { padding-bottom: 64px !important; }
  .mobile-bottom-bar { display: flex !important; }
}

@media (max-width: 640px) {
  .admin-topbar { height: 56px; padding: 0 10px; gap: 8px; }
  .admin-topbar-badge { display: none; }
  .admin-topbar-title { font-size: 13px; }
  .admin-topbar-signout { padding: 5px 9px !important; font-size: 11.5px !important; }
  .toast-container { top: 14px; left: 16px; right: 16px; max-width: none; }
  .toast { width: 100%; max-width: 100%; min-width: 0; }
  .navbar { height: 56px; }
  .nav-brand { font-size: 17px; }
  .nav-brand-badge { display: none; }
  .grid-cols-4, .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr !important; }
  .product-grid { grid-template-columns: 1fr !important; }
  .hero-search-wrapper { flex-direction: column; width: 100%; }
  .hero-search-input { width: 100%; border-bottom: 1px solid var(--border); }
  .hero-search-select { border-left: none; border-bottom: 1px solid var(--border); padding: 11px; width: 100%; }
  .hero-search-btn { padding: 12px; justify-content: center; width: 100%; }
  .nav-desktop-auth { display: none !important; }
  .nav-mobile-auth { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--border); margin-top: var(--space-2); width: 100%; }
  .nav-links { display: none; position: absolute; top: 56px; left: 0; right: 0; width: 100%; background: var(--bg-surface); border-bottom: 1px solid var(--border); padding: var(--space-4); box-shadow: var(--shadow-lg); flex-direction: column; gap: var(--space-3); z-index: 50; }
  .nav-links.open { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .footer-grid-brand { grid-column: span 2; }
  .footer-grid-legal { grid-column: span 2; border-top: 1px solid var(--border); padding-top: var(--space-3); }
  .footer-legal-list { flex-direction: row !important; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
  .footer-heading { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: var(--space-2); }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
  .table-responsive .data-table thead, .table-responsive .table thead { display: none; }
  .table-responsive .data-table, .table-responsive .data-table tbody, .table-responsive .data-table tr, .table-responsive .data-table td,
  .table-responsive .table, .table-responsive .table tbody, .table-responsive .table tr, .table-responsive .table td { display: block; width: 100%; }
  .table-responsive .data-table tr, .table-responsive .table tr { margin-bottom: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-2); background: var(--bg-surface); }
  .table-responsive .data-table td, .table-responsive .table td { text-align: right; padding: 10px 14px; border-bottom: 1px solid var(--border); position: relative; min-height: 42px; display: flex; justify-content: space-between; align-items: center; }
  .table-responsive .data-table td:last-child, .table-responsive .table td:last-child { border-bottom: none; }
  .table-responsive .data-table td::before, .table-responsive .table td::before { content: attr(data-label); font-weight: 600; color: var(--text-muted); font-size: 12px; margin-right: 12px; text-align: left; }
}
