:root {
  color-scheme: dark;
  --font-family: "P22 Underground", -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-family-rounded: "P22 Underground", -apple-system, BlinkMacSystemFont,
    "SF Pro Rounded", "SF Pro Text", "Segoe UI", system-ui, sans-serif;

  /* System background tiers (macOS dark appearance) */
  --bg: #000000;
  --bg-elevated: #1c1c1e;
  --panel: #1c1c1e;
  --surface-input: #242426;
  --surface-elevated: rgba(28, 28, 30, 0.94);
  --surface-table: #1c1c1e;
  --surface-grouped: #171717;

  /* Separators & labels */
  --border: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.24);
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.58);
  --muted-soft: rgba(255, 255, 255, 0.32);

  /* System accent colors (dark appearance) */
  --accent: #0a84ff;
  --accent-hover: #3a9cff;
  --accent-active: #086cd9;
  --accent-soft: rgba(10, 132, 255, 0.18);
  --accent-soft-hover: rgba(10, 132, 255, 0.1);
  --danger: #ff453a;
  --success: #32d74b;
  --warning: #ff9f0a;

  /* Elevation - soft, diffuse, low-opacity per HIG */
  --shadow-sm: 0 1px 1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.55);
  --shadow: var(--shadow-lg);

  /* Continuous-style corner radii matching macOS control scale */
  --radius-xs: 0.375rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-pill: 999px;

  --space-1: 0.375rem;
  --space-2: 0.625rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --focus-ring: 0 0 0 3.5px rgba(10, 132, 255, 0.5);
  --transition-fast: 150ms ease;
  --transition-base: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --material-blur: saturate(180%) blur(20px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@font-face {
  font-family: "P22 Underground";
  src:
    local("P22 Underground"),
    local("P22 Underground Regular"),
    local("P22Underground"),
    url("../fonts/P22Underground-Regular.woff2") format("woff2"),
    url("../fonts/P22Underground-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "P22 Underground";
  src:
    local("P22 Underground Bold"),
    local("P22Underground-Bold"),
    url("../fonts/P22Underground-Bold.woff2") format("woff2"),
    url("../fonts/P22Underground-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1000;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--transition-fast);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  font-family: var(--font-family);
  background:
    radial-gradient(ellipse 60% 40% at 50% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:has(.welcome:not(.hidden)) {
  overflow: hidden;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-5);
}

* {
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-soft);
  background-clip: content-box;
}

.welcome {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.app-title-bar {
  flex-shrink: 0;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: rgba(28, 28, 30, 0.72);
  backdrop-filter: var(--material-blur);
  -webkit-backdrop-filter: var(--material-blur);
}

.app-title-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  margin: 0;
}

.app-title-bar-start {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.app-logo {
  flex-shrink: 0;
  width: 2.25rem;
  height: auto;
  display: block;
  user-select: none;
}

.app-title-bar-label {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #fff;
}

.app-title-bar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  min-width: 0;
}

.title-bar-filestore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: var(--transition-base);
}

.title-bar-filestore-btn-label {
  line-height: 1;
}

.title-bar-filestore-btn .icon-file {
  display: block;
  flex: 0 0 auto;
}

.title-bar-filestore-btn:hover {
  color: var(--text);
  border-color: rgba(10, 132, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.title-bar-filestore-btn.active {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.3);
}

.title-bar-filestore-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.exit-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: var(--transition-base);
}

.exit-app-btn-label {
  line-height: 1;
}

.exit-app-btn:hover {
  color: var(--danger);
  border-color: rgba(255, 69, 58, 0.45);
  background: rgba(255, 69, 58, 0.12);
  transform: translateY(-1px);
}

.exit-app-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.exit-app-btn .icon-door-open {
  display: block;
}

.welcome-main {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  padding: 0;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.tabs {
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tab-list {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(28, 28, 30, 0.65);
  backdrop-filter: var(--material-blur);
  -webkit-backdrop-filter: var(--material-blur);
}

.tab-btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.05rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.tab-btn:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.tab-panel {
  display: none;
  padding: var(--space-4);
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#tab-panel-files {
  padding: 0;
}

#tab-panel-results {
  padding: 0;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
}

.subtabs {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.subtab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.subtab-btn {
  border: 0;
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.75rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.subtab-btn:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.subtab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.report-subtab-list .subtab-btn.subtab-btn--unavailable {
  color: var(--muted-soft);
  opacity: 0.65;
  cursor: not-allowed;
}

.report-subtab-list .subtab-btn.subtab-btn--unavailable.active {
  background: transparent;
  color: var(--muted-soft);
  box-shadow: none;
}

.subtab-panel {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.subtab-panel.active {
  display: flex;
}

.subtab-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--space-4);
  padding-bottom: var(--space-3);
}

.subtab-panel-footer {
  flex-shrink: 0;
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.24);
}

.subtab-panel-footer .files-save-row {
  margin-top: 0;
  padding-top: 0;
}

.subtab-panel-footer .files-tab-hint {
  margin-top: 0.65rem;
}

#tab-panel-analysis .analysis-list {
  max-height: none;
  flex: 1;
  min-height: 0;
}

#tab-panel-run {
  padding: 0;
  gap: 0;
  --win-command-btn-width: 5.1875rem;
}

#tab-panel-run > .run-server-panel {
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
}

#tab-panel-run .run-server-message {
  margin: 0;
  font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #60cdff;
}

#tab-panel-run > .error {
  flex-shrink: 0;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

#tab-panel-run > .error.hidden {
  display: none;
}

#tab-panel-run > .run-tab-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0 1rem 0.85rem;
}

#tab-panel-run > .run-tab-status.hidden {
  display: none;
}

#tab-panel-run .run-tab-status-main {
  min-width: 0;
}

#tab-panel-run .run-tab-status-message {
  margin: 0;
  font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#tab-panel-run .run-tab-status-message--success {
  color: var(--success);
}

#tab-panel-run .run-tab-status-message--failure {
  color: var(--danger);
}

.run-tab-output {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0.85rem 1rem;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.config-details {
  width: min(100%, 28rem);
  flex: 1;
}

#tab-panel-files .config-details {
  align-self: stretch;
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  margin-bottom: 0;
  overflow: visible;
}

.files-tab-grid {
  display: grid;
  grid-template-columns: auto 1fr minmax(4.5rem, 5cm);
  grid-template-rows: auto repeat(8, auto);
  gap: 0.2rem 0.65rem;
  align-items: center;
  position: relative;
  overflow: visible;
}

.files-tab-grid-heading-spacer {
  grid-column: 1;
  grid-row: 1;
}

.files-tab-grid-heading {
  grid-row: 1;
  align-self: end;
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 0 0.65rem 0.4rem;
  color: #d0d0d0;
  font-size: 0.75rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1;
}

.files-tab-grid-heading--names {
  grid-column: 2;
}

.files-tab-grid-heading--dates {
  grid-column: 3;
}

#subtab-panel-configuration,
#report-subtab-panel-interactive,
#report-subtab-panel-report,
#subtab-panel-intervals,
.interactive-subtab-panel {
  --files-win-border: #3d3d3d;
  --files-win-border-light: #ffffff;
  --files-win-input-bg: #1c1c1c;
  --files-win-input-text: #f3f3f3;
  --files-win-panel-bg: #191919;
  --files-win-focus: #60cdff;
  --win-border-light: #5a5a5a;
  --win-list-bg: #191919;
  --win-list-header: #252525;
  --win-hover: rgba(255, 255, 255, 0.06);
  --win-selection: #0078d4;
  --win-selection-text: #ffffff;
  --select-field-label-width: 12rem;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.files-tab-grid--labels {
  grid-template-columns: auto 1fr;
  grid-template-rows: repeat(7, auto);
}

.files-tab-grid--labels .labels-values-group {
  grid-column: 2;
  grid-row: 1 / 8;
}

#subtab-panel-configuration .files-tab-label {
  font-size: 0.8125rem;
  color: #c8c8c8;
  cursor: pointer;
}

#subtab-panel-configuration .files-names-group,
#subtab-panel-configuration .files-dates-group {
  border-color: var(--files-win-border);
  border-radius: 2px;
  background: var(--files-win-panel-bg);
}

#subtab-panel-configuration .files-tab-grid-heading,
#subtab-panel-configuration .files-group-title {
  color: #d0d0d0;
  font-size: 0.75rem;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.files-tab-label {
  grid-column: 1;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}

.files-names-group,
.files-dates-group {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 2 / 10;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  z-index: 0;
  overflow: visible;
}

.files-names-group {
  grid-column: 2;
}

.files-dates-group {
  grid-column: 3;
}

.files-group-title {
  position: absolute;
  top: 0;
  left: 0.65rem;
  z-index: 2;
  transform: translateY(-50%);
  padding: 0 0.35rem;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1;
}

.files-tab-name-input {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

.files-tab-row-2 { grid-row: 2; }
.files-tab-row-3 { grid-row: 3; }
.files-tab-row-4 { grid-row: 4; }
.files-tab-row-5 { grid-row: 5; }
.files-tab-row-6 { grid-row: 6; }
.files-tab-row-7 { grid-row: 7; }
.files-tab-row-8 { grid-row: 8; }
.files-tab-row-9 { grid-row: 9; }

.files-tab-date-eye-spacer {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}

.files-tab-date-input {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  min-width: 0;
}

#tab-panel-files .files-tab-date-input .field-input-suffix {
  flex: 1;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
}

.files-tab-date-eye {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  color: var(--muted);
}

#tab-panel-files .files-tab-date-eye-wrap {
  position: relative;
  flex: 0 0 auto;
  z-index: 1;
}

#tab-panel-files .files-tab-date-eye-wrap .field-hint {
  left: auto;
  right: 0;
  top: auto;
  bottom: calc(100% + 0.5rem);
  z-index: 1000;
}

#tab-panel-files .files-tab-grid-heading {
  z-index: 101;
}

#tab-panel-files .files-tab-date-input:has(.files-tab-date-eye-wrap:hover) {
  z-index: 100;
}

#tab-panel-files .files-dates-group:has(.files-tab-date-eye-wrap:hover) {
  z-index: 50;
}

#tab-panel-files .files-tab-date-eye-wrap:hover .field-hint {
  visibility: visible;
  opacity: 1;
}

.files-tab-date-eye-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.files-tab-date-eye-btn:hover:not(:disabled) {
  color: #f3f3f3;
  background: rgba(255, 255, 255, 0.08);
}

.files-tab-date-eye-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.files-tab-date-eye .icon-eye,
.files-tab-date-eye-btn .icon-eye {
  display: block;
}

#tab-panel-files .files-tab-name-input input,
#tab-panel-files .field-input-suffix {
  box-sizing: border-box;
  min-height: 28px;
  height: 28px;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.2;
}

#subtab-panel-configuration .files-tab-name-input input,
#subtab-panel-configuration .field-input-suffix {
  border: 1px solid #808080;
  border-radius: 2px;
  background: var(--files-win-input-bg);
  color: var(--files-win-input-text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
}

#subtab-panel-configuration .files-tab-name-input input:focus,
#subtab-panel-configuration .field-input-suffix:focus {
  outline: 1px solid var(--files-win-focus);
  outline-offset: -1px;
  border-color: #808080;
}

#subtab-panel-configuration .files-tab-name-input input:disabled,
#subtab-panel-configuration .field-input-suffix:disabled {
  color: #8a8a8a;
  background: #252525;
  border-color: #808080;
}

#subtab-panel-configuration .files-tab-name-input input.files-tab-field--found {
  color: #8ee88e;
  border-color: #808080;
}

#subtab-panel-configuration .files-tab-name-input input.files-tab-field--missing {
  color: #ffb4b4;
  border-color: #808080;
}

#subtab-panel-configuration .files-tab-date-eye-btn .icon-eye {
  width: 14px;
  height: 14px;
}

#tab-panel-files .files-tab-name-input input {
  width: 100%;
  min-width: 0;
}

#tab-panel-files .files-tab-name-input input.files-tab-field--found {
  color: var(--success);
}

#tab-panel-files .files-tab-name-input input.files-tab-field--missing {
  color: var(--danger);
}

#tab-panel-files input[type="text"],
#tab-panel-files .field-input-suffix,
#tab-panel-files select,
#tab-panel-files .field input,
#tab-panel-files .field select {
  border-color: #808080;
}

#tab-panel-files input[type="text"]:focus,
#tab-panel-files .field-input-suffix:focus,
#tab-panel-files select:focus,
#tab-panel-files .field input:focus,
#tab-panel-files .field select:focus,
#tab-panel-files input[type="text"]:disabled,
#tab-panel-files .field-input-suffix:disabled,
#tab-panel-files select:disabled,
#tab-panel-files .field input:disabled,
#tab-panel-files .field select:disabled,
#tab-panel-files .files-tab-name-input input.files-tab-field--found,
#tab-panel-files .files-tab-name-input input.files-tab-field--missing {
  border-color: #808080;
}

#tab-panel-files .field-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

/* Attribution tab controls match the Files (windows) look */
#subtab-panel-intervals {
  overflow: visible;
}

#subtab-panel-intervals .intervals-tab-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: min(100%, 36rem);
  padding: 1rem 0.75rem;
}

