/**
 * Profile modals — modern responsive revamp (edit,
view,
unlock,
delete).
 */

.modal-backdrop--profile {
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  align-items: flex-end;
}

@media (min-width: 540px) {
  .modal-backdrop--profile {
    align-items: center;
  }
}.modal-backdrop--profile.active {
  backdrop-filter: blur(6px);
  background: rgba(63, 15, 25, 0.45) !important;
}#profileUnlockModal .modal-panel,
#profileDeleteModal .modal-panel,
.modal-panel--profile {
  --pm-bg: #ffffff;
  --pm-bg-soft: #fffdf8;
  --pm-border: rgba(231, 201, 120, 0.65);
  --pm-text: #3f0f19;
  --pm-text-soft: #7a4b12;
  --pm-accent: #b91c1c;
  --pm-gold: #a16207;
  --pm-radius: 18px;
  --pm-shadow: 0 24px 48px rgba(127, 29, 29, 0.18);

  display: flex !important;
  flex-direction: column !important;
  max-width: min(520px, 100%) !important;
  width: 100% !important;
  max-height: min(92vh, 720px) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border-radius: var(--pm-radius) var(--pm-radius) 0 0 !important;
  border: 1px solid var(--pm-border) !important;
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 28%) !important;
  box-shadow: var(--pm-shadow) !important;
  color: var(--pm-text) !important;
  transform: none !important;
  overflow: hidden;
}

@media (min-width: 540px) {
  #profileUnlockModal .modal-panel,
  #profileDeleteModal .modal-panel,
  .modal-panel--profile {
    border-radius: var(--pm-radius) !important;
    max-height: min(88vh, 680px) !important;
  }
}.modal-panel--profile-compact {
  max-width: min(420px, 100%) !important;
}/* Header */
.profile-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--pm-border);
  background: linear-gradient(180deg, #fffdf8, #fff);
  flex-shrink: 0;
}.profile-modal-header-main {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}.profile-modal-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #b91c1c, #991b1b 50%, #a16207);
  color: #fff;
  box-shadow: 0 3px 10px rgba(185, 28, 28, 0.25);
}.profile-modal-mark--unlock {
  background: linear-gradient(145deg, #a16207, #92400e);
}.profile-modal-title-group {
  min-width: 0;
}.profile-modal-title,
.modal-panel--profile .modal-title {
  margin: 0 !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
  color: var(--pm-text) !important;
  line-height: 1.25 !important;
}.profile-modal-subtitle,
.modal-panel--profile .modal-subtitle {
  margin: 0.2rem 0 0 !important;
  font-size: 0.84rem !important;
  line-height: 1.45 !important;
  color: var(--pm-text-soft) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}/* Guardrail — no header × dismiss in modals (DESIGN_GUIDELINES §5.12) */
.modal-backdrop .profile-modal-close,
.modal-backdrop .modal-close-btn,
.modal-backdrop .data-transfer-modal__close,
.modal-backdrop .byok-modal__close {
  display: none !important;
}.profile-modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--pm-border);
  border-radius: 10px;
  background: #fff;
  color: var(--pm-text-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}.profile-modal-close:hover {
  background: var(--pm-bg-soft);
  color: var(--pm-accent);
  border-color: rgba(185, 28, 28, 0.3);
}#profileEditModal .profile-modal-close,
.modal-panel--profile .profile-modal-close {
  background: #fff !important;
  color: var(--pm-text-soft) !important;
  border: 1px solid var(--pm-border) !important;
  box-shadow: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}/* Scrollable body */
.profile-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}.profile-modal-body--compact {
  padding: 1rem 1rem 0.25rem;
}/* Form blocks (no heavy nested boxes) */
.profile-form-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
}.profile-form-block--security {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(231, 201, 120, 0.45);
}.profile-form-block-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}.profile-form-block-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pm-gold);
}.profile-form-block-desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--pm-text-soft);
}.profile-form-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}.profile-form-fields--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .profile-form-fields--split {
    grid-template-columns: 1fr 1fr;
  }
}.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}.profile-field--hidden {
  display: none !important;
}.profile-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pm-gold);
  letter-spacing: 0.03em;
  text-transform: none;
}.profile-field-optional {
  font-weight: 500;
  color: var(--pm-text-soft);
  text-transform: none;
  letter-spacing: normal;
}.profile-field input[type="text"],
.profile-field input[type="password"],
.profile-field input[type="search"] {
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--pm-text);
  background: #fff;
  border: 1px solid var(--pm-border);
  border-radius: 11px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}.profile-field input:focus {
  outline: none;
  border-color: rgba(185, 28, 28, 0.45);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}/* Password field + visibility toggle */
