/* ============================================================
   NexaGrid - My Profile page
   ============================================================ */

/* ================= Page header ================= */
.profile-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-head .dashboard-title { flex: 1; min-width: 260px; }

.profile-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ================= Hero card ================= */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.profile-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-round);
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  flex-shrink: 0;
}

.profile-hero-copy { flex: 1; min-width: 0; }

.profile-hero-copy h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.profile-hero-copy .profile-hero-role {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.profile-hero-copy .widget-badge { margin-top: 10px; }

.profile-hero-stats {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.profile-hero-stat { text-align: center; }

.profile-hero-stat b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.profile-hero-stat span {
  display: block;
  font-size: 10.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

/* ================= Layout ================= */
.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

.profile-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ================= Panel / card ================= */
.profile-panel { display: flex; flex-direction: column; }

.profile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.profile-panel-head h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.profile-panel-body { padding-top: 12px; }

/* ================= About list ================= */
.profile-about { display: flex; flex-direction: column; }

.profile-about-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 0;
}

.profile-about-row + .profile-about-row { border-top: 1px solid var(--surface-inset); }

.profile-about-row svg {
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  flex-shrink: 0;
  margin-top: 1px;
}

.profile-about-row b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-about-row span {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
  margin-top: 2px;
  line-height: 1.5;
}

/* ================= Form ================= */
.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.profile-field { margin-bottom: 14px; }

.profile-field:last-child { margin-bottom: 0; }

.profile-field > label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-field input.input-flat,
.profile-field select.input-flat {
  width: 100%;
}

.profile-field .profile-hint {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}

/* ================= Settings row (toggle) ================= */
.profile-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
}

.profile-settings-row + .profile-settings-row { border-top: 1px solid var(--surface-inset); }

.profile-settings-row .set-row-copy b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.profile-settings-row .set-row-copy span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* ================= Activity ================= */
.profile-activity { display: flex; flex-direction: column; }

.profile-activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
}

.profile-activity-item + .profile-activity-item { border-top: 1px solid var(--surface-inset); }

.profile-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-round);
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
}

.profile-activity-item.success .profile-activity-dot { background: var(--success); }
.profile-activity-item.warning .profile-activity-dot { background: var(--warning); }
.profile-activity-item.danger .profile-activity-dot { background: var(--danger); }

.profile-activity-item b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}

.profile-activity-item span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* ================= Two-factor row ================= */
.profile-2fa {
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-2fa .metric-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.profile-2fa .metric-icon svg { width: 18px; height: 18px; }

.profile-2fa-copy { flex: 1; min-width: 0; }

.profile-2fa-copy b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.profile-2fa-copy span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* ================= Responsive ================= */
@media (max-width: 1024px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .profile-hero-stats {
    width: 100%;
    justify-content: space-between;
  }

  .profile-form-row {
    grid-template-columns: 1fr;
  }
}