@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

:root {
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --accent: #0059bb;
  --accent-dark: #004493;
  --accent-light: #0070ea;
  --accent-soft: #e8f0fe;
  --grad: linear-gradient(135deg, #0059bb 0%, #0070ea 100%);
  --gold: #00677f;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-alt: #f3f4f5;
  --text: #191c1d;
  --text-dim: #414754;
  --text-mute: #717786;
  --border: #e1e3e4;
  --border-strong: #c1c6d7;
  --green: #059669;
  --green-mid: #10b981;
  --green-soft: #ecfdf5;
  --red: #dc2626;
  --red-mid: #ef4444;
  --red-soft: #fef2f2;
  --blue: #2563eb;
  --blue-mid: #3b82f6;
  --blue-soft: #eff6ff;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --shadow-sm: 0 1px 2px rgba(0, 89, 187, .05);
  --shadow: 0 2px 4px rgba(0, 89, 187, .08), 0 4px 16px rgba(0, 89, 187, .05);
  --shadow-lg: 0 10px 34px rgba(0, 89, 187, .12);
  --radius: 14px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-head); color: var(--text); margin: 0; font-weight: 700; letter-spacing: -0.01em; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--font); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(185, 28, 28, .25);
}
.brand-text { line-height: 1.2; }
.brand-text strong { display: block; font-size: 14px; font-weight: 700; }
.brand-text span { font-size: 12px; color: var(--text-dim); }

.nav { display: flex; align-items: center; gap: 8px; }
.nav a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-alt); color: var(--text); text-decoration: none; }
.nav a.primary {
  background: var(--accent); color: #fff;
}
.nav a.primary:hover { background: var(--accent-dark); }
.nav-logout {
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-logout:hover { background: var(--surface-alt); color: var(--text); }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  animation: fadeUp .4s ease;
}

.hero {
  text-align: center;
  padding: 32px 0 24px;
}
.hero-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(185, 28, 28, .3);
}
.eyebrow {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.25;
}
.hero p {
  font-size: 15px;
  color: var(--text-dim);
  margin: 0 auto;
  max-width: 540px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }

.section-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}
.section-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #fff;
  font-family: var(--font);
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.section-title small {
  font-family: var(--font);
  font-weight: 400; font-size: 13px; color: var(--text-dim);
}

.grid { display: grid; gap: 12px; }

.input, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 89, 187, .14);
  background: #fff;
}

.criteria-list { display: flex; flex-direction: column; gap: 8px; }
.criteria-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  transition: background .15s;
}
.criteria-row:hover { background: var(--surface-alt); }
.criteria-num {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--surface-alt);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-dim);
}
.criteria-text { font-size: 14px; line-height: 1.5; }
.vote-group { display: flex; gap: 6px; }
.vote-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.vote-btn:hover { transform: scale(1.08); }
.vote-btn.is-yes {
  background: var(--green-soft);
  border-color: var(--green-mid);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .2);
}
.vote-btn.is-no {
  background: var(--red-soft);
  border-color: var(--red-mid);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .2);
}

.score-summary {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface-alt);
  border-radius: 12px;
}
.score-summary .label { font-weight: 600; color: var(--text); }
.score-summary .value {
  font-family: var(--font-head);
  font-size: 26px; font-weight: 800; color: var(--accent);
}

.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-btn {
  flex: 1 1 auto;
  min-width: 130px;
  padding: 11px 18px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.choice-btn:hover { border-color: var(--accent); }
.choice-btn.is-active-green { background: var(--green-soft); border-color: var(--green-mid); color: var(--green); font-weight: 700; }
.choice-btn.is-active-red   { background: var(--red-soft);   border-color: var(--red-mid);   color: var(--red);   font-weight: 700; }
.choice-btn.is-active-blue  { background: var(--blue-soft);  border-color: var(--blue-mid);  color: var(--blue);  font-weight: 700; }

.field-label {
  display: block;
  font-weight: 600; font-size: 14px;
  margin-bottom: 10px;
  color: var(--text);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: var(--surface);
  color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 8px rgba(185, 28, 28, .3);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-alt); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: 14px; }