.profile-password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}.profile-password-input-wrap input {
  padding-right: 2.75rem !important;
}.profile-password-toggle {
  position: absolute;
  right: 0.4rem;
  top: 0;
  bottom: 0;
  margin: auto 0;
  width: 34px;
  height: 34px;
  min-height: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(231, 201, 120, 0.55) !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: var(--pm-text-soft) !important;
  box-shadow: none !important;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: normal !important;
  transform: none !important;
  transition:
    background 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease;
}.profile-password-toggle:hover {
  background: #fffdf8 !important;
  color: var(--pm-accent) !important;
  border-color: rgba(185, 28, 28, 0.35) !important;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}.profile-password-toggle:active {
  transform: none !important;
  box-shadow: none !important;
}.profile-password-toggle:focus-visible {
  outline: 2px solid rgba(185, 28, 28, 0.45);
  outline-offset: 2px;
}.profile-password-toggle.is-visible {
  color: var(--pm-accent) !important;
  border-color: rgba(185, 28, 28, 0.4) !important;
  background: rgba(254, 242, 242, 0.9) !important;
}.profile-password-toggle .icon-eye-off {
  display: none;
}.profile-password-toggle.is-visible .icon-eye {
  display: none;
}.profile-password-toggle.is-visible .icon-eye-off {
  display: block;
}/* Remove-password switch */
.profile-switch {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  margin-top: 0.15rem;
  border-radius: 12px;
  border: 1px solid var(--pm-border);
  background: var(--pm-bg-soft);
  cursor: pointer;
  user-select: none;
}.profile-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}.profile-switch-box {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 0.12rem;
  border-radius: 6px;
  border: 2px solid rgba(161, 98, 7, 0.55);
  background: #fff;
  box-sizing: border-box;
  position: relative;
}.profile-switch-input:checked + .profile-switch-box {
  background: var(--pm-accent);
  border-color: var(--pm-accent);
}.profile-switch-input:checked + .profile-switch-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}.profile-switch-input:focus-visible + .profile-switch-box {
  outline: 2px solid var(--pm-accent);
  outline-offset: 2px;
}.profile-switch-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}.profile-switch-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pm-text);
  text-transform: none;
  letter-spacing: normal;
}.profile-switch-hint {
  text-transform: none;
  letter-spacing: normal;
}.profile-switch-hint {
  font-size: 0.72rem;
  color: var(--pm-text-soft);
  line-height: 1.35;
}.profile-form-error,
.modal-panel--profile .profile-password-error,
.modal-panel--profile .field-error {
  margin: 0.35rem 0 0 !important;
  padding: 0.5rem 0.65rem !important;
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
  color: #991b1b !important;
  background: #fef2f2 !important;
  border: 1px solid rgba(220, 38, 38, 0.25) !important;
  border-radius: 10px !important;
}/* Footer actions */
.profile-modal-footer {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
  padding: 0.85rem 1rem max(0.85rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--pm-border);
  background: #fff;
}.profile-modal-btn {
  flex: 1 1 0;
  min-height: 46px;
  padding: 0.55rem 1rem;
  border-radius: 11px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  border: 1px solid transparent;
}.profile-modal-btn--ghost {
  background: #fff;
  border-color: var(--pm-border);
  color: var(--pm-text-soft);
}.profile-modal-btn--ghost:hover {
  background: var(--pm-bg-soft);
  color: var(--pm-text);
}.profile-modal-btn--primary {
  background: linear-gradient(135deg, #b91c1c, #991b1b) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25) !important;
}.profile-modal-btn--primary:hover {
  background: linear-gradient(135deg, #991b1b, #7f1d1d) !important;
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.3) !important;
}

@media (min-width: 480px) {
  .profile-modal-footer {
    justify-content: flex-end;
  }

  .profile-modal-btn {
    flex: 0 1 auto;
    min-width: 7.5rem;
  }

  .profile-modal-btn--primary {
    min-width: 9.5rem;
  }
}/* Legacy delete modal content inside new shell */
#profileDeleteModal .modal-body {
  display: block !important;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem !important;
  background: transparent !important;
}#profileDeleteModal .form-section {
  border: none !important;
  background: transparent !important;
  padding: 0 0 0.85rem !important;
  margin: 0 0 0.75rem !important;
  box-shadow: none !important;
}#profileDeleteModal .form-section-header {
  margin-bottom: 0.45rem;
}#profileDeleteModal .form-section-title {
  font-size: 0.78rem !important;
  letter-spacing: 0.06em !important;
  color: var(--pm-gold) !important;
  text-transform: uppercase !important;
}#profileDeleteModal .modal-header {
  padding: 1rem !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--pm-border) !important;
  background: linear-gradient(180deg, #fffdf8, #fff) !important;
}#profileDeleteModal .modal-title {
  text-transform: none !important;
  color: var(--pm-text) !important;
}#profileDeleteModal label {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--pm-gold) !important;
  text-transform: none !important;
}#profileDeleteModal input[type="password"] {
  min-height: 46px;
  border-radius: 11px;
  border: 1px solid var(--pm-border);
  padding: 0.55rem 0.75rem;
  width: 100%;
  box-sizing: border-box;
}#profileDeleteModal .form-actions,
#profileDeleteModal .form-actions-row {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.5rem !important;
  margin: 0 !important;
  padding: 0.85rem 1rem max(0.85rem, env(safe-area-inset-bottom)) !important;
  border-top: 1px solid var(--pm-border) !important;
  background: #fff !important;
  justify-content: stretch !important;
}#profileDeleteModal .form-actions button,
#profileDeleteModal #profileDeleteConfirmBtn {
  flex: 1 1 0;
  min-height: 46px !important;
  border-radius: 11px !important;
  font-weight: 600 !important;
}#profileDeleteModal .btn-danger,
#profileDeleteModal #profileDeleteConfirmBtn:not(:disabled) {
  background: linear-gradient(135deg, #b91c1c, #991b1b) !important;
  color: #fff !important;
  border: none !important;
}/* ── Profile sheet modals (view + edit) — shared footprint ── */
#profileViewModal.modal-backdrop--profile,
#profileEditModal.modal-backdrop--profile,
#profileCreateModal.modal-backdrop--profile {
  align-items: center;
  padding: max(0.85rem, env(safe-area-inset-top)) max(0.85rem, env(safe-area-inset-right))
    max(0.85rem, env(safe-area-inset-bottom)) max(0.85rem, env(safe-area-inset-left));
}#profileViewModal .modal-panel,
#profileEditModal .modal-panel,
#profileCreateModal .modal-panel,
.modal-panel--profile-view.profile-view-modal,
.modal-panel--profile-view.profile-edit-modal,
.modal-panel--profile-view.profile-create-modal {
  --pv-border: rgba(202, 138, 4, 0.35);
  --pv-border-soft: rgba(202, 138, 4, 0.22);
  --pv-bg: linear-gradient(180deg, #fffdf8 0%, #fffaf0 100%);
  --pv-card-bg: #fff;
  --pv-card-shadow: 0 2px 10px rgba(120, 53, 15, 0.06);

  display: flex !important;
  flex-direction: column !important;
  min-height: 0;
  width: 100% !important;
  max-width: min(1120px, 96vw) !important;
  max-height: min(92vh, 980px) !important;
  margin: 0 auto !important;
  padding: 1.2rem 1.2rem 1.05rem !important;
  border-radius: 20px !important;
  border: 1px solid var(--pv-border) !important;
  background: var(--pv-bg) !important;
  box-shadow: 0 20px 48px rgba(120, 53, 15, 0.22) !important;
  color: var(--pm-text) !important;
  transform: none !important;
  overflow: hidden;
}#profileEditModal .modal-panel,
.modal-panel--profile-view.profile-edit-modal,
#profileCreateModal .modal-panel,
.modal-panel--profile-view.profile-create-modal {
  max-width: min(1120px, 96vw) !important;
}#profileViewModal .profile-view-modal-header,
#profileEditModal .profile-view-modal-header,
#profileCreateModal .profile-view-modal-header {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  padding: 0.15rem 0.2rem 0.85rem;
  border-bottom: 1px solid var(--pv-border-soft);
  background: transparent;
}.profile-view-header-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.55rem 0.75rem;
  flex: 0 1 auto;
  min-width: min(100%, 22rem);
  margin-left: auto;
}.profile-view-header-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1 1 9.5rem;
  min-width: min(100%, 10.5rem);
}.profile-view-owner-filter-wrap[hidden] {
  display: none !important;
}html.is-workspace-trust-profile #profileViewOwnerFilterWrap:not([hidden]) {
  display: flex !important;
}.profile-view-header-filter-label {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--pm-text-soft);
}.profile-view-header-filter {
  width: 100%;
  min-width: 9.5rem;
  min-height: 2.35rem;
  padding: 0.45rem 2.1rem 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(231, 201, 120, 0.55);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a4b12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.62rem center;
  background-size: 0.85rem;
  color: var(--pm-text);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}.profile-view-header-filter:hover:not(:disabled) {
  border-color: rgba(217, 119, 6, 0.55);
}.profile-view-header-filter:focus-visible {
  outline: none;
  border-color: rgba(217, 119, 6, 0.75);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.22);
}.profile-view-header-filter:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .profile-view-header-filters {
    width: 100%;
    margin-left: 0;
  }

  .profile-view-header-filter-wrap {
    flex: 1 1 100%;
    min-width: 0;
  }
}.profile-view-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
}.profile-view-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 0.2rem 0.2rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}.profile-modal-mark--view {
  background: linear-gradient(145deg, #b91c1c, #991b1b 55%, #7f1d1d);
}.profile-modal-mark--edit {
  background: linear-gradient(145deg, #c2410c, #b45309 55%, #a16207);
}.profile-modal-mark--create {
  background: linear-gradient(145deg, #b91c1c, #991b1b 55%, #7f1d1d);
}.profile-create-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}.profile-edit-dashboard {
  grid-template-columns: minmax(0, 1fr);
}.profile-edit-hero {
  margin-bottom: 0.15rem;
}.profile-edit-hero-lock {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.62rem 0.85rem 0.62rem 0.68rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(161, 98, 7, 0.06) 0%, rgba(255, 253, 248, 0.98) 58%, #fff 100%);
  box-shadow: inset 0 0 0 1px rgba(231, 201, 120, 0.28);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}.profile-edit-hero-lock--secured {
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.05) 0%, rgba(255, 253, 248, 0.98) 58%, #fff 100%);
  box-shadow: inset 0 0 0 1px rgba(231, 201, 120, 0.28);
}.profile-edit-hero-lock-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #a16207, #92400e 55%, #78350f);
  box-shadow: 0 2px 8px rgba(161, 98, 7, 0.18);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}.profile-edit-hero-lock--secured .profile-edit-hero-lock-icon {
  background: linear-gradient(145deg, #b91c1c, #991b1b 55%, #7f1d1d);
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.18);
}.profile-edit-hero-lock-icon svg {
  display: block;
}.profile-edit-hero-lock-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
}.profile-edit-hero-lock-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--pm-text);
}.profile-edit-hero-lock-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--pm-text-soft);
}.profile-edit-card .profile-view-section-title {
  margin-bottom: 0;
}.profile-edit-card .profile-view-section-note {
  margin: 0.15rem 0 0.45rem;
}.profile-edit-field-label,
.profile-edit-card .profile-field label {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: var(--pm-text-soft);
}.profile-edit-card .profile-field input[type="text"],
.profile-edit-card .profile-field input[type="password"] {
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(231, 201, 120, 0.55);
  border-radius: 10px;
  background: #fff;
}.profile-edit-card .profile-field input:focus {
  border-color: rgba(217, 119, 6, 0.75);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.22);
}.profile-edit-card .profile-password-toggle {
  border-color: rgba(231, 201, 120, 0.55) !important;
}.profile-security-footer {
  margin-top: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(231, 201, 120, 0.35);
}.profile-security-footer-default[hidden],
.profile-security-footer-pending[hidden] {
  display: none !important;
}.profile-security-footer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}.profile-security-footer-action svg {
  flex: 0 0 auto;
  display: block;
}.profile-security-footer-action--remove {
  width: 100%;
  border: 1px solid rgba(231, 201, 120, 0.55);
  background: linear-gradient(180deg, #fff 0%, #fffdf8 100%);
  color: #991b1b;
}.profile-security-footer-action--remove:hover {
  background: #fef2f2;
  border-color: rgba(185, 28, 28, 0.28);
  color: #7f1d1d;
  transform: none;
  box-shadow: none;
}.profile-security-footer-pending {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.85rem;
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 119, 6, 0.22);
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
  box-shadow: inset 3px 0 0 rgba(217, 119, 6, 0.72);
}.profile-security-footer-pending-body {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  flex: 1 1 12rem;
  min-width: 0;
}.profile-security-footer-pending-dot {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.38rem;
  border-radius: 50%;
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.22);
  animation: profile-security-pending-pulse 1.8s ease-in-out infinite;
}

