/* Auth shell */

/* Brand-panel surface family — foregrounds relative to --octo-auth-brand-bg.
   Defaults assume the dark panel; a light skin overrides these together. */
:root {
  --octo-auth-brand-bg:        var(--octo-charcoal);
  --octo-auth-brand-grid:      rgba(255,255,255,0.015);
  --octo-auth-brand-glow:      rgba(0,175,175,0.12);
  --octo-auth-brand-logo-fill: var(--octo-teal-light);
  --octo-auth-brand-tagline:   rgba(255,255,255,0.2);
  --octo-auth-brand-copy:      rgba(255,255,255,0.72);
  --octo-auth-brand-footer:    rgba(255,255,255,0.12);
}

body.octo-auth-body { min-height: 100vh; display: flex; background: var(--octo-off); }

.auth-page { display: flex; width: 100%; min-height: 100vh; }
.auth-brand { width: 480px; flex-shrink: 0; background: var(--octo-auth-brand-bg); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; position: relative; overflow: hidden; }
.auth-brand::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--octo-auth-brand-grid) 1px, transparent 1px), linear-gradient(90deg, var(--octo-auth-brand-grid) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.auth-brand::after { content: ""; position: absolute; bottom: -120px; inset-inline-end: -120px; width: 400px; height: 400px; background: radial-gradient(circle, var(--octo-auth-brand-glow) 0%, transparent 70%); pointer-events: none; }
.auth-brand-inner { position: relative; z-index: 1; text-align: center; }
.auth-brand-logo svg, .auth-brand-logo img { width: 84px; height: 84px; margin-bottom: 16px; }
.auth-brand-logo svg { fill: var(--octo-auth-brand-logo-fill); }
.auth-brand-tagline { font-family: var(--octo-font-display); font-size: 11px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; color: var(--octo-auth-brand-tagline); }
.auth-brand-copy { margin-top: 18px; max-width: 300px; font-size: var(--octo-text-sm); color: var(--octo-auth-brand-copy); line-height: 1.7; }
.auth-brand-footer { position: absolute; bottom: 32px; inset-inline-start: 0; inset-inline-end: 0; text-align: center; font-size: 11px; color: var(--octo-auth-brand-footer); z-index: 1; }

.auth-form-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--octo-off); }

/* Language switcher on the sign-in screen: the form panel centres its card, so the switcher is taken out
   of that flow and pinned to the leading top corner (logical properties, so it follows the direction). */
.auth-form-panel { position: relative; }
.auth-lang { position: absolute; inset-block-start: 20px; inset-inline-end: 20px; z-index: 2; }

