.psychology-stats .stat-value {
    font-size: 24px;
}

.psychology-grid {
    align-items: stretch;
}

.rules-card {
    grid-column: span 2;
}

.action-card {
    grid-column: span 2;
}

.analytics-card {
    grid-column: span 3;
}

.connotation-card {
    grid-column: span 1;
}

.insights-card {
    grid-column: span 4;
}

.rule-list,
.insights-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.rule-item,
.insight-item-row {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rule-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.rule-meta {
    font-size: 12px;
    color: #64748b;
}

.empty-state {
    margin-top: 12px;
    font-size: 13px;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    padding: 12px;
    border-radius: 10px;
}

.action-input {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.action-text-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: "Inter", sans-serif;
    background: #ffffff;
}

.action-list {
    display: grid;
    gap: 8px;
}

.action-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.action-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #0f172a;
}

.action-label input {
    width: 16px;
    height: 16px;
}

.action-remove {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.chart-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    background: #ffffff;
}

.chart-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0f172a;
}

.chart-wrap {
    position: relative;
    min-height: 200px;
}

.chart-wrap canvas {
    width: 100%;
    height: 200px;
}

.chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 12px;
    color: #94a3b8;
    background: rgba(248, 250, 252, 0.85);
    border-radius: 8px;
}

.insight-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.insight-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fafc;
}

.insight-label {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 6px;
}

.insight-value {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.connotation-group {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip-positive {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.chip-neutral {
    background: #e2e8f0;
    color: #475569;
    border-color: #e2e8f0;
}

.chip-negative {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.badge-soft {
    background: #e2e8f0;
    color: #475569;
}

body.dark .rule-item,
body.dark .insight-item-row,
body.dark .action-item,
body.dark .chart-card,
body.dark .insight-item {
    background: #101418;
    border-color: #1f2937;
}

body.dark .action-text-input {
    background: #0f1318;
    border-color: #1f2937;
    color: #e2e8f0;
}

body.dark .rule-title,
body.dark .chart-title,
body.dark .insight-value,
body.dark .action-label {
    color: #f8fafc;
}

body.dark .rule-meta,
body.dark .insight-label,
body.dark .action-remove {
    color: #94a3b8;
}

body.dark .empty-state {
    background: #0f1318;
    border-color: #1f2937;
    color: #94a3b8;
}

body.dark .chart-empty {
    background: rgba(15, 19, 24, 0.9);
}

body.dark .chip-positive {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.3);
}

body.dark .chip-negative {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark .chip-neutral {
    background: #1f2937;
    color: #cbd5f5;
    border-color: #1f2937;
}

@media (max-width: 1100px) {
    .rules-card,
    .action-card,
    .analytics-card,
    .connotation-card,
    .insights-card {
        grid-column: span 4;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .insight-row {
        grid-template-columns: 1fr;
    }
}

