
/* ==============================
   PEGASUS – REGISTRATION STYLES
   ============================== */
   :root {
    --peg-navy:      #0A1628;
    --peg-blue:      #1A3A6E;
    --peg-accent:    #1E6FD9;
    --peg-sky:       #3B9EE8;
    --peg-light:     #E8F1FB;
    --peg-white:     #FFFFFF;
    --peg-muted:     #6B7B99;
    --peg-border:    #D3DFF0;
    --peg-success:   #22C55E;
    --peg-warning:   #F59E0B;
    --peg-danger:    #EF4444;
    --peg-radius:    14px;
    --peg-shadow:    0 20px 60px rgba(10,22,40,0.18);
  }

  * { box-sizing: border-box; }

  body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-image: url("/public/assets/img/logo-data/shapebg.png") !important;
    min-height: 100vh;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
  }

  /* ── PAGE WRAPPER ─────────────────────────── */
  .reg-page-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    position: relative;
    overflow: hidden;
  }
  .reg-page-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 60% at 20% 10%, rgba(30,111,217,.25) 0%, transparent 70%),
      radial-gradient(ellipse 60% 50% at 80% 90%, rgba(59,158,232,.20) 0%, transparent 70%);
    pointer-events: none;
  }

  /* ── CARD ─────────────────────────────────── */
  .reg-card {
    background: var(--peg-white);
    border-radius: 24px;
    box-shadow: var(--peg-shadow);
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 1;
    overflow: hidden;
  }

  /* ── HEADER BAND ──────────────────────────── */
  .reg-header {
    background: #fff;
    padding: 13px 25px 20px;
    text-align: center;
    position: relative;
}
  .reg-header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 24px;
    background: var(--peg-white);
    border-radius: 24px 24px 0 0;
  }
  .reg-logo { height: 56px; margin-bottom: 8px; }
  .reg-header h1 {
    font-family: 'Sora', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 4px;
  }
  .reg-header p {
    font-size: .84rem;
    color: #000;
    margin: 0;
  }

  /* ── STEP INDICATOR ───────────────────────── */
  .step-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 28px 0;
    gap: 0;
  }
  .step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
  }
  .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--peg-border);
    z-index: 0;
    transition: background .4s;
  }
  .step-item.done:not(:last-child)::after,
  .step-item.active:not(:last-child)::after {
    background: var(--peg-accent);
  }
  .step-dot {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid var(--peg-border);
    background: var(--peg-white);
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700;
    color: var(--peg-muted);
    position: relative; z-index: 1;
    transition: all .3s;
  }
  .step-item.active .step-dot {
    border-color: var(--peg-accent);
    background: var(--peg-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(30,111,217,.18);
  }
  .step-item.done .step-dot {
    border-color: var(--peg-success);
    background: var(--peg-success);
    color: #fff;
  }
  .step-item.done .step-dot::before { content: '✓'; }
  .step-item.done .step-dot span { display: none; }
  .step-label {
    font-size: .70rem;
    font-weight: 600;
    color: var(--peg-muted);
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
  }
  .step-item.active .step-label { color: var(--peg-accent); }
  .step-item.done  .step-label  { color: var(--peg-success); }

  /* ── BODY ─────────────────────────────────── */
  .reg-body { padding: 28px 36px 32px; }

  .step-panel { display: none; animation: fadeSlide .35s ease; }
  .step-panel.active { display: block; }

  @keyframes fadeSlide {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  .step-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--peg-navy);
    margin: 0 0 4px;
  }
  .step-sub {
    font-size: .82rem;
    color: var(--peg-muted);
    margin: 0 0 24px;
  }

  /* ── FORM FIELDS ──────────────────────────── */
  .form-row { display: flex; gap: 16px; }
  .form-row .form-grp { flex: 1; }
  .form-grp { margin-bottom: 18px; }

  .form-grp label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--peg-navy);
    margin-bottom: 6px;
    letter-spacing: .02em;
  }
  .form-grp label .req { color: var(--peg-danger); margin-left: 2px; }

  .peg-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--peg-border);
    border-radius: var(--peg-radius);
    font-family: inherit;
    font-size: .88rem;
    color: var(--peg-navy);
    background: #FAFCFF;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
  }
  .peg-input:focus {
    border-color: var(--peg-accent);
    box-shadow: 0 0 0 3px rgba(30,111,217,.12);
    background: #fff;
  }
  .peg-input.is-invalid { border-color: var(--peg-danger) !important; }
  .peg-input.is-valid   { border-color: var(--peg-success) !important; }

  textarea.peg-input { height: auto; padding: 10px 14px; resize: vertical; }

  .field-error {
    font-size: .75rem;
    color: var(--peg-danger);
    margin-top: 4px;
    display: block;
  }

  /* phone input group */
  .phone-group {
    display: flex;
    border: 1.5px solid var(--peg-border);
    border-radius: var(--peg-radius);
    overflow: hidden;
    background: #FAFCFF;
    transition: border-color .2s, box-shadow .2s;
  }
  .phone-group:focus-within {
    border-color: var(--peg-accent);
    box-shadow: 0 0 0 3px rgba(30,111,217,.12);
  }
  .phone-group.is-invalid { border-color: var(--peg-danger); }
  .phone-flag {
    display: flex; align-items: center;
    padding: 0 12px;
    background: #EFF5FF;
    border-right: 1.5px solid var(--peg-border);
    font-size: .82rem; font-weight: 600;
    color: var(--peg-blue);
    white-space: nowrap;
    min-width: 80px;
  }
  .phone-flag img { height: 18px; margin-right: 5px; }
  .phone-input {
    flex: 1; border: none; background: transparent;
    padding: 0 14px; height: 42px;
    font-family: inherit; font-size: .88rem; color: var(--peg-navy);
    outline: none;
  }

  /* select2 overrides */
  .select2-container--default .select2-selection--single {
    height: 44px !important;
    border: 1.5px solid var(--peg-border) !important;
    border-radius: var(--peg-radius) !important;
    background: #FAFCFF !important;
    display: flex; align-items: center;
  }
  .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: 14px !important;
    font-size: .88rem;
    color: var(--peg-navy);
  }
  .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px !important; right: 8px !important;
  }
  .select2-container--focus .select2-selection--single,
  .select2-container--open  .select2-selection--single {
    border-color: var(--peg-accent) !important;
    box-shadow: 0 0 0 3px rgba(30,111,217,.12) !important;
  }
  .select2-container { width: 100% !important; }

  /* password wrapper */
  .pwd-wrap {
    position: relative;
  }
  .pwd-wrap .peg-input { padding-right: 42px; }
  .pwd-eye {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: var(--peg-muted); font-size: 1rem;
  }

  /* password strength */
  .pwd-strength { margin-top: 6px; }
  .pwd-strength-bar {
    height: 4px; border-radius: 99px;
    background: var(--peg-border);
    overflow: hidden; margin-bottom: 4px;
  }
  .pwd-strength-fill {
    height: 100%; width: 0;
    border-radius: 99px;
    transition: width .35s, background .35s;
  }
  .pwd-strength-text { font-size: .72rem; font-weight: 600; }

  /* ── PHOTO UPLOAD ─────────────────────────── */
  .photo-upload-area {
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 22px;
  }
  .photo-preview {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--peg-border);
  }
  .photo-actions { display: flex; flex-direction: column; gap: 8px; }
  .btn-upload-photo {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: var(--peg-accent);
    color: #fff;
    border: none; border-radius: 8px;
    font-family: inherit; font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: background .2s;
  }
  .btn-upload-photo:hover { background: var(--peg-blue); }
  .btn-reset-photo {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: var(--peg-danger);
    border: 1.5px solid var(--peg-danger); border-radius: 8px;
    font-family: inherit; font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: all .2s;
  }
  .btn-reset-photo:hover { background: var(--peg-danger); color: #fff; }
  .photo-hint { font-size: .74rem; color: var(--peg-muted); }

  /* ── ACCOUNT TYPE CARDS ───────────────────── */
  .acct-type-grid {
    display: grid; grid-template-columns: repeat(4,1fr); gap: 10px;
    margin-bottom: 4px;
  }
  @media(max-width:560px){ .acct-type-grid { grid-template-columns: repeat(2,1fr); } }

  .acct-type-card {
    border: 2px solid var(--peg-border);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all .25s;
    background: #FAFCFF;
  }
  .acct-type-card:hover { border-color: var(--peg-sky); background: #EEF6FF; }
  .acct-type-card.selected {
    border-color: var(--peg-accent);
    background: linear-gradient(135deg, #EEF6FF, #DCEEFF);
    box-shadow: 0 4px 14px rgba(30,111,217,.15);
  }
  .acct-type-card input[type="radio"] { display: none; }
  .acct-type-icon { font-size: 1.6rem; display: block; margin-bottom: 6px; }
  .acct-type-name { font-size: .78rem; font-weight: 700; color: var(--peg-navy); }
  .acct-type-desc { font-size: .68rem; color: var(--peg-muted); margin-top: 2px; }

  /* ── ROLE SELECTION ───────────────────────── */
  .role-list { display: flex; flex-direction: column; gap: 10px; }
  .role-card {
    border: 2px solid var(--peg-border);
    border-radius: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all .25s;
    display: flex; align-items: center; gap: 14px;
    background: #FAFCFF;
  }
  .role-card:hover { border-color: var(--peg-sky); }
  .role-card.selected {
    border-color: var(--peg-accent);
    background: #EEF6FF;
  }
  .role-card input[type="radio"] { display: none; }
  .role-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--peg-accent), var(--peg-sky));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #fff; flex-shrink: 0;
  }
  .role-info h4 { font-size: .88rem; font-weight: 700; color: var(--peg-navy); margin: 0 0 2px; }
  .role-info p  { font-size: .74rem; color: var(--peg-muted); margin: 0; }
  .role-check {
    margin-left: auto;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid var(--peg-border);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .75rem; transition: all .2s;
  }
  .role-card.selected .role-check {
    background: var(--peg-accent); border-color: var(--peg-accent);
  }

  /* partner sub-type */
  #partnerTypeWrap {
    display: none;
    margin-top: 14px;
    animation: fadeSlide .3s ease;
  }

  /* ── ADDRESS FIELDS ───────────────────────── */
  .address-grid {
    display: grid;
    grid-template-columns: 90px 1fr 1fr;
    gap: 12px;
  }
  @media(max-width:480px){ .address-grid { grid-template-columns: 1fr 1fr; } }

  /* ── DOCUMENT UPLOADS ─────────────────────── */
  .doc-upload-list { display: flex; flex-direction: column; gap: 12px; }
  .doc-upload-item {
    display: flex; align-items: center;
    border: 1.5px solid var(--peg-border);
    border-radius: 12px;
    padding: 12px 16px;
    background: #FAFCFF;
    gap: 14px;
    transition: border-color .2s;
  }
  .doc-upload-item.is-invalid { border-color: var(--peg-danger); }
  .doc-upload-item.has-file   { border-color: var(--peg-success); background: #F0FDF4; }
  .doc-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 10px;
    background: var(--peg-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--peg-accent);
  }
  .doc-info { flex: 1; min-width: 0; }
  .doc-info h5 { font-size: .82rem; font-weight: 700; color: var(--peg-navy); margin: 0 0 2px; }
  .doc-info small { font-size: .72rem; color: var(--peg-muted); }
  .doc-file-name {
    font-size: .72rem; color: var(--peg-success);
    font-weight: 600; margin-top: 2px;
    display: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .doc-upload-item.has-file .doc-file-name { display: block; }
  .doc-badge {
    font-size: .68rem; font-weight: 700;
    padding: 2px 8px; border-radius: 99px;
    background: var(--peg-light); color: var(--peg-accent);
    flex-shrink: 0;
  }
  .doc-upload-item.has-file .doc-badge {
    background: #DCFCE7; color: var(--peg-success);
  }
  .btn-doc-upload {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    background: var(--peg-accent); color: #fff;
    border: none; border-radius: 8px;
    font-family: inherit; font-size: .78rem; font-weight: 600;
    cursor: pointer; transition: background .2s; flex-shrink: 0;
  }
  .btn-doc-upload:hover { background: var(--peg-blue); }

  /* download auth letter */
  .auth-download-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .78rem; color: var(--peg-accent); font-weight: 600;
    text-decoration: none; margin-top: 10px;
  }
  .auth-download-link:hover { text-decoration: underline; }

  /* ── CONSENT CHECKBOXES ───────────────────── */
  .consent-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px;
    border: 1.5px solid var(--peg-border);
    border-radius: 12px; background: #FAFCFF;
    margin-bottom: 10px;
    cursor: pointer; transition: border-color .2s;
  }
  .consent-item:hover { border-color: var(--peg-sky); }
  .consent-item.checked { border-color: var(--peg-accent); background: #EEF6FF; }
  .consent-cb {
    width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px;
    border: 2px solid var(--peg-border);
    border-radius: 5px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s; cursor: pointer;
  }
  .consent-item.checked .consent-cb {
    background: var(--peg-accent); border-color: var(--peg-accent); color: #fff;
  }
  .consent-text { font-size: .82rem; color: var(--peg-navy); line-height: 1.5; }
  .consent-text a { color: var(--peg-accent); font-weight: 600; }
  input.peg-cb { display: none; }

  /* ── SECURITY BADGE ───────────────────────── */
  .security-note {
    display: flex; align-items: center; gap: 8px;
    font-size: .74rem; color: var(--peg-muted);
    margin-top: 10px;
  }
  .security-note i { color: var(--peg-success); }

  /* ── NAVIGATION BUTTONS ───────────────────── */
  .step-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 28px; gap: 12px;
  }
  .btn-peg {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-family: inherit; font-size: .9rem; font-weight: 700;
    cursor: pointer; border: none; transition: all .25s;
  }
  .btn-peg-primary {
    background: linear-gradient(135deg, var(--peg-accent), var(--peg-sky));
    color: #fff;
    box-shadow: 0 6px 20px rgba(30,111,217,.30);
  }
  .btn-peg-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(30,111,217,.40);
  }
  .btn-peg-outline {
    background: transparent;
    color: var(--peg-accent);
    border: 2px solid var(--peg-accent);
  }
  .btn-peg-outline:hover { background: var(--peg-light); }
  .btn-peg-full { width: 100%; justify-content: center; }

  /* ── SIGNIN LINK ──────────────────────────── */
  .signin-link {
    text-align: center; margin-top: 18px;
    font-size: .84rem; color: var(--peg-muted);
  }
  .signin-link a { color: var(--peg-accent); font-weight: 700; }

  /* ── ALERTS ───────────────────────────────── */
  .peg-alert {
    padding: 12px 16px; border-radius: 10px;
    font-size: .82rem; margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
  }
  .peg-alert-danger { background: #FEF2F2; color: #B91C1C; border: 1px solid #FCA5A5; }
  .peg-alert-success{ background: #F0FDF4; color: #166534; border: 1px solid #86EFAC; }

  @media(max-width:560px) {
    .reg-body { padding: 22px 20px 24px; }
    .reg-header { padding: 24px 20px 20px; }
    .form-row { flex-direction: column; gap: 0; }
    .step-label { display: none; }
    .btn-peg { padding: 11px 18px; font-size: .84rem; }
  }