/* Log in + Register (resources/views/auth/login|register.blade.php)
   Same tokens as the public site (website/style.css). */
:root {
  --ink: #0A1B2E;
  --ink-2: #132a45;
  --ink-soft: #4A5D66;
  --teal: #0E6E66;
  --teal-deep: #0A4F49;
  --teal-bright: #7FD1C6;
  --coral: #FF5A36;
  --coral-deep: #E0431F;
  --verified: #2E9E63;
  --paper: #FDFDFB;
  --mist: #EEF3F1;
  --line: #DCE3E0;
  --error: #C23A22;
  --display: 'Space Grotesk', sans-serif;
  --body: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  display: grid;
  grid-template-columns: minmax(380px, 44%) 1fr;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-deep); }

/* ---------- Brand panel ---------- */
.auth-brand {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}
.auth-brand::before {
  /* Soft teal glow + fine grid, no photos */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 420px at 85% 8%, rgba(14, 110, 102, .55), transparent 70%),
    radial-gradient(420px 360px at 0% 100%, rgba(255, 90, 54, .16), transparent 70%),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 32px 32px;
  pointer-events: none;
}
.auth-brand > * { position: relative; }
.auth-logo img { height: 46px; width: auto; display: block; }
.auth-brand-body {
  margin: auto 0;
  padding: 40px 0;
  max-width: 470px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--teal-bright);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 90, 54, .18);
}
.auth-brand h1 {
  margin-bottom: 16px;
  font-family: var(--display);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.auth-brand-lead {
  margin-bottom: 30px;
  color: rgba(255, 255, 255, .7);
  font-size: 15px;
}
.auth-points { list-style: none; display: grid; gap: 16px; }
.auth-points li { display: flex; gap: 14px; }
.auth-points .pt-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--teal-bright);
}
.auth-points strong { display: block; font-size: 14.5px; font-weight: 600; }
.auth-points span { color: rgba(255, 255, 255, .62); font-size: 13.5px; }
.auth-stats {
  display: flex;
  gap: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.auth-stats b {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
}
.auth-stats span {
  color: rgba(255, 255, 255, .55);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- Form panel ---------- */
.auth-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 28px 40px 32px;
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.auth-top .mobile-logo { display: none; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
}
.back-link:hover { color: var(--ink); }
.auth-card {
  width: 100%;
  max-width: 460px;
  margin: auto;
  padding: 32px 0 24px;
}
.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 28px;
  border-radius: 12px;
  background: var(--mist);
}
.auth-switch a {
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.auth-switch a.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(10, 27, 46, .12);
}
.form-head { margin-bottom: 24px; }
.form-head h2 {
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.form-head p { color: var(--ink-soft); font-size: 14.5px; }

.form-section-title {
  margin: 26px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.field { margin-bottom: 16px; }
.field label, .field-legend {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
}
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.field-row label { margin-bottom: 0; }
.link-small { font-size: 13px; font-weight: 600; }

/* Inputs with a leading icon */
.input-icon { position: relative; }
.input-icon > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #8A9A96;
  pointer-events: none;
}
.field .input-icon input, .field .input-icon select { padding-left: 42px; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
select {
  appearance: none;
  padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A5D66' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
input::placeholder { color: #9AA9A5; }
input:focus, select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(14, 110, 102, .12);
}
input.is-error, select.is-error { border-color: var(--error); }
input.is-error:focus, select.is-error:focus { box-shadow: 0 0 0 4px rgba(194, 58, 34, .12); }

.password-wrapper { position: relative; }
.field .password-wrapper input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.password-toggle:hover { background: var(--mist); color: var(--ink); }

.field-hint { display: block; margin-top: 6px; color: #7A8B87; font-size: 12.5px; }
.field-error, .error-message {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  color: var(--error);
  font-size: 13px;
  font-weight: 500;
}
.field-error:empty { display: none; }
.error-message svg { flex-shrink: 0; margin-top: 2px; }
.error-message { flex-wrap: wrap; }

.form-summary {
  display: none;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #F1C9C0;
  border-radius: 11px;
  background: #FDF1EE;
  color: var(--error);
  font-size: 13.5px;
  font-weight: 500;
}
.form-summary.show { display: block; }
.form-summary:empty:not(.show) { display: none; }

/* Account type cards */
.type-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.type-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.type-toggle label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 12px 8px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.type-toggle label svg { width: 20px; height: 20px; color: #8A9A96; }
.type-toggle label:hover { border-color: rgba(14, 110, 102, .4); }
.type-toggle input:checked + label {
  border-color: var(--teal);
  background: rgba(14, 110, 102, .06);
  color: var(--teal-deep);
  box-shadow: inset 0 0 0 1px var(--teal);
}
.type-toggle input:checked + label svg { color: var(--teal); }
.type-toggle input:focus-visible + label { outline: 2px solid var(--teal); outline-offset: 2px; }

.phone-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; }

/* Password strength */
.pw-meter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.pw-meter i { height: 4px; border-radius: 4px; background: var(--line); transition: background .2s ease; }
.pw-meter[data-score="1"] i:nth-child(-n+1),
.pw-meter[data-score="2"] i:nth-child(-n+2) { background: var(--coral); }
.pw-meter[data-score="3"] i:nth-child(-n+3),
.pw-meter[data-score="4"] i:nth-child(-n+4) { background: #E0A100; }
.pw-meter[data-score="5"] i { background: var(--verified); }
.password-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  margin-top: 8px;
  list-style: none;
  color: #7A8B87;
  font-size: 12.5px;
}
.password-rules li { display: flex; align-items: center; gap: 6px; }
.password-rules li::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #C2CDCA;
  flex-shrink: 0;
}
.password-rules li.valid { color: var(--verified); }
.password-rules li.valid::before {
  border-color: var(--verified);
  background: var(--verified) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 9px no-repeat;
}

.check, .check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}
.check-row { margin: 20px 0 6px; }
.check-row label { margin: 0; font-weight: 400; cursor: pointer; }
.check input, .check-row input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--teal);
  flex-shrink: 0;
}
.remember-row { margin: 4px 0 22px; }

.btn {
  width: 100%;
  height: 50px;
  margin-top: 18px;
  border: 0;
  border-radius: 11px;
  background: var(--coral);
  color: #fff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 22px -10px rgba(255, 90, 54, .6);
  transition: background .2s ease, transform .15s ease;
}
.btn:hover { background: var(--coral-deep); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .75; cursor: progress; }
.remember-row + .btn { margin-top: 0; }

.foot-line { margin-top: 22px; color: var(--ink-soft); font-size: 14px; text-align: center; }
.foot-line a { font-weight: 600; }
.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  color: #7A8B87;
  font-size: 12.5px;
}
.secure-note svg { color: var(--verified); flex-shrink: 0; }
.auth-legal {
  margin-top: auto;
  color: #9AA9A5;
  font-size: 12px;
  text-align: center;
}
.auth-legal a { color: inherit; text-decoration: underline; }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 960px) {
  body { display: block; }
  .auth-brand { display: none; }
  .auth-main { padding: 18px 20px 24px; }
  .auth-top {
    margin: -18px -20px 0;
    padding: 14px 20px;
    background: var(--ink);
  }
  .auth-top .mobile-logo { display: block; }
  .auth-top .mobile-logo img { height: 34px; display: block; }
  .back-link { color: rgba(255, 255, 255, .8); }
  .back-link:hover { color: #fff; }
  .auth-card { padding-top: 26px; }
}
@media (max-width: 480px) {
  .form-head h2 { font-size: 24px; }
  .phone-row { grid-template-columns: 1fr; gap: 0; }
  .password-rules { grid-template-columns: 1fr; }
  .type-toggle label { padding: 10px 4px; font-size: 12.5px; }
}

/* ---------- Forgot / reset password ---------- */
.state-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(14, 110, 102, .1);
  color: var(--teal);
}
.state-icon.is-success {
  background: rgba(46, 158, 99, .12);
  color: var(--verified);
}
.form-head p strong { color: var(--ink); font-weight: 600; word-break: break-all; }
a.btn { text-decoration: none; color: #fff; }
.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--teal);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.link-button:hover:not(:disabled) { color: var(--teal-deep); text-decoration: underline; }
.link-button:disabled { color: #8A9A96; cursor: default; }
.resend-form .foot-line { margin-top: 20px; }
.field input.is-readonly {
  background: var(--mist);
  color: var(--ink-soft);
  cursor: default;
}
.field input.is-readonly:focus { border-color: var(--line); box-shadow: none; }
.form-summary a { color: inherit; font-weight: 600; text-decoration: underline; }
.error-message[hidden] { display: none; }
