:root {
  --navy-950: #071b33;
  --navy-900: #0b2748;
  --navy-800: #123b67;
  --blue-700: #175a96;
  --blue-600: #1d6fb8;
  --blue-100: #dcecff;
  --blue-50: #f0f7ff;
  --slate-900: #172334;
  --slate-700: #405168;
  --slate-600: #5b6b7f;
  --slate-500: #768397;
  --slate-300: #cbd5e1;
  --slate-200: #dde5ed;
  --slate-100: #edf2f7;
  --slate-50: #f7f9fc;
  --white: #ffffff;
  --green-700: #08704e;
  --green-100: #d9f6e9;
  --amber-700: #9a5b05;
  --amber-100: #fff0c7;
  --danger-700: #b42318;
  --danger-50: #fff1f0;
  --shadow-sm: 0 1px 2px rgba(10, 32, 59, 0.06);
  --shadow-md: 0 12px 32px rgba(10, 32, 59, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --header-height: 68px;
  --footer-height: 44px;
  --sidebar-width: 350px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 1180px;
  height: 100%;
}

body {
  overflow: hidden;
  color: var(--slate-900);
  background: var(--slate-100);
  font-family: "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(29, 111, 184, 0.26);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.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;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 15%, rgba(29, 111, 184, 0.26), transparent 34%),
    linear-gradient(145deg, var(--navy-950), #0e3158 62%, var(--navy-800));
}

.auth-card {
  width: min(100%, 460px);
  padding: 34px;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(2, 15, 30, 0.3);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--slate-200);
}

.auth-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.auth-brand span,
.auth-brand small {
  display: block;
}

.auth-brand span {
  color: var(--navy-900);
  font-size: 16px;
  font-weight: 800;
}

.auth-brand small {
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 12px;
}

.auth-copy {
  padding: 28px 0 22px;
}

.auth-copy h1 {
  margin: 0;
  color: var(--navy-950);
  font-size: 26px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.auth-copy p {
  margin: 12px 0 0;
  color: var(--slate-600);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: var(--slate-700);
  font-size: 12px;
  font-weight: 700;
}

.auth-form input {
  height: 48px;
  border: 1px solid var(--slate-300);
  border-radius: 9px;
  font-size: 15px;
}

.auth-form input:hover {
  border-color: #9db0c4;
}

.auth-code-input {
  text-align: center;
  font-size: 22px !important;
  font-weight: 750;
  letter-spacing: 0.35em;
}

.auth-code-recipient {
  margin-bottom: 4px;
  padding: 11px 12px;
  color: var(--slate-600);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  font-size: 12px;
}

.auth-code-recipient span,
.auth-code-recipient strong {
  display: block;
}

.auth-code-recipient strong {
  margin-top: 2px;
  color: var(--navy-900);
  overflow-wrap: anywhere;
}

.auth-link-instruction {
  margin: 4px 0 8px;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.6;
}

.auth-primary-button {
  min-height: 46px;
  margin-top: 4px;
  color: var(--white);
  background: var(--blue-700);
  border: 1px solid var(--blue-700);
  border-radius: 9px;
  font-weight: 750;
}

.auth-primary-button:hover:not(:disabled) {
  background: var(--navy-800);
  border-color: var(--navy-800);
}

.auth-primary-button:disabled,
.auth-link-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.auth-secondary-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
}

.auth-link-button {
  padding: 5px 0;
  color: var(--blue-700);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
}

.auth-link-button:hover:not(:disabled) {
  color: var(--navy-900);
  text-decoration: underline;
}

.auth-message {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--slate-600);
  font-size: 12px;
}

.auth-message[data-type="error"] {
  color: var(--danger-700);
}

.auth-message[data-type="success"] {
  color: var(--green-700);
}

.auth-help {
  margin: 18px 0 0;
  padding-top: 18px;
  color: var(--slate-500);
  border-top: 1px solid var(--slate-200);
  font-size: 11px;
  text-align: center;
}