#subtab-panel-intervals .intervals-tab-body > .field.report-field {
  grid-template-columns: var(--select-field-label-width) minmax(0, 1fr);
  align-items: center;
  margin: 0;
  row-gap: 0;
  width: 100%;
  min-width: 0;
}

#subtab-panel-intervals .intervals-tab-body > .field.report-field > span {
  justify-self: start;
  text-align: left;
  font-size: 0.8125rem;
  color: #c8c8c8;
}

#subtab-panel-intervals .intervals-tab-body > .field.report-field > input[type="date"],
#subtab-panel-intervals .intervals-tab-body > .field.report-field > .report-interval-control,
#subtab-panel-intervals .intervals-tab-body > .field.report-field > .system-tenors-input-wrap {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}

#subtab-panel-intervals .system-tenors-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

#subtab-panel-intervals .system-tenors-field-hint {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  left: 0;
  width: max-content;
  max-width: min(100vw - 2rem, 18rem);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  white-space: normal;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#subtab-panel-intervals .system-tenors-input-wrap:focus-within,
#subtab-panel-intervals .system-tenors-input-wrap.system-tenors-input-wrap--invalid {
  z-index: 100;
}

#subtab-panel-intervals .system-tenors-input-wrap.system-tenors-input-wrap--invalid .system-tenors-field-hint {
  visibility: visible;
  opacity: 1;
}

#subtab-panel-intervals .system-tenors-input-wrap.system-tenors-input-wrap--invalid > input[type="text"] {
  outline: 1px solid #e57373;
  outline-offset: -1px;
  border-color: #c62828;
}

#subtab-panel-fi {
  overflow: hidden;
  width: 100%;
  max-width: none;
  align-self: stretch;
  box-sizing: border-box;
  padding-inline: 0.75rem;
}

#subtab-panel-fi > .subtab-panel-scroll {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#subtab-panel-fi .attribution-tab-layout {
  flex: 1;
  min-height: 0;
  align-items: stretch;
  align-self: stretch;
  width: 100%;
}

#subtab-panel-fi .attribution-tab-layout .fi-subtabs {
  align-self: stretch;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0.75rem 0 0 0.25rem;
  width: auto;
  max-width: none;
}

#subtab-panel-fi .attribution-tab-layout .fi-subtabs .fi-subtab-panel.active {
  width: min(100%, 36rem);
  margin: 0;
  padding-top: 0;
}

#subtab-panel-fi #fi-subtab-panel-carry .fi-decomposition-label,
#subtab-panel-fi #fi-subtab-panel-carry > .fi-other-field > span {
  padding-left: 0;
}

#subtab-panel-fi .attribution-splitter {
  align-self: stretch;
}

#subtab-panel-fi .attribution-tree-panel {
  flex: 1 1 auto;
  height: auto;
  align-self: stretch;
  min-height: 240px;
}

#subtab-panel-fi .field input,
#subtab-panel-fi .field select,
#subtab-panel-fi input[type="text"],
#subtab-panel-fi select,
#subtab-panel-fi .fi-other-dropdown-toggle {
  box-sizing: border-box;
  min-height: 28px;
  height: 28px;
  padding: 0.2rem 0.55rem;
  border: 1px solid #808080;
  border-radius: 2px;
  background: var(--files-win-input-bg);
  color: var(--files-win-input-text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.2;
}

#subtab-panel-fi .field input:focus,
#subtab-panel-fi .field select:focus,
#subtab-panel-fi input[type="text"]:focus,
#subtab-panel-fi select:focus,
#subtab-panel-fi .fi-other-dropdown-toggle:focus {
  outline: 1px solid var(--files-win-focus);
  outline-offset: -1px;
  border-color: #808080;
}

#subtab-panel-fi .field input:disabled,
#subtab-panel-fi .field select:disabled,
#subtab-panel-fi input[type="text"]:disabled,
#subtab-panel-fi select:disabled,
#subtab-panel-fi .fi-other-dropdown-toggle:disabled {
  color: #8a8a8a;
  background: #252525;
  border-color: #808080;
}

#subtab-panel-fi .field select,
#subtab-panel-fi select {
  background: var(--panel);
}

#subtab-panel-fi .field select option,
#subtab-panel-fi select option {
  background-color: var(--panel);
  color: var(--files-win-input-text);
}

/* General, Labels, and Interactive tab controls match the Files (windows) look */
#report-subtab-panel-interactive .field input,
#report-subtab-panel-interactive .field select,
#report-subtab-panel-interactive input[type="text"],
#report-subtab-panel-interactive select,
#report-subtab-panel-report .field input,
#report-subtab-panel-report .field select,
#report-subtab-panel-report input[type="text"],
#report-subtab-panel-report select,
#report-subtab-panel-report .fi-other-dropdown-toggle,
#subtab-panel-intervals .field input,
#subtab-panel-intervals input[type="text"],
#subtab-panel-intervals input[type="date"] {
  box-sizing: border-box;
  min-height: 28px;
  height: 28px;
  padding: 0.2rem 0.55rem;
  border: 1px solid #808080;
  border-radius: 2px;
  background: var(--files-win-input-bg);
  color: var(--files-win-input-text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.2;
}

#report-subtab-panel-interactive .field input:focus,
#report-subtab-panel-interactive .field select:focus,
#report-subtab-panel-interactive input[type="text"]:focus,
#report-subtab-panel-interactive select:focus,
#report-subtab-panel-report .field input:focus,
#report-subtab-panel-report .field select:focus,
#report-subtab-panel-report input[type="text"]:focus,
#report-subtab-panel-report select:focus,
#report-subtab-panel-report .fi-other-dropdown-toggle:focus,
#subtab-panel-intervals .field input:focus,
#subtab-panel-intervals input[type="text"]:focus,
#subtab-panel-intervals input[type="date"]:focus {
  outline: 1px solid var(--files-win-focus);
  outline-offset: -1px;
  border-color: #808080;
}

#report-subtab-panel-interactive .field input:disabled,
#report-subtab-panel-interactive .field select:disabled,
#report-subtab-panel-interactive input[type="text"]:disabled,
#report-subtab-panel-interactive select:disabled,
#report-subtab-panel-report .field input:disabled,
#report-subtab-panel-report .field select:disabled,
#report-subtab-panel-report input[type="text"]:disabled,
#report-subtab-panel-report select:disabled,
#report-subtab-panel-report .fi-other-dropdown-toggle:disabled,
#subtab-panel-intervals .field input:disabled,
#subtab-panel-intervals input[type="text"]:disabled,
#subtab-panel-intervals input[type="date"]:disabled {
  color: #8a8a8a;
  background: #252525;
  border-color: #808080;
}

#report-subtab-panel-interactive .field select,
#report-subtab-panel-interactive select,
#report-subtab-panel-report .field select,
#report-subtab-panel-report select {
  background: var(--panel);
}

#report-subtab-panel-interactive .field select option,
#report-subtab-panel-interactive select option,
#report-subtab-panel-report .field select option,
#report-subtab-panel-report select option {
  background-color: var(--panel);
  color: var(--files-win-input-text);
}

.interactive-subtab-panel {
  display: none;
  flex-direction: column;
  padding-top: 1rem;
}

.interactive-subtab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-end;
}

.interactive-report-1-host,
.interactive-subtab-panel {
  --select-field-label-width: 12rem;
  --select-field-control-width: min(100%, 24rem);
}

.interactive-report-1-host {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-end;
}

.interactive-report-1-host > .field.report-field,
.interactive-subtab-panel > .field.report-field {
  grid-template-columns: var(--select-field-label-width) var(--select-field-control-width);
  align-items: center;
  margin: 0;
  row-gap: 0;
  width: calc(var(--select-field-label-width) + var(--select-field-control-width));
  max-width: 100%;
  transform: translateX(0.75rem);
}

.interactive-report-1-host > .field.report-field > span,
.interactive-subtab-panel > .field.report-field > span {
  justify-self: start;
  text-align: left;
  font-size: 0.8125rem;
  color: #c8c8c8;
}

.interactive-report-1-host > .field.report-field > input,
.interactive-report-1-host > .field.report-field > select,
.interactive-report-1-host > .field.report-field > .interactive-sectors-control,
.interactive-subtab-panel > .field.report-field > input,
.interactive-subtab-panel > .field.report-field > select,
.interactive-subtab-panel > .field.report-field > .interactive-sectors-control {
  width: 100%;
  min-width: 0;
  justify-self: end;
}

.interactive-report-1-host .interactive-sectors-control,
.interactive-subtab-panel .interactive-sectors-control {
  position: relative;
  display: block;
  box-sizing: border-box;
}

.interactive-report-1-host .interactive-sectors-input-wrap,
.interactive-subtab-panel .interactive-sectors-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.interactive-report-1-host .interactive-sectors-control > .interactive-sectors-input-wrap > input[type="text"],
.interactive-subtab-panel .interactive-sectors-control > .interactive-sectors-input-wrap > input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding-right: calc(28px + 0.35rem);
  box-sizing: border-box;
}

.interactive-report-1-host .interactive-sectors-eye-wrap,
.interactive-subtab-panel .interactive-sectors-eye-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
}

.interactive-report-1-host .interactive-sectors-control:has(.interactive-sectors-eye-wrap--open),
.interactive-subtab-panel .interactive-sectors-control:has(.interactive-sectors-eye-wrap--open) {
  z-index: 100;
}

.interactive-report-1-host .interactive-sectors-tooltip,
.interactive-subtab-panel .interactive-sectors-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  right: 0;
  width: max-content;
  max-width: min(calc(100vw - 2rem), 24rem);
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  pointer-events: auto;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.interactive-report-1-host .interactive-sectors-tooltip[hidden],
.interactive-subtab-panel .interactive-sectors-tooltip[hidden] {
  display: none;
}

.interactive-report-1-host .interactive-sectors-eye-wrap--open .interactive-sectors-tooltip,
.interactive-subtab-panel .interactive-sectors-eye-wrap--open .interactive-sectors-tooltip {
  visibility: visible;
  opacity: 1;
}

.interactive-report-1-host .interactive-sectors-list,
.interactive-subtab-panel .interactive-sectors-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.interactive-report-1-host .interactive-sectors-list li,
.interactive-subtab-panel .interactive-sectors-list li {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
}

.interactive-report-1-host .interactive-sectors-list li:hover,
.interactive-subtab-panel .interactive-sectors-list li:hover {
  background: rgba(255, 255, 255, 0.08);
}

.interactive-report-1-host .interactive-sectors-list li:active,
.interactive-subtab-panel .interactive-sectors-list li:active {
  cursor: grabbing;
}

.interactive-report-1-host .interactive-sectors-field-hint,
.interactive-subtab-panel .interactive-sectors-field-hint {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  left: 0;
  width: max-content;
  max-width: min(100vw - 2rem, 18rem);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  white-space: normal;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.interactive-report-1-host .interactive-sectors-input-wrap:focus-within,
.interactive-report-1-host .interactive-sectors-input-wrap.interactive-sectors-input-wrap--invalid,
.interactive-subtab-panel .interactive-sectors-input-wrap:focus-within,
.interactive-subtab-panel .interactive-sectors-input-wrap.interactive-sectors-input-wrap--invalid {
  z-index: 100;
}

.interactive-report-1-host .interactive-sectors-input-wrap.interactive-sectors-input-wrap--invalid .interactive-sectors-field-hint,
.interactive-subtab-panel .interactive-sectors-input-wrap.interactive-sectors-input-wrap--invalid .interactive-sectors-field-hint {
  visibility: visible;
  opacity: 1;
}

.interactive-report-1-host .interactive-sectors-input-wrap.interactive-sectors-input-wrap--invalid > input[type="text"],
.interactive-subtab-panel .interactive-sectors-input-wrap.interactive-sectors-input-wrap--invalid > input[type="text"] {
  outline: 1px solid #e57373;
  outline-offset: -1px;
  border-color: #c62828;
}

.interactive-subtab-header {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
}

.interactive-subtab-header .interactive-subtab-list {
  flex: 1;
  min-width: 0;
  margin: 0;
  border-bottom: 0;
  background: transparent;
}

#report-subtab-panel-report,
#report-subtab-panel-interactive {
  --select-field-label-width: 12rem;
  width: 100%;
  max-width: none;
  align-self: stretch;
  box-sizing: border-box;
  padding-inline: 0.75rem;
}
#report-subtab-panel-interactive .interactive-report-content,
#report-subtab-panel-interactive .new-report-master-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-interactive .interactive-report-list-column {
  flex: 0 0 5cm;
  width: 5cm;
  min-width: 8rem;
  max-width: none;
  display: flex;
  flex-direction: column;
}

#report-subtab-panel-interactive .interactive-report-list-column > .file-manager-box {
  flex: 0 0 auto;
}

#report-subtab-panel-interactive .new-report-list-box {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--files-win-border);
  border-radius: 2px;
  background: var(--files-win-panel-bg);
}

#report-subtab-panel-interactive .interactive-master-detail-splitter {
  flex: 0 0 auto;
  align-self: stretch;
  min-height: 12rem;
}

#report-subtab-panel-interactive .new-report-list-pane {
  display: flex;
  flex-direction: column;
  min-height: 12rem;
  max-height: min(55vh, 24rem);
  min-width: 0;
}

