/* ═══════════════════════════════════════════════
   Ágora Frequência — Design System
   Minimalista · Premium · Sofisticado
   ═══════════════════════════════════════════════ */

/* ─── Reset & Base ──────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-page: #F8F7F4;
    --bg-white: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-hover: #F5F5F3;
    --bg-active: #EDEDEA;
    --text-primary: #111111;
    --text-secondary: #6B6B6B;
    --text-tertiary: #9E9E9E;
    --text-inverse: #FFFFFF;
    --border: #E5E5E5;
    --border-light: #F0F0EE;
    --accent: #1A1A1A;
    --accent-hover: #333333;
    --accent-light: #F0F0EE;
    --success: #2E7D32;
    --warning: #E65100;
    --error: #C62828;
    --info: #1565C0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    --sidebar-w: 240px;
    --header-h: 0px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ─── Tipografia ────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; font-weight: 650; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 0.95rem; font-weight: 600; }

p { color: var(--text-secondary); }
small { font-size: 0.85rem; color: var(--text-tertiary); }

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s;
}
a:hover { color: var(--accent-hover); }

/* ─── Layout ───────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-logo h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.sidebar-logo span {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    display: block;
    margin-top: 2px;
}

.sidebar-nav {
    padding: 12px 10px;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 450;
    color: var(--text-secondary);
    transition: all 0.15s;
    margin-bottom: 2px;
}

.sidebar-nav a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: var(--bg-active);
    color: var(--text-primary);
    font-weight: 500;
}

.sidebar-nav a .nav-icon {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.7;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 40px 48px;
    max-width: 1200px;
    width: calc(100% - var(--sidebar-w));
}

/* ─── Page Header ───────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    gap: 20px;
}

.page-header h1 {
    margin-bottom: 4px;
}

.page-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ─── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-inverse);
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--text-tertiary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--border);
}
.btn-danger:hover:not(:disabled) {
    background: #FFF5F5;
    border-color: var(--error);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* ─── Cards ────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: box-shadow 0.2s;
}
.card:hover {
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.card-stat {
    text-align: center;
    padding: 24px 20px;
}
.card-stat .stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.card-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ─── Forms ────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label .hint {
    font-weight: 400;
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: border-color 0.15s;
    outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

.form-textarea-lg {
    min-height: 200px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}

.form-checkbox label {
    font-size: 0.9rem;
    cursor: pointer;
}

/* ─── Tags / Chips ────────────────────────── */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
    background: var(--bg-active);
    color: var(--text-secondary);
}

.tag-active {
    background: #E8F5E9;
    color: var(--success);
}
.tag-draft {
    background: #FFF8E1;
    color: #F57F17;
}
.tag-archived {
    background: var(--bg-hover);
    color: var(--text-tertiary);
}
.tag-running {
    background: #E3F2FD;
    color: var(--info);
}
.tag-error {
    background: #FFEBEE;
    color: var(--error);
}

/* ─── Stats Bar ────────────────────────────── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.stat-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
}

.stat-item .stat-num {
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.stat-item .stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ─── Intelligence Cards ──────────────────── */
.intel-card {
    cursor: pointer;
    transition: all 0.2s;
}
.intel-card:hover {
    box-shadow: var(--shadow-md);
}

.intel-card .intel-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.intel-card .intel-info h3 {
    font-size: 1rem;
    margin-bottom: 2px;
}
.intel-card .intel-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.intel-card .intel-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

/* ─── Form Section (Agora New) ────────────── */
.form-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
}

.form-section h3 {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.form-section .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
}

/* ─── Select Intelligence Grid ─────────────── */
.intel-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.intel-select-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.intel-select-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.intel-select-card.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.intel-select-card .intel-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 auto 8px;
}

.intel-select-card h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.intel-select-card p {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

/* ─── Timeline (Agora detail) ─────────────── */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2px solid var(--border);
}

.timeline-dot.active {
    background: var(--accent);
    border-color: var(--accent);
}

.timeline-dot.completed {
    background: var(--success);
    border-color: var(--success);
}

.timeline-item h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.timeline-item p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.timeline-item .time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ─── Contribution Card ────────────────────── */
.contrib-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.contrib-card .contrib-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.contrib-card .contrib-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.contrib-card .contrib-content {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.contrib-card .contrib-content strong {
    font-weight: 600;
}

/* ─── Result Section ──────────────────────── */
.result-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-bottom: 20px;
}

