/* Local shoulder-surfing protection. Authorization remains server-side. */
.privacy-button {
  display: grid !important;
  place-items: center;
  position: relative;
}
.privacy-button[hidden] { display: none !important; }
.privacy-button .ui-icon,.privacy-button > svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.privacy-button.active {
  border-color: #8fb4fb;
  background: #eaf2ff;
  color: #075ee6;
  box-shadow: inset 0 0 0 1px rgba(7,94,230,.08);
}
.privacy-button.active::after {
  content: '';
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #075ee6;
  box-shadow: 0 0 0 2px var(--card,#fff);
}
.sensitive-metric,.sensitive-block { min-width: 0; }
.sensitive-inline {
  display: inline-flex;
  align-items: center;
  justify-content: inherit;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}
.sensitive-inline-value { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sensitive-inline > .sensitive-reveal {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 7px;
}
.sensitive-inline > .sensitive-reveal .ui-icon { width: 13px; height: 13px; }
.sensitive-inline.is-masked .privacy-mask { letter-spacing: .03em; }
.result-count > .sensitive-inline { display: inline-flex; }
.sensitive-metric .metric-top { align-items: center; min-width: 0; }
.sensitive-metric .metric-label { min-width: 0; overflow-wrap: anywhere; }
.sensitive-reveal {
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  margin-left: auto;
  padding: 0;
  border: 1px solid #c9d9ee;
  border-radius: 8px;
  background: #f7faff;
  color: #2d609f;
  cursor: pointer;
}
.sensitive-reveal:hover,.sensitive-reveal:focus-visible { border-color: #75a6f8; background: #eaf2ff; color: #075ee6; outline: 0; }
.sensitive-reveal .ui-icon { width: 15px; height: 15px; }
.privacy-mask {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: currentColor;
  font-variant-ligatures: none;
  letter-spacing: .08em;
  white-space: nowrap;
}
.sensitive-block {
  position: relative;
  width: 100%;
}
.sensitive-block > .sensitive-reveal {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}
.sensitive-block.is-masked {
  display: grid;
  place-items: center;
  min-height: 116px;
  padding: 22px 48px 22px 22px;
  border: 1px dashed #b9cbe3;
  border-radius: 12px;
  background: linear-gradient(135deg,rgba(237,244,254,.76),rgba(247,250,255,.92));
}
.sensitive-block.is-masked > .privacy-mask { font-size: 25px; font-weight: 800; color: #5e7594; }
.dashboard-operations-grid > .sensitive-block { height: 100%; }
.dashboard-operations-grid > .sensitive-block > .panel { height: 100%; }

html[data-theme="dark"] .privacy-button.active { border-color: #527fc2; background: #17355d !important; color: #9fc3ff; }
html[data-theme="dark"] .privacy-button.active::after { background: #78a9ff; box-shadow: 0 0 0 2px #111d2e; }
html[data-theme="dark"] .sensitive-reveal { border-color: #38516f; background: #17263a; color: #aac5ea; }
html[data-theme="dark"] .sensitive-reveal:hover,
html[data-theme="dark"] .sensitive-reveal:focus-visible { border-color: #5f8dcc; background: #1a3557; color: #c6dcff; }
html[data-theme="dark"] .sensitive-block.is-masked { border-color: #354d6b; background: linear-gradient(135deg,rgba(19,38,63,.9),rgba(17,29,46,.96)); }
html[data-theme="dark"] .sensitive-block.is-masked > .privacy-mask { color: #9fb4d0; }

@media(max-width:1199px) {
  .privacy-button { display: grid !important; }
}
@media(max-width:430px) {
  .sensitive-reveal { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
  .sensitive-inline > .sensitive-reveal { width: 24px; height: 24px; min-width: 24px; min-height: 24px; }
  .sensitive-block.is-masked { min-height: 96px; padding: 18px 42px 18px 16px; }
}
