/* Market calendar — extracted from styles.css */
/* â”€â”€ Calendar Components â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cal-header {
    margin-bottom: 12px;
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    transition: var(--transition);
}

.cal-today {
    font-size: 20px;
    padding: 4px 14px;
}

.cal-btn:hover {
    border-color: rgba(0, 240, 255, 0.3);
    color: var(--neon-cyan);
}

.cal-btn svg {
    display: block;
}

.cal-week-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-left: 8px;
}

/* Day cards row */
.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.cal-day-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    transition: var(--transition);
}

.cal-day-card:hover {
    border-color: rgba(0, 240, 255, 0.25);
}

.cal-day-card.today {
    border-color: rgba(0, 240, 255, 0.4);
    background: rgba(0, 240, 255, 0.04);
}

.cal-day-card.active {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.08);
}

.cal-day-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cal-day-count {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    line-height: 1.5;
}

.cal-day-count span {
    color: var(--neon-cyan);
    font-weight: 600;
}

.cal-day-none {
    font-size: 11px;
    color: var(--text-muted);
}

/* Calendar sub-tabs */
.cal-tabs {
    margin-bottom: 12px;
}

/* Date headers in table groups */
.cal-date-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 8px 14px;
    background: var(--bg-hover);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 8px;
}

.cal-date-header:first-child {
    margin-top: 0;
}

/* Calendar table: same type and cell padding as the other market tables */
.cal-table th {
    font-size: 11px;
    padding: 7px 8px;
}

.cal-table td {
    font-size: 12.5px;
    padding: 7px 8px;
    color: var(--text-primary);
}

