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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 15px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
    color: #2d3748;
}

.header-top {
    margin-bottom: 10px;
}

/* Grid layout solo per la home page (quando c'è .header-title) */
.header-top:has(.header-title) {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-title {
    text-align: center;
    grid-column: 2;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    grid-column: 3;
    gap: 8px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.8;
    color: #4a5568;
}

.login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    width: 44px;
    height: 44px;
}

.login-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.login-link:active {
    transform: translateY(0);
}

.login-link svg {
    flex-shrink: 0;
}

.login-link.hidden {
    display: none;
}

.user-greeting {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
    gap: 4px;
}

.faq-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
    width: 44px;
    height: 44px;
}

.faq-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(240, 147, 251, 0.4);
}

.faq-link:active {
    transform: translateY(0);
}

.faq-link svg {
    flex-shrink: 0;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
    width: 44px;
    height: 44px;
}

.logout-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(240, 147, 251, 0.4);
}

.logout-link:active {
    transform: translateY(0);
}

.logout-link svg {
    flex-shrink: 0;
}

.logout-link.hidden {
    display: none;
}

.user-greeting .greeting-text {
    color: #2d3748;
    font-size: 0.95rem;
}

.user-greeting strong {
    color: #667eea;
    font-weight: 600;
}

.user-greeting.hidden {
    display: none;
}

.profile-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s ease;
    opacity: 0.8;
}

.profile-link:hover {
    color: #764ba2;
    text-decoration: underline;
    opacity: 1;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

.logout-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 101, 101, 0.4);
}

.logout-link:active {
    transform: translateY(0);
}

.logout-link svg {
    flex-shrink: 0;
}

.logout-link.hidden {
    display: none;
}

/* Language selector - Custom dropdown con EMOJI! 🇮🇹🇬🇧 */
.language-selector {
    position: relative;
    margin-right: 0;
}

.custom-language-select {
    position: static;
    min-width: auto;
    width: auto;
}

.language-selector {
    position: static;
}

/* Forza il dropdown a partire dal bordo sinistro del selettore */
.custom-language-select .language-options {
    position: fixed !important;
    left: auto !important;
    right: 20px !important;
    top: 100px !important;
    transform: none !important;
}

.selected-language {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    font-weight: 600;
    font-size: 0.95rem;
}

.selected-language:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.selected-language .flag {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.flag-img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

.selected-language .lang-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selected-language .arrow {
    font-size: 10px;
    color: white;
    transition: transform 0.2s ease;
}

.language-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    width: 550px;
    max-width: calc(100vw - 20px);
    max-height: 70vh;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    padding: 12px;
    box-sizing: border-box;
}

/* Griglia 5 colonne con scroll verticale - NO scroll orizzontale */
.language-options-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    max-height: calc(70vh - 30px);
    overflow-y: auto;
    overflow-x: hidden;
}

.language-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid transparent;
    text-align: center;
    box-sizing: border-box;
}

