/* Auth pages: GhostCite minimal styling */
#auth-root {
  max-width: 420px;
  margin: 2rem auto;
  padding: 0 1rem;
}
#auth-root:has(.signup-split) {
  max-width: none;
  margin: 0;
  padding: 0;
}
#auth-root:has(.login-split) {
  max-width: none;
  margin: 0;
  padding: 0;
}
#auth-root:has(.settings-control-center) {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Login: 50/50 split (form first on mobile, trust stack below) */
.login-split {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height, 4.5rem));
  background: #f9fafb;
}
@media (min-width: 900px) {
  .login-split {
    flex-direction: row;
    min-height: calc(100vh - var(--header-height, 4.5rem));
  }
}
.login-trust-column {
  flex: 0 0 auto;
  order: 2;
  padding: 2rem 1.5rem;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
@media (min-width: 900px) {
  .login-trust-column {
    order: 1;
    flex: 1 1 50%;
    padding: 3rem 2rem;
  }
}
.login-feature-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 360px;
}
.login-feature-stack img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}
@media (min-width: 900px) {
  .login-feature-stack {
    max-width: 420px;
    gap: 1rem;
  }
}
.login-feature-caption {
  font-size: 0.8125rem;
  color: #6b7280;
  text-align: center;
  margin-top: 1rem;
  padding: 0 0.5rem;
  line-height: 1.5;
}
.login-form-column {
  flex: 1 1 auto;
  order: 1;
  padding: 2rem 1.5rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 900px) {
  .login-form-column {
    order: 2;
    flex: 1 1 50%;
    padding: 3rem 2.5rem;
    max-width: 50%;
  }
}
.login-form-inner {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .login-form-inner {
    max-width: 400px;
    margin: 0;
  }
}
.login-form-inner .auth-card {
  box-shadow: none;
  border: none;
  padding: 0;
  background: transparent;
}
.login-headline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}
@media (min-width: 600px) {
  .login-headline {
    font-size: 1.75rem;
  }
}
.login-subheadline {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.login-security-note {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

/* Signup: high-conversion split-screen (Trust Engine left, form right) */
.signup-split {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height, 4.5rem));
  background: #f8f9fa;
}
@media (min-width: 900px) {
  .signup-split {
    flex-direction: row;
    min-height: calc(100vh - var(--header-height, 4.5rem));
  }
}
.signup-trust-column {
  flex: 0 0 auto;
  padding: 2rem 1.5rem;
  background: #0f172a;
  background: radial-gradient(ellipse 90% 80% at 50% 40%, #1e293b 0%, #0f172a 60%, #0c1222 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
@media (min-width: 900px) {
  .signup-trust-column {
    flex: 1 1 50%;
    padding: 3rem 2rem;
  }
}
.signup-trust-hook {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  /* Lighter tint of logo blue (#0A1E3C) for readability on dark background */
  color: #60a5fa;
  text-align: center;
  margin: 0 0 2rem 0;
  padding: 0 0.5rem;
  line-height: 1.2;
  max-width: 375px;
}
@media (min-width: 600px) {
  .signup-trust-hook {
    font-size: 1.75rem;
  }
}
@media (min-width: 900px) {
  .signup-trust-hook {
    max-width: 450px;
    margin-bottom: 2.5rem;
  }
}
/* Feature stack: card wrappers with elevation, full screenshot visible */
.signup-feature-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 375px;
}
@media (min-width: 900px) {
  .signup-feature-stack {
    max-width: 450px;
    gap: 2rem;
  }
}
.signup-feature-card {
  width: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}
.signup-feature-card-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  -o-object-fit: contain;
     object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translateZ(0);
}
.signup-feature-caption {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #9ca3af;
  text-align: center;
  margin-top: 1.5rem;
  padding: 0 0.5rem;
  line-height: 1.5;
}
.signup-form-column {
  flex: 1 1 auto;
  padding: 2rem 1.5rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 900px) {
  .signup-form-column {
    flex: 1 1 50%;
    padding: 3rem 2.5rem;
    max-width: 50%;
  }
}
.signup-form-inner {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .signup-form-inner {
    max-width: 400px;
    margin: 0;
  }
}
.signup-form-inner .auth-card {
  box-shadow: none;
  border: none;
  padding: 0;
  background: transparent;
}
.signup-headline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}
.signup-subheadline {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.signup-security-note {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  line-height: 1.45;
}

.auth-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.auth-card-logo {
  display: block;
  max-width: 180px;
  height: auto;
  margin: 0 auto 1rem;
}
.auth-card h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 0.5rem 0;
}
.auth-card .sub {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
}
.auth-card label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}
.auth-card input:focus {
  outline: none;
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.2);
}
.auth-card .btn {
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  margin-top: 0.25rem;
}
.auth-card .btn-primary {
  background: #000;
  color: #fff;
}
.auth-card .btn-primary:hover { background: #1f2937; }
.auth-card .btn-secondary {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #4b5563;
}
.auth-card .btn-secondary:hover { background: #e5e7eb; color: #374151; border-color: #374151; }
.auth-card .btn-ghost {
  background: transparent;
  color: #4b5563;
  border: 1px solid #4b5563;
}
.auth-card .btn-ghost:hover { background: #f9fafb; border-color: #374151; color: #374151; }
.auth-card .btn-danger {
  background: #dc2626;
  color: #fff;
}
.auth-card .btn-danger:hover { background: #b91c1c; }
.logout-success-card .logout-success-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.logout-success-card .logout-success-actions .btn { width: auto; }
.auth-settings .settings-section { margin-top: 1.5rem; }
.auth-settings .settings-section:first-of-type { margin-top: 0; }
.auth-settings .settings-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; margin: 0 0 0.25rem 0; }
.auth-settings .settings-value { margin: 0 0 0.5rem 0; font-size: 1rem; color: #111; }
.auth-card .divider {
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
  margin: 1rem 0;
}
.auth-card .oauth-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.auth-card .oauth-row .btn { flex: 1; }
.auth-card .link-row {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
}
.auth-card .link-row a { color: #2563eb; text-decoration: none; }
.auth-card .link-row a:hover { text-decoration: underline; }
.auth-card .error {
  font-size: 0.875rem;
  color: #dc2626;
  margin-bottom: 0.75rem;
}
.auth-card .success {
  font-size: 0.875rem;
  color: #059669;
  margin-bottom: 0.75rem;
}
.auth-settings section {
  margin-bottom: 1.5rem;
}
.auth-settings h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.5rem;
}
.auth-settings .token-display {
  font-family: monospace;
  font-size: 0.875rem;
  color: #6b7280;
}
.auth-settings .mfa-codes {
  font-family: monospace;
  font-size: 0.75rem;
  background: #f9fafb;
  padding: 0.75rem;
  border-radius: 6px;
  margin-top: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

/* ——— Token Display (Prominent) ——— */
.settings-token-display {
  background: #f0fdf4;
  border: 2px solid #22c55e;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.settings-token-display p {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #16a34a;
  letter-spacing: 0.3px;
}
.settings-token-display .success {
  font-size: 1.125rem;
  color: #16a34a;
  margin: 0;
}

/* ——— Settings Control Center (two-column layout) ——— */
.settings-control-center {
  font-family: "Inter", system-ui, sans-serif;
  max-width: 100%;
}
.settings-page-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 0.25rem 0;
}
.settings-page-sub {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}
.settings-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr 340px;
    gap: 2rem;
  }
}
.settings-main { min-width: 0; }
.settings-sidebar { min-width: 0; }

.settings-panel {
  margin-bottom: 1.5rem;
  padding: 1.25rem 0 0 1rem;
  border-left: 4px solid #059669;
  background: linear-gradient(to right, rgba(5, 150, 105, 0.04) 0%, transparent 8rem);
  border-radius: 0 8px 8px 0;
}
.settings-panel-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.settings-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #059669;
  background: rgba(5, 150, 105, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.settings-control-center .settings-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin: 0 0 0.25rem 0;
}
.settings-control-center .settings-value {
  font-size: 1rem;
  color: #111;
  margin: 0 0 0.5rem 0;
}
.settings-form { margin-top: 1rem; }
.settings-control-center .settings-panel label { display: block; margin-bottom: 0.25rem; }
.settings-control-center .settings-panel input[type="text"],
.settings-control-center .settings-panel input[type="email"],
.settings-control-center .settings-panel input[type="password"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}
.settings-btn-primary {
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-weight: 500;
}

.settings-api-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}
.settings-token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.settings-token-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 200px;
}
.settings-token-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.settings-token-input-wrap input {
  padding-right: 2.5rem;
  width: 100%;
  margin-bottom: 0;
}
.settings-token-toggle {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #6b7280;
}
.settings-token-form .settings-btn-primary { width: auto; min-width: 5rem; }
.settings-standout-note {
  font-size: 0.875rem;
  font-weight: 600;
  color: #059669;
  margin-top: 0.75rem;
  padding: 0.5rem 0;
  line-height: 1.4;
}

.settings-stats-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 0.5rem;
}
.settings-stats-value {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 0.25rem 0;
  line-height: 1;
}
.settings-stats-label { font-size: 0.875rem; color: #6b7280; margin: 0 0 0.5rem 0; }
.settings-stats-desc {
  font-size: 0.8125rem;
  color: #4b5563;
  line-height: 1.5;
  margin: 0;
}

.settings-danger-zone { margin-top: auto; }
.settings-panel-delete {
  border-left-color: #dc2626;
  background: linear-gradient(to right, rgba(220, 38, 38, 0.06) 0%, #fef2f2 2rem);
}
.settings-panel-delete .settings-panel-title { color: #991b1b; }
.settings-link-row {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
}
.settings-link-row a { color: #2563eb; text-decoration: none; }
.settings-link-row a:hover { text-decoration: underline; }
