/* Sign-in pages: log in, sign up, MFA setup (templates 0_auth_base.html, 1*_*.html). */
:root {
  --green: #228B22; --green-dark: #1a6b1a; --green-light: rgba(34,139,34,0.1); 
  --body: #F5F5F5; --card: #FFFFFF; --border: rgba(0,0,0,0.12);
  --text: #1a1a1a; --text-2: #555555; --text-3: #888888;
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--body); color: var(--text); }
button { font-family: inherit; cursor: pointer; }

#auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px;
  box-shadow: var(--shadow-lg);
}

.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 32px; }
.brand-logo { width: 48px; height: 48px; background: var(--green); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.brand-logo svg { width: 32px; height: 32px; }
.brand-name { font-size: 24px; font-weight: 700; line-height: 1; }
.brand-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.auth-header { text-align: center; margin-bottom: 28px; }
.auth-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.3px; }
.auth-subtitle { font-size: 14px; color: var(--text-2); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; transition: all var(--transition); }
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); outline: none; }

.btn-primary { width: 100%; padding: 14px; background: var(--green); color: white; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; transition: all var(--transition); margin-top: 8px; }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(34,139,34,0.25); }

.auth-footer { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); text-align: center; }
.switch-mode { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--text-2); }
.switch-mode span { color: var(--green); font-weight: 600; cursor: pointer; }
.switch-mode span:hover { text-decoration: underline; }

/* Hidden state for toggling */
.hidden { display: none; }

/* SECURITY: Honeypot style (hidden from real users) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === GREEN ACCENTS (client: less grey) — added 2026-10-24 === */
body { background: radial-gradient(1200px 600px at 15% 0%, rgba(34,139,34,0.16), transparent 60%), radial-gradient(900px 500px at 100% 100%, rgba(34,139,34,0.12), transparent 60%), var(--body); }
.auth-card { border-top: 4px solid var(--green); }
/* === END GREEN ACCENTS === */

/* Links, messages and the MFA setup panel */
.switch-mode a { color: var(--green); font-weight: 600; text-decoration: none; }
.switch-mode a:hover { text-decoration: underline; }
.auth-error { color: #DC2626; font-size: 13px; text-align: center; margin-bottom: 12px; }
.auth-error ul { list-style: none; }
.auth-notice { padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.55; margin-bottom: 16px;
               background: var(--green-light); color: var(--green-dark); border: 1px solid rgba(34,139,34,0.25); }
.auth-notice.warn { background: #fff8e6; color: #7a4e00; border-color: #f0d68a; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.mfa-qr { display: flex; justify-content: center; margin: 8px 0 14px; }
.mfa-qr img { width: 176px; height: 176px; background: #fff; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.mfa-secret { display: block; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px;
              letter-spacing: 2px; word-break: break-all; padding: 10px; background: #f4f6f4; border-radius: 8px;
              margin-bottom: 16px; user-select: all; }
.btn-link { background: none; border: none; color: var(--text-3); font-size: 13px; text-decoration: underline; padding: 0; }
.inline-form { display: inline; }

/* Error pages (404, 403, 500...): the link back, centred, no underline */
.auth-back { text-align: center; margin-top: 22px; font-size: 14px; }
.auth-back a { color: var(--green, #228B22); font-weight: 600; text-decoration: none; }
.auth-back a:hover, .auth-back a:focus { text-decoration: none; opacity: .8; }

/* Smooth switch between Log in and Create account: browsers that support
   cross-page view transitions cross-fade the card; others fade it in. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; }
.auth-card { animation: auth-in 260ms cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes auth-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .auth-card { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
.switch-mode a { color: var(--green); font-weight: 600; text-decoration: none; }
.switch-mode a:hover { text-decoration: underline; }

/* Password field with a hold-to-show eye */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--text-3); display: flex; align-items: center; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.pw-eye:hover, .pw-eye.on { color: var(--green); background: var(--green-light); }
.pw-eye svg { width: 18px; height: 18px; pointer-events: none; }

/* Footer links (support) */
.auth-links { margin-top: 10px; font-size: 12.5px; }
.auth-links a { color: var(--text-2); text-decoration: none; }
.auth-links a:hover { color: var(--green); }

/* Wider card with a two-column form (company details) */
.auth-card.auth-card-wide { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field select { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; background: #fff; font-family: inherit; }
.field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); outline: none; }
.field .opt { font-weight: 400; color: var(--text-3); }
.link-button { border: 0; background: none; color: var(--text-2); font-size: 13px; text-decoration: none; }
.link-button:hover { color: var(--green); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .auth-card { padding: 28px 20px; } }

[hidden] { display: none !important; }
