/* BARAPP v1.7.1 - CSS */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #f5f7fa; color: #333; line-height: 1.5; min-height: 100vh; overflow-x: hidden; }
.app-container { display: flex; min-height: 100vh; }

/* Topbar */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: #1e293b; color: white; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 1000; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.menu-toggle { background: none; border: none; color: white; font-size: 1.4rem; cursor: pointer; padding: 8px; border-radius: 6px; }
.menu-toggle:hover { background: rgba(255,255,255,0.1); }
.logo-header { flex: 1; display: flex; justify-content: center; align-items: center; }
.logo-text { font-size: 1.5rem; color: #fff; font-weight: 300; letter-spacing: 0.5px; }
.logo-text strong { font-weight: 600; color: #60a5fa; }
.header-logo { height: 28px; pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.header-logo-img { height: 32px; pointer-events: none; -webkit-user-select: none; user-select: none; }
.topbar-controls { display: flex; align-items: center; gap: 10px; }
.settings-btn { background: none; border: none; color: white; font-size: 1.3rem; cursor: pointer; padding: 8px; border-radius: 6px; transition: all 0.2s; }
.settings-btn:hover { background: rgba(255,255,255,0.15); transform: rotate(45deg); }
.sync-btn { background: #e2e8f0; border: none; color: #0f172a; width: 38px; height: 38px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.sync-btn:hover { background: #dbeafe; transform: rotate(180deg); }
.sync-btn.syncing { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* FIX 8: Status LED */
.status-led { width: 14px; height: 14px; border-radius: 50%; cursor: pointer; transition: all 0.3s; box-shadow: 0 0 8px currentColor; }
.status-led.led-green { background: #22c55e; color: #22c55e; }
.status-led.led-red { background: #ef4444; color: #ef4444; animation: pulse-red 1.5s infinite; }
@keyframes pulse-red { 0%, 100% { box-shadow: 0 0 8px #ef4444; } 50% { box-shadow: 0 0 16px #ef4444; } }

/* Sidebar */
.sidebar { position: fixed; left: -300px; top: 60px; bottom: 0; width: 280px; background: white; box-shadow: 2px 0 8px rgba(0,0,0,0.1); z-index: 900; transition: left 0.3s; display: flex; flex-direction: column; }
.sidebar.open { left: 0; }
.sidebar-header { padding: 8px 16px; border-bottom: 1px solid #e2e8f0; display: flex; flex-direction: column; }
.sidebar-header-top { margin-bottom: 0; }
.sidebar-space-reserved { height: 40px; }
.sidebar-logo { width: 100px; }
.sidebar-close { background: none; border: none; color: #64748b; font-size: 1.4rem; cursor: pointer; display: none; }
.nav-menu { flex: 1; padding: 8px 0; overflow-y: auto; }
.nav-item { display: flex; align-items: center; padding: 8px 16px; color: #475569; text-decoration: none; transition: all 0.2s; border-left: 4px solid transparent; }
.nav-item:hover { background: #f1f5f9; color: #1e293b; border-left-color: #3b82f6; }
.nav-item.active { background: white; color: #1d4ed8; border-left-color: #3b82f6; font-weight: 500; }
.nav-icon { width: 24px; margin-right: 12px; text-align: center; }
.nav-text { font-size: 0.95rem; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid #e2e8f0; font-size: 0.8rem; color: #94a3b8; }
.app-version { font-weight: 600; color: #3b82f6; }
.sidebar-overlay { position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 800; display: none; }

/* Main */
.main-content { flex: 1; margin-top: 60px; padding: 20px; min-height: calc(100vh - 60px); overflow-x: hidden; }
.page { display: none; max-width: 100%; }
.page.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.page-header { margin-bottom: 20px; }
.page-header h2 { font-size: 1.6rem; color: #1e293b; display: flex; align-items: center; gap: 10px; }
.page-subtitle { color: #64748b; font-size: 0.9rem; }

/* Stats Grid Dashboard */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.stat-card { background: white; border-radius: 12px; padding: 18px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; transition: transform 0.2s, box-shadow 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.stat-card.mattina { border-top: 4px solid #f59e0b; }
.stat-card.pomeriggio { border-top: 4px solid #3b82f6; }
.stat-card.sera { border-top: 4px solid #8b5cf6; }
.stat-card.totali { background: white; }
.stat-card.miglior-giorno { background: white; }
.stat-card.miglior-operatore { background: white; }
.stat-card.confronto { background: white; }
.stat-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.stat-header i { font-size: 1.4rem; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.stat-card.mattina .stat-header i { background: #fef3c7; color: #92400e; }
.stat-card.pomeriggio .stat-header i { background: #dbeafe; color: #1e40af; }
.stat-card.sera .stat-header i { background: #f3e8ff; color: #5b21b6; }
.stat-card.totali .stat-header i { background: #d1fae5; color: #065f46; }
.stat-card.miglior-giorno .stat-header i { background: #fef9c3; color: #854d0e; }
.stat-card.miglior-operatore .stat-header i { background: #fce7f3; color: #9d174d; }
.stat-card.confronto .stat-header i { background: #cffafe; color: #0e7490; }
.stat-header h3 { font-size: 1rem; color: #1e293b; }
.stat-header .periodo { font-size: 0.75rem; color: #64748b; font-weight: 400; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: #1e293b; margin-bottom: 10px; }
.stat-details { display: flex; justify-content: space-between; font-size: 0.85rem; }
.stat-item { display: flex; flex-direction: column; }
.stat-label { color: #64748b; font-size: 0.8rem; }
.stat-amount { font-weight: 600; color: #1e293b; }
/* Sfera colorata nel banner confronto */
.sfera { display: inline-block; width: 16px; height: 16px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.sfera.verde { background: #10b981; }
.sfera.rossa { background: #ef4444; }
.sfera.gialla { background: #eab308; }

/* Forms */
.form-container { background: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
.incasso-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: #475569; margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea { padding: 10px 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s; background: white; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.form-check label { cursor: pointer; font-weight: 500; color: #1e293b; }

/* Buttons */
.btn { padding: 10px 18px; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.2s; font-family: inherit; }
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; transform: translateY(-1px); }
.btn-secondary { background: #64748b; color: white; }
.btn-secondary:hover { background: #475569; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn.active { background: #3b82f6 !important; color: white !important; }

/* Tables */
.table-container { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
.table-container h3 { padding: 16px 20px 12px; color: #1e293b; font-size: 1.1rem; }
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { background: #f8fafc; }
th { padding: 12px 16px; text-align: left; font-size: 0.8rem; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid #e2e8f0; }
td { padding: 12px 16px; font-size: 0.9rem; color: #475569; border-bottom: 1px solid #f1f5f9; }
/* Righe alternate chiaro/scuro per leggibilità */
tbody tr:nth-child(odd) { background: #ffffff; }
tbody tr:nth-child(even) { background: #f8fafc; }
tbody tr:hover { background: #f1f5f9; }
.table-footer { padding: 14px 20px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* Incassi Generali Table v1.7.1 - Desktop: Turno SX, Miglior Giorno Centro, Importo DX */
.incassi-generali-table { width: 100%; }
.incassi-generali-table th:first-child, .incassi-generali-table td:first-child { text-align: left; }
.incassi-generali-table th:last-child, .incassi-generali-table td:last-child { text-align: right; font-weight: 700; }
/* v2.0: Colori tenui rimossi - background white pulito */
.incassi-generali-table tbody tr { background: white; transition: all 0.2s; }
.incassi-generali-table tbody tr:hover { background: #f8fafc; }
.incassi-generali-table .totale-row { background: #1e293b !important; color: white; }
.incassi-generali-table .totale-row td { color: white; font-weight: 700; border: none; }

/* Operatori */
.operator-order-btns { display: flex; flex-direction: column; gap: 2px; }
.order-btn { background: #f1f5f9; border: none; width: 28px; height: 24px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #64748b; transition: all 0.2s; }
.order-btn:hover:not(:disabled) { background: #e2e8f0; color: #1e293b; }
.order-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.operator-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.archive-btn { background: #fef3c7; color: #92400e; border: none; padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.archive-btn:hover { background: #fde68a; }
.restore-btn { background: #d1fae5; color: #065f46; border: none; padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.restore-btn:hover { background: #a7f3d0; }
.delete-btn { background: #fee2e2; color: #b91c1c; border: none; padding: 6px 10px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.delete-btn:hover { background: #fecaca; }
.operator-date { color: #64748b; font-size: 0.85rem; }
.archived-info { padding: 0 20px 12px; color: #64748b; font-size: 0.85rem; font-style: italic; }

/* Grafico Operatori - Righe colori tenui alternati */
#operatoriTableTot tbody tr:nth-child(1) { background: #fef3c7; }
#operatoriTableTot tbody tr:nth-child(2) { background: #dbeafe; }
#operatoriTableTot tbody tr:nth-child(3) { background: #f3e8ff; }
#operatoriTableTot tbody tr:nth-child(4) { background: #d1fae5; }
#operatoriTableTot tbody tr:nth-child(5) { background: #fce7f3; }
#operatoriTableTot tbody tr:nth-child(6) { background: #cffafe; }
#operatoriTableTot tbody tr:nth-child(7) { background: #fef9c3; }
#operatoriTableTot tbody tr:nth-child(8) { background: #e0e7ff; }

/* Calendario */
.calendar-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
#calendarMonthYear { font-size: 1.2rem; font-weight: 600; color: #1e293b; min-width: 160px; text-align: center; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.weekday { text-align: center; font-size: 0.75rem; font-weight: 600; color: #64748b; padding: 6px 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-cell { background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px; min-height: 70px; display: flex; flex-direction: column; cursor: pointer; transition: all 0.2s; }
.calendar-cell:hover:not(.disabled) { background: #eff6ff; transform: translateY(-2px); }
.calendar-cell.disabled { background: #f8fafc; color: #cbd5e1; cursor: default; }
.calendar-date { font-weight: 600; font-size: 0.85rem; color: #1e293b; }
.calendar-incasso { font-size: 0.7rem; color: #475569; margin-top: auto; }
.calendar-cell.has-incasso { background-color: #fef9c3; }
.calendar-cell.has-incasso .calendar-incasso { font-weight: 600; }
.calendar-cell.is-ferie { background-color: #e0f2fe; border-color: #7dd3fc; }
.calendar-cell.is-ferie .calendar-status { font-weight: 600; color: #0369a1; font-size: 0.7rem; }
.calendar-cell.is-chiuso { background-color: #f1f5f9; border-color: #cbd5e1; }
.calendar-cell.is-chiuso .calendar-status { font-weight: 600; color: #64748b; font-size: 0.7rem; }
.calendar-nota { background: #ef4444; color: white; font-size: 0.6rem; padding: 1px 4px; border-radius: 3px; margin-left: 4px; }

/* Grafici */
.chart-container { width: 100%; margin-top: 16px; }
.chart-container canvas { max-height: 350px; }
.chart-type-selector { display: flex; gap: 8px; margin-top: 12px; }

/* Filtri */
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.date-filter { padding: 8px 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 0.9rem; }

/* Analisi Operatori */
.analisi-dropdowns-wrapper { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.analisi-dropdown-single, .analisi-dropdown-group { flex: 1; min-width: 200px; }
.analisi-summary { background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%); border: 2px solid #3b82f6; border-radius: 12px; padding: 16px; margin-top: 16px; }
.analisi-summary h4 { color: #1e293b; font-size: 1rem; margin-bottom: 12px; }
.analisi-summary .summary-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 6px; margin-bottom: 6px; }
.analisi-summary .summary-row:nth-child(odd) { background: #ffffff; }
.analisi-summary .summary-row:nth-child(even) { background: #f0f4f8; }
.summary-label { font-weight: 600; color: #64748b; }
.summary-value { font-weight: 700; color: #1e293b; }

/* Referral */
.referral-section { background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%); }
.referral-box { background: white; border-radius: 12px; padding: 20px; margin: 16px 0; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.referral-code-display { margin-bottom: 16px; }
.referral-label { font-size: 0.85rem; color: #64748b; display: block; margin-bottom: 8px; }
.referral-code { font-size: 1.8rem; font-weight: 700; font-family: 'Courier New', monospace; color: #1e293b; background: #f1f5f9; padding: 12px 20px; border-radius: 8px; display: inline-block; letter-spacing: 2px; }
.referral-actions { display: flex; gap: 10px; justify-content: center; }
.referral-invites { margin-top: 20px; }
.referral-invites h4 { font-size: 0.9rem; color: #475569; margin-bottom: 10px; }
.invites-list { background: white; border-radius: 8px; padding: 12px; }
.empty-invites { color: #94a3b8; font-style: italic; text-align: center; font-size: 0.85rem; }
.invite-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.invite-item:last-child { border-bottom: none; }
.invite-status { font-size: 0.8rem; padding: 4px 8px; border-radius: 12px; }
.invite-status.trial { background: #fef3c7; color: #92400e; }
.invite-status.abbonato { background: #d1fae5; color: #065f46; }
.invite-status.scaduto { background: #fee2e2; color: #b91c1c; }
.invite-reward { font-size: 0.8rem; color: #059669; font-weight: 600; }

/* Ferie & Giorno Chiusura */
.ferie-list, .giorno-chiusura-list { margin-bottom: 12px; }
.ferie-item, .giorno-chiusura-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; font-size: 0.9rem; }
.ferie-item { background: #e0f2fe; color: #0369a1; }
.giorno-chiusura-item { background: #f1f5f9; color: #475569; }
.remove-btn { background: none; border: none; color: inherit; opacity: 0.6; cursor: pointer; font-size: 1rem; padding: 4px; }
.remove-btn:hover { opacity: 1; }
.color-sample { display: inline-block; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.ferie-color { background: #e0f2fe; color: #0369a1; }
.chiuso-color { background: #e5e7eb; color: #4b5563; }

/* Settings */
.settings-section { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
.settings-section h3 { color: #1e293b; margin-bottom: 12px; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.settings-section p { color: #64748b; font-size: 0.9rem; margin-bottom: 12px; }
.price-info { color: #475569 !important; }
.shift-settings { margin-bottom: 16px; }
.shift-item { background: #f8fafc; border-radius: 10px; padding: 14px; margin-bottom: 10px; border: 1px solid #e2e8f0; }
.shift-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.shift-header i { color: #64748b; font-size: 1.1rem; }
.shift-times { display: flex; gap: 20px; }
.time-group { display: flex; flex-direction: column; gap: 4px; }
.time-group label { font-size: 0.8rem; color: #64748b; }
.time-group input { padding: 8px 10px; border: 2px solid #e2e8f0; border-radius: 6px; width: 110px; }

/* Email Change */
.email-change-section { background: #f8fafc; border-radius: 10px; padding: 16px; margin: 20px 0; border: 1px solid #e2e8f0; }
.email-change-section h4 { color: #1e293b; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.email-info { color: #64748b; font-size: 0.85rem; margin-bottom: 12px; }
.personal-msg { background: #eff6ff; border-radius: 8px; padding: 14px; color: #1e40af; font-size: 0.9rem; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.personal-msg i { color: #3b82f6; font-size: 1.2rem; margin-top: 2px; }

/* Info Box */
.info-box { background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%); border-radius: 12px; padding: 16px; margin-bottom: 20px; border: 1px solid #bfdbfe; display: flex; gap: 12px; align-items: flex-start; }
.info-icon { color: #3b82f6; font-size: 1.3rem; flex-shrink: 0; }
.info-content h4 { color: #1e40af; margin-bottom: 6px; font-size: 1rem; }
.info-content p { color: #475569; font-size: 0.9rem; margin-bottom: 4px; }
.info-content code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-family: monospace; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 20px; }
.modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.modal-content { position: relative; background: white; border-radius: 12px; width: 100%; max-width: 450px; max-height: 90vh; overflow: auto; padding: 24px; animation: modalSlide 0.3s ease; }
@keyframes modalSlide { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-content h3 { color: #1e293b; font-size: 1.2rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Alerts */
.alert-container { position: fixed; top: 70px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.custom-alert { padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease; max-width: 300px; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #10b981; }
.alert-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #ef4444; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #3b82f6; }

/* Links */
.link-calendar { color: #3b82f6; text-decoration: none; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 4px; }
.link-calendar:hover { text-decoration: underline; }
.small-link { display: inline-block; margin-top: 4px; font-size: 0.8rem; color: #3b82f6; text-decoration: none; }
.small-link:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 768px) {
    .topbar { height: 56px; padding: 0 12px; }
    .header-logo { height: 24px; }
    .sidebar { width: 80%; left: -80%; top: 56px; }
    .sidebar.open { left: 0; }
    .sidebar-close { display: block; }
    .sidebar-overlay { top: 56px; }
    .main-content { margin-top: 56px; padding: 14px; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 1.4rem; }
    .form-row { grid-template-columns: 1fr; }
    .shift-times { flex-direction: column; gap: 10px; }
    .referral-code { font-size: 1.4rem; padding: 10px 16px; }
    .referral-actions { flex-direction: column; }
    .calendar-weekdays { display: none; }
    .calendar-grid { grid-template-columns: repeat(5, 1fr); gap: 3px; }
    .calendar-cell { min-height: 55px; padding: 4px; border-radius: 6px; }
    .calendar-date { font-size: 0.75rem; }
    .calendar-incasso { font-size: 0.6rem; }
    .table-responsive { overflow-x: visible; }
    .table-responsive table { display: block; }
    .table-responsive thead { display: none; }
    .table-responsive tbody { display: block; }
    .table-responsive tr { display: block; margin-bottom: 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: white; }
    .table-responsive td { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
    .table-responsive td:last-child { border-bottom: none; }
    .table-responsive td::before { content: attr(data-label); font-weight: 600; color: #64748b; font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .page-header h2 { font-size: 1.3rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .analisi-dropdowns-wrapper { flex-direction: column; }
    .modal-content { padding: 16px; }
}

@media print {
    .topbar, .sidebar, .sidebar-overlay, .modal, .alert-container { display: none !important; }
    .main-content { margin: 0; padding: 0; }
}

/* ===== MIGLIORIE v1-71 ===== */

/* Colori tenui alternati per tabelle - stile coerente */
.table-responsive tbody tr:nth-child(odd) {
    background-color: #ffffff;
}
.table-responsive tbody tr:nth-child(even) {
    background-color: #f8fafc;
}
.table-responsive tbody tr:hover {
    background-color: #f1f5f9;
}

/* Incassi Generali - stile migliorato */

/* Box info per frasi (miglior giorno, media) */
.info-periodo {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
    font-size: 0.95rem;
    color: #0c4a6e;
    line-height: 1.6;
    word-wrap: break-word;
}
.info-periodo strong {
    color: #0369a1;
}

    
    /* Testi lunghi - word wrap */
    .info-periodo,
    .analisi-summary,
    td[data-label] {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    /* Nomi operatori lunghi */
    td[data-label="Operatore"],
    td[data-label="Descrizione"] {
        max-width: 100% !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
}

/* ===== MOBILE: TOTALI CENTRATO ===== */
@media (max-width: 600px) {
    /* Riga totali in incassi generali */
    .incassi-generali-table tfoot,
    .incassi-generali-table tfoot tr,
    #incassiGeneraliTable tfoot,
    #incassiGeneraliTable tfoot tr {
        display: block !important;
        width: 100% !important;
    }
    
    .incassi-generali-table tfoot tr,
    #incassiGeneraliTable tfoot tr {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
        border-radius: 12px !important;
        padding: 16px !important;
        margin: 16px 0 !important;
        text-align: center !important;
    }
    
    .incassi-generali-table tfoot td,
    #incassiGeneraliTable tfoot td {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 8px 0 !important;
        border: none !important;
        color: white !important;
        background: transparent !important;
    }
    
    .incassi-generali-table tfoot td strong,
    #incassiGeneraliTable tfoot td strong {
        color: #fbbf24 !important;
        font-size: 1.2rem !important;
    }
    
    /* Testi lunghi - word wrap */
    .info-periodo,
    .analisi-summary,
    td[data-label] {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    /* Nomi operatori lunghi */
    td[data-label="Operatore"],
    td[data-label="Descrizione"] {
        max-width: 100% !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
}

/* Fix: Assicura visibilità Media 10gg su mobile */
@media (max-width: 600px) {
    .table-footer {
        display: flex !important;
        visibility: visible !important;
        padding: 12px 16px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .table-footer span,
    .table-footer strong {
        display: inline !important;
        visibility: visible !important;
    }
}

/* ===== TABELLE COLORATE - STILE CARD ===== */
/* Colori tenui alternati per ogni riga/card */

/* Palette colori tenui */
/* 1. Giallo crema #fef9e7 */
/* 2. Azzurro cielo #e8f4fc */
/* 3. Rosa cipria #fce8f0 */
/* 4. Verde menta #e8f8f0 */
/* 5. Lavanda #f0e8fc */
/* 6. Pesca #fcf0e8 */

/* ULTIMI INCASSI - Mattina (toni caldi) */
#tbodyMattina tr:nth-child(6n+1) { background-color: #fef9e7 !important; }
#tbodyMattina tr:nth-child(6n+2) { background-color: #fcf0e8 !important; }
#tbodyMattina tr:nth-child(6n+3) { background-color: #e8f8f0 !important; }
#tbodyMattina tr:nth-child(6n+4) { background-color: #e8f4fc !important; }
#tbodyMattina tr:nth-child(6n+5) { background-color: #fce8f0 !important; }
#tbodyMattina tr:nth-child(6n+6) { background-color: #f0e8fc !important; }

/* ULTIMI INCASSI - Pomeriggio (toni freschi) */
#tbodyPomeriggio tr:nth-child(6n+1) { background-color: #e8f4fc !important; }
#tbodyPomeriggio tr:nth-child(6n+2) { background-color: #e8f8f0 !important; }
#tbodyPomeriggio tr:nth-child(6n+3) { background-color: #f0e8fc !important; }
#tbodyPomeriggio tr:nth-child(6n+4) { background-color: #fef9e7 !important; }
#tbodyPomeriggio tr:nth-child(6n+5) { background-color: #fce8f0 !important; }
#tbodyPomeriggio tr:nth-child(6n+6) { background-color: #fcf0e8 !important; }

/* ULTIMI INCASSI - Sera (toni serali) */
#tbodySera tr:nth-child(6n+1) { background-color: #f0e8fc !important; }
#tbodySera tr:nth-child(6n+2) { background-color: #fce8f0 !important; }
#tbodySera tr:nth-child(6n+3) { background-color: #e8f4fc !important; }
#tbodySera tr:nth-child(6n+4) { background-color: #e8f8f0 !important; }
#tbodySera tr:nth-child(6n+5) { background-color: #fef9e7 !important; }
#tbodySera tr:nth-child(6n+6) { background-color: #fcf0e8 !important; }

/* INCASSI GENERALI - 3 turni con colori distintivi */
/* v2.0: Colori pastello rimossi */

/* ANALISI OPERATORI - colori alternati */
/* v2.0: Colori tenui rimossi - ora usa background white pulito */

/* Intestazioni tabelle - v2.0: colore più contrastato */
#analisiTable th { background-color: #f1f5f9 !important; color: #1e293b !important; font-weight: 600; }

/* ===== MOBILE: Card colorate ===== */
@media (max-width: 600px) {
    /* Ogni card su mobile mantiene il colore e bordi arrotondati */
    #tbodyMattina tr, #tbodyPomeriggio tr, #tbodySera tr,
    #incassiGeneraliTbody tr, #analisiTbody tr {
        border-radius: 10px !important;
        margin-bottom: 12px !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    }
    
    /* Ultimi Incassi Mattina - Mobile */
    #tbodyMattina tr:nth-child(6n+1) { background-color: #fef9e7 !important; }
    #tbodyMattina tr:nth-child(6n+2) { background-color: #fcf0e8 !important; }
    #tbodyMattina tr:nth-child(6n+3) { background-color: #e8f8f0 !important; }
    #tbodyMattina tr:nth-child(6n+4) { background-color: #e8f4fc !important; }
    #tbodyMattina tr:nth-child(6n+5) { background-color: #fce8f0 !important; }
    #tbodyMattina tr:nth-child(6n+6) { background-color: #f0e8fc !important; }
    
    /* Ultimi Incassi Pomeriggio - Mobile */
    #tbodyPomeriggio tr:nth-child(6n+1) { background-color: #e8f4fc !important; }
    #tbodyPomeriggio tr:nth-child(6n+2) { background-color: #e8f8f0 !important; }
    #tbodyPomeriggio tr:nth-child(6n+3) { background-color: #f0e8fc !important; }
    #tbodyPomeriggio tr:nth-child(6n+4) { background-color: #fef9e7 !important; }
    #tbodyPomeriggio tr:nth-child(6n+5) { background-color: #fce8f0 !important; }
    #tbodyPomeriggio tr:nth-child(6n+6) { background-color: #fcf0e8 !important; }
    
    /* Ultimi Incassi Sera - Mobile */
    #tbodySera tr:nth-child(6n+1) { background-color: #f0e8fc !important; }
    #tbodySera tr:nth-child(6n+2) { background-color: #fce8f0 !important; }
    #tbodySera tr:nth-child(6n+3) { background-color: #e8f4fc !important; }
    #tbodySera tr:nth-child(6n+4) { background-color: #e8f8f0 !important; }
    #tbodySera tr:nth-child(6n+5) { background-color: #fef9e7 !important; }
    #tbodySera tr:nth-child(6n+6) { background-color: #fcf0e8 !important; }
    
    /* v2.0: Incassi Generali - Colori pastello rimossi */
    
    /* v2.0: Analisi Operatori - Colori tenui rimossi */
}

/* ===== BOX CONSIGLIO SMART ===== */
.stat-card.consiglio {
    background: white;
}
.stat-card.consiglio .stat-header i {
    background: #f3e8ff;
    color: #7c3aed;
}
.stat-card.consiglio .consiglio-text {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 12px;
}
.stat-card.consiglio .link-consigli {
    color: #7c3aed;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.stat-card.consiglio .link-consigli:hover {
    text-decoration: underline;
}

/* Box previsione - aggiungo bordo */
.stat-card.previsione {
    background: white;
}
.stat-card.previsione .stat-header i {
    background: #e0f7fa;
    color: #0891b2;
}

/* ===== PAGINA CONSIGLI SMART ===== */
.consigli-container {
    max-width: 800px;
}
.consiglio-section {
    margin-bottom: 24px;
}
.consiglio-section h3 {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.consiglio-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 10px;
    border-left: 4px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.consiglio-card.alert {
    border-left-color: #ef4444;
    background: linear-gradient(90deg, #fef2f2 0%, #ffffff 100%);
}
.consiglio-card.trend {
    border-left-color: #3b82f6;
    background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%);
}
.consiglio-card.operatore {
    border-left-color: #10b981;
    background: linear-gradient(90deg, #ecfdf5 0%, #ffffff 100%);
}
.consiglio-card.turno {
    border-left-color: #f59e0b;
    background: linear-gradient(90deg, #fffbeb 0%, #ffffff 100%);
}
.consiglio-card p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}
.consiglio-card .no-data {
    color: #94a3b8;
    font-style: italic;
}
.consigli-intro {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    color: #0c4a6e;
}

/* ===== CONSIGLI SMART - FOOTER E ASSAGGI ===== */
/* Stile per i testi "assaggio" quando i dati sono insufficienti */
.consiglio-card .assaggio {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Footer della pagina consigli */
.consigli-footer {
    margin-top: 24px;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #86efac;
    border-radius: 12px;
}

.consigli-footer-text {
    color: #166534;
    font-size: 1rem;
    margin: 0;
}

/* ===== BOX "LO SAPEVI CHE..." ===== */
/* Box in Dashboard per promuovere il servizio caricamento dati storici */
.stat-card.losapevi {
    background: white;
}
.stat-card.losapevi .stat-header i {
    background: #fef3c7;
    color: #d97706;
}
.stat-card.losapevi .losapevi-text {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 12px;
}
.stat-card.losapevi .link-upload-storici {
    color: #d97706;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.stat-card.losapevi .link-upload-storici:hover {
    text-decoration: underline;
}

/* ===== PAGINA UPLOAD STORICI ===== */
/* Stili per la pagina di richiesta caricamento dati storici */
.upload-info {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    border: 1px solid #fcd34d;
}
.upload-info .info-icon {
    color: #d97706;
}
.upload-info h4 {
    color: #92400e;
}
.upload-benefits {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}
.upload-benefits li {
    padding: 6px 0;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}
.upload-benefits li i {
    color: #10b981;
}
.upload-form-container {
    max-width: 500px;
}
.upload-storici-form .input-readonly {
    background-color: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

/* ===== MODIFICA 4: STILI BOTTONI AZIONI OPERATORI ===== */
/* Bottoni nella colonna Azioni della tabella operatori */

/* Stile base per tutti i bottoni azione */
.btn-action {
    background: none;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 4px;
}

/* Bottone Elimina - rosso */
.btn-action.delete-operator {
    color: #ef4444;
}
.btn-action.delete-operator:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Bottone Archivia - arancione */
.btn-action.archive-operator {
    color: #f59e0b;
}
.btn-action.archive-operator:hover {
    background: rgba(245, 158, 11, 0.1);
}

/* Bottone Riattiva - verde */
.btn-action.riattiva-operator {
    color: #10b981;
    font-size: 0.85rem;
}
.btn-action.riattiva-operator:hover {
    background: rgba(16, 185, 129, 0.1);
}

/* Info operatori archiviati */
.archived-info {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-style: italic;
}

/* ===== PAGINA UPLOAD STORICI - CENTRATURA DESKTOP ===== */
/* Centra il form su schermi grandi mantenendo layout mobile */
@media (min-width: 768px) {
    #upload-storici .page-body {
        max-width: 700px;
        margin: 0 auto;
    }
    #upload-storici .upload-form-container {
        max-width: 500px;
        margin: 20px auto;
    }
}

/* ===== BOTTONI TESTO LEGGERI PER OPERATORI ===== */
/* Bottoni semplici senza icone, solo testo */
.btn-text-action {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    margin-right: 6px;
}

/* Elimina - rosso chiaro */
.btn-text-action.delete-operator {
    color: #dc2626;
}
.btn-text-action.delete-operator:hover {
    background: #fee2e2;
}

/* Archivia - arancione chiaro */
.btn-text-action.archive-operator {
    color: #d97706;
}
.btn-text-action.archive-operator:hover {
    background: #fef3c7;
}

/* Riattiva - verde chiaro */
.btn-text-action.riattiva-operator {
    color: #059669;
}
.btn-text-action.riattiva-operator:hover {
    background: #d1fae5;
}

/* ===== BOX AUTORIZZAZIONE ACCESSO SUPPORTO ===== */
.auth-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
}
.auth-info {
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.5;
}
.auth-check {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.auth-check label {
    font-weight: 500;
    color: #334155;
}


/* ===== SIDEBAR HEADER - Dashboard sopra la linea ===== */
.sidebar-header {
    padding: 8px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.sidebar-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

/* Dashboard nel header usa lo stesso stile delle altre voci */
.sidebar-header .nav-item {
    margin: 0 -8px; /* Allineato con padding 8px */
    border-left: 4px solid transparent;
}

.sidebar-header .nav-item.active {
    background: white;
    color: #1d4ed8;
    border-left-color: #3b82f6;
}

/* PIN Lock Screen */
#pinLockScreen { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); z-index: 99999; display: flex; align-items: center; justify-content: center; }
.pin-lock-container { background: white; padding: 40px; border-radius: 20px; text-align: center; max-width: 320px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.pin-lock-logo { margin-bottom: 24px; }
.pin-lock-container h2 { color: #1e293b; margin: 0 0 24px 0; font-size: 1.5rem; }
.pin-input-container { margin-bottom: 16px; }
#pinInput { width: 100%; padding: 16px; font-size: 24px; text-align: center; border: 2px solid #e2e8f0; border-radius: 12px; letter-spacing: 8px; }
#pinInput:focus { outline: none; border-color: #3b82f6; }
.pin-error { color: #ef4444; margin: 0 0 16px 0; font-size: 14px; }
#pinSubmitBtn { width: 100%; padding: 14px; font-size: 16px; }

/* Calendar missing incasso indicator - v2.0: sfondo rimosso */
.calendar-cell.is-missing { border: 2px solid #ef4444 !important; }
.calendar-missing { color: #eab308; font-size: 1.2rem; text-align: center; }

/* ===== v2.0: ANALISI OPERATORI - Stile pulito senza colori tenui ===== */

/* Desktop: Tabella normale con background white */
#analisiTable tbody tr {
    background: white;
    transition: all 0.2s;
}

#analisiTable tbody tr:hover {
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#analisiTable tbody td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

/* Mobile: Layout box/card */
@media (max-width: 768px) {
    #analisiTable tbody tr {
        display: block;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 16px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    #analisiTable tbody tr:hover {
        background: #f8fafc;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        transform: translateY(-2px);
    }
    
    #analisiTable tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
    }
    
    #analisiTable tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
    }
}


/* ===== v2.0: TOTALE PERIODO - Riga unica nera ===== */
.totale-periodo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    padding: 20px 24px;
    border-radius: 12px;
    margin-top: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.totale-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

.totale-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: #60a5fa;
}

@media (max-width: 600px) {
    .totale-periodo-row {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* ===== v2.0: PERFORMANCE OTTIMIZZAZIONI ===== */

/* Transizioni più fluide con will-change */
.nav-item {
    will-change: background-color, border-color;
}

.stat-card {
    will-change: transform, box-shadow;
}

.btn {
    will-change: background-color, transform;
}

.modal {
    will-change: opacity, transform;
}

/* Smooth scroll per navigazione */
html {
    scroll-behavior: smooth;
}

/* Ottimizza rendering liste */
.calendar-grid,
.incassi-generali-table tbody,
#analisiTable tbody {
    will-change: contents;
}

/* ===== v2.0.3: BOX MICROTREND E PROMEMORIA ===== */

/* Microtrend */
/* Microtrend - Coerente con altri box */
.stat-card.microtrend {
    background: white;
    border-top: 4px solid #6366f1; /* Indaco per distinguerlo */
}

.trend-chart {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px 12px;
    margin: 12px 0;
    text-align: center;
}

.trend-placeholder {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #64748b;
    font-weight: 500;
}

.trend-placeholder .emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.trend-ascii {
    font-family: monospace;
    font-size: 1.1rem;
    line-height: 1.2;
    color: #475569;
}

.trend-result {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    line-height: 1.4;
    background: #fef3c7;
    color: #92400e;
    margin-top: 10px;
}

.trend-result.stable {
    background: #fef3c7;
    color: #92400e;
}

.trend-result .dettaglio {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 4px;
    display: block;
}

.trend-note {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 8px;
    line-height: 1.4;
    font-weight: 400;
}

/* Promemoria */
.stat-card.promemoria {
    background: white;
}

.promemoria-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.promemoria-item {
    background: #f8fafc;
    border-left: 3px solid #3b82f6;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.promemoria-item:hover {
    background: #e0f2fe;
    transform: translateX(3px);
}

.promemoria-date {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.promemoria-text {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.3;
}

.promemoria-empty {
    text-align: center;
    color: #94a3b8;
    padding: 24px 12px;
    font-style: italic;
}

.promemoria-empty p {
    margin: 0;
}

.btn-add-promemoria {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.2s;
}

.btn-add-promemoria:hover {
    background: #2563eb;
}

.link-vedi-tutti-promemoria {
    display: block;
    text-align: center;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px;
    margin-top: 8px;
}

.link-vedi-tutti-promemoria:hover {
    text-decoration: underline;
}

.promemoria-all-list {
    max-height: 400px;
    overflow-y: auto;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

/* Modal textarea */
#promemoriaTesto {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

#promemoriaTesto:focus {
    outline: none;
    border-color: #3b82f6;
}