#report-subtab-panel-interactive .new-report-list-header {
  flex: 0 0 auto;
  width: 100%;
  height: 28px;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  background: var(--win-list-header);
  color: #d0d0d0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #111;
}

#report-subtab-panel-interactive .new-report-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

#report-subtab-panel-interactive .new-report-detail-pane {
  flex: 1 1 auto;
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#report-subtab-panel-interactive .new-report-detail-fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

#report-subtab-panel-interactive .interactive-report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

#report-subtab-panel-interactive .interactive-report-toolbar-start {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#report-subtab-panel-interactive .new-report-sectors-field {
  align-items: start;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host {
  grid-column: 2;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-control {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-control > .interactive-sectors-input-wrap > input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding-right: calc(28px + 0.35rem);
  box-sizing: border-box;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-eye-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  z-index: 101;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-control:has(.interactive-sectors-eye-wrap--open) {
  z-index: 100;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  right: 0;
  width: max-content;
  max-width: min(calc(100vw - 2rem), 24rem);
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  pointer-events: auto;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-tooltip[hidden] {
  display: none;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-eye-wrap--open .interactive-sectors-tooltip {
  visibility: visible;
  opacity: 1;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-list li {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-list li:hover {
  background: rgba(255, 255, 255, 0.08);
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-list li:active {
  cursor: grabbing;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-field-hint {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  left: 0;
  width: max-content;
  max-width: min(100vw - 2rem, 18rem);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  white-space: normal;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-input-wrap:focus-within,
#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-input-wrap.interactive-sectors-input-wrap--invalid {
  z-index: 100;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-input-wrap.interactive-sectors-input-wrap--invalid .interactive-sectors-field-hint {
  visibility: visible;
  opacity: 1;
}

#report-subtab-panel-interactive .new-report-sectors-field .FTI_sectors-control-host .interactive-sectors-input-wrap.interactive-sectors-input-wrap--invalid > input[type="text"] {
  border-color: #8b3232;
}

#report-subtab-panel-interactive .new-report-columns-field {
  align-items: start;
}

#report-subtab-panel-interactive .new-report-columns-field .FTI_columns-control-host {
  grid-column: 2;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-control {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-control > .interactive-columns-input-wrap > input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding-right: calc(28px + 0.35rem);
  box-sizing: border-box;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-eye-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  z-index: 101;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-control:has(.interactive-columns-eye-wrap--open) {
  z-index: 100;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  right: 0;
  width: max-content;
  max-width: min(calc(100vw - 2rem), 36rem);
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  pointer-events: auto;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-tooltip[hidden] {
  display: none;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-eye-wrap--open .interactive-columns-tooltip {
  visibility: visible;
  opacity: 1;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-list li {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-list li:hover {
  background: rgba(255, 255, 255, 0.08);
}

#report-subtab-panel-interactive .new-report-columns-field .interactive-columns-list li:active {
  cursor: grabbing;
}

#report-subtab-panel-interactive .new-report-sort-order-field {
  align-items: start;
}

#report-subtab-panel-interactive .new-report-sort-order-field .FTI_sort_order-control-host {
  grid-column: 2;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-control {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-control > .interactive-sort-order-input-wrap > input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding-right: calc(28px + 0.35rem);
  box-sizing: border-box;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-eye-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  z-index: 101;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-control:has(.interactive-sort-order-eye-wrap--open) {
  z-index: 100;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  right: 0;
  width: max-content;
  max-width: min(calc(100vw - 2rem), 36rem);
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  pointer-events: auto;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-tooltip[hidden] {
  display: none;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-eye-wrap--open .interactive-sort-order-tooltip {
  visibility: visible;
  opacity: 1;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-list li {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-list li:hover {
  background: rgba(255, 255, 255, 0.08);
}

#report-subtab-panel-interactive .new-report-sort-order-field .interactive-sort-order-list li:active {
  cursor: grabbing;
}

#report-subtab-panel-interactive .interactive-sectors-list .picker-list-item--blank,
#report-subtab-panel-interactive .interactive-columns-list .picker-list-item--blank,
#report-subtab-panel-interactive .interactive-sort-order-list .picker-list-item--blank {
  cursor: pointer;
}

#report-subtab-panel-interactive .new-report-list-item {
  display: block;
  width: 100%;
  min-height: 22px;
  margin: 0;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: #f3f3f3;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
  line-height: 22px;
  text-align: left;
  cursor: pointer;
}

#report-subtab-panel-interactive .new-report-list-item:hover {
  background: var(--win-hover);
}

#report-subtab-panel-interactive .new-report-list-item.active {
  background: var(--win-selection);
  border-color: transparent;
  color: var(--win-selection-text);
}

.interactive-tab-layout {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.interactive-subtab-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.interactive-subtab-content > .interactive-subtab-panels {
  flex: 1;
  min-width: 0;
}

.interactive-subtabs > .field.report-field > span {
  justify-self: start;
  text-align: left;
  font-size: 0.8125rem;
  color: #c8c8c8;
}

.interactive-subtabs > .field.report-field > input[type="text"] {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}

#report-subtab-panel-report > .field.report-field,
#report-subtab-panel-report .reports-fieldset > .field.report-field {
  grid-template-columns: var(--select-field-label-width) minmax(0, 1fr);
  align-items: center;
  margin: 0;
  row-gap: 0;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-interactive .new-report-detail-fields > .field.report-field {
  grid-template-columns: var(--select-field-label-width) minmax(0, 1fr);
  align-items: center;
  margin: 0;
  row-gap: 0;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-report > .field.report-field > span,
#report-subtab-panel-report .reports-fieldset > .field.report-field > span,
#report-subtab-panel-interactive .new-report-detail-fields > .field.report-field > span {
  justify-self: start;
  text-align: left;
  font-size: 0.8125rem;
  color: #c8c8c8;
}

#report-subtab-panel-report > .field.report-field > .fi-other-dropdown,
#report-subtab-panel-report > .field.report-field > .report-interval-control,
#report-subtab-panel-report > .field.report-field > .report-dates-inline,
#report-subtab-panel-report > .field.report-field > .report-formats-inline,
#report-subtab-panel-report > .field.report-field > .report-smoothing-inline,
#report-subtab-panel-report > .field.report-field > .report-off-benchmark-inline,
#report-subtab-panel-report .reports-fieldset > .field.report-field > input[type="text"],
#report-subtab-panel-interactive .new-report-detail-fields > .field.report-field > input[type="text"],
#report-subtab-panel-interactive .new-report-detail-fields > .field.report-field > select,
#report-subtab-panel-interactive .new-report-detail-fields > .field.report-field > .FTI_sectors-control-host,
#report-subtab-panel-interactive .new-report-detail-fields > .field.report-field > .FTI_columns-control-host,
#report-subtab-panel-interactive .new-report-detail-fields > .field.report-field > .FTI_sort_order-control-host {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}

#report-subtab-panel-report .report-dates-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-report .report-dates-inline > #FT_STRING_START_DATE {
  flex: 1 1 9rem;
  min-width: 9rem;
  max-width: 14rem;
  width: auto;
  box-sizing: border-box;
}

#report-subtab-panel-report .report-dates-end-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.75rem;
}

#report-subtab-panel-report .report-dates-end-group > #FT_STRING_END_DATE {
  flex: 0 0 14rem;
  width: 14rem;
  min-width: 14rem;
  max-width: 14rem;
  box-sizing: border-box;
}

#report-subtab-panel-report .report-dates-end-label {
  margin: 0;
  font-size: 0.8125rem;
  color: #c8c8c8;
  white-space: nowrap;
}

#report-subtab-panel-report .report-formats-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-report .report-formats-inline > .report-formats-dropdown {
  flex: 1 1 12rem;
  min-width: 12rem;
}

#report-subtab-panel-report .report-formats-decimal-label {
  margin: 0;
  font-size: 0.8125rem;
  color: #c8c8c8;
  white-space: nowrap;
}

#report-subtab-panel-report .report-formats-inline > .report-decimal-places-control {
  flex: 0 0 5rem;
  width: 5rem;
  min-width: 5rem;
}

#report-subtab-panel-report .report-formats-inline > .report-basis-points-option {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.8125rem;
  color: #c8c8c8;
  white-space: nowrap;
}

#report-subtab-panel-report .report-smoothing-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-report .report-smoothing-inline > select {
  flex: 1 1 9rem;
  min-width: 9rem;
  max-width: 14rem;
}

#report-subtab-panel-report .report-batch-id-label {
  margin: 0;
  font-size: 0.8125rem;
  color: #c8c8c8;
  white-space: nowrap;
}

#report-subtab-panel-report .report-smoothing-inline > input[type="text"] {
  flex: 0 0 5rem;
  width: 5rem;
  min-width: 5rem;
}

#report-subtab-panel-report .report-off-benchmark-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-report .report-off-benchmark-inline > select {
  flex: 0 0 9rem;
  width: 9rem;
  min-width: 9rem;
  max-width: 14rem;
}

#report-subtab-panel-report .report-off-benchmark-inline > .off-benchmark-sector-control-host,
#report-subtab-panel-report .report-off-benchmark-inline > .report-off-benchmark-sector-group {
  flex: 1 1 12rem;
  min-width: 12rem;
}

#report-subtab-panel-report .report-off-benchmark-sector-group {
  display: flex;
  flex: 1 1 18rem;
  align-items: center;
  gap: 0.75rem;
  min-width: 18rem;
  width: 100%;
}

#report-subtab-panel-report .report-off-benchmark-sector-label {
  margin: 0;
  font-size: 0.8125rem;
  color: #c8c8c8;
  white-space: nowrap;
}

#report-subtab-panel-report .report-off-benchmark-sector-group > .off-benchmark-sector-control-host {
  flex: 1 1 12rem;
  min-width: 0;
  width: auto;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-control {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-control > .interactive-sectors-input-wrap > input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding-right: calc(28px + 0.35rem);
  box-sizing: border-box;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-eye-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  z-index: 101;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-control:has(.interactive-sectors-eye-wrap--open) {
  z-index: 100;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  right: 0;
  width: max-content;
  max-width: min(calc(100vw - 2rem), 24rem);
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  pointer-events: auto;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-tooltip[hidden] {
  display: none;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-eye-wrap--open .interactive-sectors-tooltip {
  visibility: visible;
  opacity: 1;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-list li {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-list li:hover {
  background: rgba(255, 255, 255, 0.08);
}

#report-subtab-panel-report .report-off-benchmark-inline .interactive-sectors-list li:active {
  cursor: grabbing;
}

#report-subtab-panel-interactive .new-report-rank-order-field > select {
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}

#report-subtab-panel-report .report-labels-dropdown-menu,
#report-subtab-panel-report .report-excel-tabnames-dropdown-menu {
  padding: 0.65rem 0.85rem;
  background: var(--files-win-panel-bg);
  border: 1px solid var(--files-win-border);
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-x: hidden;
  overflow-y: auto;
}

#report-subtab-panel-report .report-labels-dropdown-menu {
  min-width: min(100%, 28rem);
}

#report-subtab-panel-report .report-excel-tabnames-dropdown-menu {
  min-width: min(100%, 32rem);
}

#report-subtab-panel-report .report-labels-fieldset {
  display: grid;
  row-gap: 0.75rem;
  column-gap: 0;
}

#report-subtab-panel-report .report-labels-option {
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem;
  margin: 0;
}

#report-subtab-panel-report .report-labels-option > span {
  font-size: 0.8125rem;
  color: #c8c8c8;
}

#report-subtab-panel-report .report-labels-option > input[type="text"] {
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-report .report-excel-tabnames-fieldset {
  display: grid;
  row-gap: 0.75rem;
  column-gap: 0;
}

#report-subtab-panel-report .report-excel-tabnames-option {
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: 0.75rem;
  margin: 0;
}

#report-subtab-panel-report .report-excel-tabnames-option > span {
  font-size: 0.8125rem;
  color: #c8c8c8;
}

#report-subtab-panel-report .report-excel-tabnames-option > input[type="text"] {
  width: 100%;
  min-width: 0;
}

#report-subtab-panel-report .report-decimal-places-control {
  position: relative;
  box-sizing: border-box;
}

#report-subtab-panel-report .report-decimal-places-control > select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding-right: calc(0.55rem + 16px + 0.5rem);
}

#report-subtab-panel-report .report-decimal-places-chevron {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  pointer-events: none;
}

#report-subtab-panel-report .report-interval-control {
  position: relative;
  display: block;
  box-sizing: border-box;
}

#subtab-panel-intervals .report-interval-control {
  position: relative;
  display: block;
  box-sizing: border-box;
}

#report-subtab-panel-report .report-interval-control > #FT_STRING_INTERVAL {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding-right: calc(28px + 0.35rem);
  box-sizing: border-box;
}

#subtab-panel-intervals .report-interval-control > #FT_STRING_INTERVAL {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding-right: calc(28px + 0.35rem);
  box-sizing: border-box;
}

#report-subtab-panel-report .report-interval-eye-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
}

#subtab-panel-intervals .report-interval-eye-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
}

#report-subtab-panel-report .report-interval-control:has(.report-interval-eye-wrap--open) {
  z-index: 100;
}

#subtab-panel-intervals .report-interval-control:has(.report-interval-eye-wrap--open) {
  z-index: 100;
}