.language-option:hover {
    background: #e8f4ff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.language-option .flag {
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-option .flag img {
    width: 48px;
    height: 36px;
}

.language-option .lang-name {
    font-size: 0.85rem;
    color: #2d3748;
    font-weight: 500;
    line-height: 1.2;
}

/* Lingue disabilitate (senza traduzioni) */
.language-option.language-disabled {
    opacity: 0.4;
    background: #f0f0f0;
}

.language-option.language-disabled:hover {
    background: #e8e8e8;
    border-color: #ccc;
    transform: none;
    box-shadow: none;
}

.language-option .lang-soon {
    font-size: 0.65rem;
    color: #999;
    font-weight: 400;
    font-style: italic;
}

/* Pulsante "Mostra tutte le lingue" */
.show-all-languages-btn {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.show-all-languages-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.show-all-languages-btn:active {
    transform: translateY(0);
}

.date-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.date-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    color: #667eea;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.date-nav-btn::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
}

.date-nav-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.date-nav-btn:active {
    transform: scale(0.95);
}

.date-nav-btn svg {
    flex-shrink: 0;
}

.date {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    background: white;
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: default;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.date[style*="cursor: pointer"]:hover {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    transform: scale(1.02);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.date[style*="cursor: pointer"]:active {
    transform: scale(0.98);
}

.calendar-icon {
    flex-shrink: 0;
    color: #667eea;
    opacity: 0.8;
}

.date:hover .calendar-icon {
    opacity: 1;
}

.date-picker-container {
    position: relative;
}

.datepicker-overlay {
    display: none !important;
}

.custom-datepicker {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 15px;
    z-index: 1000;
    min-width: 280px;
    max-width: 90vw;
}

.datepicker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.datepicker-month {
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
}

.datepicker-nav {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #667eea;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.datepicker-nav:hover {
    background: #f7fafc;
    color: #764ba2;
}

.datepicker-nav:active {
    background: #edf2f7;
    transform: scale(0.95);
}

.datepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.datepicker-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
    padding: 5px 0;
}

.datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.datepicker-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #2d3748;
    min-height: 44px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.datepicker-day:not(.empty):hover {
    background: #edf2f7;
    transform: scale(1.1);
}

.datepicker-day:not(.empty):active {
    background: #e2e8f0;
    transform: scale(1.05);
}

.datepicker-day.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.datepicker-day.today:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.datepicker-day.today:active {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
    transform: scale(1.05);
}

.datepicker-day.empty {
    cursor: default;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    color: #4a5568;
    font-size: 0.9rem;
}

footer p {
    margin: 0;
    opacity: 0.8;
}

.meal-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.meal-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1), 0 15px 30px rgba(0, 0, 0, 0.12);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #2d3748;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bimby-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ffeaa7 0%, #ffd970 100%);
    color: #d35400;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 217, 112, 0.3);
    user-select: none;
}

.bimby-checkbox-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 217, 112, 0.4);
}

.bimby-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #d35400;
}

.simple-recipes-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #a8e6cf 0%, #7dd3a0 100%);
    color: #0d5d2f;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(125, 211, 160, 0.3);
    user-select: none;
}

.simple-recipes-checkbox-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(125, 211, 160, 0.4);
}

.simple-recipes-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0d5d2f;
}

.reload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    min-width: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.reload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.reload-btn:active {
    transform: translateY(0);
}

.reload-btn svg {
    animation: none;
}

