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

:root {
    --primary: #1a5f7a;
    --primary-dark: #134b61;
    --secondary: #57837b;
    --accent: #c38154;
    --bg: #fefefe;
    --bg-alt: #f5f5f5;
    --text: #2d2d2d;
    --text-muted: #666;
    --border: #ddd;
    --success: #4caf50;
    --error: #f44336;
    --sidebar-width: 280px;
    --card-bg: white;
    --input-bg: white;
    --highlight-bg: #fff3cd;
}

/* Dark mode */
[data-theme="dark"] {
    --primary: #5cc8e0;
    --primary-dark: #4ab8d0;
    --secondary: #7ba39c;
    --accent: #d4956a;
    --bg: #1a1a1a;
    --bg-alt: #252525;
    --text: #e0e0e0;
    --text-muted: #999;
    --border: #404040;
    --card-bg: #2a2a2a;
    --input-bg: #333;
    --highlight-bg: #4a4020;
    --header-bg: #0d3a4a;
}

[data-theme="dark"] header {
    background: var(--header-bg);
}

[data-theme="dark"] .search-box button,
[data-theme="dark"] .btn-primary {
    background: var(--header-bg);
}

[data-theme="dark"] .search-box button:hover,
[data-theme="dark"] .btn-primary:hover {
    background: #0a2d3a;
}

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

/* Header */
header {
    background: var(--primary);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    text-transform: lowercase;
}

.logo-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.6rem;
    font-weight: normal;
    margin-top: -0.1rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin-left: auto;
    margin-right: 1.5rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
    text-transform: lowercase;
}

nav a:hover {
    color: white;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    color: white;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon,
:root:not([data-theme]) .theme-toggle .icon-moon {
    display: inline;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: inline;
}

.logout-btn {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-left: 1rem;
    transition: all 0.2s;
}

.logout-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

/* Main */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 140px);
}

/* Footer */
footer {
    background: var(--bg-alt);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* Search Page - Sidebar Layout */
.search-page {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.sidebar-header h3 {
    color: var(--primary);
    font-size: 1.2rem;
    text-transform: lowercase;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: lowercase;
}

.btn-text:hover {
    color: var(--primary);
    text-decoration: underline;
}

.filter-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h4 {
    color: var(--text);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: lowercase;
}

.period-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.period-inputs input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    background: var(--input-bg);
    color: var(--text);
}

.period-inputs span {
    color: var(--text-muted);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.filter-options-inline {
    flex-direction: row;
    gap: 0.75rem;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    padding: 0.15rem 0;
    font-size: 0.8rem;
    color: var(--text);
    text-transform: lowercase;
}

.filter-options label:hover {
    color: var(--primary);
}

.filter-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* Multi-select dropdown */
.multi-select {
    position: relative;
}

.multi-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--input-bg);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.multi-select-header:hover {
    border-color: var(--primary);
}

.multi-select-text {
    color: var(--text-muted);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multi-select-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.multi-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
    max-height: 280px;
    overflow: hidden;
}

.multi-select-dropdown.open {
    display: block;
}

.multi-select-search {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.multi-select-search input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
}

.multi-select-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.multi-select-options {
    max-height: 220px;
    overflow-y: auto;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.1s;
    text-transform: lowercase;
}

.multi-select-option:hover {
    background: var(--bg-alt);
}

.multi-select-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
}

.multi-select-option .count {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: auto;
}

/* Event card países */
.event-card .paises {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.event-card .paises strong {
    font-weight: 500;
}

/* Main Content */
.search-main {
    flex: 1;
    min-width: 0;
}

.search-header {
    margin-bottom: 0.75rem;
}

.search-header h1 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-transform: lowercase;
}

.search-box {
    display: flex;
    gap: 1rem;
}