.result-section h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    font-weight: 500;
}

.result-section .result-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.result-section .result-body ul {
    margin: 8px 0;
    padding-left: 20px;
}

.result-section .result-body li {
    margin-bottom: 4px;
}

/* ─── Empty State ──────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    max-width: 420px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

/* ─── Table ───────────────────────────────── */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}

table td {
    padding: 12px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
}

table tr:hover td {
    background: var(--bg-hover);
}

table tr:last-child td {
    border-bottom: none;
}

/* ─── Flash Messages ──────────────────────── */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash-message {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 450;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.2s ease;
    max-width: 400px;
}

.flash-success {
    background: #E8F5E9;
    color: var(--success);
    border: 1px solid #C8E6C9;
}

.flash-error {
    background: #FFEBEE;
    color: var(--error);
    border: 1px solid #FFCDD2;
}

.flash-info {
    background: #E3F2FD;
    color: var(--info);
    border: 1px solid #BBDEFB;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ─── Upload Box ───────────────────────────── */
.upload-box {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.upload-box:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.upload-box p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ─── Filters Bar ─────────────────────────── */
.filters-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.filters-bar .form-select,
.filters-bar .form-input {
    width: auto;
    min-width: 160px;
}

/* ─── Modal ────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.15s;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    min-width: 480px;
    max-width: 640px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ─── Utils ───────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.font-mono { font-family: var(--font-mono); font-size: 0.85rem; }

/* ─── Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .main-content {
        margin-left: 0;
        padding: 24px 20px;
        width: 100%;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .intel-select-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .filters-bar {
        flex-direction: column;
    }
    .filters-bar .form-select,
    .filters-bar .form-input {
        width: 100%;
    }
    .stats-bar {
        grid-template-columns: 1fr 1fr;
    }
    .modal-content {
        min-width: auto;
        width: 90%;
    }
}

@media (max-width: 480px) {
    .intel-select-grid {
        grid-template-columns: 1fr;
    }
    .stats-bar {
        grid-template-columns: 1fr;
    }
}

/* ─── Upload Zone ─────────────────────────── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--bg-page);
}
.upload-zone:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}
.upload-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-tertiary);
}
.upload-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.upload-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}
.file-attached {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
}
.file-name {
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-mono);
    color: var(--text-primary);
}
.participant-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    transition: box-shadow 0.15s;
}
.participant-badge:hover {
    box-shadow: var(--shadow-sm);
}
.result-report {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.result-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
}
.result-section h3 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}
.result-body {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-primary);
}
.section-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}
.prompt-display {
    background: var(--bg-page);
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.7;
    white-space: pre-wrap;
}
.contrib-item {
    background: var(--bg-page);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-top: 6px;
}
.contrib-item strong {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.contrib-item p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
}
.intel-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    flex-shrink: 0;
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.3;
    color: var(--text-primary);
}
.empty-state h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.empty-state p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}
.filter-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 20px;
    align-items: flex-end;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.quick-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-top: 32px;
}
.quick-action h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}
.quick-action p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.table-container {
    overflow-x: auto;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
}
td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
    vertical-align: middle;
}
tr:last-child td {
    border-bottom: none;
}
tr:hover td {
    background: var(--bg-hover);
}
.welcome-section {
    margin-bottom: 28px;
}
.welcome-section h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.welcome-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 4px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.stat-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--accent);
}
.stat-num {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 4px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.section-header h2 {
    font-size: 1.1rem;
}
.flex { display: flex; }
.items-center { align-items: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.p-8 { padding: 8px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.hidden { display: none !important; }
.w-full { width: 100%; }
.form-input-lg {
    padding: 14px 16px;
    font-size: 1rem;
}
.form-textarea-xl {
    min-height: 250px;
    font-size: 0.95rem;
    line-height: 1.7;
    padding: 16px;
}
.intel-card {
    cursor: pointer;
    transition: all 0.2s;
}
.intel-card:hover {
    box-shadow: var(--shadow-md);
}

/* ─── Tab Bar ─────────────────────────────── */
.tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-page);
}
.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 450;
    color: var(--text-tertiary);
    transition: all 0.15s;
    font-family: inherit;
    text-align: center;
}
.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}
.tab-btn.active {
    background: var(--bg-white);
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: inset 0 -2px 0 var(--accent);
}
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}
