:root {
  --blue: #2F3E93;
  --navy: #172052;
  --coral: #F56B6D;
  --teal: #55C7C4;
  --bg: #F6F8FF;
  --text: #1B1F3B;
  --muted: #667085;
  --yellow: #FFC857;
  --white: #FFFFFF;
  --border: rgba(47,62,147,.14);
  --shadow: 0 24px 70px rgba(23,32,82,.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(85,199,196,.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(245,107,109,.16), transparent 32rem),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--blue);
  font-weight: 800;
}

.boot-screen img {
  width: 150px;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(47,62,147,.1);
}

.navbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  color: var(--blue);
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 16px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: -2px;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 800;
  color: #26315f;
  font-size: 15px;
}

.navlinks a {
  padding: 10px 4px;
}

.navlinks a.active {
  color: var(--coral);
}

.mobile-menu {
  display: none;
  border: 0;
  color: var(--blue);
  background: #eef2ff;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 900;
  cursor: pointer;
  transition: .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--coral), #ff8b65);
  color: white;
  box-shadow: 0 16px 36px rgba(245,107,109,.28);
}

.btn-blue {
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: white;
  box-shadow: 0 16px 36px rgba(47,62,147,.24);
}

.btn-soft {
  background: white;
  color: var(--blue);
  border: 1px solid var(--border);
}

.btn-teal {
  background: var(--teal);
  color: var(--navy);
}

.section {
  padding: 76px 0;
}

.hero {
  padding: 74px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 44px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(85,199,196,.16);
  border: 1px solid rgba(85,199,196,.3);
  color: var(--blue);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 900;
  margin-bottom: 20px;
}

h1,
h2,
h3 {
  font-family: "Baloo 2", "Nunito Sans", sans-serif;
  margin: 0;
  line-height: 1.08;
}

h1 {
  font-size: clamp(42px, 6vw, 76px);
  color: var(--navy);
  letter-spacing: -.8px;
}

h1 span,
h2 span {
  color: var(--coral);
}