@media (max-width: 900px) {
  .auth-lang { inset-block-start: 12px; inset-inline-end: 12px; }
}
.auth-form-container { width: 100%; max-width: 400px; }
.auth-form-header { margin-bottom: 28px; }
.auth-form-title { font-family: var(--octo-font-display); font-size: 24px; font-weight: 800; color: var(--octo-charcoal); letter-spacing: -0.5px; margin-bottom: 6px; }
.auth-form-subtitle { font-size: var(--octo-text-base); color: var(--octo-grey); line-height: 1.5; }
.auth-form-subtitle a { color: var(--octo-teal); font-weight: 600; text-decoration: none; }
.auth-form-subtitle a:hover { color: var(--octo-teal-hover); text-decoration: underline; }
.auth-card { background: var(--octo-white); border: 1px solid var(--octo-rule); border-radius: var(--octo-radius-xl); padding: 28px; box-shadow: var(--octo-shadow-md); }
.auth-field { margin-bottom: 18px; }
.auth-field:last-child { margin-bottom: 0; }
.auth-password-wrap { position: relative; }
.auth-password-wrap .octo-input { padding-inline-end: 44px; }
.auth-password-toggle { position: absolute; inset-inline-end: 1px; top: 1px; bottom: 1px; width: 40px; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: var(--octo-grey-light); border-radius: 0 var(--octo-radius-md) var(--octo-radius-md) 0; transition: color var(--octo-duration) var(--octo-ease); }
.auth-password-toggle:hover { color: var(--octo-grey); }
.auth-password-toggle i { font-size: 16px; }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.auth-link { font-size: var(--octo-text-sm); font-weight: 600; color: var(--octo-teal); text-decoration: none; }
.auth-link:hover { color: var(--octo-teal-hover); text-decoration: underline; }
.auth-submit { width: 100%; height: 44px; border: none; border-radius: var(--octo-radius-md); background: var(--octo-teal); color: var(--octo-white); font-family: var(--octo-font-display); font-size: var(--octo-text-base); font-weight: 700; letter-spacing: 0.3px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all var(--octo-duration) var(--octo-ease); }
.auth-submit:hover { background: var(--octo-teal-hover); box-shadow: 0 4px 14px rgba(0,139,139,0.3); }
.auth-submit:active { transform: translateY(1px); }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; }
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--octo-rule); }
.auth-divider span { font-size: 11px; font-weight: 600; color: var(--octo-grey-light); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.auth-social { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-social-btn { flex: 1; min-width: 120px; height: 42px; border: 1px solid var(--octo-rule); border-radius: var(--octo-radius-md); background: var(--octo-white); font-family: var(--octo-font-body); font-size: var(--octo-text-sm); font-weight: 600; color: var(--octo-mid); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all var(--octo-duration) var(--octo-ease); text-decoration: none; }
.auth-social-btn:hover { background: var(--octo-light); border-color: var(--octo-grey-light); color: var(--octo-mid); }
.auth-social-btn i { font-size: 16px; }
.auth-footer-text { text-align: center; margin-top: 18px; font-size: var(--octo-text-sm); color: var(--octo-grey); }
.auth-footer-text a { color: var(--octo-teal); font-weight: 600; text-decoration: none; }
.auth-footer-text a:hover { text-decoration: underline; }
/* A second way forward under a form ("Back to sign in", "Log in with a recovery code"). */
.auth-alt-action { text-align: center; margin: 18px 0 0; font-size: var(--octo-text-sm); color: var(--octo-grey); }
/* The submit button as a link (a status screen's "Back to sign in"), and its destructive tone. */
a.auth-submit { text-decoration: none; }
.auth-submit.danger { background: var(--octo-error); }
.auth-submit.danger:hover { background: var(--octo-error); filter: brightness(0.92); box-shadow: 0 4px 14px rgba(220,38,38,0.28); }
/* A sentence of guidance above the fields of a card. */
.auth-intro { margin: 0 0 18px; font-size: var(--octo-text-sm); line-height: 1.6; color: var(--octo-grey); }
/* Status screen — a page that only says what happened (locked out, link sent, password reset, e-mail
   confirmed) and where to go next:  .auth-card.auth-status > .auth-status-icon[.success|.warning|.error]
   + .auth-status-title + .auth-status-text + a.auth-submit */
.auth-status { text-align: center; }
.auth-status-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--octo-teal-ghost); color: var(--octo-teal); }
.auth-status-icon.success { background: var(--octo-success-light); color: var(--octo-success); }
.auth-status-icon.warning { background: var(--octo-warning-light); color: var(--octo-warning); }
.auth-status-icon.error { background: var(--octo-error-light); color: var(--octo-error); }
.auth-status-title { margin: 0 0 8px; font-family: var(--octo-font-display); font-size: var(--octo-text-lg); font-weight: 700; letter-spacing: -0.2px; color: var(--octo-charcoal); }
.auth-status-text { margin: 0 0 22px; font-size: var(--octo-text-sm); line-height: 1.6; color: var(--octo-grey); overflow-wrap: anywhere; }
.auth-status-text:last-child { margin-bottom: 0; }
.auth-validation.validation-summary-valid { display: none; }
.auth-validation ul { list-style: none; margin: 0; padding: 0; }
.auth-validation li { margin: 0; }
.auth-field .text-danger { display: block; margin-top: 4px; font-size: 11px; font-weight: 500; color: var(--octo-error) !important; }
.setup-auth-header { margin-bottom: 22px; }
.setup-auth-card { max-width: 460px; }
.setup-info-box { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; padding: 14px 16px; border: 1px solid var(--octo-rule); border-inline-start: 4px solid var(--octo-teal); border-radius: var(--octo-radius-md); background: var(--octo-light); color: var(--octo-mid); font-size: var(--octo-text-sm); line-height: 1.6; }
.setup-info-box i { color: var(--octo-teal); margin-top: 2px; }
.setup-password-indicator { margin-top: 6px; font-size: 12px; color: var(--octo-grey-light); }
.setup-password-indicator.match { color: var(--octo-success); }
.setup-password-indicator.mismatch { color: var(--octo-error); }

@media (max-width: 960px) {
  .auth-brand { width: 360px; padding: 32px; }
}

@media (max-width: 768px) {
  .auth-page { flex-direction: column; }
  .auth-brand { width: 100%; padding: 24px; min-height: auto; flex-direction: row; justify-content: center; gap: 14px; }
  .auth-brand-inner { text-align: start; display: flex; align-items: center; gap: 14px; }
  .auth-brand-logo svg, .auth-brand-logo img { width: 40px; height: 40px; margin-bottom: 0; }
  .auth-brand-tagline,
  .auth-brand-copy,
  .auth-brand-footer { display: none; }
  .auth-form-panel { padding: 28px 20px; }
  .auth-card { padding: 22px; }
}

@media (max-width: 480px) {
  .auth-social { flex-direction: column; }
  .auth-options { flex-direction: column; align-items: flex-start; }
}

/* A long form (registration) scrolls past the brand panel on a desktop, which left the art sliding
   away above the fold. The panel is its own full-height column and stays put while the form moves;
   below 768px the two stack and the panel is a header again, so the rule is desktop-only. */
@media (min-width: 769px) {
  .auth-brand { position: sticky; top: 0; align-self: flex-start; height: 100vh; }
}