.search-box input {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
    background: var(--input-bg);
    color: var(--text);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box button {
    padding: 0.875rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: 8px;
}

.stats {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.stats .total-count {
    font-weight: 600;
    color: var(--primary);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.sort-options label {
    color: var(--text-muted);
}

.sort-options select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
}

/* Results */
.results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.results .placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
}

.event-card {
    padding: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.event-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.event-card .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.event-card .date {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.event-card .header-tags {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.event-card .tipo {
    padding: 0.2rem 0.6rem;
    background: var(--secondary);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: lowercase;
}

.event-card .tipo.tipo-geral { background: #78909c; }
.event-card .tipo.tipo-bilateral { background: #5c6bc0; }
.event-card .tipo.tipo-interno { background: #26a69a; }
.event-card .tipo.tipo-regional { background: #7e57c2; }
.event-card .tipo.tipo-multilateral { background: #42a5f5; }
.event-card .tipo.tipo-plurilateral { background: #ec407a; }
.event-card .tipo.tipo-trilateral { background: #ab47bc; }

/* Tags de categoria e abrangência */
.tag-categoria {
    padding: 0.2rem 0.5rem;
    background: #e3f2fd !important;
    color: #1565c0 !important;
    border-radius: 4px;
    font-size: 0.75rem;
}

.tag-abrangencia {
    padding: 0.2rem 0.5rem;
    background: #f3e5f5 !important;
    color: #7b1fa2 !important;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Tags de local e brasil */
.tag-local {
    padding: 0.2rem 0.5rem;
    background: #fff3e0 !important;
    color: #e65100 !important;
    border-radius: 4px;
    font-size: 0.75rem;
}

.tag-brasil {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.tag-brasil.com-brasil {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
}

.tag-brasil.sem-brasil {
    background: #fce4ec !important;
    color: #c2185b !important;
}

.event-card .card-titulo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0.5rem 0;
    line-height: 1.3;
}

.event-card .fato {
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.event-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1;
}

.event-card .tag {
    padding: 0.15rem 0.5rem;
    background: var(--bg-alt);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: lowercase;
}

.event-card a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.event-card a:hover {
    text-decoration: underline;
}

/* Highlight de busca */
.event-card mark {
    background: var(--highlight-bg);
    color: var(--text);
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

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

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

/* Form Page */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    font-size: 0.85rem;
}

.form-container h1 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.2rem;
}

.form-section {
    background: var(--card-bg);
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.form-section h2 {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.form-group {
    margin-bottom: 0.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.8rem;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    background: var(--input-bg);
    color: var(--text);
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 0.75rem;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    text-align: center;
    margin-top: 1rem;
}

.btn-primary {
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn-secondary {
    padding: 0.5rem 1rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.8rem;
}

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

.message {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
}

.message.success {
    display: block;
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid var(--success);
}

.message.error {
    display: block;
    background: #ffebee;
    color: var(--error);
    border: 1px solid var(--error);
}

/* Classificação compacta */
.classification-row {
    display: block;
}

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

.classification-row .form-group > label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.radio-group-compact,
.checkbox-group-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tag-option {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.4rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.tag-option:hover {
    border-color: var(--primary);
}

.tag-option input {
    display: none;
}

.tag-option input:checked + span {
    color: var(--primary);
    font-weight: 500;
}

.tag-option:has(input:checked) {
    background: #e3f2fd;
    border-color: var(--primary);
}

/* Multi-select inline para atores */
.multi-select-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    max-height: 120px;
    overflow-y: auto;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-alt);
    margin-bottom: 0.4rem;
}

.add-new-row {
    display: flex;
    gap: 0.3rem;
}

.add-new-row input {
    flex: 1;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.8rem;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

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

.empty-msg {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* Evento Page */
.evento-container {
    max-width: 700px;
    margin: 0 auto;
}

.evento-titulo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.evento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.evento-data {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary);
}

.evento-header-tags {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.evento-header .tag-tipo,
.evento-header .tag-categoria,
.evento-header .tag-abrangencia,
.evento-header .tag-local,
.evento-header .tag-brasil {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: lowercase;
}

.evento-header .tag-tipo {
    background: var(--secondary);
    color: white;
}

.evento-fato {
    background: var(--card-bg);
    padding: 1.25rem;
    border: 2px solid var(--primary);
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
}

.evento-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.meta-section {
    background: var(--card-bg);
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.meta-section h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.meta-section p {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tags .tag {
    padding: 0.2rem 0.5rem;
    background: var(--bg-alt);
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: lowercase;
}

.evento-actions {
    margin-top: 1rem;
    text-align: center;
}

/* Chat Page */
.chat-container {
    max-width: 900px;
    margin: 0 auto;
}

.chat-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1rem;
}

.chat-title h1 {
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-size: 1.3rem;
}

.chat-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.chat-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.chat-examples span {
    color: var(--text-muted);
}

.chat-examples a {
    color: var(--primary);
    text-decoration: none;
    background: var(--bg-alt);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.chat-examples a:hover {
    background: var(--primary);
    color: white;
}

.chat-messages {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    height: calc(100vh - 280px);
    min-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    margin-bottom: 1rem;
}

.chat-messages .message {
    display: block;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.chat-messages .message.user {
    background: var(--primary);
    color: white;
    margin-left: 20%;
}

.chat-messages .message.assistant {
    background: var(--bg-alt);
    margin-right: 20%;
}

.chat-messages .message.system {
    background: var(--bg-alt);
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

.chat-messages .message.loading {
    background: var(--bg-alt);
    color: var(--text-muted);
}

.chat-input {
    display: flex;
    gap: 1rem;
}

.chat-input input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text);
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-input button {
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-input button:hover {
    background: var(--primary-dark);
}

.chat-input button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* Chat response styling */
.chat-messages .message.assistant .response-content {
    line-height: 1.7;
}

.chat-messages .message.assistant .response-meta {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.chat-messages .year-highlight {
    background: #e3f2fd;
    color: #1565c0;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-weight: 500;
}

.chat-messages .date-highlight {
    background: #fff3e0;
    color: #e65100;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-weight: 500;
}

[data-theme="dark"] .chat-messages .year-highlight {
    background: #0d47a1;
    color: #90caf9;
}

[data-theme="dark"] .chat-messages .date-highlight {
    background: #4a3000;
    color: #ffb74d;
}

/* Badges de validação */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge .icon {
    font-size: 0.75rem;
}

.badge-validado {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-pendente {
    background: #fff3e0;
    color: #e65100;
}

.badge-ia {
    background: #e3f2fd;
    color: #1565c0;
}

[data-theme="dark"] .badge-validado {
    background: #1b5e20;
    color: #a5d6a7;
}

[data-theme="dark"] .badge-pendente {
    background: #4a3000;
    color: #ffb74d;
}

[data-theme="dark"] .badge-ia {
    background: #0d47a1;
    color: #90caf9;
}

/* Rodapé do card com tags e ações */
.event-card .card-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Ações do card */
.card-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
    white-space: nowrap;
}

.btn-edit {
    color: var(--secondary) !important;
    font-size: 0.85rem;
    text-decoration: none;
}

.evento-actions .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-edit:hover {
    color: var(--primary) !important;
}

/* Botão de sucesso (validar) */
.btn-success {
    padding: 0.5rem 1rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    text-transform: lowercase;
}

.btn-success:hover {
    background: #43a047;
}

/* Seção de validação no formulário */
#validacao-section {
    background: var(--bg-alt);
    border: 2px dashed var(--border);
}

.validacao-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.validacao-status small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 900px) {
    .search-page {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .filter-options {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .filter-options label {
        padding: 0.3rem 0.6rem;
        background: var(--bg-alt);
        border-radius: 4px;
    }
}

@media (max-width: 600px) {
    .search-box {
        flex-direction: column;
    }

    .evento-meta {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }

    .search-header h1 {
        font-size: 1.3rem;
    }
}
