/* ================================================================
   LocalLink — Registration Page
   Drop-in stylesheet for register.php
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --ll-blue: #1769e0;
  --ll-blue-dark: #0b4eb8;
  --ll-blue-deep: #07377f;
  --ll-blue-light: #eaf3ff;
  --ll-sky: #56b7ff;
  --ll-ink: #162033;
  --ll-muted: #68758a;
  --ll-line: #dce4ef;
  --ll-surface: #ffffff;
  --ll-page: #f5f8fc;
  --ll-success: #18a568;
  --ll-warning: #f2a52b;
  --ll-danger: #e15454;
  --ll-shadow: 0 24px 70px rgba(25, 55, 95, .13);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ll-ink);
  background: var(--ll-page);
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ll-blue); text-decoration: none; }
a:hover { color: var(--ll-blue-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.auth-container {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(500px, 1.1fr);
  min-height: 100vh;
  overflow: hidden;
}

/* Branding panel */
.auth-left {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100%;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #0a3b91 0%, #1261d4 48%, #1493df 100%);
}

.auth-left::before,
.auth-left::after {
  position: absolute;
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.auth-left::before {
  width: 32rem;
  height: 32rem;
  top: -14rem;
  left: -14rem;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 0 0 42px rgba(255,255,255,.035), 0 0 0 84px rgba(255,255,255,.025);
}

.auth-left::after {
  width: 25rem;
  height: 25rem;
  right: -14rem;
  bottom: -11rem;
  background: rgba(75, 202, 255, .16);
  box-shadow: 0 0 0 50px rgba(75, 202, 255, .055);
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 21, 61, .08), rgba(2, 21, 61, .22));
  pointer-events: none;
}

.left-content {
  position: relative;
  z-index: 1;
  width: min(100%, 490px);
  margin: 0 auto;
  padding: 48px;
}

.left-content .logo,
.left-content .brand,
.left-content > a:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(62px, 12vh, 135px);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.6px;
}

.left-content .logo img,
.left-content .brand img { max-height: 38px; width: auto; }

.left-content h1 {
  max-width: 440px;
  margin: 0 0 18px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(36px, 4vw, 53px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.4px;
}

.left-content p {
  max-width: 400px;
  margin: 0;
  color: rgba(255,255,255,.84);
  font-size: 17px;
  line-height: 1.7;
}

.left-content .benefits,
.left-content ul {
  display: grid;
  gap: 15px;
  margin: 35px 0 0;
  padding: 0;
  list-style: none;
}

.left-content li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255,255,255,.95);
  font-weight: 500;
}

.left-content li::before {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  color: #fff;
  content: '✓';
  font-size: 13px;
  font-weight: 700;
}

/* Form panel */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 32px;
  background: #fff;
}

.auth-card {
  width: min(100%, 560px);
  padding: 12px 0;
}

.auth-card > h2,
.auth-card .title {
  margin: 0 0 7px;
  color: var(--ll-ink);
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.7px;
}

.auth-card > p,
.auth-card .subtitle {
  margin: 0 0 30px;
  color: var(--ll-muted);
  font-size: 15px;
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group { margin-bottom: 19px; }

.form-group > label,
.form-group > .label {
  display: block;
  margin: 0 0 8px;
  color: #303d52;
  font-size: 13px;
  font-weight: 700;
}

.form-group > label .required { color: var(--ll-danger); }

.input-group { position: relative; }

.input-group > i,
.input-group > svg,
.input-group .input-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #8b9ab0;
  fill: currentColor;
  pointer-events: none;
}

.form-group input,
.form-group select,
.form-group textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--ll-line);
  border-radius: 10px;
  outline: none;
  color: var(--ll-ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 41, 78, .02);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.input-group input { padding-left: 45px; }
.input-group .toggle-password + input { padding-right: 48px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: #a3afbf; opacity: 1; }

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: #b5c7df; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--ll-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(23, 105, 224, .12);
}

.form-group input:focus + .toggle-password { color: var(--ll-blue); }
.form-group input[aria-invalid='true'],
.form-group .error input { border-color: var(--ll-danger); }
.form-group .error-message { display: block; margin-top: 6px; color: var(--ll-danger); font-size: 12px; }

.toggle-password {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 7px;
  color: #7d8ca3;
  background: transparent;
  transition: color .2s ease, background .2s ease;
}

.toggle-password:hover { color: var(--ll-blue); background: var(--ll-blue-light); }
.toggle-password svg, .toggle-password i { width: 17px; height: 17px; }