#report-subtab-panel-report .report-interval-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  right: 0;
  width: max-content;
  min-width: 8rem;
  max-width: min(calc(100vw - 2rem), 16rem);
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  pointer-events: auto;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#report-subtab-panel-report .report-interval-tooltip[hidden] {
  display: none;
}

#subtab-panel-intervals .report-interval-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  right: 0;
  width: max-content;
  min-width: 8rem;
  max-width: min(100vw - 2rem, 16rem);
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  white-space: normal;
  pointer-events: auto;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#subtab-panel-intervals .report-interval-tooltip[hidden] {
  display: none;
}

#report-subtab-panel-report .report-interval-eye-wrap--open .report-interval-tooltip {
  visibility: visible;
  opacity: 1;
}

#subtab-panel-intervals .report-interval-eye-wrap--open .report-interval-tooltip {
  visibility: visible;
  opacity: 1;
}

#report-subtab-panel-report .report-interval-list,
#subtab-panel-intervals .report-interval-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#report-subtab-panel-report .report-interval-list li,
#subtab-panel-intervals .report-interval-list li {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
}

#report-subtab-panel-report .report-interval-list li:hover {
  background: rgba(255, 255, 255, 0.08);
}

#subtab-panel-intervals .report-interval-list li:hover {
  background: rgba(255, 255, 255, 0.08);
}

#report-subtab-panel-report .report-interval-list li:active {
  cursor: grabbing;
}

#subtab-panel-intervals .report-interval-list li:active {
  cursor: grabbing;
}

#report-subtab-panel-report .fi-other-dropdown-menu {
  background: var(--files-win-panel-bg);
  border-color: var(--files-win-border);
  border-radius: 2px;
}

#report-subtab-panel-report .report-other-options-dropdown-menu {
  top: auto;
  bottom: calc(100% + 4px);
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-x: hidden;
  overflow-y: auto;
}

#report-subtab-panel-report .fi-other-dropdown-menu input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  box-sizing: border-box;
  width: 1rem;
  height: 1rem;
  min-height: 1rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: var(--accent);
}

#report-subtab-panel-report .fi-other-dropdown-menu input[type="checkbox"]::after {
  content: none;
}

#tab-panel-files .field-hint,
#fi-subtab-panel-carry .field-hint {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.5rem);
  left: 0;
  width: max-content;
  max-width: min(100vw - 2rem, 18rem);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  white-space: normal;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#tab-panel-files .field-input-wrap:hover,
#fi-subtab-panel-carry .brinson-available-sectors-panel:has(.files-tab-date-eye-wrap:hover) {
  z-index: 100;
}

#tab-panel-files .field-input-wrap:hover .field-hint,
#fi-subtab-panel-carry .files-tab-date-eye-wrap:hover .field-hint {
  visibility: visible;
  opacity: 1;
}

#tab-panel-files .field-input-wrap--picker:has(.file-picker-menu:not(.hidden)) .field-hint {
  visibility: hidden;
  opacity: 0;
}

#subtab-panel-configuration .file-picker-menu {
  top: calc(100% + 0.15rem);
  padding: 0.15rem 0;
  border: 1px solid var(--files-win-border);
  border-radius: 2px;
  background: #2b2b2b;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

#subtab-panel-configuration .file-picker-menu .file-picker-option {
  min-height: 22px;
  padding: 0.15rem 0.55rem;
  color: #f3f3f3;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
  line-height: 22px;
}

#subtab-panel-configuration .file-picker-menu .file-picker-option:hover,
#subtab-panel-configuration .file-picker-menu .file-picker-option:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

#subtab-panel-configuration .file-picker-menu .file-picker-empty {
  padding: 0.15rem 0.55rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
}

#subtab-panel-configuration .files-tab-checkbox-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  width: fit-content;
  max-width: 100%;
}

#subtab-panel-configuration .files-tab-checkbox-control .files-tab-checkbox {
  margin-top: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
  color: #c8c8c8;
}

#subtab-panel-configuration .files-tab-checkbox-control .files-tab-date-eye-wrap {
  flex: 0 0 auto;
}

.file-picker-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 1100;
  margin: 0;
  padding: 0.25rem 0;
  max-height: 14rem;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
}

.file-picker-menu.hidden {
  display: none;
}

.file-picker-menu li {
  margin: 0;
}

.file-picker-menu .file-picker-option {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.file-picker-menu .file-picker-option:hover,
.file-picker-menu .file-picker-option:focus-visible {
  background: rgba(10, 132, 255, 0.15);
  outline: none;
}

.file-picker-menu .file-picker-empty {
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
}

#fi-subtab-panel-carry .files-tab-date-eye-wrap .field-hint {
  left: auto;
  right: 0;
  top: auto;
  bottom: calc(100% + 0.5rem);
}

#fi-subtab-panel-carry .brinson-available-sectors-panel {
  margin-top: 0.25rem;
}

#fi-subtab-panel-carry {
  --fi-carry-label-width: 4rem;
  --fi-carry-column-gap: 1.25rem;
  --fi-sector-eye-width: 28px;
  --fi-sector-eye-gap: 0.35rem;

  display: grid;
  grid-template-columns: var(--fi-carry-label-width) minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--fi-carry-column-gap);
  row-gap: 0.85rem;
  align-items: center;
}

.fi-templates-panel {
  display: flex;
  align-items: center;
  gap: var(--fi-carry-column-gap, 1.25rem);
  box-sizing: border-box;
  width: min(100%, 36rem);
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--files-win-border, #3d3d3d);
  border-radius: 2px;
  background: var(--files-win-panel-bg, #191919);
}

.fi-templates-panel-label {
  flex: 0 0 var(--fi-carry-label-width, 4rem);
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: #c8c8c8;
}

.fi-templates-select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.fi-carry-row {
  display: contents;
}

.fi-decomposition-label {
  grid-column: 1;
  align-self: center;
  justify-self: start;
  margin: 0;
  padding-left: 1rem;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: #c8c8c8;
}

.fi-decomposition-label > span {
  white-space: nowrap;
}

.fi-decomposition-select {
  grid-column: 2;
  align-self: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
}

.fi-carry-row > .fi-attribution-header-row {
  grid-column: 3;
  align-self: center;
  min-width: 0;
}

.fi-brinson-row > .fi-decomposition-label,
.fi-brinson-row > .fi-brinson-allocation-input-row {
  grid-row: 1;
}

.fi-brinson-row > .fi-brinson-allocation-input-row {
  grid-column: 2 / -1;
  align-self: center;
  min-width: 0;
}

.fi-brinson-allocation-input-row,
.fi-attribution-header-row .fi-sectors-control {
  width: 100%;
}

.fi-sectors-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.fi-sectors-control > input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding-right: calc(28px + 0.35rem);
  box-sizing: border-box;
}

.fi-sectors-eye-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
}

.fi-sectors-control:has(.fi-sectors-eye-wrap--open) {
  z-index: 100;
}

.fi-sectors-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 0.35rem);
  right: 0;
  width: max-content;
  min-width: 10rem;
  max-width: min(calc(100vw - 2rem), 24rem);
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(28, 28, 30, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  pointer-events: auto;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.fi-sectors-tooltip[hidden] {
  display: none;
}

.fi-sectors-eye-wrap--open .fi-sectors-tooltip {
  visibility: visible;
  opacity: 1;
}

.fi-sectors-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fi-sectors-list li {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
}

.fi-sectors-list li:hover {
  background: rgba(255, 255, 255, 0.08);
}

.fi-sectors-list li:active {
  cursor: grabbing;
}

.fi-sectors-list .brinson-sectors-empty {
  color: var(--muted);
  cursor: default;
  font-size: 0.9rem;
}

.fi-sectors-list .fi-sectors-list-item--blank,
.picker-list-item--blank {
  min-height: 1.35rem;
  cursor: pointer;
}

.fi-carry-row:nth-of-type(2) > .fi-decomposition-label,
.fi-carry-row:nth-of-type(2) > .fi-decomposition-select,
.fi-carry-row:nth-of-type(2) > .fi-attribution-header-row {
  grid-row: 2;
}

.fi-carry-row:nth-of-type(3) > .fi-decomposition-label,
.fi-carry-row:nth-of-type(3) > .fi-decomposition-select,
.fi-carry-row:nth-of-type(3) > .fi-attribution-header-row {
  grid-row: 3;
}

.fi-carry-row:nth-of-type(4) > .fi-decomposition-label,
.fi-carry-row:nth-of-type(4) > .fi-decomposition-select,
.fi-carry-row:nth-of-type(4) > .fi-attribution-header-row {
  grid-row: 4;
}

#fi-subtab-panel-carry > .fi-other-field {
  grid-column: 1 / -1;
  grid-row: 5;
  display: grid;
  grid-template-columns: var(--fi-carry-label-width) minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--fi-carry-column-gap);
  align-items: center;
  margin-bottom: 0;
}

#fi-subtab-panel-carry > .fi-other-field > span {
  grid-column: 1;
  align-self: center;
  justify-self: start;
  padding-left: 1rem;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: #c8c8c8;
}

#fi-subtab-panel-carry > .fi-other-field > .fi-other-dropdown {
  grid-column: 2 / -1;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}

#fi-subtab-panel-carry .fi-other-dropdown-menu {
  top: calc(100% + 4px);
  bottom: auto;
  max-height: min(16rem, calc(100vh - 8rem));
  overflow-y: auto;
}

#subtab-panel-fi .fi-other-dropdown-menu input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  box-sizing: border-box;
  width: 1rem;
  height: 1rem;
  min-height: 1rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: var(--accent);
}

#subtab-panel-fi .fi-other-dropdown-menu input[type="checkbox"]::after {
  content: none;
}

.fi-attribution-header-row {
  min-width: 0;
}

.fi-attribution-input-row {
  display: flex;
  align-items: center;
  gap: var(--fi-sector-eye-gap);
  min-width: 0;
}

.fi-attribution-input-row .fi-attribution-field {
  flex: 1 1 auto;
  display: block;
  margin-left: 0;
  margin-bottom: 0;
  min-width: 0;
}

.fi-attribution-input-row .fi-attribution-field input {
  width: 100%;
  box-sizing: border-box;
}

.sectors-available-wrap {
  position: relative;
  flex: 0 0 auto;
}

.sectors-available-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 200;
  min-width: 200px;
  max-width: 280px;
  padding: 0.35rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.sectors-available-dropdown[hidden] {
  display: none;
}

.sectors-available-dropdown .brinson-sectors-list li {
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
}

.sectors-available-dropdown .brinson-sectors-list li:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sectors-available-dropdown .brinson-sectors-list li + li {
  border-top: none;
}

.sectors-available-dropdown .brinson-sectors-empty {
  color: var(--muted);
  cursor: default;
  font-size: 0.9rem;
}

.attribution-tab-layout {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-height: 0;
}

.attribution-tab-layout .fi-subtabs {
  flex: 0 0 50%;
  min-width: 16rem;
  width: auto;
  max-width: none;
  align-self: stretch;
  min-height: 0;
}

.attribution-right-pane {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 16rem;
  min-height: 0;
  width: auto;
  max-width: 100%;
  align-self: stretch;
}

#subtab-panel-fi .attribution-right-pane {
  padding-top: 0.75rem;
}

.attribution-right-pane .fi-templates-panel {
  flex: 0 0 auto;
  width: 100%;
  margin: 0 0 0.65rem;
}

.attribution-right-pane .attribution-tree-panel {
  flex: 1 1 auto;
  min-height: 0;
}

.attribution-splitter {
  flex: 0 0 auto;
  align-self: stretch;
  position: relative;
  width: 10px;
  margin: 0 0.4rem;
  cursor: col-resize;
  background: transparent;
  border: 0;
  padding: 0;
  touch-action: none;
}

.attribution-splitter::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  border-radius: 1px;
  background: var(--border);
}

.attribution-splitter:hover::before,
.attribution-splitter:focus-visible::before,
.attribution-splitter--active::before {
  width: 3px;
  background: rgba(96, 205, 255, 0.85);
}

.attribution-splitter:focus-visible {
  outline: none;
}

.attribution-tree-panel {
  position: relative;
  flex: 1 1 auto;
  width: auto;
  height: auto;
  min-width: 16rem;
  min-height: 240px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--panel);
  overflow: hidden;
}

.attribution-force-tree-host {
  width: 100%;
  height: 100%;
  touch-action: none;
}

.attribution-force-tree-svg {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  cursor: grab;
}

.attribution-force-tree-svg:active {
  cursor: grabbing;
}

.attribution-tree-zoom-controls {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 2;
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: rgba(28, 28, 30, 0.92);
}

.attribution-tree-zoom-btn {
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.35rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1;
  cursor: pointer;
}

.attribution-tree-zoom-btn--reset {
  min-width: auto;
  padding: 0 0.45rem;
  font-size: 0.72rem;
}

.attribution-tree-zoom-btn:hover:not(:disabled) {
  border-color: rgba(96, 205, 255, 0.85);
  color: #fff;
}

.attribution-force-tree-link {
  stroke: rgba(154, 167, 181, 0.55);
  stroke-width: 1.5px;
}

.attribution-force-tree-node {
  cursor: grab;
}

.attribution-force-tree-node:active {
  cursor: grabbing;
}

