/* ============================================================
   SUPPLIER ACCREDITATION SYSTEM
   Design: Minimal white — clean & modern
   Palette: Navy + light gray
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300..900;1,14..32,300..900&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* ---------- Tokens ---------- */
:root {
  --brand-900: #1e2d40;
  --brand-800: #243447;
  --brand-700: #2d4a6b;
  --brand-600: #3b6795;
  --brand-200: #b8d0e8;
  --brand-100: #ddeaf6;
  --brand-50:  #f0f6fc;

  --gray-950: #0c111b;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;

  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #86efac;
  --error:   #dc2626;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --teal:    #0f766e;
  --teal-bg: #f0fdfa;
  --teal-border: #99f6e4;
  --white: #ffffff;

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-2xl:  20px;
  --r-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-focus-brand: 0 0 0 3px rgba(59,103,149,0.20);

  --ease: cubic-bezier(0.4,0,0.2,1);
  --fast: 120ms;
  --base: 200ms;
  --slow: 320ms;
}

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

html {
  font-size: 15px;
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-800);
  background-color: var(--gray-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

body > .container { flex: 1 0 auto; }

/* ---------- Layout ---------- */
.container {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.form-shell {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

main { padding-top: 40px; }
.form-shell, .submitted-panel { margin-bottom: 56px; }

/* ---------- Form Card ---------- */
.accreditation-form,
.submitted-panel {
  border-radius: var(--r-2xl);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.accreditation-form { padding: 0; }
.submitted-panel { padding: 48px; background: var(--white); }

/* ---------- Form Card Header ---------- */
.form-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 20px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.form-card-header-left { flex: 1; }

.form-header-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 3px;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--brand-900);
  color: var(--white);
  flex-shrink: 0;
}

.form-card-header .form-subtitle {
  color: var(--gray-400);
  font-size: 0.8rem;
  margin: 0;
  padding-left: 42px;
}

/* ---------- Step Indicator ---------- */
.step-indicator {
  display: grid;
  grid-template-columns: 30px minmax(24px, 48px) 30px minmax(24px, 48px) 30px;
  align-items: center;
  flex-shrink: 0;
}

.step {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: var(--r-full);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-400);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all var(--base) var(--ease);
}

.step.active {
  border-color: var(--brand-900);
  background: var(--brand-900);
  color: var(--white);
  box-shadow: 0 0 0 3px rgba(30,45,64,0.12);
  transform: scale(1.06);
}

.step-line {
  height: 1px;
  background: var(--gray-200);
}

/* ---------- Form Card Body ---------- */
.form-card-body { padding: 24px 32px 32px; }

.alert:empty { display: none; margin: 0; padding: 0; }

/* ---------- Progress ---------- */
.form-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 12px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
}

.progress-track {
  flex: 1;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--gray-200);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--brand-900);
  transition: width var(--slow) var(--ease);
}

.form-progress p {
  margin: 0;
  min-width: 76px;
  text-align: right;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.form-progress strong {
  color: var(--brand-700);
  font-weight: 700;
}

/* ---------- Form Sections ---------- */
.form-section {
  padding: 26px 0;
  border-top: 1px solid var(--gray-100);
}

.form-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.section-title span {
  display: inline-grid;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--brand-900);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
}

.section-title h2 {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.section-title p {
  margin: 0;
  font-size: 0.825rem;
  color: var(--gray-500);
}

/* ---------- Form Grid ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.field.full { grid-column: 1 / -1; }

label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: 0.01em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  background: var(--gray-50);
  color: var(--gray-900);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition:
    border-color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease),
    background var(--fast) var(--ease);
  appearance: none;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--gray-300);
  background: var(--white);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-600);
  box-shadow: var(--shadow-focus-brand);
  outline: none;
  background: var(--white);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
  font-size: 0.85rem;
}

/* Remarks / notes textarea — same field language as inputs, but a
   taller box and a more visible border so a multi-line field reads
   clearly as its own control rather than a cramped single-line input. */
textarea {
  min-height: 90px;
  border-width: 1.5px;
  line-height: 1.5;
  resize: vertical;
}

textarea:focus {
  border-width: 1.5px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: var(--gray-50);
  border-color: var(--gray-100);
  color: var(--gray-300);
  cursor: not-allowed;
}

/* ---------- Input with N/A toggle ---------- */
.input-with-na {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-na input[type="tel"],
.input-with-na input[type="text"] {
  flex: 1;
  min-width: 0;
}

/* ---------- Type of Account: "Others" free-text override ---------- */
.type-of-account-other {
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-of-account-other input[type="text"] {
  flex: 1;
  min-width: 0;
}

.btn-linklike {
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 0;
  color: var(--brand-600);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
}

.btn-linklike:hover { color: var(--brand-800); }

/* ---------- Document Section ---------- */
.document-list { display: grid; gap: 10px; }

.document-row {
  padding: 16px 18px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  background: var(--gray-50);
  transition:
    border-color var(--base) var(--ease),
    background var(--base) var(--ease),
    box-shadow var(--base) var(--ease);
}

.document-row:hover {
  border-color: var(--gray-300);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.document-row.is-complete {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.document-row.is-na {
  border-color: var(--gray-200);
  background: var(--gray-100);
  opacity: 0.75;
}

.document-main label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.document-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--gray-400);
}

.file-feedback {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--gray-500);
}

/* ---------- File Row ---------- */
.file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
}

.file-row input[type="file"] {
  flex: 1;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  background: var(--white);
  font-size: 0.8rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease);
}

