/* ============================================================
   DIGITAL GODOWN — Facebook Blue + White Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --brand:      #1877f2;
  --brand2:     #0c5fd4;
  --brand3:     #1565c0;
  --brand-light:#e7f0fd;
  --brand-glow: rgba(24,119,242,.18);
  --accent:     #42b72a;

  --bg:         #f0f2f5;
  --bg2:        #ffffff;
  --bg3:        #e7f0fd;
  --card:       #ffffff;
  --card-hover: #f7f9fc;
  --ink:        #050505;
  --ink2:       #444950;
  --muted:      #65676b;
  --line:       #e4e6eb;
  --line2:      #ccd0d5;

  --green:      #42b72a;
  --green-bg:   #e6f4e3;
  --red:        #fa3e3e;
  --red-bg:     #fde8e8;
  --amber:      #f4a701;
  --amber-bg:   #fff3cd;
  --blue-bg:    #e7f0fd;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow:     0 4px 12px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:  0 8px 30px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);

  --r-sm: 6px;
  --r:    8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 999px;

  --font:         'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; }
input, select, textarea { font: inherit; }
.hide { display: none !important; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 99px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r);
  border: 1.5px solid var(--line2); background: var(--card);
  color: var(--ink); font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all .15s;
}
.btn:hover { background: var(--bg); border-color: var(--brand); color: var(--brand); }
.btn-p { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(24,119,242,.3); }
.btn-p:hover { background: var(--brand2); border-color: var(--brand2); color: #fff; box-shadow: 0 4px 14px rgba(24,119,242,.4); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--r-sm); }
.btn-lg { padding: 10px 22px; font-size: 15px; border-radius: var(--r); }
.btn-white { background: #fff; border-color: #fff; color: var(--brand); }
.btn-white:hover { background: var(--brand-light); border-color: var(--brand-light); color: var(--brand2); }
.btn-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-danger { color: var(--red); border-color: #f5c6c6; }
.btn-danger:hover { background: var(--red-bg); }
.wa { background: #25d366; border-color: #25d366; color: #fff; box-shadow: 0 2px 8px rgba(37,211,102,.3); }
.wa:hover { background: #1ea350; border-color: #1ea350; color: #fff; }

/* BADGE */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
}
.badge.green { background: var(--green-bg); color: #2d8a20; }
.badge.red   { background: var(--red-bg);   color: #c53030; }
.badge.amber { background: var(--amber-bg); color: #856404; }
.badge.blue  { background: var(--blue-bg);  color: var(--brand); }

/* CARD */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px;
  box-shadow: var(--shadow-sm); transition: all .2s;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--line2); transform: translateY(-2px); }

/* PANEL */
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px; margin-top: 14px;
  box-shadow: var(--shadow-sm);
}
.panel h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--ink); }

/* INPUTS */
input, select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--line2); border-radius: var(--r);
  background: var(--card); color: var(--ink); font-size: 14px;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow);
}
label { display: block; font-size: 12px; font-weight: 600; color: var(--ink2); margin-bottom: 4px; }

/* TOAST */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: var(--r-lg); font-size: 13px; font-weight: 500;
  z-index: 9999; opacity: 0; transform: translateY(8px);
  transition: all .25s; pointer-events: none; max-width: 300px;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* STATUS */
.err { background: var(--red-bg); color: var(--red); padding: 8px 12px; border-radius: var(--r); font-size: 13px; border-left: 3px solid var(--red); }
.ok  { background: var(--green-bg); color: var(--green); padding: 8px 12px; border-radius: var(--r); font-size: 13px; border-left: 3px solid var(--green); }

/* SKELETON */
.skeleton { background: linear-gradient(90deg, var(--line) 25%, var(--line2) 50%, var(--line) 75%); background-size: 200%; border-radius: var(--r); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* STARS */
.stars { color: var(--amber); }

/* ============================================================
   NAV — Facebook Blue
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--brand);
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.nav-in {
  max-width: 1180px; margin: auto; padding: 0 16px;
  display: flex; align-items: center; gap: 10px; height: 56px;
}
.logo {
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
  color: #fff; white-space: nowrap; letter-spacing: -.3px;
}
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; margin-left: 8px; }
.nav-links a {
  padding: 7px 12px; border-radius: var(--r); color: rgba(255,255,255,.85);
  font-size: 14px; font-weight: 500; transition: .15s; cursor: pointer;
}
.nav-links a:hover { background: rgba(255,255,255,.15); color: #fff; }
.nav-links a.active { background: rgba(255,255,255,.2); color: #fff; font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-mobile-menu { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(175deg, var(--brand) 0%, var(--brand2) 55%, var(--brand3) 100%);
  padding: 64px 20px 72px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(255,255,255,.08), transparent),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(66,183,42,.15), transparent);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: auto; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--r-full); padding: 5px 14px;
  font-size: 12px; font-weight: 600; color: #e7f3ff; margin-bottom: 18px;
}
.hero-pill span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  display: inline-block; animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(1.9rem,4.5vw,3.2rem);
  font-weight: 800; line-height: 1.2; color: #fff;
  letter-spacing: -.02em; margin-bottom: 14px;
}
.hero h1 em { font-style: normal; color: #a8d5a2; }
.hero p { font-size: 15px; color: rgba(255,255,255,.8); max-width: 500px; margin: 0 auto 22px; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  margin-top: 40px; padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.hero-stat .num { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: #fff; }
.hero-stat .lbl { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 2px; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-wrap {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 56px; z-index: 40;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  max-width: 1180px; margin: auto; padding: 10px 16px;
}
.filter-search { flex: 1; min-width: 200px; position: relative; }
.filter-search input { padding-left: 36px; background: var(--bg); border-radius: var(--r-full); }
.filter-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.cat-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.cat-pill {
  padding: 5px 13px; border-radius: var(--r-full); font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--line2); background: #fff; color: var(--ink2);
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.cat-pill:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.cat-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-sort select { width: auto; padding: 6px 10px; font-size: 12px; border-radius: var(--r-full); cursor: pointer; }
.filter-count { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: auto; white-space: nowrap; }

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.prod-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: all .2s; position: relative;
  box-shadow: var(--shadow-sm);
}
.prod-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--brand); }
.prod-card .featured-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: var(--brand); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-full);
}
.prod-img {
  height: 160px; overflow: hidden; position: relative;
  background: linear-gradient(135deg, var(--brand-light), #dce8fd);
  display: flex; align-items: center; justify-content: center;
}
.prod-img img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.prod-card:hover .prod-img img { transform: scale(1.04); }
.prod-img .prod-icon { font-size: 3.2rem; }
.prod-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.prod-cat {
  font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--brand); background: var(--blue-bg);
  display: inline-block; padding: 2px 8px; border-radius: var(--r-full);
}
.prod-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.prod-desc { font-size: 12px; color: var(--muted); flex: 1; line-height: 1.5; }
.prod-rating { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.prod-footer {
  padding: 10px 14px 14px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.prod-price { display: flex; align-items: baseline; gap: 4px; }
.prod-price .amount { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--brand); }
.prod-price .validity { font-size: 11px; color: var(--muted); }
.prod-actions { display: flex; gap: 5px; width: 100%; }
.prod-actions .btn { flex: 1; font-size: 12px; padding: 7px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { max-width: 1180px; margin: auto; padding: 40px 16px; }
.section-header { text-align: center; margin-bottom: 28px; }
.section-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); background: var(--brand-light);
  padding: 4px 12px; border-radius: var(--r-full); margin-bottom: 10px;
}
.section-header h2 {
  font-family: var(--font-display); font-size: clamp(1.6rem,3vw,2.4rem);
  font-weight: 800; color: var(--ink); line-height: 1.2; letter-spacing: -.01em;
}
.section-header p { color: var(--muted); margin-top: 6px; font-size: 14px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ============================================================
   SERVICES
   ============================================================ */
.svc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; transition: .2s;
}
.svc-card:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.svc-icon { font-size: 2rem; margin-bottom: 10px; }
.svc-name { font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 5px; }
.svc-desc { color: var(--muted); font-size: 13px; }
.svc-benefits { list-style: none; margin-top: 10px; }
.svc-benefits li { font-size: 12px; color: var(--ink2); padding: 3px 0; display: flex; align-items: center; gap: 6px; }
.svc-benefits li::before { content: '✓'; color: var(--green); font-weight: 700; font-size: 11px; }
.svc-price { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--brand); margin-top: 10px; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testi-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; position: relative; overflow: hidden; transition: .2s;
}
.testi-card:hover { box-shadow: var(--shadow); }
.testi-card::before { content: '"'; font-family: Georgia,serif; font-size: 5rem; line-height: 1; color: var(--brand); opacity: .1; position: absolute; top: 4px; left: 12px; }
.testi-quote { font-size: 13px; color: var(--ink2); line-height: 1.7; margin-bottom: 12px; position: relative; font-style: italic; }
.testi-meta { display: flex; align-items: center; gap: 10px; }
.testi-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand2)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.testi-name { font-weight: 700; font-size: 13px; color: var(--ink); }
.testi-role { font-size: 11px; color: var(--muted); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.contact-info h2 { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink); }
.contact-info p { color: var(--muted); margin-top: 6px; line-height: 1.7; font-size: 14px; }
.contact-chips { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.contact-chip { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink2); }
.contact-chip-icon { width: 36px; height: 36px; border-radius: var(--r); background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-form-wrap { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow); }

