.cfc-profile-avatar{position:relative;display:grid;place-items:center;overflow:hidden;flex:0 0 auto;border-radius:50%;background:linear-gradient(145deg,#dff8f5,#bde8e7);color:#086970;font-style:normal;font-weight:850;line-height:1;isolation:isolate}
.cfc-profile-avatar-fallback{display:grid;place-items:center;width:100%;height:100%;font-size:.42em;letter-spacing:-.03em}
.cfc-profile-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .18s ease}
.cfc-profile-avatar.has-photo img{opacity:1}.cfc-profile-avatar.has-photo .cfc-profile-avatar-fallback{opacity:0}
.profile-chip .cfc-profile-avatar{width:34px;height:34px;font-size:28px;border:1px solid #ffffff70}.profile-chip .cfc-profile-avatar-fallback{font-size:12px}
.profile-photo-prompt{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:15px;width:100%;padding:15px 18px;border:1px solid color-mix(in srgb,var(--fresh-accent,#00a4ad) 55%,transparent);border-radius:20px;background:linear-gradient(115deg,rgba(0,164,173,.17),rgba(99,224,213,.08));color:inherit;text-align:left;box-shadow:0 12px 34px rgba(0,91,99,.1);cursor:pointer}
.profile-photo-prompt-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:#00a7af;color:#fff;font-size:28px;font-weight:400}.profile-photo-prompt strong,.profile-photo-prompt small{display:block}.profile-photo-prompt strong{font-size:17px}.profile-photo-prompt small{margin-top:3px;color:var(--muted,#678);line-height:1.3}.profile-photo-prompt b{color:#008991;font-size:14px}
.profile-photo-overlay{position:fixed;z-index:200000;inset:0;display:grid;place-items:center;padding:max(18px,env(safe-area-inset-top)) 18px max(18px,env(safe-area-inset-bottom));background:rgba(3,18,28,.72);backdrop-filter:blur(9px);overflow:auto}.profile-photo-modal-open{overflow:hidden}
.profile-photo-modal{position:relative;width:min(490px,100%);padding:clamp(25px,5vw,40px);border:1px solid var(--line,#d6e4e5);border-radius:28px;background:var(--card,#fff);color:var(--text,#182735);box-shadow:0 30px 90px rgba(0,0,0,.32)}
.profile-photo-modal h2{margin:4px 0 8px;font-size:clamp(30px,7vw,44px);letter-spacing:-.045em}.profile-photo-copy{margin:0;color:var(--muted,#657882);line-height:1.45}.profile-photo-close{position:absolute;top:16px;right:16px;width:42px;height:42px;border:1px solid var(--line,#d6e4e5);border-radius:50%;background:var(--card-2,#eef6f6);color:inherit;font-size:25px}.profile-photo-preview{display:grid;place-items:center;margin:25px auto 20px}.profile-photo-preview-avatar,.profile-photo-selected-preview{width:148px;height:148px;border-radius:50%;object-fit:cover;border:5px solid rgba(0,169,181,.17);box-shadow:0 15px 38px rgba(0,80,89,.16);font-size:72px}.profile-photo-preview-avatar .cfc-profile-avatar-fallback{font-size:36px}.profile-photo-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.profile-photo-actions button{min-height:50px}.profile-photo-status{min-height:22px;margin:13px 0 0;text-align:center;color:var(--muted,#657882);font-size:13px}.profile-photo-switch{display:block;margin:17px auto 0;border:0;background:transparent;color:#008e97;text-decoration:underline;font:inherit;font-weight:750}
.production-task-creator-avatar.cfc-profile-avatar,.production-review-author-avatar.cfc-profile-avatar,.production-review-author-chip .cfc-profile-avatar{width:34px;height:34px;font-size:24px;margin:0}.production-review-author-chip .cfc-profile-avatar{display:inline-grid;vertical-align:middle;margin-right:5px}
.admin-review-member-avatar{width:38px;height:38px;font-size:22px}.admin-review-member-avatar .cfc-profile-avatar-fallback{font-size:12px}
.admin-confirmation-avatar.cfc-profile-avatar{border-radius:13px;font-size:22px}.admin-confirmation-avatar .cfc-profile-avatar-fallback{font-size:12px}
.fresh-avatar-stack .cfc-profile-avatar{width:29px;height:29px;margin-left:-8px;border:2px solid #fff;font-size:17px}.fresh-avatar-stack .cfc-profile-avatar-fallback{font-size:10px}
body[data-cfc-theme="dark"] .profile-photo-modal{background:#17283d;color:#f3f8ff;border-color:#405b73}body[data-cfc-theme="dark"] .profile-photo-prompt{background:linear-gradient(115deg,rgba(0,190,196,.17),rgba(30,61,80,.58))}body[data-cfc-theme="dark"] .profile-photo-prompt small{color:#b9ccda}
@media(max-width:640px){.profile-photo-prompt{grid-template-columns:auto 1fr;padding:13px}.profile-photo-prompt b{grid-column:2}.profile-photo-actions{grid-template-columns:1fr}.profile-photo-preview-avatar,.profile-photo-selected-preview{width:126px;height:126px}.profile-photo-modal{border-radius:25px}}


/* Opaque surface: text must not inherit the turquoise hero background. */
body[data-cfc-theme="light"] .profile-photo-prompt {
  background: #f4fffe;
  border-color: #b2deda;
  color: #16363e;
  box-shadow: 0 8px 24px rgba(0, 61, 69, .12);
}
body[data-cfc-theme="light"] .profile-photo-prompt strong {
  color: #16363e;
}
body[data-cfc-theme="light"] .profile-photo-prompt small {
  color: #46616a;
}
body[data-cfc-theme="light"] .profile-photo-prompt b {
  color: #00646c;
  font-weight: 800;
}
body[data-cfc-theme="light"] .profile-photo-prompt-icon {
  background: #007b83;
  color: #ffffff;
}
body[data-cfc-theme="light"] .profile-photo-prompt:focus-visible {
  outline: 3px solid #16363e;
  outline-offset: 3px;
}

/* Photo editor: same square is encoded; circle previews the avatar mask. */
.profile-photo-modal { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.profile-photo-modal [hidden] { display: none !important; }
.profile-photo-crop { margin: 20px 0; text-align: center; color: #16363e; }
.profile-photo-crop-canvas { display: block; width: min(260px, 100%); height: auto; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: #f5f8f8; box-shadow: 0 0 0 3px #007b83; touch-action: none; cursor: grab; }
.profile-photo-crop-canvas:active { cursor: grabbing; }
.profile-photo-crop-canvas:focus-visible { outline: 3px solid #007b83; outline-offset: 6px; }
.profile-photo-crop-help { margin: 14px 0 10px; font-size: 13px; color: #46616a; }
.profile-photo-zoom-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 750; }
.profile-photo-crop input[type="range"] { display: block; width: 100%; height: 44px; margin: 0; padding: 0; accent-color: #007b83; cursor: pointer; }
.profile-photo-reset { min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: #00646c; font: inherit; font-size: 13px; font-weight: 750; text-decoration: underline; cursor: pointer; }
body[data-cfc-theme="dark"] .profile-photo-crop { color: #f3f8ff; }
body[data-cfc-theme="dark"] .profile-photo-crop-help { color: #b9ccda; }
body[data-cfc-theme="dark"] .profile-photo-reset { color: #76e5df; }
body[data-cfc-theme="dark"] .profile-photo-crop input[type="range"] { accent-color: #76e5df; }
@media(max-width:640px) { .profile-photo-crop-canvas { width: min(230px, 100%); } }


/* Explicit foreground/background pairs avoid the legacy pale .btn-muted text. */
.profile-photo-modal {
  --photo-secondary-bg: #e8f4f4;
  --photo-secondary-fg: #075d66;
  --photo-primary-bg: #007b83;
  --photo-primary-fg: #ffffff;
  --photo-disabled-bg: #edf1f4;
  --photo-disabled-fg: #52616c;
  --photo-button-border: #9cbfc2;
}
body[data-cfc-theme="dark"] .profile-photo-modal {
  --photo-secondary-bg: #243e50;
  --photo-secondary-fg: #dbf8f7;
  --photo-primary-bg: #67ddd5;
  --photo-primary-fg: #102e35;
  --photo-disabled-bg: #263749;
  --photo-disabled-fg: #b4c3d2;
  --photo-button-border: #587489;
}
.profile-photo-modal .profile-photo-actions button {
  opacity: 1;
  font-weight: 750;
  border: 1px solid var(--photo-button-border);
}
.profile-photo-modal [data-profile-photo-choose] {
  background: var(--photo-secondary-bg);
  color: var(--photo-secondary-fg);
}
.profile-photo-modal [data-profile-photo-save] {
  background: var(--photo-primary-bg);
  color: var(--photo-primary-fg);
}
.profile-photo-modal .profile-photo-actions button:disabled {
  background: var(--photo-disabled-bg);
  color: var(--photo-disabled-fg);
  cursor: not-allowed;
  box-shadow: none;
}
.profile-photo-modal .profile-photo-actions button:focus-visible {
  outline: 3px solid var(--photo-secondary-fg);
  outline-offset: 3px;
}
.profile-photo-modal .profile-photo-actions button:not(:disabled):hover {
  box-shadow: 0 0 0 2px var(--photo-button-border);
}

/* Small active-Admin marker, exclusively on the Home header avatar. */
#topPersonBtn { position: relative; overflow: visible; }
#topPersonBtn .profile-admin-badge {
  display: none;
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid #96c6c8;
  border-radius: 50%;
  background: #ffffff;
  color: #16363e;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0, 40, 50, .2);
  pointer-events: none;
}
body:has(#view-inicio.active) #topPersonBtn .profile-admin-badge { display: flex; }
body[data-cfc-theme="dark"] #topPersonBtn .profile-admin-badge {
  background: #20384b;
  border-color: #80babd;
  color: #eefbff;
}
