:root {
  --moss: #3d5a3a;
  --moss-dark: #2b4029;
  --moss-soft: #e4ebdc;
  --cream: #faf6ea;
  --cream-2: #f1ead6;
  --gold: #c8962c;
  --gold-dark: #9c7216;
  --ink: #22281f;
  --muted: #666b5a;
  --line: #ded7bf;
  --white: #fffefa;
  --danger: #a63a2b;
  --danger-bg: #f8e6e2;
  --ok-bg: #e2efd9;
  --info-bg: #f3ecd0;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(43, 64, 41, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #1b2119; --cream-2: #232b20; --white: #20281d; --ink: #ece8d8; --muted: #a9ae9b;
    --line: #38422f; --moss-soft: #2a3626; --danger-bg: #3d221d; --ok-bg: #26361f; --info-bg: #35301a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 16px/1.6 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--moss); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.main { padding: 28px 0 56px; min-height: 60vh; }

.site-header { background: var(--moss-dark); color: #fff; position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: .2px; }
.brand-mark { color: var(--gold); margin-right: 4px; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.nav a:not(.btn) { color: #e8efe0; text-decoration: none; padding: 8px 2px; }
.nav a:not(.btn):hover { color: #fff; text-decoration: underline; }
.inline-form { display: inline; margin: 0; }
.link-btn { background: none; border: 0; color: #e8efe0; font: inherit; cursor: pointer; padding: 8px 2px; }
.link-btn:hover { text-decoration: underline; color: #fff; }
.site-footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .9rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--moss); color: #fff; font: 600 1rem/1.2 inherit; text-decoration: none;
}
.btn:hover { background: var(--moss-dark); }
.btn-gold { background: var(--gold); color: #1d1a10; }
.btn-gold:hover { background: #d9a73d; }
.btn-ghost { background: transparent; color: var(--moss); border: 2px solid var(--moss); }
.btn-ghost:hover { background: var(--moss-soft); }
.btn-danger { background: var(--danger); }
.btn-small { min-height: 38px; padding: 6px 14px; font-size: .92rem; border-radius: 10px; }
.btn-block { width: 100%; }
.site-header .btn { background: var(--gold); color: #1d1a10; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat .num { font-size: 2rem; font-weight: 700; color: var(--moss); }
.stat .lbl { color: var(--muted); font-size: .92rem; }
.muted { color: var(--muted); }
.stack > * + * { margin-top: 14px; }

.hero {
  background: linear-gradient(180deg, var(--moss-dark) 0%, var(--moss) 100%);
  color: #fff; border-radius: 22px; padding: 56px 28px 0; overflow: hidden; position: relative;
}
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); max-width: 18ch; }
.hero p { max-width: 56ch; color: #e8efe0; font-size: 1.08rem; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }
.hero svg { display: block; width: 100%; height: auto; margin-top: 24px; }
.hero .btn-ghost { color: #fff; border-color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.section { margin-top: 36px; }
.feature .ico { font-size: 1.6rem; }

.form { max-width: 560px; }
.form-wide { max-width: 820px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--white); color: var(--ink); font: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(200, 150, 44, .45); border-color: var(--gold); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); margin: 6px 0 0; font-size: .92rem; }
.field-hint { color: var(--muted); margin: 6px 0 0; font-size: .88rem; }
.form-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-grid .span-all { grid-column: 1 / -1; }

.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; border: 1px solid var(--line); }
.alert-success { background: var(--ok-bg); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: var(--info-bg); }

table.table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--cream-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .82rem; font-weight: 600; background: var(--moss-soft); color: var(--moss-dark); }
.badge-pending { background: var(--info-bg); color: var(--gold-dark); }
.badge-locked, .badge-rejected { background: var(--danger-bg); color: var(--danger); }
.badge-active { background: var(--ok-bg); color: var(--moss-dark); }
.code-box { font: 700 1.5rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; background: var(--cream-2); border: 2px dashed var(--gold); border-radius: 12px; padding: 14px 18px; display: inline-block; word-break: break-all; }
.copy-line { word-break: break-all; background: var(--cream-2); border-radius: 10px; padding: 10px 12px; font-family: ui-monospace, Menlo, monospace; font-size: .92rem; }
.prop-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.prop-head img, .logo-ph { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background: var(--moss-soft); display: grid; place-items: center; font-size: 1.8rem; }
.call-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.coming { border: 2px dashed var(--line); background: transparent; box-shadow: none; }
.center { text-align: center; }
.error-code { font-size: 4rem; font-weight: 700; color: var(--gold); line-height: 1; }

@media (max-width: 640px) {
  .main { padding-top: 18px; }
  .hero { padding: 36px 18px 0; border-radius: 16px; }
  .btn { width: 100%; }
  .nav .btn, .btn-small { width: auto; }
  .call-row .btn { flex: 1 1 100%; }
}

/* ---- Giai đoạn 2 ---- */
.qr-box { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); display: inline-block; }
.qr-box svg { display: block; width: 100%; height: auto; }
.svc-group { margin-top: 28px; }
.svc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.svc-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 108px; padding: 14px 10px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600; box-shadow: var(--shadow);
}
.svc-tile:hover, .svc-tile:focus-visible { border-color: var(--gold); background: var(--cream-2); }
.svc-tile .ico { font-size: 1.9rem; line-height: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--moss-soft); color: var(--moss-dark); border-radius: 99px; padding: 4px 12px; font-size: .92rem; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 18px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--gold); border: 2px solid var(--cream); }
.timeline .when { color: var(--muted); font-size: .85rem; }
.overdue { color: var(--danger); font-weight: 700; }
.req-photo { max-width: 100%; max-height: 320px; border-radius: 12px; border: 1px solid var(--line); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.stars label { display: inline-block; font-weight: 400; margin-right: 10px; }
.qr-sheet { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.qr-card { border: 2px solid var(--ink); border-radius: 14px; padding: 14px; text-align: center; background: #fff; color: #000; break-inside: avoid; }
.qr-card svg { width: 100%; height: auto; display: block; }
.qr-card .big { font-size: 1.6rem; font-weight: 700; margin-top: 6px; }
.qr-card small { color: #444; }
@media print {
  .site-header, .site-footer, .no-print, .alert { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; }
  .qr-sheet { grid-template-columns: repeat(3, 1fr); }
}

/* Giai đoạn 3: thông báo, thực đơn */
.bell { position: relative; text-decoration: none; padding: 6px 8px; }
.bell-n { position: absolute; top: -2px; right: -4px; background: var(--danger, #b3261e); color: #fff; font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 999px; font-weight: 700; }
.notif.unread { border-left: 4px solid var(--gold, #c9a227); background: #fffaf0; }
.menu-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.menu-row:last-child { border-bottom: 0; }
.qty input { width: 84px; min-height: 44px; text-align: center; font-size: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Menu nhiều mục trên điện thoại: một hàng cuộn ngang thay vì chiếm nửa màn hình */
@media (max-width: 700px) {
  .header-row { flex-wrap: wrap; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .nav a, .nav .inline-form { white-space: nowrap; flex: 0 0 auto; }
}
[hidden]{display:none!important}

/* ---- Dịch vụ: 2 cột trong KS (trái) | 2 cột ngoài KS (phải) ---- */
.svc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; margin-top: 18px; }
.svc-col { min-width: 0; }
.svc-col-title { font-size: .95rem; margin: 0 0 6px; padding-bottom: 4px; border-bottom: 2px solid var(--gold); }
.svc-split .svc-group { margin-top: 10px; }
.svc-split .svc-group h3 { font-size: .8rem; margin: 0 0 4px; color: var(--muted); font-weight: 600; }
.svc-split .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.svc-split .svc-tile { min-height: 64px; padding: 8px 4px; gap: 3px; font-size: .74rem; line-height: 1.2; border-radius: 10px; overflow-wrap: anywhere; }
.svc-split .svc-tile .ico { font-size: 1.35rem; }
.svc-split .svc-desc { display: none; }
.svc-split .svc-note { font-size: .7rem; margin: 6px 0 0; }
.svc-split .card.coming { padding: 10px; font-size: .8rem; }
@media (min-width: 700px) {
  .svc-split { gap: 24px; }
  .svc-split .svc-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
  .svc-split .svc-tile { min-height: 84px; font-size: .9rem; }
  .svc-split .svc-tile .ico { font-size: 1.7rem; }
  .svc-split .svc-group h3 { font-size: .9rem; }
}
.lang-form select { width: auto; min-height: 36px; padding: 4px 8px; border-radius: 8px; font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
