/* ═══════════════════════════════════════
   24NexGen Payment Form — form.css
   All classes prefixed with .ng- or
   scoped under .nexgen-wrap
═══════════════════════════════════════ */

:root {
  --ng-blue:      #1A45BC;
  --ng-blue-dk:   #1538a0;
  --ng-blue-glow: rgba(26,69,188,0.25);
  --ng-sidebar:   #0d1e3d;
  --ng-field:     #07101F;
  --ng-page:      #0b1629;
  --ng-card:      #0f1e35;
  --ng-border:    #1e2f4a;
  --ng-white:     #FFFFFF;
  --ng-grey:      #8B95A5;
  --ng-red:       #f87171;
  --ng-green:     #22d3a0;
}

/* ── Wrapper ── */
.nexgen-wrap {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  min-height: 100vh;
  background: var(--ng-page);
  color: var(--ng-white);
  position: relative;
}

/* ── Mobile topbar ── */
.ng-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--ng-sidebar);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--ng-border);
}
.ng-topbar-logo { width: 150px; height: auto; }
.ng-hamburger {
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.ng-hamburger span {
  display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 2px;
}

/* ── Overlay ── */
.ng-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 199;
}
.ng-overlay.open { display: block; }

/* ── Sidebar ── */
.ng-sidebar {
  width: 270px;
  min-height: 100vh;
  background: var(--ng-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--ng-border);
}
.ng-sidebar-logo-wrap {
  padding: 22px 20px 24px;
  background: rgba(0,0,0,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ng-sidebar-logo { width: 210px; height: auto; display: block; }

.ng-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 24px;
  color: rgba(255,255,255,0.72);
  font-size: 14.5px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s;
}
.ng-nav-item:hover          { background: rgba(255,255,255,0.09); color: #fff; }
.ng-nav-item.ng-nav-active  {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border-left: 3px solid #fff;
}

/* ── Main ── */
.ng-main {
  flex: 1;
  padding: 44px 48px 72px;
  overflow-y: auto;
}
.ng-main-full { padding: 32px 24px 60px; }

.ng-page-title {
  font-size: 28px; font-weight: 700;
  color: var(--ng-white);
  margin: 0 0 28px;
  letter-spacing: -0.4px;
}

/* ── Card ── */
.ng-card {
  background: var(--ng-card);
  border: 1px solid var(--ng-border);
  border-radius: 14px;
  padding: 30px 34px 34px;
  max-width: 900px;
}

/* ── Step pills ── */
.ng-steps {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px; margin-bottom: 30px;
}
.ng-step {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 18px 8px 11px;
  border-radius: 30px;
  font-size: 13.5px; font-weight: 500;
  white-space: nowrap; cursor: default; user-select: none;
  transition: all 0.2s;
}
.ng-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.ng-step-active   { background: var(--ng-blue); color: #fff; }
.ng-step-active .ng-step-num  { background: rgba(255,255,255,0.2); color: #fff; }
.ng-step-done     { color: var(--ng-grey); cursor: pointer !important; }
.ng-step-done .ng-step-num    { background: var(--ng-blue); color: #fff; }
.ng-step-inactive { color: var(--ng-grey); }
.ng-step-inactive .ng-step-num { background: #1a2a42; color: var(--ng-grey); }
.ng-step-arrow { color: #2a3f60; font-size: 15px; margin: 0 2px; }

/* ── Panels ── */
.ng-step-panel { display: none; }
.ng-panel-active { display: block; animation: ngFadeUp .25s ease; }
@keyframes ngFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Form layout ── */
.ng-row   { display: grid; gap: 18px; margin-bottom: 18px; }
.ng-row-1 { grid-template-columns: 1fr; }
.ng-row-2 { grid-template-columns: 1fr 1fr; }
.ng-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.ng-field { display: flex; flex-direction: column; gap: 6px; }

.nexgen-wrap label {
  font-size: 13px; font-weight: 500; color: var(--ng-grey);
}
.ng-req { color: var(--ng-red); margin-left: 2px; }

/* ── Inputs ── */
.nexgen-wrap input[type="text"],
.nexgen-wrap input[type="email"],
.nexgen-wrap input[type="tel"],
.nexgen-wrap input[type="number"],
.nexgen-wrap input[type="date"],
.nexgen-wrap select,
.nexgen-wrap textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--ng-field);
  border: 1.5px solid var(--ng-border);
  border-radius: 8px;
  font-family: inherit; font-size: 14px;
  color: var(--ng-white);
  outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.nexgen-wrap input::placeholder,
.nexgen-wrap textarea::placeholder { color: var(--ng-grey); font-size: 13.5px; }
.nexgen-wrap input:focus,
.nexgen-wrap select:focus,
.nexgen-wrap textarea:focus {
  border-color: var(--ng-blue);
  box-shadow: 0 0 0 3px var(--ng-blue-glow);
}
.nexgen-wrap select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B95A5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.nexgen-wrap select option,
.nexgen-wrap select optgroup { background: #07101F; color: #fff; }
.nexgen-wrap textarea { resize: vertical; min-height: 76px; }

/* ── Currency wrap ── */
.ng-currency-wrap { position: relative; }
.ng-currency-flag {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: #1a2a42; display: flex; align-items: center;
  justify-content: center; font-size: 12px;
  color: var(--ng-grey); pointer-events: none;
}
.ng-currency-wrap select { padding-left: 42px; }

/* ── Error states ── */
.ng-err {
  font-size: 12px; color: var(--ng-red); font-weight: 500;
  min-height: 16px; display: block;
}
.nexgen-wrap input.ng-input-err,
.nexgen-wrap select.ng-input-err {
  border-color: var(--ng-red) !important;
  box-shadow: 0 0 0 3px rgba(248,113,113,0.15) !important;
}

/* ── Upload zone ── */
.ng-upload-zone {
  background: var(--ng-field);
  border: 1.5px dashed var(--ng-border);
  border-radius: 8px; padding: 14px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; position: relative; transition: border-color .15s;
}
.ng-upload-zone:hover { border-color: var(--ng-blue); }
.ng-upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0;
  cursor: pointer; width: 100%; height: 100%;
  padding: 0; border: none; box-shadow: none;
}
.ng-upload-icon  { font-size: 18px; flex-shrink: 0; }
.ng-upload-text  { font-size: 13.5px; color: var(--ng-blue); font-weight: 500; }
.ng-upload-hint  { font-size: 11.5px; color: #4a5f7a; margin-top: 3px; }

/* ── Section heading ── */
.ng-section-heading {
  font-size: 14px; font-weight: 600;
  color: var(--ng-white); margin: 0 0 16px;
}

/* ── Review table ── */
.ng-review-table {
  width: 100%; border-collapse: collapse;
  background: var(--ng-field);
  border-radius: 8px; overflow: hidden;
  margin-bottom: 4px;
}
.ng-review-table tr { border-bottom: 1px solid var(--ng-border); }
.ng-review-table tr:last-child { border-bottom: none; }
.ng-review-table td { padding: 10px 16px; font-size: 13.5px; }
.ng-review-table td:first-child { color: var(--ng-grey); font-weight: 500; width: 45%; }
.ng-review-table td:last-child  { color: var(--ng-white); text-align: right; word-break: break-all; }

/* ── Buttons ── */
.ng-btn-row {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 14px; margin-top: 28px;
}
.ng-btn {
  padding: 13px 24px; border-radius: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; border: none; transition: all .18s;
}
.ng-btn-primary {
  background: var(--ng-blue); color: #fff;
}
.ng-btn-primary:hover {
  background: var(--ng-blue-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--ng-blue-glow);
}
.ng-btn-primary:disabled {
  opacity: .6; cursor: default; transform: none;
}
.ng-btn-ghost {
  background: #1a2a42; color: var(--ng-grey);
  border: 1.5px solid var(--ng-border);
}
.ng-btn-ghost:hover:not(:disabled) { background: #1e3250; color: #fff; }

/* ── Ref badge ── */
.ng-ref-badge {
  display: inline-block;
  background: rgba(26,69,188,.15);
  border: 1px solid rgba(26,69,188,.35);
  color: #93b4ff; font-size: 14px;
  padding: 8px 18px; border-radius: 8px;
  margin-top: 12px;
}

/* ── Success ── */
.ng-success-wrap { text-align: center; padding: 32px 16px; }
.ng-success-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(34,211,160,.12);
  margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; color: var(--ng-green);
}
.ng-success-wrap h2 { font-size: 24px; font-weight: 700; margin: 0 0 10px; }
.ng-success-wrap p  { font-size: 14px; color: var(--ng-grey); line-height: 1.8; margin: 0 0 4px; }

/* ══════════════════════════════════════
   TABLET  769px – 1024px
══════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
  .ng-sidebar { width: 220px; }
  .ng-sidebar-logo { width: 170px; }
  .ng-main { padding: 32px 26px 60px; }
  .ng-page-title { font-size: 24px; }
  .ng-card { padding: 22px 22px 26px; max-width: 100%; }
  .ng-steps { flex-wrap: wrap; gap: 4px; }
  .ng-step  { padding: 7px 12px 7px 10px; font-size: 12.5px; }
  .ng-step-num { width: 24px; height: 24px; font-size: 11px; }
  .ng-row-3 { grid-template-columns: 1fr 1fr; }
  .ng-review-table td { font-size: 13px; padding: 9px 12px; }
}

/* ══════════════════════════════════════
   MOBILE  ≤ 768px
══════════════════════════════════════ */
@media (max-width: 768px) {
  .nexgen-wrap { flex-direction: column; }
  .ng-topbar   { display: flex; }

  .ng-sidebar {
    position: fixed; top: 0; left: -280px;
    height: 100vh; z-index: 200; width: 260px;
    transition: left .3s ease; overflow-y: auto;
  }
  .ng-sidebar.open { left: 0; }

  .ng-main { padding: 20px 16px 60px; width: 100%; }
  .ng-page-title { font-size: 20px; margin-bottom: 18px; }
  .ng-card { padding: 18px 16px 22px; border-radius: 10px; }

  .ng-steps { flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
  .ng-step  { padding: 6px 9px 6px 8px; font-size: 11.5px; }
  .ng-step-num { width: 22px; height: 22px; font-size: 11px; }
  .ng-step-arrow { font-size: 12px; }

  .ng-row-2, .ng-row-3 { grid-template-columns: 1fr !important; }
  .ng-btn-row { grid-template-columns: 1fr; }
  .ng-btn { font-size: 14px; padding: 12px 18px; }

  .ng-review-table { display: block; }
  .ng-review-table tr  { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--ng-border); }
  .ng-review-table td  { padding: 2px 12px; text-align: left !important; font-size: 12.5px; }
  .ng-review-table td:first-child { font-size: 11.5px; }
}

/* ══════════════════════════════════════
   SMALL MOBILE  ≤ 420px
══════════════════════════════════════ */
@media (max-width: 420px) {
  .ng-step-arrow { display: none; }
  .ng-step  { font-size: 11px; padding: 5px 8px; }
  .ng-step-num { width: 20px; height: 20px; font-size: 10px; }
  .ng-card  { padding: 14px 12px 18px; }
  .ng-main  { padding: 14px 10px 60px; }
  .ng-page-title { font-size: 17px; }
  .ng-topbar-logo { width: 130px; }
}
