/* =========================================================
   KBMB Profile Dashboard
   Scoped to the logged-in profile surface only
   ========================================================= */

.kb-profile-hub {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(16px, 2vw, 24px);
  border-radius: 36px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--kb-color-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.kb-profile-hub button,
.kb-profile-hub input,
.kb-profile-hub select,
.kb-profile-hub textarea,
.kb-profile-hub a {
  font: inherit;
}

.kb-profile-hub::before,
.kb-profile-hub::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(12px);
}

.kb-profile-hub::before {
  content: none;
  display: none;
}

.kb-profile-hub::after {
  content: none;
  display: none;
}

.kb-profile-hub .kbmb-widget--profile {
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Soft glass shell for the hub, without the heavier global glow */
.kb-profile-hub .kbmb-widget--profile.kbmb-glass {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.kb-profile-hub .kbmb-widget--profile.kbmb-glass::before,
.kb-profile-hub .kbmb-widget--profile.kbmb-glass::after {
  content: none;
  display: none;
}

.kb-profile-hub .kb-prof-widget {
  max-width: none;
  padding: 0;
}

.kb-profile-hub .kb-prof-inner.kbmb-profile-dashboard-shell {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.kb-auth-widget--hub {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.kb-auth-widget--hub .kb-title {
  display: none !important;
}

.kbmb-profile-alert {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 14px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.72);
}

.kbmb-profile-alert--success {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.18);
  background: rgba(236, 253, 245, 0.9);
}

.kbmb-profile-alert--error {
  color: #991b1b;
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(254, 242, 242, 0.92);
}

.kbmb-profile-band--hub {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 16px;
  padding: 16px 18px 14px;
  border-radius: 26px;
  border: 1px solid rgba(77, 89, 112, 0.78);
  background: #394256;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
  color: #f8fafc;
}

.kbmb-profile-band--hub .kbmb-profile-band__presence {
  margin: 0;
  padding: 2px 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(212, 175, 55, 0.88);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.kbmb-profile-band--hub .kbmb-profile-band__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
}

.kbmb-profile-band--hub .kbmb-profile-band__left {
  min-width: 0;
  flex: 1;
}

.kbmb-profile-band--hub .kbmb-profile-band__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 650;
  color: #f8fafc;
}

.kbmb-profile-band--hub .kbmb-profile-band__right {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.kbmb-profile-band--hub .kb-btn--secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  background: var(--kb-color-primary) !important;
  color: #d4af37 !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35) !important;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.kbmb-profile-band--hub .kb-btn--secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.35) !important;
  background: #24364a !important;
  color: #d4af37 !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.45) !important;
}

.kbmb-profile-band--hub .kb-btn--secondary:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.14),
    0 16px 40px rgba(15, 23, 42, 0.45);
}

.kbmb-profile-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.kbmb-profile-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.kbmb-profile-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.8), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.78));
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.kbmb-profile-card::after {
  content: "";
  position: absolute;
  inset: auto -14% -30% 36%;
  height: 150px;
  pointer-events: none;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.11), transparent 68%);
  filter: blur(20px);
}

.kbmb-profile-card--hero {
  padding: 22px;
}

.kbmb-profile-card--activity {
  padding-bottom: 16px;
}

.kbmb-profile-card--actions,
.kbmb-profile-card--resources {
  padding-bottom: 18px;
}

.kbmb-profile-card--danger {
  grid-column: 1 / -1;
  border-color: rgba(248, 113, 113, 0.14);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.86), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(254, 242, 242, 0.72));
}

.kbmb-profile-card__heading,
.kbmb-profile-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.kbmb-profile-card__eyebrow {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(100, 116, 139, 0.92);
}

.kbmb-profile-card__title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 650;
  color: var(--kb-color-text);
}

.kbmb-profile-card__subtitle {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--kb-color-text);
}

.kbmb-profile-card__subline {
  margin: 6px 0 0;
  color: var(--kb-color-muted);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

.kbmb-profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.kbmb-profile-avatar {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.9));
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.kbmb-profile-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.kbmb-profile-avatar__initials {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.kbmb-profile-identity__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kbmb-profile-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kbmb-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--kb-color-primary);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.kbmb-profile-pill--status {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 247, 250, 0.86));
}

