/* SmartHerb 8Riew — RS-DM06.7
   Production refinement for the authentication login page.
   Loaded after the shared theme/hotfix layers and scoped to body.auth-shell. */

body.auth-shell {
  --herb-control-placeholder: #65766d;
  font-family: "Noto Sans Thai", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] body.auth-shell {
  --herb-control-placeholder: #a9bdb2;
}

body.auth-shell .login-shell {
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2.75rem) 1.25rem;
}

body.auth-shell .login-wrap {
  width: min(70rem, 100%);
}

body.auth-shell .login-topbar {
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}

body.auth-shell .login-back-link {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .85rem;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 999px;
  background: rgba(255, 255, 255, .74);
  color: #294d3a;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 .65rem 1.75rem rgba(22, 48, 36, .08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

body.auth-shell .login-back-link svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

body.auth-shell .login-back-link:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 133, 90, .34);
  background: rgba(255, 255, 255, .94);
  color: #155b3d;
}

body.auth-shell .login-back-link:focus-visible,
body.auth-shell .theme-switch button:focus-visible,
body.auth-shell .btn-login:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .34);
  outline-offset: 3px;
}

html[data-theme="dark"] body.auth-shell .login-back-link {
  border-color: rgba(151, 226, 191, .22);
  background: rgba(7, 25, 18, .78);
  color: #e8fff3;
}

html[data-theme="dark"] body.auth-shell .login-back-link:hover {
  border-color: rgba(110, 231, 183, .42);
  background: rgba(11, 43, 31, .94);
  color: #ffffff;
}

body.auth-shell .theme-switch {
  min-height: 2.75rem;
  align-items: center;
  padding: .28rem;
}

body.auth-shell .theme-switch button {
  min-height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  padding: .42rem .72rem;
  font-family: inherit;
  font-size: .84rem;
  letter-spacing: 0;
}

body.auth-shell .login-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(24.5rem, .82fr);
  gap: 1.25rem;
}

body.auth-shell .login-showcase,
body.auth-shell .login-card {
  border-radius: 1.5rem;
}

body.auth-shell .login-showcase {
  min-height: 37rem;
}

body.auth-shell .login-showcase__inner {
  padding: clamp(2rem, 3vw, 2.75rem);
}

body.auth-shell .login-showcase__inner::after {
  right: -5.25rem;
  bottom: -6rem;
  width: 18rem;
  height: 18rem;
  opacity: .055;
}

body.auth-shell .login-badge {
  padding: .48rem .8rem;
  font-size: .78rem;
  line-height: 1.2;
  letter-spacing: .04em;
}

body.auth-shell .login-showcase__title {
  margin: 1.35rem 0 .85rem;
  font-size: clamp(2.15rem, 4vw, 3.35rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.018em;
  text-wrap: balance;
}

body.auth-shell .login-showcase__title .login-title-accent {
  color: #17633f;
}

html[data-theme="dark"] body.auth-shell .login-showcase__title .login-title-accent {
  color: #8ff0c2;
}

body.auth-shell .login-showcase__desc {
  max-width: 38rem;
  color: #4d6558;
  font-size: 1.02rem;
  line-height: 1.82;
}

html[data-theme="dark"] body.auth-shell .login-showcase__desc {
  color: #d7eee2;
}

body.auth-shell .login-assurance-list {
  display: grid;
  gap: .75rem;
  margin-top: 2rem;
}

body.auth-shell .login-assurance {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: .9rem;
  align-items: center;
  padding: .9rem 1rem;
  border: 1px solid rgba(111, 143, 122, .20);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .66);
  box-shadow: 0 .75rem 1.75rem rgba(22, 48, 36, .055);
}

body.auth-shell .login-assurance__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .85rem;
  background: linear-gradient(135deg, rgba(47, 133, 90, .15), rgba(15, 118, 110, .12));
  color: #17633f;
}

body.auth-shell .login-assurance__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

body.auth-shell .login-assurance__title {
  margin: 0 0 .14rem;
  color: #173d2a;
  font-size: .96rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0;
}

body.auth-shell .login-assurance__desc {
  margin: 0;
  color: #596d62;
  font-size: .86rem;
  line-height: 1.58;
}

html[data-theme="dark"] body.auth-shell .login-assurance {
  border-color: rgba(151, 226, 191, .15);
  background: rgba(13, 38, 29, .72);
  box-shadow: 0 .85rem 1.8rem rgba(0, 0, 0, .16);
}

html[data-theme="dark"] body.auth-shell .login-assurance__icon {
  background: linear-gradient(135deg, rgba(52, 211, 153, .18), rgba(20, 184, 166, .14));
  color: #a7f3d0;
}

html[data-theme="dark"] body.auth-shell .login-assurance__title {
  color: #f4fff8;
}

html[data-theme="dark"] body.auth-shell .login-assurance__desc {
  color: #cee6d9;
}

body.auth-shell .login-showcase__footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: auto;
  padding-top: 1.75rem;
  color: #53695d;
  font-size: .82rem;
  line-height: 1.5;
}

body.auth-shell .login-showcase__footer strong {
  color: #234f36;
  font-weight: 800;
}