.attribution-force-tree-node-circle {
  fill: rgba(28, 28, 30, 0.96);
  stroke: var(--border);
  stroke-width: 1.5px;
}

.attribution-force-tree-node--depth-0 .attribution-force-tree-node-circle {
  stroke-width: 2px;
}

.attribution-force-tree-node-label {
  fill: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  pointer-events: none;
}

.attribution-force-tree-node--depth-1 .attribution-force-tree-node-label {
  fill: var(--muted);
}

.attribution-force-tree-node--depth-2 .attribution-force-tree-node-circle {
  fill: rgba(28, 28, 30, 0.97);
  stroke: rgba(154, 167, 181, 0.55);
}

.attribution-force-tree-node--depth-2 .attribution-force-tree-node-label {
  fill: var(--muted);
}

.attribution-force-tree-node--carry .attribution-force-tree-node-circle {
  fill: rgba(34, 120, 60, 0.35);
  stroke: #4ade80;
}

.attribution-force-tree-node--carry .attribution-force-tree-node-label {
  fill: #8ee88e;
}

.attribution-force-tree-node--carry-root .attribution-force-tree-node-label {
  font-weight: 700;
}

.attribution-force-tree-node--carry-child .attribution-force-tree-node-label {
  font-weight: 700;
}

.attribution-force-tree-node--curve .attribution-force-tree-node-circle {
  fill: rgba(37, 99, 180, 0.35);
  stroke: #60a5fa;
}

.attribution-force-tree-node--curve .attribution-force-tree-node-label {
  fill: #93c5fd;
}

.attribution-force-tree-node--curve-root .attribution-force-tree-node-label {
  font-weight: 700;
}

.attribution-force-tree-node--curve-child .attribution-force-tree-node-label {
  font-weight: 700;
}

.attribution-force-tree-node--credit .attribution-force-tree-node-circle,
.attribution-force-tree-node--residual .attribution-force-tree-node-circle {
  fill: rgba(234, 88, 12, 0.35);
  stroke: #fb923c;
}

.attribution-force-tree-node--credit .attribution-force-tree-node-label,
.attribution-force-tree-node--residual .attribution-force-tree-node-label {
  fill: #fdba74;
}

.attribution-force-tree-node--credit-root .attribution-force-tree-node-label,
.attribution-force-tree-node--residual-root .attribution-force-tree-node-label {
  font-weight: 700;
}

.attribution-force-tree-node--credit-child .attribution-force-tree-node-label,
.attribution-force-tree-node--residual-child .attribution-force-tree-node-label {
  font-weight: 700;
}

.attribution-force-tree-node--brinson .attribution-force-tree-node-circle {
  fill: rgba(180, 40, 40, 0.35);
  stroke: #f87171;
}

.attribution-force-tree-node--brinson .attribution-force-tree-node-label {
  fill: #fca5a5;
}

.attribution-force-tree-node--market-direction .attribution-force-tree-node-circle {
  fill: rgba(180, 140, 20, 0.35);
  stroke: #facc15;
}

.attribution-force-tree-node--market-direction .attribution-force-tree-node-label {
  fill: #fde047;
}

.attribution-force-tree-node--other .attribution-force-tree-node-circle {
  fill: rgba(126, 58, 180, 0.35);
  stroke: #c084fc;
}

.attribution-force-tree-node--other .attribution-force-tree-node-label {
  fill: #d8b4fe;
}

.attribution-tree-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  cursor: ns-resize;
  touch-action: none;
}

.attribution-tree-resize-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--muted);
  opacity: 0.7;
}

.brinson-tab-panels {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.brinson-panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 1.15rem 0.85rem 0.85rem;
  overflow: visible;
}

.brinson-panel-title {
  position: absolute;
  top: 0;
  left: 0.65rem;
  z-index: 2;
  transform: translateY(-50%);
  padding: 0 0.35rem;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1;
}

.brinson-panel-title-row {
  position: absolute;
  top: 0;
  left: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.35rem;
  background: var(--bg);
  max-width: calc(100% - 1.3rem);
}

.brinson-panel-title-row .brinson-panel-title {
  position: static;
  transform: none;
  padding: 0;
  background: transparent;
  flex-shrink: 0;
}

.brinson-panel-title-row .files-tab-date-eye-wrap {
  position: relative;
  flex-shrink: 0;
}

.brinson-sectors-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 12rem;
  overflow: auto;
}

.brinson-sectors-list:not([hidden]) {
  display: block;
}

.brinson-sectors-list li {
  padding: 0.35rem 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.4;
  cursor: grab;
  user-select: none;
}

.brinson-sectors-list li:active {
  cursor: grabbing;
}

.brinson-sectors-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#fi-subtab-panel-carry {
  overflow: visible;
}

.subtab-panel-status {
  flex-shrink: 0;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
}

.subtab-panel-status:not(:has(:not(.hidden))) {
  display: none;
}

.subtab-panel-status .success,
.subtab-panel-status .error {
  margin: 0;
}

.subtab-panel-status .error + .success,
.subtab-panel-status .success + .error {
  margin-top: 0.35rem;
}

.subtab-panel-status .error.error--navigate-attribution {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.config-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.config-section-header {
  padding: var(--space-3) var(--space-3) 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.config-list {
  list-style: none;
  margin: 0;
  padding: 0 var(--space-2) var(--space-2);
  max-height: 16rem;
  overflow: auto;
}

.config-list-item {
  width: 100%;
  margin-bottom: 0.3rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-base);
}

.config-list-item:hover {
  background: rgba(10, 132, 255, 0.08);
}

.config-list-item.active {
  background: rgba(10, 132, 255, 0.16);
  border-color: rgba(10, 132, 255, 0.35);
  color: white;
}

.config-list-empty {
  padding: var(--space-3);
  color: var(--muted);
  font-size: 0.85rem;
}

.analysis-context-menu {
  position: fixed;
  z-index: 1200;
  min-width: 9rem;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
  font-family: var(--font-family);
}

.analysis-context-menu-item {
  display: block;
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.analysis-context-menu-item:hover,
.analysis-context-menu-item:focus {
  background: var(--accent-soft);
  outline: none;
}

.files-save-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

.files-tab-hint {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.files-tab-hint-color--green {
  color: #8ee88e;
}

.files-tab-hint-color--red {
  color: #ffb4b4;
}

.file-preview-filename {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  word-break: break-all;
}

.file-preview-content {
  min-height: 10rem;
  max-height: min(55vh, 24rem);
}

#file-preview-dialog .dialog-actions {
  margin-top: 0.75rem;
}

.files-tab-checkbox {
  margin-top: 1rem;
}

.report-subtabs {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  align-self: stretch;
}

.interactive-subtabs,
.interactive-report-fields-pane,
.fi-subtabs {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: min(100%, 36rem);
  align-self: flex-start;
}

.report-subtab-list,
.interactive-subtab-list,
.fi-subtab-list {
  margin: -0.25rem 0 0;
  padding-left: 0;
  padding-right: 0;
}

.report-subtab-panel,
.fi-subtab-panel {
  display: none;
  flex-direction: column;
  padding-top: 1rem;
}

.report-subtab-panel.active,
.fi-subtab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.report-subtab-intro {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.reports-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.fi-other-dropdown {
  position: relative;
  width: 100%;
}

.fi-other-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition-fast);
}

.fi-other-dropdown-toggle:focus {
  outline: 2px solid rgba(10, 132, 255, 0.45);
  border-color: var(--accent);
}

.fi-other-dropdown-toggle:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.fi-other-dropdown-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fi-other-dropdown-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.fi-other-dropdown-toggle[aria-expanded="true"] .fi-other-dropdown-chevron {
  transform: rotate(180deg);
}

.fi-other-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  min-width: 100%;
  padding: var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.fi-other-dropdown-menu[hidden] {
  display: none;
}

.report-reports-dropdown {
  width: 100%;
}

.report-formats-dropdown {
  width: 100%;
}

.report-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
}

.report-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface-input);
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.report-option input[type="checkbox"]:hover:not(:disabled) {
  border-color: var(--muted);
}

.report-option input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.report-option input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.report-option input[type="checkbox"]:focus-visible {
  box-shadow: var(--focus-ring);
}

.report-option input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.report-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.72;
}

.report-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
  margin: 0;
}

.report-field > span {
  white-space: nowrap;
}

.fi-section {
  width: 100%;
}

.fi-section-body {
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem;
}

.config-add-input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
}

.config-add-input:focus {
  outline: 2px solid rgba(10, 132, 255, 0.45);
  border-color: var(--accent);
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0 0 var(--space-3);
  font-size: 2rem;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 0 0 var(--space-4);
  color: var(--muted);
  line-height: 1.6;
}

.btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), filter var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:active:not(:disabled) {
  filter: brightness(0.92);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
  background: var(--accent-active);
  filter: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.1);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-compact {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255, 69, 58, 0.4);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 69, 58, 0.12);
  border-color: rgba(255, 69, 58, 0.6);
}

.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: var(--space-3);
  background: rgba(5, 7, 10, 0.6);
  backdrop-filter: blur(6px);
}

#attribution-template-confirm-dialog {
  z-index: 1600;
}

#zip-files-dialog {
  z-index: 1400;
}

.zip-excel-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
}

body.zip-excel-fullscreen-open {
  overflow: hidden;
}

.zip-excel-fullscreen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
}

.zip-excel-fullscreen-heading {
  min-width: 0;
  flex: 1;
}

.zip-excel-fullscreen-heading h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.zip-excel-fullscreen-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.zip-excel-close-btn {
  white-space: nowrap;
  min-width: 5.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  line-height: 1.2;
}

.zip-excel-fullscreen-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.75rem;
  padding: 0.85rem 1rem 1rem;
}

.zip-excel-fullscreen-workbook {
  flex: 1;
  min-height: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow);
  background: #ffffff;
  color: #1f1f1f;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.zip-excel-toolbar {
  flex-shrink: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.zip-excel-fullscreen--single-view .zip-excel-toolbar {
  display: none;
}

.zip-excel-fullscreen .excel-sheet-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 0;
  margin: 0;
  padding: 0.65rem 0.85rem;
  overflow-x: auto;
  overflow-y: hidden;
  background: transparent;
  border: none;
  scrollbar-width: thin;
}

.zip-excel-fullscreen .excel-sheet-tab {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.5rem 1rem;
  min-height: 2.35rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.zip-excel-fullscreen .excel-sheet-tab:hover {
  background: var(--accent-soft-hover);
  border-color: var(--accent);
}

.zip-excel-fullscreen .excel-sheet-tab--active {
  margin: 0;
  padding: 0.5rem 1rem;
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.zip-excel-grid-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.excel-react-root,
.excel-workbook-panels {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.zip-excel-fullscreen .excel-sheet-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.zip-excel-fullscreen .excel-sheet-panel[hidden] {
  display: none;
}

.zip-excel-fullscreen .excel-grid-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.zip-excel-fullscreen .excel-grid-wrap {
  max-height: none;
  min-height: 0;
  flex: 1;
}

.zip-excel-fullscreen .excel-outline-btn {
  min-width: 1.1rem;
  min-height: 1.1rem;
  font-size: 0.75rem;
  line-height: 1;
}

.excel-chart-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #ffffff;
}

.excel-chart-host {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0.75rem 1rem 1rem;
}

.excel-chart-plot-host {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
}

.excel-chart-empty {
  margin: 2rem auto;
  max-width: 28rem;
  text-align: center;
  color: #5f5f5f;
}

.excel-chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.excel-chart-y-label {
  text-anchor: end;
  font: 600 13px/1.2 "Segoe UI", Arial, sans-serif;
}

.excel-chart-y-label--total {
  fill: #1f1f1f;
  font-size: 13px;
  font-weight: 700;
}

.excel-chart-legend-label {
  fill: #1f1f1f;
  font: 500 12px/1.2 "Segoe UI", Arial, sans-serif;
}

.excel-chart-legend-swatch {
  stroke: rgb(0 0 0 / 12%);
  stroke-width: 1;
}

.excel-chart-group:not(.excel-chart-group--total) .excel-chart-bar {
  opacity: 0.78;
}

.excel-chart-group--total .excel-chart-bar {
  opacity: 1;
  stroke: rgb(31 31 31 / 28%);
  stroke-width: 1;
}

.excel-chart-zero-line {
  stroke: #c8c8c8;
  stroke-width: 1;
}

.excel-line-chart-zero-line {
  stroke: #c8c8c8;
  stroke-width: 1;
}

.excel-line-chart-path {
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: opacity 0.15s ease;
}

.excel-line-chart-path:hover {
  opacity: 0.85;
}

.excel-line-chart-dot {
  stroke: #ffffff;
  stroke-width: 1;
}

.excel-line-chart-hit {
  pointer-events: stroke;
  cursor: default;
}

.excel-chart-title {
  fill: #1f1f1f;
  font: 600 14px/1.2 "Segoe UI", Arial, sans-serif;
}

.excel-chart-header-line {
  fill: #1f1f1f;
  font: 500 12px/1.2 "Segoe UI", Arial, sans-serif;
}

.excel-chart-axis path,
.excel-chart-axis line {
  stroke: #bfbfbf;
}

.excel-chart-axis text {
  fill: #5f5f5f;
  font: 600 13px/1.2 "Segoe UI", Arial, sans-serif;
}

.excel-chart-bar {
  transition: opacity 0.15s ease;
}

.excel-chart-bar:hover {
  opacity: 0.82;
}

.excel-chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0 0;
  flex-shrink: 0;
}

.excel-chart-footer .excel-chart-key {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.excel-chart-footer .excel-treemap-key {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.excel-chart-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  background: #f8f8f8;
  flex-shrink: 0;
}

.excel-chart-key-heading {
  font: 600 12px/1.2 "Segoe UI", Arial, sans-serif;
  color: #3a3a3a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.excel-chart-key-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.25rem;
}

.excel-chart-key-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.excel-chart-key-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgb(0 0 0 / 12%);
  flex-shrink: 0;
}

.excel-chart-key-label {
  font: 12px/1.2 "Segoe UI", Arial, sans-serif;
  color: #1f1f1f;
  white-space: nowrap;
}

.excel-treemap-panel,
.excel-bubble-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #ffffff;
}