@keyframes profile-security-pending-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.88);
    opacity: 0.72;
  }
}.profile-security-footer-pending-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  font-weight: 600;
  color: #92400e;
}.profile-security-footer-action--undo {
  flex: 0 0 auto;
  min-width: 4.75rem;
  min-height: 2rem;
  padding: 0.38rem 0.8rem;
  border: 1px solid rgba(217, 119, 6, 0.32);
  border-radius: 999px;
  background: #fff;
  color: #92400e;
  text-decoration: none;
}.profile-security-footer-action--undo:hover {
  background: #fff7ed;
  border-color: rgba(217, 119, 6, 0.48);
  color: #78350f;
  transform: none;
  box-shadow: none;
}.profile-security-footer-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.24);
}

@media (max-width: 520px) {
  .profile-security-footer-pending {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-security-footer-action--undo {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-security-footer-pending-dot {
    animation: none;
  }
}.profile-edit-security-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}.profile-edit-security-head .profile-view-section-title {
  margin-bottom: 0;
}.profile-security-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.12rem 0.52rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.85);
  border: 1px solid rgba(185, 28, 28, 0.18);
}.profile-security-badge[hidden] {
  display: none !important;
}.profile-edit-change-password-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}.profile-edit-fields--disabled {
  opacity: 0.58;
  pointer-events: none;
}.profile-edit-card .profile-switch {
  margin-top: 0.35rem;
  border-color: rgba(231, 201, 120, 0.45);
  background: linear-gradient(180deg, #fff 0%, #fffdf8 100%);
}.profile-edit-fields {
  margin-top: 0.35rem;
}

@media (min-width: 640px) {
  .profile-edit-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 960px) {
  .profile-edit-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }
}.profile-edit-footer-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (min-width: 480px) {
  .profile-edit-footer-actions {
    display: flex;
    justify-content: flex-end;
  }

  .profile-edit-footer-actions .profile-modal-btn {
    flex: 0 1 auto;
    min-width: 7.5rem;
  }

  .profile-edit-footer-actions .profile-modal-btn--primary {
    min-width: 9.5rem;
  }
}.profile-view-summary,
.profile-view-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--pv-border-soft);
  background: linear-gradient(180deg, #fffefb 0%, #fff 100%);
  box-shadow: var(--pv-card-shadow);
}.profile-view-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}.profile-view-hero-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
}.profile-view-hero-profile-copy {
  min-width: 0;
  flex: 1;
}.profile-view-hero-total {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.62rem 0.85rem 0.62rem 0.68rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.05) 0%, rgba(255, 253, 248, 0.98) 58%, #fff 100%);
  box-shadow: inset 0 0 0 1px rgba(231, 201, 120, 0.28);
}.profile-view-hero-total-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #b91c1c, #991b1b 55%, #7f1d1d);
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.18);
}.profile-view-hero-total-icon svg {
  display: block;
}.profile-view-hero-total-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
}.profile-view-hero-total-value {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--pm-text);
  font-variant-numeric: tabular-nums;
}.profile-view-hero-total-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--pm-text-soft);
}.profile-view-hero-status {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(231, 201, 120, 0.35);
}.profile-view-hero-status-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}.profile-view-hero-status-heading {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--pm-text);
}.profile-view-hero-status-insight {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--pm-text-soft);
}.profile-view-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}.profile-view-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .profile-view-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .profile-view-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}.profile-view-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--pv-border-soft);
  background: var(--pv-card-bg);
  box-shadow: var(--pv-card-shadow);
  min-width: 0;
}.profile-view-card--wide {
  grid-column: 1 / -1;
}.profile-view-card--currency {
  gap: 0.7rem;
}.profile-view-card--country {
  gap: 0;
  padding: 0;
  overflow: hidden;
}.profile-view-expandable-details,
.profile-view-currency-details {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 1px solid rgba(231, 201, 120, 0.45);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
  box-shadow: 0 1px 3px rgba(63, 15, 25, 0.04);
  overflow: hidden;
}.profile-view-card--country .profile-view-country-details {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}.profile-view-expandable-summary,
.profile-view-currency-summary {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.18rem;
  padding: 0.72rem 2.1rem 0.72rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  text-align: left;
  background: transparent;
  transition: background 0.15s ease;
}.profile-view-card--country .profile-view-country-summary {
  padding: 0.85rem 2.35rem 0.85rem 0.95rem;
}.profile-view-country-summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  width: 100%;
  min-width: 0;
}.profile-view-country-summary-count {
  flex: 0 0 auto;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.85);
  border: 1px solid rgba(185, 28, 28, 0.14);
  font-variant-numeric: tabular-nums;
}.profile-view-expandable-summary:hover,
.profile-view-currency-summary:hover {
  background: rgba(185, 28, 28, 0.04);
}.profile-view-expandable-summary:focus-visible,
.profile-view-currency-summary:focus-visible {
  outline: 2px solid rgba(185, 28, 28, 0.45);
  outline-offset: -2px;
}.profile-view-expandable-summary::-webkit-details-marker,
.profile-view-currency-summary::-webkit-details-marker {
  display: none;
}.profile-view-expandable-summary::after,
.profile-view-currency-summary::after {
  content: "▾";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pm-gold);
  font-size: 0.85rem;
  line-height: 1;
  transition: transform 0.2s ease;
}.profile-view-expandable-details[open] .profile-view-expandable-summary::after,
.profile-view-currency-details[open] .profile-view-currency-summary::after {
  transform: translateY(-50%) rotate(180deg);
}.profile-view-expandable-details[open] .profile-view-expandable-summary,
.profile-view-currency-details[open] .profile-view-currency-summary {
  border-bottom: 1px solid rgba(231, 201, 120, 0.35);
}.profile-view-expandable-summary-hint,
.profile-view-currency-summary-hint {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--pm-text-soft);
}.profile-view-expandable-details[open] .profile-view-expandable-summary-hint,
.profile-view-currency-details[open] .profile-view-currency-summary-hint {
  display: none;
}.profile-view-expandable-panel,
.profile-view-currency-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem 0.75rem;
  width: 100%;
  box-sizing: border-box;
}.profile-view-card--country .profile-view-country-panel {
  padding: 0.15rem 0.95rem 0.85rem;
}.profile-view-card--country .profile-view-chip-label {
  line-height: 1.35;
  word-break: break-word;
}.profile-view-currency-details {
  margin: 0.1rem 0 0;
}.profile-view-chips--column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  width: 100%;
}.profile-view-chips--column .profile-view-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
}.profile-view-chips--column .profile-view-chip-label {
  flex: 1 1 auto;
  min-width: 0;
}.profile-view-chips--column .profile-view-chip-count {
  margin-left: 0.65rem;
}.profile-view-chips--column .profile-view-empty {
  grid-column: 1 / -1;
}.profile-view-metrics-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .profile-view-metrics-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}.profile-view-metrics-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}.profile-view-card--raci-leads {
  gap: 0.65rem;
}.profile-view-raci-leads-note {
  margin: 0;
}.profile-view-raci-leads-summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  min-width: 0;
}.profile-view-raci-leads-summary-count {
  flex: 0 0 auto;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.85);
  border: 1px solid rgba(185, 28, 28, 0.14);
  font-variant-numeric: tabular-nums;
}.profile-view-raci-leads-chips {
  max-height: min(16rem, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.15rem;
}.profile-view-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}.profile-view-avatar {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #b91c1c, #991b1b);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 12px rgba(185, 28, 28, 0.22);
}.profile-view-identity-copy {
  min-width: 0;
  flex: 1;
}.profile-view-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--pm-text);
  letter-spacing: -0.02em;
  word-break: break-word;
}.profile-view-name--placeholder {
  color: var(--pm-text-soft);
  font-weight: 600;
  font-style: italic;
  letter-spacing: normal;
}.profile-view-team-wrap {
  margin: 0.32rem 0 0;
}.profile-view-team-wrap[hidden] {
  display: none !important;
}.profile-view-team {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #92400e;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(217, 119, 6, 0.22);
}.profile-view-team--empty {
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: var(--pm-text-soft);
  background: rgba(122, 75, 18, 0.08);
  border-color: rgba(231, 201, 120, 0.35);
}.profile-view-status-stats {
  width: 100%;
  min-width: 0;
}.profile-view-status-overview {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}.profile-view-status-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(122, 75, 18, 0.06);
  border: 1px solid rgba(231, 201, 120, 0.3);
}.profile-view-status-bar-segment {
  display: block;
  min-width: 6px;
  height: 100%;
  transition: opacity 0.15s ease, filter 0.15s ease;
}.profile-view-status-bar-segment:hover {
  opacity: 0.88;
  filter: brightness(1.05);
}.profile-view-status-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: clamp(0.28rem, 1.2vw, 0.55rem);
  width: 100%;
  min-width: 0;
}.profile-view-status-item {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  min-width: 0;
  padding: clamp(0.42rem, 1.4vw, 0.58rem) clamp(0.36rem, 1.1vw, 0.55rem);
  padding-left: clamp(0.52rem, 1.6vw, 0.68rem);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.92);
  border: none;
  box-shadow: inset 0 0 0 1px rgba(231, 201, 120, 0.22);
  transition: box-shadow 0.15s ease, background 0.15s ease;
  overflow: hidden;
}.profile-view-status-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--pv-status-accent, #a8a29e);
}.profile-view-status-item:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(231, 201, 120, 0.38);
}.profile-view-status-item[data-status="Not Started"] {
  --pv-status-accent: #94a3b8;
}.profile-view-status-item[data-status="In Progress"] {
  --pv-status-accent: #3b82f6;
}.profile-view-status-item[data-status="On Hold"] {
  --pv-status-accent: #f59e0b;
}.profile-view-status-item[data-status="Done"] {
  --pv-status-accent: #10b981;
}.profile-view-status-item[data-status="Cancelled"] {
  --pv-status-accent: #ef4444;
}.profile-view-status-item[data-status="Not set"] {
  --pv-status-accent: #a8a29e;
}.profile-view-status-item-label {
  font-size: clamp(0.56rem, 1.7vw, 0.68rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--pm-text-soft);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}.profile-view-status-item-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem;
  min-width: 0;
}.profile-view-status-item-count {
  font-size: clamp(0.92rem, 3vw, 1.22rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--pm-text);
  font-variant-numeric: tabular-nums;
}.profile-view-status-item-pct {
  flex: 0 0 auto;
  font-size: clamp(0.54rem, 1.5vw, 0.64rem);
  font-weight: 700;
  line-height: 1;
  color: var(--pv-status-accent, var(--pm-text-soft));
  font-variant-numeric: tabular-nums;
}.profile-view-status-stats-empty {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--pm-text-soft);
  font-style: italic;
}

