:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #111827;
  background: #f7f8fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #f7f8fa;
  --surface: #ffffff;
  --surface-muted: #f1f4f6;
  --border: #e1e6ea;
  --border-strong: #c7d0d8;
  --text: #111827;
  --muted: #64717d;
  --navy: #22313d;
  --blue: #166aa3;
  --blue-soft: #eaf4fb;
  --green: #0f6b4f;
  --green-soft: #e2f3eb;
  --amber: #956400;
  --amber-soft: #fff2c8;
  --red: #b13a3a;
  --red-soft: #fbe6e6;
  --shadow: 0 7px 22px rgba(17, 24, 39, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

a {
  color: inherit;
}

.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;
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  min-height: 64px;
  padding: 0 clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  text-decoration: none;
}

.app-brand__mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #b8d9ec;
  border-radius: 6px;
  color: #ffffff;
  background: var(--blue);
  font-size: 0.92rem;
  font-weight: 800;
}

.app-brand > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.app-brand strong {
  font-size: 0.91rem;
}

.app-brand small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  align-self: stretch;
  gap: 4px;
}

.primary-nav a {
  display: flex;
  align-items: center;
  padding: 0 15px;
  border-bottom: 3px solid transparent;
  color: #52616d;
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a.router-link-exact-active {
  border-bottom-color: var(--blue);
  color: var(--text);
}

.account-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.account-name {
  max-width: 160px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  width: min(100% - 36px, 1560px);
  margin: 0 auto;
  padding: 32px 0 56px;
}

.page-heading,
.security-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading h1,
.security-heading h1 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.page-heading__meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.button--primary {
  border-color: #12598e;
  color: #ffffff;
  background: var(--blue);
}

.button--primary:hover {
  background: #12598e;
}

.button--secondary {
  border-color: var(--border-strong);
  color: #273744;
  background: #ffffff;
}

.button--danger {
  border-color: #e1b6b6;
  color: var(--red);
  background: #ffffff;
}

.button--danger:hover {
  background: var(--red-soft);
}

.button--compact {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.button--quiet {
  min-height: 32px;
  padding: 0 11px;
  border-color: var(--border-strong);
  color: #33414d;
  background: transparent;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  min-width: 0;
  padding: 17px 20px;
  border-right: 1px solid var(--border);
}

.metric:last-child {
  border-right: 0;
}

.metric span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 650;
}

.metric strong {
  font-size: 1.55rem;
  line-height: 1;
}

.metric--positive strong {
  color: var(--green);
}

.data-section,
.history-section,
.sector-section {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.data-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.search-form {
  display: flex;
  width: min(100%, 520px);
  gap: 8px;
}

.search-form input,
.select-field select,
.date-control input {
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

.search-form input {
  width: 100%;
  padding: 0 12px;
}

.search-form input:focus,
.select-field select:focus,
.date-control input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.12);
}

.select-field,
.date-control {
  display: grid;
  gap: 5px;
}

.select-field span,
.date-control span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.select-field select,
.date-control input {
  min-width: 155px;
  padding: 0 10px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  white-space: nowrap;
}

th,
td {
  height: 49px;
  padding: 7px 11px;
  border-bottom: 1px solid #e4e9ed;
  text-align: left;
  vertical-align: middle;
}

th {
  height: 40px;
  color: #5d6b77;
  background: #f7f9fa;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f8fbfd;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.numeric {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rank-cell {
  color: var(--muted);
  font-weight: 700;
}

.symbol-link {
  color: #075fa4;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.symbol-link:hover {
  text-decoration: underline;
}

.company-cell {
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-cell span,
.company-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-cell small,
.mobile-company {
  margin-top: 3px;
  color: #7c8993;
  font-size: 0.66rem;
}

.mobile-company {
  display: none;
}

.price-cell {
  color: #202b34;
  font-weight: 700;
}

.quant-score,
.grade-badge {
  display: inline-grid;
  min-width: 32px;
  height: 23px;
  place-items: center;
  border-radius: 3px;
  color: #ffffff;
  font-size: 0.69rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.quant-score {
  min-width: 38px;
  background: #365465;
}

.quant-score--strong-buy {
  background: #0d3f1d;
}

.quant-score--buy {
  background: #397b3d;
}

.quant-score--hold {
  color: #3f3500;
  background: #e8c82b;
}

.quant-score--sell {
  background: #c94343;
}

.quant-score--strong-sell {
  background: #7f2424;
}

.quant-score--not-covered,
.rating-label--not-covered {
  color: #5f6971;
  background: #e2e6e9;
}

.status-cell {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grade-badge--excellent {
  background: #164f2f;
}

.grade-badge--good {
  background: #397b3d;
}

.grade-badge--average {
  color: #3d3300;
  background: #f2d735;
}

.grade-badge--weak {
  background: #c94343;
}

.grade-badge--missing {
  min-width: 38px;
  color: #6e7880;
  background: #e2e6e9;
}

.table-message {
  height: 160px;
  color: var(--muted);
  text-align: center;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
}

.pagination {
  display: flex;
  gap: 7px;
}

.pagination .button {
  min-height: 31px;
  padding: 0 10px;
  font-size: 0.7rem;
}

.notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #43515c;
  background: #ffffff;
  font-size: 0.84rem;
}

.notice--success {
  border-color: #a8d6bd;
  color: #155737;
  background: var(--green-soft);
}

.notice--error {
  border-color: #e1b6b6;
  color: #8f2929;
  background: var(--red-soft);
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.import-panel {
  display: grid;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.source-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.source-heading h2,
.section-title h2 {
  margin: 0;
  font-size: 1.05rem;
}

.source-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.source-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 850;
}

.source-mark--tv {
  background: #285d8a;
}

.source-mark--zacks {
  background: #347147;
}

.file-field {
  display: grid;
  min-height: 84px;
  padding: 13px;
  place-items: center;
  border: 1px dashed #aebbc5;
  border-radius: 6px;
  color: #4d5b66;
  background: #f8fafb;
  font-size: 0.78rem;
  text-align: center;
}

.file-field input {
  width: min(100%, 300px);
  margin-top: 9px;
  font-size: 0.72rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.section-title .eyebrow {
  margin-bottom: 4px;
}

.source-label {
  text-transform: capitalize;
}

.filename-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill,
.rating-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 850;
  text-transform: uppercase;
}

.status-pill--completed {
  color: var(--green);
  background: var(--green-soft);
}

.status-pill--processing {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-pill--failed {
  color: var(--red);
  background: var(--red-soft);
}

.security-heading {
  align-items: flex-end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.back-link {
  color: var(--blue);
  font-size: 0.77rem;
  font-weight: 700;
  text-decoration: none;
}

.security-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.security-title h1 {
  margin: 0;
  font-size: 2rem;
}

.security-title strong,
.security-title span {
  display: block;
}

.security-title strong {
  margin-bottom: 3px;
  font-size: 0.95rem;
}

.security-title span,
.security-price span {
  color: var(--muted);
  font-size: 0.74rem;
}

.security-price {
  text-align: right;
}

.security-price strong,
.security-price span {
  display: block;
}

.security-price strong {
  margin-bottom: 4px;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.rating-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(380px, 1.45fr) minmax(220px, 0.8fr);
  gap: 18px;
  margin-bottom: 24px;
}

.quant-panel,
.factor-panel,
.market-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.quant-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.quant-panel > span:first-child {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.quant-panel > strong {
  margin: 6px 0;
  font-size: 2.3rem;
  font-variant-numeric: tabular-nums;
}

.rating-label {
  color: #ffffff;
  background: #516776;
}

.rating-label--strong-buy {
  background: #0d3f1d;
}

.rating-label--buy {
  background: #397b3d;
}

.rating-label--hold {
  color: #3d3300;
  background: #e3c82e;
}

.rating-label--sell {
  background: #c94343;
}

.rating-label--strong-sell {
  background: #7f2424;
}

.rating-label--small {
  min-height: 21px;
  padding: 0 7px;
  font-size: 0.58rem;
}

.rating-label--status {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-scale {
  width: 100%;
  height: 6px;
  margin: 22px 0 9px;
  overflow: hidden;
  border-radius: 3px;
  background: #dce3e8;
}

.score-scale span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.quant-panel small {
  color: var(--muted);
  font-size: 0.68rem;
}

.eligibility-note {
  margin-top: 6px;
}

.factor-panel {
  padding: 13px 20px;
}

.factor-table {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, 46px);
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid #e5eaee;
  font-size: 0.74rem;
}

.factor-table:last-child {
  border-bottom: 0;
}

.factor-table > :not(:first-child) {
  justify-self: center;
}

.factor-table--head {
  min-height: 28px;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
}

.market-panel dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.market-panel dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  gap: 14px;
  border-bottom: 1px solid #e5eaee;
}

.market-panel dl div:last-child {
  border-bottom: 0;
}

.market-panel dt {
  color: var(--muted);
  font-size: 0.7rem;
}

.market-panel dd {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
}

.history-section {
  overflow: hidden;
}

.sector-section {
  margin-bottom: 24px;
  overflow: hidden;
}

.sample-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 4px;
  color: #45525d;
  background: var(--surface-muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.sector-table td:first-child {
  color: #34424e;
  font-weight: 700;
}

.advantage-cell {
  font-weight: 850;
}

.advantage-cell--positive {
  color: var(--green);
}

.advantage-cell--negative {
  color: var(--red);
}

.advantage-cell--neutral {
  color: var(--muted);
}

.chart-wrap {
  padding: 14px 20px 7px;
  border-bottom: 1px solid var(--border);
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.range-tabs {
  display: flex;
  gap: 8px;
}

.range-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #34424e;
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}

.range-tabs button.active {
  border-color: #17222c;
  color: #ffffff;
  background: #17222c;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 14px;
  color: #50606d;
  font-size: 0.68rem;
  font-weight: 700;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #516776;
}

.chart-dot--strong-buy {
  background: #0b3d19;
}

.chart-dot--buy {
  background: #367a3d;
}

.chart-dot--hold {
  background: #e3c82e;
}

.chart-dot--sell {
  background: #c94040;
}

.chart-dot--strong-sell {
  background: #812323;
}

.price-rating-chart {
  display: block;
  width: 100%;
  height: 220px;
  overflow: visible;
}

.price-rating-chart line {
  stroke: #e2e7eb;
  stroke-width: 1;
}

.price-rating-chart text {
  fill: #50606d;
  font-size: 0.68rem;
  font-weight: 750;
}

.price-area {
  stroke: none;
  opacity: 0.82;
}

.price-area--strong-buy {
  fill: #0b3d19;
}

.price-area--buy {
  fill: #367a3d;
}

.price-area--hold {
  fill: #e3c82e;
}

.price-area--sell {
  fill: #d85858;
}

.price-area--strong-sell {
  fill: #8e2b2b;
}

.price-area--not-covered {
  fill: #b9c2c9;
}

.price-line {
  fill: none;
  stroke: #16331d;
  stroke-width: 2.3;
  vector-effect: non-scaling-stroke;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  color: var(--muted);
  font-size: 0.66rem;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  background: #eaf0f4;
}

.auth-card {
  width: min(100%, 410px);
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(27, 48, 64, 0.13);
}

.brand-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
  background: var(--navy);
}

.brand-symbol::after {
  content: "Q";
  font-weight: 850;
}

.brand-symbol span {
  display: none;
}

.auth-header h1 {
  margin: 5px 0 8px;
  font-size: 1.75rem;
  letter-spacing: 0;
}

.auth-header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 25px;
}

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

.auth-form label span {
  color: #52616d;
  font-size: 0.75rem;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  outline: none;
}

.auth-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.12);
}

.auth-form button {
  min-height: 43px;
  border: 1px solid #12598e;
  border-radius: 5px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 5px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 0.78rem;
}

.auth-security {
  margin: 18px 0 0;
  color: #84919b;
  font-size: 0.68rem;
  text-align: center;
}

@media (max-width: 1000px) {
  .app-header {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    position: fixed;
    z-index: 21;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    height: 56px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.98);
  }

  .primary-nav a {
    justify-content: center;
    border-top: 3px solid transparent;
    border-bottom: 0;
  }

  .primary-nav a:hover,
  .primary-nav a.router-link-exact-active {
    border-top-color: var(--blue);
    border-bottom-color: transparent;
  }

  .workspace {
    padding-bottom: 86px;
  }

  .rating-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factor-panel {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 720px) {
  .app-header {
    min-height: 58px;
    padding: 0 14px;
  }

  .app-brand > span:last-child,
  .account-name {
    display: none;
  }

  .workspace {
    width: min(100% - 22px, 1560px);
    padding-top: 22px;
  }

  .page-heading,
  .security-heading {
    align-items: flex-start;
  }

  .page-heading {
    flex-direction: column;
  }

  .page-heading .button,
  .date-control {
    width: 100%;
  }

  .date-control input {
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    border-bottom: 1px solid var(--border);
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(3),
  .metric:nth-child(4) {
    border-bottom: 0;
  }

  .data-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-form {
    width: 100%;
  }

  .select-field select {
    width: 100%;
  }

  .company-cell,
  .ranking-table th:nth-child(3),
  .ranking-table td:nth-child(3),
  .ranking-table th:nth-child(5),
  .ranking-table td:nth-child(5) {
    display: none;
  }

  .mobile-company {
    display: block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .import-grid,
  .rating-layout {
    grid-template-columns: 1fr;
  }

  .factor-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .market-panel {
    display: none;
  }

  .security-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .chart-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-legend {
    justify-content: flex-start;
  }

  .price-rating-chart {
    height: 165px;
  }
}

@media (max-width: 440px) {
  .metric {
    padding: 14px;
  }

  .metric strong {
    font-size: 1.28rem;
  }

  .search-form {
    display: grid;
  }

  .table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination .button {
    flex: 1;
  }

  .security-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .security-price {
    text-align: left;
  }

  .factor-table {
    grid-template-columns: minmax(96px, 1fr) repeat(3, 42px);
  }

  .auth-card {
    padding: 24px 20px;
  }
}

/* Corporate Action Integrity Guard dashboard */
.integrity-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.integrity-stat {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.integrity-stat span,
.integrity-stat small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.integrity-stat strong {
  display: block;
  margin-top: 7px;
  font-size: 1.7rem;
  font-variant-numeric: tabular-nums;
}

.integrity-stat small {
  margin-top: 5px;
  font-size: 0.65rem;
}

.integrity-stat--warning strong {
  color: var(--amber);
}

.integrity-stat--positive strong,
.integrity-stat--corrected strong,
.text-positive {
  color: var(--green);
}

.integrity-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.integrity-toolbar h2 {
  margin: 4px 0 0;
  font-size: 1.05rem;
}

.integrity-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.integrity-search input {
  width: 190px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  outline: none;
  background: #ffffff;
}

.integrity-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.12);
}

.corporate-actions-table {
  min-width: 1330px;
}

.corporate-actions-table td {
  height: auto;
  min-height: 64px;
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: top;
  white-space: normal;
}

.integrity-status {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 0.64rem;
  font-weight: 850;
  text-transform: uppercase;
}

.integrity-status--suspected {
  color: #765000;
  background: var(--amber-soft);
}

.integrity-status--confirmed {
  color: var(--green);
  background: var(--green-soft);
}

.integrity-status--rejected {
  color: var(--red);
  background: var(--red-soft);
}

.integrity-method,
.integrity-date,
.corporate-actions-table td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
}

.integrity-event-type,
.integrity-ratio {
  display: block;
}

.integrity-event-type {
  font-size: 0.78rem;
}

.integrity-ratio {
  margin-top: 3px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.window-list {
  display: flex;
  max-width: 180px;
  flex-wrap: wrap;
  gap: 5px;
}

.window-list span {
  display: inline-grid;
  min-width: 34px;
  height: 24px;
  place-items: center;
  border: 1px solid #c8dce8;
  border-radius: 4px;
  color: #1c5f8a;
  background: var(--blue-soft);
  font-size: 0.65rem;
  font-weight: 800;
}

.evidence-cell {
  width: 340px;
}

.evidence-cell details {
  max-width: 330px;
}

.evidence-cell summary {
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.evidence-grid {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #f8fafb;
}

.evidence-grid div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 8px;
}

.evidence-grid dt,
.evidence-grid dd {
  margin: 0;
  font-size: 0.66rem;
}

.evidence-grid dt {
  color: var(--muted);
  font-weight: 750;
}

.evidence-grid dd {
  overflow-wrap: anywhere;
  color: #26343f;
  font-variant-numeric: tabular-nums;
}

.correction-cell {
  width: 245px;
}

.correction-cell > strong {
  display: block;
  max-width: 230px;
  font-size: 0.74rem;
}

.correction-list {
  display: grid;
  gap: 3px;
  margin-top: 7px;
}

.correction-list span {
  color: #3d4c57;
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}

.integrity-readonly {
  max-width: 140px;
}

@media (max-width: 1000px) {
  .primary-nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .primary-nav a {
    padding: 0 8px;
    font-size: 0.72rem;
    text-align: center;
  }

  .integrity-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .integrity-toolbar,
  .integrity-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .integrity-filters,
  .integrity-search input {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .primary-nav a {
    padding: 0 4px;
    font-size: 0.63rem;
  }

  .integrity-summary {
    grid-template-columns: 1fr;
  }
}
