/* Settings modal */
.sg-settings {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15,23,42,.4);
}
.sg-settings__panel {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 16px 48px rgba(15,23,42,.2);
}
.sg-settings__panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

/* Settings tabs */
.sg-settings-tabs {
  display: flex;
  gap: 6px;
  margin: -2px 0 16px;
}
.sg-settings-tabs__btn {
  flex: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  padding: 9px 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  transition: background .12s ease, color .12s ease;
}
.sg-settings-tabs__btn:hover { background: #f1f5f9; color: #334155; }
.sg-settings-tabs__btn.is-active {
  background: #eff6ff;
  color: #2563eb;
}
.sg-settings-tab[hidden] { display: none !important; }
.sg-settings__danger {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.sg-field--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.sg-field--checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #112d3a;
}

.sg-field--checkbox span {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.sg-settings__privacy {
  margin: 4px 0 0;
  font-size: 13px;
}

.sg-confirm--info .sg-confirm__actions {
  justify-content: flex-end;
}

.sg-settings__danger-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.sg-btn--block {
  width: 100%;
  justify-content: center;
}

#sg-settings-tab-pins .sg-btn + .sg-btn {
  margin-top: 10px;
}

.sg-btn--danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.sg-btn--danger:hover {
  background: #fee2e2;
  color: #991b1b;
}

.sg-settings__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.sg-settings__main-site {
  margin: 12px 0 0;
  text-align: center;
}

.sg-settings__main-site-link {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition: color .12s ease;
}

.sg-settings__main-site-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Compact numeric inputs (N / minutes) */
.sg-auth__intro {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.45;
}

.sg-auth__google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  text-decoration: none;
}

.sg-auth__magic {
  margin-top: 8px;
}

.sg-auth__email {
  font-weight: 600;
  margin: 0 0 14px;
  word-break: break-all;
  font-size: 0.95rem;
}

.sg-auth__section {
  margin: 0 0 14px;
  padding: 12px 0 0;
  border-top: 1px solid #e2e8f0;
}

.sg-auth__section-title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.sg-auth__hint {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}

.sg-auth__danger {
  margin-top: 16px;
}

.sg-auth-fab-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.sg-auth__sync-status {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: #64748b;
}

.sg-confirm__actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.sg-confirm__actions--stack .sg-btn {
  width: 100%;
}

.sg-settings input[type="number"] {
  max-width: 140px;
}

/* Confirm dialog */
.sg-confirm {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
}

.sg-confirm__panel {
  width: min(420px, 100%);
  max-height: min(90vh, 520px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.sg-confirm__panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #0f172a;
}

.sg-confirm__intro {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.sg-confirm__list {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
}

.sg-confirm__list li {
  margin-bottom: 6px;
}

.sg-confirm__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.sg-pin-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.sg-pin-grid__item {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sg-pin-grid__item.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.sg-pin-grid__item--color {
  background: var(--pin-color);
  border-color: rgba(15, 23, 42, 0.15);
}
