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

 :root {
  --bg: #eef3fb;
  --bronze: #1058ad;
  --bronze-dark: #0b3d80;
  --bronze-deep: #072a56;
  --bronze-light: #5b93d6;
  --copper: #1a63c4;
  --cream: #f5f9ff;
  --text: #16324f;
  --muted: #5b7089;
  --line: #cddcee;
  --card: #fdfeff;
  --input: #f7fafd;
  --success: #47735a;
  --danger: #a53f32;
  --navy: #1058ad;
  --navy-soft: #0b3d80;
  --lacquer: #0b3d80;
  --patina: #4a86d1;
}


* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 20%, rgba(16,88,173,.07), transparent 34%),
    linear-gradient(180deg, #eef4fb 0%, var(--bg) 100%);
  color: var(--bronze-dark);
  font-family: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

/* ========================= VIETNAMESE HERITAGE DECOR ========================= */
.motif {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  opacity: .105;
}
.motif svg { width: 100%; height: 100%; display: block; }
.motif-home {
  right: -115px;
  bottom: -115px;
  transform: rotate(-8deg);
}
.motif-form {
  right: -130px;
  top: 80px;
}
.bird-flock {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  color: var(--bronze-dark);
  opacity: .55;
}
.bird-flock svg { width: 100%; height: 100%; display:block; }
.bird-flock-home { width: 150px; height: 85px; left: 18px; bottom: 28px; transform: rotate(-4deg); }
.bird-flock-form { width: 135px; height: 78px; left: 10px; top: 90px; opacity: .32; }
.decor-note {
  color: rgba(230,240,252,.72);
  font-size: .72rem;
  margin-top: 10px;
}

/* ========================= HOME ========================= */
.home-page { background: transparent; position: relative; }
.home-shell {
  position: relative;
  z-index: 2;
  width: min(690px, calc(100% - 32px));
  margin: 10px auto 0;
}
.hero-header {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 24px 24px 26px;
  border-radius: 16px 16px 14px 14px;
  background: linear-gradient(135deg, var(--bronze-deep), var(--bronze));
  color: white;
  border-bottom: 3px solid var(--bronze-light);
  box-shadow: 0 18px 38px rgba(7,42,86,.18);
}
.hero-header::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.11), transparent 68%);
}
.hero-header::before {
  content: '•  •  •  •  •  •  •  •  •  •';
  position: absolute;
  right: 15px;
  top: 12px;
  color: rgba(255,255,255,.10);
  letter-spacing: 9px;
  font-size: 14px;
}
.hero-emblem {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 8px solid rgba(255,255,255,.10);
  color: #a8c8ee;
  font-size: 25px;
  margin-bottom: 10px;
}
.hero-content { position: relative; z-index: 1; }
.hero-content h1 {
  margin: 0 0 5px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.25;
  font-weight: 800;
}
.hero-content p { margin: 0; color: rgba(255,255,255,.86); font-size: .95rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-badges span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: .76rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.home-card {
  margin-top: 18px;
  border: 1px solid rgba(16,88,173,.12);
  padding: 24px;
  background: var(--card);
  border-radius: 17px;
  box-shadow: 0 18px 42px rgba(29, 57, 82, .10);
}
.home-card h2 {
  margin: 0 0 16px;
  font-size: .9rem;
  letter-spacing: .04em;
  font-weight: 800;
  color: var(--bronze-dark);
}
.form-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 17px 18px;
  margin-top: 14px;
  border: 1px solid #d4dfeb;
  border-radius: 14px;
  background: #fff;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.form-option:hover {
  transform: translateY(-2px);
  border-color: #7fa8d9;
  box-shadow: 0 10px 22px rgba(16,88,173,.10);
}
.option-icon {
  flex: 0 0 47px;
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--bronze);
  font-size: 23px;
  box-shadow: 0 7px 15px rgba(18,63,107,.20);
}
.option-content { min-width: 0; }
.option-content h3 { margin: 2px 0 5px; font-size: .98rem; font-weight: 800; }
.option-content p { margin: 0; color: var(--muted); font-size: .82rem; }
.option-link { display: inline-block; margin-top: 7px; color: #1a63c4; font-size: .78rem; font-weight: 800; }
.home-footer { padding: 25px 0 12px; text-align: center; color: #60778f; font-size: .76rem; }

/* ========================= FORM ========================= */
.form-page-shell {
  width: min(690px, calc(100% - 32px));
  margin: 10px auto 0;
}
.page { position: relative; z-index: 2; width: min(690px, calc(100% - 32px)); margin: 10px auto 0; padding-bottom: 35px; }
.form-page { width: 100%; }
.form-hero {
  position: relative;
  margin-bottom: 18px;
  padding: 24px;
  min-height: 176px;
  overflow: hidden;
  border-radius: 16px 16px 14px 14px;
  background: linear-gradient(135deg, var(--bronze-deep), var(--bronze));
  color: #fff;
  border-bottom: 3px solid var(--bronze-light);
  box-shadow: 0 18px 38px rgba(17,55,91,.16);
}
.form-hero::after {
  content: '';
  position: absolute;
  right: -100px;
  top: -100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 68%);
}
.back-home {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-bottom: 15px;
  color: rgba(255,255,255,.85);
  font-size: .78rem;
  font-weight: 600;
}
.form-emblem {
  position: absolute;
  z-index: 2;
  top: 25px;
  left: 24px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
  color: #a8c8ee;
  font-size: 19px;
}
.form-hero .eyebrow { margin: 42px 0 4px; font-size: .72rem; color: rgba(255,255,255,.82); text-align:center; }
.form-hero .title { margin: 0 0 5px; font-size: clamp(1.3rem, 3.5vw, 1.6rem); line-height: 1.25; color: #fff; text-align:center; }
.form-hero .subtitle { margin: 0; color: rgba(255,255,255,.84); font-size: .82rem; text-align:center; }
.form-hero .commitment { margin: 10px auto 0; max-width: 460px; color: rgba(255,255,255,.88); font-size: .76rem; font-style: italic; text-align:center; line-height: 1.4; }
.sheet {
  padding: 24px;
  border: 1px solid rgba(16,88,173,.12);
  background: #fff;
  border-radius: 17px;
  box-shadow: 0 18px 42px rgba(16,88,173,.11);
}
.sheet::before { content: 'THÔNG TIN'; display: block; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid var(--line); font-size: .9rem; font-weight: 800; letter-spacing: .04em; }
.section { border: none; padding: 0; margin: 0 0 2rem; }
.section + .section { padding-top: 1.8rem; border-top: 1px solid var(--line); }
.section legend { display: block; padding: 0 0 14px; font-size: 1rem; font-weight: 800; color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .82rem; font-weight: 500; color: #172c40; }
.field .hint { font-size: .75rem; color: var(--muted); font-weight: 400; }
.field .file-hint { margin: 4px 0 0; }
.field input[type="file"] {
  padding: 8px;
  border: 1.5px dashed var(--line, #cddcee);
  border-radius: 8px;
  font-family: inherit;
  font-size: .85rem;
  background: #f5f9fd;
  width: 100%;
}
.required { color: #1a63c4; margin-left: 3px; }
input[type='text'], input[type='tel'], input[type='date'], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #d1deeb;
  border-radius: 11px;
  background: var(--input);
  color: #172c40;
  font: inherit;
  font-size: .88rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: #6f9abd; box-shadow: 0 0 0 3px rgba(48,100,146,.12); background: #fff; }
textarea { min-height: 105px; resize: vertical; }
.choice-group { display: grid; grid-template-columns: 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 9px 14px 9px 42px;
  position: relative;
  border: 1px solid #d1deeb;
  border-radius: 11px;
  background: var(--input);
  cursor: pointer;
  font-size: .84rem;
}
.choice label::before {
  content: '';
  position: absolute;
  left: 16px;
  width: 16px;
  height: 16px;
  border: 1.5px solid #75899c;
  border-radius: 50%;
  background: #fff;
}
.choice input:checked + label { border-color: #6f9abd; background: #f2f7fb; }
.choice input:checked + label::after {
  content: '';
  position: absolute;
  left: 20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy);
}
.inline-other { margin-top: 8px; max-width: 100%; }
.inline-other[hidden] { display: none; }
.submit-row { margin-top: 24px; text-align: center; }
button.submit { border: 0; border-radius: 10px; padding: 12px 28px; background: var(--navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
button.submit:hover:not(:disabled) { background: var(--navy-soft); }
button.submit:disabled { opacity: .6; cursor: not-allowed; }
.form-note { margin: 10px 0 0; color: var(--muted); font-size: .76rem; }
.status-message { margin-top: 12px; padding: 0; font-size: .82rem; }
.status-message.show { padding: 10px 12px; border-radius: 9px; }
.status-message.success { color: var(--success); background: #eef8f3; }
.status-message.error { color: var(--danger); background: #fff1f1; }
.page-footer { padding: 22px 0 8px; text-align: center; color: #60778f; font-size: .76rem; }

@media (max-width: 520px) {
  .motif { width: 300px; height: 300px; opacity: .07; }
  .bird-flock { opacity: .28; }
  .home-shell, .page { position: relative; z-index: 2; width: min(100% - 20px, 690px); }
  .hero-header, .form-hero { padding: 20px; }
  .home-card, .sheet { padding: 18px; }
  .hero-header { min-height: 205px; }
  .hero-content h1 { font-size: 1.25rem; }
}


/* ========================= HOME PORTAL V3 ========================= */
body.home-page {
  background: #d9e8f7 url('/assets/vietnam-portal-bg.svg') center top / cover fixed no-repeat;
}
body.home-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(238,244,251,.58), rgba(238,244,251,.88));
}
.home-shell { width: min(980px, calc(100% - 28px)); margin: 24px auto 0; }
.portal-header {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 152px;
  padding: 24px 28px;
  overflow: hidden;
  border: 1px solid rgba(16,88,173,.22);
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(7,42,86,.97), rgba(16,88,173,.95));
  color: #f5f9ff;
  box-shadow: 0 20px 50px rgba(7,42,86,.16);
}
.portal-header::after {
  content: '';
  position: absolute;
  width: 390px; height: 390px;
  right: -155px; top: -150px;
  border-radius: 50%;
  border: 1px solid rgba(210,228,250,.14);
  box-shadow: 0 0 0 24px rgba(210,228,250,.035), 0 0 0 48px rgba(210,228,250,.025);
}
.portal-mark { position: relative; width: 72px; height: 72px; display:grid; place-items:center; }
.portal-mark-ring { position:absolute; inset:0; border:1px solid rgba(210,228,250,.35); border-radius:50%; box-shadow: inset 0 0 0 8px rgba(210,228,250,.08); }
.portal-mark-star { position:relative; z-index:1; color:#7fb0e8; font-size:25px; }
.portal-mark-logo { position:relative; z-index:1; width:44px; height:44px; object-fit:contain; border-radius:50%; background:#fff; padding:3px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.portal-heading { position:relative; z-index:1; }
.portal-kicker, .section-kicker { display:block; font-size:.68rem; letter-spacing:.16em; font-weight:800; }
.portal-kicker { color:#bcd6f2; margin-bottom:5px; }
.portal-heading h1 { margin:0; font-size:clamp(1.25rem,3vw,1.75rem); line-height:1.2; font-weight:800; }
.portal-heading p { margin:7px 0 0; color:rgba(230,240,252,.78); font-size:.84rem; }
.portal-stamp { position:relative; z-index:1; text-align:right; color:#cfe1f5; font-size:.78rem; font-weight:800; line-height:1.5; }
.portal-stamp span { color:rgba(230,240,252,.64); font-size:.62rem; font-weight:500; }
.portal-main { position:relative; margin-top:18px; padding:22px; border:1px solid rgba(16,88,173,.13); border-radius:20px; background:rgba(250,252,255,.94); box-shadow:0 18px 46px rgba(7,42,86,.10); }
.welcome-strip { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:6px 4px 20px; border-bottom:1px solid #d7e6f5; }
.section-kicker { color:#2f6fc4; margin-bottom:4px; }
.welcome-strip h2 { margin:0; color:#16324f; font-size:1.18rem; }
.welcome-strip p { margin:4px 0 0; color:#5b7089; font-size:.78rem; }
.welcome-medallion { width:86px; height:86px; flex:0 0 86px; opacity:.62; }
.welcome-medallion > div { width:100%; height:100%; }
.welcome-medallion svg { width:100%; height:100%; }
.service-grid { display:grid; grid-template-columns:1fr !important; grid-auto-flow:row; gap:12px; margin-top:16px; }
.service-card { position:relative; display:grid; grid-template-columns:auto 1fr; gap:13px; width:100%; height:156px; min-height:156px; padding:18px; overflow:hidden; border:1px solid #d7e6f5; border-radius:15px; background:#fdfeff; color:#16324f; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.service-card:hover { transform:translateY(-3px); border-color:#4a86d1; box-shadow:0 12px 28px rgba(16,88,173,.12); }
.service-card-featured::after { content:''; position:absolute; width:210px; height:210px; right:-95px; bottom:-100px; border:1px solid rgba(16,88,173,.16); border-radius:50%; box-shadow:0 0 0 22px rgba(16,88,173,.035),0 0 0 44px rgba(16,88,173,.025); }
.service-number { position:absolute; top:13px; right:15px; color:#8fb3dd; font-size:.68rem; font-weight:800; }
.service-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:12px; background:#1058ad; color:#dcebfa; font-size:21px; box-shadow:0 7px 16px rgba(16,88,173,.15); }
.service-body { min-width:0; }
.service-label { display:inline-block; margin-bottom:4px; color:#3a7bc4; font-size:.62rem; letter-spacing:.07em; text-transform:uppercase; font-weight:800; }
.service-body h3 { margin:0 28px 5px 0; color:#16324f; font-size:.94rem; line-height:1.35; }
.service-body p { margin:0; color:#5b7089; font-size:.74rem; line-height:1.55; }
.service-action { display:inline-block; margin-top:12px; color:#1a63c4; font-size:.72rem; font-weight:800; }
.service-action b { margin-left:4px; }
.portal-note { display:flex; align-items:center; gap:10px; margin-top:14px; padding:12px 14px; border-radius:12px; background:#e9f1fb; color:#2c4a68; font-size:.72rem; }
.portal-note-icon { width:26px; height:26px; display:grid; place-items:center; flex:0 0 26px; border-radius:50%; background:#1058ad; color:#fff; font-weight:800; }
.portal-note span { color:#5b7089; }
.home-footer { color:#5b7089; padding-bottom:18px; }

/* ========================= FORM HEADER FIX ========================= */
.form-hero { padding-top:68px; }
.back-home {
  position:absolute;
  top:20px;
  left:22px;
  z-index:4;
  margin:0;
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:999px;
  background:rgba(7,42,86,.28);
  color:#f5f9ff;
  font-size:.76rem;
  line-height:1.2;
  backdrop-filter:blur(5px);
}
.back-home:hover { background:rgba(7,42,86,.45); }
.form-emblem { top:18px; left:auto; right:22px; width:46px; height:46px; }
.form-hero .eyebrow { margin-top:0; }
button.submit { background:var(--bronze-dark); }
button.submit:hover:not(:disabled) { background:var(--bronze); }
.choice input:checked + label::after { background:var(--bronze); }

@media (max-width: 700px) {
  .portal-header { grid-template-columns:auto 1fr; padding:20px; }
  .portal-stamp { display:none; }
  .service-grid { grid-template-columns:1fr !important; }
  .service-card, .service-card-featured { grid-column:1; height:156px; min-height:156px; }
  .portal-main { padding:16px; }
}
@media (max-width: 520px) {
  .home-shell { width:min(100% - 18px, 980px); margin-top:12px; }
  .portal-header { gap:12px; border-radius:16px; }
  .portal-mark { width:58px; height:58px; }
  .portal-heading h1 { font-size:1.12rem; }
  .portal-heading p { font-size:.72rem; }
  .welcome-medallion { width:62px; height:62px; flex-basis:62px; }
  .form-hero { padding-top:68px; }
  .back-home { left:16px; top:16px; }
  .form-emblem { right:16px; top:16px; }
}