/* Password feedback */
.strength { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.strength-bar { display: flex; height: 4px; flex: 1; gap: 4px; }
.strength-bar span, .strength-bar::before, .strength-bar::after {
  display: block;
  flex: 1;
  border-radius: 10px;
  background: #e3e9f1;
  content: '';
}
.strength small, .strength-text { color: var(--ll-muted); font-size: 11px; font-weight: 600; }
.strength.weak .strength-bar span:first-child, .strength-bar.weak span:first-child { background: var(--ll-danger); }
.strength.medium .strength-bar span:nth-child(-n+2), .strength-bar.medium span:nth-child(-n+2) { background: var(--ll-warning); }
.strength.strong .strength-bar span, .strength-bar.strong span { background: var(--ll-success); }
.strength.weak small { color: var(--ll-danger); }
.strength.medium small { color: #bc7911; }
.strength.strong small { color: var(--ll-success); }

/* Account selection */
.account-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 3px;
}

.account-card {
  position: relative;
  display: block;
  min-height: 105px;
  padding: 17px 15px 15px;
  border: 1px solid var(--ll-line);
  border-radius: 12px;
  color: var(--ll-ink);
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.account-card:hover {
  transform: translateY(-2px);
  border-color: #8db6ee;
  box-shadow: 0 8px 20px rgba(26, 91, 170, .09);
}

.account-card input { position: absolute; opacity: 0; pointer-events: none; }
.account-card:has(input:checked),
.account-card.active,
.account-card.selected {
  border-color: var(--ll-blue);
  background: #f6faff;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .1);
}

.account-card .card-icon {
  display: grid;
  width: 31px;
  height: 31px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 8px;
  color: var(--ll-blue);
  background: #e8f2ff;
}

.account-card .card-icon svg, .account-card .card-icon i { width: 17px; height: 17px; }
.account-card strong, .account-card .card-title { display: block; font-size: 13px; font-weight: 700; }
.account-card small, .account-card .card-description { display: block; margin-top: 3px; color: var(--ll-muted); font-size: 11px; line-height: 1.35; }

/* Registration type form switcher */
.registration-form {
  display: none;
  margin-top: 23px;
  animation: form-reveal .24s ease both;
}

.registration-form.is-active { display: block; }

.form-heading { margin: 0 0 19px; color: var(--ll-ink); font-family: 'Outfit', sans-serif; font-size: 19px; font-weight: 700; }

@keyframes form-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Terms */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 23px 0;
  color: var(--ll-muted);
  font-size: 12px;
  line-height: 1.55;
  cursor: pointer;
}

.checkbox input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 1px 0 0;
  accent-color: var(--ll-blue);
  cursor: pointer;
}

.checkbox a { font-weight: 600; }

/* Buttons and sign-in */
.btn-register,
.google-btn {
  display: inline-flex;
  width: 100%;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.btn-register {
  border: 1px solid var(--ll-blue);
  color: #fff;
  background: linear-gradient(110deg, #1260d2, #1679e9);
  box-shadow: 0 8px 17px rgba(22, 103, 224, .24);
}

.btn-register:hover { transform: translateY(-1px); color: #fff; background: linear-gradient(110deg, #0d55bd, #126bd4); box-shadow: 0 11px 21px rgba(22, 103, 224, .31); }
.btn-register:active { transform: translateY(0); box-shadow: 0 4px 10px rgba(22, 103, 224, .25); }
.btn-register:focus-visible, .google-btn:focus-visible, .toggle-password:focus-visible { outline: 3px solid rgba(23,105,224,.3); outline-offset: 2px; }
.btn-register:disabled { opacity: .62; cursor: not-allowed; transform: none; box-shadow: none; }

.divider { display: flex; align-items: center; gap: 13px; margin: 23px 0; color: #96a2b2; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.divider::before, .divider::after { height: 1px; flex: 1; background: var(--ll-line); content: ''; }

.google-btn { border: 1px solid var(--ll-line); color: #344258; background: #fff; }
.google-btn:hover { transform: translateY(-1px); border-color: #b9c8d9; color: #1f2e43; background: #fbfdff; box-shadow: 0 5px 14px rgba(22, 46, 78, .08); }
.google-btn img, .google-btn svg { width: 19px; height: 19px; }

.login-link { margin: 25px 0 0; color: var(--ll-muted); font-size: 13px; text-align: center; }
.login-link a { margin-left: 4px; font-weight: 700; }

/* Supporting alert styles */
.alert { margin: 0 0 20px; padding: 12px 14px; border-radius: 9px; font-size: 13px; }
.alert-success { border: 1px solid #bde7d3; color: #176947; background: #effbf5; }
.alert-error, .alert-danger { border: 1px solid #f1c3c3; color: #a43838; background: #fff5f5; }

@media (max-width: 960px) {
  .auth-container { grid-template-columns: minmax(310px, .76fr) minmax(430px, 1.24fr); }
  .left-content { padding: 38px; }
  .left-content h1 { font-size: 39px; }
  .auth-right { padding: 38px 30px; }
}

@media (max-width: 760px) {
  .auth-container { display: block; min-height: 100svh; }
  .auth-left { min-height: auto; }
  .left-content { width: 100%; padding: 30px 25px 32px; }
  .left-content .logo, .left-content .brand, .left-content > a:first-child { margin-bottom: 39px; }
  .left-content h1 { max-width: 500px; font-size: 34px; }
  .left-content p { font-size: 15px; }
  .left-content .benefits, .left-content ul { display: none; }
  .auth-right { display: block; padding: 34px 25px 42px; }
  .auth-card { max-width: 560px; margin: 0 auto; padding: 0; }
}

@media (max-width: 460px) {
  .left-content { padding: 25px 20px 28px; }
  .left-content .logo, .left-content .brand, .left-content > a:first-child { margin-bottom: 31px; font-size: 23px; }
  .left-content h1 { font-size: 30px; letter-spacing: -.8px; }
  .auth-right { padding: 30px 20px 36px; }
  .auth-card > h2, .auth-card .title { font-size: 28px; }
  .auth-card > p, .auth-card .subtitle { margin-bottom: 24px; }
  .row, .account-types { grid-template-columns: 1fr; gap: 0; }
  .row .form-group + .form-group { margin-top: 0; }
  .account-types { gap: 11px; }
  .account-card { min-height: 88px; padding: 14px 14px 12px 55px; }
  .account-card .card-icon { position: absolute; top: 15px; left: 14px; width: 30px; height: 30px; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
