/* login.css — acmedev.com branded auth gate
 *
 * Brand: #3779B5 primary blue, #E1EFF2 teal bg
 * Standalone login page. No frameworks.
 */

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

body {
  background: #F0F7F9;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Back link ── */

.back-link {
  position: fixed;
  top: 20px;
  left: 24px;
  color: #3779B5;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10;
}

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

/* ── Auth Card ── */

#auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
}

#auth-gate-inner {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-top: 4px solid #3779B5;
  border-radius: 8px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ── Brand ── */

#auth-title {
  color: #3779B5;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

#auth-powered {
  color: #9ca3af;
  font-size: 0.75rem;
  margin-top: 24px;
}

#auth-powered strong {
  color: #3779B5;
  font-weight: 700;
}

/* ── Form Elements ── */

#auth-form, #auth-qr-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#auth-form input, #auth-qr-view input {
  background: #F0F7F9;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #1f2937;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#auth-form input:focus, #auth-qr-view input:focus {
  border-color: #3779B5;
  box-shadow: 0 0 0 3px rgba(55, 121, 181, 0.12);
}

#auth-form input::placeholder, #auth-qr-view input::placeholder {
  color: #9ca3af;
}

/* ── Buttons ── */

#auth-login-btn, #auth-qr-verify-btn {
  background: #3779B5;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 12px;
  transition: background 0.2s;
}

#auth-login-btn:hover, #auth-qr-verify-btn:hover {
  background: #255179;
}

#auth-login-btn:disabled, #auth-qr-verify-btn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

#auth-register-btn {
  background: transparent;
  border: 1px solid #73A6D4;
  border-radius: 6px;
  color: #3779B5;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px;
  transition: background 0.2s, border-color 0.2s;
}

#auth-register-btn:hover {
  background: rgba(55, 121, 181, 0.06);
  border-color: #3779B5;
}

#auth-register-btn:disabled {
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

/* ── Divider ── */

#auth-divider {
  color: #9ca3af;
  font-size: 0.8rem;
  margin: 4px 0;
}

/* ── Error messages ── */

#auth-error, #auth-qr-error {
  color: #dc2626;
  font-size: 0.85rem;
  min-height: 1.2em;
}

/* ── QR View ── */

.hidden {
  display: none !important;
}

#auth-qr-canvas {
  margin: 0 auto 12px;
  border: 4px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

#auth-qr-label {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

/* ── Session Timer ── */

#auth-session-timer {
  position: fixed;
  top: 20px;
  right: 24px;
  color: #6b7280;
  font-size: 0.75rem;
}

#auth-session-timer.warning {
  color: #d4a24a;
  font-weight: 600;
}

#auth-session-timer.critical {
  color: #dc2626;
  font-weight: 700;
}

/* ── Responsive ── */

@media (max-width: 420px) {
  #auth-gate-inner {
    margin: 16px;
    padding: 28px 20px;
  }
}
