/* =================================================================== */
/* FOGLIO DI STILE COMPLETO E UNIFICATO                                */
/* Versione Definitiva e Corretta                                      */
/* =================================================================== */

/* --- 1. FONT E VARIABILI GLOBALI --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --success-color: #198754;
    --warning-color: #fd7e14;
    --teal-color: #20c997;
    --purple-color: #6f42c1;
    --background-light: #f3f4f6;
    --background-white: #ffffff;
    --text-color: #495057;
    --heading-color: #212529;
    --label-color: #555555;
    --border-color: #dee2e6;
    
    --sidebar-bg-color: #1e293b;
    --sidebar-link-color: #cbd5e1;
    --sidebar-hover-bg: #334155;
    --sidebar-width: 260px;
    
    --header-height: 60px;

    --btn-alloggiati-start: #6c5ce7;
    --btn-alloggiati-end: #4a3bc7;
    --btn-istat-start: #2ecc71;
    --btn-istat-end: #27ae60;
}

/* --- 2. RESET E STILI BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden; /* Impedisce lo scroll orizzontale anomalo */
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--background-light);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

/* --- 3. LAYOUT RESPONSIVO: SIDEBAR, OVERLAY E MAIN CONTENT --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg-color);
    color: var(--sidebar-link-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    z-index: 1100;
    border-right: 1px solid var(--sidebar-hover-bg);
}

.sidebar-header {
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--sidebar-hover-bg);
    flex-shrink: 0;
}

.sidebar-header i { font-size: 2rem; color: var(--primary-color); }
.sidebar-header .user-info h2 { margin: 0; font-size: 1.1rem; color: #FFFFFF; }
.sidebar-header .user-info small { font-size: 0.8rem; color: var(--sidebar-link-color); word-break: break-all; }

.sidebar-nav-container {
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--sidebar-link-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 8px;
    margin: 0 0.75rem 0.25rem;
}

.sidebar-nav li a:hover { background-color: var(--sidebar-hover-bg); color: #ffffff; }
.sidebar-nav li a.active { background-color: var(--primary-color); color: #ffffff; font-weight: 700; }
.sidebar-nav li a i { width: 25px; font-size: 1.1rem; text-align: center; margin-right: 1rem; }

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--sidebar-hover-bg);
    flex-shrink: 0;
}

.sidebar-footer .logout-button {
    display: flex;
    align-items: center;
    padding: 0.8rem 0.75rem;
    color: var(--sidebar-link-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 8px;
}
.sidebar-footer .logout-button:hover {
    background-color: var(--sidebar-hover-bg);
    color: #ffffff;
}
.sidebar-footer .logout-button i {
    width: 25px;
    font-size: 1.1rem;
    text-align: center;
    margin-right: 1rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    transition: opacity 0.3s ease-in-out;
}

.top-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--background-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    align-items: center;
    padding: 0 1rem;
    z-index: 999;
}

#menu-toggle {
    font-size: 1.5rem;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
}

.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: margin-left 0.3s ease-in-out;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.main-header h1 { font-size: 28px; font-weight: 800; color: var(--heading-color); }

/* --- 4. PAGINA DI LOGIN --- */
.login-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: var(--background-light); }

