:root {
  /* M3/sys/light tokens */
  --white: #FFFFFF;           /* white */
  --primary: #006D44;           /* .M3/sys/light/primary */
  --error: #BA1A1A;             /* M3/sys/light/error */
  --surface-background: #FEFCF4; /* M3/sys/light/surface/background */
  --surface-container-low: #F6F4EB; /* M3/sys/light/surface/background */
  --surface: #FBF9F1;           /* .M3/sys/light/surface */
  --on-surface: #1B1C17;        /* .M3/sys/light/on-surface */
  --on-surface-variant: #404942; /* .M3/sys/light/on-surface-variant */
  --outline: #717972;           /* .M3/sys/light/outline */
  --outline-variant: #C0C9C0;           /* M3/sys/light/outline-variant */
  --secondary-container: #D0E8D6;       /* M3/sys/light/secondary-container */
  --on-secondary-container: #0B1F14;    /* M3/sys/light/on-secondary-container */
}

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

body {
  font-family: "Roboto Flex", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "GRAD" 0, "XTRA" 488, "XOPQ" 96, "YOPQ" 79, "YTLC" 514, "YTUC" 712, "YTAS" 750, "YTDE" -203, "YTFI" 738;
  min-height: 100vh;
  color: var(--on-surface);
  margin: 0 auto;
}

h1, h2, p, span {
  margin: 0;
  padding: 0;
}

/* === LAYOUT === */
.login-layout {
  display: flex;
  max-height: 100vh;
  min-height: 100vh;
  height: 100%;
  overflow: hidden;
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  background: var(--surface-background);
}

.login-image-panel {
  display: none;
}

@media (min-width: 768px) {
  .login-form-panel {
    width: 44%;
    flex-shrink: 0;
    padding: 32px 40px;
  }

  .login-image-panel {
    display: block;
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--surface-background);
  }
}

/* === HEADER === */
.login-header {
  flex-shrink: 0;
  border-bottom: 1px solid var(--outline-variant);
  padding: 24px;
}

@media (min-width: 768px) {
  .login-header {
    border-bottom: none;
    padding: 0;
  }
}

.login-logo {
  width: 92px;
  min-width: 92px;
  height: 16px;
  fill: var(--on-surface-variant);
  display: block;
}

@media (min-width: 768px) {
  .login-logo {
    width: 138px;
    min-width: 138px;
    height: 24px;
  }
}

/* === MAIN === */
.login-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow: scroll;
  scrollbar-width: none;
}

@media (min-width: 768px) {
  .login-main {
    padding: 40px 0 0;
    margin-top: 24px;
  }
}

.login-content {
  width: 100%;
  max-width: 380px;
}

/* === HEADING === */
.login-heading {
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 32px;
  color: var(--on-surface);
  margin-top: 0;
  margin-bottom: 12px;
}

.login-subtitle {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: 0.5px;
  font-variation-settings: "GRAD" 0, "XTRA" 488, "XOPQ" 96, "YOPQ" 79, "YTLC" 514, "YTUC" 712, "YTAS" 750, "YTDE" -203, "YTFI" 738;
  color: var(--on-surface-variant);
  margin-bottom: 32px;
}

.login-heading--success, .login-subtitle--success {
  margin-bottom: 16px;
}

/* === ALERT BANNER === */
.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.25px;
  margin-bottom: 32px;
}

.login-alert--error {
  background: #FFDAD6;
  color: var(--on-surface-variant);
}

/* === ERROR === */
.login-error {
  color: var(--error);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0.4px;
  margin-top: 4px;
  padding: 0 16px;
}

/* === FIELD === */
.login-field-wrapper--error .login-field,
.login-field-wrapper--error .login-field:focus,
.login-field-wrapper--error input,
.login-field-wrapper--error input:focus {
  box-shadow: inset 0 0 0 2px var(--error);
}

.login-field-wrapper--error .login-field-label {
  color: var(--error);
}

.login-field-wrapper {
  position: relative;
  margin-bottom: 24px;
}

.login-field-wrapper--new-password {
  margin-bottom: 8px;
  margin-top: 24px;
}

.login-field-label {
  position: absolute;
  top: -9px;
  left: 12px;
  padding: 0 4px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: 0.4px;
  background: var(--surface);
  color: var(--outline);
  pointer-events: none;
  z-index: 1;
}

.login-field {
  width: 100%;
  padding: 16px;
  box-shadow: inset 0 0 0 1px var(--outline);
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.5px;
  color: var(--on-surface-variant);
  background: var(--surface);
  outline: none;
  transition: box-shadow 0.15s;
}

.login-field::placeholder {
  color: var(--on-surface-variant);
}

.login-field:focus {
  box-shadow: inset 0 0 0 2px var(--primary);
}

/* === BUTTONS === */
.login-btn {
  display: block;
  width: 100%;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0.15px;
  font-variation-settings: "GRAD" 0, "XOPQ" 96, "XTRA" 468, "YOPQ" 79, "YTAS" 750, "YTDE" -203, "YTFI" 738, "YTLC" 514, "YTUC" 712;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-align: center;
  text-decoration: none;
  border: none;
}

.login-btn--primary {
  background: var(--primary);
  color: var(--white);
}

.login-btn--primary[disabled] {
  background: rgba(27, 28, 23, 0.12);
  color: var(--on-surface);

  span {
    opacity: 0.38;
  }
}

.login-btn[disabled] {
   cursor: not-allowed;
}

.login-btn--primary:not([disabled]):hover {
  box-shadow: 0px 1px 2px rgba(0, 0, 0, .3), 0px 1px 3px 1px rgba(0, 0, 0, .15);
  background: rgb(0, 109, 68, 0.92);
}

.login-btn--outline {
  background: transparent;
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--outline);
}

.login-btn--tonal {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.login-btn--tonal[disabled] {
  opacity: 0.38;
}

.login-btn--tonal:hover {
  box-shadow: 0px 1px 2px rgba(0, 0, 0, .3), 0px 1px 3px 1px rgba(0, 0, 0, .15);
}

.login-btn--outline:hover {
  background: rgb(0, 109, 68, 0.08);
}

.login-btn--forgot {
  margin-bottom: 24px;
}

.login-btn--success {
  margin-top: 32px;
}

/* === FORGOT PASSWORD === */
.login-forgot {
  display: block;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  margin: 16px auto 0;
  border: none;
  background: transparent;
}

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

/* === DIVIDER === */
.login-divider {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 16px 0;
}

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

.login-divider span {
  font-size: 14px;
  line-height: 20px;
  color: var(--outline);
  flex-shrink: 0;
}

/* === FIELD WITH ICON TOGGLE === */
.login-field-wrapper--icon .login-field {
  padding-right: 48px;
}

.login-field-toggle {
  position: absolute;
  right: 8px;
  top: 28px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.login-field-toggle:hover {
  background: rgba(27, 28, 23, 0.08);
}

/* === HINT === */
.login-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  background: var(--surface-container-low);
  border-radius: 8px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.4px;
  color: var(--on-surface-variant);
  margin-top: 0;
  margin-bottom: 24px;
}

.login-hint-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 2px;
}

/* === SUCCESS ICON === */
.login-icon--success {
  margin-bottom: 16px;
  width: 80px;
  height: 80px;
}

@media (min-width: 768px) {
  .login-icon--success {
    width: 100px;
    height: 100px;
  }
}

/* === IMAGE PANEL === */
.login-image-inner {
  position: absolute;
  inset: 16px;
  border-radius: 24px;
  overflow: hidden;
  background: url("/login.png");
  background-size: cover;
  background-position: center;
}