html[data-theme="dark"] body.auth-shell .login-showcase__footer,
html[data-theme="dark"] body.auth-shell .login-showcase__footer strong {
  color: #d7eee2;
}

body.auth-shell .login-card__head {
  padding: 2.1rem 2.1rem 0;
}

body.auth-shell .login-card__body {
  padding: 1.5rem 2.1rem 2.1rem;
}

body.auth-shell .login-card__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body.auth-shell .login-card__brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .8rem;
}

body.auth-shell .brand-mark {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 1.1rem;
  flex: 0 0 auto;
}

body.auth-shell .brand-mark img {
  width: 2.25rem;
  height: 2.25rem;
  display: block;
  object-fit: contain;
}

body.auth-shell .login-card__eyebrow {
  display: block;
  margin-bottom: .08rem;
  color: #5b7165;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .035em;
}

body.auth-shell .login-card__brand-name {
  display: block;
  color: #173d2a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
}

html[data-theme="dark"] body.auth-shell .login-card__eyebrow {
  color: #cde4d8;
}

html[data-theme="dark"] body.auth-shell .login-card__brand-name {
  color: #ffffff;
}

body.auth-shell .login-card__title {
  margin: 1.35rem 0 .35rem;
  color: #153824;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
}

body.auth-shell .login-card__desc {
  color: #596d62;
  font-size: .94rem;
  line-height: 1.7;
}

html[data-theme="dark"] body.auth-shell .login-card__title {
  color: #ffffff;
}

html[data-theme="dark"] body.auth-shell .login-card__desc {
  color: #d7eee2;
}

body.auth-shell .login-state-notice,
body.auth-shell .login-alert {
  margin-bottom: 1rem;
  border-radius: .9rem;
  font-size: .9rem;
  line-height: 1.6;
}

body.auth-shell .login-form-field {
  margin-bottom: 1.05rem;
}

body.auth-shell .form-label {
  margin-bottom: .48rem;
  color: #183c2a;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.45;
}

body.auth-shell .form-required {
  margin-left: .16rem;
  color: #b42318;
}

html[data-theme="dark"] body.auth-shell .form-label {
  color: #f4fff8;
}

html[data-theme="dark"] body.auth-shell .form-required {
  color: #fda4af;
}

body.auth-shell .form-control {
  min-height: 3.4rem;
  padding: .82rem 1rem;
  border-radius: .9rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

body.auth-shell .form-control::placeholder {
  color: #65766d;
  opacity: 1;
}

html[data-theme="dark"] body.auth-shell .form-control::placeholder {
  color: #a9bdb2;
  opacity: 1;
}

body.auth-shell .form-control:-webkit-autofill,
body.auth-shell .form-control:-webkit-autofill:hover,
body.auth-shell .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #163024;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, .98) inset;
  transition: background-color 9999s ease-out 0s;
}

html[data-theme="dark"] body.auth-shell .form-control:-webkit-autofill,
html[data-theme="dark"] body.auth-shell .form-control:-webkit-autofill:hover,
html[data-theme="dark"] body.auth-shell .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #eefcf4;
  box-shadow: 0 0 0 1000px rgba(5, 15, 12, .96) inset;
}

body.auth-shell .password-field-wrap .form-control {
  padding-right: 5rem;
}

body.auth-shell .password-toggle-btn {
  right: .45rem;
  min-width: 4.2rem;
  height: 2.62rem;
  border-radius: .75rem;
  font-family: inherit;
}

body.auth-shell .login-remember {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  gap: .72rem;
  align-items: start;
  margin: .15rem 0 1.15rem;
  padding: .85rem .95rem;
  border: 1px solid rgba(111, 143, 122, .22);
  border-radius: .9rem;
  background: rgba(47, 133, 90, .045);
}

body.auth-shell .login-remember .form-check-input {
  width: 1.05rem;
  height: 1.05rem;
  margin: .23rem 0 0;
  float: none;
}

body.auth-shell .login-remember .form-check-label {
  min-width: 0;
}

body.auth-shell .login-remember__title {
  display: block;
  color: #294d3a;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.45;
}

body.auth-shell .login-remember__desc {
  display: block;
  margin-top: .16rem;
  color: #64756c;
  font-size: .8rem;
  line-height: 1.55;
}

html[data-theme="dark"] body.auth-shell .login-remember {
  border-color: rgba(151, 226, 191, .16);
  background: rgba(52, 211, 153, .065);
}

html[data-theme="dark"] body.auth-shell .login-remember__title {
  color: #f4fff8;
}

html[data-theme="dark"] body.auth-shell .login-remember__desc {
  color: #cde4d8;
}

