:root {
    --bl-primary: #008F4C;
    --bl-primary-dark: #00703B;
    --bl-bg: #f9fafb;
    --bl-text: #1f2937;
    --bl-border: #e5e7eb;
    --bl-radius: 12px;
}

.bl-container { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 20px; 
}

.bl-header h2 { font-size: 1.8rem; font-weight: 800; color: var(--bl-primary); text-align: center; margin-bottom: 5px; }
.bl-header p { text-align: center; color: #6b7280; font-size: 0.95rem; margin-bottom: 30px; }

.bl-search-box { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
@media (min-width: 600px) { .bl-search-box { flex-direction: row; } }

.bl-search-box input { 
    flex: 1; padding: 15px; border: 2px solid var(--bl-border); border-radius: var(--bl-radius); 
    font-size: 16px; outline: none; transition: all 0.2s ease;
}
.bl-search-box input:focus { border-color: var(--bl-primary); box-shadow: 0 0 0 4px rgba(0, 143, 76, 0.1); }

.bl-search-box button { 
    background: var(--bl-primary); color: white; border: none; padding: 0 30px; 
    border-radius: var(--bl-radius); font-weight: 700; cursor: pointer; height: 54px;
    transition: background 0.2s;
}
.bl-search-box button:hover { background: var(--bl-primary-dark); }

.bl-filters { display: flex; gap: 10px; margin-bottom: 20px; }
.bl-filters select { 
    flex: 1; padding: 12px; border: 1px solid var(--bl-border); border-radius: 10px; 
    background: white; font-size: 0.9rem; color: var(--bl-text); cursor: pointer;
}

.bl-suggestions-list { 
    position: absolute; width: 100%; background: white; border: 1px solid var(--bl-border); 
    border-radius: 8px; z-index: 1000; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); 
    max-height: 250px; overflow-y: auto; 
}
.bl-suggestion-item { padding: 12px 15px; cursor: pointer; border-bottom: 1px solid #f3f4f6; font-size: 0.9rem; transition: background 0.1s; }
.bl-suggestion-item:hover { background: #f0fdf4; color: var(--bl-primary); }

.bl-stats-card { 
    background: #f8faff; border: 1px solid #dae1ff; border-radius: 12px; 
    padding: 15px 20px; margin-bottom: 25px; display: flex; justify-content: space-between; 
    align-items: center; color: #3730a3;
}

.bl-btn-export { 
    background: #6b7280; color: white; border: none; padding: 5px 12px; 
    border-radius: 6px; font-size: 0.75rem; cursor: pointer; font-weight: 700; margin-bottom: 5px;
}
.bl-btn-export:hover { background: #374151; }

.bl-btn-ia {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white; border: none; padding: 5px 12px; margin-left: 5px;
    border-radius: 6px; font-size: 0.75rem; cursor: pointer; font-weight: 700; margin-bottom: 5px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.bl-btn-ia:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(168, 85, 247, 0.3);
}
.bl-btn-ia:disabled { opacity: 0.7; cursor: not-allowed; }

.bl-card { 
    position: relative;
    background: white; padding: 24px; border-radius: var(--bl-radius); 
    border: 1px solid var(--bl-border); margin-bottom: 20px; transition: transform 0.2s ease;
}
.bl-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.bl-badge-common {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}
.bl-badge-placsp {
    border: 1.5px solid var(--bl-primary);
    color: var(--bl-primary);
    background: #f0fdf4;
}
.bl-badge-ted {
    background: #e5e7eb;
    color: #374151;
    border: none;
}

.bl-company { font-size: 1.1rem; font-weight: 700; color: var(--bl-text); }
.bl-cif { font-size: 0.75rem; font-weight: 600; color: #6b7280; background: #f3f4f6; padding: 2px 8px; border-radius: 8px; display: inline-block; margin-top: 5px; }

.bl-label { font-size: 0.7rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; }
.bl-value { font-size: 0.95rem; color: var(--bl-text); line-height: 1.5; }
.bl-amount { font-size: 1.3rem; font-weight: 800; color: var(--bl-primary); }

.bl-btn-link { 
    display: block; text-align: center; padding: 12px; background: #f0fdf4; 
    color: var(--bl-primary); border: 1.5px solid var(--bl-primary); border-radius: 10px; 
    text-decoration: none; font-weight: 700; margin-top: 20px;
}
.bl-btn-link:hover { background: var(--bl-primary); color: white; }

.bl-empty { padding: 40px; text-align: center; color: #9ca3af; border: 2px dashed #e5e7eb; border-radius: var(--bl-radius); }
.bl-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(0,143,76,0.2); border-top-color: var(--bl-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }