  /* ---------- DESIGN SYSTEM ---------- */
  :root {
    /* Colors */
    --bg-page: #F0F2FF;
    --surface: #F2F7FA;
    --surface-footer: #E9E9F2;
    --text-primary: #0a2540;
    --text-secondary: #5c6f87;
    --text-muted: #8b9ab0;
    --border-light: #e9edf2;
    --border-focus: #3b82f6;
    --accent: #e53e3e;
    --accent-dark: #c53030;
    --accent-soft: #fee2e2;
    --success: #10b981;
    --success-soft: #def7ec;
    --error: #e53e3e;
    --error-soft: #fee2e2;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    color: var(--text-primary);
    line-height: 1.5;
  }

  /* ---------- PAGE CONTAINER ---------- */
  .portal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
  }

  /* ---------- HEADER SECTION ---------- */
  .page-header {
      margin-bottom: 2.5rem;
      text-align: center;
      position: relative;
      padding-bottom: 1rem;
  }

  .page-header::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 70px;
      height: 3px;
      background: linear-gradient(90deg, var(--accent), #f9a8a8, var(--accent));
      border-radius: 3px;
  }


  .page-title {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0a2540 0%, #1e3a5f 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
  }

  .page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
  }

  /* ---------- FORM CARD (modern glassmorphism touch) ---------- */
  .form-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid #CFCFCF;
  }

  .form-card:hover {
    box-shadow: var(--shadow-lg);
  }

  .form-card-head {
      padding: 1.25rem 2rem;
      background: #F20516;
      border-bottom: 1px solid var(--border-light);
      display: flex;
      align-items: center;
      justify-content: space-between; /* changed from default flex-start */
      gap: 1rem;
      position: relative;
  }

  .form-card-head > div:last-child {
      flex: 1;
      text-align: center; /* center the entire block */
    }

  .form-card-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-soft);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent);
  }

  .form-card-title {
    font-weight: 700;
    font-size: 1.8rem;
    color: #FFFF;
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  }

  .form-card-subtitle {
    font-size: 0.85rem;
    color: #FFFF;
    margin-top: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  }

  /* ---------- FORM STRUCTURE ---------- */
  .form-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .field-label {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .required-star {
    color: var(--accent);
    font-size: 0.9rem;
    margin-left: 2px;
  }

  .field-input-single,
  .field-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-family: 'Inter', monospace;
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    color: var(--text-primary);
    outline: none;
    resize: vertical;
  }

  .field-input,
  .field-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-family: 'Inter', monospace;
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    color: var(--text-primary);
    outline: none;
    resize: vertical;
    min-height: 6rem;
  }

  .field-input-single:focus,
  .field-input:focus,
  .field-textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }

  .field-input.error,
  .field-textarea.error {
    border-color: var(--error);
    background-color: #fff8f8;
  }

  /* error messages */
  .field-errors {
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: var(--error);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-weight: 500;
  }

  .field-errors i {
    margin-right: 0.3rem;
    font-size: 0.7rem;
  }

  /* subtle divider */
  .field-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 0.25rem 0;
  }

  /* ---------- FORM FOOTER ---------- */
  .form-footer {
    padding: 1.25rem 2rem;
    background: var(--surface-footer);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
  }

  /* Buttons */
  .btn-primary {
    background: #39A822;
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }

  .btn-primary i {
    font-size: 1rem;
    transition: transform 0.1s;
  }

  .btn-primary:hover {
    background: #3DBF22;
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(229, 62, 62, 0.25);
  }

  .btn-primary:active {
    transform: translateY(1px);
  }

  .btn-outline {
    background: #EDE83B;
    color: black;
    border: 1.5px solid var(--border-light);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
  }

  .btn-outline:hover {
    background: #FAF53E;
    border-color: #cbd5e1;
    color: black;
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(229, 62, 62, 0.25);
  }

  /* ---------- SUCCESS CARD (animations) ---------- */
  .success-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(16, 185, 129, 0.2);
    animation: fadeSlideUp 0.4s ease-out;
  }

  @keyframes fadeSlideUp {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.8rem;
    color: var(--success);
    animation: checkPop 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
  }

  @keyframes checkPop {
    0% {
      transform: scale(0.5);
      opacity: 0;
    }
    80% {
      transform: scale(1.1);
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }

  .success-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
  }

  .success-text {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 380px;
    margin: 0 auto 2rem;
    background: #f8fafc;
    padding: 1rem 1.2rem;
    border-radius: 60px;
  }

  .btn-back {
    background: var(--text-primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition);
  }

  .btn-back:hover {
    background: #1e2f3f;
    transform: translateX(-3px);
    gap: 0.8rem;
  }

  /* ---------- RESPONSIVE ---------- */
  @media (max-width: 640px) {
    .portal-page {
      padding: 1rem;
    }

    .form-body {
      padding: 1.5rem;
      gap: 1.25rem;
    }

    .form-card-head {
      padding: 1rem 1.5rem;
      font-size: 1.2rem;
    }

    .form-footer {
      flex-direction: column-reverse;
      align-items: stretch;
      padding: 1rem 1.5rem;
    }

    .btn-primary,
    .btn-outline {
      justify-content: center;
      width: 100%;
    }

    .page-title {
      font-size: 1.6rem;
    }

    .success-card {
      padding: 2rem 1.5rem;
    }

    .success-title {
      font-size: 1.5rem;
    }
  }

  /* additional micro-interactions */
  .field-input-single::placeholder,
  .field-textarea::placeholder {
    color: #b9c3d4;
    font-size: 0.85rem;
  }


  .field-input::placeholder,
  .field-textarea::placeholder {
    color: #b9c3d4;
    font-size: 0.85rem;
  }

  textarea {
    line-height: 1.5;
  }