/* CS Agent Common Styles */

.cs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.cs-stat-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.25rem;
}

.cs-stat-card .stat-label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.25rem;
}

.cs-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.badge-open { background: hsl(0 84% 95%); color: hsl(0 84% 40%); }
.badge-pending { background: hsl(38 92% 92%); color: hsl(38 92% 35%); }
.badge-closed { background: hsl(142 71% 92%); color: hsl(142 71% 30%); }
.badge-angry { background: hsl(0 84% 95%); color: hsl(0 84% 40%); }
.badge-negative { background: hsl(38 92% 92%); color: hsl(38 92% 35%); }
.badge-neutral { background: hsl(210 40% 94%); color: hsl(210 40% 40%); }
.badge-positive { background: hsl(142 71% 92%); color: hsl(142 71% 30%); }

/* Table */
.cs-table {
    width: 100%;
    border-collapse: collapse;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
}

.cs-table th,
.cs-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid hsl(var(--border));
    font-size: 0.875rem;
}

.cs-table th {
    background: hsl(var(--muted));
    font-weight: 600;
    color: hsl(var(--muted-foreground));
}

.cs-table tr:hover {
    background: hsl(var(--muted) / 0.5);
}

.cs-table tr.clickable {
    cursor: pointer;
}

/* Section */
.cs-section {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.cs-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

/* Filter bar */
.cs-filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.cs-filter-btn {
    padding: 0.4rem 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--background));
    cursor: pointer;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    transition: all 0.15s;
}

.cs-filter-btn:hover {
    background: hsl(var(--muted));
}

.cs-filter-btn.active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

/* Chat messages */
.cs-chat {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
}

.cs-chat-msg {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
}

.cs-chat-msg.user {
    align-self: flex-end;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.cs-chat-msg.assistant {
    align-self: flex-start;
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
}

.cs-chat-msg .msg-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* Modal */
.cs-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.cs-modal-overlay.show {
    display: flex;
}

.cs-modal {
    background: hsl(var(--card));
    border-radius: var(--radius);
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.cs-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.cs-form-group {
    margin-bottom: 1rem;
}

.cs-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: hsl(var(--foreground));
}

.cs-form-group input,
.cs-form-group select,
.cs-form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid hsl(var(--input));
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    box-sizing: border-box;
}

.cs-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.cs-btn-row {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Empty state */
.cs-empty {
    text-align: center;
    padding: 2rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}
