/* ===== Design System — Thửa Đất Số (v3 · "Calm Card") =====
   Friendly govtech · Be Vietnam Pro · Blue cobalt
   Material Symbols Rounded (variable font)
   Hit target ≥ 44px (HIG/WCAG)
=========================================================== */
:root {
  /* Brand */
  --primary:        #2563EB;
  --primary-dark:   #1D4ED8;
  --primary-deep:   #1E3A8A;
  --primary-cta:    #1E5BCF;

  /* Neutrals */
  --ink:            #0F172A;
  --ink-soft:       #0B1F33;
  --muted:          #64748B;
  --line:           #E5EAF3;
  --line-soft:      #E6EAF2;
  --card:           #FFFFFF;
  --surface:        #FFFFFF;
  --bg:             #F4F6FB;
  --bg-alt:         #F5F7FB;
  --paper:          #F6F8FC;
  --sand:           #F5EFE7;

  /* Status (soft pairs) */
  --green:          #16A34A;  --green-soft:  #DCFCE7;  --green-ink:  #15803D;  --green-border: #A7F3D0;
  --amber:          #B45309;  --amber-soft:  #FEF3C7;  --amber-ink:  #92400E;
  --red:            #DC2626;  --red-soft:    #FEE2E2;  --red-ink:    #991B1B;
  --blue-soft:      #DBEAFE;

  /* Legacy aliases (existing templates) */
  --primary-light:  var(--blue-soft);
  --secondary:      var(--primary);
  --text:           var(--ink);
  --text-muted:     var(--muted);
  --border:         var(--line);
  --border-strong:  #CBD5E1;
  --error:          var(--red);
  --success-bg:     var(--green-soft);
  --success-text:   var(--green-ink);
  --success-border: var(--green-border);

  /* Shadows */
  --shadow:         none;
  --shadow-sm:      0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:      0 6px 16px rgba(15,23,42,0.08);
  --shadow-card:    0 1px 2px rgba(15,23,42,0.04);
  --shadow-cta:     0 10px 24px rgba(30,91,207,0.28);
  --shadow-focus:   0 0 0 3px rgba(37,99,235,0.12);

  /* Radius */
  --radius-sm:      8px;
  --radius:         12px;
  --radius-lg:      14px;
  --radius-xl:      18px;
  --pill:           999px;

  /* Spacing scale */
  --space-1:        4px;
  --space-2:        8px;
  --space-3:        12px;
  --space-4:        16px;
  --space-5:        24px;
  --space-6:        32px;

  /* Layout */
  --nav-h:          84px;
  --safe-bottom:    env(safe-area-inset-bottom);
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  padding-bottom: var(--safe-bottom);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* Material Symbols Rounded — variable font defaults */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-rounded--filled { font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24; }

/* ── Typography utilities ─────────────────────────────────── */
.t-card      { font-size: 16px; font-weight: 700; line-height: 1.35; }
.t-secondary { font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.45; }
.t-label     { font-size: 11px; font-weight: 700; letter-spacing: 0.4px; color: var(--muted); text-transform: uppercase; }

h1, .h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
h2, .h2 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.caption { font-size: 13px; color: var(--muted); }
.caption--error { color: var(--red); }
.caption--warning { color: var(--amber-ink); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Spacing / layout utilities ───────────────────────────── */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-3 { margin-bottom: var(--space-3); }
.ml-1 { margin-left: var(--space-1); }

/* ── Layout ───────────────────────────────────────────────── */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-4);
}
.page-content--with-nav {
  padding-bottom: calc(var(--nav-h) + var(--space-4) + var(--safe-bottom));
}
.page-content--full {
  max-width: none;
  margin: 0;
}

.back-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  flex-shrink: 0;
}
.back-btn:hover { border-color: var(--primary); color: var(--ink); }
.back-btn .material-symbols-rounded { font-size: 18px; }

/* App bar (citizen tab pages) */
.app-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0 var(--space-4);
}
.app-bar__content { min-width: 0; flex: 1; }
.app-bar__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--ink);
}
.app-bar__subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}
.app-bar__actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.app-bar__logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Section title */
.section-title {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: 17px; font-weight: 700;
  color: var(--ink); margin: var(--space-4) 0 var(--space-2);
}
.section-title .material-symbols-rounded { font-size: 20px; color: var(--primary); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  min-height: 48px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
  -webkit-tap-highlight-color: rgba(0,0,0,0.04);
  user-select: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn .material-symbols-rounded { font-size: 18px; }

.btn--primary {
  background: var(--primary-cta);
  color: #fff;
  border-color: var(--primary-cta);
  min-height: 52px;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 700;
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn--primary:focus-visible        { outline: none; box-shadow: var(--shadow-cta), 0 0 0 3px rgba(37,99,235,0.25); }

.btn--outline {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
  font-size: 15px;
  font-weight: 600;
}
.btn--outline:hover:not(:disabled) { border-color: var(--primary); color: var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
}
.btn--ghost:hover:not(:disabled) { background: var(--paper); color: var(--primary-dark); }

.btn--danger {
  background: var(--card);
  color: var(--red);
  border-color: var(--red-soft);
  font-size: 15px;
  font-weight: 700;
}
.btn--danger:hover:not(:disabled) { background: var(--red-soft); color: var(--red-ink); border-color: var(--red); }

.btn--success {
  background: var(--card);
  color: var(--green-ink);
  border-color: var(--green-border);
  font-size: 15px;
  font-weight: 700;
}
.btn--success:hover:not(:disabled) { background: var(--green-soft); border-color: var(--green); }

.btn--warning {
  background: var(--card);
  color: var(--amber-ink);
  border-color: var(--amber-soft);
  font-size: 15px;
  font-weight: 700;
}
.btn--warning:hover:not(:disabled) { background: var(--amber-soft); border-color: var(--amber); }

.btn--full { width: 100%; }

.btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: none;
}
.btn--sm .material-symbols-rounded { font-size: 14px; }

.btn--icon {
  min-height: 44px;
  min-width: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
  font-size: 0;
  box-shadow: none;
}
.btn--icon:hover:not(:disabled) { border-color: var(--primary); }
.btn--icon .material-symbols-rounded { font-size: 22px; }

/* Ensure text color stays on hover/focus */
.btn, .btn:hover, .btn:active, .btn:focus { text-decoration: none; }
.btn--primary:hover, .btn--primary:active, .btn--primary:focus { color: #fff; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-4); }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--ink);
}

.form-input,
.input {
  display: block;
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--card);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 48px;
}
.form-input::placeholder,
.input::placeholder { color: var(--muted); font-weight: 500; }
.form-input:focus,
.input:focus { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.input-with-icon { position: relative; }
.input-with-icon .form-input { padding-right: 44px; }
.input-icon-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted);
  min-width: 36px; min-height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.input-icon-btn:hover { background: var(--paper); color: var(--ink); }