.cal-company {
    color: var(--text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-country {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.cal-pending {
    color: rgba(255, 100, 100, 0.7);
    font-style: italic;
    font-size: 11px;
}

/* Tabs row with filter button */
.cal-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cal-list-search-wrap {
    flex: 1 1 180px;
    min-width: 0;
    max-width: 340px;
}

.cal-list-search {
    width: 100%;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font: inherit;
    font-size: 13px;
}

.cal-list-search::placeholder {
    color: var(--text-muted);
}

.cal-list-search:focus {
    outline: none;
    border-color: var(--accent, #3b82f6);
}

/* Timing column */
.cal-table {
    border-collapse: collapse;
}

.mover-row:hover td {
    background: rgba(255, 255, 255, 0.05) !important;
}

.cal-time {
    white-space: nowrap;
    font-size: 13px;
    font-family: monospace;
    color: var(--text-secondary);
}

.cal-time-inner {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-time-inner--stack {
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.cal-time-inner--stack span {
    font-size: 11px;
    line-height: 1.2;
}

.cal-timing-icon {
    width: 16px;
    height: 16px;
}

.cal-timing-icon.sunrise {
    color: #ff9f43;
}

.cal-timing-icon.moon {
    color: #54a0ff;
}

/* Sortable column headers */
.cal-th-sort {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.cal-th-sort:hover {
    color: var(--neon-cyan) !important;
}

.cal-th-sort::after {
    content: ' â‡…';
    opacity: 0.25;
    font-size: 9px;
}

/* Country filter modal */
.cal-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--overlay-scrim);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.cal-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    width: 420px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
}

.cal-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
}

.cal-modal-close:hover { color: var(--text-primary); }

.cal-modal-actions {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.cal-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 12px 16px;
    overflow-y: auto;
    max-height: 50vh;
}

.cal-country-opt {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.cal-country-opt:hover {
    background: rgba(0, 240, 255, 0.04);
}

.cal-country-opt input[type="checkbox"] {
    accent-color: var(--neon-cyan);
}

.cal-modal-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.cal-apply-filter {
    background: rgba(0, 240, 255, 0.1) !important;
    border-color: rgba(0, 240, 255, 0.3) !important;
    color: var(--neon-cyan) !important;
    padding: 6px 20px !important;
}

/* â”€â”€ World Indexes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.world-indexes {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.world-region {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.world-region-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--neon-cyan);
    margin-bottom: 10px;
}

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 1024px) {
    .app-body {
        grid-template-columns: 1fr;
    }
    .right-sidebar {
        border-left: none;
        border-top: 1px solid var(--border);
        max-height: none;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hide sidebar on narrow viewports (iframe embed or mobile) */
@media (max-width: 720px) {
    .markets-sidebar {
        display: none !important;
    }
    #markets-content {
        padding: 16px;
    }
}

@media (max-width: 640px) {
    .main-content { padding: 16px; }
    .ticker-sticky {
        margin-left: -16px;
        margin-right: -16px;
        padding: 0 16px;
    }
    .app-header { padding: 0 !important; }
    .stats-grid { grid-template-columns: 1fr; }
    .price-current { font-size: 24px; }
}


/* %% Country Filter Modal %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
.cal-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--overlay-scrim);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.cal-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 620px;
    max-width: 95vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden;
}

.cal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.cal-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.cal-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}
.cal-modal-close:hover { color: var(--text-primary); }

.cal-day-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100px;
    justify-content: center;
}

.cal-day-card:hover {
    border-color: rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.02);
}

.cal-day-card.today {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.04);
}

.cal-day-card.active {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.cal-day-header {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.cal-day-main {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.cal-day-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.cal-day-logos {
    display: flex;
    align-items: center;
}

.cal-day-logos .cal-ticker-logo-wrap {
    width: 20px;
    height: 20px;
    margin-right: 2px;
    border: none;
}

.cal-day-logos .cal-ticker-img, 
.cal-day-logos .cal-ticker-icon {
    width: 100%;
    height: 100%;
    font-size: 8px;
}

.cal-day-count-text {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.cal-day-no-calls {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.cal-modal-search {
    padding: 16px 24px 8px;
    position: relative;
}
.cal-modal-search svg {
    position: absolute;
    left: 36px;
    top: 29px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}
.cal-modal-search input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px 10px 38px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}
.cal-modal-search input::placeholder {
    color: var(--text-muted);
}
.cal-modal-search input:focus {
    border-color: var(--neon-cyan);
    background: var(--bg-card);
    box-shadow: 0 0 0 2px rgba(14, 116, 144, 0.15);
}

.cal-modal-selected {
    padding: 12px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    min-height: 44px;
    max-height: 180px;
    overflow-y: auto;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border);
}

.cal-filter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-active-filters {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-flag-bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
}

.filter-flag-more {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 2px;
}

.country-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2px 8px 2px 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--cyan);
}
.country-badge .badge-code {
    opacity: 0.8;
}
.country-badge button {
    background: transparent;
    border: none;
    color: var(--cyan);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
    display: flex;
    align-items: center;
    opacity: 0.6;
}
.country-badge button:hover { opacity: 1; color: var(--loss); }

.cal-clear-all-bubbles {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid rgba(255, 80, 80, 0.3);
    color: #ff6b6b;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    padding: 3px 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    align-self: center;
}
.cal-clear-all-bubbles:hover {
    background: rgba(255, 80, 80, 0.22);
    border-color: rgba(255, 80, 80, 0.5);
    color: #ff4444;
}

.cal-modal-aggregations {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.cal-agg-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: 6px 12px;
    transition: all 0.2s;
}
.cal-agg-btn:hover { 
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-active);
}

.cal-modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    min-height: 200px;
}

.cal-modal-continent {
    margin-bottom: 24px;
}
.cal-modal-continent h4 {
    margin: 0 0 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cal-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.cal-country-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    font-size: 14px;
    color: var(--text-secondary);
}
.cal-country-opt:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.cal-country-opt input {
    display: none;
}
.cal-country-opt:has(input:checked) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.cal-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-hover);
}

.cal-modal-footer .cal-btn {
    padding: 8px 20px;
}
.cal-modal-footer .cal-apply-filter {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
    font-weight: 600;
}
.cal-modal-footer .cal-apply-filter:hover {
    opacity: 0.88;
}




/* â”€â”€ Calendar Ticker Icon â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cal-ticker-logo-wrap {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 6px;
    width: 22px;
    height: 22px;
    position: relative;
    align-items: center;
    justify-content: center;
}

.cal-ticker-img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
}

.cal-ticker-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    vertical-align: middle;
}

.cal-ticker-logo-wrap .cal-ticker-icon {
    margin-right: 0;
}
.cal-star {
    color: rgba(255, 255, 255, 0.1);
    font-size: 18px;
    margin-right: 1px;
    letter-spacing: -2px;
}

.cal-star.active {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.cal-impact {
    white-space: nowrap;
    min-width: 60px;
}

.cal-now-line td {
    padding: 0 !important;
    height: 2px !important;
    background: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
    border: none !important;
}

.sunrise { color: #ff9f43 !important; }
.moon { color: #54a0ff !important; }
.cal-time.sunrise span { color: #ff9f43; }
.cal-time.moon span { color: #54a0ff; }

/* â”€â”€ Calendar Table Alignment â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cal-table {
    table-layout: fixed;
    width: 100%;
}

.cal-table th, .cal-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 7px 8px;
}

.cal-table th.cal-time, .cal-table td.cal-time {
    overflow: visible;
    text-overflow: clip;
}

/* Economy 7-col: Time | Impact | Country(flag+name) | Event | Actual | Forecast | Prior */
.cal-table-economy th:nth-child(1), .cal-table-economy td:nth-child(1) { width: 10%; }
.cal-table-economy th:nth-child(2), .cal-table-economy td:nth-child(2) { width: 8%; }
.cal-table-economy th:nth-child(3), .cal-table-economy td:nth-child(3) { width: 24%; }
.cal-table-economy th:nth-child(4), .cal-table-economy td:nth-child(4) { width: 34%; }
.cal-table-economy th:nth-child(5), .cal-table-economy td:nth-child(5) { width: 8%; }
.cal-table-economy th:nth-child(6), .cal-table-economy td:nth-child(6) { width: 8%; }
.cal-table-economy th:nth-child(7), .cal-table-economy td:nth-child(7) { width: 8%; }

/* Earnings 8-col: Time | Company(logo+name) | MktCap | Est EPS | Act EPS | EPS Surp | Revenue | Rev Surp */
.cal-table-earnings th:nth-child(1),  .cal-table-earnings td:nth-child(1)  { width: 7%; }
.cal-table-earnings th:nth-child(2),  .cal-table-earnings td:nth-child(2)  { width: 22%; }
.cal-table-earnings th:nth-child(3),  .cal-table-earnings td:nth-child(3)  { width: 8%; }
.cal-table-earnings th:nth-child(4),  .cal-table-earnings td:nth-child(4)  { width: 9%; }
.cal-table-earnings th:nth-child(5),  .cal-table-earnings td:nth-child(5)  { width: 8%; }
.cal-table-earnings th:nth-child(6),  .cal-table-earnings td:nth-child(6)  { width: 8%; }
.cal-table-earnings th:nth-child(7),  .cal-table-earnings td:nth-child(7)  { width: 9%; }
.cal-table-earnings th:nth-child(8),  .cal-table-earnings td:nth-child(8)  { width: 11%; }
.cal-table-earnings th:nth-child(9),  .cal-table-earnings td:nth-child(9)  { width: 9%; }
.cal-table-earnings th:nth-child(10), .cal-table-earnings td:nth-child(10) { width: 9%; }
.cal-table-earnings.cal-has-mkt th:nth-child(1),  .cal-table-earnings.cal-has-mkt td:nth-child(1)  { width: 6%; }
.cal-table-earnings.cal-has-mkt th:nth-child(2),  .cal-table-earnings.cal-has-mkt td:nth-child(2)  { width: 18%; }
.cal-table-earnings.cal-has-mkt th:nth-child(3),  .cal-table-earnings.cal-has-mkt td:nth-child(3)  { width: 7%; }
.cal-table-earnings.cal-has-mkt th:nth-child(4),  .cal-table-earnings.cal-has-mkt td:nth-child(4)  { width: 8%; }
.cal-table-earnings.cal-has-mkt th:nth-child(5),  .cal-table-earnings.cal-has-mkt td:nth-child(5)  { width: 7%; }
.cal-table-earnings.cal-has-mkt th:nth-child(6),  .cal-table-earnings.cal-has-mkt td:nth-child(6)  { width: 9%; }
.cal-table-earnings.cal-has-mkt th:nth-child(7),  .cal-table-earnings.cal-has-mkt td:nth-child(7)  { width: 8%; }
.cal-table-earnings.cal-has-mkt th:nth-child(8),  .cal-table-earnings.cal-has-mkt td:nth-child(8)  { width: 8%; }
.cal-table-earnings.cal-has-mkt th:nth-child(9),  .cal-table-earnings.cal-has-mkt td:nth-child(9)  { width: 9%; }
.cal-table-earnings.cal-has-mkt th:nth-child(10), .cal-table-earnings.cal-has-mkt td:nth-child(10) { width: 10%; }
.cal-table-earnings.cal-has-mkt th:nth-child(11), .cal-table-earnings.cal-has-mkt td:nth-child(11) { width: 10%; }

/* Dividends: Symbol(15%), Mkt Cap(15%), Div(12%), Adj Div(12%), Record(15%), Payment(15%), Decl(16%) */
.cal-table-dividends th:nth-child(1), .cal-table-dividends td:nth-child(1) { width: 15%; }
.cal-table-dividends th:nth-child(2), .cal-table-dividends td:nth-child(2) { width: 15%; }
.cal-table-dividends th:nth-child(3), .cal-table-dividends td:nth-child(3) { width: 12%; }
.cal-table-dividends th:nth-child(4), .cal-table-dividends td:nth-child(4) { width: 12%; }
.cal-table-dividends th:nth-child(5), .cal-table-dividends td:nth-child(5) { width: 15%; }
.cal-table-dividends th:nth-child(6), .cal-table-dividends td:nth-child(6) { width: 15%; }
.cal-table-dividends th:nth-child(7), .cal-table-dividends td:nth-child(7) { width: 16%; }

/* IPOs: Symbol(15%), Company(40%), Exchange(15%), Price Range(15%), Shares(15%) */
.cal-table-ipos th:nth-child(1), .cal-table-ipos td:nth-child(1) { width: 15%; }
.cal-table-ipos th:nth-child(2), .cal-table-ipos td:nth-child(2) { width: 40%; }
.cal-table-ipos th:nth-child(3), .cal-table-ipos td:nth-child(3) { width: 15%; }
.cal-table-ipos th:nth-child(4), .cal-table-ipos td:nth-child(4) { width: 15%; }
.cal-table-ipos th:nth-child(5), .cal-table-ipos td:nth-child(5) { width: 15%; }

/* Splits: Symbol(20%), Mkt Cap(20%), Label(20%), Num(20%), Den(20%) */
.cal-table-splits th:nth-child(1), .cal-table-splits td:nth-child(1) { width: 20%; }
.cal-table-splits th:nth-child(2), .cal-table-splits td:nth-child(2) { width: 20%; }
.cal-table-splits th:nth-child(3), .cal-table-splits td:nth-child(3) { width: 20%; }
.cal-table-splits th:nth-child(4), .cal-table-splits td:nth-child(4) { width: 20%; }
.cal-table-splits th:nth-child(5), .cal-table-splits td:nth-child(5) { width: 20%; }

.cal-date-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 8px 14px;
    background: var(--bg-hover);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* â”€â”€ Calendar View Toggle â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cal-view-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
    background: transparent;
    border: none;
    padding: 0;
}

/* Events → Score */
.cal-score { padding-top: 4px; min-height: 280px; }
.cal-week-skel { padding-bottom: 24px; }
.cal-table-skel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0 28px;
    min-height: 520px;
}
.cal-table-skel-nav {
    width: 280px;
    height: 28px;
    margin-bottom: 8px;
}
.cal-table-skel-date {
    width: 200px;
    height: 18px;
    margin-bottom: 4px;
}
.cal-table-skel-row {
    width: 100%;
    height: 44px;
    border-radius: 8px;
}
.cal-day-card-skel { pointer-events: none; }
.cal-day-skel-line {
    height: 12px;
    width: 72%;
    margin: 6px 0;
    border-radius: 4px;
}
.cal-day-skel-line-lg { width: 90%; height: 16px; }

.cal-score-loading { min-height: 260px; padding: 16px 0 24px; }
.cal-score-loading-text { font-size: 14px; font-weight: 500; margin: 12px 0 4px; color: var(--text-primary); }
.cal-score-loading-charts { display: flex; flex-direction: column; gap: 14px; }
.cal-score-loading-bar { width: 100%; height: 140px; border-radius: 10px; }
.cal-score-loading-bar-tall { height: 200px; }
.cal-score-loading-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
@media (max-width: 800px) {
    .cal-score-loading-grid { grid-template-columns: 1fr; }
}
.cal-score-layout { display: flex; flex-direction: column; gap: 4px; }
.cal-score-heading { font-size: 16px; font-weight: 600; margin: 0 0 10px; }
.cal-score-note { color: var(--text-muted); font-size: 12px; margin: 8px 0 0; }
.cal-score-search-top { margin-bottom: 4px; }
.cal-score-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 12px 0 6px; }
.cal-score-charts { margin-top: 4px; }
.cal-score-charts-foot { margin-bottom: 0; }
.cal-score-reporters {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.cal-score-table-wrap {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}
.cal-score-table-wrap .cal-table-score {
    background: transparent;
}
.cal-table-score th,
.cal-table-score td { vertical-align: middle; }
.cal-table-score thead th {
    background: rgba(0, 0, 0, 0.22);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.cal-table-score tbody td {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cal-table-score tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.07);
}
.cal-score-table-wrap .movers-table tr:hover td {
    background: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="light"] .cal-score-table-wrap {
    background: #e8ecf0;
}
html[data-theme="light"] .cal-table-score thead th {
    background: #dfe4ea;
    color: var(--text-secondary);
}
html[data-theme="light"] .cal-table-score tbody td {
    background: #eef1f4;
    border-bottom-color: #d5dbe3;
}
html[data-theme="light"] .cal-table-score tbody tr:nth-child(even) td {
    background: #e8ecf0;
}
html[data-theme="light"] .cal-score-table-wrap .movers-table tr:hover td {
    background: #dde3ea !important;
}
.cal-score-th-sort .movers-sort-badge.active {
    color: var(--accent-primary);
}
.cal-table-score .cal-score-th-num,
.cal-table-score .cal-score-td-num { text-align: right; white-space: nowrap; }
.cal-table-score .cal-score-td-day { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.cal-score-row { cursor: pointer; transition: background 0.12s ease; }
.cal-score-row.on td { background: rgba(var(--accent-primary-rgb, 99, 102, 241), 0.12) !important; }
html[data-theme="light"] .cal-score-row.on td {
    background: rgba(0, 136, 170, 0.12) !important;
}
.cal-score-co-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.cal-score-co-link:hover .cal-score-company-name { color: var(--accent-primary); }
.cal-score-company {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.cal-score-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
}
.cal-score-logo-img { width: 36px; height: 36px; object-fit: cover; display: block; }
.cal-score-logo-fallback {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}
.cal-score-logo-fallback[hidden] { display: none; }
.cal-score-company-text { min-width: 0; flex: 1; }
.cal-score-company-name {
    display: block;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cal-score-company-sym {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}
.cal-score-row.on .cal-score-company-name { color: var(--accent-primary); font-weight: 600; }
.cal-score-score-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-score-metric { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.cal-score-mval { font-variant-numeric: tabular-nums; font-size: 14px; }
.cal-score-empty { color: var(--text-muted); }
.cal-score-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.cal-score-grade-a { background: rgba(34, 197, 94, 0.18); color: #22c55e; }
.cal-score-grade-b { background: rgba(59, 130, 246, 0.18); color: #3b82f6; }
.cal-score-grade-c { background: rgba(234, 179, 8, 0.2); color: #ca8a04; }
.cal-score-grade-d { background: rgba(239, 68, 68, 0.16); color: #ef4444; }
.cal-table-score th:nth-child(1), .cal-table-score td:nth-child(1) { width: 28%; }
.cal-table-score-week th:nth-child(1), .cal-table-score-week td:nth-child(1) { width: 24%; }
.cal-table-score-week th:nth-child(2), .cal-table-score-week td:nth-child(2) { width: 14%; }
.cal-score-table-hint { margin-top: 10px; }
.cal-score-stat { font-size: 22px; font-weight: 600; line-height: 1.1; }
.cal-score-stat-label { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.cal-score-search {
    width: min(420px, 100%);
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font: inherit;
}
.cal-score-hits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cal-score-hit {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    padding: 2px 10px;
    text-decoration: none;
}
.cal-score-hit.on { background: var(--accent-primary); color: var(--bg-root, #fff); border-color: var(--accent-primary); }
.cal-score-chart { position: relative; margin-top: 18px; }
.cal-score-chart-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.cal-score-ylab { color: var(--text-muted); font-size: 11px; margin-bottom: 4px; }
.cal-score-plot {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 4px;
    height: 168px;
    overflow: visible;
}
.cal-score-plot-tall { height: 210px; }
.cal-score-col { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.cal-score-barwrap { flex: 1; display: flex; align-items: flex-end; min-height: 0; }
.cal-score-bar { width: 100%; position: relative; background: var(--border); min-height: 2px; }
.cal-score-bar.on { background: var(--accent-primary); }
.cal-score-mark {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    color: var(--accent-primary);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}
.cal-score-mark:hover { text-decoration: underline; }
.cal-score-xlabel {
    height: 32px;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
}
.cal-score-tip {
    position: absolute;
    z-index: 6;
    transform: translate(-50%, -100%);
    margin-top: -6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    pointer-events: none;
}
.cal-score-tip[hidden] { display: none; }
.cal-score-tip-count { font-size: 12px; font-weight: 600; }
.cal-score-icons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-width: 280px; }
.cal-score-icon, .cal-score-fallback {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cal-score-icon { object-fit: cover; }
.cal-score-fallback { background: var(--border); color: var(--text-primary); font-size: 10px; font-weight: 600; }
.cal-score-cuts { color: var(--text-muted); font-size: 12px; margin: 8px 0 0; }
.cal-score-metrics { display: grid; gap: 8px 20px; margin-top: 8px; }
.cal-score-metrics-growth { grid-template-columns: 1fr 1fr; }
.cal-score-metrics-valuation { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 800px) {
    .cal-score-metrics-growth,
    .cal-score-metrics-valuation { grid-template-columns: 1fr; }
}
