/* ============================================
   BODYGUARD PANEL — LOGIN & 2FA PAGES
   Scoped under .ds-v2
   ============================================ */

.ds-v2 .auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--brand-50) 100%);
  padding: var(--space-4);
}

.ds-v2 .auth-container {
  width: 100%;
  max-width: 420px;
}

.ds-v2 .auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.ds-v2 .auth-logo img {
  width: 40px;
  height: 40px;
}

.ds-v2 .auth-logo-text {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

.ds-v2 .auth-card {
  background: var(--surface-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.ds-v2 .auth-card-header {
  padding: var(--space-6) var(--space-6) 0;
  text-align: center;
}

.ds-v2 .auth-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--brand-50);
  color: var(--brand-500);
  font-size: 24px;
  margin-bottom: var(--space-4);
}

.ds-v2 .auth-card-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.ds-v2 .auth-card-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.ds-v2 .auth-card-body {
  padding: var(--space-6);
}

.ds-v2 .auth-card-body .form-group:last-of-type {
  margin-bottom: var(--space-5);
}

.ds-v2 .auth-submit-btn {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.ds-v2 .auth-error {
  margin-bottom: var(--space-4);
}

.ds-v2 .auth-footer {
  padding: 0 var(--space-6) var(--space-6);
  text-align: center;
}

.ds-v2 .auth-footer a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.ds-v2 .auth-footer a:hover {
  color: var(--brand-500);
}

/* --- 2FA Specific --- */
.ds-v2 .totp-single-input {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.5em;
  padding: var(--space-4);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ds-v2 .totp-single-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* --- TOTP Setup specific --- */
.ds-v2 .setup-steps {
  text-align: left;
  margin: var(--space-4) 0;
  padding-left: var(--space-5);
  list-style: decimal;
}

.ds-v2 .setup-steps li {
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  list-style: decimal;
}

.ds-v2 .qr-container {
  text-align: center;
  margin: var(--space-5) 0;
}

.ds-v2 .qr-container canvas,
.ds-v2 .qr-container img {
  border: 4px solid var(--surface-primary);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  display: inline-block;
}

.ds-v2 .secret-key {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  letter-spacing: 3px;
  background: var(--gray-100);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  word-break: break-all;
  text-align: center;
  margin: var(--space-3) 0;
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.ds-v2 .success-message {
  color: var(--success);
  font-size: var(--text-lg);
  text-align: center;
}

.ds-v2 .success-message .material-symbols-outlined {
  font-size: 48px;
  display: block;
  margin: 0 auto var(--space-3);
}

/* --- Theme toggle on auth pages --- */
.ds-v2 .auth-theme-toggle {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 20px;
  transition: all var(--transition-fast);
  background: var(--surface-primary);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.ds-v2 .auth-theme-toggle:hover {
  color: var(--text-primary);
  background: var(--gray-100);
}

/* --- Dark mode auth adjustments --- */
[data-theme="dark"] .auth-page {
  background: linear-gradient(135deg, var(--gray-950) 0%, #0C1222 100%);
}

/* --- Auth footer text --- */
.ds-v2 .auth-bottom-text {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}
