/* ===========================================
   Tables
   =========================================== */

/* Base Tables */
.user-table,
.messages-table,
.projects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

/* Defensive fallback: a bare, unclassed <table> dropped inside a card would
   otherwise inherit no theming and render invisible (transparent text/bg). */
.overview-card table,
.content-card table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.overview-card table th,
.overview-card table td,
.content-card table th,
.content-card table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.overview-card table th,
.content-card table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.user-table th,
.user-table td,
.messages-table th,
.messages-table td,
.projects-table th,
.projects-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    background-color: transparent;
}

.user-table th,
.messages-table th,
.projects-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    background-color: var(--surface);
}

.user-table tr,
.messages-table tr,
.projects-table tr {
    background-color: var(--c-bg);
}

.messages-table th {
    cursor: pointer;
}

.messages-table th:hover {
    color: var(--text-secondary);
}

.user-table tbody tr:hover,
.messages-table tbody tr:hover,
.projects-table tbody tr:hover {
    background: var(--surface);
}

.projects-table tfoot {
    font-weight: 600;
    background: var(--surface);
}

/* Links in tables */
.user-table a,
.messages-table a,
.projects-table a {
    color: var(--text-primary);
    text-decoration: none;
}

.user-table a:hover,
.messages-table a:hover,
.projects-table a:hover {
    color: var(--c-secondary);
}

/* Message text in tables */
.messages-table .message-text {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Clickable rows */
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: var(--surface);
}

/* Cost/token values */
.cost-value {
    font-family: monospace;
    font-weight: 600;
}

.token-value {
    color: var(--text-secondary);
}

.no-action {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Messages Section Container */
.messages-section,
.projects-section {
    background: var(--c-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.messages-section h3,
.projects-section h3 {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
}