.file-row input[type="file"]:hover { border-color: var(--gray-300); }

.file-row input[type="file"]::file-selector-button {
  height: 34px;
  padding: 0 12px;
  margin-right: 10px;
  border: 0;
  border-right: 1px solid var(--gray-200);
  border-radius: var(--r-md) 0 0 var(--r-md);
  background: var(--gray-100);
  color: var(--gray-700);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast) var(--ease);
}

.file-row input[type="file"]::file-selector-button:hover { background: var(--gray-200); }
.file-row input[type="file"]:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- N/A Toggle ---------- */
.na-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  height: 36px;
  padding: 0 12px 0 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-full);
  background: var(--white);
  color: var(--gray-500);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  user-select: none;
  white-space: nowrap;
  transition:
    border-color var(--fast) var(--ease),
    background var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.na-check:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.na-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  min-height: 0;
  pointer-events: none;
}

.na-toggle {
  display: inline-block;
  width: 28px;
  height: 16px;
  border-radius: var(--r-full);
  background: var(--gray-200);
  position: relative;
  flex-shrink: 0;
  transition: background var(--base) var(--ease);
}

.na-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: var(--r-full);
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.20);
  transition: transform var(--base) var(--ease);
}

.na-check:has(input:checked) {
  border-color: var(--brand-700);
  background: var(--brand-50);
  color: var(--brand-700);
}

.na-check:has(input:checked) .na-toggle { background: var(--brand-700); }
.na-check:has(input:checked) .na-toggle::after { transform: translateX(12px); }

/* ---------- Document Gate ---------- */
.document-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
}

.document-gate p {
  margin: 0;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--gray-600);
}

/* ---------- Payment Options ---------- */
.payment-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.payment-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  background: var(--gray-50);
  font-size: 0.845rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  margin: 0;
  user-select: none;
  transition:
    border-color var(--fast) var(--ease),
    background var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

.payment-options label:hover:not(:has(input:disabled)) {
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.payment-options label:has(input:checked) {
  border-color: var(--brand-700);
  background: var(--brand-50);
  color: var(--brand-800);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.payment-options label:has(input:disabled:not(:checked)) {
  color: var(--gray-300);
  background: var(--gray-50);
  cursor: not-allowed;
}

.payment-options input[type="radio"] {
  width: 15px;
  min-height: 15px;
  flex-shrink: 0;
  accent-color: var(--brand-700);
  cursor: pointer;
}

.payment-options small {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: var(--r-full);
  background: var(--gray-100);
  color: var(--gray-400);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Payment Panels ---------- */
.payment-section.is-locked,
.payment-actions.is-locked,
.payment-detail-section.is-payment-hidden { display: none; }

.payment-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--teal-bg);
  border: 1px solid var(--teal-border);
  border-radius: var(--r-md);
  font-size: 0.825rem;
}

.payment-note strong { flex-shrink: 0; color: var(--teal); font-weight: 700; }
.payment-note span { color: var(--gray-600); }

/* ---------- Buttons ---------- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 18px;
  border: 0;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 0.845rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease),
    transform var(--fast) var(--ease);
}

.btn-primary {
  background: var(--brand-900);
  color: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-800);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
  color: var(--white);
}

.btn-primary:active { transform: none; }

.btn-primary:disabled {
  background: var(--gray-200);
  color: var(--gray-400);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

/* ---------- Form Actions ---------- */
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-top: 22px;
  border-top: 1px solid var(--gray-100);
  margin-top: 4px;
}

