.center-profile-shell {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 3200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.center-profile-shell[hidden] {
  display: none !important;
}

.center-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 286px;
  max-width: min(390px, calc(100vw - 40px));
  padding: 8px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(11, 31, 79, 0.96), rgba(23, 62, 140, 0.9)),
    radial-gradient(circle at top left, rgba(241, 200, 76, 0.18), transparent 58%);
  box-shadow: 0 16px 34px rgba(6, 17, 43, 0.24);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.center-profile-trigger:focus-visible,
.center-profile-logout:focus-visible,
.center-profile-manage:focus-visible,
.center-profile-modal-close:focus-visible,
.center-profile-photo-pick:focus-visible,
.center-profile-photo-clear:focus-visible,
.center-profile-form-cancel:focus-visible,
.center-profile-form-save:focus-visible {
  outline: 3px solid rgba(241, 200, 76, 0.4);
  outline-offset: 3px;
}

.center-profile-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.center-profile-avatar.has-photo {
  color: transparent;
}

.center-profile-trigger-copy {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.center-profile-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.center-profile-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.96rem;
  font-weight: 700;
}

.center-profile-role {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.82);
}

.center-profile-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 255, 255, 0.84);
  border-bottom: 2px solid rgba(255, 255, 255, 0.84);
  transform: rotate(45deg);
  transition: transform 160ms ease;
  margin-right: 4px;
}

.center-profile-shell.is-open .center-profile-chevron {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.center-profile-menu {
  width: min(390px, calc(100vw - 32px));
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(14, 38, 91, 0.14);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 50px rgba(14, 28, 60, 0.24);
  color: #16305e;
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.center-profile-shell.is-open .center-profile-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.center-profile-head {
  padding: 16px 18px 14px;
  background:
    linear-gradient(135deg, #2f49b8 0%, #365fe4 60%, #17c5bc 100%);
  color: #ffffff;
}

.center-profile-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.center-profile-head-copy {
  min-width: 0;
}

.center-profile-head-copy strong,
.center-profile-head-copy span {
  display: block;
}

.center-profile-head-copy strong {
  font-size: 1.08rem;
  font-weight: 700;
}

.center-profile-head-copy span {
  margin-top: 4px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
}

.center-profile-center-badge {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
}

.center-profile-body {
  padding: 14px 18px 18px;
  display: grid;
  gap: 9px;
}

.center-profile-actions {
  margin-top: 6px;
  display: grid;
  gap: 10px;
}

.center-profile-info-row {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #f6f8ff;
  border: 1px solid rgba(28, 53, 112, 0.06);
}

.center-profile-info-row span {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6f7fa6;
}

.center-profile-info-row strong {
  font-size: 0.92rem;
  line-height: 1.35;
  color: #16305e;
}

.center-profile-manage,
.center-profile-logout {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 11px 14px;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
}

.center-profile-manage {
  background: #edf3ff;
  color: #24498d;
}

.center-profile-logout {
  background: linear-gradient(135deg, #f1c84c, #f5d56e);
  color: #17335f;
}

.has-global-profile-bar .session-toolbar {
  display: none !important;
}

.center-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 3400;
  display: grid;
  place-items: center;
  padding: 18px;
}

.center-profile-modal[hidden] {
  display: none !important;
}

.center-profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 41, 0.48);
  backdrop-filter: blur(8px);
}

.center-profile-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 24px));
  border-radius: 30px;
  overflow: hidden;
  background: #ffffff;
  color: #17335f;
  box-shadow: 0 24px 60px rgba(9, 24, 58, 0.26);
}

.center-profile-modal-head {
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: #ffffff;
  background:
    linear-gradient(135deg, #2846b7 0%, #375ff0 65%, #17c5bc 100%);
}

.center-profile-modal-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.center-profile-modal-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.center-profile-modal-close {
  border: none;
  border-radius: 14px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.center-profile-form {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.center-profile-photo-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.center-profile-avatar-preview {
  width: 84px;
  height: 84px;
  flex-basis: 84px;
  border-radius: 22px;
  font-size: 1.3rem;
}

.center-profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.center-profile-photo-pick,
.center-profile-photo-clear,
.center-profile-form-cancel,
.center-profile-form-save {
  border: none;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.center-profile-photo-pick,
.center-profile-form-save {
  background: linear-gradient(135deg, #143463, #204f9a);
  color: #ffffff;
}

.center-profile-photo-clear,
.center-profile-form-cancel {
  background: #edf3ff;
  color: #274d92;
}

.center-profile-field {
  display: grid;
  gap: 7px;
}

.center-profile-field span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5e7098;
}

.center-profile-field input {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(25, 58, 117, 0.12);
  background: #f8faff;
  padding: 12px 14px;
  color: #17335f;
  font-size: 0.96rem;
}

.center-profile-field input[readonly] {
  color: #7a88a6;
}

.center-profile-form-note {
  margin: -2px 0 0;
  font-size: 0.88rem;
  color: #63759c;
}

.center-profile-form-feedback {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff3e8;
  color: #9a5b10;
  font-size: 0.9rem;
}

.center-profile-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

body[data-center-key="operation"].has-global-profile-bar .hero-glass {
  padding-top: 78px;
}

body[data-center-key="reports"].has-global-profile-bar .report-page-summary {
  padding-top: 82px;
}

body[data-center-key="analysis"].has-global-profile-bar .analiz-page-summary {
  padding-top: 84px;
}

@media (max-width: 900px) {
  .center-profile-shell {
    top: 12px;
    right: 12px;
  }

  .center-profile-trigger {
    min-width: 236px;
    max-width: min(330px, calc(100vw - 24px));
    padding: 8px 12px;
  }

  body[data-center-key="operation"].has-global-profile-bar .hero-glass,
  body[data-center-key="reports"].has-global-profile-bar .report-page-summary,
  body[data-center-key="analysis"].has-global-profile-bar .analiz-page-summary {
    padding-top: 86px;
  }
}

@media (max-width: 640px) {
  .center-profile-trigger {
    min-width: 0;
    width: calc(100vw - 24px);
  }

  .center-profile-menu {
    width: calc(100vw - 24px);
  }

  .center-profile-photo-row,
  .center-profile-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .center-profile-photo-actions {
    width: 100%;
  }

  .center-profile-photo-pick,
  .center-profile-photo-clear,
  .center-profile-form-cancel,
  .center-profile-form-save {
    width: 100%;
  }

  body[data-center-key="operation"].has-global-profile-bar .hero-glass,
  body[data-center-key="reports"].has-global-profile-bar .report-page-summary,
  body[data-center-key="analysis"].has-global-profile-bar .analiz-page-summary {
    padding-top: 94px;
  }
}
