.prof-wrap {
  max-width: 1200px;
  padding: 64px 24px 80px;
}

.prof-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.prof-page-copy {
  min-width: 0;
}

.prof-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.prof-page-copy h1 {
  margin-top: 13px;
  color: var(--black);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.18;
}

.prof-page-copy p {
  margin-top: 9px;
  color: var(--gray-2);
  font-size: 14px;
}

.prof-primary-action {
  flex: none;
  min-width: 154px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 24px -16px rgba(37, 99, 235, .7);
}

.prof-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 176px;
  padding: 30px 32px;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 44px -32px rgba(24, 24, 27, .45);
}

.prof-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.prof-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.prof-profile-copy {
  min-width: 0;
}

.prof-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.prof-name {
  overflow: hidden;
  color: var(--black);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prof-login-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 23px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
}

.prof-login-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.prof-email {
  margin-top: 7px;
  overflow: hidden;
  color: var(--gray-1);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prof-meta {
  margin-top: 7px;
  color: var(--gray-3);
  font-size: 12px;
}

.prof-meta-separator {
  margin: 0 8px;
}

.prof-view-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  min-width: 190px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--black);
  font-size: 13px;
  font-weight: 600;
  transition: border-color .16s, color .16s, background .16s, transform .16s;
}

.prof-view-link:hover {
  border-color: var(--blue-100);
  background: #f8faff;
  color: var(--blue);
  transform: translateY(-1px);
}

.prof-stats-section {
  margin-top: 32px;
}

.prof-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.prof-section-title-row h2,
.prof-card-head h2,
.prof-editor-head h2 {
  color: var(--black);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.prof-data-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-3);
  font-size: 12px;
}

.prof-data-status b {
  color: var(--gray-2);
  font-weight: 500;
}

.prof-refresh-btn {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}

.prof-refresh-btn:hover {
  border-color: var(--blue-100);
  background: var(--blue-50);
}

.prof-refresh-btn:disabled {
  cursor: wait;
  opacity: .55;
}

.prof-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.prof-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 120px;
  padding: 22px 24px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #fff;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}

.prof-stat:hover {
  border-color: var(--blue-100);
  box-shadow: 0 16px 34px -26px rgba(24, 24, 27, .45);
  transform: translateY(-2px);
}

.prof-stat.is-processing {
  border-color: var(--blue-100);
  background: #f8faff;
}

.prof-stat.is-published {
  border-color: #d1fae5;
  background: #f7fdf9;
}

.prof-stat-copy {
  min-width: 0;
}

.prof-stat-copy strong {
  display: block;
  color: var(--black);
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.prof-stat.is-processing .prof-stat-copy strong {
  color: var(--blue);
}

.prof-stat.is-published .prof-stat-copy strong {
  color: var(--green);
}

.prof-stat-copy > span {
  display: block;
  margin-top: 6px;
  color: var(--gray-2);
  font-size: 13px;
}

.prof-stat-arrow {
  color: var(--gray-3);
  font-size: 20px;
  font-weight: 500;
  transition: color .16s, transform .16s;
}

.prof-stat.is-processing .prof-stat-arrow {
  color: var(--blue);
}

.prof-stat.is-published .prof-stat-arrow {
  color: var(--green);
}

.prof-stat:hover .prof-stat-arrow {
  transform: translateX(2px);
}

.prof-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(360px, 1fr);
  align-items: stretch;
  gap: 20px;
  margin-top: 32px;
}

.prof-services-card,
.prof-account-card {
  min-width: 0;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: #fff;
}

.prof-services-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 404px;
  padding: 28px;
}

.prof-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.prof-card-head h2 {
  font-size: 19px;
}

.prof-card-head p {
  margin-top: 4px;
  color: var(--gray-3);
  font-size: 12px;
}

.prof-service-grid {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.prof-service-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--bg-soft);
  transition: border-color .16s, background .16s, transform .16s;
}

.prof-service-tile:hover {
  border-color: var(--blue-100);
  background: #fff;
  transform: translateY(-1px);
}

.prof-service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.prof-service-icon.is-blue { background: var(--blue-50); color: var(--blue); }
.prof-service-icon.is-green { background: var(--green-50); color: var(--green); }
.prof-service-icon.is-amber { background: var(--amber-50); color: var(--amber); }
.prof-service-icon.is-gray { background: var(--fill); color: var(--gray-1); }

.prof-service-copy {
  flex: 1;
  min-width: 0;
}

.prof-service-copy strong {
  display: block;
  color: var(--black);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.prof-service-copy small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--gray-3);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prof-service-arrow {
  flex: none;
  color: var(--gray-3);
  font-size: 20px;
  transition: color .16s, transform .16s;
}

