/* Account profile refresh: real photo avatars and a consistent charcoal/red palette. */
:root {
  --profile-red: #d8273b;
  --profile-red-dark: #a91627;
  --profile-ink: #151517;
  --profile-surface: #1d1d20;
  --profile-raised: #27272b;
  --profile-line: #37373c;
  --profile-text: #f5f5f6;
  --profile-muted: #a1a1aa;
}
#headerProfile.profile-badge {
  min-width: 0 !important;
  max-width: 230px !important;
  gap: 10px !important;
  padding: 6px 12px 6px 7px !important;
  border: 1px solid rgba(237, 52, 69, 0.48) !important;
  border-radius: 15px !important;
  background: linear-gradient(145deg, #171719, #242326) !important;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255, 255, 255, 0.035) !important;
  cursor: pointer;
}
#headerProfile.profile-badge:hover {
  border-color: rgba(237, 52, 69, 0.78) !important;
  background: linear-gradient(145deg, #1d1d20, #2a2023) !important;
}
#headerProfileAvatar.profile-avatar {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  overflow: hidden !important;
  clip-path: none !important;
  border: 2px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 50% !important;
  background: #2b2b2f !important;
  box-shadow: 0 0 0 2px rgba(237, 52, 69, 0.24) !important;
}
.profile-photo-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}
#headerProfile .header-profile-name {
  min-width: 0 !important;
  max-width: 158px !important;
  color: #f6f6f7 !important;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
  font-size: 0.84rem !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}
#headerProfile .header-profile-meta { display: none !important; }
#profileDialog.profile-card,
#accountDialog.account-account-card {
  width: min(92vw, 390px) !important;
  max-height: min(690px, calc(100vh - 92px)) !important;
  overflow: hidden !important;
  border: 1px solid rgba(237, 52, 69, 0.38) !important;
  border-radius: 20px !important;
  background: var(--profile-surface) !important;
  color: var(--profile-text) !important;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.025) !important;
}
#profileDialog.profile-card { display: none; flex-direction: column; }
#profileDialog.profile-card.show { display: flex !important; }
#profileDialog .profile-head,
#accountDialog .account-head {
  flex: 0 0 auto;
  position: relative;
  padding: 22px 20px 18px !important;
  background: radial-gradient(ellipse at 0% 0%, rgba(237, 52, 69, 0.2), transparent 52%), linear-gradient(145deg, #19191c, #211b1e) !important;
  color: var(--profile-text) !important;
}
#profileDialog .profile-head:after { content: none !important; }
#profileDialog .profile-top { gap: 16px; padding-right: 52px; }
#profileDialog .profile-big-avatar {
  position: relative;
  flex: 0 0 72px;
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  overflow: visible;
  clip-path: none !important;
  border: 2px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 50% !important;
  background: #29292d !important;
  box-shadow: 0 0 0 3px rgba(237, 52, 69, 0.28) !important;
}
#profileDialog .profile-big-avatar > .profile-photo-image { overflow: hidden; border-radius: 50%; }
#profileDialog .profile-avatar-edit {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 2px solid var(--profile-surface);
  border-radius: 50%;
  background: var(--profile-red);
  color: #fff;
  cursor: pointer;
}
#profileDialog .profile-avatar-edit:hover,
#profileDialog .profile-upload-btn:hover,
#profileDialog .profile-save:hover { background: #b91c2b !important; }
#profileDialog .profile-title { min-width: 0; }
#profileDialog .profile-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #f18b95;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}
#profileDialog .profile-title b {
  display: block;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  color: #fff !important;
  font-size: 1.04rem !important;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-overflow: clip;
}
#profileDialog .profile-title small { color: #b6b4b8 !important; font-size: 0.8rem; font-weight: 600; }
#profileDialog .profile-close,
#profileDialog .profile-gear,
#accountDialog .account-close {
  display: grid;
  width: 40px !important;
  height: 40px !important;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.055) !important;
  color: #f5f5f6 !important;
  font-size: 1.2rem;
  cursor: pointer;
}
#profileDialog .profile-close { top: 14px; right: 14px; }
#profileDialog .profile-gear { top: 14px; right: 62px; }
#profileDialog .profile-gear:hover,
#profileDialog .profile-close:hover,
#accountDialog .account-close:hover { border-color: rgba(237, 52, 69, 0.55) !important; background: rgba(237, 52, 69, 0.14) !important; }
#profileDialog .profile-body,
#accountDialog .account-body {
  min-height: 0;
  overflow-y: auto;
  padding: 20px !important;
  background: var(--profile-surface) !important;
  color: var(--profile-text) !important;
}
#profileDialog .profile-section + .profile-section { margin-top: 22px; }
#profileDialog .profile-section-title {
  display: block;
  margin: 0 0 7px;
  color: #f0eff1;
  font-size: 0.87rem;
  font-weight: 750;
}
#profileDialog .profile-help { margin: 0 0 12px; color: var(--profile-muted); font-size: 0.82rem; line-height: 1.45; }
#profileDialog .profile-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
#profileDialog .profile-upload-btn,
#profileDialog .profile-reset-btn,
#profileDialog .profile-save {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}
#profileDialog .profile-upload-btn,
#profileDialog .profile-save { background: var(--profile-red) !important; color: #fff !important; }
#profileDialog .profile-reset-btn { border-color: var(--profile-line); background: var(--profile-raised); color: #dedde0; }
#profileDialog .profile-reset-btn:hover { border-color: rgba(237, 52, 69, 0.55); color: #fff; }
#profileDialog .profile-upload-btn:disabled { opacity: 0.7; cursor: progress; }
#profileDialog .profile-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
#profileDialog .profile-account-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--profile-line); }
#profileDialog .profile-account-button {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--profile-line);
  border-radius: 12px;
  padding: 0 13px;
  background: #222225;
  color: #f1f0f2;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