.eyebrow,
.panel-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  color: var(--white);
  background: var(--navy-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark,
.welcome-mark {
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--blue-600);
  font-weight: 800;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  color: initial;
  background: transparent;
  font-size: 25px;
  object-fit: contain;
  box-shadow: none;
}

.brand h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand p {
  margin: 3px 0 0;
  color: #aebfd1;
  font-size: 12px;
}

.dataset-status {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #d7e3ef;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

#app-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.header-account {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-user-email {
  max-width: 190px;
  color: #d7e3ef;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  min-height: 34px;
  padding: 0 11px;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

.logout-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.46);
}

.workspace {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  overflow: hidden;
}

.app-footer {
  height: var(--footer-height);
  flex: 0 0 var(--footer-height);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(280px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  color: var(--slate-600);
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  font-size: 11px;
}

.footer-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-brand img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.footer-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-links a {
  color: var(--slate-600);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--blue-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-version {
  justify-self: end;
  color: var(--slate-500);
  font-variant-numeric: tabular-nums;
}

.fund-sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-right: 1px solid var(--slate-200);
}

.header-search-tools {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.header-search {
  width: min(38vw, 440px);
  min-width: 280px;
}

.header-search input {
  height: 40px;
  color: var(--slate-900);
  background: var(--white);
  border-color: rgba(255, 255, 255, 0.36);
}

.header-search input::placeholder {
  color: var(--slate-500);
}

.filter-open-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.filter-open-button:hover {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.42);
}

.filter-button-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter-button-count {
  min-width: 21px;
  padding: 2px 6px;
  color: var(--navy-900);
  background: var(--white);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.field-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-group label,
.field-group legend {
  display: block;
  margin-bottom: 6px;
  color: var(--slate-700);
  font-size: 12px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  color: var(--slate-900);
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input::placeholder {
  color: var(--slate-500);
}

input:hover,
select:hover {
  border-color: #9fb0c2;
}

input:focus,
select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(29, 111, 184, 0.11);
  outline: none;
}

.control-with-icon {
  position: relative;
}

.control-with-icon input {
  padding-left: 38px;
}

.control-icon {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 12px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--slate-500);
  border-radius: 50%;
  pointer-events: none;
}

.control-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  right: -5px;
  bottom: -2px;
  background: var(--slate-500);
  border-radius: 2px;
  transform: rotate(45deg);
}

.select-control {
  position: relative;
  min-width: 0;
}

.select-control::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--slate-600);
  border-bottom: 2px solid var(--slate-600);
  transform: rotate(45deg);
  pointer-events: none;
}

.select-control select {
  padding-right: 36px;
  appearance: none;
  text-overflow: ellipsis;
}

.filter-drawer {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--slate-50);
  overflow: hidden;
}

.filter-drawer summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  color: var(--navy-800);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.filter-drawer summary::-webkit-details-marker {
  display: none;
}

.summary-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--slate-600);
  border-bottom: 2px solid var(--slate-600);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.filter-drawer[open] .summary-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.filter-drawer-content {
  display: grid;
  gap: 12px;
  padding: 13px;
  border-top: 1px solid var(--slate-200);
  background: var(--white);
}

.exposure-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 8px;
}

.exposure-filter-row:has(.exposure-add-button:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) 78px 40px;
}

.exposure-add-button {
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--white);
  background: var(--blue-700);
  border: 1px solid var(--blue-700);
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
}

.exposure-add-button:hover:not(:disabled) {
  background: var(--navy-800);
  border-color: var(--navy-800);
}

.exposure-add-button:disabled {
  color: var(--slate-500);
  background: var(--slate-100);
  border-color: var(--slate-200);
  cursor: not-allowed;
}

.exposure-detail-fields {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.exposure-detail-fields select:disabled {
  color: var(--slate-500);
  background: var(--slate-50);
  cursor: not-allowed;
}

.field-hint {
  display: block;
  margin-top: 7px;
  color: var(--slate-500);
  font-size: 10px;
  line-height: 1.35;
}

.exposure-rule-list {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.exposure-rule-list:empty {
  display: none;
}

.exposure-rule {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 7px 7px 10px;
  color: var(--navy-800);
  background: var(--blue-50);
  border: 1px solid #c7def4;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
}

.exposure-rule > span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exposure-rule button {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--blue-700);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 16px;
  line-height: 1;
}

.exposure-rule button:hover {
  background: var(--blue-100);
}

.percent-control {
  position: relative;
}

.percent-control input {
  padding-right: 28px;
  text-align: right;
}

.percent-control span {
  position: absolute;
  top: 10px;
  right: 11px;
  color: var(--slate-600);
}


.filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
}