.kbmb-profile-pill--muted {
  color: var(--kb-color-muted);
}

.kbmb-profile-pill--beta {
  color: #4338ca;
  background: rgba(79, 70, 229, 0.10);
  border-color: rgba(79, 70, 229, 0.16);
}

.kbmb-profile-pill--ok {
  color: #166534;
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.16);
}

.kbmb-profile-pill--warn {
  color: #92400e;
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.16);
}

.kbmb-profile-pill--candle {
  color: #92400e;
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.18);
}

.kbmb-profile-pill--bridge {
  color: var(--kb-color-primary);
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.10);
}

.kbmb-profile-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.kbmb-profile-supporting {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--kb-color-muted);
}

.kbmb-profile-edit-btn,
.kbmb-profile-modal__close {
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  background: var(--kb-color-primary) !important;
  color: #d4af37 !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35) !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.kbmb-profile-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
}

.kbmb-profile-edit-btn:hover,
.kbmb-profile-modal__close:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.35) !important;
  background: #24364a !important;
  color: #d4af37 !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.45) !important;
}

.kbmb-profile-edit-btn:focus-visible,
.kbmb-profile-modal__close:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.14),
    0 16px 40px rgba(15, 23, 42, 0.45);
}

.kbmb-profile-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kbmb-profile-subsection {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kbmb-profile-subsection__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kbmb-profile-subsection__heading h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--kb-color-text);
}

.kbmb-profile-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.kbmb-profile-activity-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.62);
}

.kbmb-profile-activity-panel__label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.88);
}

.kbmb-profile-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kbmb-profile-list--compact {
  gap: 6px;
}

.kbmb-profile-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.kbmb-profile-list-item--compact {
  padding: 10px 12px;
}

.kbmb-profile-list-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.kbmb-profile-list-item__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.kbmb-profile-list-item__content strong {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--kb-color-text);
}

.kbmb-profile-list-item__content span {
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--kb-color-muted);
}

.kbmb-profile-list-item__meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.05);
  color: var(--kb-color-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.kbmb-profile-list-item__meta--success {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.10);
  color: #166534;
}

.kbmb-profile-list-item__meta--warn {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.10);
  color: #92400e;
}

.kbmb-profile-list-item__meta--danger {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.10);
  color: #991b1b;
}

.kbmb-profile-list-item__meta--info,
.kbmb-profile-list-item__meta--neutral {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.05);
  color: var(--kb-color-primary);
}

.kbmb-profile-empty {
  margin: 0;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px dashed rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.58);
  color: var(--kb-color-muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.kbmb-profile-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--kb-color-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.kbmb-profile-chip--warn {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

.kbmb-profile-chip--danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.18);
  color: #991b1b;
}

.kbmb-profile-actions {
  display: grid;
  gap: 10px;
}

.kbmb-profile-action-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.8));
  color: inherit;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.kbmb-profile-action-tile::after {
  content: "→";
  position: absolute;
  top: 17px;
  right: 18px;
  font-size: 1.15rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.5);
  transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.kbmb-profile-action-tile strong {
  padding-right: 18px;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--kb-color-text);
}

.kbmb-profile-action-tile span {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--kb-color-muted);
}

.kbmb-profile-action-tile:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
  border-color: rgba(212, 175, 55, 0.34);
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 175, 55, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 232, 0.9));
}

.kbmb-profile-action-tile:hover::after {
  transform: translateX(3px);
  color: rgba(44, 62, 80, 0.86);
  opacity: 1;
}

.kbmb-profile-action-tile:focus-visible {
  outline: none;
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(212, 175, 55, 0.38);
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.12),
    0 18px 34px rgba(15, 23, 42, 0.12);
}

.kbmb-profile-action-tile--primary {
  background:
    radial-gradient(circle at 0% 0%, rgba(212, 175, 55, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 249, 232, 0.82));
}

.kbmb-profile-resource {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.7);
}

.kbmb-profile-resource__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--kb-color-muted);
}

