/* ============================================================
   auth.css — MergerDomo Login & Register Pages
   Design system: matches buyer.css / investor.css exactly
   (same tokens, radii, shadows, button classes, Roboto font)
   ============================================================ */

:root {
  --md-blue: #2d6cdf;
  --md-blue-dark: #1a4fad;
  --md-blue-light: #eef4ff;
  --md-blue-mid: #b8d0f8;
  --md-navy: #0d1b4c;
  --md-yellow: #ffc107;
  --md-yellow-dark: #e6ac00;
  --md-gray-50: #f8fafc;
  --md-gray-100: #f1f5f9;
  --md-gray-200: #e2e8f0;
  --md-gray-400: #94a3b8;
  --md-gray-500: #64748b;
  --md-gray-600: #6b7280;
  --md-gray-800: #1e293b;
  --md-text: #111827;
  --md-equity: #534AB7;
  --md-equity-bg: #EEEDFE;
  --md-debt: #185FA5;
  --md-green: #1D9E75;
  --md-green-bg: #E8F5E9;
  --md-danger: #d6432f;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-card: 0 2px 12px rgba(0,0,0,.07);
  --shadow-card-lg: 0 8px 28px rgba(0,0,0,.09);
  --shadow-blue: 0 4px 20px rgba(45,108,223,.18);
  --transition: 0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; }
a { text-decoration: none !important; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--md-gray-50);
  font-family: 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--md-text);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Header, top promo bar, and primary nav now live in nav.css */
/* Footer now lives in footer.css */


/* ---------- Buttons (matches btn-primary / btn-outline / btn-cta-primary) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease;
  white-space: nowrap;
  border: none;
  text-decoration: none !important;
}
.btn-primary {
  background: var(--md-blue) !important;
  color: #fff !important;
  padding: 13px 24px;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(45,108,223,.14);
}
.btn-primary:hover { background: var(--md-blue-dark) !important; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(45,108,223,.18); }
.btn-primary:disabled { background: var(--md-gray-400) !important; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline {
  background: transparent !important;
  color: var(--md-navy) !important;
  border: 1.5px solid var(--md-gray-200) !important;
  padding: 13px 24px;
  font-size: 14.5px;
}
.btn-outline:hover { border-color: var(--md-blue) !important; color: var(--md-blue) !important; background: var(--md-blue-light) !important; }

.btn-header-ghost {
  background: transparent !important;
  color: #fff !important;
  border: 1.5px solid rgba(255,255,255,.3) !important;
  padding: 9px 20px;
  font-size: 14px;
}
.btn-header-ghost:hover { background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.6) !important; }

.btn-cta-primary {
  background: var(--md-yellow) !important;
  color: var(--md-navy) !important;
  padding: 14px 26px;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(255,193,7,.3);
  width: 100%;
}
.btn-cta-primary:hover { background: var(--md-yellow-dark) !important; transform: translateY(-1px); }

.btn-block { width: 100%; padding: 14px 24px; font-size: 15px; }
.btn-arrow { display: inline-block; transition: transform var(--transition); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Section label (pill, matches site-wide) ---------- */
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--md-blue);
  background: var(--md-blue-light);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- Page shell ---------- */
.md-shell { padding: 48px 0 88px; }

.md-split {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card-lg);
  overflow: hidden;
  border: 1px solid var(--md-gray-200);
  align-items: stretch;
}
.md-split .md-side-panel { order: 1; }
.md-split .md-form-panel { order: 2; }

/* ---------- Left form panel ---------- */
.md-form-panel {
  padding: 52px 52px;
}

.md-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: var(--md-navy);
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.md-subtitle {
  font-size: 15px;
  color: var(--md-gray-600);
  margin: 0 0 32px;
  line-height: 1.6;
  max-width: 480px;
}

/* ---------- Form elements ---------- */
.md-field { margin-bottom: 20px; }
.md-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--md-navy);
  margin-bottom: 7px;
}
.md-label .req { color: var(--md-danger); }
.md-label .opt { color: var(--md-gray-500); font-weight: 400; }

.md-input,
.md-select,
.md-textarea {
  width: 100%;
  font-family: 'Roboto', sans-serif;
  font-size: 14.5px;
  color: var(--md-text);
  background: #fff;
  border: 1.5px solid var(--md-gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.md-input::placeholder, .md-textarea::placeholder { color: var(--md-gray-400); }
.md-input:hover, .md-select:hover, .md-textarea:hover { border-color: var(--md-blue-mid); }
.md-input:focus, .md-select:focus, .md-textarea:focus {
  border-color: var(--md-blue);
  box-shadow: 0 0 0 3px rgba(45,108,223,.15);
}
.md-textarea { resize: vertical; min-height: 96px; font-family: 'Roboto', sans-serif; }

/* Custom select / dropdown */
.md-select-wrap { position: relative; }
.md-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background: #fff;
}
.md-select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--md-blue);
  border-bottom: 2px solid var(--md-blue);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.md-select:disabled { background: var(--md-gray-100); color: var(--md-gray-400); cursor: not-allowed; }