.prof-service-tile:hover .prof-service-arrow {
  color: var(--blue);
  transform: translateX(2px);
}

.prof-account-card {
  display: flex;
  min-height: 404px;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
}

.prof-account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prof-account-state {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
}

.prof-account-state.is-disabled,
.prof-info-row strong.is-disabled {
  background: var(--red-50);
  color: var(--red);
}

.prof-info-row strong.is-disabled {
  background: none;
}

.prof-edit-trigger {
  padding: 5px 0 5px 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
}

.prof-edit-trigger:hover {
  color: var(--blue-hover);
}

.prof-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prof-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 12px;
}

.prof-info-row > span {
  flex: none;
  color: var(--gray-3);
}

.prof-info-row strong {
  overflow: hidden;
  color: var(--black);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prof-info-row strong.is-success {
  color: var(--green);
}

.prof-info-row.is-button {
  width: 100%;
  color: inherit;
  text-align: left;
  transition: background .16s, color .16s;
}

.prof-info-row.is-button:hover {
  background: var(--blue-50);
}

.prof-info-row.is-button strong b {
  font: inherit;
}

.prof-security-note {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--blue-50);
  color: inherit;
  text-decoration: none;
  transition: background .16s;
}

.prof-security-note:hover {
  background: #e7efff;
}

.prof-security-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue);
}

.prof-security-note > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.prof-security-arrow {
  color: var(--blue);
  font-size: 20px;
}

.prof-security-note strong,
.prof-security-note small {
  display: block;
}

.prof-security-note strong {
  color: var(--black);
  font-size: 12px;
  font-weight: 600;
}

.prof-security-note small {
  margin-top: 2px;
  color: var(--gray-2);
  font-size: 10px;
}

.prof-logout {
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  transition: border-color .16s, background .16s, color .16s;
}

.prof-logout:hover {
  border-color: #fecaca;
  background: #fffafa;
  color: #b91c1c;
}

.prof-logout:disabled {
  cursor: wait;
  opacity: .6;
}

.prof-editor {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--black);
  box-shadow: 0 28px 80px -28px rgba(24, 24, 27, .55);
}

.prof-editor::backdrop {
  background: rgba(24, 24, 27, .42);
  backdrop-filter: blur(3px);
}

.prof-editor-card {
  padding: 28px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: #fff;
}

.prof-points-dialog {
  width: min(560px, calc(100vw - 32px));
}

.prof-points-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.prof-points-summary > div {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-soft);
}

.prof-points-summary span,
.prof-points-summary strong {
  display: block;
}

.prof-points-summary span {
  color: var(--gray-3);
  font-size: 11px;
}

.prof-points-summary strong {
  margin-top: 4px;
  color: var(--black);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.prof-points-list {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 12px;
}

.prof-points-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 11px 14px;
  color: inherit;
  text-decoration: none;
}

.prof-points-item + .prof-points-item {
  border-top: 1px solid var(--border-light);
}

.prof-points-item:hover {
  background: var(--bg-soft);
}

.prof-points-item-main {
  flex: 1;
  min-width: 0;
}

.prof-points-item-main strong,
.prof-points-item-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prof-points-item-main strong {
  color: var(--black);
  font-size: 12px;
  font-weight: 600;
}

.prof-points-item-main small {
  margin-top: 3px;
  color: var(--gray-3);
  font-size: 10px;
}

.prof-points-delta {
  flex: none;
  font-size: 14px;
  font-weight: 700;
}

.prof-points-delta.is-plus { color: var(--green); }
.prof-points-delta.is-minus { color: var(--red); }

.prof-points-empty {
  padding: 28px 16px;
  color: var(--gray-3);
  font-size: 12px;
  text-align: center;
}

.prof-points-foot {
  margin-top: 12px;
  color: var(--gray-3);
  font-size: 10px;
  text-align: center;
}

.prof-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.prof-editor-head h2 {
  font-size: 19px;
}

.prof-editor-head p {
  margin-top: 5px;
  color: var(--gray-3);
  font-size: 12px;
}

.prof-editor-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--gray-2);
  font-size: 22px;
  line-height: 1;
}

.prof-editor-close:hover {
  background: var(--fill);
  color: var(--black);
}

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

.prof-form .form-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.prof-form .form-label {
  color: var(--gray-1);
  font-size: 12px;
  font-weight: 600;
}

.prof-form .form-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--black);
  font-size: 13px;
  transition: border-color .16s, box-shadow .16s;
}

.prof-form .form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-50);
}

.prof-form small {
  color: var(--gray-3);
  font-size: 11px;
}

.prof-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.prof-form-actions .btn {
  min-height: 42px;
  padding: 0 18px;
  font-size: 13px;
}