.alert {
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-error { background: var(--red-soft); border: 1px solid #fecaca; color: var(--red); }
.alert-success { background: var(--green-soft); border: 1px solid #a7f3d0; color: var(--green); }
.alert ul { margin: 0; padding-left: 20px; }

/* === Home: Hero QR === */
.qr-hero {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin-top: 24px;
  box-shadow: var(--shadow);
}
.qr-hero h2 {
  font-family: var(--font-head);
  font-size: 22px;
  margin: 0 0 4px;
}
.qr-hero .meta {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 20px;
}
.qr-hero .qr-frame {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border: 3px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(185, 28, 28, .12);
}
.qr-hero .qr-frame img {
  display: block;
  width: 280px; height: 280px;
}
.qr-hero .url {
  font-size: 12px;
  color: var(--text-dim);
  word-break: break-all;
  max-width: 360px;
  margin: 14px auto 0;
}
.qr-hero .actions {
  margin-top: 18px;
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}

/* === Home: Survey list (when multi) === */
.survey-section-title {
  font-family: var(--font-head);
  font-size: 18px;
  margin: 32px 0 12px;
  color: var(--text);
}
.survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.survey-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.survey-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.survey-card h3 {
  font-family: var(--font-head);
  margin: 0; font-size: 17px; line-height: 1.35;
}
.survey-meta { font-size: 13px; color: var(--text-dim); display: flex; gap: 12px; flex-wrap: wrap; }
.survey-meta span::before { content: "·"; margin-right: 6px; color: var(--text-mute); }
.survey-meta span:first-child::before { content: ""; margin: 0; }
.survey-card .qr-thumb {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  align-self: center;
}
.survey-card .qr-thumb img { display: block; width: 140px; height: 140px; }
.survey-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.empty-state .icon {
  font-size: 48px; margin-bottom: 12px;
}

/* === Thank you === */
.thanks-card {
  text-align: center;
  padding: 60px 24px;
}
.thanks-icon {
  font-size: 64px;
  margin-bottom: 16px;
  display: inline-block;
  animation: pop .5s ease;
}
.thanks-card h1 {
  font-family: var(--font-head);
  font-size: 26px;
  margin: 8px 0;
}
.thanks-score {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  margin: 12px 0;
}
.thanks-score.good   { background: var(--green-soft); color: var(--green); }
.thanks-score.ok     { background: var(--amber-soft); color: var(--amber); }
.thanks-score.bad    { background: var(--red-soft);   color: var(--red);   }

/* === QR Poster === */
.poster {
  max-width: 640px;
  margin: 24px auto;
  background: #fff;
  border: 2px solid var(--text);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
}
.poster .org { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.poster h1 { font-family: var(--font-head); font-size: 26px; margin: 12px 0 4px; }
.poster .sub { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; }
.poster .qr-frame { display: inline-block; padding: 16px; border: 4px solid var(--accent); border-radius: 16px; background: #fff; }
.poster .qr-frame img { display: block; width: 320px; height: 320px; }
.poster .url { font-size: 12px; color: var(--text-dim); margin-top: 16px; word-break: break-all; }
.poster .footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-dim); }

/* === Stats Dashboard (admin) === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-size: 12px; color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.stat-value {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.stat-value.green { color: var(--green); }
.stat-value.red   { color: var(--red);   }
.stat-value.blue  { color: var(--blue);  }
.stat-value.amber { color: var(--amber); }

.criteria-bar {
  margin-bottom: 12px;
}
.criteria-bar .row {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 5px;
}
.criteria-bar .row .text { color: var(--text-dim); padding-right: 12px; }
.criteria-bar .row .pct { font-weight: 700; }
.criteria-bar .track {
  height: 8px; border-radius: 4px;
  background: var(--surface-alt); overflow: hidden;
}
.criteria-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 4px;
  transition: width .6s ease;
}

/* Floating progress bar for survey form */
.progress-bar {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  margin: -32px -20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 5;
}
.progress-track {
  flex: 1;
  height: 6px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .3s ease;
}
.progress-text { font-size: 13px; font-weight: 600; color: var(--text-dim); white-space: nowrap; }

/* === Admin dashboard panel (chỉ hiện khi đăng nhập) === */
.admin-panel {
  background: linear-gradient(135deg, #fff 0%, #f5f3f0 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.admin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.admin-panel-head h2 {
  font-family: var(--font-head);
  font-size: 22px;
  margin: 0;
}
.admin-panel-head p {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 13px;
}
.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.mini-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
}
.mini-stat .num {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.mini-stat .num .dim {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 600;
}
.mini-stat .lbl {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
  font-weight: 500;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-actions .btn {
  font-size: 13px;
  padding: 9px 14px;
}
.recent-responses {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.recent-responses h4 {
  font-family: var(--font-head);
  font-size: 14px;
  margin: 0 0 8px;
  color: var(--text);
}
.recent-responses ul {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.recent-responses li {
  display: grid;
  grid-template-columns: 80px 130px 70px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--surface-alt);
}
.recent-responses li:last-child { border-bottom: none; }
.recent-responses .r-time { color: var(--text-mute); font-size: 12px; }
.recent-responses .r-name { font-weight: 600; color: var(--text); }
.recent-responses .r-score {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.recent-responses .r-score.good { background: var(--green-soft); color: var(--green); }
.recent-responses .r-score.ok   { background: var(--amber-soft); color: var(--amber); }
.recent-responses .r-score.bad  { background: var(--red-soft);   color: var(--red); }
.recent-responses .r-survey { color: var(--text-dim); font-size: 12px; }

/* Reusable for dashboard */
.recent-responses-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.recent-responses-list li {
  display: grid;
  grid-template-columns: 80px 160px 70px 1fr;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-alt);
}
.recent-responses-list li:last-child { border-bottom: none; }
.recent-responses-list .r-time { color: var(--text-mute); font-size: 12px; }
.recent-responses-list .r-name { font-weight: 600; color: var(--text); }
.recent-responses-list .r-score {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.recent-responses-list .r-score.good { background: var(--green-soft); color: var(--green); }
.recent-responses-list .r-score.ok   { background: var(--amber-soft); color: var(--amber); }
.recent-responses-list .r-score.bad  { background: var(--red-soft);   color: var(--red); }
.recent-responses-list .r-survey { color: var(--text-dim); font-size: 12px; }

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--surface-alt);
}
.data-table tbody tr:hover { background: var(--surface-alt); }
.data-table td a { font-size: 16px; padding: 0 4px; text-decoration: none; }

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.status-pill.green { background: var(--green-soft); color: var(--green); }
.status-pill.gray  { background: var(--surface-alt); color: var(--text-dim); }

@media (max-width: 600px) {
  .recent-responses-list li {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 8px; }
}

@media (max-width: 600px) {
  .recent-responses li {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .recent-responses .r-time { grid-column: 1 / 2; }
  .recent-responses .r-score { grid-column: 2 / 3; grid-row: 1 / 2; }
  .recent-responses .r-name { grid-column: 1 / -1; }
  .recent-responses .r-survey { grid-column: 1 / -1; }
}

/* === Header công văn (2 cột) — đúng mẫu phiếu === */
.gov-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 8px 0 16px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.55;
}
.gov-col-left .gov-line { font-weight: 700; text-transform: uppercase; }
.gov-col-right .gov-country { font-weight: 700; text-transform: uppercase; }
.gov-col-right .gov-motto { font-weight: 600; }
.gov-divider {
  width: 70px; height: 1px;
  background: var(--text);
  margin: 4px auto 0;
}
.gov-place {
  font-style: italic;
  text-align: center;
  font-size: 12.5px;
  color: var(--text);
  margin: 8px 0 0;
}
.doc-title {
  font-family: var(--font-head);
  text-align: center;
  margin: 18px 0 6px;
  text-transform: uppercase;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .01em;
}
.doc-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 8px;
}

@media (max-width: 600px) {
  .gov-header { grid-template-columns: 1fr; gap: 10px; }
  .doc-title { font-size: 18px; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  0%   { transform: scale(.6); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

@media print {
  .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .poster { border: 2px solid #000; box-shadow: none; }
}

@media (max-width: 600px) {
  .container { padding: 20px 16px 48px; }
  .hero h1 { font-size: 26px; }
  .qr-hero .qr-frame img { width: 220px; height: 220px; }
  .criteria-row {
    grid-template-columns: 28px 1fr;
  }
  .criteria-row .vote-group { grid-column: 1 / -1; justify-content: flex-end; }
}

.report-hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 4px 0 8px;
  padding-left: 10px;
  border-left: 2px solid var(--border, #e5e7eb);
}

/* Combobox tìm kiếm Ủy viên */
.combo { position: relative; }
.combo-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  position: absolute;
  z-index: 30;
  left: 0; right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}
.combo-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.combo-item:hover { background: var(--accent-soft); }
.combo-name { font-weight: 600; font-size: 14px; }
.combo-pos { font-size: 12px; color: var(--text-dim); }
.combo-empty { padding: 12px; font-size: 13px; color: var(--text-dim); text-align: center; }

/* ============ Cổng MTTQ: header + menu + footer (tông xanh MD3) ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm); border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 8px 24px;
  display: flex; align-items: center; gap: 20px; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 4px; text-decoration: none; flex-shrink: 0; }
.brand-logo { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-org { color: var(--accent); font-weight: 800; font-size: 11px; letter-spacing: .01em; white-space: nowrap; }
.brand-name { color: var(--accent); font-weight: 800; font-size: 14px; margin-top: 2px; }

.nav-desktop { display: flex; gap: 22px; margin-left: 8px; }
.nav-desktop a {
  color: var(--text-dim); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 6px 0; transition: color .15s; white-space: nowrap;
}
.nav-desktop a:hover { color: var(--accent); }
.nav-desktop a.active { color: var(--accent); font-weight: 700; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.btn-cta {
  background: var(--grad); color: #fff; text-decoration: none;
  padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 700;
  white-space: nowrap; transition: box-shadow .15s, transform .15s;
}
.btn-cta:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); text-decoration: none; }
.header-link { color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.header-link:hover { color: var(--accent); }

.nav-toggle { display: none; }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 10px; cursor: pointer; border-radius: 8px; }
.nav-burger span { width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-drawer { display: none; }

@media (max-width: 900px) {
  .nav-desktop, .header-actions .btn-cta, .header-actions .header-link { display: none; }
  .nav-burger { display: flex; }
  .brand-org { font-size: 10px; }
  .brand-name { font-size: 12.5px; }
  .brand-logo { height: 44px; }
  .nav-drawer {
    display: none; flex-direction: column; border-top: 1px solid var(--border);
    background: var(--surface); padding: 8px 20px 12px;
  }
  .nav-toggle:checked ~ .nav-drawer { display: flex; }
  .nav-drawer a, .drawer-logout {
    padding: 12px 4px; color: var(--text); text-decoration: none; font-size: 15px;
    font-weight: 500; border-bottom: 1px solid var(--border);
    background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; font-family: inherit; width: 100%;
  }
  .nav-drawer a:hover, .drawer-logout:hover { color: var(--accent); }
}

.site-footer { background: var(--surface-alt); border-top: 1px solid var(--border); margin-top: 56px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 40px 24px 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { height: 48px; width: auto; flex-shrink: 0; }
.footer-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.footer-brand-text .fb-line { font-size: 12.5px; color: var(--accent); font-weight: 800; white-space: nowrap; }
.footer-col p { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); margin: 0; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-mute); margin: 0 0 12px; }
.footer-contact, .footer-links { list-style: none; margin: 0; padding: 0; }
.footer-contact li, .footer-links li { font-size: 13.5px; margin-bottom: 9px; line-height: 1.5; color: var(--text-dim); }
.footer-links a { color: var(--text-dim); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border); text-align: center;
  font-size: 12.5px; color: var(--text-mute); padding: 16px 24px;
  max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 4px;
}
.footer-credit a { color: var(--accent); font-weight: 600; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 24px; } }

/* Bottom nav (mobile, kiểu app) */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 89, 187, .08);
  grid-template-columns: repeat(4, 1fr);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 9px 0 max(9px, env(safe-area-inset-bottom)); text-decoration: none;
  color: var(--text-mute); font-size: 11px; font-weight: 600;
}
.bottom-nav a svg { width: 23px; height: 23px; }
.bottom-nav a.active { color: var(--accent); }
@media (max-width: 900px) {
  .bottom-nav { display: grid; }
  body { padding-bottom: 68px; }
}

/* ============ Cổng "Lắng nghe dân nói": component ============ */
.portal-hero {
  background: linear-gradient(135deg, #0059bb 0%, #00ccf9 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 44px 28px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.portal-hero .eyebrow { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(4px); }
.portal-hero h1 { color: #fff; font-size: 32px; margin: 8px 0 10px; text-transform: uppercase; letter-spacing: .5px; }
.portal-hero p { max-width: 640px; margin: 0 auto; color: #eafaff; font-size: 15px; line-height: 1.6; }
.portal-hero .actions { justify-content: center; margin-top: 18px; }
/* Hero carousel 3 slide */
.hero-carousel { position: relative; overflow: hidden; }
.hero-slides { display: grid; }
.hero-slide {
  grid-column: 1; grid-row: 1;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
}
.hero-slide.active { opacity: 1; visibility: visible; transform: none; }
.hero-dots { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.hero-dots button {
  width: 10px; height: 10px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .4); padding: 0; transition: all .2s;
}
.hero-dots button.active { background: #fff; width: 26px; }

.portal-hero .btn-primary { background: #fff; color: var(--accent-dark); }
.portal-hero .btn-primary:hover { background: #fff; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.portal-hero .btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.65); }
.portal-hero .btn-ghost:hover { background: rgba(255,255,255,.16); }

.stats-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: -28px;
  position: relative; z-index: 2; padding: 0 8px;
}
.stat-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-align: center; box-shadow: var(--shadow);
}
.stat-box .n { font-size: 28px; font-weight: 800; color: var(--accent-dark); }
.stat-box .l { font-size: 13px; color: var(--text-dim); }

.section-head { text-align: center; margin: 36px 0 18px; }
.section-head h2 { font-size: 22px; margin: 0 0 4px; }
.section-head p { color: var(--text-dim); font-size: 14px; margin: 0; }

.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pstep {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 14px; text-align: center; position: relative;
}
.pstep .ic {
  width: 52px; height: 52px; margin: 0 auto 4px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.pstep .ic svg { width: 26px; height: 26px; }
.pstep .no { position: absolute; top: 10px; right: 12px; font-weight: 800; color: var(--border-strong); }
.pstep h4 { margin: 8px 0 4px; font-size: 14px; }
.pstep p { margin: 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

.category-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat-card {
  display: block; cursor: pointer; text-align: center;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 18px 12px; transition: all .15s;
}
.cat-card input { position: absolute; opacity: 0; }
.cat-card .ic {
  width: 56px; height: 56px; margin: 0 auto; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.cat-card .ic svg { width: 28px; height: 28px; }
.cat-card .nm { display: block; font-size: 13px; font-weight: 600; margin-top: 8px; }
.cat-card:hover { border-color: var(--accent); }
.cat-card.is-checked { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--shadow); }
.cat-card.is-checked .ic { background: var(--accent); color: #fff; }

.login-wrap { display: flex; justify-content: center; padding: 24px 0; }
.login-card { max-width: 420px; width: 100%; }
.login-head { text-align: center; margin-bottom: 18px; }
.login-head h1 { font-size: 22px; margin: 12px 0 4px; }
.login-head p { font-size: 13px; color: var(--text-dim); margin: 0; }
.login-foot { text-align: center; margin: 16px 0 0; font-size: 13px; }

.service-qr { display: flex; justify-content: center; margin: 6px 0 4px; }
.service-qr img {
  width: 200px; height: 200px; max-width: 100%;
  border: 1px solid var(--border); border-radius: 12px; padding: 8px; background: #fff;
}

.portal-qr-card {
  margin-top: 22px; display: flex; align-items: center; gap: 24px;
}
.portal-qr-img { flex: 0 0 auto; }
.portal-qr-img img {
  display: block; border: 1px solid var(--border); border-radius: 12px; padding: 8px; background: #fff;
}
.portal-qr-text h3 { font-size: 17px; margin: 0 0 6px; }
.portal-qr-text p { margin: 0 0 12px; color: var(--text-dim); font-size: 14px; line-height: 1.6; }
@media (max-width: 640px) {
  .portal-qr-card { flex-direction: column; text-align: center; gap: 16px; }
}

.attach-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.attach-thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

@media (max-width: 760px) {
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .category-cards { grid-template-columns: repeat(2, 1fr); }
  .portal-hero h1 { font-size: 23px; }
}
