/* ===== ANALYZER TABS ===== */

#cfm-an-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

#cfm-an-tabs .cfm-tab {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-weight: 500;
}

#cfm-an-tabs .cfm-tab.active {
    background: #ffffff;
    border-bottom: 1px solid #70CDBA !important; /* same color as active tab background */
    font-weight: 600;
}

/* ===== SUBTABS ===== */

.cfm-subtabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
}

.cfm-subtab {
    padding: 6px 14px;
    cursor: pointer;
    background: #eee;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.cfm-subtab.active {
    background: #fff;
    border-color: #aaa;
    font-weight: 600;
}

/* ===== PANELS ===== */

.cfm-tab-panel,
.cfm-subpanel {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cfm-placeholder {
    width: 100%;
    height: 420px;
    background: #f8f8f8;
    border: 1px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 16px;
}

/* Make the divider under the tabs match the active tab color */
#cfm-an-tabs {
    border-bottom: 1px solid #70CDBA !important; /* same color as active tab background */
}

/* Remove the grey underline from subtabs area */
.cfm-subtabs {
    border-bottom: 1px solid #70CDBA !important;
}


/* Limit monthly return table columns to 8% width */
#cfm-hist-monthly-portfolio-table th:not(:first-child),
#cfm-hist-monthly-portfolio-table td:not(:first-child) {
    width: 8%;
    max-width: 8%;
}

/* Fix Year column width */
#cfm-hist-monthly-portfolio-table th:first-child,
#cfm-hist-monthly-portfolio-table td:first-child {
    width: 8%;
    max-width: 8%;
}

/* Force dark grey text for all cells in Monthly Returns table */
#cfm-hist-monthly-portfolio-table th,
#cfm-hist-monthly-portfolio-table td {
    color: #333333 !important;
}

/* Reduce font-size for data rows (tbody only) */
#cfm-hist-monthly-portfolio-table tbody td {
    font-size: 12px !important;
}


/* === Monthly Returns: apply same styling to Portfolio + Benchmark === */

/* Column widths: 8% for all non-first columns */
#cfm-hist-monthly-portfolio-table th:not(:first-child),
#cfm-hist-monthly-portfolio-table td:not(:first-child),
#cfm-hist-monthly-benchmark-table  th:not(:first-child),
#cfm-hist-monthly-benchmark-table  td:not(:first-child) {
  width: 8%;
  max-width: 8%;
}

/* Year column width also 8% */
#cfm-hist-monthly-portfolio-table th:first-child,
#cfm-hist-monthly-portfolio-table td:first-child,
#cfm-hist-monthly-benchmark-table  th:first-child,
#cfm-hist-monthly-benchmark-table  td:first-child {
  width: 8%;
  max-width: 8%;
}

/* Dark grey text for all cells (headers + body) */
#cfm-hist-monthly-portfolio-table th,
#cfm-hist-monthly-portfolio-table td,
#cfm-hist-monthly-benchmark-table  th,
#cfm-hist-monthly-benchmark-table  td {
  color: #333333 !important;
}

/* Reduce font-size for data rows */
#cfm-hist-monthly-portfolio-table tbody td,
#cfm-hist-monthly-benchmark-table  tbody td {
  font-size: 12px !important;
}

/* (Optional) Right-align numbers like Portfolio */
#cfm-hist-monthly-portfolio-table th:not(:first-child),
#cfm-hist-monthly-portfolio-table td:not(:first-child),
#cfm-hist-monthly-benchmark-table  th:not(:first-child),
#cfm-hist-monthly-benchmark-table  td:not(:first-child) {
  text-align: right;
}

/* Monthly Returns: apply same styling to Portfolio + Benchmark + Net */

