/* Dashboard data surfaces for the unified Ghost UI (black-ghost) — zero backdrop-filter. */
#appearance-background {
  contain: strict;
  pointer-events: none;
}

.appearance-wallpaper.is-baked {
  filter: none !important;
}

body:has(.layout) #appearance-background::after {
  background: color-mix(in srgb, var(--bg) 15%, transparent);
}

body:has(.layout)[data-theme="black-ghost"] #appearance-background::after {
  background: radial-gradient(circle at 24% 20%, rgba(2, 6, 16, 0.28) 0%, rgba(2, 6, 16, 0.20) 55%, rgba(2, 5, 14, 0.28) 100%);
}

body:has(.layout)[data-theme="black-ghost"] .main :is(.page-heading, .subnote, .selected-time-range) {
  text-shadow: 0 2px 10px rgba(0, 4, 12, 0.92), 0 1px 3px #000;
}

body:has(.layout)[data-theme="black-ghost"] .main .page-heading p {
  color: #c4daf4;
}

/* Eliminate continuous GPU Gaussian backdrop resampling on fixed/sticky chrome over animated scenes. */
body:has(.layout) :is(.sidebar, .topbar, .site-dropdown-panel),
body[data-theme-motion="running"] :is(.sidebar, .topbar, .site-dropdown-panel, .mobile-backdrop) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body:has(.layout)[data-theme="black-ghost"] :is(.sidebar, .topbar) {
  background: linear-gradient(180deg, #050c1cf0 0%, #030712f5 100%);
  border-color: #243e66;
  box-shadow: inset 0 1px 0 rgba(186, 238, 255, 0.16), 0 8px 28px rgba(0, 4, 15, 0.65);
}

body:has(.layout)[data-theme="black-ghost"] .site-dropdown-panel {
  background: #060f21;
  border-color: #345b91;
  box-shadow: 0 18px 44px rgba(0, 4, 15, 0.88), inset 0 1px 0 rgba(186, 238, 255, 0.24);
}

body:has(.layout) .main :is(.metric, .card, .site-card, .integration-guide) {
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body:has(.layout)[data-theme="black-ghost"] .main :is(.metric, .card, .site-card, .integration-guide) {
  background: linear-gradient(155deg, rgba(9, 20, 42, 0.76) 0%, rgba(4, 10, 23, 0.84) 100%);
  border-color: rgba(52, 92, 148, 0.56);
  border-top-color: rgba(124, 214, 255, 0.46);
  box-shadow: 0 18px 42px rgba(0, 4, 15, 0.74), 0 4px 14px rgba(0, 12, 36, 0.52), 0 0 24px rgba(46, 211, 255, 0.06), inset 0 1px 0 rgba(186, 238, 255, 0.28);
}

body:has(.layout)[data-theme="black-ghost"] .main button.metric:hover {
  border-color: #5ce1ff;
  background: linear-gradient(155deg, rgba(13, 30, 60, 0.84) 0%, rgba(6, 15, 34, 0.88) 100%);
  box-shadow: 0 20px 46px rgba(0, 4, 15, 0.84), 0 0 26px rgba(46, 211, 255, 0.18), inset 0 1px 0 rgba(214, 247, 255, 0.40);
}

/* Child sections must not compound the parent tint or blur the artwork again. */
body:has(.layout) .main .card :is(
  .card,
  .card-header,
  .chart-wrap,
  .breakdown,
  .breakdown-row,
  .table-scroll,
  .table-bottom,
  .login-history-filters,
  .visit-selection-bar,
  .history-selection-bar,
  .visit-filter-note,
  .empty-state
),
body:has(.layout) .main .site-card :is(.site-stats, .site-card-actions) {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Header and interaction highlights stay subtle, without masking whole tables. */
body:has(.layout) .main .table-scroll th {
  background: color-mix(in srgb, var(--bg) 12%, transparent);
}

body:has(.layout)[data-theme="black-ghost"] .main .table-scroll th {
  background: color-mix(in srgb, #08152b 84%, transparent);
  color: #b8d3f2;
}

body:has(.layout) .main .table-scroll tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

body:has(.layout) .main .table-scroll tr:has(
  [data-visit-select]:checked,
  [data-history-select]:checked
) {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

/* Suppress native WebKit search cancel cross and enforce equal-height 31px / 42px inline jump pagination. */
.search-form input::-webkit-search-cancel-button,
.search-form input::-webkit-search-decoration,
.search-form input::-webkit-search-results-button,
.search-form input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.pagination select,
.pagination .icon-button,
.pagination .button.small,
.pagination .page-number.page-number-jump {
  height: 31px;
  min-height: 31px;
  box-sizing: border-box;
}
.pagination .icon-button {
  width: 31px;
  min-width: 31px;
  padding: 0;
}
.pagination .page-number.page-number-jump {
  padding: 0 9px;
  font-size: 11px;
  line-height: 1;
}
.pagination .page-number-input {
  height: 29px;
  font-size: 11px;
}
.pagination .page-number-input:focus-visible {
  outline: none;
}

@media (max-width: 700px) {
  .pagination select,
  .pagination .icon-button,
  .pagination .button.small,
  .pagination .page-number.page-number-jump {
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
  }
  .pagination .icon-button {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }
  .pagination .page-number.page-number-jump {
    padding: 0 11px;
    font-size: 13px;
    line-height: 1;
  }
  .pagination .page-number-input {
    height: 40px;
    font-size: 16px;
  }
}

body[data-theme="black-ghost"] .pagination :is(select, .icon-button, .button.small) {
  border-color: #273e5e;
  background: linear-gradient(180deg, #0f1a2d 0%, #09101d 100%);
  color: #f2f8ff;
  box-shadow: inset 0 1px 0 #eef9ff26, 0 4px 12px -4px #00040bd9;
}
body[data-theme="black-ghost"] .pagination :is(.icon-button, .button.small):hover:not(:disabled) {
  border-color: #38d6ff;
  background: linear-gradient(180deg, #162844 0%, #0d182b 100%);
  color: #f6fbff;
  box-shadow: inset 0 1px 0 #ffffff47, 0 0 14px -2px #00d8ff45;
}
body[data-theme="black-ghost"] .pagination .page-number.page-number-jump {
  border-color: #273e5e;
  background: linear-gradient(180deg, #0f1a2d 0%, #09101d 100%);
  color: #f2f8ff;
  box-shadow: inset 0 1px 0 #eef9ff24, 0 4px 12px -4px #00040bd9;
}
body[data-theme="black-ghost"] .pagination .page-number.page-number-jump:hover:not(:has(input:disabled)) {
  border-color: #38d6ffb3;
}
body[data-theme="black-ghost"] .pagination .page-number.page-number-jump:focus-within {
  border-color: #38d6ff;
  box-shadow: 0 0 0 2px #38d6ff2e, 0 0 14px -2px #00d8ff40, inset 0 1px 0 #ffffff38;
}
body[data-theme="black-ghost"] .pagination .page-number-sep {
  color: #96abc7;
}