#profileDialog .profile-account-button:hover { border-color: rgba(237, 52, 69, 0.6); background: #2a2023; }
#profileDialog .profile-account-button > i:first-child { color: #f06470; }
#profileDialog .profile-account-button > i:last-child { margin-left: auto; color: #aaa8ae; }
#profileDialog .profile-input-row { align-items: stretch; gap: 9px; }
#profileDialog .profile-input-row input {
  min-width: 0;
  height: 46px !important;
  border: 1px solid var(--profile-line) !important;
  border-radius: 12px !important;
  background: #131315 !important;
  color: #f5f5f6 !important;
  font-size: 0.9rem;
  font-weight: 550;
}
#profileDialog .profile-input-row input::placeholder { color: #85838a; }
#profileDialog .profile-input-row input:focus { border-color: var(--profile-red) !important; box-shadow: 0 0 0 3px rgba(237, 52, 69, 0.16) !important; }
#profileDialog .profile-save { min-width: 94px; }
#profileDialog :focus-visible,
#accountDialog :focus-visible { outline: 2px solid #ff6875; outline-offset: 3px; }
#accountDialog .account-title-icon { background: rgba(237, 52, 69, 0.16) !important; color: #ff6977 !important; }
#accountDialog .account-title b { color: #fff !important; }
#accountDialog .account-title small { color: #aaa8ae !important; }
#accountDialog .account-field label { color: #e8e7e9 !important; }
#accountDialog .account-input-wrap { border-color: var(--profile-line) !important; background: #131315 !important; }
#accountDialog .account-input-wrap input { background: transparent !important; color: #f5f5f6 !important; }
#accountDialog .account-input-wrap input::placeholder { color: #a1a1aa !important; opacity: 1; }
#accountDialog .account-input-wrap > i { color: #aaa8ae !important; }
#accountDialog .account-save { min-height: 46px; background: linear-gradient(135deg, #d8273b, #a91627) !important; box-shadow: none !important; }
#profileDialog .profile-body::-webkit-scrollbar,
#accountDialog .account-body::-webkit-scrollbar { width: 8px; }
#profileDialog .profile-body::-webkit-scrollbar-thumb,
#accountDialog .account-body::-webkit-scrollbar-thumb { border: 2px solid var(--profile-surface); border-radius: 10px; background: #4c4b50; }
@media (max-width: 760px) {
  #headerProfile.profile-badge { min-width: 0 !important; max-width: 188px !important; padding: 5px 9px 5px 6px !important; }
  #headerProfileAvatar.profile-avatar { width: 36px !important; height: 36px !important; min-width: 36px !important; }
  #headerProfile .header-profile-name { min-width: 0 !important; max-width: 118px !important; font-size: 0.76rem !important; }
  #profileDialog.profile-card { top: 78px !important; right: 12px !important; left: 12px !important; width: auto !important; max-height: calc(100vh - 94px) !important; }
  #profileDialog .profile-head { padding: 20px 16px 17px !important; }
  #profileDialog .profile-body { padding: 18px 16px !important; }
  #profileDialog .profile-top { padding-right: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  #profileDialog *, #accountDialog * { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
/* Match the workspace's more-specific theme and brand selectors too. */
html body #paneMainApplication#paneMainApplication #headerProfile.profile-badge {
  min-width: 0 !important;
  max-width: 230px !important;
  gap: 10px !important;
  padding: 6px 12px 6px 7px !important;
  border: 1px solid rgba(237, 52, 69, 0.48) !important;
  border-radius: 15px !important;
  background: linear-gradient(145deg, #171719, #242326) !important;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255, 255, 255, 0.035) !important;
}
html body #paneMainApplication#paneMainApplication #headerProfile.profile-badge:hover {
  border-color: rgba(237, 52, 69, 0.78) !important;
  background: linear-gradient(145deg, #1d1d20, #2a2023) !important;
}
html body #paneMainApplication#paneMainApplication #headerProfileAvatar.profile-avatar {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  overflow: hidden !important;
  clip-path: none !important;
  border: 2px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 50% !important;
  background: #2b2b2f !important;
  box-shadow: 0 0 0 2px rgba(237, 52, 69, 0.24) !important;
}
html body #paneMainApplication#paneMainApplication #headerProfile .header-profile-name {
  min-width: 0 !important;
  max-width: 158px !important;
  color: #f6f6f7 !important;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
  font-size: 0.84rem !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}
