:root {
  --green: #1B8A4B;
  --green-dark: #156e3c;
  --blue: #1F5FBF;
  --blue-dark: #184a94;
  --ink: #16202b;
  --muted: #5a6b7b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg: #f4f7fb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 40, 70, 0.08);
  --shadow-lg: 0 20px 50px rgba(20, 40, 70, 0.14);
  --grad: linear-gradient(120deg, var(--green), var(--blue));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
a { color: var(--blue); }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: 16px;
}
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a.link { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a.link:hover { color: var(--blue); }
#navAuth { display: flex; align-items: center; gap: 12px; }
.nav-user { font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 16px;
  padding: 13px 26px; border: 0; border-radius: 10px; text-decoration: none;
  cursor: pointer; transition: transform .08s ease, box-shadow .2s ease;
  box-shadow: 0 6px 18px rgba(31,95,191,.25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(31,95,191,.32); }
.btn.sm { padding: 9px 16px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn.white { background: #fff; color: var(--blue); box-shadow: 0 6px 18px rgba(0,0,0,.12); }

/* ---- Layout ---- */
.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- Hero ---- */
.hero { background: var(--grad); color: #fff; padding: 72px 24px; overflow: hidden; }
.hero-wrap { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 44px; font-weight: 800; letter-spacing: -.5px; }
.hero p { font-size: 18px; opacity: .95; max-width: 46ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.pill { display: inline-block; background: rgba(255,255,255,.18); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }

/* ID card illustration */
.idcard {
  background: #fff; color: var(--ink); border-radius: 16px; padding: 18px;
  box-shadow: var(--shadow-lg); transform: rotate(-4deg); max-width: 320px; margin: 0 auto;
}
.idcard .top { height: 8px; width: 60px; border-radius: 4px; background: var(--grad); margin-bottom: 14px; }
.idcard .row { display: flex; gap: 12px; align-items: center; }
.idcard .photo { width: 64px; height: 64px; border-radius: 10px; background: linear-gradient(135deg,#dfe8f3,#c3d4ea); flex: none; }
.idcard .lines div { height: 8px; border-radius: 4px; background: #e8eef5; margin-bottom: 7px; }
.idcard .lines div:nth-child(1) { width: 110px; background: #d4def0; }
.idcard .lines div:nth-child(2) { width: 80px; }
.idcard .lines div:nth-child(3) { width: 95px; }
.idcard .foot { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; }
.idcard .chip { width: 34px; height: 24px; border-radius: 5px; background: linear-gradient(135deg,#e9c46a,#d9a441); }
.idcard .code { font-size: 10px; letter-spacing: 2px; color: var(--muted); }

/* ---- Feature cards ---- */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feature .ico { width: 44px; height: 44px; border-radius: 10px; background: #eaf3ee; color: var(--green); display: grid; place-items: center; font-size: 22px; margin-bottom: 12px; }
.feature h3 { font-size: 18px; }
.feature p { font-size: 15px; color: var(--muted); margin: 0; }

/* ---- Product cards ---- */
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); position: relative; }
.product-badge { position: absolute; top: 16px; right: 16px; font-size: 12px; font-weight: 700; color: var(--blue); background: #eaf0fb; padding: 4px 10px; border-radius: 999px; }
.product h3 { font-size: 22px; }
.product .price { font-size: 22px; font-weight: 800; color: var(--green); margin: 6px 0 18px; }

/* ---- Steps ---- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 12px; }
.step h3 { font-size: 16px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---- Discount banner ---- */
.banner { background: var(--surface); border: 1px dashed var(--green); border-radius: var(--radius); padding: 26px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner .big { font-size: 20px; font-weight: 800; }

/* ---- Forms ---- */
.card-box { max-width: 640px; margin: 36px auto; background: var(--surface); padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card-box.narrow { max-width: 430px; }
label { display: block; margin: 14px 0 5px; font-weight: 600; font-size: 14px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #cdd7e2; border-radius: 10px;
  font-size: 16px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,95,191,.12); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 14px; color: var(--muted); background: #f7f9fc; padding: 12px; border-radius: 10px; border: 1px solid var(--line); }
.check input { width: auto; margin-top: 3px; }
.msg { margin-top: 14px; font-weight: 600; min-height: 20px; }

/* ---- Tabs (login) ---- */
.tabs { display: flex; gap: 8px; margin-bottom: 6px; }
.tabs button { flex: 1; background: #eef3f9; color: var(--ink); border: 0; padding: 11px; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; }
.tabs button.active { background: var(--grad); color: #fff; }
.or { text-align: center; color: var(--muted); font-size: 13px; margin: 16px 0 10px; position: relative; }
.or::before, .or::after { content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--line); }
.or::before { left: 0; } .or::after { right: 0; }
.google-btn { display: none; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; border: 1px solid #cdd7e2; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; }
.google-btn:hover { background: #f7f9fc; }

/* ---- Footer ---- */
.footer { background: #0f1823; color: #c6d2df; padding: 36px 24px; margin-top: 40px; }
.footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer a { color: #c6d2df; text-decoration: none; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer .small { font-size: 13px; color: #899db1; }

/* ---- Reviews ---- */
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.verified { font-size: 12px; font-weight: 700; color: var(--green); background: #eaf3ee; padding: 2px 9px; border-radius: 999px; }
.review .stars { color: #e6a700; letter-spacing: 2px; margin-bottom: 6px; }
.review p { margin: 0 0 10px; color: var(--ink); }
.review .del { color: #b00020; border-color: #f3c0c0; }
.stars-input { font-size: 32px; color: #cdd7e2; cursor: pointer; user-select: none; display: flex; gap: 6px; margin-bottom: 4px; }
.stars-input span:hover, .stars-input span.on { color: #e6a700; }

/* ---- Chat ---- */
.chat-shell { max-width: 760px; margin: 28px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; height: 72vh; }
.chat-head { padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--grad); color: #fff; }
.chat-head h2 { margin: 0; font-size: 18px; }
.chat-head p { margin: 2px 0 0; font-size: 13px; opacity: .9; }
.bubbles { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: #f7f9fc; }
.bubble { max-width: 76%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45; position: relative; }
.bubble .t { display: block; font-size: 11px; opacity: .6; margin-top: 4px; }
.bubble.customer { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.bubble.admin { align-self: flex-start; background: #fff; border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: #fff; }
.chat-input input { flex: 1; }
.chat-empty { text-align: center; color: var(--muted); margin: auto; font-size: 14px; }

/* ---- Admin ---- */
.admin-grid { max-width: 1040px; margin: 24px auto; display: grid; grid-template-columns: 320px 1fr; gap: 18px; padding: 0 24px; }
.convo-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; max-height: 76vh; overflow-y: auto; }
.convo { padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.convo:hover { background: #f4f7fb; }
.convo.active { background: #eaf0fb; }
.convo .who { font-weight: 700; font-size: 14px; }
.convo .snippet { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo .when { font-size: 11px; color: var(--muted); }
.admin-thread { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; height: 76vh; overflow: hidden; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .cta { justify-content: center; }
  .idcard { margin-top: 10px; }
  .grid.cols-3, .grid.cols-2, .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .nav-links .link { display: none; }
  .row { grid-template-columns: 1fr; }
}
