/* ===============================
   PROFILE PAGE – PREMIUM LAYER
   (extends existing MD system)
================================ */


/* ===============================
   PROFILE LAYOUT (COLUMN)
================================ */
.profile-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Fixed, premium readable width */
.profile-layout > .md-card {
  width: 100%;
  max-width: 760px;
}

/* Header aligns with cards */
.profile-layout > h2 {
  width: 100%;
  max-width: 760px;
}


/* ---------- Page Header ---------- */
h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 28px;
  color: var(--on-surface);
}

/* ---------- Card Refinement ---------- */
.md-card {
  margin-bottom: 28px;
  padding: 26px 28px;
  border-radius: var(--border-radius-lg);

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.md-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.1),
    0 20px 48px rgba(0, 0, 0, 0.14);
}

/* ---------- Section Titles ---------- */
.md-card h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--on-surface);
}

/* ---------- Helper Text ---------- */
.md-card p {
  margin-bottom: 18px;
  line-height: 1.55;
  color: var(--on-surface-muted);
}

/* ---------- Checkbox Alignment ---------- */
.md-card label {
  user-select: none;
}

/* ---------- Status Message ---------- */
#sync-msg {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
}

#sync-msg.success {
  color: var(--success);
}

#sync-msg.error {
  color: var(--error);
}

/* ---------- Settings Grid ---------- */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 12px;
}

/* ---------- Divider Look ---------- */
.md-card + .md-card {
  position: relative;
}

.md-card + .md-card::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(0, 0, 0, 0.08),
    transparent
  );
}

/* ---------- Buttons Alignment ---------- */
.md-card button {
  margin-top: 8px;
}

/* ---------- Small Meta Text ---------- */
#emails-sent-count {
  font-weight: 600;
  color: var(--on-surface);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  h2 {
    font-size: 24px;
  }

  .md-card {
    padding: 22px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
