/* Standalone blogger dashboard. Scoped to profile.html to avoid side effects on other pages. */
.profile-dashboard-body {
  --pd-bg: var(--color-background, #FFFFFF);
  --pd-card: var(--color-surface, #ffffff);
  --pd-text: var(--color-text-primary, #181A20);
  --pd-muted: var(--color-text-muted, #929AA8);
  --pd-border: var(--color-border, #EAECEF);
  --pd-grid: var(--color-background-alt, #F5F6F7);
  --pd-yellow: var(--color-accent, #F0B90B);
  --pd-yellow-hover: var(--color-warning, #F0B90B);
  --pd-green: var(--color-success, #0ECB81);
  --pd-green-soft: var(--color-success-soft, #E9FFF6);
  --pd-purple: var(--color-primary, #FCD535);
  --pd-purple-soft: var(--color-primary-soft, #FFF8D6);
  --pd-blue: var(--color-info, #707A8A);
  --pd-shadow: 0 7px 28px rgba(24, 26, 32, .055);
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgba(240, 185, 11, .035), transparent 23rem),
    var(--pd-bg);
  color: var(--pd-text);
  overflow-x: hidden;
}
.profile-dashboard-body .skip-link { z-index: 1200; }
.profile-dashboard-main { min-height: 100vh; padding: 24px 0 28px; }
.profile-dashboard-shell { width: min(calc(100% - 48px), 1160px); margin-inline: auto; }
.profile-dashboard-loading { height: 620px; display: grid; place-content: center; grid-auto-flow: column; gap: 8px; }
.profile-dashboard-loading span { width: 9px; height: 9px; border-radius: 50%; background: var(--pd-yellow); animation: pd-pulse .9s ease-in-out infinite alternate; }
.profile-dashboard-loading span:nth-child(2) { animation-delay: .15s; }
.profile-dashboard-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes pd-pulse { to { opacity: .25; transform: translateY(-5px); } }

.influencer-dashboard {
  min-width: 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
}
.influencer-profile-panel { grid-column: 1; grid-row: 1; }
.influencer-analytics { grid-column: 2; grid-row: 1; }
.pd-card {
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 17px;
  box-shadow: var(--pd-shadow);
}

/* Profile card */
.influencer-profile-panel {
  position: sticky;
  top: 20px;
  min-height: 520px;
  padding: 18px 18px 16px;
  overflow: hidden;
  text-align: center;
}
.profile-dot-pattern {
  position: absolute;
  top: 17px;
  left: 19px;
  width: 44px;
  height: 44px;
  opacity: .47;
  background-image: radial-gradient(circle, var(--pd-yellow) 1.2px, transparent 1.5px);
  background-size: 8px 8px;
  mask-image: linear-gradient(135deg, #000, transparent 90%);
  pointer-events: none;
}
.profile-menu-wrap { position: absolute; top: 14px; right: 14px; z-index: 4; }
.profile-icon-button,
.chart-menu-button,
.brand-scroll-button {
  border: 0;
  color: #707A8A;
  background: transparent;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.profile-icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.profile-icon-button:hover,
.profile-icon-button[aria-expanded="true"] { color: var(--pd-text); background: #FAFAFA; }
.profile-icon-button:active { transform: scale(.94); }
.profile-icon-button svg { width: 21px; height: 21px; }
.profile-menu {
  position: absolute;
  top: 42px;
  right: 0;
  width: 176px;
  padding: 7px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--pd-border);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(31, 42, 55, .14);
  text-align: right;
}
.profile-menu button,
.profile-menu a {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  color: #707A8A;
  background: transparent;
  font-size: .74rem;
  font-weight: 700;
  text-align: right;
}
.profile-menu button:hover,
.profile-menu a:hover { background: #FAFAFA; color: var(--pd-text); }
.profile-menu svg { width: 17px; height: 17px; }

.profile-avatar-frame {
  width: 194px;
  height: 194px;
  margin: 11px auto 14px;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}
.profile-avatar-frame::before,
.profile-avatar-frame::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}
.profile-avatar-frame::before {
  inset: 0;
  z-index: 0;
  background: conic-gradient(from 220deg, var(--pd-purple), var(--pd-yellow), var(--pd-green), #707A8A, #181A20, var(--pd-purple));
  box-shadow: 0 10px 27px color-mix(in srgb, var(--pd-purple) 20%, transparent);
  transition: filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.profile-avatar-frame::after {
  inset: 4px;
  z-index: 1;
  background: var(--pd-card);
}
.influencer-profile-panel:hover .profile-avatar-frame::before {
  filter: saturate(1.08) brightness(1.04);
  transform: scale(1.012);
  box-shadow: 0 12px 31px color-mix(in srgb, var(--pd-purple) 27%, transparent);
}
.profile-avatar-frame img {
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  position: relative;
  z-index: 2;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}
.profile-verified-badge {
  position: absolute;
  right: -1px;
  bottom: 13px;
  z-index: 4;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 11px;
  color: #fff;
  background: var(--pd-yellow);
  transform: rotate(7deg);
  box-shadow: 0 5px 12px rgba(240, 185, 11, .20);
}
.profile-verified-badge svg { width: 17px; height: 17px; transform: rotate(-7deg); }
.profile-identity h1 { margin: 0; font-size: 1.62rem; font-weight: 950; letter-spacing: -.045em; }
.profile-category {
  min-height: 28px;
  margin-top: 8px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  color: #707A8A;
  background: #FAFAFA;
  font-size: .67rem;
  font-weight: 750;
}
.profile-category svg { width: 14px; height: 14px; }
.profile-rating { margin-top: 10px; }
.profile-rating-stars { color: #F0B90B; font-size: 1.46rem; line-height: 1; letter-spacing: .07em; white-space: nowrap; }
.profile-rating-meta { margin: 7px 0 0; color: #929AA8; font-size: .69rem; }
.profile-rating-meta strong { color: #181A20; }
.profile-actions { margin-top: 19px; display: grid; gap: 9px; }
.profile-actions .button { width: 100%; min-height: 46px; border-radius: 9px; font-size: .82rem; box-shadow: none; }
.profile-actions .button-primary { color: #181A20; background: var(--pd-yellow); }
.profile-actions .button-primary:hover { background: var(--pd-yellow-hover); box-shadow: 0 8px 19px rgba(240, 185, 11, .18); }
.profile-actions .button-secondary { color: #929AA8; border-color: #EAECEF; }
.profile-actions .button-secondary:hover { color: #181A20; border-color: #D5D9DF; background: #FAFAFA; }
.profile-actions svg { width: 18px; height: 18px; }
.profile-trust-note {
  margin: 14px -18px -16px;
  padding: 13px 15px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid #F5F6F7;
  color: #707A8A;
  font-size: .56rem;
  white-space: nowrap;
}
.profile-trust-note svg { width: 15px; height: 15px; flex: 0 0 auto; }
.profile-trust-note strong { color: #929AA8; }

/* Analytics column */
.influencer-analytics { min-width: 0; display: grid; gap: 18px; }
.analytics-toolbar {
  min-height: 42px;
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 3px;
}
.analytics-title { display: flex; align-items: center; gap: 12px; direction: ltr; }
.analytics-title > div { direction: rtl; text-align: right; }
.analytics-title > svg { width: 28px; height: 28px; color: #707A8A; }
.analytics-title h2 { margin: 0 0 2px; color: #181A20; font-size: 1.1rem; font-weight: 950; }
.analytics-title p { margin: 0; color: #707A8A; font-size: .61rem; }
.range-picker {
  min-width: 142px;
  direction: rtl;
  height: 39px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #EAECEF;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(40, 51, 65, .035);
}
.range-picker svg { width: 17px; height: 17px; color: #929AA8; flex: 0 0 auto; }
.range-picker select { width: 100%; border: 0; outline: 0; color: #707A8A; background: transparent; font-size: .68rem; font-weight: 800; }
.analytics-charts { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; direction: ltr; }
.analytics-chart-card { min-width: 0; height: 245px;
  direction: rtl; padding: 15px 15px 10px; overflow: hidden; }
.chart-card-toolbar { min-height: 56px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.chart-card-heading { display: flex; align-items: flex-start; gap: 10px; }
.chart-card-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; flex: 0 0 auto; }
.chart-card-icon svg { width: 22px; height: 22px; }
.chart-card-icon.is-green { color: var(--pd-green); background: var(--pd-green-soft); }
.chart-card-icon.is-purple { color: var(--pd-purple); background: var(--pd-purple-soft); }
.chart-card-copy { display: grid; justify-items: start; }
.chart-card-copy small { margin-bottom: 1px; color: #707A8A; font-size: .67rem; font-weight: 900; }
.chart-card-copy strong { font-size: 1.28rem; line-height: 1.2; }
.chart-card-copy strong.is-green { color: var(--pd-green); }
.chart-card-copy strong.is-purple { color: var(--pd-purple); }
.chart-growth-pill { margin-top: 3px; padding: 2px 6px; border-radius: 5px; font-size: .58rem; font-weight: 900; line-height: 1.4; }
.chart-growth-pill.is-green { color: #0ECB81; background: var(--pd-green-soft); }
.chart-growth-pill.is-purple { color: #F0B90B; background: var(--pd-purple-soft); }
.chart-menu-button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; }
.chart-menu-button:hover { color: #181A20; background: #FAFAFA; }
.chart-menu-button:active { transform: scale(.94); }
.chart-menu-button svg { width: 18px; height: 18px; }
.chart-viewport { height: 156px; margin: 0; }
.dashboard-chart { width: 100%; height: 100%; overflow: visible; }
.dashboard-chart text { font-family: var(--font-family); fill: #707A8A; font-size: 9px; }
.dashboard-chart .chart-grid { stroke: var(--pd-grid); stroke-width: 1; }
.dashboard-chart .chart-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.15; }
.dashboard-chart .chart-area { opacity: 1; }
.dashboard-chart .chart-dot { stroke: #fff; stroke-width: 2; }

.performance-summary { min-height: 127px; display: grid; grid-template-columns: minmax(0, 1fr) 112px; overflow: hidden; }
.performance-summary-content { min-width: 0; padding: 13px 17px 11px; }
.performance-summary-head { display: flex; align-items: center; justify-content: flex-start; gap: 8px; margin-bottom: 12px; }
.performance-summary-head h3 { margin: 0; font-size: .78rem; font-weight: 950; }
.performance-summary-head span { width: 7px; height: 7px; border-radius: 50%; background: #F0B90B; }
.performance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.performance-item { min-width: 0; padding: 0 15px; display: grid; justify-items: center; border-inline-start: 1px solid #EAECEF; }
.performance-item:first-child { border-inline-start: 0; }
.performance-item small { color: #707A8A; font-size: .58rem; }
.performance-item strong { color: #181A20; font-size: .89rem; line-height: 1.45; }
.performance-item em { margin-top: 2px; padding: 1px 5px; border-radius: 4px; color: #0ECB81; background: var(--pd-green-soft); font-size: .52rem; font-style: normal; font-weight: 900; }
.performance-art {
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #FFFDF2, var(--color-warning-soft));
}
.performance-art::before,
.performance-art::after { content: ""; position: absolute; width: 5px; height: 5px; background: #FCD535; transform: rotate(45deg); }
.performance-art::before { top: 25px; left: 23px; }
.performance-art::after { right: 23px; bottom: 24px; }
.performance-star-box {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #F0B90B;
  background: #fff;
  box-shadow: 0 9px 24px rgba(252, 213, 53, .18);
  transform: rotate(-4deg);
}
.performance-star-box svg { width: 27px; height: 27px; transform: rotate(4deg); }

.brands-panel { min-height: 145px; padding: 13px 14px 10px; overflow: hidden; }
.brands-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.brands-panel-title { display: flex; align-items: center; gap: 6px; }
.brands-panel-title svg { width: 18px; height: 18px; color: #F0B90B; }
.brands-panel-title h3 { margin: 0; font-size: .74rem; font-weight: 950; }
.brand-scroll-controls { display: flex; gap: 7px; direction: ltr; }
.brand-scroll-button {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #EAECEF;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(27, 38, 50, .035);
}
.brand-scroll-button:hover { color: #181A20; border-color: #D5D9DF; box-shadow: 0 5px 13px rgba(31, 42, 55, .08); }
.brand-scroll-button:active { transform: scale(.93); }
.brand-scroll-button svg { width: 14px; height: 14px; }
.brands-scroller {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
}
.brands-scroller::-webkit-scrollbar { display: none; }
.brand-logo-card {
  width: 103px;
  min-width: 103px;
  height: 47px;
  display: grid;
  place-items: center;
  border: 1px solid #EAECEF;
  border-radius: 9px;
  background: #fff;
  scroll-snap-align: start;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.brand-logo-card:hover { transform: translateY(-2px); border-color: #D5D9DF; box-shadow: 0 7px 16px rgba(31, 42, 55, .065); }
.brand-logo-card img { width: 88px; height: 37px; object-fit: contain; }
.brands-more-button { display: block; margin: 7px 0 0 auto; padding: 0; border: 0; color: #707A8A; background: transparent; font-size: .57rem; font-weight: 850; }
.brands-more-button:hover { color: #1f63bd; }
.brands-more-button:active { transform: translateX(-2px); }

.profile-not-found { min-height: 500px; padding: 40px; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; }
.profile-not-found svg { width: 64px; height: 64px; color: var(--pd-yellow); }
.profile-not-found h1 { margin: 0; }
.profile-not-found p { margin: 0; color: var(--pd-muted); }

/* Dialog */
.profile-dialog-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(17, 22, 29, .48); backdrop-filter: blur(4px); }
.profile-dialog {
  width: min(calc(100% - 32px), 460px);
  max-height: calc(100dvh - 36px);
  padding: 26px;
  position: fixed;
  z-index: 1001;
  top: 50%;
  left: 50%;
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border: 1px solid #EAECEF;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 35px 100px rgba(20, 28, 38, .24);
}
.profile-dialog-close { width: 36px; height: 36px; position: absolute; top: 14px; left: 14px; display: grid; place-items: center; border: 0; border-radius: 10px; color: #929AA8; background: #FAFAFA; }
.profile-dialog-close:hover { color: #181A20; background: #F5F6F7; }
.profile-dialog-close svg { width: 18px; height: 18px; }
.profile-dialog-icon { width: 49px; height: 49px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 14px; color: #181A20; background: var(--pd-yellow); }
.profile-dialog-icon svg { width: 24px; height: 24px; }
.profile-dialog h2 { margin: 0 0 5px; font-size: 1.35rem; }
.profile-dialog > p { margin: 0 0 17px; color: #929AA8; font-size: .8rem; }
.profile-quick-form { display: grid; gap: 12px; }
.profile-quick-form label { display: grid; gap: 6px; color: #707A8A; font-size: .72rem; font-weight: 800; }
.profile-quick-form input,
.profile-quick-form textarea { width: 100%; border: 1px solid #EAECEF; border-radius: 11px; background: #FAFAFA; color: #181A20; outline: 0; }
.profile-quick-form input { height: 44px; padding: 0 12px; }
.profile-quick-form textarea { padding: 10px 12px; resize: vertical; }
.profile-quick-form input:focus,
.profile-quick-form textarea:focus { border-color: #F0B90B; box-shadow: 0 0 0 3px rgba(252, 213, 53, .13); background: #fff; }
.profile-quick-form[hidden] { display: none; }
.profile-quick-form input[readonly] { color: var(--pd-muted); background: var(--pd-grid); cursor: default; }
.profile-quick-form input[aria-invalid="true"],
.profile-quick-form textarea[aria-invalid="true"] { border-color: #F6465D; box-shadow: 0 0 0 3px rgba(246, 70, 93, .12); }
.profile-optional-label { color: #707A8A; font-size: .63rem; font-weight: 500; }
.profile-rating-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.profile-rating-fieldset legend { margin-bottom: 7px; color: #707A8A; font-size: .72rem; font-weight: 800; }
.profile-star-rating { min-height: 46px; display: inline-flex; flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: 5px; direction: ltr; }
.profile-star-rating input { width: 1px; height: 1px; position: absolute; opacity: 0; pointer-events: none; }
.profile-star-rating label { width: 41px; height: 41px; display: grid; place-items: center; border: 1px solid #EAECEF; border-radius: 11px; color: #b7bfcc; background: #FAFAFA; font-size: 1.42rem; line-height: 1; cursor: pointer; transition: transform 150ms ease, color 150ms ease, border-color 150ms ease, background 150ms ease; }
.profile-star-rating label:hover { transform: translateY(-2px); color: var(--pd-yellow); border-color: #F0B90B; }
.profile-star-rating input:focus-visible + label { outline: 3px solid rgba(240, 185, 11, .2); outline-offset: 2px; }
.profile-star-rating input:checked ~ label { color: var(--pd-yellow); border-color: #F0B90B; background: var(--color-warning-soft); }
.profile-dialog-actions { display: grid; grid-template-columns: minmax(110px, .42fr) minmax(170px, 1fr); gap: 9px; }
.profile-dialog-actions .button { width: 100%; min-height: 46px; }
.profile-form-error { min-height: 20px; margin: -4px 0 0; color: #F6465D; font-size: .7rem; }
.profile-dashboard-body.is-dialog-open { overflow: hidden; }

.profile-dashboard-body .toast-region { z-index: 1200; }
.profile-dashboard-body .toast { border-color: #EAECEF; background: #fff; color: #181A20; }

@media (max-width: 1060px) {
  .profile-dashboard-shell { width: min(calc(100% - 32px), 970px); }
  .influencer-dashboard { grid-template-columns: 282px minmax(0, 1fr); gap: 24px; }
  .influencer-profile-panel { min-height: 520px; padding-inline: 14px; }
  .profile-avatar-frame { width: 164px; height: 164px; }
  .analytics-chart-card { padding-inline: 11px; }
  .performance-item { padding-inline: 8px; }
  .brand-logo-card { width: 92px; min-width: 92px; }
}

@media (max-width: 860px) {
  .profile-dashboard-main { padding-top: 18px; }
  .profile-dashboard-shell { width: min(calc(100% - 28px), 760px); }
  .influencer-dashboard { grid-template-columns: 1fr; gap: 18px; }
  .influencer-profile-panel,
  .influencer-analytics { grid-column: 1; }
  .influencer-profile-panel { grid-row: 1; position: static; min-height: 0; }
  .influencer-analytics { grid-row: 2; }
  .profile-avatar-frame { margin-top: 16px; }
  .profile-actions { max-width: 520px; margin-inline: auto; grid-template-columns: 1fr 1fr; }
  .profile-trust-note { margin-top: 16px; }
}

@media (max-width: 660px) {
  .profile-dashboard-shell { width: min(calc(100% - 20px), 580px); }
  .analytics-toolbar { align-items: flex-start; flex-direction: column; gap: 11px; }
  .range-picker { width: 100%; }
  .analytics-charts { grid-template-columns: 1fr; }
  .analytics-chart-card { height: 248px; }
  .performance-summary { grid-template-columns: 1fr; }
  .performance-art { min-height: 82px; grid-row: 1; }
  .performance-summary-content { grid-row: 2; }
  .brands-panel { min-height: 151px; }
}

@media (max-width: 450px) {
  .profile-dashboard-main { padding: 10px 0 18px; }
  .profile-dashboard-shell { width: calc(100% - 16px); }
  .pd-card { border-radius: 15px; }
  .influencer-dashboard { gap: 13px; }
  .influencer-profile-panel { padding: 14px 10px 12px; }
  .profile-dot-pattern { display: none; }
  .profile-menu-wrap { top: 10px; right: 10px; }
  .profile-avatar-frame { width: 146px; height: 146px; margin-top: 24px; }
  .profile-verified-badge { width: 31px; height: 31px; }
  .profile-identity h1 { font-size: 1.4rem; }
  .profile-actions { grid-template-columns: 1fr; }
  .profile-trust-note { white-space: normal; line-height: 1.8; }
  .analytics-title h2 { font-size: 1rem; }
  .analytics-chart-card { padding: 13px 8px 8px; }
  .chart-card-heading { gap: 7px; }
  .chart-card-icon { width: 34px; height: 34px; }
  .chart-card-copy strong { font-size: 1.15rem; }
  .performance-summary-content { padding-inline: 9px; }
  .performance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; }
  .performance-item { border-inline-start: 0; }
  .performance-item:nth-child(even) { border-inline-start: 1px solid #EAECEF; }
  .brands-panel-head { align-items: flex-start; }
  .brands-panel-title h3 { max-width: 190px; line-height: 1.7; }
  .profile-dialog { padding: 22px 16px; }
  .profile-star-rating { width: 100%; justify-content: space-between; gap: 3px; }
  .profile-star-rating label { width: 39px; height: 39px; }
  .profile-dialog-actions { grid-template-columns: 1fr; }
}

/* Feedback dialog and story-ring dark mode refinements */
html[data-theme="dark"] .profile-dialog {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
}
html[data-theme="dark"] .profile-dialog-close,
html[data-theme="dark"] .profile-quick-form input,
html[data-theme="dark"] .profile-quick-form textarea,
html[data-theme="dark"] .profile-star-rating label {
  border-color: var(--color-border);
  background: var(--color-surface-subtle);
  color: var(--color-text-primary);
}
html[data-theme="dark"] .profile-dialog > p,
html[data-theme="dark"] .profile-quick-form label,
html[data-theme="dark"] .profile-rating-fieldset legend { color: var(--color-text-secondary); }
html[data-theme="dark"] .profile-star-rating input:checked ~ label { color: var(--pd-yellow); border-color: color-mix(in srgb, var(--pd-yellow) 55%, var(--color-border)); background: var(--color-accent-soft); }
html[data-theme="dark"] .profile-avatar-frame::after { background: var(--pd-card); }

/* iBlogger brand bar and theme-aware logo */
.profile-dashboard-brandbar {
  width: min(calc(100% - 48px), 1160px);
  min-height: 68px;
  margin: 12px auto 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.profile-dashboard-logo .site-logo-image { height: 40px; max-width: 152px; }
.profile-theme-toggle { flex: 0 0 auto; }
.profile-theme-toggle .moon-icon { display: none; }
html[data-theme="dark"] .profile-theme-toggle .sun-icon { display: none; }
html[data-theme="dark"] .profile-theme-toggle .moon-icon { display: block; }
html[data-theme="dark"] .profile-dashboard-brandbar {
  border-color: var(--color-border);
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
}
@media (max-width: 1060px) {
  .profile-dashboard-brandbar { width: min(calc(100% - 32px), 970px); }
}
@media (max-width: 860px) {
  .profile-dashboard-brandbar { width: min(calc(100% - 28px), 760px); }
}
@media (max-width: 660px) {
  .profile-dashboard-brandbar { width: min(calc(100% - 20px), 580px); }
  .profile-dashboard-logo .site-logo-image { height: 36px; max-width: 136px; }
}
@media (max-width: 450px) {
  .profile-dashboard-brandbar { width: calc(100% - 16px); min-height: 58px; margin-top: 8px; padding: 8px 10px; border-radius: 15px; }
  .profile-dashboard-logo .site-logo-image { height: 34px; max-width: 128px; }
}


/* Verified feedback carousel inspired by the supplied reference. */
.profile-actions .profile-feedback-primary {
  min-height: 50px;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(240, 185, 11, .16);
}
.profile-actions .profile-feedback-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(240, 185, 11, .23);
}

.profile-feedbacks-panel {
  min-width: 0;
  max-width: 100%;
  position: relative;
  padding: 16px 18px 18px;
  overflow: visible;
}
.profile-feedbacks-head {
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.profile-feedbacks-title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.profile-feedbacks-shield {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #181A20;
  background: var(--pd-yellow);
  box-shadow: 0 6px 16px rgba(240, 185, 11, .16);
}
.profile-feedbacks-shield svg { width: 16px; height: 16px; }
.profile-feedbacks-head h3 { margin: 0; font-size: .93rem; line-height: 1.6; font-weight: 950; }
.profile-feedbacks-head p { margin: 2px 0 0; color: var(--pd-muted); font-size: .64rem; }
.profile-feedbacks-count {
  min-width: 84px;
  padding: 6px 10px;
  border: 1px solid var(--pd-border);
  border-radius: 999px;
  color: var(--pd-muted);
  background: color-mix(in srgb, var(--pd-card) 88%, var(--pd-grid));
  font-size: .63rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}
.profile-feedback-carousel { min-width: 0; max-width: 100%; position: relative; padding-inline: 20px; }
.profile-feedbacks-scroller {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  direction: ltr;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  outline: 0;
}
.profile-feedbacks-scroller::-webkit-scrollbar { display: none; }
.profile-feedbacks-scroller:focus-visible {
  border-radius: 14px;
  box-shadow: 0 0 0 3px rgba(240, 185, 11, .18);
}
.profile-feedbacks-grid {
  width: 100%;
  min-width: 100%;
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.profile-feedback-card {
  min-width: 0;
  min-height: 188px;
  padding: 13px 13px 11px;
  flex: 0 0 calc((100% - 24px) / 3);
  display: flex;
  flex-direction: column;
  direction: rtl;
  text-align: right;
  scroll-snap-align: start;
  border: 1px solid var(--pd-border);
  border-radius: 13px;
  background: var(--pd-card);
  box-shadow: 0 5px 17px rgba(24, 26, 32, .04);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.profile-feedback-card::before {
  content: "";
  height: 3px;
  margin: -13px -13px 10px;
  border-radius: 13px 13px 0 0;
  background: linear-gradient(90deg, var(--pd-yellow), #F0B90B, #707A8A);
  opacity: .72;
}
.profile-feedback-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--pd-yellow) 43%, var(--pd-border));
  box-shadow: 0 11px 24px rgba(24, 26, 32, .075);
}
.profile-feedback-card.is-local { border-color: color-mix(in srgb, var(--pd-green) 46%, var(--pd-border)); }
.profile-feedback-card.is-local::before { background: linear-gradient(90deg, var(--pd-green), var(--pd-yellow)); }
.profile-feedback-card-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.profile-reviewer-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
}
.profile-reviewer-link:hover strong { color: #F0B90B; }
.profile-reviewer-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--pd-card) 88%, transparent);
  border-radius: 10px;
  color: #181A20;
  font-size: .88rem;
  font-weight: 950;
  box-shadow: 0 4px 11px rgba(24, 26, 32, .11);
}
.profile-reviewer-avatar.is-violet { background: linear-gradient(135deg, #FCD535, #F0B90B); }
.profile-reviewer-avatar.is-blue { color: #fff; background: linear-gradient(135deg, #707A8A, #181A20); }
.profile-reviewer-avatar.is-pink { color: #fff; background: linear-gradient(135deg, #F6465D, #B92D40); }
.profile-reviewer-avatar.is-gold { background: linear-gradient(135deg, #F0B90B, #FCD535); }
.profile-reviewer-avatar.is-green { color: #fff; background: linear-gradient(135deg, #0ECB81, #078B58); }
.profile-reviewer-avatar.is-orange { background: linear-gradient(135deg, #F0B90B, #FCD535); }
.profile-reviewer-copy { min-width: 0; display: grid; gap: 1px; }
.profile-reviewer-copy strong {
  overflow: hidden;
  color: var(--pd-text);
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 150ms ease;
}
.profile-reviewer-copy small {
  overflow: hidden;
  color: var(--pd-muted);
  font-size: .54rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.profile-reviewer-verified {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #181A20;
  background: var(--pd-yellow);
  box-shadow: 0 0 0 2px var(--pd-card);
}
.profile-reviewer-verified svg { width: 11px; height: 11px; }
.profile-feedback-stars {
  flex: 0 0 auto;
  display: flex;
  gap: 1px;
  direction: ltr;
  justify-content: flex-end;
  white-space: nowrap;
}
.profile-feedback-stars span { color: color-mix(in srgb, var(--pd-muted) 28%, transparent); font-size: .72rem; }
.profile-feedback-stars span.is-filled { color: var(--pd-yellow); }
.profile-feedback-category {
  align-self: flex-start;
  margin-top: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--pd-muted);
  background: var(--pd-grid);
  font-size: .52rem;
  font-weight: 800;
}
.profile-feedback-card h4 { margin: 7px 0 3px; color: var(--pd-text); font-size: .71rem; line-height: 1.65; }
.profile-feedback-card > p {
  margin: 0;
  min-height: 58px;
  color: var(--pd-muted);
  font-size: .61rem;
  line-height: 1.85;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.profile-feedback-card footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid color-mix(in srgb, var(--pd-border) 80%, transparent);
}
.profile-feedback-card time { color: var(--pd-muted); font-size: .52rem; }
.profile-feedback-card footer a { color: #F0B90B; font-size: .55rem; font-weight: 900; }
.profile-feedback-card footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.feedback-scroll-button {
  width: 31px;
  height: 31px;
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--pd-border);
  border-radius: 50%;
  color: var(--pd-muted);
  background: var(--pd-card);
  box-shadow: 0 5px 15px rgba(24, 26, 32, .10);
  transform: translateY(-50%);
  transition: color 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.feedback-scroll-button.is-prev { right: -1px; }
.feedback-scroll-button.is-next { left: -1px; }
.feedback-scroll-button:hover {
  color: #181A20;
  border-color: var(--pd-yellow);
  box-shadow: 0 8px 20px rgba(24, 26, 32, .14);
  transform: translateY(-50%) scale(1.04);
}
.feedback-scroll-button:active { transform: translateY(-50%) scale(.94); }
.feedback-scroll-button svg { width: 14px; height: 14px; }

html[data-theme="dark"] .profile-feedback-card,
html[data-theme="dark"] .feedback-scroll-button,
html[data-theme="dark"] .profile-feedbacks-count { background: var(--pd-card); }
html[data-theme="dark"] .profile-feedback-card { box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
html[data-theme="dark"] .profile-feedback-category { background: color-mix(in srgb, var(--pd-grid) 80%, var(--pd-card)); }
html[data-theme="dark"] .profile-reviewer-verified { box-shadow: 0 0 0 2px var(--pd-card); }

@media (max-width: 1060px) {
  .profile-feedback-card { flex-basis: calc((100% - 12px) / 2); }
}
@media (max-width: 860px) {
  .profile-feedback-card { flex-basis: calc((100% - 24px) / 3); }
}
@media (max-width: 660px) {
  .profile-feedbacks-panel { padding: 15px 14px 16px; }
  .profile-feedback-carousel { padding-inline: 16px; }
  .profile-feedback-card { flex-basis: calc((100% - 12px) / 2); }
  .profile-feedback-card > p { min-height: 0; }
}
@media (max-width: 450px) {
  .profile-feedbacks-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .profile-feedbacks-count { align-self: flex-start; }
  .profile-feedback-carousel { padding-inline: 13px; }
  .profile-feedback-card { min-height: 184px; padding: 12px; flex-basis: 100%; }
  .profile-feedback-card::before { margin: -12px -12px 9px; }
  .profile-feedback-card-head { align-items: flex-start; }
  .profile-reviewer-avatar { width: 36px; height: 36px; }
  .feedback-scroll-button { width: 29px; height: 29px; }
  .feedback-scroll-button.is-prev { right: -4px; }
  .feedback-scroll-button.is-next { left: -4px; }
}

/* Dark-mode contrast corrections for the standalone profile dashboard. */
html[data-theme="dark"] .analytics-title h2,
html[data-theme="dark"] .profile-rating-meta strong,
html[data-theme="dark"] .performance-item strong,
html[data-theme="dark"] .profile-dialog h2,
html[data-theme="dark"] .profile-menu button,
html[data-theme="dark"] .profile-menu a { color: var(--pd-text); }
html[data-theme="dark"] .range-picker,
html[data-theme="dark"] .profile-menu,
html[data-theme="dark"] .brand-scroll-button {
  border-color: var(--pd-border);
  background: var(--pd-card);
}
html[data-theme="dark"] .profile-category,
html[data-theme="dark"] .profile-icon-button:hover,
html[data-theme="dark"] .profile-icon-button[aria-expanded="true"],
html[data-theme="dark"] .chart-menu-button:hover,
html[data-theme="dark"] .profile-actions .button-secondary:hover,
html[data-theme="dark"] .profile-menu button:hover,
html[data-theme="dark"] .profile-menu a:hover {
  color: var(--pd-text);
  background: var(--pd-grid);
}
html[data-theme="dark"] .profile-actions .button-secondary { color: var(--pd-muted); border-color: var(--pd-border); }
html[data-theme="dark"] .profile-trust-note { border-color: var(--pd-border); }
html[data-theme="dark"] .profile-dashboard-body .toast { border-color: var(--pd-border); background: var(--pd-card); color: var(--pd-text); }


/* Verified real-data profile panels */
.real-profile-data { min-width: 0; display: grid; gap: 14px; }
.real-data-panel { padding: 22px; }
.real-data-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.real-data-head h2 { margin: 4px 0 0; color: var(--pd-text); font-size: 1.05rem; }
.real-data-head p { margin: 6px 0 0; color: var(--pd-muted); font-size: .69rem; line-height: 1.8; }
.real-data-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.real-data-grid > div {
  min-width: 0;
  padding: 15px 12px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--pd-border);
  border-radius: 13px;
  background: var(--pd-grid);
}
.real-data-grid span { color: var(--pd-muted); font-size: .61rem; }
.real-data-grid strong { color: var(--pd-text); font-size: .94rem; overflow-wrap: anywhere; }
.real-data-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.real-data-meta > span {
  padding: 7px 9px;
  border: 1px solid var(--pd-border);
  border-radius: 999px;
  color: var(--pd-muted);
  background: var(--pd-card);
  font-size: .58rem;
}
.real-data-meta strong { color: var(--pd-text); }
.real-bio-panel { padding: 20px 22px; }
.real-bio-panel h3 { margin: 0 0 8px; color: var(--pd-text); font-size: .9rem; }
.real-bio-panel p { margin: 0; color: var(--pd-muted); font-size: .7rem; line-height: 2; white-space: pre-wrap; }
.profile-username { margin: 4px 0 0; color: var(--pd-muted); font-size: .68rem; }
.profile-rating-empty { justify-content: center; }
.profile-feedback-empty {
  min-width: 100%;
  min-height: 150px;
  padding: 22px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1px dashed var(--pd-border);
  border-radius: 15px;
  color: var(--pd-muted);
  background: var(--pd-grid);
}
.profile-feedback-empty strong { color: var(--pd-text); font-size: .78rem; }
.profile-feedback-empty p { margin: 5px 0 0; font-size: .62rem; line-height: 1.8; }
@media (max-width: 900px) {
  .real-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .real-data-panel { padding: 17px 14px; }
  .real-data-head { flex-direction: column; }
  .real-data-head .button { width: 100%; }
  .real-data-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .real-data-grid > div { padding: 12px 10px; }
  .real-bio-panel { padding: 17px 14px; }
}


/* Real historical analytics: no seeded/demo values. */
.analytics-history-note {
  display: none;
  margin: -7px 3px 0;
  padding: 9px 12px;
  border: 1px solid rgba(240, 185, 11, .24);
  border-radius: 10px;
  color: #707A8A;
  background: rgba(252, 213, 53, .08);
  font-size: .62rem;
  line-height: 1.8;
}
.analytics-history-note.is-visible { display: block; }
.chart-empty-state {
  height: 100%;
  min-height: 138px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 15px;
  text-align: center;
  color: #707A8A;
}
.chart-empty-state span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #F0B90B;
  background: rgba(252, 213, 53, .10);
}
.chart-empty-state span svg { width: 20px; height: 20px; }
.chart-empty-state p { margin: 0; max-width: 260px; font-size: .61rem; line-height: 1.8; }
.chart-growth-pill.is-neutral,
.performance-item em.is-neutral {
  color: #707A8A;
  background: #F5F6F7;
}
.chart-growth-pill.is-negative,
.performance-item em.is-negative {
  color: #F6465D;
  background: rgba(246, 70, 93, .10);
}
html[data-theme="dark"] .analytics-history-note {
  border-color: rgba(252, 213, 53, .18);
  color: var(--pd-muted);
  background: rgba(252, 213, 53, .06);
}
html[data-theme="dark"] .chart-empty-state { color: var(--pd-muted); }
html[data-theme="dark"] .chart-growth-pill.is-neutral,
html[data-theme="dark"] .performance-item em.is-neutral {
  color: var(--pd-muted);
  background: var(--pd-grid);
}
