/* /app/profile — own profile management. Same palette as shell.css / the Figma
   "Auth" frame: white cards, primary #4F46E5, brand #5F33E1, text #111827 / #64748B,
   borders #D7DFEA. Level meter zones follow the grades: 1-3 red, 4-6 yellow, 7-10 green. */

.pf {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 880px;
}
.pf__section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pf__section .shell__h2 {
  margin: 0;
}

.pf__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.pf__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.pf__label {
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  color: #111827;
}
.pf__input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #d7dfea;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #111827;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.pf__input::placeholder {
  color: #94a3b8;
}
.pf__input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.pf__textarea {
  height: auto;
  padding: 10px 12px;
  line-height: 1.4;
  resize: vertical;
}

.pf__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pf__chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #d7dfea;
  border-radius: 8px;
  background: #fff;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.pf__chip:hover {
  background: #f5f7fa;
  color: #111827;
}
.pf__chip.is-on {
  background: #eee9ff;
  border-color: #5f33e1;
  color: #5f33e1;
}

.pf__check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
}
.pf__check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #4f46e5;
}

.pf__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pf__actions .shell__btn {
  margin-top: 0;
}
.pf__notice {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}
.pf__notice.is-ok {
  color: #067647;
}
.pf__notice.is-err {
  color: #b42318;
}
.pf__hint {
  margin: 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fff6e0;
  color: #b54708;
  font-size: 14px;
}
.pf__link-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #4f46e5;
  cursor: pointer;
}
.pf__link-btn:hover {
  text-decoration: underline;
}

/* avatar */
.pf__avatar-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.pf__avatar {
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: #eee9ff;
}
.pf__avatar--blank {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5f33e1;
  color: #fff;
  font-size: 32px;
  font-weight: 600;
}
.pf__avatar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.pf__avatar-actions .shell__muted {
  font-size: 13px;
}
.pf__file {
  position: relative;
  margin-top: 0;
  overflow: hidden;
  cursor: pointer;
}
.pf__file input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

/* professions: the tabs of the added ones, the panel of the open tab */
.pf__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid #e7eaf2;
}
.pf__tab {
  display: inline-flex;
  align-items: center;
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.pf__tab.is-active {
  background: #fff;
  border-color: #e7eaf2;
}
.pf__tab-btn {
  height: 36px;
  padding: 0 4px 0 12px;
  border: 0;
  background: none;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}
.pf__tab-btn:hover,
.pf__tab.is-active .pf__tab-btn {
  color: #5f33e1;
}
.pf__tab-grade {
  font-weight: 500;
  color: #94a3b8;
}
.pf__tab-x {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 15px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}
.pf__tab-x:hover {
  background: #fee4e2;
  color: #d92d20;
}
.pf__tab-x:disabled {
  opacity: 0.5;
  cursor: default;
}
.pf__panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
}
.pf__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.pf__panel-head .pf__label {
  margin: 0;
}
.pf__danger {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #e7eaf2;
}
.pf__delete {
  height: 40px;
  padding: 0 18px;
  border: 1px solid #d92d20;
  border-radius: 8px;
  background: #d92d20;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.pf__delete:hover {
  background: #b42318;
  border-color: #b42318;
}
.pf__delete:disabled {
  opacity: 0.6;
  cursor: default;
}

/* the alert before a profession is removed */
.pf__modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.5);
}
.pf__modal {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.25);
}
.pf__modal-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}
.pf__modal-text {
  margin: 0 0 20px;
  font-size: 14px;
  color: #475569;
}
.pf__modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.pf__modal-actions .shell__btn {
  margin-top: 0;
}
.pf__grade {
  width: 130px;
  flex: none;
}
.pf__empty {
  margin: 0;
  padding: 12px 14px;
}

/* skills: shadcn-style table (orders reference) — bordered group card, header
   row, hover rows, the level shown as a rounded zone badge */
.pf__group {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  border: 1px solid #e7eaf2;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.pf__group-title {
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  background: #f8f9fc;
  border-bottom: 1px solid #e7eaf2;
}
.pf__skill-head {
  padding: 7px 14px;
  border-bottom: 1px solid #e7eaf2;
  background: #fcfcfd;
}
.pf__head-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #667085;
}
.pf__branch {
  margin: 0;
  border-bottom: 1px solid #f1f3f5;
}
.pf__branch:last-child {
  border-bottom: 0;
}
.pf__branch-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #475467;
  cursor: pointer;
  list-style: none;
}
.pf__branch-title::-webkit-details-marker {
  display: none;
}
.pf__branch-title::before {
  content: "▸";
  color: #98a2b3;
  font-size: 11px;
  transition: transform 0.15s;
}
.pf__branch[open] > .pf__branch-title::before {
  transform: rotate(90deg);
}
.pf__branch-body {
  display: flex;
  flex-direction: column;
  margin: 0;
}
.pf__skill {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto 84px auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 26px;
  transition: background 0.15s;
}
.pf__skill:hover {
  background: #f8f9fc;
}
.pf__skill-name {
  font-size: 14px;
  color: #111827;
}
.pf__meter {
  display: flex;
  gap: 3px;
}
.pf__seg {
  width: 14px;
  height: 22px;
  padding: 0;
  border: 1px solid #e4e7ec;
  border-radius: 3px;
  background: #f5f6f8;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.pf__seg:hover {
  border-color: #5f33e1;
}
.pf__seg.is-on.is-junior {
  background: #fa5252;
  border-color: #fa5252;
}
.pf__seg.is-on.is-middle {
  background: #ffd43b;
  border-color: #ffd43b;
}
.pf__seg.is-on.is-senior,
.pf__seg.is-on.is-lead {
  background: #51cf66;
  border-color: #51cf66;
}
.pf__skill-level {
  justify-self: start;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: #f2f4f7;
  color: #475467;
}
.pf__skill-level.is-junior {
  background: #fef1f0;
  color: #b42318;
}
.pf__skill-level.is-middle {
  background: #fff6e0;
  color: #b54708;
}
.pf__skill-level.is-senior,
.pf__skill-level.is-lead {
  background: #e7f8ee;
  color: #067647;
}

/* long email / profile address must wrap instead of widening the page */
.pf .shell__dl {
  grid-template-columns: max-content minmax(0, 1fr);
}
.pf .shell__dl dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media screen and (max-width: 720px) {
  .pf__grid {
    grid-template-columns: 1fr;
  }
  .pf__avatar-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .pf__prof {
    flex-wrap: wrap;
  }
  .pf__prof-name {
    flex: 1 1 100%;
  }
  .pf__grade {
    flex: 1;
    width: auto;
  }
  /* a skill row: name + level + clear on top, the meter across the full width below */
  .pf__skill-head {
    display: none;
  }
  .pf__skill {
    padding-left: 14px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "name level clear" "meter meter meter";
    row-gap: 6px;
  }
  .pf__skill-name {
    grid-area: name;
  }
  .pf__skill-level {
    grid-area: level;
  }
  .pf__skill .pf__link-btn {
    grid-area: clear;
  }
  .pf__meter {
    grid-area: meter;
  }
  .pf__seg {
    flex: 1;
    width: auto;
    height: 32px;
  }
}

/* the apply modal: fields above the actions (the frame is the delete modal's) */
.pf__modal--form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
}
.pf__modal--form .pf__modal-title {
  margin: 0;
}
.pf__modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pf__modal-field .pf__label {
  margin: 0;
}
.pf__link-btn--danger {
  color: #d92d20;
}
.pf__link-btn--danger:hover {
  color: #b42318;
}
