:root {
  --teal: var(--color-customColor, #3B8B83);
  --teal-dark: color-mix(in srgb, var(--teal) 82%, #000);
  --teal-light: color-mix(in srgb, var(--teal) 12%, #fff);
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --border-input: #D1D5DB;
  --bg-page: #F8F9FA;
  --bg-white: #FFFFFF;
  --radius-sm: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.auth-login-page {
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

button {
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  outline: none;
}

input,
textarea,
select {
  font-family: 'Inter', sans-serif;
  outline: none;
}

a {
  text-decoration: none;
  color: inherit;
}

i[class^="ti"],
i[class*=" ti"] {
  display: inline-block;
  vertical-align: -0.125em;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  font-size: inherit;
  line-height: 1;
}

.screen {
  display: none;
}

.screen.active {
  display: flex;
}

#screen-login {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #F9FAFB 0%, var(--bg-page) 100%);
  flex-direction: column;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

#screen-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--teal) 6%, transparent) 0%, transparent 45%);
  pointer-events: none;
}

.login-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.login-bg .shape {
  position: absolute;
  border-radius: 50%;
  background: color-mix(in srgb, var(--teal) 14%, transparent);
  filter: blur(1px);
}

.login-bg .shape-1 {
  width: 280px;
  height: 280px;
  top: -80px;
  left: -60px;
  opacity: 0.55;
}

.login-bg .shape-2 {
  width: 200px;
  height: 200px;
  bottom: 10%;
  left: 8%;
  opacity: 0.4;
}

.login-bg .shape-3 {
  width: 360px;
  height: 360px;
  top: -120px;
  right: -100px;
  opacity: 0.35;
}

.login-topbar {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.language-toggle {
  display: flex;
  gap: 0;
  align-items: center;
  max-width: min(100%, 420px);
  overflow-x: auto;
  padding: 3px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  scrollbar-width: none;
}

.language-toggle::-webkit-scrollbar {
  display: none;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-btn:hover {
  color: var(--teal);
}

.lang-btn.active {
  background: var(--teal);
  color: #fff;
}

.login-center {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 80px;
  margin-top: -56px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  text-align: center;
}

.login-brand img,
.login-brand-logo {
  width: 125px;
  height: 125px;
  max-width: 125px;
  max-height: 125px;
  object-fit: contain;
}

.login-brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.login-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: block;
}

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

.form-input {
  width: 100%;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 14px;
  color: var(--text-primary);
  background: #fff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 14%, transparent);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input.is-invalid {
  border-color: #EF4444;
}

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap > .ti {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.input-icon-wrap input {
  padding-left: 38px;
  padding-right: 42px;
}

.input-icon-wrap .eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: var(--text-secondary);
  font-size: 18px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.input-icon-wrap .eye-btn .ti {
  position: static;
  transform: none;
  font-size: 18px;
  pointer-events: none;
}

.input-icon-wrap .eye-btn:hover {
  color: var(--teal);
}

.field-error {
  display: block;
  font-size: 12px;
  color: #EF4444;
  margin-top: 6px;
}

.login-alert {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  background: #FEF3C7;
  color: #92400E;
}

.login-alert-success {
  background: #D1FAE5;
  color: #065F46;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.login-row .remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.login-row .remember input[type="checkbox"] {
  accent-color: var(--teal);
  width: 15px;
  height: 15px;
}

.forgot-link {
  font-size: 13px;
  color: var(--teal);
  font-weight: 500;
}

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

.btn-login {
  width: 100%;
  background: var(--teal);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.25s ease, transform 0.2s ease;
}

.btn-login:hover {
  background: var(--teal-dark);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-register {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.login-register a {
  color: var(--teal);
  font-weight: 500;
}

.login-register a:hover {
  text-decoration: underline;
}

.login-back-link {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
}

.login-back-link a {
  color: var(--text-secondary);
  font-weight: 500;
}

.login-back-link a:hover {
  color: var(--teal);
}

.login-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  z-index: 5;
  padding: 0 20px;
}

.login-footer a {
  color: var(--text-secondary);
}

.login-footer a:hover {
  color: var(--teal);
}

.login-footer-sep {
  margin: 0 6px;
  color: var(--border-input);
}

.recaptcha-wrap {
  margin-bottom: 18px;
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 24px;
  }

  .login-topbar {
    padding: 16px 20px;
  }

  .login-brand-name {
    font-size: 18px;
  }
}
