/* ================= AUTH PAGES (login / register) ================= */
:root {
  --navy: #0b2357;
  --blue: #0a6ce8;
  --blue-dark: #0750b3;
  --heading: #1f2a3d;
  --ink: #161616;
  --muted: #555e6e;
  --line: #e5e8ef;
  --soft: #f6f7fa;
  --danger: #d92d20;
}

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

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
}

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ---- left brand panel ---- */
.auth__side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  color: #fff;
  background: var(--navy);
}

.auth__side-logo img {
  height: 34px;
  padding: 6px 10px;
  background: #fff;
  border-radius: 4px;
}

.auth__side h2 {
  max-width: 440px;
  margin: 0 0 16px;
  font-size: 34px;
  line-height: 1.2;
}

.auth__side p {
  max-width: 440px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.auth__points {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.auth__points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.auth__points svg {
  flex-shrink: 0;
  color: #5fa8ff;
}

.auth__side small {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---- right form panel ---- */
.auth__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #fff;
}

.auth__box {
  width: 100%;
  max-width: 420px;
}

.auth__mobile-logo {
  display: none;
  margin-bottom: 32px;
}

.auth__mobile-logo img {
  height: 30px;
}

.auth__box h1 {
  margin: 0 0 8px;
  font-size: 30px;
  color: var(--heading);
}

.auth__sub {
  margin: 0 0 32px;
  font-size: 15px;
  color: var(--muted);
}

/* social buttons */
.social-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--heading);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.social-btn:hover {
  border-color: #b9c2d3;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  font-size: 13px;
  color: var(--muted);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* form */
.form {
  display: grid;
  gap: 18px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
}

.field__wrap {
  position: relative;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfd5e1;
  border-radius: 6px;
  outline: none;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 108, 232, 0.15);
}

.field.has-error input {
  border-color: var(--danger);
}

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: var(--danger);
}

.field.has-error .field__error {
  display: block;
}

.toggle-pass {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.toggle-pass.is-visible {
  color: var(--blue);
}

.field__wrap input {
  padding-right: 46px;
}

.form__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.check-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.check-label input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.link {
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.strength span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}

.strength[data-level="1"] span:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.strength[data-level="3"] span:nth-child(-n+3) { background: #22a06b; }
.strength[data-level="4"] span:nth-child(-n+4) { background: #22a06b; }

.btn-submit {
  height: 48px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.btn-submit:hover {
  background: var(--navy);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.auth__switch {
  margin: 28px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

.form-alert {
  display: none;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--danger);
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 6px;
}

.form-alert.show {
  display: block;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.back-home:hover {
  color: var(--blue);
}

/* server messages */
.alert {
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 6px;
  border: 1px solid;
  overflow-wrap: anywhere;
}
.alert--error { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.alert--success { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.alert--info { color: #0750b3; background: #eaf1fd; border-color: #b9d3fb; }
.alert a { color: inherit; font-weight: 600; }

.field select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  border: 1px solid #cfd5e1;
  border-radius: 6px;
}

/* responsive */
@media (max-width: 900px) {
  .auth {
    grid-template-columns: 1fr;
  }
  .auth__side {
    display: none;
  }
  .auth__mobile-logo {
    display: block;
  }
}

@media (max-width: 480px) {
  .auth__main {
    padding: 32px 16px;
    align-items: flex-start;
  }
  .form__row,
  .social-login {
    grid-template-columns: 1fr;
  }
}