#accountDialog .account-head:after {
  background: linear-gradient(90deg, transparent, #ed3445, #b91c2b, transparent) !important;
}
@media (max-width: 760px) {
  html body #paneMainApplication#paneMainApplication #headerProfile.profile-badge {
    min-width: 0 !important;
    max-width: 188px !important;
    padding: 5px 9px 5px 6px !important;
  }
  html body #paneMainApplication#paneMainApplication #headerProfileAvatar.profile-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }
  html body #paneMainApplication#paneMainApplication #headerProfile .header-profile-name {
    min-width: 0 !important;
    max-width: 118px !important;
    font-size: 0.76rem !important;
  }
}
html body #paneMainApplication#paneMainApplication #headerProfile.profile-badge::before,
html body #paneMainApplication#paneMainApplication #headerProfile.profile-badge::after {
  content: none !important;
  display: none !important;
}
/* User-management cards reuse the account's real profile image or the shared default. */
html body #paneMainApplication#paneMainApplication #tab-manajemenUser .um-avatar {
  display: block !important;
  width: 48px !important;
  height: 48px !important;
  flex: 0 0 48px !important;
  overflow: hidden !important;
  border: 2px solid rgba(216, 39, 59, 0.72) !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: #262629 !important;
  box-shadow: 0 0 0 2px rgba(216, 39, 59, 0.12) !important;
}
#tab-manajemenUser .um-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}
html body #tab-estimasi#tab-estimasi#tab-estimasi .mu-est-co p strong {
  color: #141416 !important;
  font-weight: 800 !important;
}

