/* ── RESET ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:       #f5f6fa;
  --white:    #ffffff;
  --border:   #e2e5ed;
  --border2:  #c8cdd9;
  --primary:  #2563eb;
  --primary-d:#1d4ed8;
  --primary-l:#eff6ff;
  --orange:   #f97316;
  --green:    #16a34a;
  --red:      #dc2626;
  --amber:    #d97706;
  --text:     #111827;
  --text-2:   #374151;
  --muted:    #6b7280;
  --dim:      #9ca3af;
  --r:        12px;
  --r-sm:     8px;
  --shadow:   0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md:0 4px 12px rgba(0,0,0,.12), 0 8px 32px rgba(0,0,0,.08);
  --nav-h:    60px;
}
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
.hidden { display: none !important; }

/* ── BUTTONS ──────────────────────────────────────── */
.btn-primary {
  background: var(--primary); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 22px; border-radius: var(--r-sm); border: none;
  cursor: pointer; transition: all .2s;
}
.btn-primary:hover { background: var(--primary-d); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-primary.btn-full { width: 100%; margin-top: 8px; padding: 12px; }
.btn-outline {
  background: #fff; color: var(--text-2); border: 1.5px solid var(--border2);
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 22px; border-radius: var(--r-sm); cursor: pointer; transition: all .2s;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-outline-sm {
  background: transparent; color: var(--muted); border: 1px solid var(--border2);
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 20px; cursor: pointer; transition: all .2s;
}
.btn-outline-sm:hover { color: var(--text); border-color: var(--border2); }
.btn-white { background: #fff; color: var(--primary); font-family: inherit; font-size: 14px; font-weight: 700; padding: 11px 24px; border-radius: var(--r-sm); border: none; cursor: pointer; transition: all .2s; }
.btn-white:hover { background: #f0f4ff; }
.btn-outline-white { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); font-family: inherit; font-size: 14px; font-weight: 600; padding: 11px 24px; border-radius: var(--r-sm); cursor: pointer; transition: all .2s; }
.btn-outline-white:hover { background: rgba(255,255,255,.1); }
.btn-link { background: none; border: none; color: var(--primary); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 0; }
.btn-link:hover { text-decoration: underline; }

/* ── NAVBAR ───────────────────────────────────────── */
#navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h); background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.logo-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900;
}
.logo-text { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.logo-sub { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.nav-search {
  flex: 1; max-width: 480px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 9px 14px;
}
.nav-search svg { color: var(--dim); flex-shrink: 0; }
.nav-search input {
  background: none; border: none; outline: none;
  font-family: inherit; font-size: 14px; color: var(--text); width: 100%;
}
.nav-search input::placeholder { color: var(--dim); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
#guest-btns, #user-btns { display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; background: var(--primary-l); padding: 5px 12px 5px 6px; border-radius: 20px; }
.user-av { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
#user-name-nav { font-size: 14px; font-weight: 600; color: var(--primary); }

.wallet-badge { display: flex; align-items: center; gap: 6px; background: #ecfdf5; border: 1px solid #d1fae5; color: #059669; padding: 4px 8px; border-radius: 20px; font-weight: 700; font-size: 13px; }
.wallet-add-btn { background: #10b981; color: #fff; border: none; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s; font-size: 14px; line-height: 1; }
.wallet-add-btn:hover { background: #059669; transform: scale(1.1); }

.nav-link-btn { background: none; border: none; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; padding: 7px 12px; border-radius: 8px; transition: all .2s; white-space: nowrap; }
.nav-link-btn:hover { background: var(--bg); color: var(--primary); }
.cart-btn {
  position: relative; background: var(--bg); border: 1.5px solid var(--border);
  color: var(--text-2); width: 44px; height: 44px; border-radius: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s; flex-shrink: 0;
}
.cart-btn:hover { border-color: var(--primary); color: var(--primary); }
.cart-badge {
  position: absolute; top: -7px; right: -7px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  border: 2px solid #fff;
}

/* ── ANNOUNCEMENT BAR ─────────────────────────────── */
.announcement-bar {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.announcement-bar strong {
  font-weight: 800;
}

/* ── LANDING PAGE ─────────────────────────────────── */
.hero-landing {
  background: var(--bg);
  display: flex; justify-content: center;
  padding: 80px 24px; min-height: 540px;
  position: relative; overflow: hidden;
}
.hero-landing::before {
  content: ""; position: absolute; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(255,255,255,0) 70%);
  top: -200px; right: -200px; border-radius: 50%;
}
.hero-inner {
  display: flex; align-items: center; gap: 80px;
  max-width: 1200px; width: 100%; justify-content: space-between; z-index: 1;
}
.hero-left { flex: 1; max-width: 600px; }
.hero-tag {
  display: inline-block; background: rgba(59,130,246,0.1);
  color: var(--primary); font-size: 13px; font-weight: 700;
  padding: 6px 16px; border-radius: 20px; margin-bottom: 24px;
}
.hero-landing h1 {
  font-size: clamp(36px, 4vw, 56px); font-weight: 900;
  color: var(--text); line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 20px;
}
.hl { color: var(--primary); }
.hero-landing p { color: var(--text-2); font-size: 18px; margin-bottom: 36px; line-height: 1.6; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-cta .btn-outline { color: var(--text); border-color: var(--border); }
.hero-right { flex: 1; display: flex; justify-content: center; position: relative; }
.hero-banner {
  background: rgba(255,255,255,0.7); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.8); box-shadow: 0 20px 40px rgba(0,0,0,0.05);
  border-radius: 24px; padding: 60px 40px; text-align: center;
  max-width: 320px; width: 100%;
}
.banner-emoji { font-size: 96px; margin-bottom: 24px; filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1)); }
.banner-text { color: var(--text); }
.banner-text strong { display: block; font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.banner-text span { font-size: 15px; color: var(--text-2); }

/* Benefits */
.benefits { background: var(--white); border-bottom: 1px solid var(--border); }
.benefits-inner {
  max-width: 1200px; margin: 0 auto; padding: 56px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px;
}
.benefit-card { text-align: center; padding: 0 16px; }
.benefit-icon { font-size: 40px; margin-bottom: 14px; }
.benefit-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.benefit-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* CTA Banner */
.cta-banner { background: #1e293b; }
.cta-inner {
  max-width: 1200px; margin: 0 auto; padding: 48px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-inner h2 { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.cta-inner p { color: #94a3b8; font-size: 15px; }
.cta-btns { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }

/* Preview */
.preview-section { max-width: 1200px; margin: 0 auto; padding: 56px 24px 80px; }
.preview-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.preview-header h2 { font-size: 22px; font-weight: 800; }
.preview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px;
}

/* ── SHOP LAYOUT ──────────────────────────────────── */
.shop-layout { display: flex; max-width: 1440px; width: 100%; margin: 0 auto; min-height: calc(100vh - var(--nav-h)); }

/* Sidebar */
.sidebar {
  width: 230px; flex-shrink: 0;
  background: var(--white); border-right: 1px solid var(--border);
  padding: 20px 0; position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.sidebar-welcome {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 20px; border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.sw-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sw-hi { font-size: 11px; color: var(--muted); }
.sw-name { font-size: 14px; font-weight: 700; color: var(--text); }
.cat-nav { padding: 0 8px; }
.cat-label { font-size: 11px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .8px; padding: 4px 8px 10px; }
.cat-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; background: none; border: none;
  font-family: inherit; font-size: 14px; font-weight: 500; color: var(--text-2);
  padding: 10px 10px; border-radius: var(--r-sm); cursor: pointer; transition: all .15s;
  text-align: left;
}
.cat-item:hover { background: var(--bg); color: var(--primary); }
.cat-item.active { background: var(--primary-l); color: var(--primary); font-weight: 600; }
.cat-icon { font-size: 16px; }
.sidebar-links { padding: 16px 8px 0; border-top: 1px solid var(--border); margin-top: 12px; }
.side-link {
  display: block; width: 100%; background: none; border: none;
  font-family: inherit; font-size: 14px; font-weight: 500; color: var(--text-2);
  padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; transition: all .15s;
  text-align: left;
}
.side-link:hover { background: var(--bg); color: var(--primary); }

/* Shop Main */
.shop-main { flex: 1; padding: 24px; min-width: 0; }
.shop-topbar {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 18px; margin-bottom: 20px; flex-wrap: wrap;
}
.shop-title { font-size: 16px; font-weight: 700; flex: 1; }
.shop-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; width: 220px;
}
.shop-search svg { color: var(--dim); flex-shrink: 0; }
.shop-search input { background: none; border: none; outline: none; font-family: inherit; font-size: 13px; color: var(--text); width: 100%; }
.shop-search input::placeholder { color: var(--dim); }
.product-count { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Products Grid */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.skeleton-wrap { display: contents; }
.skeleton { height: 320px; border-radius: var(--r); background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── PRODUCT CARD ─────────────────────────────────── */
.product-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; transition: all .25s;
}
.product-card:hover { border-color: #bfdbfe; box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-img {
  width: 100%; height: 180px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; overflow: hidden; position: relative;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 3px 8px; border-radius: 4px;
}
.card-body { padding: 16px; }
.card-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.card-desc { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.card-price { font-size: 20px; font-weight: 800; color: var(--text); }
.card-price small { font-size: 13px; font-weight: 600; color: var(--muted); vertical-align: top; margin-top: 3px; display: inline-block; }
.card-stock { font-size: 11px; color: var(--dim); margin-top: 2px; }
.stock-low { color: var(--amber); font-weight: 600; }
.stock-out { color: var(--red); font-weight: 600; }
.add-btn {
  background: var(--primary); color: #fff;
  border: none; font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 14px; border-radius: 8px; cursor: pointer;
  transition: all .2s; white-space: nowrap; flex-shrink: 0;
}
.add-btn:hover { background: var(--primary-d); }
.add-btn:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

/* ── EMPTY / INNER PAGES ──────────────────────────── */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state div { font-size: 56px; margin-bottom: 16px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; font-size: 15px; }
.inner-wrap { max-width: 1000px; margin: 0 auto; padding: 40px 24px 80px; }
.inner-header { display: flex; align-items: center; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.inner-header h2 { font-size: 22px; font-weight: 800; flex: 1; }
.back-btn { background: none; border: none; font-family: inherit; font-size: 14px; color: var(--primary); cursor: pointer; font-weight: 600; padding: 0; }
.back-btn:hover { text-decoration: underline; }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.tab { background: none; border: none; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--muted); padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { overflow-x: auto; }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.data-table th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; background: var(--bg); border-bottom: 1px solid var(--border); }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.role-pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.role-ADMIN { background: #ede9fe; color: #7c3aed; }
.role-USER  { background: #dbeafe; color: #1d4ed8; }
.tbl-actions { display: flex; gap: 8px; }
.tbl-btn { font-family: inherit; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 6px; cursor: pointer; transition: all .15s; border: none; }
.tbl-edit { background: #f1f5f9; color: var(--text-2); }
.tbl-edit:hover { background: #e2e8f0; }
.tbl-del { background: #fee2e2; color: var(--red); }
.tbl-del:hover { background: #fecaca; }

/* Orders */
.order-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 20px 24px; margin-bottom: 14px; box-shadow: var(--shadow); }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.order-id { font-size: 15px; font-weight: 700; }
.order-date { font-size: 12px; color: var(--muted); margin-top: 3px; }
.order-amount { font-size: 22px; font-weight: 800; color: var(--primary); }
.order-lines { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.order-line { display: flex; justify-content: space-between; font-size: 14px; }
.order-line .oname { color: var(--muted); }
.order-line .oprice { font-weight: 600; }

/* ── CART DRAWER ──────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .3s;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 380px;
  background: var(--white); border-left: 1px solid var(--border);
  z-index: 201; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 24px rgba(0,0,0,.1);
}
.cart-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.cart-item-count { font-size: 12px; font-weight: 700; background: var(--primary); color: #fff; padding: 2px 8px; border-radius: 10px; }
.x-btn { background: var(--bg); border: 1px solid var(--border); color: var(--muted); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: all .2s; }
.x-btn:hover { background: #fee2e2; color: var(--red); }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px; }
.cart-item { display: flex; gap: 12px; padding: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 10px; }
.item-emoji { font-size: 32px; flex-shrink: 0; }
.item-info { flex: 1; min-width: 0; }
.item-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-price-line { font-size: 14px; font-weight: 700; color: var(--primary); margin-top: 3px; }
.item-qty { font-size: 12px; color: var(--muted); }
.item-remove { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 16px; align-self: flex-start; transition: color .2s; padding: 2px; }
.item-remove:hover { color: var(--red); }
.drawer-foot { padding: 18px 20px; border-top: 1px solid var(--border); background: var(--bg); }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 15px; }
.cart-total-row strong { font-size: 22px; font-weight: 800; color: var(--text); }
.btn-checkout { width: 100%; background: var(--primary); color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; padding: 14px; border-radius: var(--r-sm); border: none; cursor: pointer; transition: all .2s; }
.btn-checkout:hover { background: var(--primary-d); }
.btn-checkout:disabled { opacity: .5; cursor: not-allowed; }

/* ── MODALS ───────────────────────────────────────── */
.modal {
  background: var(--white); border-radius: 16px; width: 100%; max-width: 420px;
  padding: 32px; position: relative; box-shadow: var(--shadow-md);
  animation: popIn .3s ease;
}
@keyframes popIn { from { opacity: 0; transform: scale(.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-x { position: absolute; top: 16px; right: 16px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 13px; transition: all .2s; }
.modal-x:hover { background: #fee2e2; color: var(--red); }
.modal-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--bg); padding: 4px; border-radius: 10px; }
.m-tab { flex: 1; background: none; border: none; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--muted); padding: 9px; border-radius: 8px; cursor: pointer; transition: all .2s; }
.m-tab.active { background: var(--white); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.modal-title { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 11px 13px;
  color: var(--text); font-family: inherit; font-size: 14px; outline: none; transition: border-color .2s; resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.demo-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 12px; font-size: 12px; color: #166534; margin-bottom: 14px; line-height: 1.9; }
.demo-box b { color: #15803d; }
.form-err { background: #fef2f2; border: 1px solid #fecaca; color: var(--red); border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-top: 10px; }

/* ── TOAST ────────────────────────────────────────── */
#toasts { position: fixed; bottom: 24px; right: 24px; z-index: 400; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: #1e293b; color: #f1f5f9; border-radius: 10px; padding: 13px 18px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px; max-width: 320px; pointer-events: all; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: tin .3s ease forwards; }
.toast.out { animation: tout .3s ease forwards; }
.toast-success { border-left: 3px solid var(--green); }
.toast-error   { border-left: 3px solid var(--red); }
.toast-info    { border-left: 3px solid var(--primary); }
@keyframes tin  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes tout { from { opacity: 1; } to { opacity: 0; transform: translateX(110%); } }

/* ── FOOTER ───────────────────────────────────────── */
.footer { background: #1e293b; border-top: 1px solid #334155; padding: 20px 24px; }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #64748b; flex-wrap: wrap; gap: 8px; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 900px) {
  /* Landing */
  .hero-inner { flex-direction: column; text-align: center; gap: 40px; }
  .hero-right { display: none; }
  .cta-inner { flex-direction: column; text-align: center; }
  .preview-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  /* Navbar */
  #navbar { height: auto; padding-bottom: 10px; }
  .nav-inner { flex-wrap: wrap; height: auto; padding: 12px; justify-content: space-between; gap: 10px; }
  .nav-search { order: 3; width: 100%; max-width: 100%; margin-top: 4px; }
  .logo-text, .logo-sub { display: none; } /* Hide text on very small screens, keep icon */
  .nav-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  #user-btns { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .btn-outline-sm, .nav-link-btn, .wallet-badge, #add-balance-btn { font-size: 11px; padding: 5px 8px; }
  .user-chip { display: none; } /* Hide user avatar chip on mobile to save space */
  .cart-btn { width: 34px; height: 34px; }
  
  /* Shop Layout */
  .shop-layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: relative; top: 0;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 10px 0;
  }
  .sidebar-welcome { display: none; }
  .cat-nav { display: flex; overflow-x: auto; gap: 8px; padding: 0 16px 8px; }
  .cat-item { width: auto; white-space: nowrap; padding: 8px 12px; }
  .sidebar-links { display: flex; border-top: none; margin-top: 0; padding: 0 16px; gap: 8px; overflow-x: auto; }
  .side-link { width: auto; white-space: nowrap; }

  /* Products */
  .shop-main { padding: 16px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .card-img { height: 140px; font-size: 40px; }
  .card-body { padding: 12px; }
  .card-name { font-size: 13px; }
  .card-price { font-size: 16px; }
  .add-btn { padding: 6px 10px; font-size: 12px; }

  /* Cart & Modals */
  .cart-drawer { width: 100%; right: -100%; }
  .modal-content { margin: 10px; padding: 20px; width: calc(100% - 20px); }
  
  .inner-header { flex-direction: column; align-items: flex-start; }
}