.kbmb-profile-resource__header strong {
  color: var(--kb-color-text);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.kbmb-profile-supporting--tight {
  margin-top: -4px;
}

.kbmb-profile-inline-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--kb-color-primary);
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: #d4af37;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.kbmb-profile-inline-link a:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.35) !important;
  background: #24364a !important;
  color: #d4af37 !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.45) !important;
}

.kbmb-profile-inline-link a:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.14),
    0 16px 40px rgba(15, 23, 42, 0.45);
}

.kbmb-profile-highlight {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.08);
}

.kbmb-profile-highlight strong {
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #7c5d10;
}

.kbmb-profile-highlight span {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--kb-color-muted);
}

.kbmb-profile-resource--history {
  gap: 12px;
}

.kbmb-profile-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kbmb-profile-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.kbmb-profile-history-item__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.kbmb-profile-history-item__content strong {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--kb-color-text);
}

.kbmb-profile-history-item__content span {
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--kb-color-muted);
}

.kbmb-profile-history-item__meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.16);
  background: rgba(212, 175, 55, 0.10);
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.kbmb-profile-meters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kbmb-profile-meter {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.kbmb-profile-meter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--kb-color-muted);
}

.kbmb-profile-meter__head strong {
  color: var(--kb-color-text);
  font-size: 13px;
  font-weight: 650;
}

.kbmb-profile-meter__bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.kbmb-profile-meter__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d4af37, #f1c75b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.kbmb-profile-danger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kbmb-profile-danger-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.72);
}

.kbmb-profile-danger-block--critical {
  border-color: rgba(248, 113, 113, 0.18);
  background:
    radial-gradient(circle at 0% 0%, rgba(254, 226, 226, 0.66), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(254, 242, 242, 0.84));
}

.kbmb-profile-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.kbmb-profile-inline-status {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--kb-color-muted);
}

/* Profile form skin used by the modal and the standalone profile sections */
.kbmb-widget--profile .kb-profile-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.kbmb-widget--profile .kb-profile-form .kb-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
}

.kbmb-widget--profile .kb-profile-form .kb-field label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.95);
}

.kbmb-widget--profile .kb-profile-form .kb-field input,
.kbmb-widget--profile .kb-profile-form .kb-field select,
.kbmb-widget--profile .kb-profile-form .kb-field textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--kb-color-text);
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.kbmb-widget--profile .kb-profile-form .kb-field input:focus,
.kbmb-widget--profile .kb-profile-form .kb-field select:focus,
.kbmb-widget--profile .kb-profile-form .kb-field textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.42);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
  background: rgba(255, 255, 255, 0.98);
}

.kbmb-widget--profile .kb-profile-form .kb-field small,
.kbmb-widget--profile .kb-profile-form .kb-muted {
  color: var(--kb-color-muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
}

.kbmb-widget--profile .kb-profile-form input[type="range"] {
  width: 100%;
  accent-color: #2c3e50;
}

.kbmb-widget--profile .kb-profile-form input[readonly],
.kbmb-widget--profile .kb-profile-form input[disabled] {
  opacity: 0.72;
  background: rgba(241, 245, 249, 0.9);
}

.kbmb-widget--profile .kb-profile-form .kb-btn,
.kbmb-widget--profile .kbpf-avatar-form .kb-btn,
.kbmb-profile-modal .kb-profile-form .kb-btn,
.kbmb-profile-modal .kbpf-avatar-form .kb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--kb-color-primary);
  color: #d4af37;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.kbmb-widget--profile .kb-profile-form .kb-btn:hover,
.kbmb-widget--profile .kbpf-avatar-form .kb-btn:hover,
.kbmb-profile-modal .kb-profile-form .kb-btn:hover,
.kbmb-profile-modal .kbpf-avatar-form .kb-btn:hover {
  transform: translateY(-1px);
  background: #24364a;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.45);
}

.kbmb-widget--profile .kb-btn--secondary,
.kbmb-widget--profile .kb-btn--light,
.kbmb-profile-modal .kb-btn--secondary,
.kbmb-profile-modal .kb-btn--light {
  background: rgba(255, 255, 255, 0.8) !important;
  color: var(--kb-color-primary) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: none !important;
}