/* ---------- Custom tag multi-select (industry pickers, max N) ---------- */
.md-multiselect { position: relative; }
.md-multiselect__control {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  font-family: 'Roboto', sans-serif;
  font-size: 14.5px;
  color: var(--md-text);
  background: #fff;
  border: 1.5px solid var(--md-gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.md-multiselect__control:hover { border-color: var(--md-blue-mid); }
.md-multiselect.is-open .md-multiselect__control {
  border-color: var(--md-blue);
  box-shadow: 0 0 0 3px rgba(45,108,223,.15);
}
.md-multiselect__control > i { flex-shrink: 0; color: var(--md-gray-500); font-size: 12px; margin-top: 3px; transition: transform var(--transition); }
.md-multiselect.is-open .md-multiselect__control > i { transform: rotate(180deg); }
.md-multiselect__placeholder { color: var(--md-gray-400); }
.md-multiselect__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.md-multiselect__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--md-blue-light);
  color: var(--md-blue-dark);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  line-height: 1.4;
}
.md-multiselect__tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(45,108,223,.16);
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
}
.md-multiselect__tag-remove:hover { background: rgba(45,108,223,.3); }

.md-multiselect__panel {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid var(--md-gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-lg);
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}
.md-multiselect.is-open .md-multiselect__panel { display: block; }
.md-multiselect__search {
  width: 100%;
  font-family: 'Roboto', sans-serif;
  font-size: 13.5px;
  border: 1.5px solid var(--md-gray-200);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 6px;
  outline: none;
}
.md-multiselect__search:focus { border-color: var(--md-blue); }
.md-multiselect__option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--md-text);
  border-radius: 6px;
  cursor: pointer;
}
.md-multiselect__option:hover { background: var(--md-blue-light); }
.md-multiselect__option input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--md-blue); flex-shrink: 0; pointer-events: none; }
.md-multiselect__option.is-disabled { opacity: .4; cursor: not-allowed; }
.md-multiselect__option.is-disabled:hover { background: transparent; }
.md-multiselect__empty { padding: 10px; font-size: 13px; color: var(--md-gray-500); text-align: center; }
.md-multiselect__limit-note { padding: 4px 10px 8px; font-size: 11.5px; color: var(--md-gray-500); }

/* Password field with show/hide toggle */
.md-input-group { position: relative; }
.md-input-group .md-input { padding-right: 44px; }
.md-toggle-visibility {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--md-gray-500);
  font-size: 13px;
  padding: 4px;
  line-height: 1;
}
.md-toggle-visibility:hover { color: var(--md-blue); }

.md-hint { font-size: 12.5px; color: var(--md-gray-500); margin-top: 6px; }
.md-error { font-size: 12.5px; color: var(--md-danger); margin-top: 6px; display: none; }
.md-field.has-error .md-input,
.md-field.has-error .md-select { border-color: var(--md-danger); }
.md-field.has-error .md-error { display: block; }

.md-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Phone input with country code */
.md-phone-group {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
}

/* Radio / pill button groups */
.md-pill-group { display: flex; flex-wrap: wrap; gap: 10px; }
.md-pill { position: relative; }
.md-pill input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.md-pill label {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--md-navy);
  background: #fff;
  border: 1.5px solid var(--md-gray-200);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}
.md-pill input:hover + label { border-color: var(--md-blue); }
.md-pill input:checked + label { background: var(--md-blue); border-color: var(--md-blue); color: #fff; }
.md-pill input:focus-visible + label { box-shadow: 0 0 0 3px rgba(45,108,223,.18); }

/* Checkbox list (investor type, etc.) */
.md-check-list { display: flex; flex-direction: column; gap: 10px; }
.md-check-list label { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--md-text); cursor: pointer; font-weight: 400; }
.md-check-list input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--md-blue); cursor: pointer; }

/* Divider */
.md-divider { border: none; border-top: 1px dashed var(--md-gray-200); margin: 0px 0px 15px 0px; }

/* Checkbox row (terms) */
.md-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 26px;
  font-size: 13px;
  color: var(--md-gray-600);
}
.md-check-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--md-blue); flex-shrink: 0; }
.md-check-row a { color: var(--md-blue) !important; text-decoration: underline !important; }

.md-foot-link { text-align: center; font-size: 14px; color: var(--md-gray-600); margin-top: 8px; }
.md-foot-link a { color: var(--md-blue) !important; font-weight: 700; }

/* OTP box */
.md-otp-row { display: flex; gap: 10px; margin-bottom: 18px; }
.md-otp-box {
  width: 48px; height: 54px; text-align: center; font-size: 20px; font-weight: 700;
  border: 1.5px solid var(--md-gray-200); border-radius: var(--radius-sm); color: var(--md-navy);
}
.md-otp-box:focus { border-color: var(--md-blue); outline: none; box-shadow: 0 0 0 3px rgba(45,108,223,.15); }
.md-otp-resend { font-size: 13px; color: var(--md-gray-600); }
.md-otp-resend a { color: var(--md-blue) !important; font-weight: 700; }

