/* Perfil profissional premium — camada visual isolada para atualização segura. */
.premium-profile-pro {
  position: relative;
  min-width: 220px;
  min-height: 54px;
  padding: 6px 13px 6px 9px;
  border: 1px solid rgba(193, 150, 78, .38);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(252,248,239,.94));
  box-shadow: 0 12px 34px rgba(56, 40, 19, .09), inset 0 1px 0 #fff;
}
.premium-profile-pro::before {
  content: none;
}
.premium-profile-pro .profile-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  min-width: 40px;
  box-sizing: border-box;
  overflow: visible;
  padding: 2px;
  border: 1px solid #d9a94e;
  background: #fff;
  box-shadow: 0 7px 18px rgba(96,62,17,.14);
}
.premium-profile-pro .profile-avatar > img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  background: #f6efe3;
  object-fit: cover;
  object-position: center;
}
.premium-profile-pro .profile-avatar > #avatarFallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg,#e7c779,#b67d2c);
}
.profile-online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #27ad70;
  box-shadow: 0 0 0 2px rgba(39,173,112,.13);
}
.premium-profile-pro .profile-copy { gap: 4px; min-width: 0; }
.premium-profile-pro .profile-copy strong {
  max-width: 135px;
  overflow: hidden;
  color: #221a10;
  font-size: 13px;
  text-overflow: ellipsis;
}
.premium-profile-pro .profile-copy small {
  max-width: 135px;
  overflow: hidden;
  color: #9a6a25;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .025em;
  text-overflow: ellipsis;
}

.profile-modal-backdrop {
  background: rgba(20, 16, 10, .58) !important;
  backdrop-filter: blur(10px) saturate(.8) !important;
}
.profile-modal-premium {
  width: min(980px, 94vw) !important;
  max-height: min(90vh, 900px) !important;
  overflow: hidden !important;
  border: 1px solid rgba(215, 184, 130, .5);
  border-radius: 28px !important;
  background: #f9f5ed !important;
  box-shadow: 0 42px 120px rgba(22, 15, 7, .34), 0 0 0 1px rgba(255,255,255,.7) inset !important;
}
.profile-modal-premium .profile-modal-head {
  position: relative;
  align-items: flex-start;
  padding: 27px 30px 23px;
  overflow: hidden;
  border-bottom: 1px solid rgba(211, 180, 125, .33);
  background: linear-gradient(122deg, #171510 0%, #262016 72%, #3b2d19 100%);
}
.profile-modal-premium .profile-modal-head::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -130px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(232,190,97,.25);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(232,190,97,.035), 0 0 0 84px rgba(232,190,97,.025);
  pointer-events: none;
}
.profile-modal-heading { position: relative; z-index: 1; }
.profile-kicker {
  display: block;
  margin-bottom: 8px;
  color: #e3bb62;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2em;
}
.profile-modal-premium .profile-modal-head h2 {
  margin: 0;
  color: #fffaf0;
  font: 600 clamp(25px, 3vw, 34px)/1.08 Georgia, serif;
  letter-spacing: -.025em;
}
.profile-modal-heading p {
  margin: 8px 0 0;
  color: #c9bdab;
  font-size: 12px;
  line-height: 1.5;
}
.profile-modal-premium .profile-modal-close {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff8e9;
  font-size: 22px;
}
.profile-modal-premium .profile-modal-close:hover { background: rgba(255,255,255,.16); }
.profile-modal-premium .profile-modal-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 20px;
  padding: 22px;
  overflow-y: auto;
}
.profile-summary-card {
  position: relative;
  align-self: start;
  min-height: 480px;
  padding: 24px 22px;
  overflow: hidden;
  border: 1px solid rgba(210, 175, 111, .45);
  border-radius: 22px;
  background: linear-gradient(160deg, #fffdf8 0%, #f1e7d6 100%);
  box-shadow: 0 18px 42px rgba(79, 53, 19, .09);
  text-align: center;
}
#profilePhotoInput { display: none !important; }
.profile-summary-shine {
  position: absolute;
  top: -90px;
  right: -100px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224,180,88,.25), transparent 68%);
}
.profile-pro-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(46,146,96,.18);
  border-radius: 999px;
  background: rgba(232,248,239,.82);
  color: #23744d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.profile-pro-badge i,
