:root {
    --auser-blue: #0077cc;
    --auser-blue-dark: #005999;
    --auser-blue-light: #e6f2fa;
    --bg-page: #f0f2f5;
    --text-main: #2c3e50;
    --border-color: #d1d9e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

/* Barra superiore */
.navbar-auser {
    background: linear-gradient(135deg, var(--auser-blue) 0%, var(--auser-blue-dark) 100%);
    color: #ffffff;
    padding: 14px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.navbar-auser .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

/* Contenitore principale a 2 colonne affiancate */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

.col-lg-4 {
    flex: 0 0 360px;
    max-width: 100%;
}

.col-lg-8 {
    flex: 1 1 600px;
    min-width: 0;
}

/* Card */
.card-custom {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header-custom {
    background-color: #ffffff;
    border-bottom: 2px solid var(--auser-blue-light);
    padding: 14px 18px;
    font-weight: 700;
    font-size: 15px;
    color: var(--auser-blue-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 18px;
}

.card-body.p-0 {
    padding: 0;
}

/* Modulo e Input */
.mb-3 { margin-bottom: 14px; }
.mb-4 { margin-bottom: 18px; }
.mt-2 { margin-top: 6px; }
.my-3 { margin: 16px 0; border: 0; border-top: 1px solid #eee; }

.form-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 5px;
}

.form-control, .form-select {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    color: #2d3748;
}

.form-control:disabled, .form-select:disabled {
    background-color: #edf2f7;
    color: #a0aec0;
    cursor: not-allowed;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--auser-blue);
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.15);
}

.row-cap-citta {
    display: flex;
    gap: 10px;
}

/* Barra Ricerca Orizzontale */
.search-bar {
    background-color: #f8fafc;
    padding: 12px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.search-group {
    flex: 1 1 180px;
}

.search-actions {
    display: flex;
    gap: 6px;
}

/* Pulsanti */
.btn {
    display: inline-block;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-auser, .btn-success {
    background-color: var(--auser-blue);
    color: #ffffff;
    border-color: var(--auser-blue);
}

.btn-auser:hover:not(:disabled), .btn-success:hover {
    background-color: var(--auser-blue-dark);
}

.btn-auser:disabled {
    background-color: #90cdf4;
    border-color: #90cdf4;
    cursor: not-allowed;
}

.btn-outline-light {
    color: #ffffff;
    border-color: rgba(255,255,255,0.6);
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
}

.btn-outline-secondary {
    color: #4a5568;
    border-color: #cbd5e0;
    background: #ffffff;
}

.btn-outline-secondary:hover {
    background: #edf2f7;
}

.btn-outline-danger {
    color: #c53030;
    border-color: #feb2b2;
    background: #fff5f5;
}

.btn-outline-danger:hover {
    background: #fed7d7;
}

.w-100 { width: 100%; }

/* Tabella */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
}

.table-custom thead th {
    background-color: var(--auser-blue-light);
    color: var(--auser-blue-dark);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid #bee3f8;
}

.table-custom tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: #f7fafc;
}

/* Badge e Etichette */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
}

.bg-secondary { background: #718096; color: #fff; }
.bg-primary { background: #2b6cb0; color: #fff; }
.bg-warning { background: #ecc94b; color: #1a202c; }

.badge-orario {
    display: inline-block;
    background-color: var(--auser-blue-light);
    color: var(--auser-blue-dark);
    border: 1px solid #90cdf4;
    font-weight: 700;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 5px;
    margin-top: 3px;
}

/* Avvisi */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}
.alert-success { background: #c6f6d5; color: #22543d; border: 1px solid #9ae6b4; }
.alert-danger { background: #fed7d7; color: #742a2a; border: 1px solid #feb2b2; }
.alert-warning { background: #fefcbf; color: #744210; border: 1px solid #f6e05e; }
.text-danger { color: #c53030; }
.text-success { color: #0077cc; }
.text-muted { color: #718096; font-size: 12px; }

/* Paginazione Orizzontale Pulita */
.card-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 4px;
}

.page-link {
    display: block;
    padding: 5px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 5px;
    text-decoration: none;
    color: var(--auser-blue-dark);
    font-weight: 600;
    font-size: 12px;
}

.page-item.active .page-link {
    background-color: var(--auser-blue);
    border-color: var(--auser-blue);
    color: #ffffff;
}

.page-item.disabled .page-link {
    color: #a0aec0;
    pointer-events: none;
    background-color: #f7fafc;
}

/* Login */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e6f2fa 0%, #f0f2f5 100%);
    padding: 16px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-top: 5px solid var(--auser-blue);
}

/* Stampa */
@media print {
    .no-print { display: none !important; }
    .col-lg-8 { flex: 0 0 100%; max-width: 100%; }
    .card-custom { box-shadow: none; border: 1px solid #999; }
    body { background: #fff; }
}

/* Modulo singolo centrato per prenotazione pubblica */
.form-centered-wrapper {
    max-width: 540px;
    margin: 0 auto 30px auto;
}

.row-due-colonne {
    display: flex;
    gap: 12px;
}

.row-due-colonne > div {
    flex: 1;
}