.filter-count {
  color: var(--slate-500);
  font-size: 11px;
  font-weight: 600;
}

.filter-count.active {
  color: var(--blue-700);
}


.text-button {
  padding: 4px 0;
  color: var(--blue-700);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
}

.text-button:hover:not(:disabled) {
  color: var(--navy-900);
  text-decoration: underline;
}

.text-button:disabled {
  color: var(--slate-300);
  cursor: default;
}

/* Filter dialog */
.filter-dialog {
  width: min(780px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  padding: 0;
  color: var(--slate-900);
  background: var(--white);
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(7, 27, 51, 0.28);
  overflow: hidden;
}

.filter-dialog::backdrop {
  background: rgba(7, 27, 51, 0.54);
  backdrop-filter: blur(2px);
}

.filter-dialog-shell {
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.filter-dialog-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--slate-200);
}

.filter-dialog-header h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 24px;
  line-height: 1.2;
}

.filter-dialog-header p {
  margin: 5px 0 0;
  color: var(--slate-600);
  font-size: 13px;
}

.dialog-close-button {
  flex: 0 0 auto;
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--slate-600);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 50%;
  font-size: 0;
}

.dialog-close-button::before,
.dialog-close-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}

.dialog-close-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.dialog-close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.dialog-close-button:hover {
  color: var(--navy-900);
  background: var(--slate-100);
}

.filter-dialog-body {
  min-height: 0;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 16px;
  padding: 20px 24px 24px;
  overflow-y: auto;
}

.filter-section {
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
}

.filter-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.filter-section-heading h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 15px;
}

.filter-section-heading p {
  margin: 3px 0 0;
  color: var(--slate-500);
  font-size: 11px;
}

.logic-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid #c7def4;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.logic-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  cursor: pointer;
  color: var(--slate-500);
  background: var(--slate-100);
  border-color: var(--slate-300);
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.logic-toggle:hover {
  background: var(--blue-50);
  border-color: var(--blue-600);
}

.logic-option {
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1;
}

.logic-option.is-active {
  color: var(--blue-700);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.logic-option:not(.is-active) {
  color: var(--slate-500);
  font-weight: 700;
}

.picker-control {
  position: relative;
}

.picker-control input {
  padding-left: 38px;
}

.picker-results {
  display: grid;
  max-height: 224px;
  margin-top: 6px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow-y: auto;
}

.picker-results:empty {
  display: none;
}

.picker-result,
.picker-message {
  min-width: 0;
  padding: 10px 12px;
}

.picker-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: var(--slate-900);
  background: var(--white);
  border: 0;
  border-bottom: 1px solid var(--slate-100);
  text-align: left;
}

.picker-result:last-child {
  border-bottom: 0;
}

.picker-result:hover,
.picker-result:focus-visible {
  background: var(--blue-50);
}

.picker-result-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.picker-result-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-result-copy small,
.picker-message {
  color: var(--slate-500);
  font-size: 10px;
}

.picker-result-action {
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 700;
}

.selection-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.selection-chips:empty,
.category-rule-list:empty {
  display: none;
}

.selection-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 6px 7px 6px 10px;
  color: var(--navy-800);
  background: var(--blue-50);
  border: 1px solid #c7def4;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.selection-chips.detailed .selection-chip {
  border-radius: 8px;
}

.selection-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-chip button,
.category-rule-remove {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  color: var(--blue-700);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
}

.selection-chip button:hover,
.category-rule-remove:hover {
  background: var(--blue-100);
}