@media (max-width: 520px) {
  .profile-view-hero-top {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-view-hero-total {
    width: 100%;
    box-sizing: border-box;
  }

  .profile-edit-hero-lock {
    width: 100%;
    box-sizing: border-box;
  }
}.profile-view-section-title {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pm-gold);
}.profile-view-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-start;
}.profile-view-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.35rem 0.55rem 0.35rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(231, 201, 120, 0.5);
  background: #fffdf8;
  box-shadow: 0 1px 2px rgba(63, 15, 25, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}.profile-view-chip:hover {
  border-color: rgba(185, 28, 28, 0.28);
  box-shadow: 0 2px 6px rgba(127, 29, 29, 0.08);
}.profile-view-chip-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pm-text);
  line-height: 1.25;
  word-break: break-word;
}.profile-view-chip-count {
  flex: 0 0 auto;
  min-width: 1.35rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.85);
  font-variant-numeric: tabular-nums;
}.profile-view-empty {
  font-size: 0.84rem;
  color: var(--pm-text-soft);
  font-style: italic;
}.profile-view-section-note {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--pm-text-soft);
}.profile-view-section--currency {
  gap: 0.65rem !important;
}.profile-view-currency-summary-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pm-gold);
}.profile-view-card--currency .profile-view-section-note {
  margin: 0;
  text-align: left;
  max-width: none;
}.profile-view-currency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: none;
  margin: 0;
}.profile-view-currency-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 0.35rem 0.65rem;
  padding: 0.72rem 0.85rem 0.78rem;
  border-radius: 11px;
  border: 1px solid rgba(231, 201, 120, 0.45);
  background: linear-gradient(180deg, #fff 0%, #fffdf8 100%);
  min-width: 0;
}.profile-view-currency-card--dual .profile-view-currency-card-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
}.profile-view-currency-card-head {
  display: contents;
}.profile-view-currency-card-label {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--pm-text);
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}.profile-view-currency-card-count {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--pm-text-soft);
  white-space: nowrap;
  text-align: right;
}.profile-view-currency-card-values {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  min-width: 0;
  margin-top: 0.08rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(231, 201, 120, 0.28);
}.profile-view-currency-card-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.14rem;
  min-width: 0;
}.profile-view-currency-card-amount--eur {
  align-items: flex-end;
  text-align: right;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(231, 201, 120, 0.35);
}.profile-view-currency-card-amount-caption {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pm-text-soft);
  line-height: 1.2;
}.profile-view-currency-card-amount--eur .profile-view-currency-card-amount-caption {
  color: #64748b;
}.profile-view-currency-card-value {
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.2;
  color: #9a3412;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}.profile-view-currency-card-eur-value {
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.2;
  color: #334155;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}.profile-view-currency-card-eur-meta {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #94a3b8;
  line-height: 1.25;
}.profile-view-currency-card-eur {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}.profile-view-currency-card-eur--unavailable {
  color: var(--pm-text-soft);
  font-style: italic;
  font-weight: 500;
}