.excel-treemap-host {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0.75rem 1rem 1rem;
}

.excel-treemap-plot-host {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
}

.excel-treemap-empty {
  margin: 2rem auto;
  max-width: 28rem;
  text-align: center;
  color: #5f5f5f;
}


.excel-treemap-svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.excel-treemap-title {
  fill: #1f1f1f;
  font: 600 14px/1.2 "Segoe UI", Arial, sans-serif;
}

.excel-treemap-cell {
  stroke: rgb(255 255 255 / 55%);
  stroke-width: 1;
  transition: opacity 0.15s ease;
}

.excel-treemap-cell:hover {
  opacity: 0.88;
}

.excel-treemap-node--drillable .excel-treemap-cell {
  stroke: rgb(255 255 255 / 90%);
  stroke-width: 2;
}

.excel-treemap-node--drillable:hover .excel-treemap-cell {
  opacity: 0.92;
  filter: brightness(1.05);
}

.excel-treemap-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  background: #fafafa;
  flex-shrink: 0;
}

.excel-treemap-crumb-btn {
  border: none;
  background: transparent;
  color: #245ea8;
  font: 600 12px/1.2 "Segoe UI", Arial, sans-serif;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
}

.excel-treemap-crumb-btn:hover:not(:disabled) {
  background: #e8f0fb;
}

.excel-treemap-crumb-btn--current {
  color: #1f1f1f;
  cursor: default;
}

.excel-treemap-crumb-btn:disabled {
  opacity: 1;
}

.excel-treemap-crumb-sep {
  color: #8a8a8a;
  font-size: 12px;
  user-select: none;
}

.excel-treemap-key-swatch--hint {
  background: linear-gradient(135deg, #e8e8e8 0%, #c8c8c8 100%);
}

.excel-treemap-key-swatch--positive {
  background: linear-gradient(180deg, hsl(142deg 38% 88%) 0%, hsl(142deg 72% 30%) 100%);
}

.excel-treemap-key-swatch--negative {
  background: linear-gradient(180deg, hsl(0deg 38% 88%) 0%, hsl(0deg 72% 30%) 100%);
}

.excel-treemap-key-swatch--groups {
  background: linear-gradient(
    90deg,
    #4e79a7 0%,
    #f28e2b 25%,
    #59a14f 50%,
    #b07aa1 75%,
    #e15759 100%
  );
}

.excel-treemap-group-rect {
  fill: rgb(255 255 255 / 18%);
  stroke: #666;
  stroke-width: 1;
  pointer-events: none;
}

.excel-treemap-sector--drillable .excel-treemap-group-rect {
  pointer-events: all;
}

.excel-treemap-sector--drillable:hover .excel-treemap-group-rect {
  stroke: #245ea8;
  fill: rgb(255 255 255 / 55%);
}

.excel-treemap-group-label {
  fill: #1f1f1f;
  font: 700 11px/1.2 "Segoe UI", Arial, sans-serif;
  pointer-events: none;
}

.excel-treemap-label,
.excel-treemap-value {
  fill: #ffffff;
  pointer-events: none;
  text-shadow: 0 1px 2px rgb(0 0 0 / 45%);
}

.excel-treemap-label {
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 600;
}

.excel-treemap-value {
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 500;
  opacity: 0.95;
}

.excel-bubble-cell {
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 1;
}

.excel-bubble-group-circle {
  fill: rgba(31, 31, 31, 0.03);
  stroke: rgba(31, 31, 31, 0.22);
  stroke-width: 1;
  stroke-dasharray: 5 4;
  pointer-events: none;
}

.excel-bubble-group-label {
  fill: rgba(31, 31, 31, 0.55);
  pointer-events: none;
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 600;
}

.excel-bubble-cell:hover {
  stroke: rgba(31, 31, 31, 0.35);
  stroke-width: 1.5;
}

.excel-bubble-label,
.excel-bubble-value {
  fill: #1f1f1f;
  pointer-events: none;
  font-family: "Segoe UI", Arial, sans-serif;
}

.excel-bubble-label {
  font-weight: 600;
}

.excel-bubble-value {
  font-weight: 500;
  fill: rgba(31, 31, 31, 0.82);
}

.excel-treemap-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  background: #f8f8f8;
  flex-shrink: 0;
}

.excel-treemap-key-heading {
  font: 600 12px/1.2 "Segoe UI", Arial, sans-serif;
  color: #3a3a3a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.excel-treemap-key-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.25rem;
}

.excel-treemap-key-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.excel-treemap-key-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgb(0 0 0 / 12%);
  flex-shrink: 0;
}

.excel-treemap-key-label {
  font: 12px/1.2 "Segoe UI", Arial, sans-serif;
  color: #1f1f1f;
  white-space: nowrap;
}

.excel-outline-gutter {
  width: var(--excel-outline-gutter-width, 0);
  min-width: var(--excel-outline-gutter-width, 0);
  padding: 0;
  text-align: center;
  vertical-align: middle;
  background: #f0f0f0;
  border-right: 1px solid #bfbfbf;
}

.excel-outline-gutter:empty {
  display: none;
}

.excel-grid:not(.excel-grid--outlined) .excel-corner {
  width: var(--excel-row-header-width);
  min-width: var(--excel-row-header-width);
}

.excel-outline-level-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  min-height: calc(var(--excel-column-header-height) - 2px);
  padding: 1px 0;
}

.excel-outline-level-btn {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid #7f7f7f;
  border-radius: 2px;
  background: #ffffff;
  color: #1f1f1f;
  font: 700 10px/1 Arial, sans-serif;
  cursor: pointer;
  flex-shrink: 0;
}

.excel-outline-level-btn:hover {
  background: #e8e8e8;
}

.excel-outline-level-btn--active {
  background: #d6e4f5;
  border-color: #4472c4;
  color: #1f1f1f;
}

.excel-outline-tracks {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  min-height: 18px;
}

.excel-outline-track {
  position: relative;
  width: 14px;
  min-width: 14px;
  flex: 0 0 14px;
}

.excel-outline-track--active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 6px;
  width: 0;
  border-right: 1px solid #7f7f7f;
  pointer-events: none;
}

.excel-outline-track--summary::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 6px;
  right: 6px;
  height: 0;
  border-top: 1px solid #7f7f7f;
  pointer-events: none;
  transform: translateY(-50%);
}

.excel-outline-track--summary .excel-outline-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
}

.excel-outline-gutter--frozen {
  position: sticky;
  left: 0;
  z-index: 3;
}

.excel-outline-btn {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid #7f7f7f;
  border-radius: 2px;
  background: #ffffff;
  color: #1f1f1f;
  font: 700 11px/1 Arial, sans-serif;
  cursor: pointer;
}

.excel-outline-btn:hover {
  background: #e8e8e8;
}

.excel-cell--link {
  color: #0563c1;
  text-decoration: underline;
  cursor: pointer;
}

.excel-cell--highlight {
  outline: 2px solid #4472c4;
  outline-offset: -2px;
  background: #fff2cc !important;
}

#zip-excel-fullscreen-error {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  flex-shrink: 0;
}

#zip-excel-fullscreen,
#zip-excel-fullscreen * {
  border-radius: 0 !important;
}

.dialog--excel {
  width: min(96vw, 78rem);
  max-height: min(92vh, 52rem);
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #f3f3f3;
  color: #1f1f1f;
}

.excel-dialog-header {
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid #c8c8c8;
  background: #f3f3f3;
}

.excel-dialog-header h2 {
  color: #1f1f1f;
  font-size: 1rem;
  font-weight: 600;
}

.excel-workbook-source {
  margin: 0;
  padding: 0.35rem 1rem 0.55rem;
  color: #5f5f5f;
  font-size: 0.82rem;
  background: #f3f3f3;
}

.excel-workbook {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 28rem;
  margin: 0 1rem;
  border: 1px solid #a6a6a6;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #ffffff;
}

.excel-grid-host {
  flex: 1;
  min-height: 0;
}

.excel-grid-wrap {
  width: 100%;
  height: 100%;
  min-height: 24rem;
  max-height: min(68vh, 40rem);
  overflow: auto;
  background: #ffffff;
}

.excel-grid {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  font-size: 11pt;
  color: #000000;
  --excel-outline-level-width: 14px;
  --excel-outline-level-count: 0;
  --excel-outline-gutter-width: 0px;
  --excel-row-header-width: 42px;
  --excel-frozen-data-left: calc(var(--excel-outline-gutter-width) + var(--excel-row-header-width));
  --excel-column-header-height: 24px;
}

.excel-grid--outlined {
  --excel-outline-gutter-width: calc(var(--excel-outline-level-count) * var(--excel-outline-level-width));
}

.excel-grid th,
.excel-grid td {
  border: 1px solid #d4d4d4;
  padding: 1px 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: bottom;
  box-sizing: border-box;
}

.excel-corner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 6;
  width: calc(var(--excel-outline-gutter-width) + var(--excel-row-header-width));
  min-width: calc(var(--excel-outline-gutter-width) + var(--excel-row-header-width));
  background: #f0f0f0;
  border-right: 1px solid #bfbfbf;
  border-bottom: 1px solid #bfbfbf;
}

.excel-col-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f0f0f0;
  color: #333333;
  font-weight: 400;
  text-align: center;
  border-bottom: 1px solid #bfbfbf;
}

.excel-col-header--frozen {
  left: var(--excel-frozen-data-left);
  z-index: 5;
  box-shadow: 2px 0 4px -2px rgb(0 0 0 / 18%);
}

.excel-row-header {
  width: var(--excel-row-header-width);
  min-width: var(--excel-row-header-width);
  background: #f0f0f0;
  color: #333333;
  font-weight: 400;
  text-align: center;
  border-right: 1px solid #bfbfbf;
}

.excel-row-header--frozen {
  position: sticky;
  left: var(--excel-outline-gutter-width);
  z-index: 3;
}

.excel-cell--frozen {
  position: sticky;
  left: var(--excel-frozen-data-left);
  z-index: 1;
  box-shadow: 2px 0 4px -2px rgb(0 0 0 / 18%);
}

.excel-cell--frozen.excel-cell--highlight {
  z-index: 2;
}

.excel-grid-row-cell--frozen {
  background-clip: padding-box;
}

.excel-outline-gutter.excel-grid-row-cell--frozen,
.excel-row-header.excel-grid-row-cell--frozen {
  background: #f0f0f0;
}

.excel-grid-row-cell--frozen.excel-outline-gutter--frozen,
.excel-grid-row-cell--frozen.excel-row-header--frozen {
  z-index: 3;
}

.excel-cell.excel-grid-row-cell--frozen.excel-cell--frozen {
  box-shadow:
    2px 0 4px -2px rgb(0 0 0 / 18%),
    0 2px 4px -2px rgb(0 0 0 / 12%);
}

.excel-grid-row-cell--frozen-last {
  box-shadow: 0 2px 4px -2px rgb(0 0 0 / 18%);
}

.excel-cell.excel-grid-row-cell--frozen-last.excel-cell--frozen {
  box-shadow:
    2px 0 4px -2px rgb(0 0 0 / 18%),
    0 2px 4px -2px rgb(0 0 0 / 18%);
}

.excel-cell {
  background: #ffffff;
}

.excel-sheet-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0.15rem;
  min-height: 2rem;
  padding: 0 0.35rem;
  overflow-x: auto;
  background: #e6e6e6;
  border-top: 1px solid #a6a6a6;
}

.excel-sheet-tab {
  margin-top: 0.2rem;
  padding: 0.28rem 0.85rem 0.38rem;
  border: 1px solid #a6a6a6;
  border-bottom: none;
  border-radius: 0.35rem 0.35rem 0 0;
  background: #d4d4d4;
  color: #1f1f1f;
  font: 400 12px/1.2 Calibri, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.excel-sheet-tab:hover {
  background: #e2e2e2;
}

.excel-sheet-tab--active {
  margin-top: 0;
  padding-top: 0.45rem;
  background: #ffffff;
  border-bottom: 1px solid #ffffff;
  position: relative;
  z-index: 1;
}

.excel-dialog-actions {
  padding: 0.85rem 1rem 1rem;
  background: #f3f3f3;
}

#tab-panel-filestore,
#tab-panel-analysis {
  padding: 0;
}

