:root {
  --primary-color: #c6000b;
  --secondary-color: #8f0008;
  --primary-blue: #c6000b;
  --navy: #082b5f;
  --navy-deep: #031a3d;
  --navy-soft: #153d73;
  --page-bg: #edf7ff;
  --surface: #ffffff;
  --surface-soft: #f6fbff;
  --text: #092657;
  --text-soft: #637391;
  --border: #d7e4f2;
  --border-strong: #aec3dc;
  --warning: #f59e0b;
  --warning-bg: #fff8e8;
  --info-bg: #eef7ff;
  --error: #bf1230;
  --radius-sm: 6px;
  --radius-md: 8px;
  --shadow-card: 0 14px 32px rgba(8, 43, 95, 0.08);
  --shadow-soft: 0 10px 24px rgba(8, 43, 95, 0.06);
  --transition: 180ms ease;
  --content-width: 1280px;
  --panel-width: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(237, 247, 255, 0.9) 36%),
    var(--page-bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.w-full {
  width: 100%;
}

.text-center {
  text-align: center;
}

.text-2xl {
  font-size: inherit;
}

.text-bold {
  font-weight: inherit;
}

.uppercase {
  text-transform: uppercase;
}

.main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1 0 auto;
}

.page-content {
  width: min(var(--content-width), calc(100% - 56px));
  margin: 0 auto;
  padding: 0 0 26px;
}

.header-main {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
}

