/**
 * SA Admission Manager - Public Form Styles
 * Dark Navy Card with Gold Accents Design
 *
 * Color Palette:
 *   Navy Dark   : #0a1628
 *   Navy Medium : #1b2a4a
 *   Navy Light  : #243656
 *   Card BG     : #142138
 *   Field BG    : #1c2b47
 *   Gold        : #d4a843
 *   Gold Hover  : #c4982f
 *   White       : #ffffff
 *   Light Gray  : #8b95a8
 */

/* ==========================================================================
 * WRAPPER
 * ========================================================================== */
.sam-form-wrapper {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: linear-gradient(135deg, #0a1628 0%, #12203a 50%, #0a1628 100%);
  padding: 80px 20px 60px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.sam-form-wrapper *,
.sam-form-wrapper *::before,
.sam-form-wrapper *::after {
  box-sizing: border-box;
}

/* Decorative gold sparkles */
.sam-form-wrapper::before,
.sam-form-wrapper::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #d4a843;
  border-radius: 50%;
  box-shadow:
    80px 60px 0 -1px #d4a843,
    160px 120px 0 -2px #d4a843,
    240px 40px 0 -1px #d4a843,
    320px 180px 0 -2px #d4a843,
    400px 80px 0 -1px #d4a843,
    480px 160px 0 -2px #d4a843,
    560px 60px 0 -1px #d4a843,
    640px 200px 0 -2px #d4a843,
    720px 100px 0 -1px #d4a843,
    800px 40px 0 -2px #d4a843,
    880px 220px 0 -1px #d4a843,
    960px 80px 0 -2px #d4a843;
  opacity: 0.5;
  pointer-events: none;
}

.sam-form-wrapper::before {
  top: 8%;
  left: 3%;
}

.sam-form-wrapper::after {
  bottom: 10%;
  right: 3%;
  transform: scale(0.7);
}

/* ==========================================================================
 * CONTAINER
 * ========================================================================== */
.sam-form-container {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
 * GRADUATION ICON BADGE (top center)
 * ========================================================================== */
.sam-form-icon-badge {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 3;
  margin-bottom: -30px;
}

.sam-form-icon-circle {
  width: 60px;
  height: 60px;
  background: #142138;
  border: 2px solid #d4a843;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 4px rgba(20, 33, 56, 1),
    0 0 20px rgba(212, 168, 67, 0.4);
}

/* ==========================================================================
 * FORM CARD
 * ========================================================================== */
.sam-form-card {
  background: linear-gradient(180deg, #142138 0%, #0f1a2e 100%);
  border-radius: 16px;
  padding: 50px 34px 30px;
  position: relative;
  border: 1px solid rgba(212, 168, 67, 0.35);
  box-shadow:
    0 0 0 1px rgba(212, 168, 67, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(212, 168, 67, 0.08);
  width: 60vw !important;
  margin: auto !important;
}

/* Gold glow effect around the card */
.sam-form-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 67, 0.4),
    transparent 40%,
    transparent 60%,
    rgba(212, 168, 67, 0.4)
  );
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
 * FORM HEADER
 * ========================================================================== */
.sam-form-header {
  text-align: center;
  margin-bottom: 24px;
}

.sam-form-title {
  color: #ffffff !important;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.sam-form-title-accent {
  color: #d4a843 !important;
}

.sam-form-subtitle {
  color: #8b95a8 !important;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  padding: 0 12px;
}

/* ==========================================================================
 * FORM MESSAGES
 * ========================================================================== */
.sam-form-message {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sam-form-message.sam-msg-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-left: 3px solid #22c55e;
}

.sam-form-message.sam-msg-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-left: 3px solid #ef4444;
}

.sam-form-message.sam-msg-info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-left: 3px solid #3b82f6;
}

/* ==========================================================================
 * FORM GROUPS
 * ========================================================================== */
.sam-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sam-form-group {
  position: relative;
  margin: 0;
}

/* ==========================================================================
 * INPUT WRAPPER + ICON
 * ========================================================================== */
.sam-input-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.sam-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #d4a843;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  width: 18px;
  height: 18px;
}

.sam-input-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sam-input-wrapper-textarea {
  display: block;
  width: 100%;
}

.sam-input-icon-textarea {
  top: 16px;
  transform: none;
}

/* ==========================================================================
 * INPUT FIELDS — BASE
 * ========================================================================== */
.sam-field {
  width: 100%;
  padding: 13px 16px;
  background: #1c2b47;
  border: 1px solid #2d3d5c;
  border-radius: 10px;
  font-size: 14px;
  color: #ffffff !important;
  font-family: inherit;
  outline: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
}

/* Fields WITH left icon — extra left padding to leave room */
.sam-field-with-icon {
  padding-left: 46px !important;
}

/* Textarea with icon needs top padding too */
textarea.sam-field-with-icon {
  padding-left: 46px !important;
  padding-top: 13px !important;
}

.sam-field::placeholder {
  color: #8b95a8;
  opacity: 1;
}

.sam-field::-webkit-input-placeholder {
  color: #8b95a8;
  opacity: 1;
}
.sam-field::-moz-placeholder {
  color: #8b95a8;
  opacity: 1;
}
.sam-field:-ms-input-placeholder {
  color: #8b95a8;
  opacity: 1;
}
.sam-field::-ms-input-placeholder {
  color: #8b95a8;
  opacity: 1;
}

/* Hover state — keep dark background and white text */
.sam-field:hover {
  background: #22314f !important;
  border-color: #3d4d6c !important;
  color: #ffffff !important;
}

/* Focus state — keep dark background, white text, gold border */
.sam-field:focus,
.sam-field:focus-visible {
  background: #22314f !important;
  border-color: #d4a843 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
  outline: none;
}

/* Active state */
.sam-field:active {
  background: #22314f !important;
  color: #ffffff !important;
}

/* Invalid state */
.sam-field.sam-field-invalid {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  color: #ffffff !important;
}

.sam-field.sam-field-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  color: #ffffff !important;
}

.sam-textarea {
  min-height: 90px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* ==========================================================================
 * BROWSER AUTOFILL FIX
 * When Chrome/Safari/Firefox autofills the form, they override the
 * background and text colors. These rules force the dark theme to persist.
 * ========================================================================== */

/* Chrome / Safari / Edge autofill */
.sam-field:-webkit-autofill,
.sam-field:-webkit-autofill:hover,
.sam-field:-webkit-autofill:focus,
.sam-field:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #1c2b47 inset !important;
  box-shadow: 0 0 0 1000px #1c2b47 inset !important;
  caret-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
  border: 1px solid #2d3d5c !important;
}