/* Column widths: 8% for all non-first columns */
#cfm-hist-monthly-portfolio-table th:not(:first-child),
#cfm-hist-monthly-portfolio-table td:not(:first-child),
#cfm-hist-monthly-benchmark-table  th:not(:first-child),
#cfm-hist-monthly-benchmark-table  td:not(:first-child),
#cfm-hist-monthly-net-table        th:not(:first-child),
#cfm-hist-monthly-net-table        td:not(:first-child) {
  width: 8%;
  max-width: 8%;
}

/* Year column width also 8% */
#cfm-hist-monthly-portfolio-table th:first-child,
#cfm-hist-monthly-portfolio-table td:first-child,
#cfm-hist-monthly-benchmark-table  th:first-child,
#cfm-hist-monthly-benchmark-table  td:first-child,
#cfm-hist-monthly-net-table        th:first-child,
#cfm-hist-monthly-net-table        td:first-child {
  width: 8%;
  max-width: 8%;
}

/* Dark grey text for all cells (headers + body) */
#cfm-hist-monthly-portfolio-table th,
#cfm-hist-monthly-portfolio-table td,
#cfm-hist-monthly-benchmark-table  th,
#cfm-hist-monthly-benchmark-table  td,
#cfm-hist-monthly-net-table        th,
#cfm-hist-monthly-net-table        td {
  color: #333333 !important;
}

/* Reduce font-size for data rows */
#cfm-hist-monthly-portfolio-table tbody td,
#cfm-hist-monthly-benchmark-table  tbody td,
#cfm-hist-monthly-net-table        tbody td {
  font-size: 12px !important;
}

/* Right-align numbers like the others */
#cfm-hist-monthly-portfolio-table th:not(:first-child),
#cfm-hist-monthly-portfolio-table td:not(:first-child),
#cfm-hist-monthly-benchmark-table  th:not(:first-child),
#cfm-hist-monthly-benchmark-table  td:not(:first-child),
#cfm-hist-monthly-net-table        th:not(:first-child),
#cfm-hist-monthly-net-table        td:not(:first-child) {
  text-align: right;
}

/* === Quantitative Metrics: apply similar styling to match Historical Returns Portfolio table === */

/* Dark grey text for all cells (headers + body) */
#cfm-an-quant-table th,
#cfm-an-quant-table td {
  color: #333333 !important;
}

/* Reduce font-size for data rows */
#cfm-an-quant-table tbody td {
  font-size: 12px !important;
}

/* Right-align numbers for Portfolio and Benchmark columns */
#cfm-an-quant-table th:not(:first-child),
#cfm-an-quant-table td:not(:first-child) {
  text-align: right;
}

/* === Stress Analysis: apply similar styling to match Historical Returns Portfolio table === */

/* Dark grey text for all cells (headers + body) */
#cfm-an-stress-table th,
#cfm-an-stress-table td,
#cfm-an-stress-scenarios-table th,
#cfm-an-stress-scenarios-table td {
  color: #333333 !important;
}

/* Reduce font-size for data rows */
#cfm-an-stress-table tbody td,
#cfm-an-stress-scenarios-table tbody td {
  font-size: 12px !important;
}

/* Right-align numbers for relevant columns */
#cfm-an-stress-table th:not(:first-child),
#cfm-an-stress-table td:not(:first-child),
#cfm-an-stress-scenarios-table th:not(:first-child),
#cfm-an-stress-scenarios-table td:not(:first-child) {
  text-align: right;
}

/* Column widths for Stress Analysis tables: max 10% for non-first columns */
#cfm-an-stress-table th:not(:first-child),
#cfm-an-stress-table td:not(:first-child),
#cfm-an-stress-scenarios-table th:not(:first-child),
#cfm-an-stress-scenarios-table td:not(:first-child) {
  width: 10%;
  max-width: 10%;
}

/* First column width for Stress Analysis tables */
#cfm-an-stress-table th:first-child,
#cfm-an-stress-table td:first-child,
#cfm-an-stress-scenarios-table th:first-child,
#cfm-an-stress-scenarios-table td:first-child {
  width: 10%;
  max-width: 10%;
}