/* Stili base per Database Contatti */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

nav {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border: 2px solid #3498db;
    border-radius: 4px;
    min-width: 180px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item:hover {
    background-color: #e8f4f8;
    border-color: #2980b9;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.checkbox-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    flex: 1;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-error {
    background-color: #e74c3c;
    color: white;
}

.alert-success {
    background-color: #27ae60;
    color: white;
}

.alert-warning {
    background-color: #f39c12;
    color: white;
}

.alert-info {
    background-color: #3498db;
    color: white;
}

.results-container {
    margin: 20px 0;
}

.result-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.result-item input[type="checkbox"] {
    margin-right: 10px;
}

.result-content h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.info-box {
    background-color: #e8f4f8;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.search-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.search-info ul {
    margin-left: 20px;
    margin-top: 10px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quick-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.portfolios-keywords {
    margin-top: 20px;
}

.portfolio-keywords-item {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.portfolio-header h3 {
    margin: 0;
    color: #2c3e50;
}

.portfolio-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 14px;
}

.keywords-display {
    margin-bottom: 15px;
}

.keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.keyword-tag {
    background-color: #3498db;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
}

.no-keywords {
    color: #e74c3c;
    font-style: italic;
}

.keywords-edit {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.keywords-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    margin-bottom: 10px;
}

.bulk-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
    text-align: center;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