/* ============================================================
   BLOG
   ============================================================ */
.blog-hero { background: linear-gradient(135deg, var(--brand), var(--brand2)); padding: 40px 16px; text-align: center; color: #fff; }
.blog-hero h1 { font-family: var(--font-display); font-size: 24px; font-weight: 800; margin: 10px 0 6px; }
.blog-hero p { font-size: 14px; color: rgba(255,255,255,.8); }
.blog-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: .2s; display: flex; flex-direction: column; }
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand); }
.blog-cover { height: 180px; overflow: hidden; background: var(--bg3); }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.blog-card:hover .blog-cover img { transform: scale(1.04); }
.blog-cover-placeholder { height: 180px; background: linear-gradient(135deg, var(--brand), var(--brand2)); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.blog-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.blog-date { font-size: 11px; color: var(--muted); }
.blog-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.blog-excerpt { font-size: 12px; color: var(--muted); flex: 1; line-height: 1.5; }
.blog-read { font-size: 12px; color: var(--brand); font-weight: 600; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; }
.blog-detail-title { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1.25; color: var(--ink); }
.blog-content { font-size: 15px; line-height: 1.8; color: var(--ink2); }
.blog-content h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--ink); margin: 2rem 0 .8rem; }
.blog-content p { margin-bottom: 1rem; }

/* ============================================================
   CUSTOMER PORTAL
   ============================================================ */
.portal-wrap { min-height: 100vh; background: var(--bg); }
.portal-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(165deg, var(--brand) 0%, var(--brand2) 60%, var(--brand3) 100%); padding: 24px; }
.portal-auth-card { background: #fff; border-radius: var(--r-xl); padding: 28px; width: 400px; max-width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.portal-auth-card h2 { font-family: var(--font-display); color: var(--ink); font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.portal-auth-card p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.auth-tabs { display: flex; border-bottom: 2px solid var(--line); margin-bottom: 16px; }
.auth-tab { flex: 1; padding: 8px; text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: .15s; }
.auth-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.portal-nav { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); }
.portal-inner { max-width: 960px; margin: 0 auto; padding: 20px 16px; }
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 10px; transition: .2s; }
.order-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.order-icon { width: 52px; height: 52px; border-radius: var(--r); background: var(--blue-bg); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; }
.order-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.order-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.order-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.ref-box { background: linear-gradient(135deg, var(--brand), var(--brand2)); border-radius: var(--r-xl); padding: 20px; color: #fff; text-align: center; }
.ref-code { font-family: monospace; font-size: 22px; font-weight: 700; letter-spacing: .1em; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); display: inline-block; padding: 8px 20px; border-radius: var(--r-lg); margin-top: 8px; cursor: pointer; }

/* ============================================================
   FOOTER
   ============================================================ */