.sam-field:-webkit-autofill:focus {
  -webkit-box-shadow:
    0 0 0 1000px #22314f inset,
    0 0 0 3px rgba(212, 168, 67, 0.15) !important;
  box-shadow:
    0 0 0 1000px #22314f inset,
    0 0 0 3px rgba(212, 168, 67, 0.15) !important;
  border: 1px solid #d4a843 !important;
}

.sam-field:-webkit-autofill:hover {
  -webkit-box-shadow: 0 0 0 1000px #22314f inset !important;
  box-shadow: 0 0 0 1000px #22314f inset !important;
  border: 1px solid #3d4d6c !important;
}

/* Firefox autofill */
.sam-field:-moz-autofill,
.sam-field:-moz-autofill-preview {
  background-color: #1c2b47 !important;
  color: #ffffff !important;
  -moz-text-fill-color: #ffffff !important;
  filter: none;
}

/* Selection color (when user highlights text) */
.sam-field::selection {
  background: rgba(212, 168, 67, 0.3);
  color: #ffffff;
}

.sam-field::-moz-selection {
  background: rgba(212, 168, 67, 0.3);
  color: #ffffff;
}

/* Force text color for all input types (extra defense) */
.sam-form input.sam-field[type='text'],
.sam-form input.sam-field[type='email'],
.sam-form input.sam-field[type='tel'],
.sam-form input.sam-field[type='number'],
.sam-form input.sam-field[type='url'],
.sam-form input.sam-field[type='password'],
.sam-form input.sam-field[type='search'],
.sam-form input.sam-field[type='date'],
.sam-form textarea.sam-field,
.sam-form select.sam-field {
  color: #ffffff !important;
  background-color: #1c2b47;
}

.sam-form input.sam-field[type='text']:hover,
.sam-form input.sam-field[type='email']:hover,
.sam-form input.sam-field[type='tel']:hover,
.sam-form input.sam-field[type='number']:hover,
.sam-form input.sam-field[type='url']:hover,
.sam-form input.sam-field[type='password']:hover,
.sam-form input.sam-field[type='search']:hover,
.sam-form input.sam-field[type='date']:hover,
.sam-form textarea.sam-field:hover {
  color: #ffffff !important;
  background-color: #22314f !important;
}

.sam-form input.sam-field[type='text']:focus,
.sam-form input.sam-field[type='email']:focus,
.sam-form input.sam-field[type='tel']:focus,
.sam-form input.sam-field[type='number']:focus,
.sam-form input.sam-field[type='url']:focus,
.sam-form input.sam-field[type='password']:focus,
.sam-form input.sam-field[type='search']:focus,
.sam-form input.sam-field[type='date']:focus,
.sam-form textarea.sam-field:focus {
  color: #ffffff !important;
  background-color: #22314f !important;
}

/* Preserve icon padding on all states (very important!) */
.sam-form input.sam-field-with-icon,
.sam-form input.sam-field-with-icon:hover,
.sam-form input.sam-field-with-icon:focus,
.sam-form input.sam-field-with-icon:active {
  padding-left: 46px !important;
}

.sam-form textarea.sam-field-with-icon,
.sam-form textarea.sam-field-with-icon:hover,
.sam-form textarea.sam-field-with-icon:focus,
.sam-form textarea.sam-field-with-icon:active {
  padding-left: 46px !important;
  padding-top: 13px !important;
}

/* ==========================================================================
 * SELECT (Course Dropdown)
 * ========================================================================== */
.sam-course-select {
  padding-right: 42px !important;
  cursor: pointer;
  background-image: none;
  color: #ffffff !important;
}

.sam-course-select:hover,
.sam-course-select:focus {
  color: #ffffff !important;
}

/* Course select also needs the left padding for its icon */
.sam-course-select.sam-field-with-icon {
  padding-left: 46px !important;
  padding-right: 42px !important;
}

.sam-select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b95a8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.sam-course-select option {
  color: #0a1628;
  background: #ffffff;
  padding: 8px;
}

.sam-course-select option:disabled {
  color: #9ca3af;
}

/* Fix arrow color when field is focused */
.sam-field:focus + .sam-select-arrow,
.sam-input-wrapper:hover .sam-select-arrow {
  color: #d4a843;
}

/* ==========================================================================
 * FIELD ERRORS
 * ========================================================================== */
.sam-field-error {
  display: none;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  padding-left: 4px;
}

.sam-field-error.sam-error-visible {
  display: block;
}

/* ==========================================================================
 * CHECKBOX (Custom styled)
 * ========================================================================== */
.sam-checkbox-group {
  margin-top: 2px;
  margin-bottom: 4px;
}

.sam-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  color: #b0b8c8;
  line-height: 1.5;
  user-select: none;
}

.sam-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.sam-checkbox-box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid #3d4d6c;
  border-radius: 4px;
  background: #1c2b47;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-top: 2px;
  position: relative;
}

.sam-checkbox-box::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid #0a1628;
  border-bottom: 2px solid #0a1628;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.sam-checkbox:checked + .sam-checkbox-box {
  background: #d4a843;
  border-color: #d4a843;
}

.sam-checkbox:checked + .sam-checkbox-box::after {
  opacity: 1;
}

.sam-checkbox:focus + .sam-checkbox-box {
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.25);
}

.sam-checkbox-text a {
  color: #d4a843;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.sam-checkbox-text a:hover {
  color: #e5b856;
  text-decoration: underline;
}

/* ==========================================================================
 * NEXT BATCH NOTICE
 * ========================================================================== */
.sam-next-batch-notice {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-left: 3px solid #d4a843;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 8px;
  animation: sam-slide-down 0.25s ease-out;
}

.sam-next-batch-notice.sam-notice-visible {
  display: flex;
}

.sam-next-batch-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.sam-next-batch-content {
  flex: 1;
  min-width: 0;
}

.sam-next-batch-title {
  display: block;
  color: #d4a843;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 3px;
}

.sam-next-batch-text {
  color: #b0b8c8;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.sam-next-batch-text strong {
  color: #ffffff;
  font-weight: 600;
}

@keyframes sam-slide-down {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
 * SUBMIT BUTTON
 * ========================================================================== */
.sam-submit-group {
  margin-top: 6px;
}

.sam-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #d4a843 0%, #c4982f 100%);
  color: #0a1628 !important;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  letter-spacing: 0.2px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(212, 168, 67, 0.35);
}

.sam-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #e5b856 0%, #d4a843 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 168, 67, 0.45);
  color: #0a1628 !important;
}

.sam-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.sam-submit-btn:disabled,
.sam-submit-btn.sam-loading {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.sam-submit-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10, 22, 40, 0.3);
  border-top-color: #0a1628;
  border-radius: 50%;
  animation: sam-spin 0.7s linear infinite;
}