@media (max-width: 360px) {
  .profile-view-currency-card--dual .profile-view-currency-card-values {
    grid-template-columns: 1fr;
  }

  .profile-view-currency-card-amount--eur {
    padding-left: 0;
    border-left: none;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(231, 201, 120, 0.35);
    align-items: flex-start;
    text-align: left;
  }
}.profile-view-currency-grid .profile-view-rice-empty {
  width: 100%;
}.profile-view-section-note[hidden] {
  display: none !important;
}.profile-view-rice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}.profile-view-rice-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  border-radius: 11px;
  border: 1px solid rgba(231, 201, 120, 0.45);
  background: linear-gradient(180deg, #fff 0%, #fffdf8 100%);
}.profile-view-rice-card--total {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-color: rgba(185, 28, 28, 0.22);
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.35), rgba(255, 251, 235, 0.9));
}.profile-view-rice-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pm-text-soft);
}.profile-view-rice-value {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--pm-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}.profile-view-rice-card--total .profile-view-rice-value {
  font-size: 1.15rem;
  color: #991b1b;
}.profile-view-rice-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.75rem;
  border-radius: 11px;
  font-size: 0.84rem;
  color: var(--pm-text-soft);
  text-align: center;
  background: rgba(122, 75, 18, 0.06);
  border: 1px dashed rgba(231, 201, 120, 0.55);
}.profile-view-footer-bar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-top: 0.85rem;
  padding: 0.62rem 0.25rem 0.3rem;
  border-top: 1px solid var(--pv-border-soft, rgba(202, 138, 4, 0.22));
  background: linear-gradient(180deg, rgba(255, 251, 242, 0.98), rgba(255, 247, 234, 1));
  box-shadow: 0 -4px 14px rgba(120, 53, 15, 0.06);
}.profile-view-footer-bar--actions-only {
  justify-content: stretch;
}.profile-view-footer-bar--actions-only .profile-view-footer-actions {
  width: 100%;
}.profile-view-footer-bar--actions-only .profile-modal-btn {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}.profile-view-footer-hint {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  color: var(--pm-text-soft);
}.profile-view-footer-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.55rem;
}

