/* Reset base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Stili globali */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #b8baba;
    line-height: 1.7;
    font-size: 14px;
    color: #495057;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    color: #5786b7;
    text-align: center; /* Centra tutti i titoli */
}

a {
    color: #5786b7;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.header {
    background-color: #5786b7;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header a {
    color: white;
    margin-left: 1rem;
    font-weight: 600;
    color: #ffef68;
}

.header a:hover {
    text-decoration: underline;
}

/* Container principale */
.container {
    display: flex;
    flex: 1;
    margin: 0;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #f9f9f9;
    padding: 1rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 0.5rem;
}

.sidebar ul li a {
    text-decoration: none;
    color: #5786b7;
    font-weight: bold;
}

.sidebar ul li a:hover {
    color: #0056b3;
}

.sidebar ul li.active a {
    color: #fff;
    background-color: #5786b7;
}

.sidebar ul li a {
  display: block;
  padding: 8px 16px;
}

.sidebar ul li a:hover {
  background-color: #5786b7;
  color: white;
}

/* Contenuto principale */
.main-content {
    flex: 1;
    padding: 2rem;
    background-color: #fff;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #f9f9f9;
    padding: 1rem;
}

/* Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: fixed; /* Aggiunto per larghezze fisse */
}

table th, table td {
    border: 1px solid #ddd;
    padding: 0.8rem;
    text-align: center; /* Centra tutto di default */
}

table th {
    background-color: #5786b7;
    color: white;
    text-align: center; /* Centra tutti i titoli nel thead */
}

table th a {
    color: #fff;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.align-left {
    text-align: left;
}

.align-right {
    text-align: right;
}

/* Dettaglio Cliente - Minimalist Layout */
.details-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.details-header {
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.details-header h2 {
    color: #5786b7;
    text-align: center;
}

.details-section {
    margin-bottom: 1rem;
}

.details-section h3 {
    font-size: 1.1rem;
    color: #5786b7;
    margin-bottom: 1.5rem;
    text-align: left;
    border-bottom: 2px solid #5786b7;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.detail-pair {
    margin-bottom: 1rem;
    border: thin solid #ccc;
    padding: 5px;
    background-color: #edf1f2;
}

.full-width {
    grid-column: span 3;
}

.half-width {
    grid-column: span 1;
}

.span-2 {
    grid-column: span 2;
}

.detail-pair .label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.detail-pair .value {
    font-size: 1rem;
    color: #212529;
}

.not-present {
    color: #dc3545;
    font-style: italic;
}

/* Clienti */
.pagination {
    margin-top:10px;
    text-align: right;
}
.pagination a{
    font-weight: bold;
    margin:5px;
}
form{
    margin-top:50px;
}
input{
    padding: 10px 5px;
    width: 300px;
}

/* Totali */
.totali {
    margin-top: 1rem;
    text-align: right;
}

.totali span {
    font-weight: bold;
}

/* Pulsanti */
button,
input[type="submit"],
input[type="button"] {
    padding: 0.8rem 1.5rem;
    background-color: #5786b7;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: #0056b3;
}


/* Azioni */
.actions {
    margin-top: 1rem;
    text-align: center;
}

.actions button {
    margin: 0.5rem;
}


/* Messaggi di stato */
.status-message {
    margin-top: 1rem;
    text-align: center;
}

.status-message p {
    padding: 1rem;
    border-radius: 5px;
}

.status-message .success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message .error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
.footer {
    background-color: #5786b7;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}
