/* ---------- Admin login -- scoped to login.html only ---------- */

@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(242, 110, 34, .10), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(13, 56, 95, .10), transparent 45%),
    var(--bg);
  animation: page-fade .3s ease;
}

.auth-shell {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--panel);
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(13, 56, 95, .18);
  overflow: hidden;
  padding: 40px 40px 44px;
  animation: auth-rise .5s cubic-bezier(.2, .8, .2, 1);
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(14px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-card.shake { animation: auth-shake .38s ease; }
@keyframes auth-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* ---------- Logo, aligned right at the top of the card ---------- */
.auth-logo-row {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  animation: fade-up .5s ease .08s both;
}
.auth-logo-img {
  display: block;
  width: 260px;
  height: auto;
}

.auth-form {
  display: flex;
  flex-direction: column;
}
.auth-form-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary-color);
  animation: fade-up .5s ease .2s both;
}
.auth-form-title {
  margin: 0 0 30px;
  font-size: 22px;
  font-weight: 700;
  color: var(--secondary-color);
  animation: fade-up .5s ease .26s both;
}

.auth-timeout-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 22px;
  border-radius: 11px;
  background: #fff8ec;
  border: 1px solid #f2c94c;
  color: #8a6d1a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.auth-timeout-banner svg { flex-shrink: 0; margin-top: 1px; }

.input-group { margin-bottom: 18px; animation: fade-up .5s ease both; }
.input-group:nth-of-type(1) { animation-delay: .32s; }
.input-group:nth-of-type(2) { animation-delay: .38s; }
.input-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--text-dim);
  pointer-events: none;
  transition: color .15s ease;
}
.input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  font-size: 14.5px;
  font-family: inherit;
  background: #fbfcfe;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.input-wrap input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.input-wrap input:focus ~ .input-icon,
.input-wrap:has(input:focus) .input-icon {
  color: var(--primary-color);
}

.toggle-pw {
  position: absolute;
  right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.toggle-pw:hover { background: var(--secondary-soft); color: var(--secondary-color); }
.toggle-pw svg { width: 17px; height: 17px; }
.toggle-pw.is-active { color: var(--primary-color); }

.auth-submit {
  position: relative;
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  animation: fade-up .5s ease .44s both;
  border: none;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-600));
  box-shadow: 0 8px 20px rgba(242, 110, 34, .3);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, opacity .15s ease;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(242, 110, 34, .38); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { cursor: not-allowed; opacity: .85; transform: none; }

.auth-spinner {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  width: 17px; height: 17px;
  margin: -8.5px 0 0 -8.5px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-submit.is-loading .auth-submit-label { opacity: 0; }
.auth-submit.is-loading .auth-spinner { display: block; }

.auth-error {
  min-height: 18px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  text-align: center;
}

@media (max-width: 760px) {
  .auth-card { padding: 32px 28px; }
}