@media (max-width: 1400px) {
  #profileViewModal.modal-backdrop--profile,
  #profileEditModal.modal-backdrop--profile,
  #profileCreateModal.modal-backdrop--profile {
    --profile-view-modal-pad-top: max(var(--modal-safe-pad-y, 0.75rem), env(safe-area-inset-top));
    --profile-view-modal-pad-right: max(var(--modal-safe-pad-x, 0.75rem), env(safe-area-inset-right));
    --profile-view-modal-pad-bottom: max(var(--modal-safe-pad-y, 0.75rem), env(safe-area-inset-bottom));
    --profile-view-modal-pad-left: max(var(--modal-safe-pad-x, 0.75rem), env(safe-area-inset-left));

    padding: var(--profile-view-modal-pad-top) var(--profile-view-modal-pad-right)
      var(--profile-view-modal-pad-bottom) var(--profile-view-modal-pad-left);
    align-items: stretch;
    overflow: hidden;
  }

  #profileViewModal .modal-panel,
  #profileEditModal .modal-panel,
  #profileCreateModal .modal-panel {
    height: calc(100dvh - var(--profile-view-modal-pad-top) - var(--profile-view-modal-pad-bottom));
    max-height: none;
    overflow: hidden;
  }

  #profileViewModal .modal-panel {
    max-width: min(1120px, 100%);
  }

  #profileEditModal .modal-panel {
    max-width: min(1120px, 100%);
  }

  #profileCreateModal .modal-panel {
    max-width: min(1120px, 100%);
  }
}