.kbmb-widget--profile .kb-btn--secondary:hover,
.kbmb-widget--profile .kb-btn--light:hover,
.kbmb-profile-modal .kb-btn--secondary:hover,
.kbmb-profile-modal .kb-btn--light:hover {
  background: rgba(255, 255, 255, 0.94) !important;
}

.kbmb-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: start center;
  padding: 24px 24px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

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

.kbmb-profile-modal__backdrop {
  position: absolute;
  inset: 0;
}

.kbmb-profile-modal__dialog {
  position: relative;
  width: min(1180px, 100%);
  margin: auto;
  max-height: none;
  overflow: visible;
  padding: 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.92), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

.kbmb-profile-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.kbmb-profile-modal__title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 650;
  color: var(--kb-color-text);
}

.kbmb-profile-modal__close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.kbmb-profile-modal__body {
  display: block;
}

.kbmb-profile-modal__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.kbmb-profile-modal__stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kbmb-profile-modal__panel {
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.kbmb-profile-modal__panel--wide {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kbmb-profile-modal__panel-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kbmb-profile-modal__panel-head h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--kb-color-text);
}

.kbmb-profile-modal .kbpf-avatar {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.kbmb-profile-modal .kbpf-avatar__img {
  width: 96px;
  height: 96px;
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.9));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.kbmb-profile-modal .kbpf-avatar__img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.kbmb-profile-modal .kbpf-avatar-form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.kbmb-profile-modal .kbpf-avatar-form .kb-field {
  margin: 0;
}

.kbmb-profile-modal .kbpf-avatar-form .kb-field input[type="file"] {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.9);
}

/* Preserve the existing semantic buttons inside the danger zone while making
   the layout lighter and calmer. */
.kbmb-profile-danger-btn {
  min-height: 42px !important;
  padding: 11px 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  background: var(--kb-color-primary) !important;
  color: #d4af37 !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35) !important;
  font-size: 14px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease !important;
}

.kbmb-profile-danger-btn--ghost {
  background: linear-gradient(135deg, #f5d778, var(--kb-color-accent)) !important;
  color: var(--kb-color-primary) !important;
  border-color: rgba(212, 175, 55, 0.42) !important;
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.32) !important;
}

.kbmb-profile-danger-btn:hover,
.kbmb-profile-danger-btn--ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.45) !important;
}

.kbmb-profile-danger-btn:hover {
  background: #24364a !important;
}

.kbmb-profile-danger-btn--ghost:hover {
  background: linear-gradient(135deg, #ffe38f, #e6c458) !important;
}

#kbmb-close-start {
  background: linear-gradient(180deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  border-color: rgba(185, 28, 28, 0.28) !important;
}

#kbmb-export-status,
#kbmb-close-inline-status {
  padding: 10px 0 0;
}

@media (max-width: 1024px) {
  .kbmb-profile-band--hub .kbmb-profile-band__main {
    flex-direction: column;
    align-items: flex-start;
  }

  .kbmb-profile-band--hub .kbmb-profile-band__right {
    justify-content: flex-start;
  }

  .kbmb-profile-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .kbmb-profile-activity-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .kbmb-profile-modal__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .kbmb-profile-danger-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .kbmb-profile-capsule-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .kb-profile-hub .kbmb-widget--profile.kbmb-glass {
    border-radius: 24px;
  }

  .kbmb-profile-card,
  .kbmb-profile-modal__panel {
    border-radius: 22px;
  }

  .kbmb-profile-card__heading,
  .kbmb-profile-card__header,
  .kbmb-profile-modal__header {
    flex-direction: column;
  }

  .kbmb-profile-list-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .kbmb-profile-list-item__time {
    white-space: normal;
  }

  .kbmb-profile-modal {
    padding: 16px;
  }

  .kbmb-profile-modal__dialog {
    max-height: calc(100vh - 32px);
    padding: 18px;
    border-radius: 24px;
  }

  .kbmb-profile-modal .kbpf-avatar {
    grid-template-columns: minmax(0, 1fr);
  }

  .kbmb-profile-modal .kbpf-avatar__img {
    width: 88px;
    height: 88px;
  }
}