footer { background: #fff; border-top: 2px solid var(--brand); padding: 32px 16px 20px; }
.footer-inner { max-width: 1180px; margin: auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 24px; }
.footer-brand p { font-size: 13px; color: var(--muted); margin-top: 8px; max-width: 240px; }
.footer-col h4 { color: var(--ink); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.footer-col a { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; transition: .15s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-wrap { display: flex; min-height: 100vh; background: var(--bg); }
.side {
  width: 240px; background: #fff; color: var(--ink2); flex-shrink: 0;
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .brand { font-family: var(--font-display); color: var(--brand); font-weight: 800; padding: 16px; font-size: 16px; border-bottom: 1px solid var(--line); }
#sideNav { flex: 1; padding: 8px 0 16px; }
.side-group { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 10px 16px 4px; }
.side a { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--ink2); border-left: 3px solid transparent; transition: .15s; cursor: pointer; }
.side a:hover { background: var(--blue-bg); color: var(--brand); }
.side a.active { background: var(--blue-bg); color: var(--brand); border-left-color: var(--brand); font-weight: 700; }
.main { flex: 1; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px; position: sticky; top: 0; z-index: 20; box-shadow: var(--shadow-sm); }
.top h1 { font-size: 15px; font-weight: 700; color: var(--ink); }
.top .who { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pad { padding: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-sm); transition: .2s; }
.stat:hover { box-shadow: var(--shadow); border-color: var(--brand); }
.stat .l { font-size: 11px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 20px; font-weight: 800; margin-top: 4px; color: var(--ink); font-family: var(--font-display); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--muted); font-weight: 700; background: var(--bg); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
td { color: var(--ink2); }
.bar { height: 7px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-top: 3px; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.toolbar input { max-width: 260px; }
/* Feature toggle */
.tg { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; transition: .15s; }
.tg:hover { border-color: var(--brand); background: var(--blue-bg); }
.tg input { display: none; width: auto; }
.sw { width: 38px; height: 21px; background: var(--line2); border-radius: 99px; position: relative; transition: .2s; flex-shrink: 0; cursor: pointer; }
.sw::after { content: ''; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.tg input:checked + .sw { background: var(--brand); }
.tg input:checked + .sw::after { left: 19.5px; }
/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px; backdrop-filter: blur(3px); }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; width: 580px; max-width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal h3 { margin-bottom: 16px; font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid .full { grid-column: 1/-1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(165deg, var(--brand), var(--brand2)); }
.login-card { background: #fff; border-radius: var(--r-xl); padding: 28px; width: 380px; max-width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.login-card h2 { font-family: var(--font-display); text-align: center; color: var(--ink); font-size: 20px; font-weight: 800; }
.login-card p { text-align: center; color: var(--muted); margin: 4px 0 20px; font-size: 13px; }
/* Date filter */
.date-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.date-filter label { margin: 0; color: var(--muted); font-size: 12px; }
.date-filter input { width: 140px; padding: 5px 8px; font-size: 12px; }
/* Tabs */
.tab-bar { display: flex; border-bottom: 2px solid var(--line); margin-bottom: 14px; }
.tab-btn { padding: 8px 16px; font-size: 13px; font-weight: 600; background: none; border: none; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer; margin-bottom: -2px; transition: .15s; }
.tab-btn.active { border-bottom-color: var(--brand); color: var(--brand); }
/* Image upload */
.img-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.img-thumb { position: relative; width: 88px; height: 88px; border-radius: var(--r); overflow: hidden; border: 2px solid var(--line); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-thumb .del-img { position: absolute; top: 2px; right: 2px; background: rgba(220,38,38,.9); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.img-thumb.primary { border-color: var(--brand); }
.upload-drop { border: 2px dashed var(--line2); border-radius: var(--r-lg); padding: 16px; text-align: center; cursor: pointer; font-size: 13px; color: var(--muted); transition: .2s; display: block; }
.upload-drop:hover { border-color: var(--brand); color: var(--brand); background: var(--blue-bg); }
.ph-table th, .ph-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); font-size: 12px; }
.ph-table th { color: var(--muted); font-weight: 700; background: var(--bg); }
/* Price history trend */
.trend-up { color: var(--red); } .trend-dn { color: var(--green); }

/* ============================================================
   MENU BTN + RESPONSIVE
   ============================================================ */
.menu-btn { display: none; }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .side { position: fixed; left: -240px; transition: .25s; z-index: 50; height: 100vh; }
  .side.open { left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .hero-stats { gap: 16px; }
  .nav-links { display: none; }
  .nav-links.mobile-open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--brand2); padding: 12px 16px; gap: 4px; z-index: 99; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
  .nav-links.mobile-open a { padding: 10px 12px; border-radius: var(--r); }
  .menu-btn { display: inline-flex !important; background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; }
  .footer-top { grid-template-columns: 1fr; gap: 16px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .prod-actions { flex-direction: column; }
  .hero-stats { flex-wrap: wrap; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   DARK MODE — Facebook Dark Theme
   ============================================================ */
[data-theme="dark"] {
  --brand:       #2d88ff;
  --brand2:      #1877f2;
  --brand-light: #1d2d44;
  --brand-glow:  rgba(45,136,255,.2);
  --bg:          #18191a;
  --bg2:         #242526;
  --bg3:         #1d2d44;
  --card:        #242526;
  --card-hover:  #2d2e2f;
  --ink:         #e4e6eb;
  --ink2:        #b0b3b8;
  --muted:       #8a8d91;
  --line:        #3e4042;
  --line2:       #4e4f50;
  --green-bg:    #1a3a1a;
  --red-bg:      #3a1a1a;
  --amber-bg:    #3a2800;
  --blue-bg:     #1d2d44;
}
[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
[data-theme="dark"] .nav { background: #242526; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
[data-theme="dark"] .filter-wrap { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .filter-search input { background: var(--bg); }
[data-theme="dark"] .cat-pill { background: var(--card); border-color: var(--line2); color: var(--ink2); }
[data-theme="dark"] .cat-pill:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand); }
[data-theme="dark"] .cat-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-theme="dark"] .prod-card { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .prod-card:hover { border-color: var(--brand); }
[data-theme="dark"] .prod-footer { border-color: var(--line); }
[data-theme="dark"] .card, [data-theme="dark"] .panel { background: var(--card); border-color: var(--line); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: var(--bg2); color: var(--ink); border-color: var(--line2); }
[data-theme="dark"] .btn { background: var(--card); color: var(--ink); border-color: var(--line2); }
[data-theme="dark"] .btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
[data-theme="dark"] .btn-p { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-theme="dark"] .btn-p:hover { background: var(--brand2); color: #fff; }
[data-theme="dark"] .section-header h2 { color: var(--ink); }
[data-theme="dark"] .svc-card { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .svc-name { color: var(--ink); }
[data-theme="dark"] .testi-card { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .contact-section { background: var(--bg2); border-color: var(--line); }
[data-theme="dark"] .contact-form-wrap { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .contact-info h2 { color: var(--ink); }
[data-theme="dark"] footer { background: #18191a; border-color: var(--brand); }
[data-theme="dark"] .footer-col h4 { color: var(--ink); }
[data-theme="dark"] .footer-bottom { border-color: var(--line); }
[data-theme="dark"] .blog-card { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .blog-card:hover { border-color: var(--brand); }
[data-theme="dark"] .blog-title { color: var(--ink); }
[data-theme="dark"] .sidebar-card { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .order-card { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .order-card:hover { border-color: var(--brand); }
[data-theme="dark"] .detail-grid .gallery-main { background: var(--brand-light); border-color: var(--line); }
[data-theme="dark"] .dpricebox { background: var(--brand-light); border-color: var(--brand); }
[data-theme="dark"] .tab-bar { border-color: var(--line); }
[data-theme="dark"] th { background: var(--bg); color: var(--muted); }
[data-theme="dark"] td { color: var(--ink2); }
[data-theme="dark"] th, [data-theme="dark"] td { border-color: var(--line); }
[data-theme="dark"] .dark-toggle { background: var(--card); border-color: var(--line2); color: var(--ink); }
