/* Token usage — live stream counter and usage dashboard. */

/* Live counter under the streaming progress timeline */
.search-live-tokens {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #57606a;
    font-variant-numeric: tabular-nums;
}

/* Token count in answer metadata and session headers */
.answer-tokens,
.session-tokens {
    color: #57606a;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

/* Usage dashboard page */
.tokens-page {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.tokens-container {
    width: 100%;
    max-width: 960px;
}

.tokens-heading {
    margin-bottom: 0.25rem;
}

.tokens-subtitle {
    color: #57606a;
    margin-bottom: 1.5rem;
}

.tokens-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tokens-card {
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    background: #fff;
}

.tokens-card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #57606a;
    margin-bottom: 0.35rem;
}

.tokens-card-value {
    font-size: 1.6rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tokens-card-detail {
    font-size: 0.85rem;
    color: #57606a;
    margin-top: 0.25rem;
    font-variant-numeric: tabular-nums;
}

/* Budget progress bar */
.tokens-budget-bar {
    height: 8px;
    border-radius: 999px;
    background: #eaeef2;
    overflow: hidden;
    margin-top: 0.6rem;
}

.tokens-budget-fill {
    height: 100%;
    border-radius: 999px;
    background: #218bff;
}

.tokens-budget-fill.is-near-budget {
    background: #d4a72c;
}

.tokens-budget-fill.is-over-budget {
    background: #cf222e;
}

/* Breakdown tables */
.tokens-section-heading {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.1rem;
}

.tokens-table-wrap {
    overflow-x: auto;
}

.tokens-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tokens-table th,
.tokens-table td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #eaeef2;
}

.tokens-table td.num,
.tokens-table th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tokens-empty {
    color: #57606a;
    padding: 1rem 0;
}

.tokens-unavailable {
    border: 1px solid #d4a72c;
    background: #fff8e5;
    color: #7d5a00;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