#tab-panel-filestore .filestore-tab-body,
#tab-panel-analysis .analysis-tab-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  gap: 0.75rem;
  padding: 1.25rem;
}

#tab-panel-filestore .win-client,
#tab-panel-analysis .win-client {
  --win-border: #3d3d3d;
  --win-border-light: #5a5a5a;
  --win-client-bg: #1a1a1a;
  --win-toolbar-bg: #2b2b2b;
  --win-status-bg: #1f1f1f;
  --win-list-bg: #191919;
  --win-list-header: #2a2a2a;
  --win-selection: #3a96dd;
  --win-selection-text: #ffffff;
  --win-hover: rgba(255, 255, 255, 0.06);

  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--win-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--win-client-bg);
  font-family: "Segoe UI", system-ui, sans-serif;
}

#tab-panel-filestore .filestore-busy-overlay {
  border-radius: 0;
  background: rgba(0, 0, 0, 0.35);
}

.filestore-busy-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 12, 0.45);
  border-radius: inherit;
  pointer-events: auto;
}

.filestore-busy-overlay.hidden {
  display: none;
}

.filestore-busy-message {
  margin: 0;
  max-width: min(24rem, 90%);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  word-break: break-word;
}

.filestore-clock {
  position: relative;
  width: 3rem;
  height: 3rem;
}

.filestore-clock-face {
  position: absolute;
  inset: 0;
  border: 2px solid var(--text);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.filestore-clock-face::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.35rem;
  height: 0.35rem;
  margin: -0.175rem 0 0 -0.175rem;
  border-radius: 50%;
  background: var(--text);
}

.filestore-clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  background: var(--text);
  border-radius: 1px;
}

.filestore-clock-hand-hour {
  width: 0.18rem;
  height: 0.85rem;
  margin-left: -0.09rem;
  animation: filestore-clock-hand-hour 4s linear infinite;
}

.filestore-clock-hand-minute {
  width: 0.12rem;
  height: 1.15rem;
  margin-left: -0.06rem;
  animation: filestore-clock-hand-minute 1.2s linear infinite;
}

@keyframes filestore-clock-hand-hour {
  to {
    transform: rotate(360deg);
  }
}

@keyframes filestore-clock-hand-minute {
  to {
    transform: rotate(360deg);
  }
}

#tab-panel-filestore .file-manager,
#tab-panel-analysis .file-manager {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--win-client-bg);
}

#tab-panel-filestore .file-manager-toolbar,
#tab-panel-analysis .file-manager-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.45rem 0.55rem;
  border-top: 1px solid #111;
  border-bottom: 0;
  background: var(--win-toolbar-bg);
}

#tab-panel-filestore .file-manager-toolbar-start,
#tab-panel-analysis .file-manager-toolbar-start {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

#tab-panel-filestore .file-manager-search {
  flex: 1;
  min-width: 0;
}

#tab-panel-filestore .filestore-hint-wrap--search {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 20rem;
}

#tab-panel-filestore .filestore-hint-wrap {
  position: relative;
  display: inline-flex;
}

#tab-panel-filestore .filestore-hint-wrap .win-command-btn:disabled {
  pointer-events: none;
}

#tab-panel-filestore .filestore-command-wrap {
  position: relative;
  display: inline-flex;
}

#tab-panel-filestore .filestore-command-wrap .win-command-btn:disabled {
  pointer-events: none;
}

#tab-panel-filestore .filestore-command-hint {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.4rem);
  z-index: 1200;
  width: max-content;
  max-width: min(100vw - 2rem, 16rem);
  padding: 0.35rem 0.55rem;
  border: 1px solid #3d3d3d;
  border-radius: 2px;
  background: #2b2b2b;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  color: #f3f3f3;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 120ms ease, visibility 120ms ease;
}

#tab-panel-filestore .filestore-command-wrap--hint:hover .filestore-command-hint,
#tab-panel-filestore .filestore-hint-wrap:hover .filestore-command-hint {
  visibility: visible;
  opacity: 1;
}

#tab-panel-filestore .file-manager-actions,
#tab-panel-analysis .file-manager-actions {
  flex-shrink: 0;
}

#tab-panel-filestore .file-manager-search-input {
  min-height: 28px;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--win-border-light);
  border-radius: 2px;
  background: #1c1c1c;
  color: #f3f3f3;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
}

#tab-panel-filestore .file-manager-search-input:focus {
  outline: 1px solid #60cdff;
  outline-offset: -1px;
  border-color: #60cdff;
}

#tab-panel-filestore,
#tab-panel-analysis,
#report-subtab-panel-interactive,
#file-preview-dialog,
#tab-panel-run,
.excel-chart-panel,
.excel-treemap-panel,
.excel-bubble-panel {
  --win-command-btn-width: 5.1875rem;
}

#tab-panel-filestore .win-command-btn,
#tab-panel-analysis .win-command-btn,
#report-subtab-panel-interactive .win-command-btn,
#file-preview-dialog .win-command-btn,
#results-not-run-dialog .win-command-btn,
#tab-panel-run .win-command-btn,
.excel-chart-panel .win-command-btn,
.excel-treemap-panel .win-command-btn,
.excel-bubble-panel .win-command-btn {
  box-sizing: border-box;
  width: var(--win-command-btn-width);
  min-width: var(--win-command-btn-width);
  min-height: 28px;
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
  box-shadow: none;
  text-align: center;
}

#tab-panel-run .win-command-btn {
  width: auto;
}

#login-dialog {
  z-index: 1500;
}

#login-form {
  width: min(100%, 28rem);
}

#login-dialog .login-dialog-header {
  align-items: center;
  gap: 0.75rem;
}

#login-dialog .login-dialog-header .app-title-bar-start {
  flex: 1;
  min-width: 0;
}

#login-dialog .login-dialog-header .app-title-bar-label {
  font-size: 1.125rem;
}

#login-dialog .login-dialog-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

#login-dialog .login-build-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-soft);
  line-height: 1.2;
}

#login-form .field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

#login-form .field > span {
  justify-self: start;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
}

#login-form .field .password-input-wrap {
  width: 100%;
  min-width: 0;
}

#login-dialog .field input {
  box-sizing: border-box;
  min-height: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.2;
}

#login-dialog .field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

#login-dialog .password-input-wrap input {
  padding-right: 2.75rem;
}

#login-dialog .password-toggle {
  right: 0.3rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 2px;
}

#login-dialog .password-toggle:hover {
  color: #f3f3f3;
  background: rgba(255, 255, 255, 0.08);
}

#tab-panel-filestore .win-command-btn.btn-primary,
#tab-panel-analysis .win-command-btn.btn-primary,
#report-subtab-panel-interactive .win-command-btn.btn-primary,
#results-not-run-dialog .win-command-btn.btn-primary,
.excel-chart-panel .win-command-btn.btn-primary,
.excel-treemap-panel .win-command-btn.btn-primary,
.excel-bubble-panel .win-command-btn.btn-primary {
  border: 1px solid #005a9e;
  background: linear-gradient(180deg, #0078d4 0%, #006cbe 100%);
}

#tab-panel-filestore .win-command-btn.btn-primary:hover:not(:disabled),
#tab-panel-analysis .win-command-btn.btn-primary:hover:not(:disabled),
#report-subtab-panel-interactive .win-command-btn.btn-primary:hover:not(:disabled),
#results-not-run-dialog .win-command-btn.btn-primary:hover:not(:disabled),
.excel-chart-panel .win-command-btn.btn-primary:hover:not(:disabled),
.excel-treemap-panel .win-command-btn.btn-primary:hover:not(:disabled),
.excel-bubble-panel .win-command-btn.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #1084d8 0%, #0078d4 100%);
}

#tab-panel-filestore .win-command-btn.btn-secondary,
#tab-panel-analysis .win-command-btn.btn-secondary,
#report-subtab-panel-interactive .win-command-btn.btn-secondary,
#file-preview-dialog .win-command-btn.btn-secondary,
#tab-panel-run .win-command-btn.btn-secondary,
.excel-chart-panel .win-command-btn.btn-secondary,
.excel-treemap-panel .win-command-btn.btn-secondary,
.excel-bubble-panel .win-command-btn.btn-secondary {
  border: 1px solid var(--win-border-light);
  background: #2d2d2d;
  color: #f3f3f3;
}

#tab-panel-filestore .win-command-btn.btn-secondary:hover:not(:disabled),
#tab-panel-analysis .win-command-btn.btn-secondary:hover:not(:disabled),
#report-subtab-panel-interactive .win-command-btn.btn-secondary:hover:not(:disabled),
#file-preview-dialog .win-command-btn.btn-secondary:hover:not(:disabled),
#tab-panel-run .win-command-btn.btn-secondary:hover:not(:disabled),
.excel-chart-panel .win-command-btn.btn-secondary:hover:not(:disabled),
.excel-treemap-panel .win-command-btn.btn-secondary:hover:not(:disabled),
.excel-bubble-panel .win-command-btn.btn-secondary:hover:not(:disabled) {
  background: #383838;
}

#tab-panel-filestore .win-command-btn.btn-danger,
#tab-panel-analysis .win-command-btn.btn-danger,
#report-subtab-panel-interactive .win-command-btn.btn-danger,
.excel-chart-panel .win-command-btn.btn-danger,
.excel-treemap-panel .win-command-btn.btn-danger,
.excel-bubble-panel .win-command-btn.btn-danger {
  border: 1px solid #8a3a3a;
  background: #2d2d2d;
  color: #ffb4b4;
}

#tab-panel-filestore .win-command-btn.btn-danger:hover:not(:disabled),
#tab-panel-analysis .win-command-btn.btn-danger:hover:not(:disabled),
#report-subtab-panel-interactive .win-command-btn.btn-danger:hover:not(:disabled),
.excel-chart-panel .win-command-btn.btn-danger:hover:not(:disabled),
.excel-treemap-panel .win-command-btn.btn-danger:hover:not(:disabled),
.excel-bubble-panel .win-command-btn.btn-danger:hover:not(:disabled) {
  background: #442828;
}

#tab-panel-filestore .win-command-btn:disabled,
#tab-panel-analysis .win-command-btn:disabled,
#report-subtab-panel-interactive .win-command-btn:disabled,
#file-preview-dialog .win-command-btn:disabled,
#login-dialog .win-command-btn:disabled,
#tab-panel-run .win-command-btn:disabled,
.excel-chart-panel .win-command-btn:disabled,
.excel-treemap-panel .win-command-btn:disabled,
.excel-bubble-panel .win-command-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#tab-panel-filestore .file-manager-box,
#tab-panel-analysis .file-manager-box {
  flex: 1;
  min-height: 0;
  max-height: none;
  background: var(--win-list-bg);
  display: flex;
  flex-direction: column;
}

#report-subtab-panel-interactive .file-manager-box {
  display: flex;
  flex-direction: column;
}

#tab-panel-filestore .file-manager-table thead th {
  height: 28px;
  padding: 0 0.75rem;
  background: var(--win-list-header);
  color: #d0d0d0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  border-bottom: 1px solid #111;
}

#tab-panel-filestore .file-manager-table tbody td {
  height: 22px;
  padding: 0 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #f3f3f3;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
}

#tab-panel-filestore .file-manager-table tbody tr:hover {
  background: var(--win-hover);
}

#tab-panel-filestore .file-manager-table tbody tr.selected {
  background: var(--win-selection);
  color: var(--win-selection-text);
}

#tab-panel-filestore .file-manager-table tbody tr.selected td:first-child {
  box-shadow: none;
}

#tab-panel-filestore .file-manager-table tbody tr.selected .file-type-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

#tab-panel-filestore .file-type-badge {
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  color: #c8c8c8;
  font-size: 0.6875rem;
}

#tab-panel-filestore .file-manager-empty,
#tab-panel-analysis .file-manager-empty {
  color: #c8c8c8;
  font-family: "Segoe UI", system-ui, sans-serif;
}

#tab-panel-filestore .file-manager-status {
  flex: 0 0 auto;
  padding: 0.2rem 0.65rem;
  border-top: 1px solid #111;
  background: var(--win-status-bg);
  color: #c8c8c8;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.75rem;
}

#tab-panel-filestore .file-manager #file-error {
  margin: 0;
  padding: 0.35rem 0.65rem 0.55rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
}

#tab-panel-filestore .file-selection-info strong {
  color: #f3f3f3;
}

#tab-panel-analysis .analysis-list-header {
  flex: 0 0 auto;
  width: 100%;
  height: 28px;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  border: 0;
  background: var(--win-list-header);
  color: #d0d0d0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #111;
}

#tab-panel-analysis .analysis-list-header.sortable {
  cursor: pointer;
}

#tab-panel-analysis .analysis-list-header.sortable:hover {
  color: #f3f3f3;
}

#tab-panel-analysis .analysis-list-header .th-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

#tab-panel-analysis .analysis-list-header .sort-ind {
  font-size: 0.65rem;
  color: #60cdff;
}

#tab-panel-analysis .analysis-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
}

#tab-panel-analysis .config-list-item {
  display: block;
  width: 100%;
  min-height: 22px;
  margin: 0;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: #f3f3f3;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
  line-height: 22px;
  text-align: left;
  cursor: pointer;
}

#tab-panel-analysis .config-list-item:hover {
  background: var(--win-hover);
}

