:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

header h1 i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* Stats */
.stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-value.failed {
    color: var(--error-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-indicator {
    font-size: 12px;
}

.status-indicator.online {
    color: var(--success-color);
}

.status-indicator.offline {
    color: var(--error-color);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 10px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.tab-button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button:hover {
    background: var(--bg-color);
}

.tab-button.active {
    background: var(--primary-color);
    color: white;
}

/* Content */
.content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    min-height: 600px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.date-filter {
    position: relative;
}

.date-filter i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.date-filter input {
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.date-filter input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.log-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.log-filters select,
.log-filters input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.log-filters input {
    width: 100px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: #5558e3;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

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

.btn-retry {
    background: var(--warning-color);
    color: white;
    margin-right: 10px;
}

.btn-retry:hover {
    background: #d97706;
}

/* Loading */
.loading {
    text-align: center;
    padding: 50px;
    color: var(--text-secondary);
}

.loading i {
    font-size: 24px;
    margin-right: 10px;
}

/* No data */
.no-data {
    text-align: center;
    padding: 50px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Error */
.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error-color);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Meetings List */
.meeting-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s;
    cursor: pointer;
}

.meeting-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.meeting-card.unprocessed {
    background: #fef3c7;
    border-color: #f59e0b;
}

.meeting-card.unprocessed:hover {
    border-color: #d97706;
}

.meeting-card.processed {
    background: #f0fdf4;
    border-color: #86efac;
}

.meeting-card.failed {
    background: #fef2f2;
    border-color: #fecaca;
}

.meeting-card.processing {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.status-badge {
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 10px;
}

.status-badge.failed {
    background: var(--error-color);
}

.status-badge.processing {
    background: var(--primary-color);
}

.meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.meeting-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.meeting-id {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: monospace;
}

.meeting-date {
    font-size: 14px;
    color: var(--text-secondary);
}

.meeting-overview {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.meeting-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Channel and routing info */
.channel-info {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.channel-info i {
    color: var(--primary-color);
    margin-right: 5px;
}

.confidence {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 10px;
}

.failure-reason {
    margin-top: 10px;
    padding: 10px;
    background: #fef2f2;
    border-radius: 6px;
    font-size: 13px;
    color: var(--error-color);
}

.failure-reason i {
    margin-right: 5px;
}

/* Logs Container */
.logs-container {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    max-height: 600px;
    overflow-y: auto;
}

.log-entry {
    padding: 8px 0;
    border-bottom: 1px solid #334155;
    display: flex;
    gap: 15px;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.log-warning {
    background: rgba(251, 191, 36, 0.1);
}

.log-entry.log-error {
    background: rgba(239, 68, 68, 0.1);
}

.log-timestamp {
    color: #94a3b8;
    white-space: nowrap;
}

.log-level {
    font-weight: 600;
    width: 60px;
}

.log-level.info {
    color: #60a5fa;
}

.log-level.warning {
    color: #fbbf24;
}

.log-level.error {
    color: #f87171;
}

.log-level.debug {
    color: #a78bfa;
}

.log-message {
    flex: 1;
    word-wrap: break-word;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    box-shadow: var(--shadow-lg);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--text-primary);
}

/* Meeting Details */
.meeting-detail-header {
    margin-bottom: 30px;
}

.meeting-detail-header h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.meeting-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-section {
    margin-bottom: 25px;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.detail-section h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.detail-section p,
.detail-section ul {
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 100%;
    word-break: break-word;
}

.detail-section ul {
    list-style-position: inside;
    margin-left: 20px;
}

/* Status section in detail view */
.status-section {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
}

.status-info {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-label {
    font-weight: 600;
    color: var(--text-primary);
}

.status-value {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.status-value.processed {
    background: #d1fae5;
    color: #065f46;
}

.status-value.failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-value.processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-value.pending {
    background: #fef3c7;
    color: #92400e;
}

.channel-tag {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.routing-method {
    font-size: 12px;
    color: var(--text-secondary);
}

.failure-text {
    color: var(--error-color);
}

/* Participants, topics, keywords */
.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    max-width: 100%;
}

.participant-badge {
    background: var(--bg-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    word-break: break-word;
    max-width: 100%;
    overflow-wrap: break-word;
}

.topics-list,
.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.topic-tag,
.keyword-tag {
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.keyword-tag {
    background: #fef3c7;
    color: #92400e;
}

/* Actions section */
.actions-section {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.formatted-text {
    white-space: pre-wrap;
    font-family: inherit;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 24px;
    }

    .stats {
        gap: 20px;
    }

    .stat-value {
        font-size: 24px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }

    .meeting-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
} 