/* ═══════════════════════════════════════════
   AUTH PAGES — shared styles
   Used by: login.html, register.html,
            forgot_password.html, reset_password.html
═══════════════════════════════════════════ */
.auth-wrap  { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card  { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 420px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.08); }
.auth-card.auth-card-wide { max-width: 440px; }
.auth-hero  { background: var(--primary); padding: 2rem; text-align: center; }
.auth-logo  { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: .75rem; }
.auth-site  { color: var(--primary-light); font-weight: 700; font-size: 1.1rem; margin: 0; }
.auth-tag   { color: var(--primary-mid); font-size: .8rem; margin: .25rem 0 0; }
.auth-body  { padding: 1.75rem; }

.auth-form-label {
  display: block; font-size: .75rem; font-weight: 700; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: .35rem;
}
.auth-input {
  width: 100%; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 8px;
  font-size: .9rem; background: var(--surface); color: var(--ink-1, var(--ink));
  box-sizing: border-box; transition: border-color .15s; font-family: inherit;
}
.auth-input:focus { outline: none; border-color: var(--primary); }

.btn-auth {
  width: 100%; padding: .7rem; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: opacity .15s; margin-top: .25rem; font-family: inherit;
}
.btn-auth:hover   { opacity: .88; }
.btn-auth:disabled { opacity: .5; cursor: not-allowed; }

.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.1rem 0; color: var(--ink-2); font-size: .78rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-footer { text-align: center; font-size: .82rem; color: var(--ink-2); margin-top: 1.25rem; }
.auth-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* Password strength */
.pwd-row    { position: relative; margin-bottom: .25rem; }
.pwd-toggle { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--ink-2); padding: 0; }
.strength-bar  { height: 4px; border-radius: 2px; background: var(--border); margin-top: 6px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 2px; width: 0; transition: width .3s, background .3s; }
.strength-label { font-size: .72rem; margin-top: 4px; font-weight: 600; }
.pwd-rules { font-size: .75rem; color: var(--ink-2); margin: .5rem 0 0; line-height: 1.7; padding: 0; }
.pwd-rules li { list-style: none; padding-left: 1.4em; position: relative; }
.pwd-rules li::before { content: '✗'; position: absolute; left: 0; color: var(--error); font-size: .7rem; }
.pwd-rules li.ok::before { content: '✓'; color: var(--success); }
.match-msg { font-size: .72rem; margin-top: 4px; font-weight: 600; }

/* Auth alert boxes */
.auth-err  { background: var(--error-bg);   border: 1px solid var(--error-border);   color: var(--error);   border-radius: 8px; padding: .6rem .85rem; font-size: .82rem; margin-bottom: .75rem; display: none; }
.auth-ok   { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success); border-radius: 8px; padding: .6rem .85rem; font-size: .82rem; margin-bottom: .75rem; display: none; }
.auth-info { background: var(--info-bg);    border: 1px solid var(--info-border);    color: var(--info);    border-radius: 8px; padding: .85rem 1rem; font-size: .83rem; line-height: 1.55; margin-bottom: 1.1rem; }

/* Success / invalid full-card states */
.auth-state-box { border-radius: 8px; padding: 1.25rem 1rem; font-size: .88rem; line-height: 1.6; text-align: center; display: none; }
.auth-state-ok      { background: var(--success-bg); border: 1px solid var(--success-border); color: #15803d; }
.auth-state-invalid { background: var(--error-bg);   border: 1px solid var(--error-border);   color: var(--error); }

/* Modal tab switcher for base.html login modal */
.modal-tab-bar { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 1rem; }
.modal-tab { flex: 1; padding: .5rem; font-size: .82rem; font-weight: 600; cursor: pointer; border: none; background: var(--surface); color: var(--ink-2); transition: background .15s; font-family: inherit; }
.modal-tab.active { background: var(--primary); color: #fff; }
