/* =========================================
   Agenda 3.0 — Stylesheet completo
   ========================================= */

/* ── 1. RESET E BASE ── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f0f2f5;
    margin: 0; padding: 10px; color: #333; line-height: 1.5;
}

/* ── 2. LAYOUT E CONTENITORI ── */
.container, #calendar-container {
    max-width: 1000px; margin: 0 auto 15px auto;
    background: white; padding: 15px; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); width: 100%;
}

.header-admin {
    display: flex; flex-direction: column; align-items: center;
    background: white; padding: 15px; border-radius: 12px;
    margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); gap: 10px;
}

/* ── 3. PULSANTI ── */
.btn-search, .admin-btn, .btn-agenda, .btn-logout, .btn-cancel, .btn-save {
    text-decoration: none !important; padding: 10px 18px; border-radius: 8px;
    font-weight: bold; display: inline-block; border: none; cursor: pointer;
    text-align: center; font-size: 14px; transition: 0.2s; color: white !important;
}

.admin-btn, .btn-search, .btn-save { background-color: #007bff !important; }
.btn-agenda { background-color: #28a745 !important; }
.btn-logout { background-color: #dc3545 !important; }
.btn-cancel { background-color: #6c757d !important; }

.nav-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%;
}

/* ── 4. FILTRI ADMIN ── */
.filter-section { background: #f8f9fa; padding: 15px; border-radius: 10px; margin-bottom: 15px; border: 1px solid #ddd; }
.filter-form { display: flex; flex-direction: column; gap: 12px; }

.filter-group { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.filter-group label { font-size: 13px; font-weight: bold; color: #555; }

input[type="date"], select {
    width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px;
    font-size: 16px; background: white; height: 48px;
}

.checkbox-group-admin {
    display: flex !important; flex-direction: row !important; align-items: center !important;
    gap: 10px; background: white; padding: 10px; border-radius: 8px; border: 1px solid #ccc;
}
.checkbox-group-admin input { width: 22px; height: 22px; margin: 0; }

/* ── 5. MODALE ── */
#availabilityModal, .modal-details {
    display: none;
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    background: rgba(0,0,0,0.8) !important;
    z-index: 99999 !important;
    justify-content: center; align-items: center;
}

#availabilityModal[style*="display: block"] { display: flex !important; }

.modal-content {
    background: white; padding: 25px; border-radius: 20px;
    width: 90%; max-width: 380px; box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.btn-container { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; width: 100%; }
.btn-save { background-color: #007bff !important; color: white !important; border: none; padding: 12px; font-weight: bold; border-radius: 8px; cursor: pointer; }
#btnDelete, .btn-delete { background-color: #dc3545 !important; color: white !important; border: none; padding: 12px; font-weight: bold; border-radius: 8px; cursor: pointer; display: block; }
.btn-cancel { background-color: #6c757d !important; color: white !important; border: none; padding: 12px; border-radius: 8px; }

/* ── 6. CALENDARIO E TABELLE ── */
.fc { width: 100% !important; font-size: 10px !important; }
.fc-scrollgrid { table-layout: fixed !important; }

.table-responsive { overflow-x: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 8px; text-align: left; border-bottom: 1px solid #eee; font-size: 13px; }

.badge { padding: 6px 12px; border-radius: 4px; color: white; font-weight: bold; }
.empty-cell { text-align: center; padding: 20px; color: #999; }

/* ── 7. USER INFO BAR ── */
.user-info {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 8px; padding: 12px 16px;
    position: sticky; top: 0; z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.user-info .nav-actions {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    grid-template-columns: unset; width: auto;
}

.logout-btn, a.logout-btn:visited {
    background-color: #dc3545 !important; color: white !important;
    text-decoration: none !important; padding: 8px 15px;
    border-radius: 6px; font-weight: bold; display: inline-block;
}

/* ── 8. TELEFONO ── */
.tel-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; background: #28a745; border-radius: 50%;
    text-decoration: none; font-size: 15px; transition: background 0.2s;
}
.tel-link:hover { background: #218838; }
.no-tel { color: #ccc; font-size: 13px; }

/* ── 9. NON RISPONDENTI (admin.php) ── */
.no-reply-section { margin-top: 20px; background: #fff8e1; border: 1px solid #ffe082; border-radius: 10px; padding: 15px; overflow: hidden; }
.no-reply-section h4 { margin: 0 0 12px; color: #795548; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.no-reply-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff8e1; }
.no-reply-header h4 { margin: 0; font-size: 14px; color: #795548; display: flex; align-items: center; gap: 6px; }
.no-reply-count { background: #ff8f00; color: white; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 10px; }
.no-reply-hint { padding: 10px 16px; background: #fff8e1; font-size: 13px; color: #a1887f; border-top: 1px solid #ffe082; font-style: italic; }
.no-reply-list { background: white; }
.no-reply-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: white; border-radius: 8px; margin-bottom: 6px; font-size: 14px; border-bottom: 1px solid #f5f5f5; }
.no-reply-item:last-child { margin-bottom: 0; border-bottom: none; }
.no-reply-name { display: flex; flex-direction: column; gap: 2px; }
.no-reply-name strong { color: #333; }
.no-reply-name small { color: #aaa; font-size: 12px; }
.no-reply-right { display: flex; align-items: center; gap: 8px; }
.all-replied { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: #e8f5e9; border-radius: 12px; border: 1px solid #a5d6a7; font-size: 14px; color: #2e7d32; font-weight: 600; margin-top: 18px; }

/* ── 10. SELECT MESI MULTIPLI ── */
.months-select { width: 100%; border: 1px solid #ddd; border-radius: 8px; background: white; font-size: 13px; padding: 4px; }
.months-select option { padding: 6px 10px; border-radius: 5px; margin: 1px 0; cursor: pointer; }
.months-select option:checked { background: #007bff linear-gradient(0deg, #007bff 0%, #007bff 100%); color: white; }
.months-hint { font-size: 11px; color: #999; margin-top: 3px; }

/* ── 11. KPI (admin.php) ── */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 20px 0; }
.kpi-card { background: white; border-radius: 12px; padding: 14px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.kpi-val  { font-size: 24px; font-weight: 700; color: #007bff; }
.kpi-lbl  { font-size: 11px; color: #999; margin-top: 3px; text-transform: uppercase; letter-spacing: .4px; }

/* ── 12. NAVIGAZIONE ADMIN (admin.php) ── */
.admin-nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.btn-nav-big {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 18px 12px; border-radius: 14px; text-decoration: none; color: white;
    font-weight: 700; text-align: center; transition: transform .15s, box-shadow .15s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.btn-nav-big:active { transform: scale(0.96); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.btn-nav-big .nav-icon { font-size: 26px; margin-bottom: 6px; }
.btn-nav-big .nav-label { font-size: 14px; line-height: 1.2; }
.btn-nav-big .nav-sub { font-weight: 400; font-size: 11px; opacity: .85; display: block; margin-top: 4px; }

/* ── 13. FILTRI ADMIN AVANZATI (admin.php) ── */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-cell { display: flex; flex-direction: column; gap: 4px; }
.filter-cell label { font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .4px; }
.filter-cell input[type=date], .filter-cell select { padding: 9px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; background: white; height: 40px; min-width: 130px; }
.check-pill { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1.5px solid #ddd; border-radius: 20px; background: white; cursor: pointer; font-size: 13px; font-weight: 600; color: #555; transition: .15s; user-select: none; height: 40px; white-space: nowrap; }
.check-pill input[type=checkbox] { display: none; }
.check-pill.active { border-color: #007bff; background: #e8f4ff; color: #007bff; }
.check-pill.active-warn { border-color: #fd7e14; background: #fff3e0; color: #e65100; }
.filter-actions-cell { display: flex; gap: 8px; align-items: center; margin-top: 18px; }
.admin-divider { border: 0; border-top: 1px solid #eee; margin: 28px 0 20px; }
.admin-section-title { margin: 0 0 14px; }

/* ── 14. DASHBOARD STORICA (admin_dashboard.php) ── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.dash-card { background: white; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.dash-card h3 { margin: 0 0 15px; font-size: 15px; color: #444; }
.dash-card canvas { min-height: 200px; }
.full-width { grid-column: 1/-1; }
.staff-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.staff-bar-label { width: 110px; font-size: 13px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-bar-track { flex: 1; background: #f0f0f0; border-radius: 4px; height: 22px; overflow: hidden; position: relative; }
.staff-bar-fill  { height: 100%; background: linear-gradient(90deg,#007bff,#0056b3); border-radius: 4px; transition: width 0.8s ease; display: flex; align-items: center; padding-left: 8px; }
.staff-bar-val   { font-size: 12px; color: white; white-space: nowrap; }
.year-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.year-btn { padding: 6px 14px; border: 1px solid #ddd; border-radius: 20px; font-size: 13px; text-decoration: none; color: #555; transition: 0.2s; }
.year-btn.active { background: #007bff; color: white; border-color: #007bff; }

/* ── 15. CALENDARIO ADMIN (admin_calendar.php) ── */
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 10px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #555; }
.legend-dot  { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.staff-filter { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.staff-toggle { padding: 6px 14px; border: 1.5px solid #ddd; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; background: white; color: #666; transition: .15s; }
.staff-toggle.active { background: #007bff; color: white; border-color: #007bff; }
.fc-daygrid-day { cursor: pointer; }
.fc-daygrid-day:hover { background: rgba(0,123,255,0.04); }
.fc-daygrid-day:hover .fc-daygrid-day-number { color: #007bff; }
.fc-event { cursor: pointer !important; }

.day-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 9999; justify-content: center; align-items: flex-end; }
.day-modal-overlay.open { display: flex; }
@media(min-width: 520px) { .day-modal-overlay { align-items: center; } }
.day-modal-box { background: white; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; max-height: 80vh; display: flex; flex-direction: column; animation: slideUp .22s ease; }
@media(min-width: 520px) { .day-modal-box { border-radius: 16px; animation: fadeIn .18s ease; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn  { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.day-modal-header { padding: 18px 20px 14px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.day-modal-header h3 { margin: 0; font-size: 16px; color: #222; text-transform: capitalize; }
.day-modal-close { background: none; border: none; font-size: 24px; color: #aaa; cursor: pointer; }
.day-modal-body { overflow-y: auto; flex: 1; padding: 14px 20px 20px; }
.day-modal-footer { padding: 14px 20px; border-top: 1px solid #f0f0f0; flex-shrink: 0; }
.day-modal-footer button { width: 100%; padding: 13px; background: #007bff; color: white; border: none; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; }
.slot-group { margin-bottom: 16px; }
.slot-label { font-size: 11px; font-weight: 700; color: #aaa; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 7px; padding-bottom: 4px; border-bottom: 1px solid #f0f0f0; }
.staff-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 10px; margin-bottom: 5px; background: #f8f9fa; }
.staff-row:last-child { margin-bottom: 0; }
.staff-name { font-size: 14px; color: #333; display: flex; align-items: center; gap: 5px; }
.status-pill { font-size: 11px; font-weight: 700; color: white; padding: 3px 9px; border-radius: 10px; }
.tel-link-sm { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: #28a745; border-radius: 50%; text-decoration: none; font-size: 13px; flex-shrink: 0; }
.empty-day { padding: 24px 0; text-align: center; color: #bbb; font-size: 14px; }

/* ── 16. ANALISI / REPORTS FILTRI ── */
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: #f8f9fa; padding: 15px; border-radius: 10px; margin-bottom: 20px; }
.filter-item { display: flex; flex-direction: column; gap: 5px; }
.filter-item label { font-size: 12px; font-weight: bold; color: #666; text-transform: uppercase; letter-spacing: 0.4px; }
.filter-item select { padding: 10px; border-radius: 8px; border: 1px solid #ddd; background: white; font-size: 14px; width: 100%; }
.filter-item-full { grid-column: 1 / -1; }
.filter-actions { display: flex; gap: 8px; align-items: center; }
.btn-analizza, .btn-filtra { background: #007bff; color: white; padding: 10px 18px; border-radius: 8px; border: none; font-weight: bold; cursor: pointer; font-size: 14px; }
.btn-reset { background: #6c757d; color: white; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: bold; }
.action-buttons { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.btn-action { flex: 1; min-width: 130px; padding: 11px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; color: white; font-size: 14px; }
.btn-pdf   { background: #e74c3c; }
.btn-excel { background: #27ae60; }
.highlight-total { font-weight: bold; color: #007bff; font-size: 1.05em; }

/* ── 17. TABS (admin_reports.php) ── */
.tabs { display: flex; gap: 8px; margin: 0 0 15px; overflow-x: auto; padding-bottom: 4px; }
.tab-btn { padding: 10px 18px; border: none; background: #ddd; border-radius: 8px; cursor: pointer; font-weight: bold; flex-shrink: 0; transition: 0.2s; font-size: 14px; }
.tab-btn.active { background: #007bff; color: white; }
.tab-content { display: none; background: white; border-radius: 12px; padding: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.tab-content.active { display: block; }
.excel-btn { background: #28a745; color: white; padding: 10px 18px; border-radius: 8px; border: none; cursor: pointer; font-weight: bold; margin-bottom: 12px; font-size: 14px; }

/* ── 18. WEEKLY SUMMARY ── */
.summary-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: white; }
.summary-table th, .summary-table td { padding: 15px; border: 1px solid #eee; text-align: center; }
.day-column { text-align: left !important; font-weight: bold; background: #fafafa; }
.count-badge { display: inline-block; padding: 5px 12px; border-radius: 15px; background: #e9ecef; font-weight: bold; cursor: pointer; transition: 0.2s; }
.count-badge:hover { background: #007bff; color: white; transform: scale(1.1); }
.full-day { background: #d4edda; color: #155724; }
.week-nav { display: flex; align-items: center; gap: 12px; }
.week-nav a { padding: 8px 14px; background: #f0f0f0; border-radius: 8px; text-decoration: none; color: #555; font-size: 13px; }

/* ── 19. MY REPORTS ── */
.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 15px 0; }
.kpi-mini { background: white; border-radius: 10px; padding: 12px; text-align: center; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.kpi-mini .val { font-size: 20px; font-weight: bold; color: #007bff; }
.kpi-mini .lbl { font-size: 11px; color: #999; margin-top: 3px; }
.summary-box { background: #e7f3ff; padding: 15px; border-radius: 10px; text-align: center; border: 1px solid #b6d4fe; border-left: 5px solid #007bff; }
#totalRes { font-size: 18px; color: #007bff; }
tfoot td { border-top: 2px solid #333; padding-top: 10px; }
.btn-edit { color: #007bff; text-decoration: none; font-weight: bold; margin-right: 10px; }
.btn-del  { color: #dc3545; text-decoration: none; font-weight: bold; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-row { margin-bottom: 15px; display: flex; flex-direction: column; }
.report-row label { font-weight: bold; margin-bottom: 5px; }
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.month-nav a { padding: 8px 14px; background: #f0f0f0; border-radius: 8px; text-decoration: none; color: #555; font-size: 13px; }
.month-nav .month-label { font-size: 16px; font-weight: bold; color: #333; }

.staff-form-reports { display: flex; flex-direction: column; gap: 15px; }
.staff-form-reports input,
.staff-form-reports textarea {
    width: 100% !important; padding: 12px !important;
    border: 1px solid #ccc !important; border-radius: 8px !important;
    font-size: 16px !important;
}

/* ── 20. NOTIFICHE (index.php) ── */
.notif-wrapper { position: relative; display: inline-block; }
.notif-btn { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.5); color: white; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 16px; position: relative; line-height: 1; }
.notif-badge { position: absolute; top: -5px; right: -5px; background: #ff3b30; color: white; font-size: 10px; font-weight: bold; padding: 2px 5px; border-radius: 10px; min-width: 17px; text-align: center; display: none; line-height: 1.4; }
.notif-badge.visible { display: inline-block; }
.notif-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 9998; }
.notif-overlay.open { display: block; }
.notif-panel { display: none; position: fixed; top: 0; left: 0; right: 0; background: white; border-radius: 0 0 16px 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.2); z-index: 9999; max-height: 80vh; flex-direction: column; }
.notif-panel.open { display: flex; }
.notif-panel-header { padding: 16px 18px 12px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.notif-panel-header strong { font-size: 16px; color: #333; }
.notif-close { background: none; border: none; font-size: 22px; color: #999; cursor: pointer; line-height: 1; padding: 0 4px; }
.notif-list { overflow-y: auto; flex: 1; }
.notif-item { padding: 14px 18px; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background 0.15s; }
.notif-item:active { background: #f5f5f5; }
.notif-item.unread { background: #eff6ff; }
.notif-item .n-title { font-size: 14px; font-weight: 600; color: #222; margin-bottom: 3px; }
.notif-item.unread .n-title { font-weight: 700; }
.notif-item .n-body  { font-size: 13px; color: #555; margin-bottom: 4px; line-height: 1.4; }
.notif-item .n-meta  { font-size: 11px; color: #aaa; }
.notif-empty { padding: 30px; text-align: center; color: #aaa; font-size: 14px; }

/* ── 21. SEND NOTIFICATION (send_notification.php) ── */
.flash-ok  { color: #155724; padding: 12px 16px; background: #d4edda; border-radius: 10px; margin-bottom: 20px; font-size: 14px; }
.flash-err { color: #721c24; padding: 12px 16px; background: #f8d7da; border-radius: 10px; margin-bottom: 20px; font-size: 14px; }
.notif-form { background: white; border-radius: 14px; padding: 22px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); margin-bottom: 24px; }
.notif-form label { display: block; font-weight: 700; margin-bottom: 5px; font-size: 13px; color: #555; text-transform: uppercase; letter-spacing: .4px; }
.notif-form input[type=text], .notif-form textarea, .notif-form select { width: 100%; padding: 11px 13px; border: 1px solid #ddd; border-radius: 9px; font-size: 15px; margin-bottom: 14px; font-family: inherit; transition: border-color .15s; }
.notif-form input:focus, .notif-form textarea:focus { border-color: #007bff; outline: none; }
.notif-form textarea { height: 90px; resize: vertical; }
.target-options { display: flex; gap: 10px; margin-bottom: 14px; }
.target-option { flex: 1; padding: 10px; border: 2px solid #ddd; border-radius: 10px; cursor: pointer; text-align: center; font-size: 13px; font-weight: 600; color: #666; transition: .15s; }
.target-option.selected { border-color: #dc3545; background: #fff5f5; color: #dc3545; }
#single-user-select { display: none; }
.btn-send { background: #dc3545; color: white; padding: 13px; border: none; border-radius: 9px; font-weight: 700; font-size: 15px; width: 100%; cursor: pointer; transition: background .15s; }
.btn-send:hover { background: #c82333; }
.history-section-title { font-size: 16px; font-weight: 700; color: #333; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; }
.history-count { font-size: 13px; font-weight: 400; color: #999; }
.history-item { background: white; border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; box-shadow: 0 1px 5px rgba(0,0,0,0.06); display: flex; gap: 12px; align-items: flex-start; transition: box-shadow .15s; }
.history-item:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.1); }
.history-body { flex: 1; min-width: 0; }
.history-title { font-weight: 700; font-size: 14px; color: #222; margin-bottom: 3px; }
.history-text  { font-size: 13px; color: #666; margin-bottom: 6px; line-height: 1.4; word-break: break-word; }
.history-meta  { font-size: 11px; color: #bbb; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.meta-pill { background: #f0f0f0; color: #888; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 8px; }
.read-pill { background: #e8f5e9; color: #388e3c; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 8px; }
.btn-del-notif { background: none; border: none; cursor: pointer; color: #ddd; font-size: 18px; padding: 4px; line-height: 1; border-radius: 6px; transition: color .15s, background .15s; flex-shrink: 0; align-self: flex-start; margin-top: 2px; }
.btn-del-notif:hover { color: #dc3545; background: #fff0f0; }
.history-item.removing { opacity: 0; transform: translateX(20px); transition: opacity .25s ease, transform .25s ease; }

/* ── 22. STAFF MANAGEMENT ── */
.msg-ok  { color: #155724; padding: 12px; background: #d4edda; border: 1px solid #c3e6cb; border-radius: 8px; margin-bottom: 20px; }
.msg-err { color: #721c24; padding: 12px; background: #f8d7da; border: 1px solid #f5c6cb; border-radius: 8px; margin-bottom: 20px; }
.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 14px; font-weight: bold; color: #555; }
.form-group input { padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; width: 100%; box-sizing: border-box; }
.full-width { grid-column: span 2; }
.btn-save-staff { background: #28a745; color: white; padding: 12px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 16px; width: 100%; }
.actions-cell { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── 23. LOGIN ── */
.login-card { background: white; padding: 40px 30px; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); width: 100%; max-width: 400px; text-align: center; }
.login-card h2 { margin-bottom: 30px; color: #333; font-size: 24px; font-weight: 700; }
.login-card .form-group { margin-bottom: 20px; }
.login-card input { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 10px; font-size: 16px; background-color: #f8f9fa; transition: all 0.3s ease; }
.login-card input:focus { border-color: #007bff; background-color: #fff; outline: none; box-shadow: 0 0 0 4px rgba(0,123,255,0.1); }
.btn-login { width: 100%; padding: 15px; background-color: #007bff; color: white; border: none; border-radius: 10px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background 0.3s ease; margin-top: 10px; }
.btn-login:hover { background-color: #0056b3; }
.error-msg { background-color: #fde8e8; color: #c81e1e; padding: 10px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }

body.login-page {
    background-image: url('../img/photo_entry.webp');
    background-size: cover; background-position: center top; background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; margin: 0; padding: 20px; box-sizing: border-box;
}
.login-box { background-color: rgba(255, 255, 255, 0.95); padding: 30px; border-radius: 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

/* ── 24. INPUT DATE FIX ── */
input[type="date"] { cursor: pointer; position: relative; -webkit-appearance: none; appearance: none; }
input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto; color: transparent; background: transparent; cursor: pointer; }
.filter-form { display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-end; }

/* ── 25. NOTIF DESKTOP DROPDOWN ── */
@media (min-width: 768px) {
    .notif-panel { position: absolute; top: calc(100% + 8px); left: auto; right: 0; width: 340px; border-radius: 12px; max-height: 420px; }
}

/* ── 26. RESPONSIVE ── */
@media (max-width: 600px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .admin-nav-grid { grid-template-columns: 1fr; }
    .filter-row { flex-direction: column; align-items: stretch; }
    .filter-cell input[type=date], .filter-cell select { min-width: unset; width: 100%; }
    .check-pill { width: 100%; justify-content: center; }
    .filter-actions-cell { margin-top: 4px; }
    .dash-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: 1; }
    .filter-grid { grid-template-columns: 1fr; }
    .filter-item-full { grid-column: 1; }
    .kpi-row { grid-template-columns: 1fr 1fr; }
    .report-grid { grid-template-columns: 1fr; }
    .filter-form { flex-direction: column; align-items: stretch; }
}

@media (max-width: 768px) {
    .admin-form { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr { display: block; width: 100%; }
    .table-responsive thead tr { position: absolute; top: -9999px; left: -9999px; }
    .table-responsive tr { border: 1px solid #ddd; margin-bottom: 15px; border-radius: 12px; padding: 10px; }
    .table-responsive td { border: none; border-bottom: 1px solid #f1f1f1; position: relative; padding: 12px 10px 12px 40% !important; text-align: right; display: flex; align-items: center; justify-content: flex-end; min-height: 40px; }
    .table-responsive td:before { content: attr(data-label); position: absolute; left: 12px; width: 35%; font-weight: bold; text-align: left; color: #888; font-size: 12px; text-transform: uppercase; }
    .table-responsive td:last-child { border-bottom: 0; padding-left: 10px !important; justify-content: center; padding-top: 20px; }
    .actions-cell { width: 100%; justify-content: center; }
    .btn-action { flex: 1; padding: 12px 5px; text-align: center; }
    
    
    
}

@media (max-width: 480px) {
    .fc-toolbar-title { font-size: 1.1rem !important; margin: 5px 0; }
    .fc-header-toolbar { margin-bottom: 10px !important; }
}