/* ---------- Validation ---------- */
.field-validation-error { display: block; margin-top: 4px; color: var(--error); font-size: 0.78rem; font-weight: 500; }
.validation-summary-errors { display: block; margin-top: 4px; color: var(--error); font-size: 0.8rem; }
.alert:empty, .validation-summary-valid { display: none; }

.alert-danger {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--error-border);
  border-radius: var(--r-md);
  background: var(--error-bg);
  color: var(--error);
  font-size: 0.845rem;
}

/* ---------- Submitted ---------- */
.submitted-panel {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 56px;
}

.submitted-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  background: var(--success-bg);
  border: 1.5px solid var(--success-border);
  color: var(--success);
  margin-bottom: 16px;
}

.submitted-panel .eyebrow {
  color: var(--gray-500);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.submitted-panel h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 8px;
}

.submitted-panel > p {
  color: var(--gray-500);
  margin-bottom: 24px;
}

.submitted-ref {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 28px;
  margin-bottom: 24px;
  background: var(--brand-50);
  border: 1.5px solid var(--brand-200);
  border-radius: var(--r-lg);
}

.submitted-ref-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.submitted-ref-number {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-800);
  letter-spacing: -0.01em;
}

/* ---------- Invalid Link ---------- */
.invalid-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  background: var(--error-bg);
  border: 1.5px solid var(--error-border);
  color: var(--error);
  margin-bottom: 16px;
}

/* ---------- Admin Login ---------- */
.login-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: var(--r-full);
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.login-home-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-900);
  transform: translateY(-1px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background:
    radial-gradient(640px circle at 50% -8%, var(--brand-50), transparent 65%),
    var(--gray-100);
}

/* The login page needs to center vertically in the FULL viewport (minus the
   footer), but .container/main are plain block boxes everywhere else in the
   site (forms, tables, etc. rely on normal top-down flow). Rather than
   changing that globally, this scopes a flex chain to the login page only —
   see ViewData["BodyClass"] in Login.cshtml — so .login-page's own flex:1
   above actually has a real, full-height flex parent to fill. */
body.login-body .container {
  display: flex;
  flex-direction: column;
}

body.login-body main {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 0;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 410px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-2xl);
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 12px 24px -8px rgba(15,23,42,0.10), 0 24px 48px -16px rgba(15,23,42,0.10);
  padding: 40px 36px 32px;
  text-align: center;
  overflow: hidden;
  animation: login-card-in 480ms var(--ease) both;
}

@keyframes login-card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Signature touch — a thin brand gradient rule along the top edge, so the
   card reads as this system's login rather than a generic white card. */
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-900), var(--brand-600));
}

.login-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 22px;
}

.login-logo-img {
  max-width: 240px;
  max-height: 96px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.login-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  background: var(--brand-900);
  color: var(--white);
  margin-bottom: 18px;
  animation: login-icon-pulse 2.6s ease-in-out infinite;
}

@keyframes login-icon-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(30,45,64,0.30); }
  50%      { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(30,45,64,0.10); }
}

.login-brand-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-900);
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}

.login-brand-subtitle {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin: 0 0 28px;
}

.login-form { text-align: left; }

.login-field { margin-bottom: 14px; }

.login-field input {
  min-height: 48px;
  border-radius: var(--r-lg);
  font-size: 0.9rem;
  padding: 12px 16px;
}

.login-password-wrap { position: relative; }

.login-password-wrap input { padding-right: 44px; }

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: var(--r-md);
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.login-password-toggle:hover { color: var(--gray-700); background: var(--gray-100); }

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 16px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  user-select: none;
}

.login-remember-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  min-height: 0;
  pointer-events: none;
}

.login-remember-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r-xs);
  background: var(--white);
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.login-remember:hover .login-remember-box { border-color: var(--gray-400); }

.login-remember:has(.login-remember-input:checked) .login-remember-box {
  background: var(--brand-700);
  border-color: var(--brand-700);
}

.login-remember-box::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform var(--fast) var(--ease);
}

.login-remember:has(.login-remember-input:checked) .login-remember-box::after {
  transform: rotate(45deg) scale(1);
}

.login-remember:has(.login-remember-input:focus-visible) .login-remember-box {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
}

.login-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 6px;
}

