/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    overflow: hidden;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    flex-shrink: 0;
}

.map-activity-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.card {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,188,212,0.15);
    border-color: var(--accent-color);
}

.card h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 300;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.inference-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    width: 100%;
}

.inference-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.inference-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.inference-stat .stat-value {
    font-size: 2rem;
    font-weight: 700;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.inference-stat .stat-value.identified {
    color: #4ade80;
}

.inference-stat .stat-value.unidentified {
    color: #f87171;
}

.chart-container {
    position: relative;
    height: 60px;
    width: 100%;
}

#inferenceChart {
    min-height: 80px;
}

/* Accumulator Cards - Chart at bottom */
.accumulator-card {
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.accumulator-card .stat-number.accumulator {
    font-size: 2.5rem;
    margin-bottom: 0;
    margin-top: 0.5rem;
}

.accumulator-card .chart-container.chart-bottom {
    height: 60px;
    flex-shrink: 0;
    margin-top: auto;
}

.accumulator-card .stat-number.alert-stat {
    color: #f59e0b;
}

/* ========================================
   Live Data Animation Effects
   ======================================== */

/* Brief highlight animation - plays once when value changes */
@keyframes valueChange {
    0% { color: var(--accent-color); transform: scale(1.05); }
    100% { color: inherit; transform: scale(1); }
}

/* Static live indicator (no constant animation noise) */
.stat-number.live-data {
    /* No animation when displaying data - clean look */
}

/* Triggered only when value changes (add via JS) */
.stat-number.value-updated {
    animation: valueChange 0.4s ease-out forwards;
}

/* Live indicator dot on cards - static green dot, no pulsing */
.accumulator-card.live-card::before {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.5);
    /* Static indicator - no animation noise */
}

/* Ensure accumulator cards are positioned for the dot */
.accumulator-card {
    position: relative;
}

/* Chart container - clean, no glow animation */
.chart-container.live-chart {
    position: relative;
}

.stat-label-bottom {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* Inference Card - Centered Content */
.inference-card {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
}

.inference-card h3 {
    width: 100%;
    margin-bottom: 1.5rem;
}

.inference-card .inference-stats {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.inference-card .chart-container {
    display: none; /* Hide bottom chart/legend */
}

/* ========================================
   Inference Card Live Indicator
   ======================================== */

/* Live inference card - position for dot */
.inference-card.live-inference {
    position: relative;
}

/* Static green dot indicator on inference card - no animation noise */
.inference-card.live-inference::before {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
    /* Static indicator - clean look when data > 0 */
}

.strength-bar-container {
    display: none; /* Hide progress bar as per user request */
}

.strength-bar-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-align: center;
}

.strength-bar {
    height: 12px;
    background: rgba(248, 113, 113, 0.3);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    position: relative;
}

.strength-bar-identified {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 6px 0 0 6px;
    transition: width 0.5s ease;
}

.strength-bar-unidentified {
    height: 100%;
    background: linear-gradient(90deg, #f87171, #ef4444);
    transition: width 0.5s ease;
}

.strength-bar-percentage {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4ade80;
    text-align: center;
    margin-top: 0.5rem;
}

.strength-bar-percentage.low {
    color: #f87171;
}

.strength-bar-percentage.medium {
    color: #f59e0b;
}

/* Phase 27.5: Unknown Entities Merged Card - Compact Layout Above Activity */
.unknown-entities-merged {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(0, 188, 212, 0.05) 100%);
    border-color: rgba(0, 188, 212, 0.3);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.unknown-entities-merged .entities-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.unknown-entities-merged .entities-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-color);
    margin: 0;
}

.unknown-entities-merged .entity-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

.unknown-entities-merged .entity-link:hover {
    text-decoration: underline;
}

.unknown-entities-merged .entities-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 1rem;
}

.unknown-entities-merged .entity-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.unknown-entities-merged .entity-icon {
    font-size: 1.5rem;
}

.unknown-entities-merged .entity-counts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.unknown-entities-merged .entity-unique {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.unknown-entities-merged .entity-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.unknown-entities-merged .entity-meta {
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    color: var(--text-secondary);
    gap: 0.15rem;
}

.unknown-entities-merged .entity-meta strong {
    color: var(--text-primary);
}

.unknown-entities-merged .entity-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}