body.auth-shell .btn-login {
  min-height: 3.45rem;
  border-radius: .9rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

body.auth-shell .login-security-note {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  gap: .55rem;
  align-items: start;
  margin-top: 1rem;
  color: #64756c;
  font-size: .8rem;
  line-height: 1.55;
}

body.auth-shell .login-security-note svg {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: .08rem;
  color: #2f855a;
}

html[data-theme="dark"] body.auth-shell .login-security-note {
  color: #cde4d8;
}

html[data-theme="dark"] body.auth-shell .login-security-note svg {
  color: #6ee7b7;
}

body.auth-shell .login-first-run {
  margin-top: 1rem;
  font-size: .88rem;
}

body.auth-shell .login-meta {
  margin-top: .85rem;
  padding: .75rem .85rem;
  border: 1px dashed rgba(14, 165, 233, .28);
  border-radius: .8rem;
  background: rgba(14, 165, 233, .045);
  font-size: .78rem;
}

@media (max-width: 74.998rem) {
  body.auth-shell .login-grid {
    grid-template-columns: minmax(0, 1fr) minmax(23.75rem, .84fr);
  }

  body.auth-shell .login-showcase__title {
    font-size: clamp(2rem, 3.7vw, 2.85rem);
  }
}

@media (max-width: 61.998rem) {
  body.auth-shell .login-wrap {
    width: min(45rem, 100%);
  }

  body.auth-shell .login-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  body.auth-shell .login-card {
    order: -1;
  }

  body.auth-shell .login-showcase {
    min-height: auto;
  }

  body.auth-shell .login-assurance-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.auth-shell .login-assurance {
    grid-template-columns: 1fr;
    align-content: start;
  }

  body.auth-shell .login-showcase__footer {
    margin-top: 1.5rem;
  }
}

@media (max-width: 47.998rem) {
  body.auth-shell .login-assurance-list {
    grid-template-columns: 1fr;
  }

  body.auth-shell .login-assurance {
    grid-template-columns: 2.75rem minmax(0, 1fr);
  }

  body.auth-shell .login-showcase__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: .3rem;
  }
}

@media (max-width: 35.998rem) {
  body.auth-shell .login-shell {
    align-items: flex-start;
    padding: .85rem .65rem 1.25rem;
  }

  body.auth-shell .login-topbar {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: .75rem;
  }

  body.auth-shell .login-back-link,
  body.auth-shell .theme-switch {
    width: 100%;
  }

  body.auth-shell .login-back-link {
    justify-content: center;
  }

  body.auth-shell .theme-switch button {
    flex: 1 1 0;
  }

  body.auth-shell .login-showcase,
  body.auth-shell .login-card {
    border-radius: 1.15rem;
  }

  body.auth-shell .login-card__head {
    padding: 1.45rem 1.15rem 0;
  }

  body.auth-shell .login-card__body {
    padding: 1.15rem 1.15rem 1.45rem;
  }

  body.auth-shell .login-card__brand-row {
    align-items: flex-start;
  }

  body.auth-shell .brand-mark {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
  }

  body.auth-shell .brand-mark img {
    width: 2rem;
    height: 2rem;
  }

  body.auth-shell .login-card__title {
    margin-top: 1.1rem;
    font-size: 1.55rem;
  }

  body.auth-shell .login-showcase__inner {
    padding: 1.55rem 1.15rem;
  }

  body.auth-shell .login-showcase__inner::after {
    display: none;
  }

  body.auth-shell .login-showcase__title {
    margin-top: 1rem;
    font-size: 1.85rem;
    line-height: 1.28;
  }

  body.auth-shell .login-showcase__desc {
    font-size: .94rem;
  }

  body.auth-shell .login-assurance-list {
    margin-top: 1.35rem;
  }

  body.auth-shell .login-assurance {
    padding: .82rem .85rem;
  }

  body.auth-shell .form-control {
    min-height: 3.25rem;
  }

  body.auth-shell .password-toggle-btn {
    height: 2.48rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-shell .login-back-link {
    transition: none;
  }
}

/* Preserve hierarchy after the shared dark-green foreground normalization layer. */
html[data-theme="dark"] body.auth-shell .login-showcase .login-showcase__desc {
  color: #d7eee2;
}

html[data-theme="dark"] body.auth-shell .login-showcase .login-assurance__icon {
  color: #a7f3d0;
}

html[data-theme="dark"] body.auth-shell .login-showcase .login-assurance__title {
  color: #f4fff8;
}

html[data-theme="dark"] body.auth-shell .login-showcase .login-assurance__desc {
  color: #cee6d9;
}

html[data-theme="dark"] body.auth-shell .login-showcase .login-showcase__footer,
html[data-theme="dark"] body.auth-shell .login-showcase .login-showcase__footer strong {
  color: #d7eee2;
}

html[data-theme="dark"] body.auth-shell .login-card .login-card__eyebrow {
  color: #cde4d8;
}

html[data-theme="dark"] body.auth-shell .login-card .login-card__brand-name,
html[data-theme="dark"] body.auth-shell .login-card .login-card__title,
html[data-theme="dark"] body.auth-shell .login-card .form-label,
html[data-theme="dark"] body.auth-shell .login-card .login-remember__title {
  color: #ffffff;
}

html[data-theme="dark"] body.auth-shell .login-card .login-card__desc {
  color: #d7eee2;
}

html[data-theme="dark"] body.auth-shell .login-card .form-required {
  color: #fda4af;
}

html[data-theme="dark"] body.auth-shell .login-card .login-remember__desc,
html[data-theme="dark"] body.auth-shell .login-card .login-security-note {
  color: #cde4d8;
}