.input-with-icon .form-input.is-pass-hidden { color: transparent; caret-color: var(--ink); }
.input-pass-mirror {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 44px 0 14px;
  font-family: inherit; font-size: 15px; font-weight: 500; color: var(--ink);
  pointer-events: none; overflow: hidden; white-space: nowrap;
}

.required-mark { color: var(--red); }

/* ── Search box (pill, 48h) ───────────────────────────────── */
.search-box {
  position: relative;
  margin-bottom: var(--space-3);
}
.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  background: var(--card);
  font-family: inherit;
  color: var(--ink);
  outline: none;
}
.search-box input:focus { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.search-box__icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 20px; pointer-events: none;
}
.search-box--action input { padding-right: 76px; }
.search-box__btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: 36px; padding: 0 16px; border: none; border-radius: var(--radius);
  background: var(--primary); color: #fff; font-family: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer;
}

/* Bộ chuyển chế độ tìm: Số GCN | Tờ & thửa */
.search-modes { display: flex; gap: 6px; margin-bottom: var(--space-2); }
.search-mode {
  flex: 1;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--card);
  color: var(--muted);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.search-mode:hover { border-color: var(--primary); }
.search-mode--active {
  background: var(--primary-cta);
  border-color: var(--primary-cta);
  color: #fff;
  font-weight: 700;
}

/* Ẩn form không active (CSP chặn inline style nên dùng class) */
.search-block form.is-hidden { display: none; }

/* Tìm theo tờ + thửa: 2 ô số cạnh nhau + nút Tìm trong dòng */
.to-thua-search { display: flex; gap: 8px; align-items: center; }
.to-thua-search input { flex: 1; min-width: 0; padding: 0 14px; }
.to-thua-search .search-box__btn {
  position: static; transform: none; flex: none;
}

/* Bộ chọn xã (CANBO) */
.xa-picker {
  margin-bottom: var(--space-3);
}
.xa-picker__label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  margin-bottom: var(--space-2);
}
.xa-picker select {
  width: 100%; height: 44px; padding: 0 40px 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  font-family: inherit; font-size: 15px; font-weight: 500;
  -webkit-appearance: none; appearance: none; outline: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.xa-picker select:focus { border-color: var(--primary); box-shadow: var(--shadow-focus); }

/* ── Cards ────────────────────────────────────────────────── */
.card,
.info-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 4px var(--space-4) var(--space-4);
  margin-bottom: var(--space-3);
}
.card { padding: var(--space-4); }

.info-card__title {
  font-size: 15px;
  font-weight: 700;
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.info-card__title .material-symbols-rounded { font-size: 20px; color: var(--primary); }

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.info-row:last-child { border-bottom: none; }
.info-row__label {
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 110px;
  font-weight: 500;
}
.info-row__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
  max-width: 60%;
  word-break: break-word;
}
.zalo-icon { width: 28px; height: 28px; display: block; }

