/* ============================================================
   Subcheo — Auth (login / register / forget) redesign
   Modern SaaS split-screen, đồng bộ design system `--sc-*`.
   Prefix class: `auth-*`. Load sau cùng để override sb-admin-2.
   ============================================================ */

:root {
  --sc-blue: #1f8ffb;
  --sc-blue-dark: #0b6bd6;
  --sc-blue-deep: #0a4fa0;
  --sc-blue-soft: #eaf4ff;
  --sc-cyan: #4fc3f7;
  --sc-ink: #15212e;
  --sc-body: #44566c;
  --sc-muted: #7c8aa0;
  --sc-bg-soft: #e9f1fc;
  --sc-border: #e7eef7;
  --sc-radius: 18px;
  --sc-grad: linear-gradient(135deg, #1f8ffb 0%, #0b6bd6 55%, #0a4fa0 100%);
  --sc-font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-body {
  margin: 0;
  font-family: var(--sc-font);
  color: var(--sc-body);
  background: var(--sc-bg-soft);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.auth-wrap--single {
  grid-template-columns: 1fr;
  place-items: center;
}

/* ---------- Brand panel ---------- */
.auth-brand {
  position: relative;
  background: var(--sc-grad);
  color: #fff;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.auth-brand::before,
.auth-brand::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.auth-brand::before {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -120px;
}
.auth-brand::after {
  width: 280px;
  height: 280px;
  bottom: -110px;
  left: -90px;
}
.auth-brand__inner {
  position: relative;
  z-index: 2;
  max-width: 440px;
}
.auth-brand__logo img {
  max-height: 44px;
  margin-bottom: 36px;
}
.auth-brand__title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 14px;
}
.auth-brand__desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 30px;
}
.auth-brand__points {
  list-style: none;
  margin: 0;
  padding: 0;
}
.auth-brand__points li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 500;
}
.auth-brand__points li::before {
  content: '\f058';
  font-family: 'Font Awesome 5 Free', 'FontAwesome';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0;
  color: #aef1c4;
}

/* ---------- Form panel ---------- */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #fff;
}
.auth-wrap--single .auth-panel {
  background: transparent;
  width: 100%;
}
.auth-card {
  width: 100%;
  max-width: 440px;
}
.auth-wrap--single .auth-card {
  background: #fff;
  border-radius: var(--sc-radius);
  box-shadow: 0 14px 40px rgba(18, 64, 120, 0.1);
  padding: 40px 36px;
}

.auth-head {
  margin-bottom: 28px;
}
.auth-head__logo {
  display: none;
  margin-bottom: 22px;
}
.auth-head__logo img {
  max-height: 40px;
}
.auth-head h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--sc-ink);
  margin: 0 0 8px;
}
.auth-head p {
  font-size: 15px;
  color: var(--sc-muted);
  margin: 0;
}

/* ---------- Fields ---------- */
.auth-field {
  position: relative;
  margin-bottom: 16px;
}
.auth-field__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sc-muted);
  font-size: 15px;
  pointer-events: none;
}
.auth-input {
  width: 100%;
  height: 50px;
  border: 1.5px solid var(--sc-border);
  border-radius: 12px;
  padding: 0 16px 0 44px;
  font-size: 15px;
  font-family: inherit;
  color: var(--sc-ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.auth-input::placeholder {
  color: #aab6c6;
}
.auth-input:focus {
  border-color: var(--sc-blue);
  box-shadow: 0 0 0 4px rgba(31, 143, 251, 0.14);
}
.auth-field__toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--sc-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 6px;
}
.auth-field__toggle:hover {
  color: var(--sc-blue-dark);
}

/* ---------- Button ---------- */
.auth-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--sc-grad);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(11, 107, 214, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}
.auth-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Terms / alt links / alerts ---------- */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  color: var(--sc-body);
  margin: 4px 0 18px;
}
.auth-terms input {
  margin-top: 3px;
  accent-color: var(--sc-blue);
}
.auth-terms a {
  color: var(--sc-blue-dark);
  font-weight: 600;
}

.auth-divider {
  border: 0;
  border-top: 1px solid var(--sc-border);
  margin: 22px 0;
}

.auth-alt {
  text-align: center;
  font-size: 14px;
  color: var(--sc-muted);
}
.auth-alt a {
  color: var(--sc-blue-dark);
  font-weight: 700;
  text-decoration: none;
}
.auth-alt a:hover {
  text-decoration: underline;
}
.auth-alt > div + div {
  margin-top: 8px;
}

.auth-note {
  font-size: 12.5px;
  color: var(--sc-muted);
  text-align: center;
  margin-top: 18px;
}

.auth-error {
  color: #e03131;
  font-size: 13.5px;
  margin: 4px 0 12px;
  min-height: 1em;
}

/* Alerts (helper alertSuccess/Error/Warning) */
.auth-card .alert {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.auth-card .alert-success {
  background: #e7f7ee;
  color: #1aa260;
  border-color: #bce8d1;
}
.auth-card .alert-danger {
  background: #fdecec;
  color: #e03131;
  border-color: #f7c4c4;
}
.auth-card .alert-warning {
  background: #fff6e6;
  color: #b8740a;
  border-color: #f5dca6;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .auth-wrap {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    display: none;
  }
  .auth-panel {
    background: transparent;
    padding: 32px 18px;
    min-height: 100vh;
  }
  .auth-card {
    background: #fff;
    border-radius: var(--sc-radius);
    box-shadow: 0 14px 40px rgba(18, 64, 120, 0.1);
    padding: 34px 26px;
    max-width: 460px;
  }
  .auth-head__logo {
    display: block;
    text-align: center;
  }
  .auth-head {
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .auth-wrap--single .auth-card,
  .auth-card {
    padding: 28px 20px;
  }
  .auth-head h1 {
    font-size: 23px;
  }
}