#tab-panel-analysis .config-list-item.active {
  background: var(--win-selection);
  border-color: transparent;
  color: var(--win-selection-text);
}

#tab-panel-analysis .file-manager-box:has(.config-list-item) .file-manager-empty {
  display: none;
}

#tab-panel-analysis .file-manager-box:has(.config-list-item) .analysis-list-header {
  display: flex;
}

#tab-panel-analysis .file-manager-box:not(:has(.config-list-item)) .analysis-list-header {
  display: none;
}

#tab-panel-analysis .file-manager-box {
  overflow: hidden;
}

#tab-panel-analysis .file-manager-empty {
  inset: 28px 0 0;
}

#tab-panel-analysis .file-manager-box:not(:has(.config-list-item)) .file-manager-empty {
  inset: 0;
}

#tab-panel-analysis .file-manager-empty-title {
  color: #e8e8e8;
}

#tab-panel-analysis .file-manager-empty-hint {
  color: #c8c8c8;
}

.dialog {
  width: min(100%, 24rem);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(30, 30, 32, 0.86);
  backdrop-filter: var(--material-blur);
  -webkit-backdrop-filter: var(--material-blur);
  box-shadow: var(--shadow);
}

.dialog--wide {
  width: min(100%, 52rem);
  max-height: min(90vh, 40rem);
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
}

.dialog--wide .file-manager {
  flex: 1;
  min-height: 0;
  margin-top: 0;
}

.results-tab-body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  padding: 0;
  min-height: 0;
}

.results-tab-body > .subtab-panel-scroll {
  flex: 1;
  min-height: 0;
}

.results-tab-body > .subtab-panel-footer .files-tab-hint {
  margin-top: 0;
}

.results-tab-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#results-rendering-dialog {
  z-index: 1450;
}

#eye-search-dialog {
  z-index: 1460;
}

.eye-search-dialog {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: min(100%, 20rem);
  padding: 1.25rem 1.5rem;
}

.eye-search-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.eye-search-clock-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

#results-not-run-dialog {
  z-index: 1450;
  --win-command-btn-width: 5.1875rem;
}

.results-not-run-dialog {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 36rem);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.results-not-run-message {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.results-rendering-dialog {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: min(100%, 22rem);
  padding: 1.25rem 1.5rem;
}

.results-rendering-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.results-rendering-clock-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.results-log-output {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0.85rem 1rem;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.results-log-output.hidden {
  display: none;
}

.results-tabs-layout {
  flex: 1;
  width: 100%;
  min-height: 0;
}

.results-tabs-layout.hidden {
  display: none;
}

.results-tab-body .results-tabs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-content: start;
  gap: 0.65rem;
  width: 100%;
  min-height: 0;
  padding: 0.15rem 0.35rem 0.15rem 0;
}

.results-tab-body .results-tabs-grid:empty::before {
  content: "None available";
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

.results-tab-body .results-tabs-grid:empty {
  display: block;
  padding: 0.35rem 0;
}

.results-tab-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface-input);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.results-tab-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translateY(-1px);
}

.results-tab-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.results-tab-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
}

.results-tab-card-thumb--viz {
  background: #fff;
}

.results-tab-thumb-preview {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.results-tab-thumb-scaler {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;
}

.results-tab-thumb-plot {
  flex: 0 0 auto;
  overflow: hidden;
}

.results-tab-thumb-sheet-wrap {
  flex: 0 0 auto;
  overflow: hidden;
  box-sizing: border-box;
  background: #fff;
}

.results-tab-thumb-sheet-image {
  display: block;
  width: 100%;
  height: 100%;
}

.results-tab-thumb-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  background: linear-gradient(135deg, #f4f6f8 0%, #e8edf2 100%);
}

.results-tab-card-label {
  min-width: 0;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-inspector {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}

.results-inspector.hidden {
  display: none;
}

.results-inspector-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.results-inspector-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.results-inspector-view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface-input);
}

.results-inspector-view .excel-react-root,
.results-inspector-view .excel-workbook-panels,
.results-inspector-view .excel-sheet-panel,
.results-inspector-view .excel-grid-host,
.results-inspector-view .excel-chart-host,
.results-inspector-view .excel-treemap-host,
.results-inspector-view .excel-bubble-host {
  min-height: 100%;
}

.results-inspector-view .excel-grid-wrap {
  max-height: none;
}

.results-tab-thumb-svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.results-tab-card-thumb .results-tab-thumb-scaler svg {
  width: 100%;
  height: 100%;
}

.results-tab-card-thumb .excel-chart-footer,
.results-tab-card-thumb .excel-treemap-breadcrumb {
  display: none;
}

#tab-panel-results *,
#results-rendering-dialog .dialog {
  border-radius: 0 !important;
}

.zip-files-list {
  flex: 1;
  min-height: 0;
  max-height: min(50vh, 24rem);
  margin: 0;
  padding: 0.65rem 1rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-input);
  list-style: none;
}

.zip-files-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font: 0.9rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-word;
}

.zip-files-list li:last-child {
  border-bottom: 0;
}

.run-settings-json {
  flex: 1;
  min-height: 12rem;
  max-height: min(60vh, 28rem);
  margin: 0;
  padding: 0.85rem 1rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-input);
  color: var(--text);
  font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.field-hint,
.filestore-command-hint,
.system-tenors-field-hint,
.interactive-sectors-field-hint {
  display: none !important;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.dialog-message {
  margin: 0 0 var(--space-4);
  color: var(--text);
  line-height: 1.6;
  white-space: pre-line;
}

.icon-btn {
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-base);
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.field {
  display: grid;
  gap: 0.5rem;
  margin-bottom: var(--space-3);
}

.field span {
  font-size: 0.9rem;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--text);
  background: rgba(10, 132, 255, 0.1);
}

.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: block;
}

.password-toggle .icon-eye-off {
  display: none;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.field select:disabled,
.field input:disabled {
  color: var(--muted);
}

.actions-row {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.success {
  margin: 0 0 var(--space-3);
  color: var(--success);
  font-size: 0.92rem;
}

.field input[readonly] {
  color: var(--text);
  cursor: default;
}

.error {
  margin: 0 0 var(--space-3);
  color: var(--danger);
  font-size: 0.92rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

.dialog-backdrop {
  --win-command-btn-width: 6rem;
}

.dialog-backdrop .dialog-actions .btn,
.dialog-backdrop .dialog > .btn {
  box-sizing: border-box;
  width: auto;
  min-width: var(--win-command-btn-width);
  text-align: center;
  white-space: nowrap;
}

.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;
}

.file-manager {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.file-manager-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-3);
  border-top: 1px solid var(--border);
}

.file-manager-search {
  flex: 1 1 12rem;
  min-width: 10rem;
}

.file-manager-search-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  transition: border-color var(--transition-fast);
}

.file-manager-search-input:focus {
  outline: 2px solid rgba(10, 132, 255, 0.45);
  border-color: var(--accent);
}

.file-manager-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.file-manager-box {
  position: relative;
  min-height: 12rem;
  max-height: 20rem;
  overflow: auto;
  background: var(--surface-input);
}

.file-manager-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.file-manager-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  background: var(--surface-table);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.file-manager-table th.sortable {
  cursor: pointer;
}

.file-manager-table th.sortable:hover {
  color: var(--text);
}

.file-manager-table .th-type {
  width: 6rem;
}

.file-manager-table .th-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.file-manager-table .sort-ind {
  font-size: 0.65rem;
  color: var(--accent);
}

.file-manager-table tbody td {
  padding: 0 var(--space-3);
  height: 2.75rem;
  border-bottom: 1px solid rgba(35, 43, 54, 0.65);
  vertical-align: middle;
}

.file-manager-table tbody tr {
  cursor: grab;
  transition: background var(--transition-fast);
}

.file-manager-table tbody tr.is-dragging {
  opacity: 0.55;
}

.field input.drop-target {
  outline: 2px solid rgba(10, 132, 255, 0.45);
  border-color: var(--accent);
}

.file-manager-table tbody tr:hover {
  background: rgba(10, 132, 255, 0.08);
}

.file-manager-table tbody tr.selected {
  background: rgba(10, 132, 255, 0.16);
}

.file-manager-table tbody tr.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.file-manager-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-type-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(28, 28, 30, 0.95);
  color: var(--muted);
  border: 1px solid var(--border);
}

.file-manager-empty {
  position: absolute;
  inset: 2.5rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}

.file-manager-empty[hidden] {
  display: none;
}

.file-manager-empty-title {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.file-manager-empty-hint {
  margin: 0;
  font-size: 0.85rem;
}

.file-manager-status {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

#file-selection-info strong {
  color: var(--text);
}

/* Mobile layout (phones and narrow tablets) */
@media (max-width: 768px) {
  .page {
    min-height: 100dvh;
    padding: var(--space-3);
    padding-left: max(var(--space-3), env(safe-area-inset-left));
    padding-right: max(var(--space-3), env(safe-area-inset-right));
    padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
  }

  .welcome {
    min-height: 100dvh;
  }

  .app-title-bar {
    padding:
      max(var(--space-2), env(safe-area-inset-top))
      max(var(--space-3), env(safe-area-inset-right))
      var(--space-2)
      max(var(--space-3), env(safe-area-inset-left));
  }

  .app-title-bar-inner {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .app-title-bar-start > .app-title-bar-label {
    display: none;
  }

  .app-title-bar-end > .app-title-bar-label {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
  }

  .title-bar-filestore-btn-label,
  .exit-app-btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .title-bar-filestore-btn,
  .exit-app-btn {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.55rem;
    justify-content: center;
  }

  .tab-list {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-inline: max(0.75rem, env(safe-area-inset-left));
  }

  .tab-list::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: 0 0 auto;
    min-height: 2.75rem;
    padding: 0.55rem 0.9rem;
    white-space: nowrap;
  }

  .subtab-list {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .subtab-list::-webkit-scrollbar {
    display: none;
  }

  .subtab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .tab-panel {
    padding: var(--space-3);
  }

  #tab-panel-files,
  #tab-panel-results,
  #tab-panel-run {
    padding: 0;
  }

  #subtab-panel-configuration .config-details {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .files-tab-grid {
    min-width: 26rem;
  }

  .attribution-tab-layout,
  #report-subtab-panel-interactive .new-report-master-detail,
  #report-subtab-panel-interactive .interactive-report-content {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .attribution-tab-layout .fi-subtabs,
  .attribution-right-pane,
  .attribution-tree-panel,
  #report-subtab-panel-interactive .interactive-report-list-column,
  #report-subtab-panel-interactive .new-report-detail-pane {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .attribution-splitter,
  #report-subtab-panel-interactive .interactive-master-detail-splitter {
    display: none;
  }

  #report-subtab-panel-interactive .new-report-list-pane {
    max-height: min(40dvh, 16rem);
  }

  #fi-subtab-panel-carry {
    grid-template-columns: var(--fi-carry-label-width) minmax(0, 1fr);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fi-carry-row > .fi-attribution-header-row {
    grid-column: 1 / -1;
  }

  .fi-templates-panel {
    width: 100%;
    flex-wrap: wrap;
  }

  #report-subtab-panel-report > .field.report-field,
  #report-subtab-panel-report .reports-fieldset > .field.report-field,
  #report-subtab-panel-interactive .new-report-detail-fields > .field.report-field,
  #subtab-panel-intervals .intervals-tab-body > .field.report-field,
  .interactive-subtabs > .field.report-field,
  #login-form .field {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  #report-subtab-panel-report .report-dates-inline > #FT_STRING_START_DATE,
  #report-subtab-panel-report .report-dates-end-group > #FT_STRING_END_DATE {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }

  #tab-panel-filestore .file-manager-toolbar,
  #tab-panel-analysis .file-manager-toolbar,
  .interactive-report-toolbar,
  #tab-panel-run > .run-tab-status {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #tab-panel-filestore .file-manager-toolbar-start,
  #tab-panel-analysis .file-manager-toolbar-start,
  .interactive-report-toolbar-start {
    flex-wrap: wrap;
    width: 100%;
  }

  #tab-panel-filestore .file-manager-actions,
  #tab-panel-analysis .file-manager-actions {
    flex-wrap: wrap;
  }

  #tab-panel-filestore .file-manager-box {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #tab-panel-filestore .file-manager-table {
    min-width: 20rem;
  }

  .file-manager-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .dialog-backdrop {
    padding:
      var(--space-3)
      max(var(--space-3), env(safe-area-inset-right))
      max(var(--space-3), env(safe-area-inset-bottom))
      max(var(--space-3), env(safe-area-inset-left));
  }

  .dialog-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .dialog-actions .btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 6rem;
  }

  .results-not-run-dialog,
  .eye-search-dialog {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 24rem);
  }

  .results-not-run-message,
  .eye-search-title {
    white-space: normal;
  }

  .analysis-context-menu {
    min-width: 10rem;
  }

  .analysis-context-menu-item {
    min-height: 2.75rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .win-command-btn,
  .btn-compact {
    min-height: 2.75rem;
  }

  #login-dialog .field input,
  #login-form .field input,
  .field input[type="text"],
  .field input[type="password"],
  .field input[type="date"],
  .field select,
  .field textarea {
    font-size: 16px;
  }

  .attribution-force-tree-host {
    touch-action: pan-x pan-y;
  }
}