.reload-btn:hover svg {
    animation: rotate 0.6s ease-in-out;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.lunch-section .badge {
    background: linear-gradient(135deg, #ffeaa7 0%, #ffd970 100%);
    color: #d35400;
}

.ai-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dinner-description {
    margin: 0 0 8px 0;
    padding: 10px 15px;
    background: linear-gradient(to right, #faf5ff, #f3e8ff);
    border-left: 3px solid #9f7aea;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.5;
}

.dinner-disclaimer {
    margin: 0 0 15px 0;
    padding: 10px 15px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #856404;
    line-height: 1.5;
}

.content-box {
    min-height: 100px;
}

/* Loading spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #805ad5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.loading-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #999;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #805ad5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Menu list */
.menu-list {
    list-style: none;
}

.menu-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: linear-gradient(to right, #f7fafc, #fff);
    border-left: 3px solid #48bb78;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background: linear-gradient(to right, #edf2f7, #f7fafc);
    transform: translateX(5px);
    border-left-color: #38a169;
}

.menu-item strong {
    color: #2d3748;
}

/* Dinner proposal */
.dinner-proposal {
    display: grid;
    gap: 12px;
}

.dinner-item {
    padding: 15px;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-radius: 8px;
    border-left: 3px solid #9f7aea;
    transition: all 0.3s ease;
}

.dinner-item:hover {
    box-shadow: 0 4px 12px rgba(159, 122, 234, 0.25);
    transform: translateX(5px);
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.course-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.course-title {
    font-size: 1.1rem;
    color: #6b46c1;
    font-weight: 600;
    flex: 1;
}

.course-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pin-course-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: #e53e3e;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(229, 62, 62, 0.2);
    flex-shrink: 0;
}

.pin-course-btn:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
    background: linear-gradient(135deg, #fdd 0%, #fcc 100%);
}

.pin-course-btn.active {
    background: linear-gradient(135deg, #fc8181 0%, #e53e3e 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(229, 62, 62, 0.5);
}

.pin-course-btn.active:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.6);
}

.regenerate-course-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.regenerate-course-btn:hover:not(.disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.regenerate-course-btn:active:not(.disabled) {
    transform: scale(0.95);
}

.regenerate-course-btn.disabled {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    color: #a0aec0;
    cursor: not-allowed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    opacity: 0.6;
}

.regenerate-course-btn svg {
    animation: none;
}

.regenerate-course-btn:hover:not(.disabled) svg {
    animation: rotate 0.6s ease-in-out;
}

.dinner-item.pinned {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-left-color: #fc8181;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.1);
}

.recipe, .motivation {
    margin-top: 8px;
    line-height: 1.5;
    color: #4a5568;
    font-size: 0.9rem;
}

.recipe strong, .motivation strong {
    color: #805ad5;
    display: block;
    margin-bottom: 4px;
}

/* Chef advice link and content */
.chef-advice-link {
    display: inline-block;
    margin-top: 16px;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    text-decoration: none;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(240, 147, 251, 0.3);
}

.chef-advice-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.4);
}

.chef-advice-loading {
    display: inline-block;
    margin-top: 16px;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: #e2e8f0;
    color: #4a5568;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.chef-advice {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4a5568;
}

.chef-advice strong {
    color: #f5576c;
    display: inline;
}

.info-link-wrapper {
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.info-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #805ad5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.info-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #805ad5;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(128, 90, 213, 0.1);
    transition: all 0.2s ease;
}

.info-link:hover {
    background: rgba(128, 90, 213, 0.2);
    color: #6b46c1;
    transform: translateY(-1px);
}

.info-link svg {
    flex-shrink: 0;
}

/* Error and empty messages */
.error-message, .empty-message {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 0.9rem;
}

.error-message {
    color: #d63031;
}

.error-detail {
    font-size: 0.85rem;
    margin-top: 8px;
    opacity: 0.7;
}

.info-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #667eea;
    gap: 16px;
}

.info-message.no-menu {
    color: #718096;
}

.dinner-text {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

/* Accordion ingredienti - VERSIONE COMPATTA v2 */
.menu-item.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ingredient-arrow {
    font-size: 0.8rem;
    color: #667eea;
    transition: transform 0.3s ease;
    display: inline-block;
    margin-left: 6px;
}

.menu-item.clickable.active .ingredient-arrow {
    transform: rotate(180deg);
}

.menu-item.clickable:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 4px solid #667eea;
    padding-left: 11px;
}

.ingredients-accordion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    margin-top: -1px;
}

.ingredients-accordion.open {
    max-height: 1000px;
    margin-bottom: 10px;
}

.ingredients-content {
    padding: 8px 10px;
}

.ingredients-content h4 {
    margin-bottom: 6px;
    color: #2d3748;
    font-size: 0.8rem;
    font-weight: 600;
}

.ingredients-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-size: 0.8rem;
}

.ingredients-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ingredients-table th,
.ingredients-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.ingredients-table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.ingredients-table td {
    font-size: 0.8rem;
    color: #4a5568;
}

.ingredients-table tbody tr:last-child td {
    border-bottom: none;
}