.profile-save-note i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e9b67;
  box-shadow: 0 0 0 4px rgba(46,155,103,.1);
}
.profile-photo-shell {
  position: relative;
  width: 130px;
  margin: 27px auto 16px;
}
.profile-modal-premium .profile-photo-upload {
  width: 124px;
  height: 124px;
  margin: 0 auto;
  border: 5px solid #fff;
  background: linear-gradient(145deg, #f5dfb5, #c08a36);
  box-shadow: 0 0 0 2px #d2a75c, 0 18px 40px rgba(93,60,18,.22);
}
.profile-modal-premium .profile-photo-placeholder {
  color: #5d3b13;
  font-size: 36px;
  font-weight: 900;
}
.profile-modal-premium .profile-photo-overlay {
  border-radius: 50%;
  background: linear-gradient(transparent 30%, rgba(22,15,7,.78));
  opacity: 0;
  align-items: end;
  padding-bottom: 18px;
}
.profile-modal-premium .profile-photo-overlay span { color: #fff; font-size: 10px; font-weight: 900; }
.profile-photo-status {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 20px;
  height: 20px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #2da66d;
  box-shadow: 0 4px 12px rgba(31,115,75,.3);
}
.profile-summary-card h3 {
  margin: 0;
  color: #241b10;
  font: 600 22px/1.15 Georgia, serif;
}
.profile-summary-card > p {
  min-height: 30px;
  margin: 7px auto 20px;
  color: #8c6a37;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.4;
}
.profile-completion {
  padding: 15px;
  border: 1px solid rgba(207,177,126,.4);
  border-radius: 15px;
  background: rgba(255,255,255,.72);
  text-align: left;
}
.profile-completion > div:first-child { display: flex; justify-content: space-between; color: #72624d; font-size: 10px; }
.profile-completion strong { color: #9c6a1c; font-size: 10px; text-transform: uppercase; }
.profile-completion-track { height: 6px; margin: 10px 0 8px; overflow: hidden; border-radius: 999px; background: #eadfce; }
.profile-completion-track i { display: block; width: 86%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b47a23, #e2ba63); }
.profile-completion small { color: #887a67; font-size: 9px; line-height: 1.45; }
.profile-photo-action {
  width: 100%;
  min-height: 43px;
  margin-top: 17px;
  border: 0;
  border-radius: 12px;
  background: #211b13;
  color: #fff9ed;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(31,24,15,.14);
}
.profile-modal-premium .btn-remove-photo {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #9b6f43;
  font-size: 9px;
  text-decoration: underline;
}
.profile-form-area { min-width: 0; display: grid; align-content: start; gap: 15px; }
.profile-form-block {
  padding: 19px;
  border: 1px solid rgba(213, 185, 137, .48);
  border-radius: 19px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 14px 34px rgba(75,50,18,.055);
}
.profile-block-head {
  display: grid;
  grid-template-columns: 37px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 17px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee4d5;
}
.profile-block-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #f7e7c5, #e5c179);
  color: #74501c;
  font-size: 10px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(171,113,25,.14);
}
.profile-block-head h3 { margin: 0; color: #2b2115; font-size: 13px; }
.profile-block-head p { margin: 4px 0 0; color: #8a7a66; font-size: 9px; }
.profile-secure-pill {
  padding: 7px 9px;
  border-radius: 999px;
  background: #edf8f1;
  color: #26734d;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}
.profile-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.profile-section-wide { grid-column: 1 / -1; }
.profile-modal-premium .profile-section label {
  margin: 0 0 7px;
  color: #675846;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .065em;
}
.profile-modal-premium .profile-section input,
.profile-modal-premium .profile-section textarea {
  min-height: 45px;
  padding: 11px 13px;
  border: 1px solid #ded0ba;
  border-radius: 12px;
  background: #fcfaf6;
  color: #2d251c;
  font-size: 12px;
  box-shadow: inset 0 1px 2px rgba(65,44,19,.025);
}
.profile-modal-premium .profile-section textarea { min-height: 84px; resize: vertical; }
.profile-modal-premium .profile-section input:focus,
.profile-modal-premium .profile-section textarea:focus {
  border-color: #c5933e;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(197,147,62,.11);
}
.profile-modal-premium .profile-section > small { display: block; margin-top: 6px; color: #948674; font-size: 8px; }
.profile-modal-premium .profile-modal-foot {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 22px 15px;
  border-top: 1px solid rgba(205,175,122,.32);
  background: rgba(255,253,248,.96);
}
.profile-save-note { display: flex; align-items: center; gap: 9px; color: #7d705e; font-size: 9px; }
.profile-foot-actions { display: flex; align-items: center; gap: 9px; }
.profile-modal-premium .btn-cancel,
.profile-modal-premium .btn-save {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 900;
}
.profile-modal-premium .btn-cancel { border-color: #dfd1bd; color: #746450; }
.profile-modal-premium .btn-save {
  min-width: 135px;
  background: linear-gradient(135deg, #b67a20, #dfae50);
  color: #fff;
  box-shadow: 0 10px 24px rgba(176,116,27,.24);
}
.profile-modal-premium .btn-save:hover { transform: translateY(-1px); background: linear-gradient(135deg, #9b6418, #ca9436); }

@media (max-width: 760px) {
  .profile-modal-premium {
    inset: auto 0 0 !important;
    width: 100% !important;
    max-height: 96dvh !important;
    transform: none !important;
    border-radius: 24px 24px 0 0 !important;
  }
  .profile-modal-premium .profile-modal-head { padding: 22px 18px 18px; }
  .profile-modal-heading p { max-width: 280px; }
  .profile-modal-premium .profile-modal-body { grid-template-columns: 1fr; padding: 14px; }
  .profile-summary-card { min-height: 0; padding: 18px; }
  .profile-photo-shell { margin-top: 20px; }
  .profile-completion { display: none; }
  .profile-form-grid { grid-template-columns: 1fr; }
  .profile-section-wide { grid-column: auto; }
  .profile-block-head { grid-template-columns: 36px minmax(0,1fr); }
  .profile-secure-pill { display: none; }
  .profile-modal-premium .profile-modal-foot { display: grid; grid-template-columns: 1fr; padding: 12px 14px max(14px, env(safe-area-inset-bottom)); }
  .profile-save-note { display: none; }
  .profile-foot-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}

@media (max-width: 1099px) {
  .premium-profile-pro { min-width: 50px; width: 50px; padding: 5px; justify-content: center; }
  .premium-profile-pro::before,
  .premium-profile-pro .profile-copy,
  .premium-profile-pro .profile-chevron { display: none; }
}

/* Sincronização visual da foto profissional com o Kanban da agenda. */
#view-agenda .ag-shell .ag-prof-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #f4dfb5, #c28a34);
  color: #654216;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 0 2px rgba(197,139,50,.55), 0 8px 18px rgba(91,58,18,.17);
}
#view-agenda .ag-shell .ag-prof-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
#view-agenda .ag-shell .ag-prof-avatar-photo i {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #24a868;
}
