/* ── TheatreBase — Login / Auth Pages ── */

/* ── Field-level validation feedback ── */
.field-hint {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  min-height: 14px;
  transition: color .1s;
}
.field-hint.error { color: #d06060; }
.field-hint.ok    { color: var(--go-txt); }

.input.invalid {
  border-color: rgba(176,48,48,.6) !important;
  background: rgba(176,48,48,.04);
}
.input.valid {
  border-color: rgba(47,158,82,.4) !important;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Split layout ── */
.auth-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 480px;
  min-height: 100vh;
}

/* Left panel — decorative */
.auth-panel {
  background: var(--chrome2);
  border-right: 1px solid var(--div);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.panel-top { position: relative; z-index: 1; }
.panel-quote {
  margin-top: auto;
  position: relative;
  z-index: 1;
}
.panel-quote blockquote {
  font-family: var(--display-serif);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 16px;
}
.panel-quote blockquote span { color: var(--go-txt); font-style: italic; }
.panel-attribution {
  font-size: 12px;
  color: var(--text3);
}

/* Stage illustration marks */
.stage-marks {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}
.stage-mark {
  height: 3px;
  border-radius: 2px;
  background: var(--div2);
}
.stage-mark.active { background: var(--go); width: 28px; }
.stage-mark:not(.active) { width: 10px; }

/* Right panel — form */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
  background: var(--bg);
}
.auth-form-wrap {
  max-width: 340px;
  width: 100%;
  margin: 0 auto;
}

/* Header */
.auth-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form .btn {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 14px;
  margin-top: 4px;
}

/* Input with icon */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .input { padding-left: 38px; }
.input-icon {
  position: absolute;
  left: 12px;
  color: var(--text3);
  pointer-events: none;
  display: flex;
}
.input-wrap .input:focus ~ .input-icon,
.input-wrap .input:focus + .input-icon { color: var(--text2); }

/* Show/hide password */
.input-suffix {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  padding: 4px;
  border-radius: 3px;
  transition: color .1s;
}
.input-suffix:hover { color: var(--text2); }

/* Remember / forgot row */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--text2);
}
.auth-check input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--go);
  cursor: pointer;
}
.auth-forgot { font-size: 12px; color: var(--text3); }
.auth-forgot:hover { color: var(--blue-txt); }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--div);
}
.auth-divider span { font-size: 11px; color: var(--text3); white-space: nowrap; }

/* SSO / provider buttons */
.sso-btn {
  width: 100%;
  justify-content: center;
  gap: 8px;
  padding: 9px;
  font-size: 13px;
  background: var(--chrome2);
  border: 1px solid var(--div2);
  color: var(--text2);
  border-radius: var(--r2);
  cursor: pointer;
  font-family: var(--ui);
  font-weight: 500;
  display: flex;
  align-items: center;
  transition: background .1s, color .1s, border-color .1s;
}
.sso-btn:hover { background: var(--chrome3); color: var(--text); border-color: var(--div2); }

/* Footer link */
.auth-switch {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  margin-top: 24px;
}
.auth-switch a { color: var(--blue-txt); font-weight: 500; }
.auth-switch a:hover { color: var(--text); }

/* Error / alert states */
.auth-error {
  background: rgba(176,48,48,.1);
  border: 1px solid rgba(176,48,48,.3);
  color: #d06060;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: var(--r);
  display: none;
}
.auth-error.show { display: block; }

/* Loading spinner on button */
.btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}
.btn.loading .btn-spinner { display: block; }
.btn.loading .btn-label { opacity: .6; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 800px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
  .auth-form-panel { padding: 40px 24px; }
}

@media (max-width: 480px) {
  .auth-form-panel { padding: 32px 20px 48px; }
  .auth-form-wrap { max-width: 100%; }
  .auth-heading { font-size: 20px; }
  /* SSO buttons full width already; ensure consistent sizing */
  .auth-form .btn { min-height: 48px; font-size: 15px; }
}