.ingredients-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.ingredients-table td:last-child {
    font-weight: 600;
    color: #667eea;
    text-align: right;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        margin-bottom: 15px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
        position: static;
    }
    
    .header-left {
        text-align: center;
    }
    
    .header-right {
        position: static;
        transform: none;
        justify-content: center;
        width: 100%;
    }
    
    header h1 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .login-link {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .login-link svg {
        width: 18px;
        height: 18px;
    }
    
    .date-navigation {
        gap: 8px;
    }
    
    .date-nav-btn {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .date-nav-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .date {
        font-size: 0.9rem;
        padding: 6px 16px;
        gap: 6px;
    }
    
    .calendar-icon {
        width: 14px;
        height: 14px;
    }
    
    .custom-datepicker {
        min-width: 260px;
        max-width: 95vw;
        padding: 12px;
    }
    
    .datepicker-month {
        font-size: 0.9rem;
    }
    
    .datepicker-nav {
        font-size: 1.3rem;
        padding: 5px 10px;
    }
    
    .datepicker-weekday {
        font-size: 0.7rem;
        padding: 3px 0;
    }
    
    .datepicker-day {
        font-size: 0.85rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .header-actions {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }
    
    .meal-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .course-title {
        font-size: 1rem;
    }
    
    .bimby-checkbox-label {
        font-size: 0.7rem;
        padding: 5px 10px;
        gap: 4px;
    }
    
    .bimby-checkbox-label input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }
    
    .simple-recipes-checkbox-label {
        font-size: 0.7rem;
        padding: 5px 10px;
        gap: 4px;
    }
    
    .simple-recipes-checkbox-label input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }
    
    .reload-btn {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .pin-course-btn {
        width: 24px;
        height: 24px;
    }
    
    .pin-course-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .regenerate-course-btn {
        width: 24px;
        height: 24px;
    }
    
    .regenerate-course-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .menu-item, .dinner-item {
        padding: 10px 12px;
    }
    
    .menu-item.clickable {
        padding-right: 30px;
    }
    
    .ingredients-content {
        padding: 8px 10px;
    }
    
    .ingredients-content h4 {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .ingredients-table th,
    .ingredients-table td {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .ingredients-table th {
        font-size: 0.7rem;
    }
    
    .dinner-description, .dinner-disclaimer {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .info-link {
        font-size: 0.8rem;
        padding: 2px 6px;
    }
    
    .info-link svg {
        width: 12px;
        height: 12px;
    }
    
    footer {
        font-size: 0.85rem;
        padding: 15px;
        margin-top: 20px;
    }
}

/* Login Page Styles */
/* Stili specifici per header nella pagina di login */
body:has(.login-container) .header-top {
    display: block;
    text-align: center;
}

body:has(.login-container) .header-left {
    display: block;
    text-align: center;
}

body:has(.login-container) .header-left h1 {
    margin-bottom: 5px;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.login-box h2 {
    text-align: center;
    color: #2c5282;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.login-error {
    background-color: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
    font-size: 0.95rem;
}

.login-message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: none;
}

.login-message.error {
    background-color: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.login-message.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.form-group input::placeholder {
    color: #a0aec0;
}

.form-group small {
    color: #718096;
    font-size: 0.85rem;
    margin-top: -4px;
}

.login-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.login-button svg {
    width: 20px;
    height: 20px;
}

.forgot-password-link {
    display: inline-block;
    margin-top: 8px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.login-footer {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.login-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.login-footer-links .separator {
    color: #cbd5e0;
    font-size: 0.9rem;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #764ba2;
}

/* Stili per la pagina profilo */
.profile-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    margin-top: 20px;
}

.profile-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    width: 100%;
}

.profile-box h2 {
    text-align: center;
    color: #2c5282;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.profile-content {
    display: flex;
    gap: 30px;
}

/* Tab verticali */
.profile-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
    border-right: 2px solid #e2e8f0;
    padding-right: 20px;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 0.95rem;
    color: #4a5568;
    font-weight: 500;
}

.tab-button svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.tab-button:hover {
    background: #f7fafc;
    color: #2d3748;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.tab-button.active svg {
    opacity: 1;
}

/* Contenuto tab */
.profile-tabs-content {
    flex: 1;
    min-width: 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content h3 {
    color: #2d3748;
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.section-description {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state svg {
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state p {
    color: #4a5568;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state small {
    color: #718096;
    font-size: 0.9rem;
}

.profile-message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: none;
}

.profile-message.error {
    background-color: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.profile-message.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.account-info {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.info-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.info-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.info-value {
    color: #2d3748;
    font-size: 0.9rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.profile-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.profile-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.profile-button:active {
    transform: translateY(0);
}

.profile-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.profile-button svg {
    width: 20px;
    height: 20px;
}

.password-button {
    background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
}

.password-button:hover {
    box-shadow: 0 6px 12px rgba(245, 101, 101, 0.4);
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.back-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

@media (max-width: 768px) {
    /* Stili login */
    .login-box {
        padding: 30px 20px;
    }
    
    .login-box h2 {
        font-size: 1.5rem;
    }
    
    .login-container {
        min-height: 50vh;
    }
    
    /* Stili profilo */
    .profile-box {
        padding: 20px;
    }
    
    .profile-box h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .profile-container {
        padding: 15px;
    }
    
    .profile-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .profile-tabs {
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
        padding-right: 0;
        padding-bottom: 10px;
        min-width: 0;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-button {
        flex-shrink: 0;
        min-width: auto;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .tab-button span {
        display: none;
    }
    
    .tab-button svg {
        width: 24px;
        height: 24px;
    }
    
    .tab-content h3 {
        font-size: 1.1rem;
    }
    
    /* Stili header home page (solo quando ha .header-title) */
    .header-top:has(.header-title) {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .header-top:has(.header-title) .header-left {
        justify-content: center;
        order: -1;
        margin-bottom: 8px;
    }
    
    .header-top:has(.header-title) .header-title {
        grid-column: 1;
    }
    
    .header-top:has(.header-title) .header-right {
        grid-column: 1;
        justify-content: center;
        margin-top: 8px;
    }
    
    .user-greeting {
        padding: 6px 12px;
    }
    
    .user-greeting .greeting-text {
        font-size: 0.85rem;
    }
    
    .logout-link,
    .login-link {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .logout-link svg,
    .login-link svg {
        width: 16px;
        height: 16px;
    }
    
    .language-select {
        font-size: 0.85rem;
        padding: 6px 10px;
        min-width: 100px;
    }
    
    .language-selector {
        margin-right: 8px;
    }
    
    .custom-language-select {
        min-width: 110px;
    }
    
    .selected-language {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .selected-language .flag {
        font-size: 18px;
    }
    
    .selected-language .lang-name {
        font-size: 0.9rem;
    }
    
    .language-option {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .language-option .flag {
        font-size: 18px;
    }
    
    .language-option .lang-name {
        font-size: 0.65rem;
    }
    
    .language-options-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    
    .language-option {
        padding: 6px 2px;
    }
}

/* ============== STILI ALLERGENI ============== */
.allergeni-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.allergeni-header h3 {
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.allergeni-info-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #92400e;
}

.allergeni-info-badge svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.allergeni-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.loading-allergeni {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #718096;
    font-size: 0.95rem;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.allergene-card {
    position: relative;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.allergene-card:hover {
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.allergene-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6edff 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.allergene-checkbox-label {
    display: block;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.allergene-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.allergene-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    position: relative;
}

.allergene-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.allergene-card.selected .allergene-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.1);
}

.allergene-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.allergene-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    line-height: 1.4;
}

.allergene-card.selected .allergene-name {
    color: #667eea;
}

.allergene-desc {
    font-size: 0.8rem;
    color: #718096;
    line-height: 1.3;
}

.allergene-card.selected .allergene-desc {
    color: #4a5568;
}

.allergene-checkmark {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.allergene-card.selected .allergene-checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    opacity: 1;
    transform: scale(1);
}

.allergene-checkmark svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

.allergeni-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.allergeni-footer svg {
    flex-shrink: 0;
    color: #718096;
    opacity: 0.7;
}

.allergeni-footer small {
    color: #718096;
    font-size: 0.85rem;
    line-height: 1.4;
}

.allergeni-footer strong {
    color: #4a5568;
    font-weight: 600;
}

.save-allergeni-btn {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Responsive per allergeni */
@media (max-width: 768px) {
    .allergeni-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .allergeni-info-badge {
        align-self: flex-start;
    }
    
    .allergeni-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .allergene-content {
        padding: 14px;
    }
    
    .allergene-icon {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
    
    .save-allergeni-btn {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .allergene-name {
        font-size: 0.9rem;
    }
    
    .allergene-desc {
        font-size: 0.75rem;
    }
}

.info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* ===== GESTIONE FAMIGLIA ===== */

/* Pulsanti rotondi */
.round-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.round-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.round-btn:active {
    transform: translateY(0);
}

.round-btn svg {
    stroke-width: 2.5;
}

/* Pulsante aggiungi - verde */
.add-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.add-btn:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

/* Pulsante modifica - blu */
.edit-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
}

/* Pulsante elimina - rosso */
.delete-btn {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

/* Lista membri */
.family-members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Card membro */
.member-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.member-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.member-info {
    flex: 1;
}

.member-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.member-header h4 {
    margin: 0 0 6px 0;
    color: #2d3748;
    font-size: 1.2rem;
}

.linked-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: help;
}

.linked-badge svg {
    stroke-width: 2.5;
}

.member-role {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.member-role.bambino {
    background: #fef5e7;
    color: #d68910;
}

.member-role.adulto {
    background: #e8f4f8;
    color: #2874a6;
}

.member-role.genitore {
    background: #f4e8f8;
    color: #7d3c98;
}

.member-detail {
    margin: 8px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4a5568;
}

.member-detail strong {
    color: #2d3748;
    margin-right: 4px;
}

.member-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

/* Modali */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-small {
    max-width: 450px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px 20px 24px;  /* Padding normale per tutti */
    border-bottom: 2px solid #e2e8f0;
}

/* Header con spazio ridotto per l'utente corrente */
.modal-header.current-user-header {
    padding: 8px 24px 12px 24px;  /* Spazio ridotto ma presente per l'utente corrente */
}

/* Form con padding ridotto per l'utente corrente */
.modal-content:has(.modal-header.current-user-header) .modal-form {
    padding-top: 12px !important;  /* Leggero padding per l'utente corrente */
}

.modal-content:has(.modal-header.current-user-header) .form-row {
    margin-top: 0;  /* Rimuovi margin top del form-row per l'utente corrente */
}

.modal-content:has(.modal-header.current-user-header) .form-divider {
    margin: 0;  /* Rimuovi margin del form-divider per l'utente corrente */
}

.modal-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.4rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #a0aec0;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 2px solid #e2e8f0;
}

.modal-form {
    padding: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form label {
    display: block;
    margin-bottom: 6px;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
}

.modal-form input[type="text"],
.modal-form input[type="date"],
.modal-form select,
.modal-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.modal-form input[type="text"]:focus,
.modal-form input[type="date"]:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-form textarea {
    resize: vertical;
    min-height: 60px;
}

.modal-form select {
    cursor: pointer;
    background: white;
}

.modal-form select:disabled {
    cursor: not-allowed;
    background: #f5f5f5;
    color: #4a5568;  /* Grigio più scuro per migliorare la leggibilità */
    opacity: 1;  /* Mantieni opacità piena per il testo più scuro */
}

/* Sezione collegamento utente */
.user-link-section {
    background: #f0f9ff;
    border: 2px dashed #3b82f6;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.user-link-section.hidden {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    opacity: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
}

.email-search-container {
    position: relative;
}

.email-status {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    display: none;
}

.email-status span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.email-status.searching {
    display: block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.email-status.found {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.email-status.not-found {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.email-status.error {
    display: block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.form-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 20px 0;
}

/* Nota informativa nella modale */
.info-note {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: #f0f4ff;
    border-left: 3px solid #667eea;
    border-radius: 6px;
    margin-top: 8px;
    margin-bottom: 0;
}

.info-note svg {
    flex-shrink: 0;
    color: #667eea;
    margin-top: 2px;
}

.info-note p {
    margin: 0;
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Pulsanti modali */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-danger {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.4);
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.text-muted {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Responsive per modali */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .family-members-list {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-body,
    .modal-form {
        padding: 16px;
    }
    
    .modal-footer {
        padding: 16px;
        flex-direction: column-reverse;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
    }
}

/* ============================================
   SISTEMA DI VALUTAZIONE E FEEDBACK (Feature 1.2)
   ============================================ */

/* Rating Stars */
.rating-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0;
    padding: 0 0 12px 0;
}

.rating-stars {
    display: flex;
    gap: 4px;
}

.rating-star {
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.rating-star.empty {
    color: #e2e8f0;  /* Grigio ancora più chiaro per "non valutato" */
    opacity: 0.5;
}

.rating-star.filled {
    color: #f59e0b;
    opacity: 1;
}

.rating-star.hover {
    color: #fbbf24;
    opacity: 1;
    transform: scale(1.1);
}

.rating-star:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* Stelline con rating esistente hanno opacità piena anche quando vuote */
.rating-stars.has-rating .rating-star.empty {
    color: #cbd5e0;
    opacity: 0.4;
}

/* Stelline readonly (utenti non loggati) - no hover, no cursor */
.rating-stars.readonly .rating-star {
    cursor: default;
    pointer-events: none;
}

.rating-stars.readonly .rating-star.empty {
    color: #e2e8f0;
    opacity: 0.5;
}

.rating-stars.readonly .rating-star:hover {
    transform: none;
}

/* Indicatore caricamento rating */
.rating-loading {
    color: #a0aec0;
    font-size: 0.85rem;
    font-style: italic;
}

/* Messaggi feedback salvato/errore */
.feedback-message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 1;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.feedback-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.rating-label {
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

.rating-value {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 600;
}

/* Feedback Button */
.feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.feedback-btn:active {
    transform: translateY(0);
}

.feedback-btn.active {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

/* Feedback Form Accordion */
.feedback-accordion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f7fafc;
    border-radius: 8px;
    margin-top: 12px;
}

.feedback-accordion.open {
    max-height: 800px;
    padding: 20px;
}

/* Privacy Notice */
.privacy-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #0c4a6e;
}

.privacy-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #0ea5e9;
}

.privacy-notice strong {
    color: #075985;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
}

.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 120px;
    transition: border-color 0.2s ease;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Checkboxes per bambini */
.children-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.child-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.child-checkbox:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.child-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.child-checkbox.checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.child-checkbox label {
    margin: 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3748;
    transition: color 0.2s ease;
}

.child-checkbox.checked label {
    color: white;
}

/* Toggle Switch per "Lo rifarei" */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch input[type="checkbox"] {
    width: 48px;
    height: 24px;
    appearance: none;
    background: #cbd5e0;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch input[type="checkbox"]:checked {
    background: #48bb78;
}

.toggle-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: left 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input[type="checkbox"]:checked::before {
    left: 26px;
}

.toggle-switch label {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3748;
}

/* Feedback Actions */
.feedback-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.btn-save-feedback {
    padding: 10px 20px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save-feedback:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(72, 187, 120, 0.3);
}

.btn-save-feedback:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-cancel-feedback {
    padding: 10px 20px;
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel-feedback:hover {
    background: #cbd5e0;
}

/* Sezione "I Nostri Classici" - NASCOSTA TEMPORANEAMENTE */
.favorites-section {
    display: none !important; /* Nascosta per ora, ma mantenuta nel codice */
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.favorites-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.favorites-header h2 {
    font-size: 1.5rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.favorites-empty {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.favorites-empty svg {
    margin-bottom: 15px;
    opacity: 0.5;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.favorite-card {
    background: linear-gradient(135deg, #f7fafc 0%, #ffffff 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.favorite-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.favorite-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.favorite-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.3;
}

.favorite-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #f59e0b;
    white-space: nowrap;
}

.favorite-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 12px;
}

.favorite-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.favorite-card-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* ============================================================================ */
/* TAB ABBONAMENTO STYLES */
/* ============================================================================ */

.subscription-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: #6c757d;
}

.subscription-info-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.subscription-info-box .info-icon {
    font-size: 2rem;
}

.subscription-info-box h4 {
    margin: 0 0 0.25rem 0;
    color: white;
}

.subscription-info-box p {
    margin: 0;
    opacity: 0.95;
}

.pricing-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.pricing-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pricing-header h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.trial-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.pricing-note {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
    font-style: italic;
}

.price-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.price-display .price {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
}

.price-display .period {
    font-size: 1.25rem;
    color: #6c757d;
}

.features-list-compact {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.features-list-compact li {
    padding: 0.5rem 0;
    color: #495057;
}

.subscribe-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.subscribe-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.subscription-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #e9ecef;
    border-radius: 8px;
    color: #495057;
}

.subscription-note svg {
    flex-shrink: 0;
}

.subscription-status-box {
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.subscription-status-box.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.subscription-status-box.warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-icon {
    font-size: 2.5rem;
}

.status-header h4 {
    margin: 0 0 0.5rem 0;
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.status-badge.canceling {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.subscription-details-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.subscription-details-box .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.subscription-details-box .detail-row:last-child {
    border-bottom: none;
}

.subscription-details-box .detail-label {
    font-weight: 600;
    color: #495057;
}

.subscription-details-box .detail-value {
    color: #212529;
}

.alert-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-box.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.cancel-button {
    width: 100%;
    background: #dc3545 !important;
    color: white !important;
}

.cancel-button:hover {
    background: #c82333 !important;
}

.reactivate-button {
    width: 100%;
    background: #28a745 !important;
    color: white !important;
}

.reactivate-button:hover {
    background: #218838 !important;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .rating-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
    }
    
    .feedback-actions {
        flex-direction: column;
    }
    
    .btn-save-feedback,
    .btn-cancel-feedback {
        width: 100%;
    }

    .subscription-info-box {
        flex-direction: column;
        text-align: center;
    }

    .status-header {
        flex-direction: column;
        text-align: center;
    }

    .subscription-details-box .detail-row {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ============================================================================ */
/* CAROUSEL HORIZONTAL LAYOUT - Homepage Sections Slider */
/* ============================================================================ */

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 60px;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Rimuovi margin-bottom dalle sezioni nel carousel */
.carousel-slide.meal-section {
    margin-bottom: 0;
}

/* Scroll bar custom per le slide */
.carousel-slide::-webkit-scrollbar {
    width: 8px;
}

.carousel-slide::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.carousel-slide::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.carousel-slide::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

/* Pulsanti di navigazione laterali */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    opacity: 0.9;
}

.carousel-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    box-shadow: none;
}

.carousel-nav-left {
    left: 0;
}

.carousel-nav-right {
    right: 0;
}

.carousel-nav svg {
    flex-shrink: 0;
}

/* Indicatori (dots) */
.carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    margin-top: 10px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #cbd5e0;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
}

.carousel-indicator:hover {
    border-color: #667eea;
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    width: 32px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Responsive per tablet */
@media (max-width: 1024px) {
    .carousel-container {
        padding: 0 50px;
    }
    
    .carousel-nav {
        width: 45px;
        height: 45px;
    }
    
    .carousel-slide {
        max-height: calc(100vh - 260px);
    }
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .carousel-container {
        padding: 0 40px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .carousel-slide {
        padding: 0 5px;
        max-height: calc(100vh - 240px);
    }
    
    .carousel-indicators {
        padding: 15px 0;
        margin-top: 5px;
        gap: 10px;
    }
    
    .carousel-indicator {
        width: 10px;
        height: 10px;
    }
    
    .carousel-indicator.active {
        width: 28px;
    }
}

/* Per mobile molto piccoli */
@media (max-width: 480px) {
    .carousel-container {
        padding: 0 35px;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
    }
    
    .carousel-nav svg {
        width: 18px;
        height: 18px;
    }
    
    .carousel-slide {
        max-height: calc(100vh - 220px);
    }
}

/* Animazioni per transizioni fluide */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Touch feedback per mobile */
@media (hover: none) and (pointer: coarse) {
    .carousel-nav:active {
        background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
    }
}

