/* ── Auth pages ────────────────────────────────────────────────────────────── */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg1);
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.auth-card--wide {
  max-width: 520px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.auth-icon {
  font-size: 28px;
  line-height: 1;
}

.auth-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.auth-brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.auth-field input,
.auth-field select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  padding: 9px 12px;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: var(--blue);
}

.auth-field--inline {
  flex-direction: row;
  align-items: center;
}

.auth-field--inline label {
  text-transform: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  letter-spacing: 0;
}

.auth-btn {
  width: 100%;
  height: 42px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.auth-error {
  background: rgba(248, 81, 73, .15);
  border: 1px solid rgba(248, 81, 73, .4);
  border-radius: 6px;
  color: #f85149;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.auth-success {
  background: rgba(63, 185, 80, .15);
  border: 1px solid rgba(63, 185, 80, .4);
  border-radius: 6px;
  color: #3fb950;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.auth-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 18px;
  line-height: 1.5;
}

.auth-back {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.auth-back:hover { color: var(--text); }

.auth-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.auth-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.auth-links a:hover { color: var(--blue); }

.auth-otp-input {
  font-size: 22px !important;
  letter-spacing: .25em;
  text-align: center;
}

.auth-qr {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.auth-qr svg {
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  width: 180px;
  height: 180px;
}

.auth-secret {
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
}

.auth-steps {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 20px;
  margin: 0 0 16px;
  line-height: 1.8;
}

.auth-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 24px 0 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.auth-footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.auth-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.auth-footer-links a:hover { color: var(--text); }

.btn-link {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.btn-link:hover { text-decoration: underline; }

.account-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  background: var(--bg3);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
}

.acc-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
}

/* ── Settings page ────────────────────────────────────────────────────────────── */
.settings-body {
  align-items: flex-start;
  padding: 24px 16px;
}

.settings-wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.settings-header h1 {
  font-size: 20px;
  font-weight: 700;
}

.settings-header-right {
  display: flex;
  gap: 8px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 800px) {
  .settings-grid { grid-template-columns: 1fr; }
}

.settings-card {
  padding: 20px;
}

.settings-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}

.settings-table th {
  text-align: left;
  padding: 6px 8px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}

.settings-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

/* ── Mobile (\u2264 480px) ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card {
    padding: 24px 18px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Empêche le zoom iOS sur les inputs */
  .auth-field input,
  .auth-field select { font-size: 16px; }

  /* Settings page : 1 colonne */
  .settings-row-2 { grid-template-columns: 1fr; }

  /* Settings table : scroll horizontal */
  .settings-table { font-size: 12px; }
  .settings-table th,
  .settings-table td { padding: 6px 4px; }
}
