/* ─── Base & Reset ───────────────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B00;
    --primary-dark: #e05f00;
    --success: #00a36c;
    --danger: #d92d20;
    --warning: #f79009;
    --info: #1570ef;
    --gray-900: #101828;
    --gray-700: #344054;
    --gray-600: #475467;
    --gray-500: #667085;
    --gray-400: #98a2b3;
    --gray-300: #d0d5dd;
    --gray-200: #eaecf0;
    --gray-100: #f2f4f7;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --sidebar-width: 240px;
    --header-height: 64px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--gray-100);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid var(--gray-200);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.logo-subtitle {
    font-size: 10px;
    color: var(--gray-500);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--gray-700);
    font-weight: 500;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--gray-50);
    text-decoration: none;
}

.nav-item.active {
    background: #fff3e8;
    color: var(--primary);
}

.nav-icon {
    font-size: 18px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--gray-200);
}

.reset-db-section {
    margin: 12px 0;
    padding: 8px 0;
    border-top: 1px dashed var(--gray-300);
    border-bottom: 1px dashed var(--gray-300);
}

.btn-reset-db {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--danger, #dc2626);
    background: var(--white);
    border: 1px solid var(--danger, #dc2626);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-reset-db:hover {
    background: var(--danger, #dc2626);
    color: white;
}

.scheduler-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--success);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.version {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 8px;
}

/* ─── Main Content ───────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    max-width: calc(100% - var(--sidebar-width));
}

/* ─── Flash Messages ─────────────────────────────────────────────────────── */
.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.flash-success {
    background: #ecfdf3;
    border: 1px solid #d1fadf;
    color: var(--success);
}

.flash-error {
    background: #fef3f2;
    border: 1px solid #fee4e2;
    color: var(--danger);
}

.flash-info {
    background: #eff8ff;
    border: 1px solid #d1e9ff;
    color: var(--info);
}

.flash-warning {
    background: #fffaeb;
    border: 1px solid #fef0c7;
    color: var(--warning);
}

.flash-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}

.flash-close:hover {
    opacity: 1;
}

/* ─── Page Header ────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-badge {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--gray-600);
}

.subtitle {
    color: var(--gray-500);
    font-size: 13px;
    max-width: 800px;
    line-height: 1.5;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.header-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    font-size: 14px;
    color: var(--gray-600);
}

.stat-item strong {
    color: var(--gray-900);
    font-weight: 600;
}

.stat-item.success strong {
    color: var(--success);
}

.stat-item.danger strong {
    color: var(--danger);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
    border-color: var(--warning);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Stats Grid ─────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-card.primary .stat-value {
    color: var(--primary);
}

.stat-card.success .stat-value {
    color: var(--success);
}

.stat-card.danger .stat-value {
    color: var(--danger);
}

.stat-card.warning .stat-value {
    color: var(--warning);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Section Headers ────────────────────────────────────────────────────── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-900);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-all {
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

/* ─── Data Tables ────────────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-50);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table.compact th,
.data-table.compact td {
    padding: 8px 12px;
}

/* ─── Badges ───────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #ecfdf3;
    color: var(--success);
}

.badge-danger {
    background: #fef3f2;
    color: var(--danger);
}

.badge-warning {
    background: #fffaeb;
    color: var(--warning);
}

.badge-primary {
    background: #eff8ff;
    color: var(--info);
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-info {
    background: #eef4ff;
    color: var(--info);
}

.text-info {
    color: var(--info);
}

.stat-item.info strong {
    color: var(--info);
}

/* ─── Dashboard Columns ──────────────────────────────────────────────────── */
.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.dashboard-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
}

/* ─── Call Cards ───────────────────────────────────────────────────────────── */
.call-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 8px;
}

.call-card:last-child {
    margin-bottom: 0;
}

.call-destination {
    font-weight: 500;
    color: var(--gray-900);
}

.call-meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.call-status {
    text-align: right;
}

