/* Agro Software — authentication pages (loaded after app.css)
   Centered card with green geometric corners, avatar badge, icon-prefixed fields. */
:root {
  --lg-green: #2e8b3d;
  --lg-green-dark: #1f6b2e;
  --lg-green-light: #4caf50;
  --lg-green-hover: #257534;
  --lg-field: #e6e6e6;
  --lg-avatar: #3d3d3d;
}

.auth-body {
  font-family: "Open Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #e9e9e9;
  min-height: 100vh;
  margin: 0;
}
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 16px 32px;
}

/* Card — plain white with a single green border; the avatar hangs over the top edge */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 2px solid var(--lg-green);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

/* Avatar badge overlapping the top edge */
.auth-avatar {
  position: absolute;
  top: -48px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--lg-green);
  border: 4px solid #fff;
  color: #fff;
  font-size: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
  z-index: 2;
}
/* Content */
.auth-content {
  position: relative;
  z-index: 1;
  padding: 72px 44px 40px;
}
.auth-title {
  text-align: center;
  text-transform: uppercase;
  color: var(--lg-green);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: 0.02em;
  margin: 0 0 32px;
}
.auth-content .alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  margin-bottom: 16px;
}
.auth-content .alert > .fa { margin-top: 2px; }

/* Admin / Employee switch */
.auth-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 18px;
  border-radius: 10px;
  background: var(--lg-field);
}
.auth-content .auth-role {
  position: relative;
  margin: 0;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.auth-role input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.auth-role:hover { color: var(--lg-green-dark); }
.auth-role.is-active {
  background: #fff;
  color: var(--lg-green-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.auth-role:focus-within { box-shadow: 0 0 0 2px rgba(46, 139, 61, 0.35); }

.auth-content .form-group { margin-bottom: 16px; }
.auth-content label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  color: #222;
  margin: 0 0 6px 2px;
}

/* Icon-prefixed pill field */
.auth-field {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--lg-field);
}
.auth-field-icon {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lg-green);
  color: #fff;
  font-size: 1rem;
  border-radius: 8px 0 0 8px;
}
.auth-field .form-control {
  flex: 1 1 auto;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 40px 0 14px;
  font-size: 0.9rem;
  color: #222;
}
.auth-field .form-control:focus { background: #ededed; box-shadow: none; }
.auth-field:focus-within { box-shadow: 0 0 0 2px rgba(46, 139, 61, 0.35); }
.auth-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #6b6b6b;
  border-radius: 50%;
  cursor: pointer;
}
.auth-toggle:hover { color: var(--lg-green-dark); background: rgba(0, 0, 0, 0.05); }
.has-error .auth-field { box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.45); }
.auth-content .help-block { color: #c62828; font-size: 0.75rem; margin: 5px 0 0 2px; display: block; }

/* Remember / forgot row */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 20px;
  font-size: 0.82rem;
  color: #333;
}
.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  margin: 0;
  cursor: pointer;
}
.auth-remember input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--lg-green);
  cursor: pointer;
}
.auth-forgot { color: #333; }
.auth-forgot:hover { color: var(--lg-green); text-decoration: underline; }

/* Submit */
.auth-submit {
  display: block;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--lg-green);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.auth-submit:hover { background: var(--lg-green-hover); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:focus-visible { outline: 3px solid rgba(46, 139, 61, 0.35); outline-offset: 2px; }
.auth-submit .auth-submit-busy { display: none; letter-spacing: 0.02em; font-weight: 600; }
.auth-submit.is-busy { background: var(--lg-green-hover); cursor: progress; opacity: 0.9; }
.auth-submit.is-busy .auth-submit-label { display: none; }
.auth-submit.is-busy .auth-submit-busy { display: inline; }

/* Demo login details below the card (config: show_demo_logins) — one line per account */
.auth-demo {
  width: 100%;
  max-width: 400px;
  margin-top: 26px;
}
.auth-demo-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b5b5b;
}
.auth-demo-title .fa { color: var(--lg-green); }
.auth-demo-list {
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.auth-demo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 8px 14px;
  border: 0;
  border-top: 1px solid #ececec;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  color: #222;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.auth-demo-row:first-child { border-top: 0; }
.auth-demo-row:hover,
.auth-demo-row.is-picked { background: #f2faf3; }
.auth-demo-row:focus-visible { outline: 3px solid rgba(46, 139, 61, 0.35); outline-offset: -3px; }
.auth-demo-role {
  flex: 0 0 96px;
  font-weight: 800;
  color: var(--lg-green-dark);
}
.auth-demo-role .fa { width: 14px; margin-right: 4px; text-align: center; }
.auth-demo-row code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: #1a1a1a;
  background: none;
  padding: 0;
  white-space: nowrap;
}
.auth-demo-sep { color: #9a9a9a; }
.auth-demo-hint {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--lg-green);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.auth-demo-row:hover .auth-demo-hint,
.auth-demo-row:focus-visible .auth-demo-hint { opacity: 1; }

.auth-copy {
  margin: 22px 0 0;
  font-size: 0.75rem;
  color: #6b6b6b;
  text-align: center;
}
.auth-copy a { color: #333; font-weight: 600; }

@media (max-width: 575.98px) {
  .auth-wrap { padding: 70px 16px 24px; }
  .auth-content { padding: 68px 22px 32px; }
  .auth-title { font-size: 1.55rem; }
  .auth-demo-row { flex-wrap: wrap; row-gap: 2px; }
  .auth-demo-role { flex-basis: 100%; }
  .auth-demo-hint { display: none; }
}