.sam-submit-btn.sam-loading .sam-submit-loader {
  display: inline-block;
}

.sam-submit-btn.sam-loading .sam-submit-text {
  opacity: 0.9;
}

@keyframes sam-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
 * SECURITY FOOTER MESSAGE
 * ========================================================================== */
.sam-form-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  color: #8b95a8;
  font-size: 11.5px;
  line-height: 1.4;
}

.sam-form-security-note svg {
  flex-shrink: 0;
}

/* ==========================================================================
 * SUCCESS PAGE
 * ========================================================================== */
.sam-success-wrapper {
  padding: 80px 20px;
}

.sam-success-card {
  text-align: center;
  padding: 50px 40px;
  background: linear-gradient(180deg, #142138 0%, #0f1a2e 100%);
  border: 1px solid rgba(212, 168, 67, 0.35);
}

.sam-success-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.sam-success-icon {
  width: 80px;
  height: 80px;
  background: rgba(34, 197, 94, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: sam-scale-in 0.4s ease-out;
}

.sam-success-icon svg {
  width: 60px;
  height: 60px;
}

@keyframes sam-scale-in {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sam-success-title {
  color: #ffffff !important;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 14px 0;
}

.sam-success-message {
  color: #b0b8c8 !important;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 28px 0;
}

.sam-success-message strong {
  color: #d4a843;
}

.sam-success-info {
  background: rgba(28, 43, 71, 0.6);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin: 0 0 28px 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sam-success-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sam-success-info-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.sam-success-info-item strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 3px;
}

.sam-success-info-item p {
  margin: 0;
  color: #8b95a8;
  font-size: 13px;
  line-height: 1.5;
}

.sam-success-actions {
  display: flex;
  justify-content: center;
}

.sam-btn-back {
  width: auto !important;
  min-width: 200px;
  display: inline-flex !important;
}

/* ==========================================================================
 * RESPONSIVE
 * ========================================================================== */
@media (max-width: 640px) {
  .sam-form-wrapper {
    padding: 60px 16px 40px;
  }

  .sam-form-card {
    padding: 40px 22px 26px;
    border-radius: 14px;
  }

  .sam-form-title {
    font-size: 22px;
  }

  .sam-form-subtitle {
    font-size: 12.5px;
    padding: 0;
  }

  .sam-field {
    padding: 12px 14px;
    font-size: 14px;
  }

  .sam-field-with-icon {
    padding-left: 44px !important;
  }

  textarea.sam-field-with-icon {
    padding-left: 44px !important;
  }

  .sam-course-select.sam-field-with-icon {
    padding-left: 44px !important;
  }

  .sam-input-icon {
    left: 14px;
  }

  .sam-submit-btn {
    padding: 13px 20px;
    font-size: 14px;
  }

  .sam-success-card {
    padding: 40px 24px;
  }

  .sam-success-title {
    font-size: 20px;
  }

  .sam-success-message {
    font-size: 14px;
  }

  .sam-success-info {
    padding: 16px;
  }
}

@media (max-width: 380px) {
  .sam-form-wrapper {
    padding: 50px 12px 30px;
  }

  .sam-form-card {
    padding: 36px 18px 24px;
  }

  .sam-form-title {
    font-size: 20px;
  }

  .sam-checkbox-text {
    font-size: 12px;
  }
}

/* ==========================================================================
 * ACCESSIBILITY
 * ========================================================================== */
.sam-field:focus-visible,
.sam-submit-btn:focus-visible,
.sam-checkbox:focus-visible + .sam-checkbox-box {
  outline: 2px solid #d4a843;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .sam-form-wrapper::before,
  .sam-form-wrapper::after,
  .sam-next-batch-notice,
  .sam-success-icon,
  .sam-submit-loader,
  .sam-form-card::before {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
 * PRINT
 * ========================================================================== */
@media print {
  .sam-form-wrapper {
    background: #ffffff !important;
    padding: 20px 0;
  }
  .sam-form-wrapper::before,
  .sam-form-wrapper::after,
  .sam-submit-btn,
  .sam-form-icon-badge {
    display: none !important;
  }
  .sam-form-card {
    background: #ffffff !important;
    color: #0a1628 !important;
    border: 1px solid #e5e7eb;
  }
  .sam-form-title,
  .sam-form-subtitle,
  .sam-field {
    color: #0a1628 !important;
  }
}
#/**
 * SA Admission Manager - Public Form Styles
 * Dark Navy Card with Gold Accents Design
 *
 * Color Palette:
 *   Navy Dark   : #0a1628
 *   Navy Medium : #1b2a4a
 *   Navy Light  : #243656
 *   Card BG     : #142138
 *   Field BG    : #1c2b47
 *   Gold        : #d4a843
 *   Gold Hover  : #c4982f
 *   White       : #ffffff
 *   Light Gray  : #8b95a8
 */

/* ==========================================================================
 * WRAPPER
 * ========================================================================== */
.sam-form-wrapper {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: linear-gradient(135deg, #0a1628 0%, #12203a 50%, #0a1628 100%);
  padding: 80px 20px 60px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.sam-form-wrapper *,
.sam-form-wrapper *::before,
.sam-form-wrapper *::after {
  box-sizing: border-box;
}

/* Decorative gold sparkles */
.sam-form-wrapper::before,
.sam-form-wrapper::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #d4a843;
  border-radius: 50%;
  box-shadow:
    80px 60px 0 -1px #d4a843,
    160px 120px 0 -2px #d4a843,
    240px 40px 0 -1px #d4a843,
    320px 180px 0 -2px #d4a843,
    400px 80px 0 -1px #d4a843,
    480px 160px 0 -2px #d4a843,
    560px 60px 0 -1px #d4a843,
    640px 200px 0 -2px #d4a843,
    720px 100px 0 -1px #d4a843,
    800px 40px 0 -2px #d4a843,
    880px 220px 0 -1px #d4a843,
    960px 80px 0 -2px #d4a843;
  opacity: 0.5;
  pointer-events: none;
}

.sam-form-wrapper::before {
  top: 8%;
  left: 3%;
}

.sam-form-wrapper::after {
  bottom: 10%;
  right: 3%;
  transform: scale(0.7);
}

/* ==========================================================================
 * CONTAINER
 * ========================================================================== */
.sam-form-container {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
 * GRADUATION ICON BADGE (top center)
 * ========================================================================== */
.sam-form-icon-badge {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 3;
  margin: auto;
  margin-bottom: -30px;
  width: 60vw !important;
}

.sam-form-icon-circle {
  width: 60px;
  height: 60px;
  background: #142138;
  border: 2px solid #d4a843;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 4px rgba(20, 33, 56, 1),
    0 0 20px rgba(212, 168, 67, 0.4);
}

/* ==========================================================================
 * FORM CARD
 * ========================================================================== */
.sam-form-card {
  background: linear-gradient(180deg, #142138 0%, #0f1a2e 100%);
  border-radius: 16px;
  padding: 50px 34px 30px;
  position: relative;
  border: 1px solid rgba(212, 168, 67, 0.35);
  box-shadow:
    0 0 0 1px rgba(212, 168, 67, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(212, 168, 67, 0.08);
}

/* Gold glow effect around the card */
.sam-form-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 67, 0.4),
    transparent 40%,
    transparent 60%,
    rgba(212, 168, 67, 0.4)
  );
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
 * FORM HEADER
 * ========================================================================== */
.sam-form-header {
  text-align: center;
  margin-bottom: 24px;
}

.sam-form-title {
  color: #ffffff !important;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.sam-form-title-accent {
  color: #d4a843 !important;
}

.sam-form-subtitle {
  color: #8b95a8 !important;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  padding: 0 12px;
}

/* ==========================================================================
 * FORM MESSAGES
 * ========================================================================== */
.sam-form-message {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sam-form-message.sam-msg-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-left: 3px solid #22c55e;
}

.sam-form-message.sam-msg-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-left: 3px solid #ef4444;
}

.sam-form-message.sam-msg-info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-left: 3px solid #3b82f6;
}

/* ==========================================================================
 * FORM GROUPS
 * ========================================================================== */
.sam-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sam-form-group {
  position: relative;
  margin: 0;
}

/* ==========================================================================
 * INPUT WRAPPER + ICON
 * ========================================================================== */
.sam-input-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.sam-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #d4a843;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  width: 18px;
  height: 18px;
}

.sam-input-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sam-input-wrapper-textarea {
  display: block;
  width: 100%;
}

.sam-input-icon-textarea {
  top: 16px;
  transform: none;
}

/* ==========================================================================
 * INPUT FIELDS — BASE
 * ========================================================================== */
.sam-field {
  width: 100%;
  padding: 13px 16px;
  background: #1c2b47;
  border: 1px solid #2d3d5c;
  border-radius: 10px;
  font-size: 14px;
  color: #ffffff !important;
  font-family: inherit;
  outline: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
}

/* Fields WITH left icon — extra left padding to leave room */
.sam-field-with-icon {
  padding-left: 46px !important;
}

/* Textarea with icon needs top padding too */
textarea.sam-field-with-icon {
  padding-left: 46px !important;
  padding-top: 13px !important;
}

.sam-field::placeholder {
  color: #8b95a8;
  opacity: 1;
}

.sam-field::-webkit-input-placeholder {
  color: #8b95a8;
  opacity: 1;
}
.sam-field::-moz-placeholder {
  color: #8b95a8;
  opacity: 1;
}
.sam-field:-ms-input-placeholder {
  color: #8b95a8;
  opacity: 1;
}
.sam-field::-ms-input-placeholder {
  color: #8b95a8;
  opacity: 1;
}

/* Hover state — keep dark background and white text */
.sam-field:hover {
  background: #22314f !important;
  border-color: #3d4d6c !important;
  color: #ffffff !important;
}

/* Focus state — keep dark background, white text, gold border */
.sam-field:focus,
.sam-field:focus-visible {
  background: #22314f !important;
  border-color: #d4a843 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
  outline: none;
}

/* Active state */
.sam-field:active {
  background: #22314f !important;
  color: #ffffff !important;
}

/* Invalid state */
.sam-field.sam-field-invalid {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  color: #ffffff !important;
}

.sam-field.sam-field-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  color: #ffffff !important;
}

.sam-textarea {
  min-height: 90px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* ==========================================================================
 * BROWSER AUTOFILL FIX
 * When Chrome/Safari/Firefox autofills the form, they override the
 * background and text colors. These rules force the dark theme to persist.
 * ========================================================================== */

/* Chrome / Safari / Edge autofill */
.sam-field:-webkit-autofill,
.sam-field:-webkit-autofill:hover,
.sam-field:-webkit-autofill:focus,
.sam-field:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #1c2b47 inset !important;
  box-shadow: 0 0 0 1000px #1c2b47 inset !important;
  caret-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
  border: 1px solid #2d3d5c !important;
}

.sam-field:-webkit-autofill:focus {
  -webkit-box-shadow:
    0 0 0 1000px #22314f inset,
    0 0 0 3px rgba(212, 168, 67, 0.15) !important;
  box-shadow:
    0 0 0 1000px #22314f inset,
    0 0 0 3px rgba(212, 168, 67, 0.15) !important;
  border: 1px solid #d4a843 !important;
}

.sam-field:-webkit-autofill:hover {
  -webkit-box-shadow: 0 0 0 1000px #22314f inset !important;
  box-shadow: 0 0 0 1000px #22314f inset !important;
  border: 1px solid #3d4d6c !important;
}

/* Firefox autofill */
.sam-field:-moz-autofill,
.sam-field:-moz-autofill-preview {
  background-color: #1c2b47 !important;
  color: #ffffff !important;
  -moz-text-fill-color: #ffffff !important;
  filter: none;
}

/* Selection color (when user highlights text) */
.sam-field::selection {
  background: rgba(212, 168, 67, 0.3);
  color: #ffffff;
}

.sam-field::-moz-selection {
  background: rgba(212, 168, 67, 0.3);
  color: #ffffff;
}

/* Force text color for all input types (extra defense) */
.sam-form input.sam-field[type='text'],
.sam-form input.sam-field[type='email'],
.sam-form input.sam-field[type='tel'],
.sam-form input.sam-field[type='number'],
.sam-form input.sam-field[type='url'],
.sam-form input.sam-field[type='password'],
.sam-form input.sam-field[type='search'],
.sam-form input.sam-field[type='date'],
.sam-form textarea.sam-field,
.sam-form select.sam-field {
  color: #ffffff !important;
  background-color: #1c2b47;
}

.sam-form input.sam-field[type='text']:hover,
.sam-form input.sam-field[type='email']:hover,
.sam-form input.sam-field[type='tel']:hover,
.sam-form input.sam-field[type='number']:hover,
.sam-form input.sam-field[type='url']:hover,
.sam-form input.sam-field[type='password']:hover,
.sam-form input.sam-field[type='search']:hover,
.sam-form input.sam-field[type='date']:hover,
.sam-form textarea.sam-field:hover {
  color: #ffffff !important;
  background-color: #22314f !important;
}

.sam-form input.sam-field[type='text']:focus,
.sam-form input.sam-field[type='email']:focus,
.sam-form input.sam-field[type='tel']:focus,
.sam-form input.sam-field[type='number']:focus,
.sam-form input.sam-field[type='url']:focus,
.sam-form input.sam-field[type='password']:focus,
.sam-form input.sam-field[type='search']:focus,
.sam-form input.sam-field[type='date']:focus,
.sam-form textarea.sam-field:focus {
  color: #ffffff !important;
  background-color: #22314f !important;
}

/* Preserve icon padding on all states (very important!) */
.sam-form input.sam-field-with-icon,
.sam-form input.sam-field-with-icon:hover,
.sam-form input.sam-field-with-icon:focus,
.sam-form input.sam-field-with-icon:active {
  padding-left: 46px !important;
}

.sam-form textarea.sam-field-with-icon,
.sam-form textarea.sam-field-with-icon:hover,
.sam-form textarea.sam-field-with-icon:focus,
.sam-form textarea.sam-field-with-icon:active {
  padding-left: 46px !important;
  padding-top: 13px !important;
}

/* ==========================================================================
 * SELECT (Course Dropdown)
 * ========================================================================== */
.sam-course-select {
  padding-right: 42px !important;
  cursor: pointer;
  background-image: none;
  color: #ffffff !important;
}

.sam-course-select:hover,
.sam-course-select:focus {
  color: #ffffff !important;
}

/* Course select also needs the left padding for its icon */
.sam-course-select.sam-field-with-icon {
  padding-left: 46px !important;
  padding-right: 42px !important;
}

.sam-select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b95a8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.sam-course-select option {
  color: #0a1628;
  background: #ffffff;
  padding: 8px;
}

.sam-course-select option:disabled {
  color: #9ca3af;
}

/* Fix arrow color when field is focused */
.sam-field:focus + .sam-select-arrow,
.sam-input-wrapper:hover .sam-select-arrow {
  color: #d4a843;
}

/* ==========================================================================
 * FIELD ERRORS
 * ========================================================================== */
.sam-field-error {
  display: none;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  padding-left: 4px;
}

.sam-field-error.sam-error-visible {
  display: block;
}

/* ==========================================================================
 * CHECKBOX (Custom styled)
 * ========================================================================== */
.sam-checkbox-group {
  margin-top: 2px;
  margin-bottom: 4px;
}

.sam-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  color: #b0b8c8;
  line-height: 1.5;
  user-select: none;
}

.sam-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.sam-checkbox-box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid #3d4d6c;
  border-radius: 4px;
  background: #1c2b47;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-top: 2px;
  position: relative;
}

.sam-checkbox-box::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid #0a1628;
  border-bottom: 2px solid #0a1628;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.sam-checkbox:checked + .sam-checkbox-box {
  background: #d4a843;
  border-color: #d4a843;
}

