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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f4f4;
    padding: 10px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

label {
    display: block;
    margin: 15px 0 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    background: #fff;
}

textarea {
    resize: vertical;
}

button, .button {
    background: #007bff;
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    margin-top: 10px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

button:hover, .button:hover {
    background: #0056b3;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.button-group button,
.button-group .button {
    flex: 1;
    margin-top: 0;
}

.button.small {
    padding: 5px 10px;
    font-size: 0.8rem;
    width: auto;
    display: inline-block;
    margin: 2px;
}

.button.danger {
    background: #dc3545;
}

.button.danger:hover {
    background: #c82333;
}

.actions {
    white-space: nowrap;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
}

.note {
    margin-top: 20px;
    font-size: 0.9rem;
    text-align: center;
    color: #666;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background: #007bff;
    color: white;
}

tr:nth-child(even) {
    background: #f2f2f2;
}

#conteggio_parole {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* Stili per i container "Altro" */
[id$="_altro_container"] {
    margin-top: 10px;
    padding-left: 10px;
    border-left: 3px solid #007bff;
}

.filter-form {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.filter-table {
    width: 100%;
    border-collapse: collapse;
}

.filter-table th, .filter-table td {
    padding: 8px;
    border: 1px solid #ddd;
}

.filter-table th {
    background: #007bff;
    color: white;
}

.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.table-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}