/* --- 5. DASHBOARD: STATS CARDS --- */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { color: #fff; padding: 20px; border-radius: 12px; position: relative; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 6px 20px rgba(0,0,0,0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; min-height: 180px; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.stat-card-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; z-index: 1; }
.stat-card-number { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.stat-card-title { font-size: 1rem; font-weight: 600; margin: 0; }
.stat-card-icon { position: absolute; top: 15px; right: 15px; font-size: 3.5rem; opacity: 0.15; z-index: 0; }
.card-list { list-style: none; flex-grow: 1; overflow-y: auto; max-height: 120px; z-index: 1; border-top: 1px solid rgba(255, 255, 255, 0.3); padding-top: 5px; }
.card-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 0.9rem; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.card-list li:last-child { border-bottom: none; }
.card-list .btn-card { background-color: rgba(255, 255, 255, 0.25); color: #fff; padding: 5px 12px; border-radius: 5px; text-decoration: none; font-size: 0.8rem; font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.5); transition: background-color 0.2s; white-space: nowrap; }
.card-list .btn-card:hover { background-color: rgba(255, 255, 255, 0.4); }
.card-list .empty-list { padding: 15px 0; text-align: center; opacity: 0.8; border: none; }
.card-list i { margin-right: 8px; }
.stat-card.blue { background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); }
.stat-card.orange { background: linear-gradient(135deg, var(--warning-color), #d96d10); }
.stat-card.purple { background: linear-gradient(135deg, var(--purple-color), #58359f); }
.stat-card.green { background: linear-gradient(135deg, var(--success-color), #146c43); }
.stat-card.red { background: linear-gradient(135deg, var(--danger-color), #b02a37); }
.stat-card.teal { background: linear-gradient(135deg, var(--teal-color), #19a078); }
.card-attiva { transform: translateY(-7px) scale(1.02); z-index: 10; }
@keyframes neon-pulse-blue { 50% { box-shadow: 0 0 8px #fff, 0 0 16px var(--primary-color), 0 0 24px var(--primary-color); } }
@keyframes neon-pulse-orange { 50% { box-shadow: 0 0 8px #fff, 0 0 16px var(--warning-color), 0 0 24px var(--warning-color); } }
@keyframes neon-pulse-purple { 50% { box-shadow: 0 0 8px #fff, 0 0 16px var(--purple-color), 0 0 24px var(--purple-color); } }
.card-attiva.blue { animation: neon-pulse-blue 2s infinite ease-in-out; }
.card-attiva.orange { animation: neon-pulse-orange 2s infinite ease-in-out; }
.card-attiva.purple { animation: neon-pulse-purple 2s infinite ease-in-out; }

/* --- 6. DASHBOARD: ACTION BUTTONS --- */
.action-buttons-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.action-btn { position: relative; overflow: hidden; padding: 30px 35px; border-radius: 15px; color: #fff; text-decoration: none; font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 15px; transition: all 0.4s ease-in-out; box-shadow: 0 8px 25px rgba(0,0,0,0.3), inset 0 0 15px rgba(255,255,255,0.2); text-shadow: 1px 1px 3px rgba(0,0,0,0.5); border: 2px solid rgba(255, 255, 255, 0.3); background-size: 100% 200%; background-position: 0% 0%; }
.action-btn i { font-size: 1.8rem; transition: transform 0.3s ease; }
.action-btn span { z-index: 2; }
.action-btn::before { content: ''; position: absolute; z-index: 1; top: 50%; left: 50%; width: 300px; height: 300px; opacity: 0; filter: blur(80px); transform: translate(-50%, -50%); transition: opacity 0.5s ease, background 0.5s ease; pointer-events: none; }
.action-btn:hover { transform: translateY(-7px) scale(1.02); border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 12px 30px rgba(0,0,0,0.4), inset 0 0 20px rgba(255,255,255,0.3); background-position: 0% 100%; }
.action-btn:hover i { transform: scale(1.2); }
.action-btn:hover::before { opacity: 1; }
#btn-alloggiati { background-image: linear-gradient(180deg, var(--btn-alloggiati-start) 0%, var(--btn-alloggiati-end) 50%, var(--btn-alloggiati-start) 100%); }
#btn-alloggiati::before { background: radial-gradient(circle, rgba(130, 115, 255, 0.7) 0%, transparent 70%); }
#btn-istat { background-image: linear-gradient(180deg, var(--btn-istat-start) 0%, var(--btn-istat-end) 50%, var(--btn-istat-start) 100%); }
#btn-istat::before { background: radial-gradient(circle, rgba(90, 230, 150, 0.7) 0%, transparent 70%); }

/* --- 7. DASHBOARD & GENERIC CARDS --- */
.dashboard-row { display: flex; gap: 20px; margin-bottom: 20px; }
.dashboard-card { background-color: var(--background-white); padding: 25px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); flex: 1; display: flex; flex-direction: column; }
.dashboard-card h3 { margin-top: 0; margin-bottom: 20px; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; color: var(--heading-color); }
.dashboard-card.full-width { flex: none; width: 100%; }
.financial-summary p { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border-color); }
.financial-summary p:last-child { border-bottom: none; }
.financial-summary .net-profit { font-weight: bold; color: var(--heading-color); border-top: 2px solid var(--primary-color); padding-top: 15px; margin-top: 10px; }

/* --- 8. LAYOUT CAMERE --- */
.camere-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.camera-card { position: relative; overflow: hidden; border-radius: 16px; padding: 25px; color: white; box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2), inset 0 -2px 0 rgba(0,0,0,0.1); border: 1px solid rgba(255, 255, 255, 0.25); display: flex; flex-direction: column; text-shadow: 0 2px 4px rgba(0,0,0,0.4); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.camera-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), inset 0 -2px 0 rgba(0,0,0,0.1); }
.camera-card::before { content: ''; position: absolute; top: -150px; left: -150px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%); transition: transform 0.5s ease; pointer-events: none; }
.camera-card:hover::before { transform: scale(1.1); }
.camera-card::after { content: ''; position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%); transform: translateX(-150%) skewX(-30deg); transition: transform 0.6s ease-in-out; pointer-events: none; }
.camera-card:hover::after { transform: translateX(250%) skewX(-30deg); }
.camera-header { display: flex; justify-content: space-between; align-items: flex-start; z-index: 2; }
.camera-header h3 { font-size: 1.8rem; font-weight: 800; margin: 0; line-height: 1.2; }
.camera-actions { display: flex; gap: 8px; background: rgba(0,0,0,0.2); padding: 6px; border-radius: 20px; }
.camera-actions a { width: 28px; height: 28px; border-radius: 50%; color: white; display: inline-flex; justify-content: center; align-items: center; text-decoration: none; transition: background-color 0.2s, transform 0.2s; }
.camera-actions a:hover { background-color: rgba(255, 255, 255, 0.2); transform: scale(1.1); }
.camera-body { list-style: none; padding: 20px 0 0; margin: 20px 0; flex-grow: 1; z-index: 2; border-top: 1px solid rgba(255,255,255,0.2); }
.camera-body li { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 1rem; }
.camera-body li i { width: 20px; text-align: center; font-size: 1.1rem; }
.camera-body .price { font-weight: 700; font-size: 1.1rem; }
.camera-footer { z-index: 2; margin-top: auto; }
.camera-status { background: rgba(0,0,0,0.3); padding: 8px 15px; border-radius: 8px; font-size: 0.9rem; font-weight: 700; text-align: center; border: 1px solid rgba(255,255,255,0.2); }
.palette-1 { background: linear-gradient(45deg, #8E2DE2, #4A00E0); }
.palette-2 { background: linear-gradient(45deg, #11998e, #38ef7d); }
.palette-3 { background: linear-gradient(45deg, #f857a6, #ff5858); }
.palette-4 { background: linear-gradient(45deg, #f2994a, #f2c94c); }
.status-libera .fa-circle { color: var(--success-color); }
.status-occupata .fa-circle { color: var(--danger-color); }
.status-da-pulire .fa-circle { color: var(--warning-color); }
.status-in-manutenzione .fa-circle { color: var(--secondary-color); }
.status-arrivo-oggi .fa-circle { color: var(--primary-color); }
.status-prenotata .fa-circle { color: var(--purple-color); }

/* --- 9. COMPONENTI GENERICI (FORM, TABELLE, BOTTONI) --- */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--label-color); }
.input-group input, .input-group textarea, .input-group select { width: 100%; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 16px; font-family: 'Nunito', sans-serif; transition: border-color 0.2s, box-shadow 0.2s;}
.input-group input:focus, .input-group textarea:focus, .input-group select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25); }
.input-group textarea[readonly] { background-color: #e9ecef; cursor: copy; font-family: monospace; font-size: 0.95rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; font-weight: 700; font-size: 16px; text-decoration: none; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: all 0.2s ease-in-out; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn.btn-full-width { width: 100%; padding: 12px; font-size: 1.1rem; }
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: var(--secondary-color); color: #fff; }
.btn-secondary:hover { background-color: #5a6268; }
.form-actions { display: flex; justify-content: flex-end; gap: 15px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.content-table { width: 100%; border-collapse: collapse; background-color: var(--background-white); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); border-radius: 12px; overflow: hidden; }
.content-table th, .content-table td { padding: 15px; border-bottom: 1px solid var(--border-color); text-align: left; }
.content-table th { background-color: var(--background-light); font-weight: 700; color: var(--heading-color); }
.content-table tbody tr:last-child td { border-bottom: none; }
.content-table tbody tr:hover { background-color: #f1f5f9; }
.message { padding: 15px; margin-bottom: 20px; border-radius: 8px; border: 1px solid transparent; }
.message.success { background-color: #d1e7dd; color: #0f5132; border-color: #badbcc; }
.message.error { background-color: #f8d7da; color: #842029; border-color: #f5c2c7; }

/* --- 10. FINESTRA MODALE --- */
.modal { display: none; position: fixed; z-index: 1050; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal.visible { display: flex; }
.modal-content { background-color: var(--background-white); padding: 30px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.3); max-width: 500px; width: 90%; text-align: center; position: relative; }
.modal-content h3 { color: var(--heading-color); margin-top: 0; margin-bottom: 20px; font-weight: 700; }
.modal-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 25px; }

/* --- 11. RESPONSIVE DESIGN --- */
@media (max-width: 1200px) {
    .camere-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-overlay { display: block; }
    .main-content { margin-left: 0; padding-top: calc(var(--header-height) + 2rem); }
    .top-header { display: flex; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .action-buttons-container { grid-template-columns: 1fr 1fr; }
    .dashboard-row { flex-direction: column; }
}
@media (max-width: 768px) {
    .main-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .main-header h1 { font-size: 22px; }
    .stats-grid,
    .action-buttons-container,
    .camere-grid { grid-template-columns: 1fr; }
}

/* --- 12. GDPR COOKIE BANNER --- */
#cookie-consent-banner { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--sidebar-bg-color); color: var(--sidebar-link-color); padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; z-index: 1200; box-shadow: 0 -2px 10px rgba(0,0,0,0.2); transform: translateY(100%); transition: transform 0.5s ease-in-out; }
#cookie-consent-banner.show { transform: translateY(0); }
#cookie-consent-banner p { margin: 0; margin-right: 20px; font-size: 0.9rem; }
#cookie-consent-banner a { color: #fff; text-decoration: underline; font-weight: 600; }
#cookie-consent-banner button { background-color: var(--primary-color); color: #fff; border: none; padding: 8px 18px; border-radius: 8px; cursor: pointer; font-weight: 700; transition: background-color 0.2s; white-space: nowrap; }
#cookie-consent-banner button:hover { background-color: var(--primary-hover); }
@media (max-width: 768px) {
    #cookie-consent-banner { flex-direction: column; padding: 15px; text-align: center; }
    #cookie-consent-banner p { margin-right: 0; margin-bottom: 10px; }
}

/* --- 13. STILI PAGINA PRENOTAZIONI --- */
.actions-cell { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.action-icon-btn { display: inline-flex; justify-content: center; align-items: center; width: 32px; height: 32px; border-radius: 50%; text-decoration: none; color: white; transition: all 0.2s ease; }
.action-icon-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.action-icon-btn.edit { background-color: var(--primary-color); }
.action-icon-btn.delete { background-color: var(--danger-color); }
.action-icon-btn.invoice { background-color: var(--success-color); }
.status-timeline { position: relative; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.status-timeline::before { content: ''; position: absolute; top: 50%; transform: translateY(-50%); left: 8px; right: 8px; height: 4px; background-color: #e9ecef; border-radius: 2px; }
.progress-bar { position: absolute; top: 50%; transform: translateY(-50%); left: 8px; height: 4px; background-color: var(--primary-color); border-radius: 2px; z-index: 1; transition: width 0.5s ease-in-out; }
.progress-bar.completed { background-color: var(--success-color); }
.step { position: relative; z-index: 2; text-align: center; }
.step-dot { width: 16px; height: 16px; border-radius: 50%; background-color: #ced4da; border: 2px solid var(--background-white); transition: all 0.4s ease; cursor: pointer; }
.step.completed .step-dot { background-color: var(--secondary-color); }
.step.current .step-dot { background-color: var(--primary-color); transform: scale(1.5); box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25); }
.step.fully-completed .step-dot { background-color: var(--success-color); }
.step-label { position: absolute; top: 25px; left: 50%; transform: translateX(-50%); font-size: 11px; white-space: nowrap; color: #6c757d; font-weight: 600; }
.step.completed .step-label { color: var(--heading-color); }
.step.current .step-label { font-weight: 800; color: var(--primary-color); }

/* --- 14. STILI PER TABELLA RESPONSIVA (A CARD) --- */
@media (max-width: 768px) {
  .responsive-table thead { display: none; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table tr { margin-bottom: 1.5rem; border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
  .responsive-table td { border: none; padding-left: 0; padding-right: 0; padding-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; text-align: right; }
  .responsive-table td:last-child { padding-bottom: 0; }
  .responsive-table td[data-label]::before { content: attr(data-label); font-weight: 700; color: var(--heading-color); margin-right: 1rem; text-align: left; }
  .status-badge { padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; color: white; text-align: center; }
  .status-badge.in-attesa { background-color: var(--secondary-color); }
  .status-badge.confermata { background-color: var(--primary-color); }
  .status-badge.attiva { background-color: var(--warning-color); }
  .status-badge.conclusa { background-color: var(--teal-color); }
  .status-badge.pagata { background-color: var(--success-color); }
  .status-badge.cancellata { background-color: var(--danger-color); }
  .desktop-only { display: none; }
  .mobile-only { display: block; }
}

@media (min-width: 769px) {
    .mobile-only { display: none; }
    .desktop-only { display: block; }
    .status-timeline.desktop-only { display: flex; }
}

/* --- 15. LARGHEZZA COLONNE TABELLA PRENOTAZIONI (SOLO DESKTOP) --- */
@media (min-width: 769px) {
  .responsive-table th:nth-child(3),
  .responsive-table td:nth-child(3) { width: 40%; }
  .responsive-table th:nth-child(4) { text-align: right; }
}

/* --- 16. STILI PAGINA FATTURE E GESTIONE BOOKING --- */
.status-badge.pagata { background-color: var(--success-color); }
.status-badge.emessa { background-color: var(--primary-color); }
.action-icon-btn.view { background-color: var(--secondary-color); }
.action-icon-btn.paid { background-color: var(--success-color); }

.input-group-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.input-group-row input {
    flex-grow: 1;
    margin-bottom: 0;
    min-width: 0; 
    text-overflow: ellipsis;
}

/* --- 17. STILI PAGINA IMPOSTAZIONI --- */
.settings-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 30px; 
}
.settings-section { 
    background-color: #f8f9fa; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    padding: 25px; 
}
.settings-section h3 { 
    font-size: 18px; 
    margin-top: 0; 
    margin-bottom: 25px; 
    padding-bottom: 10px; 
    border-bottom: 1px solid var(--border-color); 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.form-actions-full-width {
    grid-column: 1 / -1; 
}
.autoresize-textarea { 
    resize: none; 
    overflow: hidden; 
    min-height: 50px; 
}
.info-ospiti-row { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 15px; 
    align-items: flex-start;
}
.info-ospiti-row .input-group { 
    flex-grow: 1; 
    margin-bottom: 0; 
}
.btn-remove-info { 
    background: none; 
    border: none; 
    color: var(--danger-color); 
    font-size: 24px; 
    cursor: pointer; 
    padding: 0 10px; 
    align-self: center; 
    margin-top: 20px; 
}
.button-group { 
    display: flex; 
    gap: 10px; 
    margin-top: 10px; 
    flex-wrap: wrap; 
}

/* --- 18. STILI PER PAGINE PUBBLICHE (CHECK-IN, ECC.) --- */
.public-body {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Allinea in alto per form lunghi */
    min-height: 100vh;
    padding: 2rem 1rem;
    background-color: var(--background-light);
}
.public-container {
    width: 100%;
    max-width: 600px;
    background-color: var(--background-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    border-top: 4px solid var(--primary-color);
}
.public-container h1, .public-container h2 {
    text-align: center;
    color: var(--heading-color);
    margin-bottom: 1rem;
}
.public-container p {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}