.lead {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
  margin: 20px 0 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-pill {
  padding: 9px 13px;
  border-radius: 999px;
  background: white;
  color: var(--blue);
  font-weight: 800;
  border: 1px solid rgba(47,62,147,.12);
}

.hero-card {
  background: linear-gradient(180deg, #fff, #eef2ff);
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.hero-logo {
  background: var(--blue);
  border-radius: 32px;
  padding: 22px;
  display: grid;
  place-items: center;
}

.hero-logo img {
  width: 100%;
  max-width: 340px;
  border-radius: 26px;
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.stat-card {
  background: white;
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  border: 1px solid rgba(47,62,147,.11);
}

.stat-card strong {
  color: var(--blue);
  font-size: 24px;
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(32px, 4vw, 48px);
  color: var(--navy);
}

.section-head p {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 16px 45px rgba(23,32,82,.08);
}

.program-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.program-card:after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -34px;
  width: 112px;
  height: 112px;
  background: rgba(245,107,109,.1);
  border-radius: 50%;
}

.program-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  font-size: 31px;
  background: linear-gradient(135deg, #fff0f0, #effffe);
  border-radius: 22px;
  margin-bottom: 16px;
}

.program-card h3 {
  color: var(--blue);
  font-size: 27px;
  margin-bottom: 8px;
}

.program-card p {
  color: var(--muted);
  line-height: 1.65;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f0f4ff;
  color: var(--blue);
  font-weight: 900;
  font-size: 13px;
}

.feature-card {
  border-left: 6px solid var(--teal);
}

.feature-card:nth-child(even) {
  border-left-color: var(--coral);
}

.list {
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #344054;
  line-height: 1.55;
}

.list li:before {
  content: "✓";
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(85,199,196,.18);
  color: var(--blue);
  font-weight: 900;
}

.cta-band {
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: white;
  border-radius: 34px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.cta-band h2,
.cta-band h3 {
  color: white;
}

.cta-band p {
  color: rgba(255,255,255,.82);
}

.form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 900;
  color: #26315f;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(47,62,147,.18);
  border-radius: 16px;
  padding: 13px 14px;
  outline: none;
  background: white;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(85,199,196,.16);
}

.notice {
  padding: 14px 16px;
  border-radius: 18px;
  background: #ecfff9;
  color: #05715f;
  border: 1px solid rgba(85,199,196,.28);
  font-weight: 800;
}

.warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.page-hero {
  padding: 54px 0 28px;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.table-wrap {
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: white;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 900px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(47,62,147,.1);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--blue);
  color: white;
  font-weight: 900;
  position: sticky;
  top: 0;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 900;
  background: #eef2ff;
  color: var(--blue);
}

.status.new {
  background: #fff0f0;
  color: var(--coral);
}

.status.enrolled {
  background: #ecfff9;
  color: #047857;
}

.dashboard {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
}

.sidebar {
  background: white;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 18px;
  height: fit-content;
  position: sticky;
  top: 96px;
}

.sidebar a {
  display: block;
  padding: 12px 14px;
  border-radius: 16px;
  color: #26315f;
  font-weight: 900;
}

.sidebar a.active,
.sidebar a:hover {
  background: #eef2ff;
  color: var(--blue);
}

.manager-input {
  width: 100%;
  border: 1px solid rgba(47,62,147,.15);
  border-radius: 12px;
  padding: 9px 10px;
}

.newsletter-frame {
  width: 100%;
  min-height: 760px;
  border: 0;
  background: white;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.footer {
  margin-top: 70px;
  background: var(--navy);
  color: white;
  padding: 46px 0 96px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 28px;
}

.footer p,
.footer a {
  color: rgba(255,255,255,.78);
  line-height: 1.7;
}

.footer h3 {
  color: white;
  margin-bottom: 12px;
}

.float-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-actions a,
.float-actions button {
  border: 0;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: white;
  color: var(--blue);
  box-shadow: 0 14px 36px rgba(23,32,82,.18);
  font-size: 22px;
  cursor: pointer;
}

.float-actions .call {
  background: var(--coral);
  color: white;
}

.float-actions .zalo {
  background: var(--teal);
  color: var(--navy);
  font-weight: 900;
  font-size: 16px;
}

.chatbox {
  position: fixed;
  right: 18px;
  bottom: 88px;
  width: min(390px, calc(100% - 32px));
  background: white;
  border-radius: 26px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  z-index: 80;
  display: none;
}

.chatbox.open {
  display: block;
}

.chat-head {
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: white;
  padding: 16px 18px;
  font-weight: 900;
}

.chat-body {
  padding: 16px;
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.msg {
  padding: 11px 13px;
  border-radius: 16px;
  line-height: 1.55;
  max-width: 88%;
}

.bot {
  background: #f0f4ff;
  color: #26315f;
}

.user {
  margin-left: auto;
  background: var(--coral);
  color: white;
}

.quick-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
}

.quick-row button {
  border: 1px solid var(--border);
  background: white;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 800;
  color: var(--blue);
  cursor: pointer;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(47,62,147,.1);
}

.chat-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}

.chat-input button {
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: white;
  padding: 0 14px;
  font-weight: 900;
}

.mobile-bottom {
  display: none;
}

@media (max-width: 920px) {
  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .navlinks {
    display: none;
    position: absolute;
    top: 76px;
    left: 16px;
    right: 16px;
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .navlinks.open {
    display: flex;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .header .btn-primary {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-stat-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    padding-bottom: 130px;
  }

  .float-actions {
    bottom: 78px;
  }

  .mobile-bottom {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(47,62,147,.12);
    border-radius: 22px;
    padding: 8px;
    box-shadow: 0 18px 50px rgba(23,32,82,.18);
  }

  .mobile-bottom a {
    text-align: center;
    padding: 11px 6px;
    border-radius: 16px;
    font-weight: 900;
    background: #eef2ff;
    color: var(--blue);
    font-size: 14px;
  }

  .mobile-bottom a:nth-child(3) {
    background: var(--coral);
    color: white;
  }
}

/* ===== GALLERY VIEWER ===== */
.s2-viewer{
  position:fixed; inset:0; z-index:9998; display:none;
  background:rgba(10,14,40,.92); align-items:center; justify-content:center; padding:24px;
}
.s2-viewer.open{ display:flex; }
.s2-viewer-stage{ max-width:min(960px,92vw); width:100%; text-align:center; }
.s2-viewer-stage img{ max-width:100%; max-height:78vh; border-radius:18px; }
.s2-viewer-stage iframe{ width:100%; aspect-ratio:16/9; border:0; border-radius:18px; }
.s2-viewer-cap{ color:#fff; margin-top:14px; font-weight:700; font-size:15px; }
.s2-viewer-close{
  position:absolute; top:20px; right:24px; width:46px; height:46px; border-radius:50%;
  border:0; background:rgba(255,255,255,.15); color:#fff; font-size:22px; cursor:pointer;
}
.s2-viewer-nav{
  position:absolute; top:50%; transform:translateY(-50%); width:52px; height:52px;
  border-radius:50%; border:0; background:rgba(255,255,255,.15); color:#fff; font-size:30px; cursor:pointer;
}
.s2-viewer-nav.prev{ left:20px; }
.s2-viewer-nav.next{ right:20px; }
.s2-viewer-close:hover, .s2-viewer-nav:hover{ background:rgba(255,255,255,.3); }
@media (max-width:640px){ .s2-viewer-nav{ width:42px; height:42px; font-size:24px; } }