.header-top {
  width: min(var(--content-width), calc(100% - 56px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.header-brand-logo {
  width: auto;
  max-width: 168px;
  height: 50px;
  object-fit: contain;
}

.header-brand-copy {
  display: none;
  min-width: 0;
}

.header-brand-title {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

.header-brand-subtitle {
  display: block;
  max-width: 460px;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hamburger-menu {
  display: grid;
  gap: 5px;
  padding: 10px;
  color: var(--navy);
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.hamburger-menu:hover {
  background: #eef5fd;
  transform: translateY(-1px);
}

.hamburger-menu .bar {
  display: block;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.public-hero {
  overflow: hidden;
  background: #fff;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.top-banner-image {
  display: block;
  width: 100%;
  max-height: 740px;
  object-fit: contain;
  object-position: center top;
  background: #fff;
}

.public-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding: 24px 18px 30px;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.public-grid-single {
  justify-items: center;
}

.public-form-panel,
.public-program-panel {
  width: min(100%, var(--panel-width));
  min-width: 0;
  margin: 0 auto;
}

.main-card,
.program-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.main-card-form-section {
  padding: 32px 30px 28px;
}

.verification-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  text-align: left;
}

.verification-header::before {
  content: "\f2bd";
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(145deg, var(--primary-color), var(--secondary-color));
  border: 8px solid #eef6ff;
  border-radius: 50%;
  font-family: "Font Awesome 6 Free";
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 9px 18px rgba(198, 0, 11, 0.12);
}

.verification-text-wrapper {
  min-width: 0;
}

.verification-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

.verification-subtitle {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.45;
}

.phone-display {
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

.form-divider {
  height: 1px;
  margin: 22px 0 24px;
  background: var(--border-strong);
}

.space-y-5 > * + * {
  margin-top: 12px;
}

.form-group-custom {
  margin: 0 0 18px;
}

.form-label {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.form-label i {
  width: 18px;
  margin-right: 8px;
  color: var(--primary-color);
  text-align: center;
}

.form-input-wrapper {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-input-wrapper:hover {
  border-color: #8ea8ca;
}

.form-input-wrapper:focus-within {
  background: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(198, 0, 11, 0.12);
}

.form-input {
  width: 100%;
  min-width: 0;
  padding: 14px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16px;
}

.form-input::placeholder {
  color: #96a5bd;
}

.phone-input-wrapper {
  padding: 0;
}

.iti {
  width: 100%;
}

.iti .iti__tel-input {
  width: 100%;
  padding-top: 14px;
  padding-bottom: 14px;
  border: 0;
  outline: 0;
  background: transparent;
}

.iti__selected-country {
  min-height: 56px;
}

.iti__dropdown-content {
  z-index: 12000;
}

.submit-btn {
  display: inline-flex;
  width: 100%;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  color: #fff;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 22px rgba(198, 0, 11, 0.2);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: box-shadow var(--transition), transform var(--transition), filter var(--transition);
}

.submit-btn:hover {
  filter: brightness(1.02);
  box-shadow: 0 14px 26px rgba(198, 0, 11, 0.26);
  transform: translateY(-1px);
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.82;
  transform: none;
}

.submit-btn:focus-visible {
  outline: 3px solid rgba(198, 0, 11, 0.24);
  outline-offset: 3px;
}

.btn-icon,
.btn-icon-after {
  font-size: 14px;
}

.btn-secondary {
  background: #5d6c82;
  box-shadow: 0 10px 20px rgba(93, 108, 130, 0.14);
}

.btn-group {
  display: flex;
  gap: 12px;
}

.btn-flex {
  flex: 1;
}

.notice-stack {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.info-card-pepe {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 13px 18px;
  border-left: 4px solid;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.45;
}

.info-card-pepe i {
  width: 24px;
  text-align: center;
  font-size: 22px;
}

.info-card-info {
  color: #173c75;
  background: var(--info-bg);
  border-left-color: var(--navy-soft);
}

.info-card-info i {
  color: var(--navy-soft);
}

.info-card-warning {
  color: #745016;
  background: var(--warning-bg);
  border-left-color: var(--warning);
}

.info-card-warning i {
  color: var(--warning);
}

.program-shell {
  padding: 28px 28px 30px;
}

.program-section-header {
  text-align: center;
}

.program-section-header h2 {
  margin: 0;
  color: var(--primary-color);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.15;
}

.program-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.program-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  min-height: 156px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(8, 43, 95, 0.03);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.program-card:hover {
  border-color: #8ca6c9;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.program-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  align-self: start;
  color: var(--navy-soft);
  background: #eaf4ff;
  border-radius: 50%;
  font-size: 28px;
}

.program-card a {
  text-decoration: none;
}

.program-pill {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.program-card h3 {
  margin: 0 0 9px;
  color: var(--primary-color);
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 800;
  line-height: 1.18;
}

.program-card h3 a {
  color: inherit;
}

.program-card p {
  margin: 0;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.42;
}

.otp-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 6px 0 2px;
}

.otp-input {
  width: 60px;
  height: 64px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.otp-input:focus {
  background: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(198, 0, 11, 0.12);
}

.error-message {
  display: none;
  margin: 0;
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.error-message-inline {
  margin-top: 8px;
}

.error-box {
  display: none;
  margin-bottom: 13px;
  padding: 12px 14px;
  color: var(--error);
  background: #fff2f4;
  border: 1px solid #f3c6cf;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
}

.error-box i {
  margin-right: 8px;
}

.display-field {
  margin-bottom: 16px;
}

.display-value {
  min-height: 56px;
  padding: 15px 16px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
}

.footer {
  margin-top: auto;
  padding: 28px 0;
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(110deg, var(--navy), var(--navy-deep));
}

.footer-inner {
  width: min(var(--content-width), calc(100% - 56px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.footer-security {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 760px;
}

.footer-shield {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 17px;
  font-size: 24px;
}

.footer-title {
  font-size: 17px;
  font-weight: 800;
}

.footer-text {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  text-align: right;
}

.notification-popup {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10020;
  display: flex;
  width: min(360px, calc(100vw - 28px));
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  color: #173b73;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 32px rgba(8, 43, 95, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity var(--transition), transform var(--transition);
}

.notification-popup.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.notification-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  background: var(--primary-color);
  border-radius: 50%;
}

.notification-content {
  min-width: 0;
  flex: 1;
}

.notification-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.notification-subtitle {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
}

.notification-close {
  padding: 0 3px;
  color: #789;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

#splash-screen,
#loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition: opacity var(--transition);
}

#splash-screen.is-active,
#loader.is-active {
  display: block;
  opacity: 1;
}

.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  border: 4px solid #dce9f6;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .page-content,
  .header-top,
  .footer-inner {
    width: min(100% - 24px, 760px);
  }

  .header-top {
    min-height: 68px;
  }

  .header-brand-logo {
    height: 42px;
    max-width: 132px;
  }

  .hamburger-menu .bar {
    width: 30px;
    height: 3px;
  }

  .public-grid {
    gap: 14px;
    padding: 12px 10px 20px;
  }

  .main-card-form-section,
  .program-shell {
    padding: 24px 18px;
  }

  .verification-header {
    gap: 14px;
  }

  .verification-header::before {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
    border-width: 7px;
    font-size: 20px;
  }

  .verification-title {
    font-size: 22px;
  }

  .verification-subtitle {
    font-size: 14px;
  }

  .program-section {
    grid-template-columns: 1fr;
  }

  .program-card {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 14px;
    min-height: 0;
    padding: 18px;
  }

  .program-icon {
    width: 54px;
    height: 54px;
    font-size: 23px;
  }

  .program-card h3 {
    font-size: 21px;
  }

  .program-card p {
    font-size: 15px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-copyright {
    text-align: left;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 14px;
  }

  .page-content,
  .header-top,
  .footer-inner {
    width: calc(100% - 18px);
  }

  .top-banner-image {
    max-height: none;
  }

  .public-grid {
    padding: 9px 8px 16px;
  }

  .main-card-form-section,
  .program-shell {
    padding: 20px 14px;
  }

  .verification-header {
    align-items: flex-start;
  }

  .verification-header::before {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    border-width: 6px;
    font-size: 18px;
  }

  .verification-title {
    font-size: 20px;
  }

  .form-input-wrapper,
  .display-value {
    min-height: 54px;
  }

  .submit-btn {
    min-height: 56px;
    font-size: 14px;
  }

  .otp-container {
    gap: 8px;
  }

  .otp-input {
    width: 48px;
    height: 56px;
    font-size: 21px;
  }

  .btn-group {
    flex-direction: column;
  }

  .program-section-header h2 {
    font-size: 25px;
  }

  .program-card {
    grid-template-columns: 1fr;
  }

  .program-icon {
    width: 52px;
    height: 52px;
  }

  .footer {
    padding: 22px 0;
  }

  .footer-security {
    align-items: flex-start;
  }

  .footer-shield {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 20px;
  }

  .footer-title {
    font-size: 15px;
  }

  .footer-text {
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .otp-container {
    gap: 6px;
  }

  .otp-input {
    width: 42px;
    height: 52px;
  }

  .info-card-pepe {
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