/* Ô đánh dấu sai/thiếu khi kiểm tra thông tin */
.mark-wrong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #B45309;
  cursor: pointer;
  white-space: nowrap;
}
.mark-wrong input { accent-color: #DC2626; }

/* Hero gradient card */
.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, #4F7BFF 100%);
  color: #fff;
  margin-bottom: var(--space-3);
  box-shadow: 0 10px 28px rgba(37,99,235,0.22);
}
.hero-card::after {
  content: ''; position: absolute; right: -22px; top: -22px;
  width: 90px; height: 90px; border-radius: 90px;
  background: rgba(255,255,255,0.08);
}
.hero-card__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  opacity: 0.9;
  text-transform: uppercase;
}
.hero-card__eyebrow .material-symbols-rounded { font-size: 14px; }
.hero-card__title {
  font-size: 16px;
  font-weight: 700;
  margin-top: 6px;
  line-height: 1.35;
}
.hero-card__desc {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 4px;
  line-height: 1.5;
}
.hero-card__actions { margin-top: 12px; display: flex; gap: 8px; position: relative; z-index: 1; }
.hero-card__cta {
  background: #fff;
  color: var(--primary-dark);
  border: 0;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.hero-card__cta .material-symbols-rounded { font-size: 16px; }
.hero-card__cta:hover { color: var(--primary-dark); }

/* ── Stat grid ────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card__icon { color: var(--primary); font-size: 18px; }
.stat-card__icon--green { color: var(--green); }
.stat-card__icon--amber { color: var(--amber); }
.stat-card__num {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-card__label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1px;
  white-space: nowrap;
  background: #F1F5F9;
  color: #475569;
}
.badge .material-symbols-rounded { font-size: 12px; }
.badge--green { background: var(--green-soft); color: var(--green-ink); }
.badge--amber { background: var(--amber-soft); color: var(--amber-ink); }
.badge--red   { background: var(--red-soft);   color: var(--red-ink); }
.badge--blue  { background: var(--blue-soft);  color: var(--primary-dark); }
.badge--gray  { background: #F1F5F9;           color: #475569; }
.badge--purple { background: #F3E8FF;          color: #7E22CE; }
.badge--solid-blue { background: var(--primary); color: #fff; }

/* Legacy notif-badge alias */
.notif-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1px;
  padding: 3px 10px; border-radius: var(--pill);
}
/* Màu theo trạng thái yêu cầu bổ sung (yeu_cau_list.html trang_thai_config) */
.notif-badge--luu_tam,           .notif-card__icon--luu_tam           { background: #EDE9FE; }
.notif-badge--da_gui,            .notif-card__icon--da_gui            { background: #F3F4F6; }
.notif-badge--dang_xu_ly,        .notif-card__icon--dang_xu_ly        { background: #DBEAFE; }
.notif-badge--da_tiep_nhan,      .notif-card__icon--da_tiep_nhan      { background: #FEF9C3; }
.notif-badge--can_thu_thap_lai,  .notif-card__icon--can_thu_thap_lai  { background: #FEF3C7; }
.notif-badge--da_tao_don_vilis,  .notif-card__icon--da_tao_don_vilis  { background: #DCFCE7; }
.notif-badge--da_co_trong_csdl,  .notif-card__icon--da_co_trong_csdl  { background: #F3E8FF; }
.notif-badge--tao_don_loi,       .notif-card__icon--tao_don_loi       { background: #FEE2E2; }
.notif-badge--da_huy,            .notif-card__icon--da_huy            { background: #F3F4F6; }
.notif-badge--default,           .notif-card__icon--default           { background: #F3F4F6; }
.notif-card__icon--luu_tam           .material-symbols-rounded { color: #5B21B6; }
.notif-card__icon--da_gui            .material-symbols-rounded { color: #374151; }
.notif-card__icon--dang_xu_ly        .material-symbols-rounded { color: #1D4ED8; }
.notif-card__icon--da_tiep_nhan      .material-symbols-rounded { color: #854D0E; }
.notif-card__icon--can_thu_thap_lai  .material-symbols-rounded { color: #92400E; }
.notif-card__icon--da_tao_don_vilis  .material-symbols-rounded { color: #166534; }
.notif-card__icon--da_co_trong_csdl  .material-symbols-rounded { color: #7E22CE; }
.notif-card__icon--tao_don_loi       .material-symbols-rounded { color: #991B1B; }
.notif-card__icon--da_huy            .material-symbols-rounded { color: #9CA3AF; }
.notif-card__icon--default           .material-symbols-rounded { color: #374151; }
.notif-badge--luu_tam           { color: #5B21B6; }
.notif-badge--da_gui            { color: #6B7280; }
.notif-badge--dang_xu_ly        { color: #1D4ED8; }
.notif-badge--da_tiep_nhan      { color: #854D0E; }
.notif-badge--can_thu_thap_lai  { color: #92400E; }
.notif-badge--da_tao_don_vilis  { color: #166534; }
.notif-badge--da_co_trong_csdl  { color: #7E22CE; }
.notif-badge--tao_don_loi       { color: #991B1B; }
.notif-badge--da_huy            { color: #9CA3AF; }
.notif-badge--default           { color: #374151; }

/* ── Chips ────────────────────────────────────────────────── */
.chip-row,
.filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: var(--space-3);
  padding-bottom: 2px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar,
.filter-tabs::-webkit-scrollbar { display: none; }

.chip,
.filter-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.chip:hover,
.filter-tab:hover { border-color: var(--primary); color: var(--ink); }
.chip--active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  font-weight: 700;
}
.filter-tab--active {
  background: var(--primary-cta);
  border-color: var(--primary-cta);
  color: #fff;
  font-weight: 700;
}
.filter-tab--active .material-symbols-rounded { color: #fff; }
.chip__count {
  opacity: 0.7;
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
}
.chip .material-symbols-rounded { font-size: 16px; }

/* ── Status strip (callout) ───────────────────────────────── */
.status-strip {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  font-size: 13px;
}
.status-strip__icon { font-size: 18px; flex-shrink: 0; }
.status-strip__body { flex: 1; min-width: 0; }
.status-strip__title { font-size: 13px; font-weight: 700; line-height: 1.3; }
.status-strip__meta  { font-size: 11px; opacity: 0.85; margin-top: 1px; }
.status-strip__list  { margin: 4px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.5; }

.status-strip--green {
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  color: var(--green-ink);
}
.status-strip--amber {
  background: var(--amber-soft);
  border: 1px solid #FCD34D;
  color: var(--amber-ink);
}
.status-strip--red {
  background: var(--red-soft);
  border: 1px solid #FCA5A5;
  color: var(--red-ink);
}
.status-strip--blue {
  background: var(--blue-soft);
  border: 1px solid #BFDBFE;
  color: var(--primary-dark);
}

/* ── Parcel cards ─────────────────────────────────────────── */
.parcel-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
@media (min-width: 640px) {
  .parcel-list { overflow-y: auto; }
}
.parcel-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 11px 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.parcel-card:hover { border-color: var(--primary); color: inherit; }
.parcel-card--soon {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}
.parcel-card__thumb {
  width: 44px; height: 44px; border-radius: 10px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.parcel-card__thumb--verified {
  background: #ECFDF5;
  border-color: var(--green-border);
}
.parcel-card__thumb .material-symbols-rounded { font-size: 22px; color: #2563EB; }
.parcel-card__thumb--verified .material-symbols-rounded { color: #16A34A; }
.parcel-card__body { flex: 1; min-width: 0; }
.parcel-card__row1 {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.parcel-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}
.parcel-card__row2 {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.parcel-card__row2 strong {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.parcel-card__chev {
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
}

.parcel-card--selected { border-color: var(--primary); border-width: 2px; padding: 10px 11px; }

/* ── Timeline (request progress) ──────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.timeline__row {
  display: flex; gap: 10px; align-items: flex-start;
}
.timeline__rail {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0;
}
.timeline__dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.timeline__dot--done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.timeline__dot--done .material-symbols-rounded { font-size: 12px; color: #fff; }
.timeline__dot--active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}
.timeline__dot--active::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff;
}
.timeline__line {
  width: 2px; flex: 1; min-height: 22px;
  background: var(--line);
  margin: 2px 0;
}
.timeline__line--done { background: var(--green); }
.timeline__body { flex: 1; padding-bottom: 14px; }
.timeline__title { font-size: 14px; font-weight: 600; color: var(--muted); }
.timeline__title--done   { color: var(--ink); }
.timeline__title--active { color: var(--ink); font-weight: 700; }
.timeline__meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.timeline__note {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--blue-soft);
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  font-size: 12px;
  color: var(--primary-dark);
  display: flex; align-items: center; gap: 6px;
}
.timeline__note .material-symbols-rounded { font-size: 14px; }

/* Progress bar (inline) */
.progress {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
}
.progress__label {
  font-size: 11px; color: var(--muted); font-weight: 700;
  letter-spacing: 0.4px; text-transform: uppercase;
}
.progress__track {
  flex: 1;
  height: 4px;
  background: #EEF2FF;
  border-radius: var(--pill);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #60A5FA);
}
.progress__fill--pct-25  { width: 25%; }
.progress__fill--pct-50  { width: 50%; }
.progress__fill--pct-75  { width: 75%; }
.progress__fill--pct-100 { width: 100%; }
.progress__pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

/* ── Flash messages ───────────────────────────────────────── */
.flash-container {
  position: fixed; top: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999; width: min(360px, calc(100vw - 32px));
}
.flash {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.flash--success { border-left: 3px solid var(--green); color: var(--green-ink); }
.flash--error   { border-left: 3px solid var(--red);   color: var(--red-ink); }
.flash__close   {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}

/* ── Bottom navigation (84h) ──────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 10px;
  padding-bottom: calc(18px + var(--safe-bottom));
  z-index: 100;
}
.bottom-nav__item {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  min-width: 64px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.bottom-nav__item .material-symbols-rounded {
  font-size: 24px;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.bottom-nav__item--active {
  color: var(--primary);
  font-weight: 700;
}
.bottom-nav__item--active .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}
.bottom-nav__label { font-size: 11px; }
.bottom-nav__item--active .bottom-nav__label { font-weight: 700; }

/* ── Auth pages ───────────────────────────────────────────── */
.auth-container {
  max-width: 420px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
}
.auth-header {
  text-align: center;
  margin-bottom: var(--space-5);
}
.auth-header h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: var(--space-1);
}
.auth-header__icon {
  font-size: 48px;
  color: var(--primary);
  display: block;
  margin-bottom: var(--space-3);
}
.landing-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: var(--space-3);
}
.auth-footer {
  text-align: center;
  margin-top: var(--space-5);
  font-size: 13px;
  color: var(--muted);
}
.auth-footer a { font-weight: 700; }
.landing-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-4);
  padding: clamp(var(--space-4), 6dvh, var(--space-6)) var(--space-4);
  background: linear-gradient(135deg, var(--primary) 0%, #4F7BFF 100%);
  box-shadow: 0 10px 28px rgba(37,99,235,0.22);
  margin-top: var(--space-5);
}
.landing-hero::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 120px; height: 120px; border-radius: 120px;
  background: rgba(255,255,255,0.08);
}
.landing-hero__badge {
  width: 72px; height: 72px;
  margin: 0 auto var(--space-3);
  background: #fff;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  position: relative; z-index: 1;
}
.landing-hero__badge img { width: 48px; height: 48px; object-fit: contain; }
.landing-hero__title {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
  position: relative; z-index: 1;
}
.landing-hero__caption {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  margin-top: var(--space-1);
  position: relative; z-index: 1;
}
.landing-actions { margin-top: var(--space-5); }
.landing-hotline { margin-top: var(--space-3); }

body.body--landing {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
}
.page-content--landing {
  height: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.landing-page {
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.landing-footer {
  text-align: center;
  margin-top: auto;
  padding-top: var(--space-4);
  padding-bottom: var(--safe-bottom);
  border-top: 1px solid var(--line);
}
.landing-footer__logo {
  height: 28px;
  object-fit: contain;
  margin-bottom: var(--space-2);
}
.landing-footer p {
  font-size: 12px;
  color: var(--muted);
}

/* Step indicator */
.step-indicator {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: var(--space-5);
}
.step-indicator__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s;
}
.step-indicator__dot--active { background: var(--primary); }
.step-indicator__dot--done   { background: var(--green); }
.step-indicator__line {
  flex: 1; height: 2px; background: var(--line);
  max-width: 48px;
}
.step-indicator__line--done { background: var(--green); }

/* CCCD upload card */
.upload-card {
  background: var(--card);
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  min-height: 140px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s;
  position: relative;
}
.upload-card:hover { border-color: var(--primary); }
.upload-card__placeholder {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  color: var(--muted);
  padding: var(--space-5);
  text-align: center;
  font-size: 14px;
}
.upload-card__placeholder .material-symbols-rounded { font-size: 40px; }
.upload-card__preview {
  width: 100%; height: 100%; object-fit: cover;
}
.upload-card__delete {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 1;
}
.upload-card__delete .material-symbols-rounded { font-size: 18px; }

/* Camera QR scan */
.camera-box {
  position: relative;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  margin-bottom: var(--space-4);
}
.camera-box__video {
  width: 100%; height: 100%; object-fit: cover;
}
.camera-box__frame {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70%; aspect-ratio: 1;   /* khớp vùng quét = 70% cạnh nhỏ của khung */
  border: 3px solid var(--primary);
  border-radius: 8px;
}
.camera-box__hint {
  position: absolute; bottom: 12px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.65);
  color: #fff; font-size: 12px;
  padding: 6px 14px; border-radius: var(--pill);
  white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}
.camera-box__hint--success { background: rgba(22,163,74,0.9); color: #fff; }
.qr-result-box { margin-top: var(--space-2); }

/* Hàng 2 nút Chụp ảnh / Chọn file */
.capture-btns { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.capture-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--pill);
  background: var(--card); color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.capture-btn:hover { border-color: var(--primary); color: var(--primary); }
.capture-btn .material-symbols-rounded { font-size: 20px; }

/* Modal camera sau chụp ảnh CCCD */
.cccd-cam { position: fixed; inset: 0; z-index: 1000; background: #000; }
.cccd-cam__video { width: 100%; height: 100%; object-fit: cover; }
.cccd-cam__frame {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 86%; aspect-ratio: 1.585; border: 3px solid var(--primary);
  border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.45);
}
.cccd-cam__count {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 14px; font-weight: 600;
  background: rgba(0,0,0,.5); padding: 6px 14px; border-radius: 999px;
}
.cccd-cam__count--pulse { animation: cccdCountPulse .35s ease-out; }
@keyframes cccdCountPulse {
  0%   { transform: translateX(-50%) scale(1); background: var(--primary); }
  40%  { transform: translateX(-50%) scale(1.25); background: var(--primary); }
  100% { transform: translateX(-50%) scale(1); }
}
.cccd-cam__flash {
  position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none;
}
.cccd-cam__flash--on { animation: cccdFlash .35s ease-out; }
@keyframes cccdFlash {
  0%   { opacity: .9; }
  100% { opacity: 0; }
}
.cccd-cam__close {
  position: absolute; top: 16px; left: 16px; width: 44px; height: 44px;
  border: none; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cccd-cam__shutter {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 68px; height: 68px; border-radius: 50%;
  background: #fff; border: 4px solid rgba(255,255,255,.5);
  box-shadow: 0 0 0 2px rgba(0,0,0,.2); cursor: pointer;
}

/* File-card upload component */
.file-card {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.15s;
  overflow: hidden;
  background: var(--card);
}
.file-card:hover { border-color: var(--primary); }
.file-card--filled {
  border-style: solid;
  border-color: var(--primary);
  cursor: default;
}
.file-card__empty {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-2); padding: var(--space-4); text-align: center;
  color: var(--muted); font-size: 14px;
}
.file-card__empty .material-symbols-rounded { font-size: 32px; }
.file-card__selected {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}
.file-card__list { padding: var(--space-3) var(--space-4); width: 100%; }
.file-card__selected--row { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.file-card__selected--row.file-card__selected--last { border-bottom: none; }
.file-card__icon { color: var(--primary); flex-shrink: 0; }
.file-card__name {
  flex: 1; font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-card__btns { display: flex; gap: var(--space-2); flex-shrink: 0; }

/* File row (GCN multi-upload list / attached docs) */
.file-row {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.file-row:first-of-type { border-top: none; }
.file-row__icon {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--blue-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.file-row__icon--pdf { background: var(--red-soft); color: var(--red); }
.file-row__name {
  flex: 1; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Collapsible form section (+/-) */
.collapsible { margin-top: var(--space-4); }
.collapsible__header {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-3);
}
.collapsible__title {
  font-size: 14px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: var(--space-2);
}
.collapsible__toggle {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); flex-shrink: 0;
}

/* Xã/phường autocomplete */
.autocomplete { position: relative; }
.autocomplete__list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 240px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.autocomplete__item { padding: var(--space-2) var(--space-3); font-size: 14px; cursor: pointer; }
.autocomplete__item:hover { background: var(--blue-soft); }
.autocomplete__empty { padding: var(--space-2) var(--space-3); font-size: 13px; color: var(--muted); }
/* ── Notification card (legacy) ───────────────────────────── */
.notif-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: var(--space-2);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.notif-card-link { display: block; text-decoration: none; color: inherit; }
.notif-card--clickable { cursor: pointer; }
.notif-card__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-card__icon .material-symbols-rounded { font-size: 20px; }
.notif-card__body { flex: 1; min-width: 0; }
.notif-card__title { font-size: 14px; font-weight: 700; margin-bottom: 2px; color: var(--ink); }
.notif-card__meta { font-size: 12px; color: var(--muted); margin-bottom: var(--space-2); }
.notif-card__note {
  font-size: 12px; color: var(--muted); margin-top: var(--space-2);
}
.notif-card__note--error { color: var(--red-ink); font-weight: 600; }
.notif-card__note--success { color: var(--green-ink); font-weight: 600; }

/* ── Owner group (chủ sử dụng) ────────────────────────────── */
.owner-group + .owner-group {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--line);
}
.owner-group__title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-1);
}

/* ── Account page ─────────────────────────────────────────── */
.account-header {
  text-align: center;
  margin-bottom: var(--space-4);
}
.avatar-circle {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #4F7BFF 100%);
  color: #fff;
  font-size: 30px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-3);
  box-shadow: 0 8px 20px rgba(37,99,235,0.24);
}
.account-name {
  font-size: 18px; font-weight: 800;
  margin-bottom: var(--space-1);
  letter-spacing: -0.2px;
}
.account-pin {
  font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ── Map ──────────────────────────────────────────────────── */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 220px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.map-container--mb { margin-bottom: var(--space-3); }
.map-container--interactive { height: 60vh; min-height: 360px; }
.map-container--third { height: 41vh; min-height: 264px; }
/* Đảm bảo canvas-container fill đủ map-container bất kể timing init */
.map-container .maplibregl-canvas-container { position: absolute; inset: 0; }

/* Floating coordinate chip on interactive map */
.map-coord-chip {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 5;
}

/* Nút geocode địa chỉ */
.geocode-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--primary-cta);
  cursor: pointer;
}
.geocode-btn:disabled { opacity: .5; cursor: default; }
.geocode-btn .material-symbols-rounded { font-size: 18px; }

/* Thông báo tạm trên bản đồ */
.map-flash {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  z-index: 6;
}

/* Ô tìm kiếm địa chỉ Vietmap (overlay nổi trên bản đồ) */
/* right: 48px chừa chỗ cho cột NavigationControl/GeolocateControl ở top-right.
   z-index 5 = cùng tầng .map-coord-chip, dưới .map-flash (6) để toast luôn đọc được. */
.vm-search {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 48px;
  z-index: 5;
}
/* Ô nhập và nút "Tìm" là 2 khối rời: nút chữ nền đặc mới đủ rõ là bấm được trên
   mobile (icon kính lúp trần bị hiểu nhầm là trang trí). Mọi vùng chạm ≥ 44px. */
.vm-search__bar {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.vm-search__field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 44px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.vm-search__field:focus-within { border-color: var(--primary); }
.vm-search__icon {
  flex: none;
  margin-left: 10px;
  font-size: 20px;
  color: var(--muted);
  pointer-events: none;
}
.vm-search__input {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.vm-search__clear {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  visibility: hidden;
}
.vm-search__clear--on { visibility: visible; }
.vm-search__clear .material-symbols-rounded { font-size: 20px; }
.vm-search__go {
  flex: none;
  min-width: 56px;
  height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary-cta);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.04);
}
.vm-search__go:hover:not(:disabled) { background: var(--primary-dark); }
.vm-search__go:active:not(:disabled) { transform: translateY(1px); }
.vm-search__go:disabled { opacity: .5; cursor: default; }
.vm-search__results {
  display: none;
  margin-top: 6px;
  max-height: 150px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.vm-search__results--on { display: block; }
/* min-height 44px: mỗi kết quả cũng là một vùng chạm, mục chỉ có 1 dòng tiêu đề
   nếu để padding tự nhiên sẽ chỉ cao ~31px. */
.vm-search__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.vm-search__item:last-child { border-bottom: none; }
.vm-search__item:hover,
.vm-search__item:active { background: var(--paper); }
.vm-search__title { font-size: 13px; font-weight: 600; color: var(--ink); }
.vm-search__sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.vm-search__empty { padding: 8px 10px; font-size: 12px; color: var(--muted); }

/* Giữ font-size ô nhập ở 15px kể cả màn hẹp: nhỏ hơn nữa vừa khó đọc vừa khiến
   iOS Safari tự phóng to trang khi focus (ngưỡng 16px). */
@media (max-width: 380px) {
  .vm-search { right: 44px; }
  .vm-search__go { min-width: 52px; padding: 0 12px; }
}

/* Thanh điều khiển nằm dưới bản đồ */
.map-ctrl-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 var(--space-3);
}

/* Panel điều khiển bản đồ (chọn nền + lớp thửa) */
.map-ctrl {
  flex: 1;
  min-width: 150px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--ink);
}
.map-ctrl__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.map-ctrl__title .material-symbols-rounded { font-size: 16px; }
.map-ctrl__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 0;
}
.map-ctrl__row input { accent-color: var(--primary); cursor: pointer; }
.map-ctrl__slider {
  display: block;
  font-weight: 600;
  margin-top: 4px;
}
.map-ctrl__slider input[type=range] {
  display: block;
  width: 100%;
  margin-top: 4px;
  accent-color: var(--primary);
  cursor: pointer;
}
.map-ctrl__divider {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}
.parcel-status-row {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.parcel-status-row__label { font-size: 11px; color: var(--muted); }
.parcel-status-btn {
  position: relative; display: inline-flex; align-items: center;
  width: 32px; height: 18px; border-radius: 9px; border: none; cursor: pointer; padding: 0;
  background: #D1D5DB; transition: background .2s; flex-shrink: 0;
}
.parcel-status-btn--on { background: var(--primary); }
.parcel-status-thumb {
  display: inline-block; width: 14px; height: 14px; border-radius: 7px;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transform: translateX(2px); transition: transform .2s;
}
.parcel-status-thumb--on { transform: translateX(16px); }
.parcel-legend { display: none; margin-top: 5px; }
.parcel-legend--visible { display: block; }
.parcel-legend__row { display: flex; align-items: center; gap: 5px; padding: 1px 0; }
.parcel-legend__swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.parcel-legend__swatch--clean    { background: #22c55e; }
.parcel-legend__swatch--lkkg-hsq { background: #f97316; }
.parcel-legend__swatch--lkkg-ddc { background: #3b82f6; }
.parcel-legend__swatch--spatial  { background: #a855f7; }
.parcel-legend__swatch--none     { background: #d1d5db; }
/* Chú giải màu lớp Điểm định vị (loai_thua_dat) — thụt vào cho thấy thuộc hàng checkbox trên nó */
.parcel-legend--diem { margin-left: 18px; }
.parcel-legend__swatch--dv-0  { background: #3ECF8E; }
.parcel-legend__swatch--dv-1  { background: #F59E0B; }
.parcel-legend__swatch--dv-2  { background: #7C3AED; }
.parcel-legend__swatch--dv-na { background: #6B7280; }
/* Mẫu màu đặt thẳng trong nhãn checkbox — .map-ctrl__row là flex nên tự canh giữa/giãn cách */
.parcel-legend__swatch--thu-hoi { background: #ef4444; }
.parcel-legend__label { font-size: 10px; color: var(--muted); }
.parcel-search-ctrl__row { display: flex; gap: 6px; margin-top: 6px; }
.parcel-search-ctrl__flex { flex: 1; }
.parcel-search-ctrl__btn { margin-top: 6px; }

/* Bộ chọn bản đồ nền dàn ngang cho đỡ chiếm diện tích (trang tạo yêu cầu) */
.yc-map-controls .basemap-ctrl__rows {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

/* Cụm điều khiển đặt phía trên bản đồ (trang tạo yêu cầu) */
.yc-map-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-2);
}

/* Nút gạt tô trạng thái làm sạch */
.status-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.status-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  padding: 0;
  background: #D1D5DB;
  transition: background .2s;
  flex-shrink: 0;
}
.status-toggle--on { background: var(--primary); }
.status-toggle__thumb {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transform: translateX(2px);
  transition: transform .2s;
}
.status-toggle--on .status-toggle__thumb { transform: translateX(16px); }
.status-legend { margin-top: 5px; }
.status-legend__row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 1px 0;
  font-size: 10px;
  color: var(--muted);
}
.status-legend__dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Thẻ thửa/điểm đã chọn (dưới bản đồ) */
.parcel-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-top: var(--space-2);
}
.parcel-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.parcel-item__title { font-weight: 600; }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: var(--space-6) var(--space-4);
}
.empty-state__icon {
  font-size: 56px; color: #CBD5E1;
  display: block; margin-bottom: var(--space-4);
}
.empty-state__title {
  font-size: 16px; font-weight: 700; margin-bottom: var(--space-2);
}
.empty-state__desc {
  font-size: 14px; color: var(--muted);
  max-width: 300px; margin: 0 auto var(--space-5);
  line-height: 1.5;
}
.empty-state--map { padding: 40px; }
.empty-state--map-tight { padding: 24px; margin-bottom: 16px; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; margin: 20px 0;
}
.pagination__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink); font-size: 15px; font-weight: 600;
  text-decoration: none;
}
.pagination__btn--disabled { opacity: 0.4; pointer-events: none; }
.pagination__info { font-size: 13px; color: var(--muted); }
.list-total { font-size: 13px; color: var(--muted); margin-bottom: var(--space-2); font-weight: 500; }

/* ── Confirm modal (centered) ─────────────────────────────── */
.confirm-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
  box-sizing: border-box;
}
.confirm-modal {
  background: var(--card);
  border-radius: 12px;
  padding: var(--space-5) var(--space-4);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
}
.confirm-modal--form { max-height: 90vh; overflow-y: auto; text-align: left; }
.confirm-modal--wide { max-width: 480px; }
.confirm-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-4);
}
.confirm-modal__title { font-weight: 600; font-size: 1.05rem; }
.confirm-modal__close {
  background: none; border: none; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  padding: 4px; border-radius: var(--radius-sm);
}
.confirm-modal__close:hover { color: var(--ink); }

/* ── Transitions (Alpine.js) ──────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── Hồ sơ quét — modal viewer chỉ-xem (_partials/hsq_viewer.html) ── */
.hsq-modal{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.85);display:none;flex-direction:column}
.hsq-modal.is-open{display:flex}
.hsq-modal__bar{display:flex;align-items:center;gap:6px;padding:10px 14px;background:rgba(0,0,0,.45)}
.hsq-modal__title{flex:1;min-width:0;color:#fff;font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hsq-modal__counter{color:#fff;font-size:13px;min-width:64px;text-align:center}
.hsq-modal__btn{background:rgba(255,255,255,.15);border:none;color:#fff;border-radius:6px;cursor:pointer;width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center}
.hsq-modal__btn:disabled{opacity:.35;cursor:default}
.hsq-modal__stage{flex:1;overflow:auto;display:flex;align-items:flex-start;justify-content:center;padding:16px;-webkit-overflow-scrolling:touch}
.hsq-img{max-width:100%;height:auto;background:#fff;box-shadow:0 2px 16px rgba(0,0,0,.5);
         user-select:none;-webkit-user-select:none;-webkit-user-drag:none;-webkit-touch-callout:none;pointer-events:none}
@media print{.hsq-modal{display:none !important}}

/* ── Class tự sinh thay cho inline style="" (CSP style-src bỏ unsafe-inline) ── */
.ics-002535c2 { margin-top:12px; }
.ics-02c985c1 { font-size:13px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:12px; }
.ics-035cc887 { color:var(--primary); }
.ics-06031ec7 { margin-bottom:var(--space-3); }
.ics-060dfc23 { background:var(--blue-soft); }
.ics-088cf005 { width:120px; }
.ics-08f6c5bf { margin:16px 0 8px;font-size:24px; }
.ics-098209ab { margin-top:8px;color:var(--muted);font-size:14px; }
.ics-0a4cdbcf { margin-top:12px;padding-top:12px;border-top:1px dashed var(--line); }
.ics-0a80578d { background:#3b82f6; }
.ics-1188506b { display:flex;gap:12px;align-items:center; }
.ics-11eb7f91 { display:flex;gap:8px;margin:0 14px 8px; }
.ics-1386d503 { margin:0; }
.ics-15f0113f { margin-bottom:var(--space-1); }
.ics-1aefa2aa { flex:1;font-size:13px; }
.ics-1b40ce63 { width:64px;height:64px; }
.ics-1e29eefb { font-weight:500; }
.ics-1e2cc36f { align-items:center; }
.ics-234b4a4a { margin-bottom:var(--space-2); }
.ics-26c25321 { display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end; }
.ics-2a557fce { padding:40px 0; }
.ics-2a9780cb { display:flex;align-items:center;gap:8px; }
.ics-2bc16227 { display:inline-flex;align-items:center;gap:4px;background:none;border:none;color:var(--primary,#0b7a3b);cursor:pointer;padding:0;font:inherit; }
.ics-2d4aa10a { display:flex;gap:10px;margin-top:14px; }
.ics-35c05d23 { display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:500; }
.ics-37d30b7f { margin-bottom:24px; }
.ics-380ed93b { display:flex;gap:var(--space-3);margin-top:var(--space-2); }
.ics-38997f8f { display:flex;align-items:center;gap:10px;cursor:pointer; }
.ics-3a84435e { margin-top:var(--space-3);padding-top:var(--space-3);border-top:1px dashed var(--line); }
.ics-42da83b0 { font-size:40px; }
.ics-4806f50e { display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;background:var(--card);border:1px solid var(--line);text-decoration:none;color:var(--ink); }
.ics-4bbfa290 { font-size:40px;animation:spin 1s linear infinite; }
.ics-4e409ea1 { display:flex;gap:var(--space-2);margin:8px 0; }
.ics-4e7b4cfb { font-size:64px;color:#2563EB; }
.ics-4fa3940c { display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-2); }
.ics-5270f523 { margin-bottom: 4px;font-size: 12px;font-weight: 400; }
.ics-52724860 { text-decoration:none;color:inherit;cursor:pointer; }
.ics-54ec4f63 { display:flex;justify-content:center;gap:var(--space-4); }
.ics-57ce1f1b { padding:0; }
.ics-6069bb57 { padding:14px; }
.ics-6fbddb02 { padding:14px 14px; }
.ics-7a05a181 { display:inline-flex;align-items:center;gap:4px; }
.ics-7c783b3a { display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin-top:10px; }
.ics-7cd75d94 { margin:8px 0;border-radius:0; }
.ics-7d524ddf { color:#555;margin:0 0 24px; }
.ics-7fa56380 { padding:20px; }
.ics-8144c392 { margin:2px 4px 2px 0; }
.ics-81e041a9 { font-size:14px;vertical-align:-2px; }
.ics-83787629 { margin:var(--space-1) 0 0; }
.ics-84f16348 { flex:1;min-width:220px;margin-bottom:0; }
.ics-8900119e { flex:1;min-width:200px; }
.ics-89bd09bd { flex:1;min-width:0; }
.ics-8e0990bb { margin-top:var(--space-4); }
.ics-8e86974b { margin-bottom:16px; }
.ics-91294d29 { display:flex;gap:6px; }
.ics-9628acb1 { font-size:32px; }
.ics-99bc47e2 { display:flex;gap:var(--space-2);margin-bottom:var(--space-2); }
.ics-9f0e4db8 { display:flex;align-items:center;gap:12px; }
.ics-a18ac805 { margin-top:4px; }
.ics-b2ae7632 { width:16px;height:16px;cursor:pointer;flex-shrink:0; }
.ics-b47dcc53 { margin:0 14px;flex-direction:column;align-items:stretch;gap:6px; }
.ics-b5e05ff2 { margin:0 14px; }
.ics-ba24f0cd { margin-right:var(--space-3); }
.ics-bbcdb408 { border:1px solid var(--border);border-radius:var(--radius);padding:var(--space-3);margin-bottom:var(--space-3); }
.ics-bf577125 { height:360px;position:relative; }
.ics-bf83cf1c { font-size:18px; }
.ics-c1af368d { background:#22c55e; }
.ics-c233dcf2 { display:none;position:absolute;z-index:1; }
.ics-c2a8ef99 { padding:0 14px 4px; }
.ics-c3f83707 { margin-left:8px; }
.ics-c41ed56d { width:16px;height:16px;cursor:pointer; }
.ics-c451fdb0 { position:relative; }
.ics-c5091e28 { cursor:pointer;font-size:13px;color:var(--muted); }
.ics-c7d8da07 { border:1px solid var(--border);border-radius:var(--radius);padding:var(--space-3); }
.ics-caa20155 { margin-bottom:16px;padding:0;overflow:hidden; }
.ics-cb458930 { display:none; }
.ics-ccbe3a38 { margin-bottom:var(--space-4);padding-bottom:var(--space-3); }
.ics-ccbe3a38--divider { border-bottom:2px solid var(--line); }
.ics-cd179318 { padding:14px 14px 0; }
.ics-cf53043d { padding:8px 14px 0; }
.ics-cf799037 { max-width:480px;margin:64px auto;padding:0 24px;text-align:center; }
.ics-cfdaa3db { display:flex;flex-wrap:wrap;gap:16px;align-items:center; }
.ics-d086e307 { display:flex;align-items:center;gap:var(--space-2);cursor:pointer; }
.ics-d64e9f0a { display:none;max-width:100%;height:auto;background:#fff;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;-webkit-touch-callout:none;pointer-events:none; }
.ics-d874dfb5 { display:inline-block;padding:10px 20px;background:#2563EB;color:#fff;border-radius:8px;text-decoration:none; }
.ics-da472840 { margin-left:6px; }
.ics-da5cd676 { flex:1; }
.ics-db6d04fd { font-size:40px;color:var(--line); }
.ics-dd27c357 { background:#d1d5db; }
.ics-df3ac62d { max-width:480px;margin:0 auto; }
.ics-e0936291 { color:var(--red); }
.ics-e5adba83 { padding:var(--space-3) 0; }
.ics-e5e6f834 { font-size:20px; }
.ics-e8b30124 { vertical-align:middle; }
.ics-e9ac6418 { background:#a855f7; }
.ics-ebead76a { background:var(--red-soft); }
.ics-ec37e43f { font-weight:600;margin-bottom:var(--space-3); }
.ics-f89aceb5 { background:#f97316; }
.ics-fa3e1c7d { margin-bottom:12px; }
.ics-fb3b8d18 { display:flex;align-items:center;justify-content:space-between;margin:var(--space-3) 0 var(--space-2); }
.ics-fff0f1aa { font-weight:600;color:var(--red-ink);margin-bottom:6px; }

/* Chip trạng thái cho input file tải async (upload_limit.js handleAsyncInput) */
.async-chips { display:flex; flex-direction:column; gap:6px; margin-top:6px; }
.async-chip { display:flex; align-items:center; gap:6px; padding:6px 8px;
  background:var(--gray-50, #f8fafc); border:1px solid var(--gray-200, #e5e7eb);
  border-radius:8px; font-size:13px; }
.async-chip__icon { font-size:18px; color:var(--blue-ink, #1d4ed8); }
.async-chip__name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.async-chip__status { color:var(--gray-500, #6b7280); }
.async-chip__remove { display:inline-flex; align-items:center; border:0; background:transparent;
  cursor:pointer; color:var(--gray-500, #6b7280); padding:2px; }
.async-chip__remove .material-symbols-rounded { font-size:18px; }