/* ---------- Left sidebar panel (navy) — matches real .da-trust-panel pattern ---------- */
.md-side-panel {
  background: var(--md-navy);
  color: #fff;
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.md-side-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(255,193,7,.08), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(45,108,223,.12), transparent 45%);
  pointer-events: none;
}
.md-side-panel > * { position: relative; z-index: 1; }
.md-side-panel .md-step-list-label {
  margin-top: 18px;
}
.md-side-panel .md-step-list {
  margin-top: 0;
}
.md-side-panel .md-trust-list { margin-bottom: 0; }

.md-side-support {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.md-side-support i {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--md-yellow);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.md-side-support div { display: flex; flex-direction: column; gap: 3px; }
.md-side-support strong { font-size: 13px; color: #fff; font-weight: 700; }
.md-side-support span { font-size: 12px; color: rgba(255,255,255,.6); }
.md-side-support a { color: var(--md-yellow) !important; font-weight: 600; }

/* ---------- Live activity widget ---------- */
.md-live-activity {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.md-live-activity__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 12px;
}
.md-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52,211,153,.6);
  animation: md-live-pulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
@keyframes md-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.md-live-activity__card {
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  height: 56px;
  overflow: hidden;
}
.md-live-activity__icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,193,7,.14);
  color: var(--md-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.md-live-activity__text {
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255,255,255,.85);
  opacity: 0;
  transform: translateY(6px);
  animation: md-live-fade 5s ease-in-out infinite;
}
.md-live-activity__text strong { color: #fff; font-weight: 700; }
@keyframes md-live-fade {
  0%   { opacity: 0; transform: translateY(6px); }
  8%   { opacity: 1; transform: translateY(0); }
  28%  { opacity: 1; transform: translateY(0); }
  36%  { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 0; transform: translateY(-6px); }
}

.md-side-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255,193,7,.14);
  color: var(--md-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 18px;
}

.md-side-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--md-yellow);
  margin: 0 0 12px;
  line-height: 1.3;
}

.md-side-body {
  font-size: 13.5px;
  color: rgba(255,255,255,.7);
  line-height: 1.65;
  margin: 0 0 22px;
}

/* Stat row — compact, three-up */
.md-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.md-stat-row div { text-align: left; }
.md-stat-row strong { display: block; font-size: 17px; font-weight: 800; color: #fff; line-height: 1.15; }
.md-stat-row span { display: block; font-size: 10.5px; color: rgba(255,255,255,.55); margin-top: 2px; }

/* Feature checklist — matches real .da-trust-list exactly */
.md-trust-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.md-trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: rgba(255,255,255,.82);
  line-height: 1.5;
}
.md-trust-list li i {
  color: var(--md-green);
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Step list — same visual language as trust list, numbered instead of ticked */
.md-step-list-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--md-yellow);
  margin: 18px 0 13px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.md-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.md-step-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(255,255,255,.78);
  line-height: 1.5;
}
.md-step-list .num {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--md-blue);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ---------- Section visibility helper (persona-conditional fields) ---------- */
[data-persona-field] { display: none; }
.persona-buyer-investor [data-persona-field~="buyer-investor"],
.persona-seller [data-persona-field~="seller"],
.persona-fund-raiser [data-persona-field~="fund-raiser"],
.persona-investment-banker [data-persona-field~="investment-banker"] {
  display: block;
}
.persona-buyer-investor .md-row-2[data-persona-field~="buyer-investor"],
.persona-seller .md-row-2[data-persona-field~="seller"],
.persona-fund-raiser .md-row-2[data-persona-field~="fund-raiser"],
.persona-investment-banker .md-row-2[data-persona-field~="investment-banker"] {
  display: grid;
}

/* Footer styles now live in footer.css */

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .md-split {
    grid-template-columns: 1fr;
    border-radius: var(--radius-lg);
  }
  .md-split .md-side-panel { order: 1; }
  .md-split .md-form-panel { order: 2; }

  .md-side-panel { padding: 26px 22px; }
  .md-stat-row { margin-bottom: 18px; padding-bottom: 16px; }
  .md-step-list, .md-step-list-label, .md-side-support, .md-live-activity { display: none; }

  .md-form-panel { padding: 32px 26px; }
  .md-row-2 { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
}

@media (max-width: 640px) {
  .md-side-icon { width: 38px; height: 38px; font-size: 16px; margin-bottom: 14px; }
  .md-side-title { font-size: 17px; }
  .md-side-body { font-size: 12.5px; margin-bottom: 16px; }
  .md-trust-list li { font-size: 12px; }
}

@media (max-width: 480px) {
  .md-shell { padding: 18px 0 48px; }
  .md-form-panel { padding: 22px 16px; }
  .md-side-panel { padding: 20px 16px; }
  .md-title { font-size: 22px; }
  .md-subtitle { font-size: 13.5px; }
  .md-otp-box { width: 40px; height: 48px; font-size: 17px; }
  .md-header-inner { padding: 0 16px; }
  .md-topbar { font-size: 11.5px; padding: 8px 12px; line-height: 1.5; }
  .md-stat-row { grid-template-columns: repeat(3, 1fr); }
  .container { padding: 0 14px; }
}