.sam-checkbox:checked + .sam-checkbox-box::after {
  opacity: 1;
}

.sam-checkbox:focus + .sam-checkbox-box {
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.25);
}

.sam-checkbox-text a {
  color: #d4a843;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.sam-checkbox-text a:hover {
  color: #e5b856;
  text-decoration: underline;
}

/* ==========================================================================
 * NEXT BATCH NOTICE
 * ========================================================================== */
.sam-next-batch-notice {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-left: 3px solid #d4a843;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 8px;
  animation: sam-slide-down 0.25s ease-out;
}

.sam-next-batch-notice.sam-notice-visible {
  display: flex;
}

.sam-next-batch-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.sam-next-batch-content {
  flex: 1;
  min-width: 0;
}

.sam-next-batch-title {
  display: block;
  color: #d4a843;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 3px;
}

.sam-next-batch-text {
  color: #b0b8c8;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.sam-next-batch-text strong {
  color: #ffffff;
  font-weight: 600;
}

@keyframes sam-slide-down {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
 * SUBMIT BUTTON
 * ========================================================================== */
.sam-submit-group {
  margin-top: 6px;
}

.sam-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #d4a843 0%, #c4982f 100%);
  color: #0a1628 !important;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  letter-spacing: 0.2px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(212, 168, 67, 0.35);
}