.category-rule-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.category-rule-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 28px;
  align-items: center;
  gap: 10px;
  padding: 9px 9px 9px 11px;
  background: var(--blue-50);
  border: 1px solid #c7def4;
  border-radius: 8px;
}

.category-rule-label {
  min-width: 0;
}

.category-rule-label strong,
.category-rule-label small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-rule-label strong {
  color: var(--navy-800);
  font-size: 11px;
}

.category-rule-label small {
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 9px;
}

.rule-percent-control {
  position: relative;
}

.rule-percent-control input {
  height: 34px;
  padding: 0 26px 0 8px;
  text-align: right;
}

.rule-percent-control span {
  position: absolute;
  top: 7px;
  right: 9px;
  color: var(--slate-500);
  font-size: 11px;
  pointer-events: none;
}

.dialog-advanced {
  min-height: 58px;
  background: var(--blue-50);
  border: 1px solid #bfd7ec;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.dialog-advanced summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  color: var(--navy-800);
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease;
}

.dialog-advanced summary:hover {
  background: rgba(255, 255, 255, 0.45);
}

.dialog-advanced summary::-webkit-details-marker {
  display: none;
}

.dialog-advanced summary strong,
.dialog-advanced summary small {
  display: block;
}

.dialog-advanced summary strong {
  font-size: 13px;
}

.dialog-advanced summary small {
  margin-top: 2px;
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 500;
}

.dialog-advanced[open] .summary-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.dialog-advanced-content {
  padding: 15px 16px 16px;
  background: var(--white);
  border-top: 1px solid var(--slate-200);
}

.label-with-default {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.label-with-default span {
  color: var(--green-700);
  font-size: 10px;
  font-weight: 700;
}

.filter-dialog-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 24px;
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  box-shadow: 0 -8px 20px rgba(10, 32, 59, 0.04);
}

.dialog-reset-button {
  padding: 8px 0;
}

.dialog-footer-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.primary-button,
.secondary-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.primary-button {
  color: var(--white);
  background: var(--blue-700);
  border: 1px solid var(--blue-700);
}

.primary-button:hover {
  background: var(--navy-800);
  border-color: var(--navy-800);
}

.secondary-button {
  color: var(--navy-800);
  background: var(--white);
  border: 1px solid var(--slate-300);
}

.secondary-button:hover {
  background: var(--slate-50);
}

.results-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px 10px;
  color: var(--slate-600);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.results-heading strong {
  color: var(--slate-700);
  font-size: 11px;
}

.fund-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 16px;
  scrollbar-gutter: stable;
}

.fund-item {
  position: relative;
  width: 100%;
  display: block;
  padding: 13px 14px;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.fund-item + .fund-item {
  margin-top: 3px;
}

.fund-item:hover {
  background: var(--slate-50);
  border-color: var(--slate-200);
}

.fund-item.active {
  background: var(--blue-50);
  border-color: #b9d8f7;
}

.fund-name {
  display: block;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fund-item.active .fund-name {
  color: var(--navy-800);
}

.fund-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: var(--slate-500);
  font-size: 11px;
}

.fund-isin {
  overflow: hidden;
  font-family: Consolas, "SFMono-Regular", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fund-holdings-count {
  flex: 0 0 auto;
}

.empty-state {
  margin: 10px;
  padding: 28px 18px;
  color: var(--slate-600);
  background: var(--slate-50);
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius-md);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: var(--slate-900);
}

.empty-state.error {
  color: var(--danger-700);
  background: var(--danger-50);
  border-color: #f4b7b2;
}

.detail-area {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--slate-100);
}

.welcome-screen {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 48px;
}