.prof-form-actions .btn:disabled {
  cursor: wait;
  opacity: .6;
}

.m-page-prof { gap: 14px; }
.m-page-prof .m-page-title { margin-bottom: 2px; }
.m-profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 72%);
  box-shadow: 0 10px 24px -20px rgba(37, 99, 235, .8);
}
.m-profile-hero-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.m-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  box-shadow: 0 8px 18px -9px rgba(37, 99, 235, .8);
}
.m-profile-identity { min-width: 0; }
.m-profile-identity .prof-name {
  overflow: hidden;
  color: var(--black);
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-profile-identity .prof-email {
  overflow: hidden;
  margin-top: 3px;
  color: var(--gray-2);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-profile-id { margin-top: 4px; color: var(--gray-3); font-size: 10px; }
.m-profile-create {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.m-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.m-profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
}
.m-profile-stat strong { color: var(--black); font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.m-profile-stat span { margin-top: 4px; color: var(--gray-3); font-size: 11px; }
.m-profile-stat.is-blue strong { color: var(--blue); }
.m-profile-stat.is-green strong { color: var(--green); }
.m-profile-card {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: #fff;
}
.m-profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px 12px;
}
.m-profile-card-head strong { color: var(--black); font-size: 14px; }
.m-profile-card-head span:not(.m-profile-lock) { color: var(--gray-3); font-size: 11px; }
.m-profile-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 0 16px 16px;
}
.m-profile-form .form-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}
.m-profile-form .form-label {
  color: var(--gray-1);
  font-size: 12px;
  font-weight: 600;
}
.m-profile-form .form-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--black);
  font-size: 13px;
}
.m-profile-form .form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-50);
}
.m-profile-form small { color: var(--gray-3); font-size: 11px; line-height: 1.5; }
.m-profile-save { width: 100%; min-height: 40px; margin-top: 2px; font-size: 13px; }
.m-profile-menu-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 60px;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
}
.m-profile-menu-row + .m-profile-menu-row { border-top: 1px solid var(--border-light); }
.m-profile-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue);
}
.m-profile-menu-icon.is-amber { background: var(--amber-50); color: #d97706; }
.m-profile-menu-row > span:nth-child(2) { flex: 1; min-width: 0; }
.m-profile-menu-row strong { display: block; color: var(--black); font-size: 13px; font-weight: 600; }
.m-profile-menu-row small { display: block; margin-top: 3px; color: var(--gray-3); font-size: 11px; }
.m-profile-chevron { flex: none; color: var(--gray-3); }
.m-points-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; padding: 10px 14px; color: inherit; text-decoration: none; }
.m-points-item + .m-points-item { border-top: 1px solid var(--border-light); }
.m-points-item:hover { background: var(--bg-soft); }
.m-points-main { min-width: 0; }
.m-points-main strong, .m-points-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-points-main strong { color: var(--black); font-size: 13px; font-weight: 500; }
.m-points-main small { margin-top: 2px; color: var(--gray-3); font-size: 11px; }
.m-points-item b { flex: none; font-size: 13px; }
.m-points-item b.is-plus { color: var(--green); }
.m-points-item b.is-minus { color: var(--red); }
.m-profile-points-empty { padding: 22px 14px; color: var(--gray-3); font-size: 12px; text-align: center; }
.m-profile-points { grid-template-columns: repeat(2, 1fr); }
.m-profile-points .stat { min-height: 68px; }
.m-profile-card + .m-profile-card { margin-top: 0; }
.logout-btn { width: 100%; min-height: 44px; margin-top: 0; }

@media (max-width: 1040px) {
  .prof-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .prof-account-card {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .prof-wrap {
    padding: 40px 20px 72px;
  }

  .prof-page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .prof-page-copy h1 {
    font-size: 36px;
  }

  .prof-primary-action {
    width: 100%;
  }

  .prof-overview {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .prof-view-link {
    width: 100%;
  }

  .prof-stats {
    grid-template-columns: 1fr;
  }

  .prof-stat {
    min-height: 92px;
  }

  .prof-service-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .prof-service-tile {
    min-height: 96px;
  }
}

@media (max-width: 520px) {
  .prof-wrap {
    padding: 30px 16px 64px;
  }

  .prof-page-copy h1 {
    font-size: 32px;
  }

  .prof-profile {
    align-items: flex-start;
    flex-direction: column;
  }

  .prof-name {
    font-size: 23px;
  }

  .prof-services-card,
  .prof-account-card {
    padding: 20px;
  }

  .prof-account-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: 4px;
  }

  .prof-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .prof-editor-card {
    padding: 22px 20px;
  }

  .m-profile-hero { align-items: flex-start; flex-direction: column; }
  .m-profile-create { width: 100%; justify-content: center; }
}