.sam-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #e5b856 0%, #d4a843 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 168, 67, 0.45);
  color: #0a1628 !important;
}

.sam-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.sam-submit-btn:disabled,
.sam-submit-btn.sam-loading {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.sam-submit-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10, 22, 40, 0.3);
  border-top-color: #0a1628;
  border-radius: 50%;
  animation: sam-spin 0.7s linear infinite;
}

.sam-submit-btn.sam-loading .sam-submit-loader {
  display: inline-block;
}

.sam-submit-btn.sam-loading .sam-submit-text {
  opacity: 0.9;
}

@keyframes sam-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
 * SECURITY FOOTER MESSAGE
 * ========================================================================== */
.sam-form-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  color: #8b95a8;
  font-size: 11.5px;
  line-height: 1.4;
}

.sam-form-security-note svg {
  flex-shrink: 0;
}

/* ==========================================================================
 * SUCCESS PAGE
 * ========================================================================== */
.sam-success-wrapper {
  padding: 80px 20px;
}

.sam-success-card {
  text-align: center;
  padding: 50px 40px;
  background: linear-gradient(180deg, #142138 0%, #0f1a2e 100%);
  border: 1px solid rgba(212, 168, 67, 0.35);
}

.sam-success-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.sam-success-icon {
  width: 80px;
  height: 80px;
  background: rgba(34, 197, 94, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: sam-scale-in 0.4s ease-out;
}

.sam-success-icon svg {
  width: 60px;
  height: 60px;
}

@keyframes sam-scale-in {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sam-success-title {
  color: #ffffff !important;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 14px 0;
}

.sam-success-message {
  color: #b0b8c8 !important;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 28px 0;
}

.sam-success-message strong {
  color: #d4a843;
}

.sam-success-info {
  background: rgba(28, 43, 71, 0.6);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin: 0 0 28px 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sam-success-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sam-success-info-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.sam-success-info-item strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 3px;
}

.sam-success-info-item p {
  margin: 0;
  color: #8b95a8;
  font-size: 13px;
  line-height: 1.5;
}

.sam-success-actions {
  display: flex;
  justify-content: center;
}

.sam-btn-back {
  width: auto !important;
  min-width: 200px;
  display: inline-flex !important;
}

/* ==========================================================================
 * RESPONSIVE
 * ========================================================================== */
@media (max-width: 640px) {
  .sam-form-wrapper {
    padding: 60px 16px 40px;
  }

  .sam-form-card {
    padding: 40px 22px 26px;
    border-radius: 14px;
  }

  .sam-form-title {
    font-size: 22px;
  }

  .sam-form-subtitle {
    font-size: 12.5px;
    padding: 0;
  }

  .sam-field {
    padding: 12px 14px;
    font-size: 14px;
  }

  .sam-field-with-icon {
    padding-left: 44px !important;
  }

  textarea.sam-field-with-icon {
    padding-left: 44px !important;
  }

  .sam-course-select.sam-field-with-icon {
    padding-left: 44px !important;
  }

  .sam-input-icon {
    left: 14px;
  }

  .sam-submit-btn {
    padding: 13px 20px;
    font-size: 14px;
  }

  .sam-success-card {
    padding: 40px 24px;
  }

  .sam-success-title {
    font-size: 20px;
  }

  .sam-success-message {
    font-size: 14px;
  }

  .sam-success-info {
    padding: 16px;
  }
}

@media (max-width: 380px) {
  .sam-form-wrapper {
    padding: 50px 12px 30px;
  }

  .sam-form-card {
    padding: 36px 18px 24px;
  }

  .sam-form-title {
    font-size: 20px;
  }

  .sam-checkbox-text {
    font-size: 12px;
  }
}

/* ==========================================================================
 * ACCESSIBILITY
 * ========================================================================== */
.sam-field:focus-visible,
.sam-submit-btn:focus-visible,
.sam-checkbox:focus-visible + .sam-checkbox-box {
  outline: 2px solid #d4a843;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .sam-form-wrapper::before,
  .sam-form-wrapper::after,
  .sam-next-batch-notice,
  .sam-success-icon,
  .sam-submit-loader,
  .sam-form-card::before {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
 * PRINT
 * ========================================================================== */
@media print {
  .sam-form-wrapper {
    background: #ffffff !important;
    padding: 20px 0;
  }
  .sam-form-wrapper::before,
  .sam-form-wrapper::after,
  .sam-submit-btn,
  .sam-form-icon-badge {
    display: none !important;
  }
  .sam-form-card {
    background: #ffffff !important;
    color: #0a1628 !important;
    border: 1px solid #e5e7eb;
  }
  .sam-form-title,
  .sam-form-subtitle,
  .sam-field {
    color: #0a1628 !important;
  }
}
#/**
 * SA Admission Manager - Public Form Styles
 * Dark Navy Card with Gold Accents Design
 *
 * Color Palette:
 *   Navy Dark   : #0a1628
 *   Navy Medium : #1b2a4a
 *   Navy Light  : #243656
 *   Card BG     : #142138
 *   Field BG    : #1c2b47
 *   Gold        : #d4a843
 *   Gold Hover  : #c4982f
 *   White       : #ffffff
 *   Light Gray  : #8b95a8
 */

/* ==========================================================================
 * WRAPPER
 * ========================================================================== */
.sam-form-wrapper {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: linear-gradient(135deg, #0a1628 0%, #12203a 50%, #0a1628 100%);
  padding: 80px 20px 60px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.sam-form-wrapper *,
.sam-form-wrapper *::before,
.sam-form-wrapper *::after {
  box-sizing: border-box;
}

/* Decorative gold sparkles */
.sam-form-wrapper::before,
.sam-form-wrapper::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #d4a843;
  border-radius: 50%;
  box-shadow:
    80px 60px 0 -1px #d4a843,
    160px 120px 0 -2px #d4a843,
    240px 40px 0 -1px #d4a843,
    320px 180px 0 -2px #d4a843,
    400px 80px 0 -1px #d4a843,
    480px 160px 0 -2px #d4a843,
    560px 60px 0 -1px #d4a843,
    640px 200px 0 -2px #d4a843,
    720px 100px 0 -1px #d4a843,
    800px 40px 0 -2px #d4a843,
    880px 220px 0 -1px #d4a843,
    960px 80px 0 -2px #d4a843;
  opacity: 0.5;
  pointer-events: none;
}

.sam-form-wrapper::before {
  top: 8%;
  left: 3%;
}

.sam-form-wrapper::after {
  bottom: 10%;
  right: 3%;
  transform: scale(0.7);
}

/* ==========================================================================
 * CONTAINER
 * ========================================================================== */
.sam-form-container {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
 * GRADUATION ICON BADGE (top center)
 * ========================================================================== */
.sam-form-icon-badge {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 3;
  margin-bottom: -30px;
}

.sam-form-icon-circle {
  width: 60px;
  height: 60px;
  background: #142138;
  border: 2px solid #d4a843;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 4px rgba(20, 33, 56, 1),
    0 0 20px rgba(212, 168, 67, 0.4);
}

/* ==========================================================================
 * FORM CARD
 * ========================================================================== */
.sam-form-card {
  background: linear-gradient(180deg, #142138 0%, #0f1a2e 100%);
  border-radius: 16px;
  padding: 50px 34px 30px;
  position: relative;
  border: 1px solid rgba(212, 168, 67, 0.35);
  box-shadow:
    0 0 0 1px rgba(212, 168, 67, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(212, 168, 67, 0.08);
}

/* Gold glow effect around the card */
.sam-form-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 67, 0.4),
    transparent 40%,
    transparent 60%,
    rgba(212, 168, 67, 0.4)
  );
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
 * FORM HEADER
 * ========================================================================== */
.sam-form-header {
  text-align: center;
  margin-bottom: 24px;
}

.sam-form-title {
  color: #ffffff !important;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.sam-form-title-accent {
  color: #d4a843 !important;
}

.sam-form-subtitle {
  color: #8b95a8 !important;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  padding: 0 12px;
}

/* ==========================================================================
 * FORM MESSAGES
 * ========================================================================== */
.sam-form-message {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sam-form-message.sam-msg-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-left: 3px solid #22c55e;
}

.sam-form-message.sam-msg-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-left: 3px solid #ef4444;
}

.sam-form-message.sam-msg-info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-left: 3px solid #3b82f6;
}

/* ==========================================================================
 * FORM GROUPS
 * ========================================================================== */
.sam-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sam-form-group {
  position: relative;
  margin: 0;
}

/* ==========================================================================
 * INPUT WRAPPER + ICON
 * ========================================================================== */
.sam-input-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.sam-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #d4a843;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  width: 18px;
  height: 18px;
}

.sam-input-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sam-input-wrapper-textarea {
  display: block;
  width: 100%;
}

.sam-input-icon-textarea {
  top: 16px;
  transform: none;
}

/* ==========================================================================
 * INPUT FIELDS — BASE
 * ========================================================================== */
.sam-field {
  width: 100%;
  padding: 13px 16px;
  background: #1c2b47;
  border: 1px solid #2d3d5c;
  border-radius: 10px;
  font-size: 14px;
  color: #ffffff !important;
  font-family: inherit;
  outline: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
}

/* Fields WITH left icon — extra left padding to leave room */
.sam-field-with-icon {
  padding-left: 46px !important;
}

/* Textarea with icon needs top padding too */
textarea.sam-field-with-icon {
  padding-left: 46px !important;
  padding-top: 13px !important;
}

.sam-field::placeholder {
  color: #8b95a8;
  opacity: 1;
}

.sam-field::-webkit-input-placeholder {
  color: #8b95a8;
  opacity: 1;
}
.sam-field::-moz-placeholder {
  color: #8b95a8;
  opacity: 1;
}
.sam-field:-ms-input-placeholder {
  color: #8b95a8;
  opacity: 1;
}
.sam-field::-ms-input-placeholder {
  color: #8b95a8;
  opacity: 1;
}

/* Hover state — keep dark background and white text */
.sam-field:hover {
  background: #22314f !important;
  border-color: #3d4d6c !important;
  color: #ffffff !important;
}

/* Focus state — keep dark background, white text, gold border */
.sam-field:focus,
.sam-field:focus-visible {
  background: #22314f !important;
  border-color: #d4a843 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
  outline: none;
}

/* Active state */
.sam-field:active {
  background: #22314f !important;
  color: #ffffff !important;
}

/* Invalid state */
.sam-field.sam-field-invalid {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  color: #ffffff !important;
}

.sam-field.sam-field-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  color: #ffffff !important;
}

.sam-textarea {
  min-height: 90px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* ==========================================================================
 * BROWSER AUTOFILL FIX
 * When Chrome/Safari/Firefox autofills the form, they override the
 * background and text colors. These rules force the dark theme to persist.
 * ========================================================================== */

/* Chrome / Safari / Edge autofill */
.sam-field:-webkit-autofill,
.sam-field:-webkit-autofill:hover,
.sam-field:-webkit-autofill:focus,
.sam-field:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #1c2b47 inset !important;
  box-shadow: 0 0 0 1000px #1c2b47 inset !important;
  caret-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
  border: 1px solid #2d3d5c !important;
}

.sam-field:-webkit-autofill:focus {
  -webkit-box-shadow:
    0 0 0 1000px #22314f inset,
    0 0 0 3px rgba(212, 168, 67, 0.15) !important;
  box-shadow:
    0 0 0 1000px #22314f inset,
    0 0 0 3px rgba(212, 168, 67, 0.15) !important;
  border: 1px solid #d4a843 !important;
}

.sam-field:-webkit-autofill:hover {
  -webkit-box-shadow: 0 0 0 1000px #22314f inset !important;
  box-shadow: 0 0 0 1000px #22314f inset !important;
  border: 1px solid #3d4d6c !important;
}

/* Firefox autofill */
.sam-field:-moz-autofill,
.sam-field:-moz-autofill-preview {
  background-color: #1c2b47 !important;
  color: #ffffff !important;
  -moz-text-fill-color: #ffffff !important;
  filter: none;
}

/* Selection color (when user highlights text) */
.sam-field::selection {
  background: rgba(212, 168, 67, 0.3);
  color: #ffffff;
}

.sam-field::-moz-selection {
  background: rgba(212, 168, 67, 0.3);
  color: #ffffff;
}

/* Force text color for all input types (extra defense) */
.sam-form input.sam-field[type='text'],
.sam-form input.sam-field[type='email'],
.sam-form input.sam-field[type='tel'],
.sam-form input.sam-field[type='number'],
.sam-form input.sam-field[type='url'],
.sam-form input.sam-field[type='password'],
.sam-form input.sam-field[type='search'],
.sam-form input.sam-field[type='date'],
.sam-form textarea.sam-field,
.sam-form select.sam-field {
  color: #ffffff !important;
  background-color: #1c2b47;
}

.sam-form input.sam-field[type='text']:hover,
.sam-form input.sam-field[type='email']:hover,
.sam-form input.sam-field[type='tel']:hover,
.sam-form input.sam-field[type='number']:hover,
.sam-form input.sam-field[type='url']:hover,
.sam-form input.sam-field[type='password']:hover,
.sam-form input.sam-field[type='search']:hover,
.sam-form input.sam-field[type='date']:hover,
.sam-form textarea.sam-field:hover {
  color: #ffffff !important;
  background-color: #22314f !important;
}

.sam-form input.sam-field[type='text']:focus,
.sam-form input.sam-field[type='email']:focus,
.sam-form input.sam-field[type='tel']:focus,
.sam-form input.sam-field[type='number']:focus,
.sam-form input.sam-field[type='url']:focus,
.sam-form input.sam-field[type='password']:focus,
.sam-form input.sam-field[type='search']:focus,
.sam-form input.sam-field[type='date']:focus,
.sam-form textarea.sam-field:focus {
  color: #ffffff !important;
  background-color: #22314f !important;
}

/* Preserve icon padding on all states (very important!) */
.sam-form input.sam-field-with-icon,
.sam-form input.sam-field-with-icon:hover,
.sam-form input.sam-field-with-icon:focus,
.sam-form input.sam-field-with-icon:active {
  padding-left: 46px !important;
}

.sam-form textarea.sam-field-with-icon,
.sam-form textarea.sam-field-with-icon:hover,
.sam-form textarea.sam-field-with-icon:focus,
.sam-form textarea.sam-field-with-icon:active {
  padding-left: 46px !important;
  padding-top: 13px !important;
}

/* ==========================================================================
 * SELECT (Course Dropdown)
 * ========================================================================== */
.sam-course-select {
  padding-right: 42px !important;
  cursor: pointer;
  background-image: none;
  color: #ffffff !important;
}

.sam-course-select:hover,
.sam-course-select:focus {
  color: #ffffff !important;
}

/* Course select also needs the left padding for its icon */
.sam-course-select.sam-field-with-icon {
  padding-left: 46px !important;
  padding-right: 42px !important;
}

.sam-select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b95a8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.sam-course-select option {
  color: #0a1628;
  background: #ffffff;
  padding: 8px;
}

.sam-course-select option:disabled {
  color: #9ca3af;
}

/* Fix arrow color when field is focused */
.sam-field:focus + .sam-select-arrow,
.sam-input-wrapper:hover .sam-select-arrow {
  color: #d4a843;
}

/* ==========================================================================
 * FIELD ERRORS
 * ========================================================================== */
.sam-field-error {
  display: none;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  padding-left: 4px;
}

.sam-field-error.sam-error-visible {
  display: block;
}

/* ==========================================================================
 * CHECKBOX (Custom styled)
 * ========================================================================== */
.sam-checkbox-group {
  margin-top: 2px;
  margin-bottom: 4px;
}

.sam-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  color: #b0b8c8;
  line-height: 1.5;
  user-select: none;
}

.sam-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.sam-checkbox-box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid #3d4d6c;
  border-radius: 4px;
  background: #1c2b47;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-top: 2px;
  position: relative;
}

.sam-checkbox-box::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid #0a1628;
  border-bottom: 2px solid #0a1628;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.sam-checkbox:checked + .sam-checkbox-box {
  background: #d4a843;
  border-color: #d4a843;
}