.login-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--gray-400);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-or::before,
.login-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.login-submit {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 50px;
  justify-content: center;
  border-radius: var(--r-full);
  font-size: 0.92rem;
  margin-top: 0;
}

.login-submit-label {
  transition: opacity var(--fast) var(--ease);
}

.login-submit.is-loading .login-submit-label { opacity: 0; }

.login-submit.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: var(--r-full);
  animation: login-spin 700ms linear infinite;
}

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

.login-submit:disabled { cursor: not-allowed; }

.login-lock-icon {
  display: inline-block;
  vertical-align: -1px;
  margin-right: 3px;
  color: var(--gray-400);
}

/* ---------- "Welcome back" one-click sign-in (Remember Me) ---------- */
.login-welcome-back {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.login-welcome-text {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: var(--gray-700);
  text-align: center;
}

.login-welcome-text strong {
  color: var(--gray-900);
}

.login-welcome-back .login-form {
  margin: 0;
}

.login-forget-me-form {
  margin: 12px 0 0;
  text-align: center;
}

.login-forget-me-link {
  border: none;
  background: none;
  padding: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-400);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-forget-me-link:hover {
  color: var(--brand-700);
}

.login-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 28px 0 16px;
}

.login-footnote {
  margin: 0;
  font-size: 0.78rem;
  color: var(--gray-400);
}

@media (max-width: 480px) {
  .login-home-btn {
    padding: 7px 14px;
    font-size: 0.78rem;
  }

  /* Tightened, more deliberate rhythm for phones — the desktop card's
     spacing (48px page padding, 22px/28px internal margins) reads as
     stretched/uneven once the card is nearly full-width; scaling each
     gap down keeps the same visual hierarchy in less vertical space. */
  .login-page { padding: 28px 16px; }

  .login-card { padding: 30px 22px 24px; }

  .login-logo-wrap { margin-bottom: 14px; }

  .login-logo-img { max-width: 200px; max-height: 68px; }

  .login-brand-title { font-size: 1.28rem; }

  .login-brand-subtitle { margin-bottom: 20px; }

  .login-field { margin-bottom: 12px; }

  .login-divider { margin: 20px 0 14px; }
}

/* ---------- Footer ---------- */
.footer {
  flex-shrink: 0;
  padding: 16px 0;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-400);
  font-size: 0.78rem;
  text-align: center;
}

/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  main { padding-top: 0; }
  .form-shell, .submitted-panel { margin-bottom: 24px; }

  .accreditation-form {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  }

  .form-card-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }
  .form-card-header-left { width: 100%; }
  .form-card-header .form-subtitle { padding-left: 0; font-size: 0.77rem; }

  .step-indicator {
    grid-template-columns: 30px 1fr 30px 1fr 30px;
    width: 100%;
  }
  .step-line { min-width: 0; }

  .form-card-body { padding: 18px 16px; }
  .form-progress { gap: 10px; padding: 10px 12px; }
  .form-progress p { min-width: 64px; font-size: 0.76rem; }

  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .field.full { grid-column: 1; }

  /* Input with N/A (TIN, Contact Number) — stack on mobile */
  .input-with-na { flex-direction: column; align-items: stretch; gap: 6px; }
  .input-with-na input[type="tel"],
  .input-with-na input[type="text"] { width: 100%; }
  .input-with-na .na-check { width: 100%; justify-content: center; }

  .type-of-account-other { flex-direction: column; align-items: stretch; gap: 6px; }
  .type-of-account-other .btn-linklike { text-align: center; }

  .document-row { padding: 14px 12px; }
  .file-row { flex-wrap: wrap; gap: 8px; }
  .file-row input[type="file"] { min-width: 0; width: 100%; }
  .file-row .na-check { width: 100%; justify-content: center; }

  .document-gate { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
  .document-gate p { font-size: 0.8rem; }
  .document-gate .btn-primary { width: 100%; justify-content: center; min-height: 42px; }

  .payment-options { grid-template-columns: 1fr; gap: 8px; }
  .payment-note { flex-direction: column; gap: 6px; }

  .form-actions { flex-direction: column-reverse; align-items: stretch; gap: 8px; padding-top: 16px; }
  .btn-primary, .btn-secondary { justify-content: center; width: 100%; min-height: 42px; }

  .section-title { gap: 10px; }
  .section-title h2 { font-size: 0.9rem; }
  .section-title p { font-size: 0.78rem; }

  .submitted-panel { padding: 28px 16px; border-radius: var(--r-xl) var(--r-xl) 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
}

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