.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
}

.logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.header-spinner {
  position: relative;
  width: 20px;
  height: 20px;
  animation: spin 1.1s linear infinite;
}

.header-spinner-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px;
  border-radius: 50%;
  background: var(--primary);
  animation: dot-pulse 1.1s ease-in-out infinite;
}

/* 3 dots at 120° apart, each pushed out from center along its own rotated axis */
.header-spinner-dot:nth-child(1) { transform: rotate(0deg) translateY(-8px); animation-delay: 0s; }
.header-spinner-dot:nth-child(2) { transform: rotate(120deg) translateY(-8px); animation-delay: 0.15s; }
.header-spinner-dot:nth-child(3) { transform: rotate(240deg) translateY(-8px); animation-delay: 0.3s; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes dot-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.account,
.secondary,
.primary,
.danger {
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.account,
.secondary,
.danger {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.danger {
  padding: 10px 15px;
  color: var(--red);
  border-color: #f3c9c9;
}

.danger:hover {
  background: #fdf2f2;
  border-color: var(--red);
}

.danger.tiny {
  padding: 7px 10px;
  font-size: 12px;
}

.account {
  padding: 8px 13px;
  box-shadow: 0 10px 25px rgba(32, 36, 42, 0.05);
}

.secondary {
  padding: 10px 15px;
}

.secondary.tiny {
  padding: 7px 10px;
  font-size: 12px;
}

.primary {
  border: 0;
  background: var(--primary);
  color: white;
  padding: 10px 18px;
  font-weight: 600;
}

.primary:hover {
  background: var(--primary-dark);
}

.account:hover,
.secondary:hover,
.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(32, 36, 42, 0.08);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(32, 36, 42, 0.08);
  border-color: #d7dce4;
}

.card-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Collapsible card sections (e.g. Personal training in Settings) — .card-header doubles
   as a <button> here, so it needs the usual button reset on top of its existing layout. */
.card-header.collapse-toggle {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.collapse-arrow {
  color: var(--muted);
  transition: transform 0.15s ease;
  margin-left: auto;
}

.card-header.collapse-toggle[aria-expanded="true"] .collapse-arrow {
  transform: rotate(180deg);
}

.card-title {
  font-size: 14px;
  font-weight: 650;
}

.settings-section {
  display: grid;
  gap: 10px;
}

.settings-section + .settings-section {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 16px;
}

.settings-heading {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.compare-section {
  padding: 0 22px 22px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.compare-section .settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compare-section .issues-panel {
  padding: 12px 0 0;
}

.badge {
  font-size: 12px;
  color: var(--muted);
  background: #f1f2f4;
  padding: 5px 8px;
  border-radius: 6px;
}

.header-status-badge.connected {
  color: var(--green);
  background: #e6f7f0;
}

.disclaimer {
  margin-top: 24px;
  background: linear-gradient(135deg, #fff9e8 0%, #fff3c9 100%);
  border: 1px solid #f2df9d;
  border-radius: 14px;
  padding: 16px 18px;
  color: #725c1d;
  font-size: 12px;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 20, 28, 0.45);
  backdrop-filter: blur(8px);
}

.app-lock {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(244, 246, 249, 0.72);
  backdrop-filter: blur(10px);
}

.app-lock-card {
  width: min(460px, calc(100vw - 24px));
}

.app-lock-body {
  padding: 20px;
}

.auth-modal {
  position: relative;
  width: min(520px, calc(100vw - 24px));
  margin: 7vh auto 0;
  z-index: 1;
  animation: modal-in 0.28s ease both;
}

.auth-subtitle,
.auth-note {
  color: var(--muted);
  font-size: 13px;
}

.auth-note.hint {
  margin-top: 8px;
  padding: 10px 12px;
  background: #fff9e8;
  border: 1px solid #f2df9d;
  border-radius: 8px;
  color: var(--text);
}

.auth-form {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}

.auth-field input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fbfcfe;
}

.auth-field select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fbfcfe;
  font: inherit;
}

.captcha-row,
.auth-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.captcha-chip {
  min-width: 100px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f2f4f8;
  border: 1px solid var(--border);
  font-weight: 700;
  letter-spacing: 0.04em;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