.sam-checkbox:checked + .sam-checkbox-box::after {
  opacity: 1;
}

.sam-checkbox:focus + .sam-checkbox-box {
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.25);
}

.sam-checkbox-text a {
  color: #d4a843;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.sam-checkbox-text a:hover {
  color: #e5b856;
  text-decoration: underline;
}

/* ==========================================================================
 * NEXT BATCH NOTICE
 * ========================================================================== */
.sam-next-batch-notice {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-left: 3px solid #d4a843;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 8px;
  animation: sam-slide-down 0.25s ease-out;
}

.sam-next-batch-notice.sam-notice-visible {
  display: flex;
}

.sam-next-batch-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.sam-next-batch-content {
  flex: 1;
  min-width: 0;
}

.sam-next-batch-title {
  display: block;
  color: #d4a843;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 3px;
}

.sam-next-batch-text {
  color: #b0b8c8;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.sam-next-batch-text strong {
  color: #ffffff;
  font-weight: 600;
}

@keyframes sam-slide-down {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
 * SUBMIT BUTTON
 * ========================================================================== */
.sam-submit-group {
  margin-top: 6px;
}

.sam-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #d4a843 0%, #c4982f 100%);
  color: #0a1628 !important;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  letter-spacing: 0.2px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(212, 168, 67, 0.35);
}

