/* /assets/css/nauticus.css */
:root {
    --color-bg: #f4f7fa;
    --color-surface: #ffffff;
    --color-navy: #1a2c4f;
    --color-navy-hover: #2a3f6d;
    --color-primary: #007bff;
    --color-primary-hover: #0056b3;
    --color-accent: #3c82f6;
    --color-success: #28a745;
    --color-success-hover: #218838;
    --color-danger: #dc3545;
    --color-warning: #d39e00;
    --color-text: #333333;
    --color-muted: #6c757d;
    --color-border: #e0e0e0;
    --sidebar-width: 260px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 25px rgba(0, 0, 0, 0.2);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body, html {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.is-hidden { display: none !important; }

/* --- Alerts --- */
.alert, .message { padding: 12px 15px; margin-bottom: 16px; border-radius: var(--radius-sm); font-size: 0.95rem; }
.alert-error, .message.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success, .message.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; text-align: center; }
.alert-warning { color: #856404; background-color: #fff3cd; border: 1px solid #ffeeba; font-size: 0.85em; text-align: center; }
.alert-info { color: #0c5460; background-color: #d1ecf1; border: 1px solid #bee5eb; font-size: 0.85em; text-align: center; }

/* --- Auth Pages (index, register, verify_email, gestionale/login) --- */
.banner-header { width: 100%; height: auto; max-height: 300px; object-fit: cover; object-position: center; display: block; }
.banner-footer { width: 100%; height: auto; max-height: 150px; object-fit: cover; object-position: center; display: block; margin-top: 15px; }
.description { text-align: center; padding: 20px; background-color: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.description h1 { margin: 10px 0; font-size: 2em; }
.auth-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; background-color: #f4f4f4; }
.auth-box {
    max-width: 420px;
    width: 100%;
    margin: 40px auto;
    padding: 30px;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}
.auth-box h2 { text-align: center; margin: 0 0 10px; font-size: 22px; color: #333; }
.auth-box h3 { text-align: center; margin: 0 0 25px; color: #555; font-size: 16px; font-weight: normal; }
.auth-box form { display: flex; flex-direction: column; }
.auth-box label { font-weight: 700; margin-bottom: 5px; font-size: 14px; color: #555; display: block; }
.auth-box input[type="text"],
.auth-box input[type="email"],
.auth-box input[type="password"] {
    width: 100%;
    margin-bottom: 18px;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.auth-box input.has-warning { border-color: #856404; }
.auth-box input.has-shift, #password.shift-pressed { border-color: #0c5460; box-shadow: 0 0 0 3px rgba(12, 84, 96, 0.2); }
.password-container { position: relative; display: flex; align-items: center; margin-bottom: 18px; }
.password-container input { width: 100%; margin-bottom: 0 !important; padding-right: 40px; }
.password-container .toggle-eye {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
    padding: 4px;
    font-size: 1rem;
}
.auth-links { display: flex; justify-content: space-between; margin-top: 15px; font-size: 14px; }
.auth-links.is-centered { justify-content: center; }
.auth-box a { color: var(--color-primary); text-decoration: none; }
.auth-box a:hover { text-decoration: underline; }
.monkey-container { text-align: center; margin-bottom: 20px; }
.resend-box { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; text-align: center; }
.resend-box p { font-size: 0.92em; color: #666; }

/* --- Bottoni --- */
.btn { padding: 9px 16px; border: none; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.95rem; }
.btn-primary { background-color: var(--color-primary); color: #fff; border: none; border-radius: 4px; padding: 12px 16px; font-size: 16px; cursor: pointer; font-weight: bold; }
.btn-primary:hover:not(:disabled) { background-color: var(--color-primary-hover); }
.btn-primary:disabled { background-color: #ccc; cursor: not-allowed; }
.btn-success { background-color: var(--color-success); }
.btn-success:hover { background-color: var(--color-success-hover); }
.btn-danger { background-color: var(--color-danger); }
.btn-secondary { background-color: var(--color-muted); }
.btn-submit-full { width: 100%; padding: 12px; font-size: 1.1rem; margin-top: 20px; }

/* --- Layout Comune con Sidebar --- */
.marina-manager-layout { display: flex; min-height: 100vh; }
.main-content-wrapper { display: flex; flex-direction: column; flex-grow: 1; width: calc(100% - var(--sidebar-width)); min-height: 100vh; }
.main-content { flex-grow: 1; padding: 30px; overflow-y: auto; }

.sidebar { width: var(--sidebar-width); background-color: var(--color-navy); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; height: 100vh; position: sticky; top: 0; }
.sidebar-header { padding: 20px; text-align: center; border-bottom: 1px solid var(--color-navy-hover); }
.sidebar-header h1 { margin: 0; font-size: 1.4em; display: flex; align-items: center; justify-content: center; gap: 10px; }
.sidebar-header h1 .icon { font-size: 1.6rem; }
.sidebar-nav { flex-grow: 1; list-style: none; padding: 20px 0; margin: 0; overflow-y: auto; }
.sidebar-nav a,
.sidebar-nav .nav-category-toggle {
    display: flex; align-items: center; gap: 15px; padding: 14px 25px; color: #a9b4d0;
    text-decoration: none; font-size: 1em; transition: background-color 0.2s, color 0.2s;
    width: 100%; text-align: left; background: none; border: none; font-family: inherit; cursor: pointer;
}
.sidebar-nav .nav-icon { font-size: 1.2em; width: 20px; text-align: center; }
.sidebar-nav .nav-title { font-weight: 500; }
.sidebar-nav a:hover, .sidebar-nav .nav-category-toggle:hover { background-color: var(--color-navy-hover); color: #fff; }
.sidebar-nav > li > a.active,
.nav-group.is-open .nav-category-toggle,
.nav-group .nav-category-toggle.active { background-color: var(--color-navy-hover); color: #fff; border-left: 3px solid var(--color-accent); padding-left: 22px; }
.nav-group .nav-category-toggle { position: relative; }
.nav-category-toggle::after { content: '›'; position: absolute; right: 20px; font-size: 1.5em; transition: transform 0.3s ease; }
.nav-group.is-open .nav-category-toggle::after { transform: rotate(90deg); }
.submenu { list-style: none; padding: 0; margin: 0; max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; background-color: rgba(0, 0, 0, 0.2); }
.nav-group.is-open .submenu { max-height: 500px; }
.submenu a { padding-left: 40px; font-size: 0.95em; border-left: 3px solid transparent !important; }
.submenu a.active { color: #fff; background-color: #3e568c; }
.sidebar-footer { padding: 20px; border-top: 1px solid var(--color-navy-hover); margin-top: auto; }
.sidebar-logout-btn {
    display: flex; align-items: center; gap: 15px; padding: 10px; color: #a9b4d0;
    border-radius: var(--radius-sm); background: none; border: none; width: 100%; cursor: pointer; font-size: 1rem; text-align: left;
}
.sidebar-logout-btn:hover { background-color: var(--color-navy-hover); color: #fff; }
.mobile-menu-toggle { display: none; }

/* --- Dashboard Header & Lingue --- */
.content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.content-header h2 { margin: 0; font-size: 2em; font-weight: 600; }
.user-actions { display: flex; align-items: center; gap: 20px; }
.notifiche-btn { color: #fff; background-color: var(--color-primary); padding: 8px 15px; text-decoration: none; border-radius: 5px; font-weight: 500; display: inline-block; }
.notifiche-btn .badge { background-color: var(--color-danger); color: #fff; padding: 3px 8px; border-radius: 10px; font-size: 0.8em; margin-left: 5px; }
.checkin-wrapper { text-align: center; margin: 20px 0; }
.btn-checkin { background-color: var(--color-success); padding: 15px 30px; font-size: 1.2em; border-radius: 30px; box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3); }

.language-menu { position: relative; }
.language-menu-trigger-mobile { display: none; background-color: #eef2f6; border: none; border-radius: var(--radius-md); padding: 8px; cursor: pointer; line-height: 0; }
.language-options-list { display: flex; gap: 10px; align-items: center; }
.language-options-list a { display: inline-block; line-height: 0; }
.language-options-list img { width: 24px; height: auto; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.language-options-list a:not(.active) img { opacity: 0.6; }
.language-options-list a:hover img { opacity: 1; transform: scale(1.1); }
.language-options-list a.active img { opacity: 1; box-shadow: 0 0 0 2px var(--color-accent); }
.language-options-list span, .language-panel-header { display: none; }

/* --- Cards & Widgets --- */
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
a.card-link { text-decoration: none; color: inherit; display: block; }
.card {
    background-color: var(--color-surface); padding: 25px; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 20px;
    text-decoration: none; color: inherit; transition: transform 0.2s, box-shadow 0.2s;
}
.card.card-stacked { flex-direction: column; text-align: center; }
.card.clickable, #card-imbarcazioni, a.card-link .card { cursor: pointer; }
.card.clickable:hover, #card-imbarcazioni:hover, a.card-link .card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); }
.card.is-critical { border-bottom: 4px solid var(--color-danger); }
.card.is-warning { border-bottom: 4px solid #ffc107; }
.card .icon { font-size: 2.5rem; }
.card.imbarcazioni .icon { background-color: #e0f2fe; color: #0ea5e9; padding: 15px; border-radius: 50%; }
.card.prenotazioni .icon { background-color: #e0e7ff; color: #6366f1; padding: 15px; border-radius: 50%; }
.card.documenti .icon { background-color: #fef9c3; color: #eab308; padding: 15px; border-radius: 50%; }
.card.notifiche .icon { background-color: #fee2e2; color: #ef4444; padding: 15px; border-radius: 50%; }
.card.contabilita { border-left: 4px solid #10b981; }
.card.contabilita .icon { background-color: #d1fae5; color: #059669; padding: 15px; border-radius: 50%; }
.card-info { width: 100%; }
.card-info .value { font-size: 2.2rem; font-weight: 700; color: var(--color-navy); line-height: 1; }
.card-info .value.is-debt, .card-info .value.is-critical { color: var(--color-danger); }
.card-info .value.is-warning { color: var(--color-warning); }
.card-info .label { font-size: 0.95rem; color: var(--color-muted); margin-top: 5px; }
.card-info .label.is-critical { color: var(--color-danger); font-weight: 700; }
.card-info .label.is-warning { color: var(--color-warning); font-weight: 700; }
.card-info .sub-label { font-size: 0.85rem; color: #9ca3af; margin-top: 4px; }

.stock-slider-container { position: relative; width: 100%; height: 22px; font-size: 0.85rem; color: var(--color-muted); margin-top: 6px; }
.stock-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.5s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock-slide.slide-active { opacity: 1; pointer-events: auto; }
.stock-slide.is-critical strong { color: var(--color-danger); }
.stock-slide.is-warning strong { color: var(--color-warning); }

.card.interactive .card-header { display: flex; align-items: center; gap: 15px; width: 100%; }
.card-accordion-content { max-height: 0; overflow: hidden; width: 100%; transition: max-height 0.4s ease-out, margin-top 0.4s ease-out; margin-top: 0; display: flex; gap: 20px; }
.card.is-open .card-accordion-content { max-height: 200px; margin-top: 20px; }
.accordion-detail { flex: 1; text-align: center; padding: 15px; background-color: #f8f9fa; border-radius: var(--radius-md); }

.dashboard-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.widget { background-color: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 25px; display: flex; flex-direction: column; }
.widget.widget-highlight { border-left: 4px solid #ffc107; }
.widget h3 { margin: 0 0 20px; font-size: 1.2rem; font-weight: 600; }
.widget-header-link { text-decoration: none; color: inherit; display: inline-block; }
.widget-list { list-style: none; padding: 0; margin: 0; flex-grow: 1; }
.widget-list-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #eef2f6; gap: 12px; }
.widget-list-item:last-child { border-bottom: none; }
.widget-empty { flex-direction: column; text-align: center; padding: 30px 15px; }
.item-details .title { font-weight: 500; }
.item-details .title.is-error { color: var(--color-danger); }
.item-details .subtitle { font-size: 0.9em; color: var(--color-muted); }
.item-status { padding: 5px 12px; border-radius: 16px; font-size: 0.8em; font-weight: 500; text-transform: capitalize; }
.status-in_attesa { background-color: #fef9c3; color: #854d0e; }
.status-confermata { background-color: #dcfce7; color: #166534; }
.status-scaduto { background-color: #fee2e2; color: #991b1b; }
.status-ok { background-color: #dbeafe; color: #1e40af; }
.widget a.action-link { color: var(--color-primary); text-decoration: none; font-weight: 500; font-size: 0.9em; }
.widget-actions { display: flex; gap: 10px; align-items: center; }
.btn-plan { background: none; border: 1px solid var(--color-success); border-radius: 4px; cursor: pointer; color: var(--color-success); font-weight: 700; padding: 3px 8px; font-size: 0.8em; }
.date-badge { font-weight: 700; margin-left: 5px; }
.date-badge.is-expired { color: var(--color-danger); }
.date-badge.is-soon { color: var(--color-warning); }
.icon-boat { color: var(--color-danger); margin-right: 5px; }
.icon-user { color: #17a2b8; margin-right: 5px; }

/* --- Pagine Lista Natanti / Crea Natante --- */
.page-header { background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover)); color: #fff; text-align: center; padding: 20px 15px; }
.page-header h1 { margin: 0; font-size: 1.8em; }
.container { width: 95%; max-width: 1250px; margin: 30px auto; background: var(--color-surface); padding: 25px 30px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.container-narrow { max-width: 900px; }
.container h2 { text-align: center; color: var(--color-primary-hover); margin: 0 0 25px; }
.section-heading { font-size: 1.35rem; color: var(--color-muted); border-bottom: 2px solid #eee; padding-bottom: 10px; margin: 28px 0 18px; }
.section-heading:first-of-type { margin-top: 0; }

.wallet-card { background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.1); margin-bottom: 25px; border: 1px solid var(--color-border); }
.wallet-header { background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%); padding: 20px; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.wallet-header h3 { margin: 0; color: #fff; }
.wallet-balance { font-size: 1.8em; font-weight: 700; }
.wallet-transactions { background: #f8f9fa; border-top: 1px solid #eee; }
.wallet-transactions table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.wallet-transactions td { padding: 10px 15px; border-bottom: 1px solid #eee; }
.wallet-amount.is-credit { color: var(--color-success); font-weight: 700; text-align: right; }
.wallet-amount.is-debit { color: var(--color-danger); font-weight: 700; text-align: right; }
.wallet-empty { padding: 15px; text-align: center; color: #666; font-size: 0.9em; }

.actions-bar { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.btn-add-natante { text-decoration: none; padding: 10px 20px; background-color: var(--color-success); color: #fff; border-radius: var(--radius-sm); }
.table-container { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { border: 1px solid var(--color-border); padding: 8px; text-align: left; font-size: 0.9em; vertical-align: middle; }
.data-table th { background-color: #f8f9fa; font-weight: 600; white-space: nowrap; }
.data-table tr:nth-child(even):not(.mooring-details-row) { background-color: #f8f9fa; }
.data-table tr:not(.mooring-details-row):hover { background-color: #e9ecef; }
.action-links a, .action-links button { text-decoration: none; padding: 5px 10px; margin-right: 4px; border-radius: 5px; font-size: 0.85em; color: #fff; cursor: pointer; border: none; display: inline-block; }
.action-links a.edit { background-color: var(--color-primary); }
.action-links button.delete { background-color: var(--color-danger); }
.parking-icon-cell { width: 42px; text-align: center !important; }
.parking-icon { font-size: 1.5em; color: var(--color-muted); cursor: pointer; background: none; border: none; padding: 2px 6px; border-radius: 4px; }
.parking-icon.active-icon { color: var(--color-primary-hover); background-color: #e0e0e0; }
.mooring-details-row td { background-color: #e6f2ff !important; padding: 14px 16px !important; border-left: 4px solid var(--color-primary) !important; }
.details-content { line-height: 1.8; }
.details-content strong { color: #004a99; display: inline-block; min-width: 130px; }

.sublet-container { margin-top: 15px; background: #f9fbfd; padding: 12px; border-radius: 5px; border: 1px solid #e1e4e8; }
.sublet-container h4 { margin: 0 0 10px; color: var(--color-primary-hover); font-size: 1rem; }
.sublet-list { list-style: none; padding: 0; margin: 0 0 10px; }
.sublet-item { background: #fff; border: 1px solid #ddd; padding: 6px 10px; margin-bottom: 4px; border-radius: 4px; font-size: 0.9em; display: flex; justify-content: space-between; align-items: center; }
.sublet-badge { padding: 2px 8px; border-radius: 4px; font-size: 0.8em; font-weight: 700; color: #222; background: #ffc107; }
.sublet-badge.is-approved { background: var(--color-success); color: #fff; }
.sublet-badge.is-rejected { background: var(--color-danger); color: #fff; }
.sublet-badge.is-sold { background: #17a2b8; color: #fff; }
.sublet-form-box { margin-top: 10px; border-top: 1px solid #ddd; padding-top: 10px; }
.sublet-form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

/* --- Foto, Modali & Form --- */
.boat-photo-container { width: 60px; text-align: center; padding: 5px; }
.boat-photo-thumbnail { width: 50px; height: 50px; object-fit: cover; border-radius: var(--radius-md); cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.no-photo-placeholder { width: 50px; height: 50px; background: #eee; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: #888; font-size: 22px; margin: 0 auto; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1000; justify-content: center; align-items: center; }
.modal-overlay.is-open { display: flex; }
.modal-content { background: #fff; padding: 30px; border-radius: var(--radius-lg); width: 90%; max-width: 1200px; max-height: 90vh; box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--color-border); padding-bottom: 15px; margin-bottom: 20px; }
.modal-close-btn { font-size: 2rem; font-weight: bold; color: #9ca3af; cursor: pointer; border: none; background: none; }
.modal-body { overflow-y: auto; }
.modal-body table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.modal-body th, .modal-body td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--color-border); }
.modal-card { background: #fff; padding: 25px; border-radius: var(--radius-md); width: 90%; max-width: 420px; box-shadow: var(--shadow-md); }
.photo-modal { display: flex; justify-content: center; align-items: center; position: fixed; z-index: 9999; inset: 0; background: rgba(0,0,0,0.92); }
.photo-modal-content { max-width: 90%; max-height: 85vh; border-radius: var(--radius-md); }
.photo-modal-close { position: absolute; top: 15px; right: 35px; color: #fff; font-size: 40px; cursor: pointer; background: none; border: none; }
.photo-modal-caption { color: #eee; padding: 10px 20px; position: absolute; bottom: 20px; background: rgba(0,0,0,0.75); border-radius: 4px; text-align: center; }

.form-row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.col { flex: 1; padding: 0 10px; min-width: 250px; margin-bottom: 15px; }
.col-full { flex: 0 0 100%; padding: 0 10px; margin-bottom: 15px; }
.col label, .col-full label { font-weight: 600; margin-bottom: 5px; display: block; color: #555; font-size: 0.95rem; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group i.icon { position: absolute; left: 12px; color: #aaa; z-index: 2; }
.input-group input[type="text"], .input-group input[type="date"], .input-group input[type="number"], .input-group select,
.modal-card input[type="text"], .modal-card input[type="date"] {
    width: 100%; padding: 10px 10px 10px 35px; border: 1px solid #ced4da; border-radius: var(--radius-sm); font-size: 1rem;
}
.modal-card input[type="text"], .modal-card input[type="date"] { padding: 8px 10px; margin-bottom: 15px; }
.radio-group-container { display: flex; gap: 10px; background: #e9ecef; padding: 5px; border-radius: var(--radius-sm); width: fit-content; }
.radio-option input { display: none; }
.radio-option label { padding: 8px 20px; margin: 0; cursor: pointer; border-radius: 4px; color: #666; }
.radio-option input:checked + label { background: #fff; color: var(--color-primary); box-shadow: 0 2px 4px rgba(0,0,0,0.1); font-weight: 700; }
.boat-type-visual { display: flex; align-items: center; justify-content: center; padding: 20px; background: #f8f9fa; border-radius: var(--radius-md); border: 1px dashed #ccc; margin-bottom: 15px; min-height: 90px; gap: 15px; }
.boat-type-visual i { font-size: 3rem; color: var(--color-primary); }
.boat-type-text { font-size: 1.1rem; font-weight: 700; color: #555; }
.error-field { border-color: var(--color-danger) !important; background-color: #fff8f8; }
.required-asterisk { color: var(--color-danger); }
.thumbnail-preview { max-width: 150px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid #ddd; padding: 2px; }
.btn-dashboard-container { text-align: center; margin-top: 30px; }

/* --- Toast & AI Chatbot --- */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 260px; background: #fff; color: #333; padding: 14px 20px; border-radius: var(--radius-md); box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(-10px); transition: opacity 0.3s, transform 0.3s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left: 5px solid var(--color-success); }
.toast.error { border-left: 5px solid var(--color-danger); }

.ai-chat-widget { position: fixed; bottom: 20px; right: 20px; z-index: 9999; }
.ai-chat-btn { background: var(--color-primary); color: #fff; border: none; border-radius: 50%; width: 60px; height: 60px; font-size: 24px; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.ai-chat-window { display: none; width: 350px; height: 450px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); flex-direction: column; overflow: hidden; position: absolute; bottom: 80px; right: 0; }
.ai-chat-window.is-open { display: flex; }
.ai-chat-header { background: var(--color-navy); color: #fff; padding: 15px; font-weight: 700; display: flex; justify-content: space-between; }
.ai-chat-close { background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; }
.ai-chat-messages { flex-grow: 1; padding: 15px; overflow-y: auto; background: #f8f9fa; font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { padding: 10px; border-radius: var(--radius-md); max-width: 80%; word-wrap: break-word; }
.ai-msg.is-bot { background: #e9ecef; color: #000; align-self: flex-start; }
.ai-msg.is-user { background: var(--color-primary); color: #fff; align-self: flex-end; }
.ai-chat-input-bar { padding: 10px; background: #fff; border-top: 1px solid #ddd; display: flex; gap: 6px; }
.ai-chat-input-bar input { flex-grow: 1; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }

.footer, .site-footer { background-color: var(--color-surface); color: var(--color-muted); text-align: center; padding: 20px; margin-top: auto; border-top: 1px solid #dee2e6; font-size: 0.9em; }
.site-footer .admin-link { display: block; margin-top: 10px; color: var(--color-primary); text-decoration: underline; }
.site-footer-blue { background-color: var(--color-primary); color: #fff; border-top: none; }

@media (max-width: 992px) {
    .marina-manager-layout { display: block; }
    .sidebar { position: fixed; left: -260px; top: 0; z-index: 1000; transition: left 0.3s ease-in-out; }
    .sidebar.is-open { left: 0; }
    .mobile-menu-toggle { display: block; position: fixed; top: 15px; left: 15px; z-index: 1001; background: var(--color-navy); color: #fff; border: 1px solid var(--color-accent); border-radius: 5px; width: 40px; height: 40px; font-size: 24px; cursor: pointer; }
    .mobile-menu-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; }
    .mobile-menu-overlay.is-open { display: block; }
    .main-content-wrapper { width: 100%; padding-top: 60px; }
}
@media (max-width: 768px) {
    .banner-header { max-height: 130px; }
    .banner-footer { max-height: 80px; }
    .content-header { flex-direction: column; align-items: flex-start; }
    .language-menu-trigger-mobile { display: block; }
    .language-options-list { display: none; }
    .language-menu.is-open .language-options-container { display: block; position: fixed; inset: 0; background: rgba(26,44,79,0.9); z-index: 1000; padding: 20px; }
    .language-menu.is-open .language-panel-header { display: flex; justify-content: space-between; align-items: center; color: #fff; }
    .language-menu.is-open .language-panel-close { background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }
    .language-menu.is-open .language-options-list { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-lg); padding: 15px; margin-top: 15px; }
    .language-menu.is-open .language-options-list a { display: flex; align-items: center; gap: 15px; padding: 12px; color: var(--color-text); text-decoration: none; }
    .language-menu.is-open .language-options-list span { display: inline; }
    .col-hide-mobile { display: none; }
}

/* --- Modale Conferma Azioni (Elimina Natante, ecc.) --- */
.confirm-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 16px;
}
.confirm-modal-overlay.is-open {
    display: flex;
}
.confirm-modal-box {
    background-color: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 460px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    position: relative;
}
.confirm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 15px;
}
.confirm-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}
.confirm-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}
.confirm-modal-close:hover {
    color: #000;
}
.confirm-modal-body {
    font-size: 0.98rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 22px;
}
.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}