/* ==========================================================================
   Herbo Active — shared stylesheet
   Themes: public front site, store panel (green), admin panel (dark)
   ========================================================================== */

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

:root {
  --green: #1e8e3e;
  --green-dark: #146c2e;
  --green-light: #e6f4ea;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f5f7f6;
  --danger: #d93025;
  --warn: #f59e0b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  padding: 11px 18px; border-radius: 8px; font-size: 15px; font-weight: 600;
  background: var(--green); color: #fff; text-align: center; transition: background .15s;
}
.btn:hover { background: var(--green-dark); text-decoration: none; }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f3f4f6; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #374151; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light);
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Alerts ---------- */
.alert { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fdecea; color: var(--danger); border: 1px solid #f7c5c0; }
.alert-success { background: var(--green-light); color: var(--green-dark); border: 1px solid #bfe3c8; }
.alert ul { margin: 4px 0 0 18px; }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-card {
  width: 100%; max-width: 420px; background: #fff; border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12); padding: 34px 30px;
}
.auth-card.wide { max-width: 560px; }
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-logo .mark {
  display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 14px;
  background: var(--green); color: #fff; font-weight: 800; font-size: 22px; margin-bottom: 10px;
}
.auth-logo h1 { font-size: 20px; }
.auth-logo p { color: var(--muted); font-size: 13px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }

/* store theme uses green (default); admin auth uses a dark card */
.theme-admin.auth-page { background: #0f172a; }
.theme-admin .auth-card { background: #1e293b; color: #e2e8f0; }
.theme-admin .auth-logo .mark { background: #334155; }
.theme-admin .field label { color: #cbd5e1; }
.theme-admin .field input {
  background: #0f172a; border-color: #334155; color: #e2e8f0;
}
.theme-admin .field input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.2); }
.theme-admin .btn { background: #2563eb; }
.theme-admin .btn:hover { background: #1d4ed8; }
.theme-store.auth-page { background: linear-gradient(135deg, #1e8e3e 0%, #146c2e 100%); }

/* ==========================================================================
   Public front site
   ========================================================================== */
.site-header {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); padding: 14px 0; }
.brand .mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--green); color: #fff; font-weight: 800; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a { color: var(--ink); font-weight: 500; font-size: 15px; }
.hero {
  background: linear-gradient(135deg, #1e8e3e 0%, #146c2e 100%); color: #fff;
  padding: 72px 0;
}
.hero h1 { font-size: 40px; line-height: 1.15; margin-bottom: 14px; }
.hero p { font-size: 18px; opacity: .92; max-width: 620px; margin-bottom: 26px; }
.hero .btn { background: #fff; color: var(--green-dark); }
.hero .btn:hover { background: #f0f0f0; }
.hero .btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); margin-left: 10px; }
.section { padding: 56px 0; }
.section h2 { font-size: 26px; text-align: center; margin-bottom: 8px; }
.section .sub { text-align: center; color: var(--muted); margin-bottom: 34px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 800px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card .ico { font-size: 26px; margin-bottom: 10px; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 14px; }
.site-footer { background: #111827; color: #9ca3af; padding: 30px 0; text-align: center; font-size: 14px; }
.site-footer a { color: #d1d5db; }

/* ==========================================================================
   Panel layout (store + admin share structure, differ by theme vars)
   ========================================================================== */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { color: #fff; display: flex; flex-direction: column; }
.sidebar .logo { display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-weight: 800; font-size: 17px; }
.sidebar .logo .mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.18); font-size: 15px; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  color: rgba(255,255,255,.82); font-size: 14.5px; font-weight: 500;
}
.sidebar nav a:hover { background: rgba(255,255,255,.10); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 3px 0 0 #fff; }
.sidebar nav .muted { padding: 14px 20px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.5); }
.sidebar nav a .soon { margin-left: auto; font-size: 10px; background: rgba(255,255,255,.2); padding: 1px 6px; border-radius: 10px; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-bottom: 1px solid var(--line); padding: 14px 24px;
}
.topbar h1 { font-size: 19px; }
.topbar .user { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.topbar .user .who { text-align: right; }
.topbar .user .who small { display: block; color: var(--muted); font-size: 12px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--green-light); color: var(--green-dark); font-weight: 700; }
.content { padding: 24px; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stat .value { font-size: 28px; font-weight: 700; }
.stat.green .value { color: var(--green); }
.stat.warn .value { color: var(--warn); }
.stat.danger .value { color: var(--danger); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.panel h2 { font-size: 16px; margin-bottom: 4px; }
.panel .sub { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.ok { background: var(--green-light); color: var(--green-dark); }
.badge.pending { background: #fef3c7; color: #92661a; }
.badge.off { background: #fee2e2; color: #991b1b; }
.dl { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; font-size: 14px; }
.dl dt { color: var(--muted); }

/* --- store theme (green sidebar) --- */
.theme-store .sidebar { background: linear-gradient(180deg, #1e8e3e, #146c2e); }

/* --- admin theme (dark sidebar) --- */
.theme-admin .sidebar { background: #0f172a; }
.theme-admin .sidebar nav a.active { box-shadow: inset 3px 0 0 #60a5fa; }
.theme-admin .avatar { background: #1e293b; color: #93c5fd; }

@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar nav .muted { display: none; }
}

/* ==========================================================================
   Landing page (single-page front website)
   ========================================================================== */
html { scroll-behavior: smooth; }
section[id], footer[id] { scroll-margin-top: 72px; }

.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.site-header .site-nav .btn { color: #fff; }
.site-header .site-nav .btn:hover { color: #fff; }

/* hero */
.hero { padding: 76px 0; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
.pill { display: inline-block; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25);
        padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn { margin: 0; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hstat { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 20px; text-align: center; }
.hstat .n { font-size: 30px; font-weight: 800; line-height: 1; }
.hstat .l { font-size: 13px; opacity: .92; margin-top: 8px; }

/* sections */
.section.alt { background: #fff; }
.note-center { text-align: center; color: var(--muted); margin-top: 24px; }

/* product grid */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
                box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.10); }
.pimg { height: 172px; background: var(--green-light); display: grid; place-items: center; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg-ph { font-size: 52px; }
.pbody { padding: 16px 18px; }
.pbody h3 { font-size: 16px; }
.price { color: var(--green); font-weight: 700; margin-top: 6px; }
.pdesc { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* product showcase (placeholder before catalogue exists) */
.showcase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.scat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; text-align: center; box-shadow: var(--shadow); }
.scat span { font-size: 40px; display: block; margin-bottom: 10px; }
.scat h3 { font-size: 15px; }

/* banking partner */
.bank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bank-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }
.bank-card h3 { margin-bottom: 12px; color: var(--green-dark); }
.bank-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.bank-dl dt { color: var(--muted); }
.bank-qr { margin-top: 14px; max-width: 150px; border: 1px solid var(--line); border-radius: 8px; }

/* cta band */
.cta-band { background: linear-gradient(135deg, var(--green), var(--green-dark)); color: #fff; text-align: center; padding: 58px 0; }
.cta-band h2 { font-size: 28px; margin-bottom: 8px; }
.cta-band p { opacity: .92; margin-bottom: 24px; }
.cta-band .btn { background: #fff; color: var(--green-dark); }
.btn-ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
.btn-ghost-light:hover { background: rgba(255,255,255,.14); }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; text-align: center; box-shadow: var(--shadow); }
.contact-card .ico { font-size: 30px; margin-bottom: 8px; }
.contact-card h3 { font-size: 16px; margin-bottom: 4px; }
.contact-card a { word-break: break-word; }

/* footer (single-page) */
.site-footer { background: #111827; color: #9ca3af; padding: 40px 0; }
.site-footer .wrap { text-align: center; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 14px; }
.foot-brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--green); display: inline-grid; place-items: center; color: #fff; font-size: 14px; }
.foot-nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.foot-nav a { color: #d1d5db; font-size: 14px; }
.foot-copy { font-size: 13px; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .product-grid, .bank-grid, .contact-grid, .showcase { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .product-grid, .bank-grid, .contact-grid, .showcase { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
}

/* ==========================================================================
   v2 — visual polish + mobile hamburger navigation
   ========================================================================== */
:root { --font-head: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
html, body { overflow-x: hidden; }
body { font-family: var(--font-body); }
h1, h2, h3, .brand, .hstat .n, .foot-brand { font-family: var(--font-head); letter-spacing: -0.02em; }

/* ---- buttons: soft lift ---- */
.btn { border-radius: 10px; box-shadow: 0 6px 16px rgba(30,142,62,.24);
       transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30,142,62,.30); }
.btn-outline, .btn-ghost, .btn-ghost-light, .hero .btn-outline { box-shadow: none; }
.hero .btn { box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.hero .btn-outline:hover { background: rgba(255,255,255,.14); }

/* ---- glassy sticky header ---- */
.site-header { background: rgba(255,255,255,.82); -webkit-backdrop-filter: saturate(180%) blur(12px);
               backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid rgba(17,24,39,.06);
               transition: box-shadow .25s ease, background .25s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(17,24,39,.09); background: rgba(255,255,255,.94); }
.brand .mark { background: linear-gradient(135deg, #23a049, #157f36); box-shadow: 0 6px 16px rgba(30,142,62,.35); }
.site-nav { gap: 28px; align-items: center; }
.site-nav a:not(.btn) { position: relative; color: #374151; font-weight: 500; }
.site-nav a:not(.btn)::after { content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
                               background: linear-gradient(90deg, var(--green), #34c759); transition: width .22s ease; }
.site-nav a:not(.btn):hover { color: var(--green-dark); text-decoration: none; }
.site-nav a:not(.btn):hover::after { width: 100%; }

/* ---- hamburger button ---- */
.nav-toggle { display: none; width: 46px; height: 46px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px auto; border-radius: 2px;
                   background: var(--ink); transition: transform .3s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 55;
                opacity: 0; transition: opacity .3s ease; }
.nav-backdrop.open { opacity: 1; }

/* ---- hero flair ---- */
.hero { position: relative; isolation: isolate; overflow: hidden;
        background: radial-gradient(900px 420px at 82% -12%, #37c667 0%, rgba(55,198,103,0) 60%),
                    linear-gradient(135deg, #1e8e3e 0%, #0e5324 100%); }
.hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; z-index: -1;
                              background: rgba(255,255,255,.07); }
.hero::before { width: 340px; height: 340px; right: -80px; bottom: -140px; }
.hero::after { width: 180px; height: 180px; left: -60px; top: 30px; background: rgba(255,255,255,.05); }
.hero h1 { font-size: 48px; }
.hero-copy { animation: fadeUp .7s ease both; }
.hero-stats { animation: fadeUp .7s .12s ease both; }
.hstat { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: transform .18s ease, background .18s ease; }
.hstat:hover { transform: translateY(-3px); background: rgba(255,255,255,.18); }

/* ---- section headings w/ accent ---- */
.section h2 { display: inline-block; }
.section h2::after { content: ''; display: block; width: 54px; height: 4px; margin: 14px auto 0; border-radius: 3px;
                     background: linear-gradient(90deg, var(--green), #34c759); }

/* ---- card icon chips + lift ---- */
.card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(17,24,39,.10); border-color: transparent; }
.card .ico { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px;
             border-radius: 15px; background: var(--green-light); }
.scat, .contact-card { transition: transform .18s ease, box-shadow .18s ease; }
.scat:hover, .contact-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(17,24,39,.09); }

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-copy, .hero-stats { animation: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---- mobile navigation ---- */
@media (max-width: 860px) {
  .site-header { z-index: 65; }
  .nav-toggle { display: block; z-index: 70; }
  .site-nav {
    position: fixed; top: 0; right: 0; z-index: 60;
    height: 100vh; width: min(82vw, 320px);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 84px 26px 26px; background: #fff;
    box-shadow: -14px 0 44px rgba(17,24,39,.18);
    transform: translateX(100%); transition: transform .3s ease;
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav a:not(.btn) { padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 18px; text-align: center; }
  body.nav-open { overflow: hidden; }
  .hero { padding: 56px 0; }
  .hero h1 { font-size: 34px; }
  .hero-inner { gap: 30px; }
  .hstat { padding: 16px 12px; }
  .hstat .n { font-size: 24px; }
  .hstat .l { font-size: 12px; }
}
@media (min-width: 861px) {
  .nav-backdrop { display: none; }
}
