/* ============================================
   styles.css — index.html (main dashboard)
   ============================================ */

:root {
    color-scheme: dark;
}

body {
    background-color: #171717;
    color: #eeeeee;
}

.status-success {
    background-color: rgba(39, 130, 80, 0.2);
    color: #4ade80;
}

.status-error {
    background-color: rgba(241, 106, 117, 0.2);
    color: #f87171;
}

.tab-btn.active {
    border-bottom: 2px solid #ff6f5c;
    color: #ff6f5c;
}

/* Markdown Chat Styling */
.prose-chat table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.prose-chat th {
    background: rgba(99, 102, 241, 0.1);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    color: #818cf8;
    white-space: nowrap;
}

.prose-chat td {
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #d1d5db;
    white-space: nowrap;
}

.prose-chat strong {
    color: #818cf8;
    font-weight: 600;
}

.prose-chat ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.prose-chat p {
    margin-bottom: 0.75rem;
}

.prose-chat p:last-child {
    margin-bottom: 0;
}

/* Select styling fixes for visibility */
select {
    color-scheme: dark;
}

select option {
    background-color: #222222;
    color: #eeeeee;
}

/* ── Skeleton Loading States ─────────────────────────── */
@keyframes sk-shimmer {
    to { background-position: 200% center; }
}

/* Base shimmer block */
.sk {
    background: linear-gradient(90deg, #242424 25%, #2e2e2e 50%, #242424 75%);
    background-size: 200% auto;
    animation: sk-shimmer 1.6s linear infinite;
    border-radius: 4px;
}

/* Overlay that covers a relative-positioned card/chart wrapper */
.sk-overlay {
    position: absolute;
    inset: 0;
    background: #222222;
    z-index: 10;
    border-radius: inherit;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 12px 0;
    justify-content: flex-end;
    transition: opacity 0.5s ease;
}

/* Fade-out when data is ready */
.sk-overlay.done {
    opacity: 0;
    pointer-events: none;
}

/* KPI card variant — top-aligned label + value bars */
.sk-overlay.sk-kpi {
    justify-content: flex-start;
    padding: 20px;
    gap: 12px;
}

/* Fake bars row — children are individual bars */
.sk-bars {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    flex: 1;
}

.sk-bars > .sk-bar {
    flex: 1;
    min-width: 0;
    border-radius: 4px 4px 0 0;
}

/* ── Active Filter Styling ── */
.filter-active-glow {
    background: linear-gradient(135deg, rgba(39, 130, 80, 0.4) 0%, rgba(23, 23, 23, 0.4) 100%) !important;
    border-color: rgba(74, 222, 128, 0.5) !important;
    box-shadow: 0 0 20px -5px rgba(39, 130, 80, 0.3);
    transition: all 0.3s ease;
}

@keyframes filter-pulse {
    0% { border-color: rgba(74, 222, 128, 0.1); box-shadow: 0 0 5px rgba(39, 130, 80, 0.1); }
    50% { border-color: rgba(74, 222, 128, 0.5); box-shadow: 0 0 20px rgba(39, 130, 80, 0.3); }
    100% { border-color: rgba(74, 222, 128, 0.1); box-shadow: 0 0 5px rgba(39, 130, 80, 0.1); }
}

.filter-loading-pulse {
    animation: filter-pulse 1.5s ease-in-out infinite !important;
    pointer-events: none;
}