@media (max-width: 380px) {
  .profile-view-rice-grid {
    grid-template-columns: 1fr;
  }

  .profile-view-rice-card--total {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 480px) {
  .profile-view-rice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-view-rice-card--total {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
  }
}/* Kill global red button bleed inside profile modals */
.modal-panel--profile button:not(.profile-password-toggle),
#profileEditModal button,
#profileCreateModal button,
#profileUnlockModal button {
  background: unset;
  color: inherit;
  text-transform: none !important;
  letter-spacing: normal !important;
}#profileEditModal #profileEditSaveBtn,
#profileCreateModal #profileCreateSaveBtn,
#profileUnlockModal #profileUnlockConfirmBtn {
  background: linear-gradient(135deg, #b91c1c, #991b1b) !important;
  color: #fff !important;
}#profileEditModal #profileEditCancelBtn,
#profileCreateModal #profileCreateCancelBtn,
#profileUnlockModal #profileUnlockCancelBtn {
  background: #fff !important;
  border: 1px solid var(--pm-border) !important;
  color: var(--pm-text-soft) !important;
  min-width: 7.5rem;
}#profileEditModal .profile-security-footer-action--remove {
  background: linear-gradient(180deg, #fff 0%, #fffdf8 100%) !important;
  border: 1px solid rgba(231, 201, 120, 0.55) !important;
  color: #991b1b !important;
  box-shadow: none !important;
  transform: none !important;
  min-width: 0 !important;
  width: 100%;
}#profileEditModal .profile-security-footer-action--remove:hover {
  background: #fef2f2 !important;
  border-color: rgba(185, 28, 28, 0.28) !important;
  color: #7f1d1d !important;
  transform: none !important;
  box-shadow: none !important;
}#profileEditModal .profile-security-footer-action--undo {
  background: #fff !important;
  border: 1px solid rgba(217, 119, 6, 0.32) !important;
  color: #92400e !important;
  box-shadow: none !important;
  transform: none !important;
  min-width: 4.75rem !important;
  width: auto !important;
  text-decoration: none !important;
}#profileEditModal .profile-security-footer-action--undo:hover {
  background: #fff7ed !important;
  border-color: rgba(217, 119, 6, 0.48) !important;
  color: #78350f !important;
  transform: none !important;
  box-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .profile-modal-btn,
  .profile-password-toggle,
  .profile-view-chip {
    transition: none;
  }
}