.call-duration {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ─── Progress Bar ───────────────────────────────────────────────────────── */
.progress-bar {
    width: 100px;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 11px;
    color: var(--gray-500);
    margin-left: 8px;
}

/* ─── Empty States ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.empty-state.large {
    padding: 80px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.page-info {
    font-size: 13px;
    color: var(--gray-600);
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-container {
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 6px;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-prompt {
    pointer-events: none;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.upload-hint {
    font-size: 12px;
    color: var(--gray-500);
}

.file-preview {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
}

.file-name {
    font-weight: 500;
}

.file-size {
    font-size: 12px;
    color: var(--gray-500);
}

.sample-link {
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

/* Agent Chips */
.agent-selection {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 16px;
}

.agent-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.agent-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.agent-chip {
    position: relative;
}

.agent-chip input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.chip-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.agent-chip input:checked + .chip-content {
    background: #fff3e8;
    border-color: var(--primary);
    color: var(--primary);
}

.agent-name {
    font-weight: 500;
    font-size: 13px;
}

.agent-number {
    font-size: 11px;
    color: var(--gray-500);
}

/* Info Box */
.info-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.info-box h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.tag {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
}

.code-block {
    background: var(--gray-900);
    color: var(--gray-300);
    border-radius: 8px;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 12px;
}

/* Detail Columns */
.detail-columns {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-top: 24px;
}

.detail-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
}

/* Agent Cards */
.agent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agent-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
}

.agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.agent-avatar.small {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.agent-info {
    flex: 1;
}

.agent-name {
    font-weight: 500;
}

.agent-number {
    font-size: 12px;
    color: var(--gray-500);
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.status-progress {
    flex: 1;
}

.progress-label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.progress-track {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-running {
    background: var(--success);
    animation: pulse 2s infinite;
}

.status-paused {
    background: var(--warning);
}

.status-stopped,
.status-completed {
    background: var(--gray-400);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Inline Forms */
.inline-form {
    display: inline;
}

.inline-form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.inline-form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Form Card */
.form-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.form-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Toggle Switch */
.toggle-form {
    display: inline;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Text colors */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--gray-500); }

.mono {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
}

/* Refresh Indicator */
.refresh-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 16px;
}

.refresh-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 1.5s infinite;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-select,
.filter-input {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 13px;
    min-width: 140px;
}

.filter-input {
    min-width: 200px;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.alert-warning {
    background: #fffaeb;
    border: 1px solid #fedf89;
    color: var(--warning);
}

/* Section */
.section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
}

/* Table Container */
.table-container {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
}

/* Call Detail Page */
.call-detail-container {
    max-width: 1000px;
}

.detail-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.call-status-large {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-icon {
    font-size: 24px;
}

.status-text {
    font-size: 24px;
    font-weight: 700;
}

.status-text.answered {
    color: var(--success);
}

.status-text.failed {
    color: var(--danger);
}

.status-text.missed {
    color: var(--warning);
}

.call-meta-large .contact-name {
    font-size: 16px;
    font-weight: 500;
}

.call-meta-large .call-time {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

.call-phones {
    font-size: 14px;
    color: var(--gray-700);
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.phone-label {
    color: var(--gray-500);
}

.phone-separator {
    color: var(--gray-300);
}

.detail-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.detail-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.ai-summary .summary-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-700);
    margin-bottom: 16px;
}

.ai-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.ai-metrics .metric label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ai-metrics .metric value {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.metrics-row .metric-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.metrics-row .metric-card value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.metrics-row .metric-card label {
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.detail-item value {
    font-size: 14px;
    color: var(--gray-900);
    font-weight: 500;
}

.audio-player {
    width: 100%;
    margin-bottom: 12px;
}

.external-link {
    font-size: 13px;
    color: var(--primary);
}

.conversation {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-avatar {
    font-size: 20px;
}

.chat-bubble {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 12px 16px;
    max-width: 80%;
}

.chat-message.user .chat-bubble {
    background: #fff3e8;
}

.conversation-card {
    background: linear-gradient(135deg, #fafbfc 0%, #f0f4f8 100%);
}

.conversation-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qa-count {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.chat-content {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.breadcrumb-separator {
    color: var(--gray-400);
    margin: 0 8px;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .dashboard-columns,
    .detail-columns {
        grid-template-columns: 1fr;
    }
    
    .ai-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .app-container {
        flex-direction: column;
    }
    
    /* Table responsive - horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    .data-table {
        min-width: 900px;
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        white-space: nowrap;
    }
    
    /* Filters responsive */
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filters-bar .filter-group {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .filters-bar select,
    .filters-bar input[type="date"],
    .filters-bar input[type="text"] {
        width: 100% !important;
        min-width: auto !important;
    }
    
    /* Page header responsive */
    .page-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    /* Stats cards smaller */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    /* Cards full width */
    .dashboard-columns,
    .detail-columns {
        grid-template-columns: 1fr;
    }
    
    /* Buttons stack */
    .button-group {
        flex-direction: column;
        width: 100%;
    }
    
    .button-group .btn {
        width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        min-width: 800px;
    }
    
    .filter-select {
        font-size: 14px;
        padding: 8px;
    }
}
