:root {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #263345;
    --border-color: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --brand-primary: #3b82f6;
    --brand-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --cyan: #06b6d4;
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.15);
    
    --font-family: 'Plus Jakarta Sans', sans-serif;
    --transition-base: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-family);
    padding: 1.5rem;
    min-height: 100vh;
    line-height: 1.6;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 10px;
    z-index: 50;
}

.brand h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-base);
    text-decoration: none;
    height: 40px;
}

.btn-primary {
    background: var(--brand-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    height: 32px;
}

.btn-icon {
    width: 40px;
    padding: 0;
    justify-content: center;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-input {
    width: 100%;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem 0.6rem 2.8rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-base);
    height: 40px;
}

.search-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.search-results.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.result-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.result-item h4 {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.result-item p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    align-items: center;
}

.tag-match {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
}

.filters-advanced-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-toggle h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    min-height: 36px;
}

.filter-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--brand-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.filter-badge .remove {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.filter-badge .remove:hover {
    opacity: 1;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
}

select,
input[type="text"],
input[type="number"],
.flatpickr-input {
    background-color: #020617 !important;
    border: 1px solid #475569 !important;
    color: #f8fafc !important;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-base);
    width: 100%;
    outline: none;
}

select:hover,
select:focus,
input:hover,
input:focus,
.flatpickr-input:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
}

option {
    background-color: #1e293b;
    color: #fff;
}

.range-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.range-inputs .separator {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.1);
}

.kpi-icon-wrapper {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0.8;
}

.kpi-revenue .kpi-icon-wrapper {
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-primary);
}

.kpi-profit .kpi-icon-wrapper {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.kpi-ticket .kpi-icon-wrapper {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.kpi-sales .kpi-icon-wrapper {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple);
}

.kpi-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0.5rem 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.kpi-meta {
    font-size: 0.8rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--text-muted);
}

.kpi-comparison {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.comp-positive {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.comp-negative {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.comp-neutral {
    color: var(--text-muted);
}

.sub-breakdown {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trend-up {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.trend-down {
    color: var(--danger);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.col-span-12 {
    grid-column: span 12;
}

.col-span-8 {
    grid-column: span 8;
}

.col-span-6 {
    grid-column: span 6;
}

.col-span-4 {
    grid-column: span 4;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-group {
    display: flex;
    background: var(--bg-body);
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
    border: 1px solid var(--border-color);
}

.btn-group button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-group button.active {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-group button:hover:not(.active) {
    color: var(--text-primary);
}

.chart-body {
    flex: 1;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.chart-content-flex {
    display: flex;
    height: 100%;
    gap: 1.5rem;
    align-items: center;
}

.chart-wrapper {
    flex: 1;
    position: relative;
    height: 100%;
    min-height: 250px;
}

.chart-details {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 5px;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--brand-primary);
}

.product-item:nth-child(2) {
    border-color: var(--success);
}

.product-item:nth-child(3) {
    border-color: var(--warning);
}

.product-item:nth-child(4) {
    border-color: var(--purple);
}

.product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.product-pct {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.product-qty {
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 3rem;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 300px;
}

.table-search,
.table-select {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    height: 36px;
    flex: 1;
    width: auto;
    min-width: 0;
}

.table-select {
    padding: 0 2rem 0 0.8rem;
    cursor: pointer;
}

.table-search {
    padding: 0 0.8rem;
}

.table-search:focus,
.table-select:focus {
    border-color: var(--brand-primary);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    white-space: nowrap;
}

.badge.Formulario {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge.Pedido.pago {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge.Pedido.em.produção {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge.Pedido.enviado {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge.Pedido.finalizado {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.items-per-page {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--bg-card);
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(30, 41, 59, 0.95);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.modal-body {
    padding: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-group label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.info-group span {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

.info-full {
    grid-column: 1 / -1;
}

.section-title {
    font-size: 1rem;
    color: var(--brand-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.items-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    padding: 0.75rem;
    text-align: left;
    font-size: 0.75rem;
}

.items-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.85rem;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .table-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-controls {
        width: 100%;
        display: flex;
        flex-direction: row;
    }
}
.toolbar-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-bottom: 1rem;
    border-radius: 0 0 12px 12px;
}

/* 1. Marca */
.toolbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: fit-content;
}
.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}
.brand-text h1 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin: 0;
}
.brand-text span {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.toolbar-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.filter-item {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-item .input-icon {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 1;
}

.toolbar-filters select, 
.toolbar-filters input {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 10px 6px 32px;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    height: 36px;
}

.toolbar-filters select:hover,
.toolbar-filters input:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--purple);
}
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-compact {
    position: relative;
    width: 200px;
}
.search-compact i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
}
.search-compact input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    padding: 6px 15px 6px 32px;
    color: white;
    font-size: 0.85rem;
    height: 34px;
}
.search-compact input:focus {
    border-color: var(--blue);
    width: 240px; 
    transition: width 0.3s ease;
}

.btn-group-compact {
    display: flex;
    gap: 8px;
}
.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-icon:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}
.btn-add {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
    border-color: rgba(139, 92, 246, 0.3);
}
.btn-add:hover {
    background: var(--purple);
    color: white;
}
.active-filters-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    min-height: 0px;
}
.filter-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-badge .remove { cursor: pointer; opacity: 0.7; }
.filter-badge .remove:hover { opacity: 1; }

@media (max-width: 900px) {
    .toolbar-header { flex-direction: column; align-items: stretch; height: auto; }
    .toolbar-filters { flex-wrap: wrap; justify-content: flex-start; }
    .search-compact { width: 100%; }
    .search-compact input:focus { width: 100%; }
}