/* True square geometry keeps profile images circular in legacy flex layouts. */
#headerProfileAvatar.profile-avatar,
html body #paneMainApplication#paneMainApplication #headerProfileAvatar.profile-avatar {
  width: 40px !important; height: 40px !important; min-width: 40px !important;
  min-height: 40px !important; max-width: 40px !important; max-height: 40px !important;
  flex: 0 0 40px !important; aspect-ratio: 1 / 1 !important;
  overflow: hidden !important; border-radius: 50% !important;
}
#headerProfileAvatar.profile-avatar > img.profile-photo-image,
#profileDialog .profile-big-avatar > img.profile-photo-image,
#tab-manajemenUser .um-avatar > img.um-avatar-image {
  display: block !important; width: 100% !important; height: 100% !important;
  min-width: 100% !important; min-height: 100% !important;
  aspect-ratio: 1 / 1 !important; object-fit: cover !important;
  object-position: center !important; border-radius: 50% !important;
}
#profileDialog .profile-big-avatar {
  width: 72px !important; height: 72px !important; min-width: 72px !important;
  min-height: 72px !important; max-width: 72px !important; max-height: 72px !important;
  flex: 0 0 72px !important; aspect-ratio: 1 / 1 !important;
  cursor: zoom-in;
}
#profileDialog .profile-big-avatar:focus-visible {
  outline: 3px solid rgba(237, 52, 69, .7); outline-offset: 5px;
}
html body #paneMainApplication#paneMainApplication #tab-manajemenUser .um-avatar {
  width: 48px !important; height: 48px !important; min-width: 48px !important;
  min-height: 48px !important; max-width: 48px !important; max-height: 48px !important;
  flex: 0 0 48px !important; aspect-ratio: 1 / 1 !important;
}
.profile-crop-overlay,
.profile-viewer-overlay {
  position: fixed; inset: 0; z-index: 1100005;
  display: grid; place-items: center; padding: 20px;
  background: rgba(7, 7, 9, .82); backdrop-filter: blur(9px);
}
.profile-crop-overlay[hidden], .profile-viewer-overlay[hidden] { display: none !important; }
.profile-crop-dialog {
  position: relative; width: min(100%, 390px); padding: 22px;
  border: 1px solid rgba(237, 52, 69, .52); border-radius: 22px;
  background: radial-gradient(ellipse at 0 0, rgba(216,39,59,.15), transparent 48%), #1d1d20;
  color: #f5f5f6; box-shadow: 0 28px 90px rgba(0,0,0,.6);
}
.profile-crop-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.profile-crop-heading h2 { margin: 4px 0 0; color:#fff; font-size:1.2rem; font-weight:800; }
.profile-crop-close, .profile-viewer-close {
  display:grid; place-items:center; width:40px; height:40px; flex:0 0 40px;
  border:1px solid rgba(255,255,255,.15); border-radius:12px;
  background:#29292d; color:#fff; font-size:1.3rem; cursor:pointer;
}
.profile-crop-stage { display:grid; place-items:center; padding:22px 0 18px; }
#profileCropCanvas {
  display:block; width:min(68vw, 280px); height:min(68vw, 280px); aspect-ratio:1/1;
  border:4px solid rgba(237,52,69,.72); border-radius:50%; object-fit:cover;
  box-shadow:0 0 0 5px rgba(237,52,69,.12), 0 12px 30px rgba(0,0,0,.35);
  cursor:grab; touch-action:none;
}
#profileCropCanvas.is-dragging { cursor:grabbing; }
.profile-crop-zoom { display:grid; gap:9px; color:#f0eff1; font-size:.9rem; font-weight:700; }
.profile-crop-zoom input { width:100%; accent-color:#ed3445; }
.profile-crop-hint { margin:7px 0 18px; color:#a1a1aa; font-size:.82rem; }
.profile-crop-actions { display:flex; justify-content:flex-end; gap:10px; }
.profile-crop-actions button { min-height:44px; padding:0 17px; border-radius:12px; font-weight:750; cursor:pointer; }
.profile-crop-cancel { border:1px solid #414146; background:#252528; color:#f5f5f6; }
.profile-crop-confirm { border:1px solid #d8273b; background:linear-gradient(135deg,#ed3445,#ad1728); color:#fff; }
.profile-crop-confirm:disabled { opacity:.7; cursor:progress; }
.profile-viewer-overlay { z-index:1100006; }
.profile-viewer-dialog { position:relative; display:grid; place-items:center; width:min(88vw,520px); }
.profile-viewer-image {
  display:block; width:min(76vw,420px); height:min(76vw,420px); max-height:76vh; max-width:76vh;
  aspect-ratio:1/1; object-fit:cover; border:5px solid rgba(237,52,69,.82);
  border-radius:50%; background:#252326; box-shadow:0 0 0 8px rgba(237,52,69,.14),0 30px 100px rgba(0,0,0,.7);
}
.profile-viewer-close { position:absolute; top:-12px; right:-12px; z-index:1; }
@media (max-width:760px) {
  #headerProfileAvatar.profile-avatar,
  html body #paneMainApplication#paneMainApplication #headerProfileAvatar.profile-avatar {
    width:36px !important; height:36px !important; min-width:36px !important;
    min-height:36px !important; max-width:36px !important; max-height:36px !important;
    flex-basis:36px !important;
  }
  .profile-crop-dialog { padding:18px; }
  .profile-viewer-close { top:-7px; right:-5px; }
}
#profileDialog .profile-photo-open {
  position:absolute; inset:0; display:block; width:100%; height:100%; padding:0;
  overflow:hidden; border:0; border-radius:50%; background:transparent; cursor:zoom-in;
}
#profileDialog .profile-photo-open:focus-visible { outline:3px solid #ed3445; outline-offset:4px; }
#profileDialog .profile-avatar-edit { z-index:2; }
#profileDialog .profile-photo-open > .profile-photo-image {
  display:block; width:100%; height:100%; aspect-ratio:1/1;
  border-radius:50%; object-fit:cover; object-position:center;
}
#profileCropZoom { appearance:none; height:6px; border-radius:99px; background:#48484d; }
#profileCropZoom::-webkit-slider-thumb {
  appearance:none; width:18px; height:18px; border:2px solid #ffd7dc;
  border-radius:50%; background:#ed3445; box-shadow:0 2px 8px rgba(0,0,0,.4); cursor:pointer;
}
#profileCropZoom::-moz-range-track { height:6px; border-radius:99px; background:#48484d; }
#profileCropZoom::-moz-range-thumb {
  width:14px; height:14px; border:2px solid #ffd7dc; border-radius:50%;
  background:#ed3445; box-shadow:0 2px 8px rgba(0,0,0,.4); cursor:pointer;
}
