/* MIXU ORDER - cửa hàng cho khách. Màu theo logo MIXU: xanh lá chuyển màu + vàng. */
:root {
  --brand: #0f7a43;
  --brand-dark: #0a5a32;
  --brand-light: #1aa35a;
  --accent: #ffd23f;
  --ink: #16241c;
  --muted: #66746b;
  --line: #dfe7e2;
  --bg: #f3f8f5;
  --bad: #c92a2a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 16px; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
a { color: var(--brand); }
h1 { font-size: 22px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 16px 0 8px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.center { text-align: center; }
.error { color: var(--bad); margin: 8px 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* Thanh trên */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: .3px; }
.brand img { border-radius: 9px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.brand b { color: var(--accent); }
.install { width: auto; margin: 0; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--brand-dark); font-weight: 700; font-size: 14px; border: 0; cursor: pointer; }

main { max-width: 760px; margin: 0 auto; padding: 14px; }

/* Khối giới thiệu */
.hero {
  border-radius: 16px; padding: 18px 16px; margin-bottom: 14px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 210, 63, .28), transparent 55%), linear-gradient(135deg, var(--brand), var(--brand-dark));
}
.hero p { margin: 0 0 14px; opacity: .92; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions .btn { flex: 1 1 140px; }

/* Nút */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: 12px 16px; border-radius: 12px; border: 0;
  background: var(--brand); color: #fff;
}
form button[type="submit"] { width: 100%; margin-top: 8px; }
button:disabled { opacity: .6; cursor: progress; }
.btn.accent { background: var(--accent); color: var(--brand-dark); }
.btn.light, button.light { background: #fff; color: var(--brand-dark); }
.btn.ghost, button.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); width: 100%; margin-top: 10px; }
.btn.zalo { background: #0068ff; }
.btn.messenger { background: #7b3ff2; }
.stack { display: grid; gap: 10px; }

/* Thẻ, form */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0; }
label.check { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); }
label.check input { width: auto; margin-top: 3px; flex: none; }
input, select, textarea { font: inherit; width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px; margin-top: 4px; background: #fff; color: var(--ink); }
input:focus, textarea:focus { outline: 2px solid rgba(15, 122, 67, .25); border-color: var(--brand); }
textarea { min-height: 76px; resize: vertical; }
.search input { padding: 12px 14px; border-radius: 999px; margin: 0 0 14px; }

/* Danh mục */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; }
.pcard img, .pcard .noimg { width: 100%; aspect-ratio: 1; object-fit: cover; background: #eef4f0; }
.pcard .noimg { display: flex; align-items: center; justify-content: center; color: #b7c9bd; font-weight: 800; letter-spacing: 2px; }
.pbody { padding: 10px; display: grid; gap: 4px; }
.pname { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pprice { color: var(--brand); font-weight: 700; }
.empty { text-align: center; padding: 22px 12px; }
.empty p { margin: 0 0 12px; }

/* Tra cứu đơn */
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.code { font-size: 22px; font-weight: 800; color: var(--brand); letter-spacing: .5px; }
.badge { background: #e6f6ec; color: var(--brand-dark); border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 600; text-align: right; }
.badge.closed { background: #fdecec; color: var(--bad); }
.steps { list-style: none; margin: 14px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 4px; }
.steps li { font-size: 12px; color: var(--muted); text-align: center; position: relative; padding-top: 22px; }
.steps li::before { content: ""; position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: #dfe7e2; }
.steps li.done { color: var(--brand-dark); }
.steps li.done::before { background: var(--brand-light); }
.steps li.current { font-weight: 700; }
.steps li.current::before { background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 210, 63, .35); }
.items { list-style: none; margin: 0; padding: 0; }
.items li, .sum div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.sum div.strong { font-weight: 700; }
.events { list-style: none; margin: 6px 0 10px; padding: 0 0 0 12px; border-left: 2px solid var(--line); }
.events li { padding: 4px 0; font-size: 14px; }
.howto { margin: 8px 0 0; padding-left: 20px; }
.howto li { margin: 4px 0; }

/* Chân trang */
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 16px 24px; }
.foot a { color: var(--muted); }

/* Thanh điều hướng dưới (giống app) */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; color: var(--muted); text-decoration: none; font-size: 12px; }
.tabs a.active { color: var(--brand); font-weight: 600; }
@media (min-width: 800px) {
  .tabs { left: 50%; right: auto; width: 760px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; }
}
