:root {
    --primary-color: #0f2b48;
    --primary-hover: #173d66;
    --accent-gold: #c59b27;
    --accent-gold-light: #f7edd4;
    --card-bg: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-color: #e2e8f0;
    --header-gradient: linear-gradient(135deg, #0b1f33 0%, #153e66 100%);
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 8px 24px rgba(15, 43, 72, 0.12);
}

[data-bs-theme="dark"] {
    --primary-color: #1a3c61;
    --primary-hover: #234f7e;
    --accent-gold: #dcb33e;
    --accent-gold-light: #2b2512;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --header-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    --card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Institucional */
.navbar-institutional {
    background: var(--header-gradient);
    border-bottom: 3px solid var(--accent-gold);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff !important;
}

.brand-subtitle {
    font-size: 0.78rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Section */
.hero-search-section {
    background: var(--header-gradient);
    padding: 3.5rem 1rem 4rem;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.hero-search-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(197, 155, 39, 0.15), transparent 40%);
    pointer-events: none;
}

.search-container {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.search-input-lg {
    height: 3.8rem;
    border-radius: 50px 0 0 50px;
    border: none;
    font-size: 1.15rem;
    padding-left: 1.8rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.search-btn-lg {
    border-radius: 0 50px 50px 0;
    padding: 0 2rem;
    font-weight: 600;
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #0b1f33;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.search-btn-lg:hover {
    background-color: #b08a20;
    border-color: #b08a20;
    color: #ffffff;
}

/* Document Cards */
.doc-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.4rem;
    margin-bottom: 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--card-shadow);
}

.doc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-gold);
}

.badge-tipo {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.badge-lei { background-color: #dbeafe; color: #1e40af; }
.badge-indicacao { background-color: #fef3c7; color: #92400e; }
.badge-requerimento { background-color: #dcfce7; color: #166534; }
.badge-projeto { background-color: #f3e8ff; color: #6b21a8; }
.badge-oficio { background-color: #ffedd5; color: #9a3412; }
.badge-mocao { background-color: #fee2e2; color: #991b1b; }
.badge-default { background-color: #f1f5f9; color: #475569; }

/* Modal de Visualização de PDF */
.pdf-modal-dialog {
    max-width: 92vw;
    height: 92vh;
    margin: 4vh auto;
}

.pdf-modal-content {
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.pdf-iframe {
    width: 100%;
    height: calc(92vh - 65px);
    border: none;
}

/* Sidebar e Filtros */
.filter-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
}

.filter-group-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}

.filter-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.35rem;
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.92rem;
    transition: background 0.15s ease;
}

.filter-pill:hover, .filter-pill.active {
    background-color: var(--accent-gold-light);
    color: var(--accent-gold);
    font-weight: 600;
}

/* Admin Sidebar */
.admin-sidebar {
    width: 275px;
    background: #061320;
    border-right: 1px solid #12253b;
    color: #f8fafc;
    min-height: 100vh;
}

.admin-nav-link {
    color: #94a3b8;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    border-radius: 8px;
    margin: 0.2rem 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.admin-nav-link:hover, .admin-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.admin-nav-link.active {
    border-left: 4px solid var(--accent-gold);
}

/* KPI Cards */
.kpi-card {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.kpi-value {
    font-size: 2.2rem;
    font-weight: 750;
    color: var(--primary-color);
}

/* Footer */
footer {
    margin-top: auto;
    background: #071320;
    color: #94a3b8;
    font-size: 0.88rem;
    padding: 2rem 0;
    border-top: 1px solid #1e293b;
}