.welcome-content {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.welcome-mark {
  display: block;
  width: 76px;
  height: 76px;
  color: initial;
  background: transparent;
  object-fit: contain;
}

.welcome-content h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.detail-content {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 24px;
}

.fund-profile {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-main {
  min-width: 0;
}

.profile-main h2 {
  margin: 0;
  overflow: hidden;
  color: var(--navy-900);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin: 13px 0 0;
}

.profile-meta div {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.profile-meta div:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 3px;
  right: -12px;
  width: 1px;
  height: 14px;
  background: var(--slate-200);
}

.profile-meta dt {
  color: var(--slate-500);
  font-size: 11px;
  font-weight: 600;
}

.profile-meta dd {
  margin: 0;
  color: var(--slate-700);
  font-size: 12px;
  font-weight: 700;
}

.profile-stats {
  width: 408px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.stat-card {
  position: relative;
  min-width: 0;
  min-height: 72px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  align-items: center;
  padding: 11px 7px 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
  border: 1px solid #d7e2ed;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-card dt {
  max-width: 100%;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-card dd {
  max-width: 100%;
  margin: 0 0 5px;
  overflow: hidden;
  color: var(--navy-900);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  margin: 14px 0 10px;
  padding: 4px;
  background: #dfe6ee;
  border-radius: var(--radius-md);
  align-self: flex-start;
}

.detail-tab {
  min-width: 190px;
  height: 38px;
  padding: 0 16px;
  color: var(--slate-600);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}

.detail-tab:hover {
  color: var(--navy-900);
}

.detail-tab.active {
  color: var(--navy-900);
  background: var(--white);
  box-shadow: 0 1px 4px rgba(10, 32, 59, 0.12);
}

.detail-grid {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 12px;
}

.panel,
.info-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.holdings-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  flex: 0 0 auto;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--slate-200);
}

.panel-header.compact {
  min-height: auto;
  padding: 16px 16px 10px;
  border-bottom: 0;
}

.panel-header h3,
.card-heading h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 16px;
  line-height: 1.25;
}

.panel-kicker {
  margin-bottom: 3px;
  font-size: 9px;
}

.table-search {
  width: min(300px, 35%);
}

.table-search input {
  height: 36px;
}

.table-wrapper {
  min-height: 0;
  flex: 1;
  overflow: auto;
  scrollbar-gutter: stable;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

thead {
  position: sticky;
  z-index: 2;
  top: 0;
}

th {
  height: 42px;
  padding: 0 12px;
  color: var(--slate-600);
  background: #f6f8fb;
  border-bottom: 1px solid var(--slate-200);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-align: left;
  text-transform: uppercase;
}

.sort-button {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: inherit;
  gap: 5px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
}

.sort-button:hover {
  color: var(--blue-700);
}

.sort-indicator {
  color: var(--blue-700);
  font-size: 10px;
}

td {
  height: 51px;
  padding: 8px 12px;
  color: var(--slate-700);
  background: var(--white);
  border-bottom: 1px solid var(--slate-100);
  font-size: 12px;
  vertical-align: middle;
}

tbody tr:hover td {
  background: var(--slate-50);
}

tbody tr.highlighted-row td {
  background: var(--blue-50);
}

tbody tr.search-highlighted-row td {
  background: #fff8e6;
}

tbody tr.search-highlighted-row td:first-child {
  box-shadow: inset 3px 0 0 #e4a11b;
}

tbody tr.search-highlighted-row:hover td {
  background: #fff3cf;
}

.col-number {
  width: 44px;
  color: var(--slate-500);
  text-align: center;
}

.col-isin {
  width: 128px;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11px;
}

.col-name {
  width: 29%;
  overflow: hidden;
  color: var(--slate-900);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-category {
  width: 32%;
}

.col-weight {
  width: 112px;
  text-align: right;
}

.col-weight .sort-button {
  justify-content: flex-end;
}

.category-tag {
  display: block;
  overflow: hidden;
  padding: 4px 8px;
  color: var(--navy-800);
  background: var(--blue-50);
  border: 1px solid #d4e7f8;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-tag.na {
  color: var(--amber-700);
  background: var(--amber-100);
  border-color: #f5d487;
}

.weight-bar-bg,
.exposure-bar-bg {
  overflow: hidden;
  background: var(--slate-100);
  border-radius: 999px;
}

.weight-bar-bg {
  height: 4px;
  margin-top: 5px;
}

.weight-bar,
.exposure-bar {
  height: 100%;
  background: var(--blue-600);
  border-radius: inherit;
}

.exposure-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-hint {
  margin: 0;
  padding: 0 16px 12px;
  color: var(--slate-500);
  font-size: 10px;
  line-height: 1.4;
  border-bottom: 1px solid var(--slate-200);
}

.exposure-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.exposure-item {
  width: 100%;
  display: block;
  padding: 10px;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
}

.exposure-item:hover {
  background: var(--slate-50);
}

.exposure-item.active {
  background: var(--blue-50);
  border-color: #b9d8f7;
}

.exposure-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.exposure-name {
  min-width: 0;
  overflow: hidden;
  color: var(--slate-700);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exposure-item.active .exposure-name {
  color: var(--navy-800);
}

.exposure-val {
  flex: 0 0 auto;
  color: var(--navy-800);
  font-size: 11px;
  font-weight: 800;
}

.exposure-bar-bg {
  height: 5px;
}

.stammdaten-panel {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.stammdaten-grid {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(460px, 1.18fr);
  gap: 12px;
}

.info-card {
  min-width: 0;
  padding: 22px;
}

.card-heading {
  padding-bottom: 17px;
  border-bottom: 1px solid var(--slate-200);
}

.info-list {
  margin: 0;
}

.info-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(160px, 1.1fr);
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--slate-100);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row dt {
  color: var(--slate-600);
  font-size: 12px;
}

.info-row dd {
  margin: 0;
  color: var(--slate-900);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.rating-stars {
  color: #e99612 !important;
  font-size: 17px !important;
  letter-spacing: 1px;
}

.sfdr-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: var(--slate-700);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 750;
}

.sfdr-badge.article-8,
.sfdr-badge.article-9 {
  color: var(--green-700);
  background: var(--green-100);
  border-color: #a7e6ca;
}

.sfdr-badge.no-article {
  color: var(--amber-700);
  background: var(--amber-100);
  border-color: #f2d080;
}

.contact-card {
  display: flex;
  flex-direction: column;
}

.company-name {
  margin-top: 22px;
  color: var(--navy-900);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.company-brand {
  min-height: 20px;
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 12px;
}

.contact-address {
  margin: 20px 0 15px;
  color: var(--slate-700);
  font-size: 13px;
  font-style: normal;
  line-height: 1.7;
  white-space: pre-line;
}

.contact-lines {
  display: grid;
  gap: 6px;
  padding: 13px 0;
  border-top: 1px solid var(--slate-100);
}

.contact-detail {
  min-height: 20px;
  color: var(--slate-700);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 9px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--slate-200);
}

.contact-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: var(--navy-800);
  background: var(--white);
  border: 1px solid #9eb8d1;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.contact-action:hover {
  color: var(--white);
  background: var(--navy-800);
  border-color: var(--navy-800);
}

.contact-action.primary {
  color: var(--white);
  background: var(--blue-700);
  border-color: var(--blue-700);
}

.contact-action.primary:hover {
  background: var(--navy-800);
  border-color: var(--navy-800);
}

.contact-action.disabled {
  color: var(--slate-400, #9ca9b8);
  background: var(--slate-50);
  border-color: var(--slate-200);
  cursor: not-allowed;
  pointer-events: none;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #c2ccd7;
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #9eacbb;
  border: 3px solid transparent;
  background-clip: padding-box;
}

@media (min-width: 1600px) {
  :root {
    --sidebar-width: 370px;
  }

  .detail-content {
    padding: 26px 30px 30px;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 760px) {
  body.auth-visible {
    min-width: 0;
  }

  .auth-screen {
    align-items: start;
    padding: 18px;
  }

  .auth-card {
    margin-top: 5vh;
    padding: 25px 22px;
  }

  .auth-copy h1 {
    font-size: 23px;
  }

  .filter-dialog {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .filter-dialog-shell {
    height: 100vh;
    max-height: 100vh;
  }

  .filter-dialog-header,
  .filter-dialog-body,
  .filter-dialog-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .filter-dialog-header p {
    max-width: 460px;
  }

  .category-rule-item {
    grid-template-columns: minmax(0, 1fr) 96px 28px;
  }

  .filter-dialog-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .dialog-reset-button {
    align-self: center;
  }
}
