html, body {
    font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
    background: #f3f6fb;
    color: #172033;
    margin: 0;
}

h1:focus {
    outline: none;
}

.content {
    padding: 0 0 3rem;
}

/* ── Earnings calendar ────────────────────────────────────────────── */

.earnings-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #dce4ef;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.search-box {
    flex: 1;
    border: 1px solid #ccd6e8;
    border-radius: 0.5rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #172033;
    background: #f3f6fb;
    outline: none;
    min-width: 0;
}

.search-box:focus {
    border-color: #4a90d9;
    background: #fff;
}

.toolbar-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: #5a6a80;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-state {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #5a6a80;
    font-size: 0.95rem;
}

.error-card {
    margin: 1rem;
    padding: 0.9rem 1rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: #5a4a00;
}

.earnings-list {
    background: #fff;
}

.earnings-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid #f0f3f8;
}

.earnings-card:last-child {
    border-bottom: none;
}

.earnings-date {
    font-size: 0.78rem;
    color: #5a6a80;
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.earnings-hour {
    font-size: 0.68rem;
    font-weight: 600;
    color: #7fa8d8;
    text-transform: lowercase;
    min-width: 1.8rem;
    flex-shrink: 0;
}

.earnings-symbol {
    font-weight: 700;
    font-size: 0.9rem;
    color: #172033;
    flex-shrink: 0;
}

.earnings-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: #5a6a80;
    min-width: 0;
}

.meta-chip {
    color: #5a6a80;
    white-space: nowrap;
}

.meta-chip strong {
    color: #172033;
    font-weight: 600;
}

/* ── Clickable card ───────────────────────────────────────────────── */

.earnings-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.1s;
}

.earnings-card-link:hover {
    background: #f0f5ff;
}

/* ── Symbol history page ──────────────────────────────────────────── */

.symbol-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #dce4ef;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.back-btn {
    background: none;
    border: 1px solid #ccd6e8;
    border-radius: 0.4rem;
    font-size: 1rem;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    color: #4a6fa8;
    flex-shrink: 0;
}

.back-btn:hover {
    background: #f0f5ff;
}

.symbol-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #172033;
    flex: 1;
}

.history-card {
    align-items: flex-start;
    flex-wrap: wrap;
}

.quarter-chip {
    font-size: 0.72rem;
    font-weight: 600;
    color: #4a6fa8;
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: #5a6a80;
    flex: 1;
    min-width: 0;
}

.history-group {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    white-space: nowrap;
}

.history-label {
    font-weight: 600;
    color: #5a6a80;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.history-actual {
    font-weight: 700;
    color: #172033;
}

.history-estimate {
    color: #8a9ab8;
    font-size: 0.72rem;
}

.beat { color: #2a8a4e; }
.miss { color: #c0392b; }

/* ── Header data date ─────────────────────────────────────────────── */

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.header-data-date {
    font-size: 0.72rem;
    color: #8a9ab8;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Tab bar ──────────────────────────────────────────────────────── */

.tab-bar {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #dce4ef;
    padding: 0 0.5rem;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #5a6a80;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: -1px;
    transition: color 0.1s;
}

.tab-btn:hover {
    color: #172033;
}

.tab-active {
    color: #4a90d9;
    border-bottom-color: #4a90d9;
    font-weight: 600;
}

/* ── Favorite button ──────────────────────────────────────────────── */

.fav-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    transition: opacity 0.1s;
}

.fav-btn:hover {
    opacity: 0.85;
}

.fav-btn-add {
    background: #2a8a4e;
    color: #fff;
}

.fav-btn-remove {
    background: #c0392b;
    color: #fff;
}

/* ── Blazor boilerplate ───────────────────────────────────────────── */

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.not-found {
    padding: 2rem;
}

.content-placeholder {
    padding: 2rem;
    color: #5a6a80;
}
