﻿/* KseAlert company snapshot (from app) */
/* ==========================================================================
   SHARE DETAIL â€” OVERVIEW REDESIGN (.so-*)
   Uses only data already returned by getShareMoreInfo (price, technical,
   fundamentals, income, payout, idc). No backend changes required.
   ========================================================================== */

/* Hero card */
.so-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 14px;
    margin: 8px 8px 12px 8px;
}
.so-hero-top {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: flex-start;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}
.so-hero-name {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.2;
    word-break: break-word;
}
.so-hero-symbol {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    letter-spacing: 0.3px;
}
.so-hero-price {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
    letter-spacing: -0.5px;
}
.so-hero-price-col {
    text-align: right;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}
.so-hero-change {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.so-up      { background: #d1fae5; color: #065f46; }
.so-down    { background: #fee2e2; color: #991b1b; }
.so-neutral { background: #e5e7eb; color: #374151; }

.so-hero-stats {
    margin-top: 6px;
}
.so-hero-stat {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    line-height: 1.45;
}

/* Sparkline (intraday, time-sorted) */
.so-spark-wrap { margin: 6px 0 10px 0; }
.so-history-wrap { margin-top: 2px; }
.so-history-chart {
  width: 100%;
  min-height: 168px;
  border-radius: 10px;
  overflow: visible;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.so-history-chart .highcharts-container,
.so-history-chart svg {
  overflow: visible !important;
}
.so-spark-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.so-hero .so-spark {
    border: none;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
}
.so-hero .so-spark-empty {
    border: none;
    background: transparent;
}
.so-spark {
    height: 42px;
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 4px 6px;
    box-sizing: border-box;
}
.so-spark svg { width: 100%; height: 100%; display: block; }
.so-spark-empty {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 8px;
}

/* Range bars (Day / 52 Week) */
.so-range { margin-top: 6px; }
.so-range-row {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 4px;
    font-weight: 600;
}
.so-range-row .so-range-label {
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.so-range-bar {
    position: relative;
    height: 6px;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
    border-radius: 999px;
    margin-bottom: 4px;
}
.so-range-dot {
    position: absolute;
    top: -3px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border: 2px solid #1f2937;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.so-range-marks {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #9ca3af;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Hero footer chips */
.so-hero-meta {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.so-chip {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    color: #374151;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}
.so-chip.so-chip-good { background: #d1fae5; color: #065f46; }
.so-chip.so-chip-bad  { background: #fee2e2; color: #991b1b; }
.so-chip.so-chip-warn { background: #fef3c7; color: #92400e; }

/* KPI grid (4 x 2) */
.so-kpi-grid {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 0 8px 12px 8px;
}
.so-kpi {
    -webkit-flex: 1 1 calc(25% - 6px);
    flex: 1 1 calc(25% - 6px);
    min-width: 72px;
    box-sizing: border-box;
    margin: 3px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 6px;
    text-align: center;
    min-height: 56px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
}
.so-kpi-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
    margin-bottom: 3px;
    line-height: 1.1;
}
.so-kpi-value {
    font-size: 14px;
    color: #111827;
    font-weight: 700;
    line-height: 1.1;
}
.so-kpi-value.good { color: #047857; }
.so-kpi-value.bad  { color: #b91c1c; }

/* Pros & Cons */
.so-pc-wrap {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 8px 12px 8px;
}
.so-pc-card {
    -webkit-flex: 1 1 calc(50% - 8px);
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
    box-sizing: border-box;
    margin: 4px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
}
.so-pc-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}
.so-pc-title.so-pros { color: #047857; }
.so-pc-title.so-cons { color: #b91c1c; }
.so-pc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.so-pc-list li {
    font-size: 12px;
    color: #374151;
    line-height: 1.4;
    padding: 4px 0 4px 16px;
    position: relative;
}
.so-pc-list.so-pros li::before {
    content: "\2713";
    color: #10b981;
    position: absolute;
    left: 0;
    font-weight: 800;
}
.so-pc-list.so-cons li::before {
    content: "!";
    color: #ef4444;
    position: absolute;
    left: 4px;
    font-weight: 800;
}

/* Performance bars */
.so-perf-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin: 0 8px 12px 8px;
}
.so-section-title {
    font-size: 12px;
    font-weight: 800;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 10px 0;
}
.so-perf-row {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    display: grid;
    grid-template-columns: 36px 1fr 60px;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.so-perf-label {
    -webkit-flex: 0 0 36px;
    flex: 0 0 36px;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}
.so-perf-track {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    position: relative;
    height: 14px;
    background: #f3f4f6;
    border-radius: 7px;
    overflow: hidden;
}
.so-perf-mid {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: #d1d5db;
}
.so-perf-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    background: #10b981;
}
.so-perf-fill.bad { background: #ef4444; }
.so-perf-value {
    -webkit-flex: 0 0 60px;
    flex: 0 0 60px;
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}
.so-perf-value.good { color: #047857; }
.so-perf-value.bad  { color: #b91c1c; }

/* Action bar */
.so-actions {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 0 8px 12px 8px;
}
.so-action-btn {
    -webkit-flex: 1 1 calc(25% - 6px);
    flex: 1 1 calc(25% - 6px);
    min-width: 68px;
    box-sizing: border-box;
    margin: 3px;
    display: flex !important;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    padding: 10px 4px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: none !important;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    line-height: 1.2;
}
.so-action-btn:active { transform: scale(0.97); }
.so-action-btn .so-action-icon {
    font-size: 16px;
    line-height: 1;
    margin-bottom: 4px;
}
.so-action-btn.so-alert     { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important; box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25); }
.so-action-btn.so-watch     { background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25); }
.so-action-btn.so-portfolio { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important; box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25); }

/* Compact technicals snapshot inside the Technicals sub-panel */
.so-tech-snapshot {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    margin: 8px 0 12px 0;
}
.so-tech-item {
    -webkit-flex: 1 1 calc(50% - 8px);
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
    box-sizing: border-box;
    margin: 4px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 3px;
}
.so-tech-item-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
}
.so-tech-item-value {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 6px;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
}

/* Tighten existing sub-panel padding inside overview */
.overview-sub-panel { padding: 4px 8px !important; }

/* Generic card wrapper for the new sections */
.so-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin: 0 8px 12px 8px;
}

/* Mini info grid (3 cols) used by 52W/Volume & Dividend cards */
.so-mini-grid {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.so-mini-cell {
    -webkit-flex: 1 1 calc(33.333% - 8px);
    flex: 1 1 calc(33.333% - 8px);
    min-width: 88px;
    box-sizing: border-box;
    margin: 4px;
    background: #f9fafb;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
    min-height: 56px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
}
.so-mini-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
    margin-bottom: 3px;
    line-height: 1.1;
}
.so-mini-value {
    font-size: 13px;
    color: #111827;
    font-weight: 700;
    line-height: 1.2;
}
.so-mini-value.good { color: #047857; }
.so-mini-value.bad  { color: #b91c1c; }
.so-mini-sub {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
    display: inline-block;
    margin-top: 2px;
}
.so-mini-chip {
    display: inline-block;
    margin-left: 3px;
    padding: 1px 5px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    vertical-align: middle;
}

/* Dividend mini bar chart */
.so-divbars-wrap { margin-top: 4px; }
.so-divbars {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: flex-end;
    align-items: flex-end;
    gap: 6px;
    padding: 4px 0;
}
.so-divbar {
    -webkit-flex: 1;
    flex: 1;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    gap: 4px;
}
.so-divbar-track {
    width: 100%;
    height: 60px;
    background: #f3f4f6;
    border-radius: 6px;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.so-divbar-fill {
    width: 100%;
    background: linear-gradient(180deg, #10b981 0%, #047857 100%);
    border-radius: 0 0 6px 6px;
    min-height: 4px;
}
.so-divbar-val {
    font-size: 10px;
    font-weight: 700;
    color: #047857;
    text-align: center;
    line-height: 1.1;
}
.so-divbar-sub {
    font-size: 9px;
    font-weight: 600;
    color: #374151;
    line-height: 1.15;
    margin-top: 2px;
}
.so-divbar-yr {
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
}

/* Recent Activity rows */
.so-act-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}
.so-act-row:last-child { border-bottom: none; padding-bottom: 0; }
.so-act-row:first-of-type { padding-top: 4px; }
.so-act-clickable { cursor: pointer; }
.so-act-clickable:active { background: #f9fafb; }
.so-act-icon {
    flex: 0 0 28px;
    text-align: center;
    font-size: 16px;
}
.so-act-body { flex: 1; min-width: 0; }
.so-act-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.so-act-label.so-good { color: #047857; }
.so-act-label.so-bad  { color: #b91c1c; }
.so-act-label.so-info { color: #1d4ed8; }
.so-act-title {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.so-act-meta {
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
    font-weight: 600;
}
.so-act-arrow {
    flex: 0 0 16px;
    color: #9ca3af;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.so-pc-empty {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 6px 0;
}

/* ==========================================================================
   SHARE DETAIL â€” OTHER TABS (.so-tab-enhanced and friends)
   Used by Insider, Announcements, Payout, Income, Balance, Fundamentals tabs
   ========================================================================== */

.so-tab-enhanced { padding-top: 4px; }

/* Filter chips (Announcements, Payout) */
.so-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 10px 0;
}
.so-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f3f4f6;
    color: #374151;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    user-select: none;
    -webkit-user-select: none;
}
.so-filter-chip:active { transform: scale(0.96); }
.so-filter-chip.so-chip-active {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
}
.so-filter-chip.so-chip-active .so-chip-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}
.so-chip-count {
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 999px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    text-align: center;
}

/* Announcement rows */
.so-ann-list { margin-top: 4px; }
.so-ann-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
}
.so-ann-row:last-child { border-bottom: none; }
.so-ann-row:active { background: #f9fafb; }
.so-ann-date {
    flex: 0 0 70px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
    text-align: center;
    background: #f9fafb;
    border-radius: 6px;
    padding: 6px 4px;
    line-height: 1.2;
    align-self: flex-start;
}
.so-ann-body { flex: 1; min-width: 0; }
.so-ann-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}
.so-tag-result  { background: #dbeafe; color: #1e40af; }
.so-tag-div     { background: #d1fae5; color: #065f46; }
.so-tag-bonus   { background: #fef3c7; color: #92400e; }
.so-tag-right   { background: #ede9fe; color: #5b21b6; }
.so-tag-meeting { background: #e0e7ff; color: #3730a3; }
.so-tag-mgmt    { background: #fce7f3; color: #9d174d; }
.so-tag-other   { background: #f3f4f6; color: #374151; }
.so-ann-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    word-break: break-word;
}
.so-ann-arrow {
    flex: 0 0 16px;
    color: #9ca3af;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    align-self: center;
}

/* Insider trade rows */
.so-trade-row {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.so-trade-row.so-row-buy  { border-left-color: #10b981; background: #f0fdf4; }
.so-trade-row.so-row-sell { border-left-color: #ef4444; background: #fef2f2; }
.so-trade-head {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 4px;
}
.so-trade-action {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
}
.so-trade-action.so-good { background: #d1fae5; color: #065f46; }
.so-trade-action.so-bad  { background: #fee2e2; color: #991b1b; }
.so-trade-date {
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
}
.so-trade-name {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
    margin-top: 4px;
}
.so-trade-pos {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
    line-height: 1.3;
}
.so-trade-stats {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e5e7eb;
}
.so-trade-stats > div {
    -webkit-flex: 1 1 calc(33.333% - 6px);
    flex: 1 1 calc(33.333% - 6px);
    box-sizing: border-box;
    margin: 3px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: flex-start;
    align-items: flex-start;
    min-width: 0;
}
.so-trade-stat-l {
    font-size: 9px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
}
.so-trade-stat-v {
    font-size: 12px;
    font-weight: 800;
    color: #111827;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}
.so-trade-foot {
    margin-top: 8px;
    text-align: right;
}
.so-pdf-btn {
    display: inline-block;
    padding: 5px 10px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.so-pdf-btn:active { background: #f3f4f6; }

@supports (display: grid) {
    .so-kpi,
    .so-pc-card,
    .so-action-btn,
    .so-tech-item,
    .so-mini-cell,
    .so-trade-stats > div {
        margin: 0;
    }
}

/* Payout cards */
.so-payout-list { margin-top: 6px; }
.so-payout-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.so-payout-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.so-payout-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.so-payout-types { display: flex; flex-wrap: wrap; gap: 4px; }
.so-payout-quarter {
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
}
.so-payout-date {
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
    text-align: right;
    flex-shrink: 0;
}
.so-payout-body {
    border-top: 1px dashed #e5e7eb;
    padding-top: 8px;
}
.so-payout-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}
.so-payout-line-l {
    font-size: 12px;
    color: #374151;
    font-weight: 600;
}
.so-payout-line-v {
    font-size: 13px;
    color: #047857;
    font-weight: 800;
}
.so-payout-foot {
    margin-top: 8px;
    text-align: right;
}

/* Payout bar chart extras */
.so-payout-bar-title {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.so-divbar-chip {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 8px;
    font-weight: 800;
    border-radius: 3px;
    padding: 0 3px;
    margin-left: 2px;
    vertical-align: middle;
    line-height: 13px;
}
.so-divbar-chip-r {
    background: #ede9fe;
    color: #5b21b6;
}

/* Payout card — redesigned layout */
.so-pc-head {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: flex-start;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.so-pc-head-left {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.so-pc-head-right {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    text-align: right;
}
.so-pc-qbadge {
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    min-width: 44px;
    height: 22px;
    border-radius: 5px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 0 6px;
    letter-spacing: 0.3px;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}
.so-pc-period {
    font-size: 11px;
    color: #374151;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.so-pc-bdate {
    font-size: 11px;
    font-weight: 700;
    color: #111827;
}
.so-pc-bdate-lbl {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
    margin-top: 1px;
}
.so-pc-badges {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}
.so-pt-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

/* 2x2 key metrics grid inside payout card */
.so-pm-grid {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 1px;
    background: #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}
.so-pm-cell {
    -webkit-flex: 1 1 calc(50% - 1px);
    flex: 1 1 calc(50% - 1px);
    background: #ffffff;
    padding: 7px 10px;
    min-width: 0;
}
.so-pm-label {
    font-size: 10px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
    float: left;
}
.so-pm-val {
    font-size: 13px;
    color: #111827;
    font-weight: 800;
    float: right;
}

/* Dates row (ex-date, book closure, bonus, rights) */
.so-pd-row {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding-top: 7px;
    border-top: 1px dashed #e5e7eb;
    margin-top: 2px;
    margin-bottom: 6px;
}
.so-pd-item {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 1px;
}
.so-pd-lbl {
    font-size: 9px;
    color: #9ca3af;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.so-pd-val {
    font-size: 11px;
    color: #374151;
    font-weight: 700;
}

/* Payout card footer (PDF link) */
.so-pc-foot {
    border-top: 1px solid #f3f4f6;
    padding-top: 7px;
    text-align: right;
}

/* Make the existing fundamentals/income/balance tables blend nicer below the
   new summary card */
#Symbolfundamentals .tbl,
#SymbolFinancial .tbl,
#SymbolBalance .tbl {
    margin: 0 8px 12px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}
#Symbolfundamentals table,
#SymbolFinancial table,
#SymbolBalance table {
    width: 100%;
    font-size: 12px;
}
#Symbolfundamentals tr td,
#SymbolFinancial tr td,
#SymbolBalance tr td {
    padding: 6px 8px;
    border-bottom: 1px solid #f3f4f6;
}
#Symbolfundamentals tr td:first-child,
#SymbolFinancial tr td:first-child,
#SymbolBalance tr td:first-child {
    font-weight: 700;
    color: #111827;
}
#Symbolfundamentals tr:nth-child(even) td,
#SymbolFinancial tr:nth-child(even) td,
#SymbolBalance tr:nth-child(even) td {
    background: #f9fafb;
}
/* Section header rows must win over the generic td/first-child styles above */
#Symbolfundamentals tr.header td,
#Symbolfundamentals tr.header td:first-child,
#SymbolFinancial tr.header td,
#SymbolFinancial tr.header td:first-child,
#SymbolBalance tr.header td,
#SymbolBalance tr.header td:first-child {
    background: #38c !important;
    color: #ffffff !important;
    font-weight: 800;
    padding: 8px 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 12px;
    border-bottom: none;
}
#Symbolfundamentals tr.header td b,
#SymbolFinancial tr.header td b,
#SymbolBalance tr.header td b {
    color: #ffffff !important;
    font-weight: 800;
}

/* ==========================================================================
   LIVE MARKET HEATMAP (.lhm-*)
   Client-side squarified treemap built from rrd.json (rawEqData).

   Typography:
   - `system-ui` resolves to SF Pro on iOS and Roboto on Android â€” both are
     world-class native UI fonts already optimized for screens.
   - tabular-nums + ss-features keep digits monospaced and disambiguate
     0/O, 1/l etc. for financial data.
   - Weights tempered (was 800/900) to avoid a blocky look.
   ========================================================================== */
.heatmap-page-wrap {
    width: 100%;