.sam-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #e5b856 0%, #d4a843 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 168, 67, 0.45);
  color: #0a1628 !important;
}

.sam-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.sam-submit-btn:disabled,
.sam-submit-btn.sam-loading {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.sam-submit-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10, 22, 40, 0.3);
  border-top-color: #0a1628;
  border-radius: 50%;
  animation: sam-spin 0.7s linear infinite;
}

.sam-submit-btn.sam-loading .sam-submit-loader {
  display: inline-block;
}

.sam-submit-btn.sam-loading .sam-submit-text {
  opacity: 0.9;
}

@keyframes sam-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
 * SECURITY FOOTER MESSAGE
 * ========================================================================== */
.sam-form-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  color: #8b95a8;
  font-size: 11.5px;
  line-height: 1.4;
}

.sam-form-security-note svg {
  flex-shrink: 0;
}

/* ==========================================================================
 * SUCCESS PAGE
 * ========================================================================== */
.sam-success-wrapper {
  padding: 80px 20px;
}

.sam-success-card {
  text-align: center;
  padding: 50px 40px;
  background: linear-gradient(180deg, #142138 0%, #0f1a2e 100%);
  border: 1px solid rgba(212, 168, 67, 0.35);
}

.sam-success-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.sam-success-icon {
  width: 80px;
  height: 80px;
  background: rgba(34, 197, 94, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: sam-scale-in 0.4s ease-out;
}

.sam-success-icon svg {
  width: 60px;
  height: 60px;
}

@keyframes sam-scale-in {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sam-success-title {
  color: #ffffff !important;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 14px 0;
}

.sam-success-message {
  color: #b0b8c8 !important;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 28px 0;
}

.sam-success-message strong {
  color: #d4a843;
}

.sam-success-info {
  background: rgba(28, 43, 71, 0.6);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin: 0 0 28px 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sam-success-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sam-success-info-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.sam-success-info-item strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 3px;
}

.sam-success-info-item p {
  margin: 0;
  color: #8b95a8;
  font-size: 13px;
  line-height: 1.5;
}

.sam-success-actions {
  display: flex;
  justify-content: center;
}

.sam-btn-back {
  width: auto !important;
  min-width: 200px;
  display: inline-flex !important;
}

/* ==========================================================================
 * RESPONSIVE
 * ========================================================================== */
@media (max-width: 640px) {
  .sam-form-wrapper {
    padding: 60px 16px 40px;
  }

  .sam-form-card {
    padding: 40px 22px 26px;
    border-radius: 14px;
  }

  .sam-form-title {
    font-size: 22px;
  }

  .sam-form-subtitle {
    font-size: 12.5px;
    padding: 0;
  }

  .sam-field {
    padding: 12px 14px;
    font-size: 14px;
  }

  .sam-field-with-icon {
    padding-left: 44px !important;
  }

  textarea.sam-field-with-icon {
    padding-left: 44px !important;
  }

  .sam-course-select.sam-field-with-icon {
    padding-left: 44px !important;
  }

  .sam-input-icon {
    left: 14px;
  }

  .sam-submit-btn {
    padding: 13px 20px;
    font-size: 14px;
  }

  .sam-success-card {
    padding: 40px 24px;
  }

  .sam-success-title {
    font-size: 20px;
  }

  .sam-success-message {
    font-size: 14px;
  }

  .sam-success-info {
    padding: 16px;
  }
}

@media (max-width: 380px) {
  .sam-form-wrapper {
    padding: 50px 12px 30px;
  }

  .sam-form-card {
    padding: 36px 18px 24px;
  }

  .sam-form-title {
    font-size: 20px;
  }

  .sam-checkbox-text {
    font-size: 12px;
  }
}

/* ==========================================================================
 * ACCESSIBILITY
 * ========================================================================== */
.sam-field:focus-visible,
.sam-submit-btn:focus-visible,
.sam-checkbox:focus-visible + .sam-checkbox-box {
  outline: 2px solid #d4a843;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .sam-form-wrapper::before,
  .sam-form-wrapper::after,
  .sam-next-batch-notice,
  .sam-success-icon,
  .sam-submit-loader,
  .sam-form-card::before {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
 * PRINT
 * ========================================================================== */
@media print {
  .sam-form-wrapper {
    background: #ffffff !important;
    padding: 20px 0;
  }
  .sam-form-wrapper::before,
  .sam-form-wrapper::after,
  .sam-submit-btn,
  .sam-form-icon-badge {
    display: none !important;
  }
  .sam-form-card {
    background: #ffffff !important;
    color: #0a1628 !important;
    border: 1px solid #e5e7eb;
  }
  .sam-form-title,
  .sam-form-subtitle,
  .sam-field {
    color: #0a1628 !important;
  }
}
.sam-field {
  border-radius: 10px !important;
  border: none !important;
}

@media (max-width: 480px) {
  .sam-form-card {
    width: 90vw !important;
  }
}
