/**
 * SmartPreno Dashboard — v1.7.2
 * Modern POS-inspired dashboard layout
 * Sidebar navigation + card-based content
 */

/* ============================================ */
/* CSS Variables                                */
/* ============================================ */
:root {
    --smartpreno-primary: #4338ca;
    --smartpreno-primary-light: #6366f1;
    --smartpreno-primary-dark: #312e81;
    --smartpreno-primary-bg: #eef2ff;
    --smartpreno-sidebar: #1e1b4b;
    --smartpreno-sidebar-hover: #312e81;
    --smartpreno-sidebar-active: #4338ca;
    --smartpreno-success: #059669;
    --smartpreno-success-bg: #ecfdf5;
    --smartpreno-warning: #d97706;
    --smartpreno-warning-bg: #fffbeb;
    --smartpreno-danger: #dc2626;
    --smartpreno-danger-bg: #fef2f2;
    --smartpreno-info: #0284c7;
    --smartpreno-info-bg: #f0f9ff;
    --smartpreno-seated: #7c3aed;
    --smartpreno-seated-bg: #f5f3ff;
    --smartpreno-timed: #ea580c;
    --smartpreno-timed-bg: #fff7ed;
    --smartpreno-text: #1e293b;
    --smartpreno-text-light: #64748b;
    --smartpreno-text-muted: #94a3b8;
    --smartpreno-border: #e2e8f0;
    --smartpreno-bg: #f8fafc;
    --smartpreno-white: #ffffff;
    --smartpreno-radius: 12px;
    --smartpreno-radius-sm: 8px;
    --smartpreno-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --smartpreno-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
    --smartpreno-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --smartpreno-transition: all 0.2s ease;
}

/* ============================================ */
/* Reset & Base                                 */
/* ============================================ */
.smartpreno-owner-dashboard * {
    box-sizing: border-box;
}
.smartpreno-owner-dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--smartpreno-white);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: var(--smartpreno-text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Override tema WordPress — forza full-width */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh;
    z-index: 99999;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================ */
/* Sidebar Navigation                           */
/* ============================================ */
.smartpreno-sidebar {
    width: 240px;
    height: 100vh;
    background: var(--smartpreno-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--smartpreno-transition);
    overflow: hidden;
}
.smartpreno-sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.smartpreno-sidebar-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.smartpreno-sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
}
.smartpreno-sidebar-logo .logo-icon img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 10px;
}
.smartpreno-sidebar-user {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--smartpreno-radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
}
.smartpreno-sidebar-user .user-avatar {
    width: 32px;
    height: 32px;
    background: var(--smartpreno-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}
.smartpreno-sidebar-user .user-info {
    flex: 1;
    min-width: 0;
}
.smartpreno-sidebar-user .user-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.smartpreno-sidebar-user .user-role {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smartpreno-sidebar-nav {
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.smartpreno-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.smartpreno-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.smartpreno-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
.smartpreno-sidebar-nav .nav-section {
    margin-bottom: 20px;
}
.smartpreno-sidebar-nav .nav-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.3);
    padding: 0 8px;
    margin-bottom: 6px;
}
.smartpreno-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    border-radius: var(--smartpreno-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--smartpreno-transition);
    position: relative;
    margin-bottom: 2px;
}
.smartpreno-sidebar-nav a:hover {
    background: var(--smartpreno-sidebar-hover);
    color: #fff;
}
.smartpreno-sidebar-nav a.active {
    background: var(--smartpreno-sidebar-active);
    color: #fff;
    font-weight: 600;
}
.smartpreno-sidebar-nav a .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.smartpreno-sidebar-nav a .nav-badge {
    margin-left: auto;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}
.smartpreno-sidebar-nav a .nav-badge-warning {
    background: var(--smartpreno-warning);
}
.smartpreno-sidebar-nav a .nav-badge-seated {
    background: var(--smartpreno-seated);
}

.smartpreno-sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.smartpreno-sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: var(--smartpreno-radius-sm);
    transition: var(--smartpreno-transition);
}
.smartpreno-sidebar-footer a:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

/* ============================================ */
/* Main Content Area                            */
/* ============================================ */
.smartpreno-main {
    flex: 1;
    margin-left: 240px;
    padding: 20px;
    padding-bottom: 100px;
    min-height: 100vh;
    width: calc(100% - 240px);
    box-sizing: border-box;
    background: var(--smartpreno-white);
    overflow-y: auto;
    height: 100vh;
}
.smartpreno-page-header {
    margin-bottom: 20px;
}
.smartpreno-page-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--smartpreno-text);
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}
.smartpreno-page-header .page-date {
    color: var(--smartpreno-text-light);
    font-size: 0.9rem;
}

/* ============================================ */
/* Cards                                        */
/* ============================================ */
.smartpreno-card {
    background: var(--smartpreno-white);
    border-radius: var(--smartpreno-radius);
    border: 1px solid var(--smartpreno-border);
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--smartpreno-transition);
}
.smartpreno-card:hover {
    box-shadow: var(--smartpreno-shadow-md);
}
.smartpreno-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.smartpreno-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--smartpreno-text);
}

/* ============================================ */
/* Booking Cards Grid (Today view)              */
/* ============================================ */
.bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.booking-card {
    background: var(--smartpreno-white);
    border: 1px solid var(--smartpreno-border);
    border-radius: var(--smartpreno-radius);
    padding: 16px;
    position: relative;
    transition: var(--smartpreno-transition);
}
.booking-card:hover {
    box-shadow: var(--smartpreno-shadow-md);
    border-color: var(--smartpreno-primary-light);
}
.booking-card.status-seated {
    border-left: 4px solid var(--smartpreno-seated);
}
.booking-card.status-confirmed {
    border-left: 4px solid var(--smartpreno-success);
}
.booking-card.status-pending {
    border-left: 4px solid var(--smartpreno-warning);
}
.booking-card.status-cancelled {
    border-left: 4px solid var(--smartpreno-danger);
    opacity: 0.6;
}
.booking-card.status-completed {
    border-left: 4px solid var(--smartpreno-info);
    opacity: 0.6;
}
.booking-card.status-no_show {
    border-left: 4px solid var(--smartpreno-text-muted);
    opacity: 0.5;
}
.booking-card.is-timed {
    border-left: 4px solid var(--smartpreno-timed);
    background: var(--smartpreno-timed-bg);
}
.booking-card .bc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.booking-card .bc-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--smartpreno-text);
}
.booking-card .bc-table-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}
.booking-card .bc-table-badge .badge-prefix {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.7;
    margin-right: 1px;
}
.booking-card .bc-table-badge.has-table {
    color: #fff;
}
.booking-card .bc-table-badge.area-interna { background: var(--smartpreno-primary); }
.booking-card .bc-table-badge.area-esterna { background: var(--smartpreno-success); }
.booking-card .bc-table-badge.area-privata { background: #be185d; }
.booking-card .bc-table-badge.area-default { background: var(--smartpreno-text-light); }
.booking-card .bc-table-badge.no-table {
    background: var(--smartpreno-border);
    color: var(--smartpreno-text-muted);
    font-size: 1.2rem;
}
.booking-card .bc-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--smartpreno-text-light);
}
.booking-card .bc-detail {
    display: flex;
    align-items: center;
    gap: 8px;
}
.booking-card .bc-detail .icon {
    width: 16px;
    text-align: center;
    color: var(--smartpreno-text-muted);
}
.booking-card .bc-detail-code {
    background: rgba(14, 165, 233, 0.08);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    color: var(--smartpreno-primary, #0ea5e9);
}
.booking-card .bc-detail-code strong {
    color: inherit;
}
.booking-card .bc-timed-alert {
    background: var(--smartpreno-timed);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    animation: timedPulse 2s ease-in-out infinite;
}
@keyframes timedPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}
.booking-card .bc-notes {
    background: var(--smartpreno-bg);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--smartpreno-text-light);
    margin-bottom: 10px;
}
.booking-card .bc-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--smartpreno-border);
}

/* Status badges */
.smartpreno-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.smartpreno-badge-success { background: var(--smartpreno-success-bg); color: var(--smartpreno-success); }
.smartpreno-badge-warning { background: var(--smartpreno-warning-bg); color: var(--smartpreno-warning); }
.smartpreno-badge-danger { background: var(--smartpreno-danger-bg); color: var(--smartpreno-danger); }
.smartpreno-badge-info { background: var(--smartpreno-info-bg); color: var(--smartpreno-info); }
.smartpreno-badge-seated { background: var(--smartpreno-seated-bg); color: var(--smartpreno-seated); }
.smartpreno-badge-secondary { background: #f1f5f9; color: var(--smartpreno-text-muted); }

/* ============================================ */
/* Buttons                                      */
/* ============================================ */
.smartpreno-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--smartpreno-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--smartpreno-border);
    background: var(--smartpreno-white);
    color: var(--smartpreno-text);
    cursor: pointer;
    transition: var(--smartpreno-transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}
.smartpreno-btn:hover { background: var(--smartpreno-bg); border-color: #cbd5e1; }
.smartpreno-btn-small { padding: 4px 10px; font-size: 0.78rem; }
.smartpreno-btn-large { padding: 12px 24px; font-size: 0.95rem; }

.smartpreno-btn-primary { background: var(--smartpreno-primary); color: #fff; border-color: var(--smartpreno-primary); }
.smartpreno-btn-primary:hover { background: var(--smartpreno-primary-dark); }
.smartpreno-btn-success { background: var(--smartpreno-success); color: #fff; border-color: var(--smartpreno-success); }
.smartpreno-btn-success:hover { background: #047857; }
.smartpreno-btn-warning { background: var(--smartpreno-warning); color: #fff; border-color: var(--smartpreno-warning); }
.smartpreno-btn-warning:hover { background: #b45309; }
.smartpreno-btn-danger { background: var(--smartpreno-danger); color: #fff; border-color: var(--smartpreno-danger); }
.smartpreno-btn-danger:hover { background: #b91c1c; }
.smartpreno-btn-info { background: var(--smartpreno-info); color: #fff; border-color: var(--smartpreno-info); }
.smartpreno-btn-info:hover { background: #0369a1; }
.smartpreno-btn-seated { background: var(--smartpreno-seated); color: #fff; border-color: var(--smartpreno-seated); }
.smartpreno-btn-seated:hover { background: #6d28d9; }
.smartpreno-btn-free { background: #10b981; color: #fff; border-color: #10b981; }
.smartpreno-btn-free:hover { background: #059669; }

.smartpreno-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================ */
/* Forms                                        */
/* ============================================ */
.manual-booking-form-container {
    background: var(--smartpreno-white);
    border-radius: var(--smartpreno-radius);
    border: 1px solid var(--smartpreno-border);
    padding: 24px;
    width: 100%;
}
.form-section {
    margin-bottom: 24px;
}
.form-section h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--smartpreno-text);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--smartpreno-border);
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.form-group {
    min-width: 0;
}
.form-group-large { grid-column: span 2; }
.form-group-full { grid-column: 1 / -1; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--smartpreno-text-light);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--smartpreno-border);
    border-radius: var(--smartpreno-radius-sm);
    font-size: 0.9rem;
    color: var(--smartpreno-text);
    background: var(--smartpreno-white);
    transition: var(--smartpreno-transition);
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--smartpreno-primary-light);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.form-group-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
    font-weight: 500;
    cursor: pointer;
}
.form-group-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--smartpreno-primary);
}
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--smartpreno-border);
    margin-top: 8px;
}

/* ============================================ */
/* Stats Cards                                  */
/* ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card, .live-stat-card {
    background: var(--smartpreno-white);
    border: 1px solid var(--smartpreno-border);
    border-radius: var(--smartpreno-radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--smartpreno-transition);
}
.stat-card:hover, .live-stat-card:hover { box-shadow: var(--smartpreno-shadow); }
.stat-icon {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}
.live-stat-seated .stat-icon { background: var(--smartpreno-seated-bg); }
.live-stat-available .stat-icon { background: var(--smartpreno-success-bg); }
.live-stat-upcoming .stat-icon { background: var(--smartpreno-primary-bg); }
.live-stat-timed .stat-icon { background: var(--smartpreno-timed-bg); }
.live-stat-completed .stat-icon { background: var(--smartpreno-info-bg); }
.stat-content {}
.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--smartpreno-text);
    line-height: 1.2;
}
.stat-label {
    font-size: 0.78rem;
    color: var(--smartpreno-text-light);
    font-weight: 500;
}
.stat-sub {
    font-size: 0.72rem;
    color: var(--smartpreno-text-muted);
}

/* Live stats grid */
.live-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Analytics stats */
.analytics-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.stat-card-primary .stat-value { color: var(--smartpreno-primary); }
.stat-card-success .stat-value { color: var(--smartpreno-success); }
.stat-card-info .stat-value { color: var(--smartpreno-info); }
.stat-card-warning .stat-value { color: var(--smartpreno-warning); }
.stat-card-danger .stat-value { color: var(--smartpreno-danger); }
.stat-period { grid-column: 1 / -1; text-align: center; color: var(--smartpreno-text-muted); font-size: 0.8rem; margin-top: 4px; }

/* ============================================ */
/* Occupancy Bar                                */
/* ============================================ */
.occupancy-bar-container {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.occupancy-bar {
    flex: 1;
    height: 10px;
    background: var(--smartpreno-border);
    border-radius: 5px;
    overflow: hidden;
}
.occupancy-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease;
}
.occupancy-fill.low { background: var(--smartpreno-success); }
.occupancy-fill.medium { background: var(--smartpreno-warning); }
.occupancy-fill.high { background: var(--smartpreno-timed); }
.occupancy-fill.full { background: var(--smartpreno-danger); }
.occupancy-text { font-size: 0.8rem; color: var(--smartpreno-text-light); font-weight: 600; white-space: nowrap; }

/* ============================================ */
/* Live Dashboard Columns                       */
/* ============================================ */
.live-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.live-column h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--smartpreno-text);
}
.live-list { display: flex; flex-direction: column; gap: 10px; }
.live-empty {
    text-align: center;
    padding: 30px;
    color: var(--smartpreno-text-muted);
    background: var(--smartpreno-bg);
    border-radius: var(--smartpreno-radius);
    border: 1px dashed var(--smartpreno-border);
}

.live-card {
    background: var(--smartpreno-white);
    border: 1px solid var(--smartpreno-border);
    border-radius: var(--smartpreno-radius);
    padding: 14px;
    transition: var(--smartpreno-transition);
}
.live-card:hover { box-shadow: var(--smartpreno-shadow); }
.live-card-seated { border-left: 4px solid var(--smartpreno-seated); }
.live-card-upcoming { border-left: 4px solid var(--smartpreno-success); }
.live-card-timed { border-left: 4px solid var(--smartpreno-timed); background: var(--smartpreno-timed-bg); }

.live-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.live-card-time { font-weight: 700; font-size: 1rem; color: var(--smartpreno-text); }
.live-card-table { background: var(--smartpreno-primary); color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 0.72rem; font-weight: 700; }
.live-card-guests { margin-left: auto; font-size: 0.85rem; color: var(--smartpreno-text-light); }
.live-card-name { font-weight: 600; font-size: 0.95rem; color: var(--smartpreno-text); margin-bottom: 2px; }
.live-card-phone a { color: var(--smartpreno-primary-light); text-decoration: none; font-size: 0.85rem; }
.live-card-phone a:hover { text-decoration: underline; }
.live-card-timed-info { background: var(--smartpreno-timed); color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 0.78rem; font-weight: 600; margin: 6px 0; display: inline-block; }
.live-card-requests { background: var(--smartpreno-bg); padding: 6px 10px; border-radius: 6px; font-size: 0.8rem; color: var(--smartpreno-text-light); margin-top: 6px; }
.live-card-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--smartpreno-border); }

/* Live header */
.live-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.live-header h3 { margin: 0; }
.live-clock { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 700; color: var(--smartpreno-text); }
.live-indicator { width: 10px; height: 10px; background: #10b981; border-radius: 50%; animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }

/* ============================================ */
/* Tables                                       */
/* ============================================ */
.smartpreno-table-responsive { overflow-x: auto; }
.smartpreno-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--smartpreno-white);
    border-radius: var(--smartpreno-radius);
    overflow: hidden;
    border: 1px solid var(--smartpreno-border);
}
.smartpreno-dashboard-table thead {
    background: var(--smartpreno-sidebar);
    color: #fff;
}
.smartpreno-dashboard-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.smartpreno-dashboard-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--smartpreno-border);
    font-size: 0.88rem;
}
.smartpreno-dashboard-table tbody tr:hover {
    background: var(--smartpreno-bg);
}
.smartpreno-dashboard-table tbody tr:last-child td { border-bottom: none; }
.actions-cell { white-space: nowrap; }
.table-inactive { opacity: 0.45; }
.area-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 24px 0 10px;
    color: var(--smartpreno-text);
    padding-bottom: 6px;
    border-bottom: 2px solid var(--smartpreno-primary-light);
}

/* ============================================ */
/* Filters                                      */
/* ============================================ */
.smartpreno-filters-box {
    background: var(--smartpreno-white);
    border: 1px solid var(--smartpreno-border);
    border-radius: var(--smartpreno-radius);
    padding: 16px;
    margin-bottom: 16px;
}
.smartpreno-filters-form .filter-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.filter-group label { font-size: 0.75rem; font-weight: 600; color: var(--smartpreno-text-light); margin-bottom: 3px; display: block; text-transform: uppercase; letter-spacing: 0.3px; }
.filter-group input, .filter-group select { padding: 8px 10px; border: 1px solid var(--smartpreno-border); border-radius: var(--smartpreno-radius-sm); font-size: 0.85rem; }
.filter-group input:focus, .filter-group select:focus { outline: none; border-color: var(--smartpreno-primary-light); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.filter-actions { display: flex; gap: 6px; }

/* ============================================ */
/* Modals                                       */
/* ============================================ */
.smartpreno-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.smartpreno-modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.6); backdrop-filter: blur(4px); }
.smartpreno-modal-content {
    position: relative;
    background: var(--smartpreno-white);
    border-radius: var(--smartpreno-radius);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--smartpreno-shadow-lg);
    animation: modalSlideIn 0.25s ease;
}
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.smartpreno-modal-large { max-width: 800px; }
.smartpreno-modal-small { max-width: 480px; }
.smartpreno-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--smartpreno-border);
}
.smartpreno-modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.smartpreno-modal-close {
    width: 32px; height: 32px; border: 1px solid var(--smartpreno-border); border-radius: 8px;
    background: none; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
    color: var(--smartpreno-text-muted); transition: var(--smartpreno-transition);
}
.smartpreno-modal-close:hover { background: var(--smartpreno-danger-bg); color: var(--smartpreno-danger); }
.smartpreno-modal-body { padding: 20px; }
.smartpreno-modal-footer { padding: 12px 20px; border-top: 1px solid var(--smartpreno-border); display: flex; gap: 8px; justify-content: flex-end; }
body.smartpreno-modal-open { overflow: hidden; }
.smartpreno-form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.smartpreno-form-group { flex: 1; min-width: 120px; }
.smartpreno-form-group label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--smartpreno-text-light); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.smartpreno-form-group input, .smartpreno-form-group select, .smartpreno-form-group textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--smartpreno-border); border-radius: var(--smartpreno-radius-sm); font-size: 0.88rem; }
.smartpreno-form-group input:focus, .smartpreno-form-group select:focus, .smartpreno-form-group textarea:focus { outline: none; border-color: var(--smartpreno-primary-light); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.smartpreno-form-full { flex: 100%; }

/* ============================================ */
/* Message bar                                  */
/* ============================================ */
.smartpreno-dashboard-message {
    padding: 12px 18px;
    border-radius: var(--smartpreno-radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 16px;
}
.smartpreno-dashboard-message.success { background: var(--smartpreno-success-bg); color: var(--smartpreno-success); border: 1px solid #a7f3d0; }
.smartpreno-dashboard-message.error { background: var(--smartpreno-danger-bg); color: var(--smartpreno-danger); border: 1px solid #fecaca; }

/* ============================================ */
/* Misc                                         */
/* ============================================ */
.smartpreno-no-results { text-align: center; padding: 40px 20px; color: var(--smartpreno-text-muted); background: var(--smartpreno-bg); border-radius: var(--smartpreno-radius); border: 1px dashed var(--smartpreno-border); width: 100%; }
.smartpreno-loading { text-align: center; padding: 30px; color: var(--smartpreno-text-muted); }
.section-description { color: var(--smartpreno-text-light); margin-bottom: 16px; font-size: 0.9rem; }
.smartpreno-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.smartpreno-section-header h3 { margin: 0; }
.smartpreno-dashboard-section { margin-bottom: 24px; }
.smartpreno-dashboard-section h4 { font-size: 1rem; font-weight: 700; margin: 0 0 10px; color: var(--smartpreno-text); }
.smartpreno-dashboard-section ul { list-style: disc; padding-left: 20px; }
.smartpreno-dashboard-section ul li { margin-bottom: 6px; }
.smartpreno-inline-form { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.smartpreno-inline-form input { padding: 8px 12px; border: 1px solid var(--smartpreno-border); border-radius: var(--smartpreno-radius-sm); font-size: 0.88rem; }
.smartpreno-inline-form input:focus { outline: none; border-color: var(--smartpreno-primary-light); }
.smartpreno-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; }
.pagination-current { padding: 4px 12px; background: var(--smartpreno-primary); color: #fff; border-radius: 6px; font-weight: 700; font-size: 0.85rem; }
.table-info { text-align: center; color: var(--smartpreno-text-muted); font-size: 0.8rem; margin-top: 10px; }
.smartpreno-detail-table { width: 100%; }
.smartpreno-detail-table th { text-align: left; padding: 6px 10px 6px 0; font-weight: 600; color: var(--smartpreno-text-light); font-size: 0.85rem; white-space: nowrap; }
.smartpreno-detail-table td { padding: 6px 0; font-size: 0.9rem; }

/* Calendar legend */
.smartpreno-calendar-legend { display: flex; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--smartpreno-text-light); }
.legend-color { width: 12px; height: 12px; border-radius: 3px; }

/* Calendar full width */
#smartpreno-calendar { width: 100% !important; }
#smartpreno-calendar .fc { max-width: 100% !important; }
#calendar-bookings-section { width: 100%; }
#calendar-bookings-section h3 { font-size: 1.2rem; font-weight: 700; color: var(--smartpreno-text); margin: 0 0 12px; }
#calendar-bookings-list { width: 100%; }

/* Full-width filters */
.smartpreno-filters-fullwidth { width: 100%; }
.smartpreno-filters-fullwidth .filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; width: 100%; }
.smartpreno-filters-fullwidth .filter-group-search { flex: 1; min-width: 200px; }
.smartpreno-filters-fullwidth .filter-group-search input { width: 100%; }

/* Calendar stats boxes */
.calendar-stats-grid { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.cal-stat-box { flex: 1; min-width: 100px; background: #fff; border: 1px solid var(--smartpreno-border); border-radius: var(--smartpreno-radius); padding: 16px; text-align: center; cursor: pointer; transition: var(--smartpreno-transition); }
.cal-stat-box:hover { box-shadow: var(--smartpreno-shadow-md); transform: translateY(-2px); }
.cal-stat-box.active { border-color: var(--smartpreno-primary); box-shadow: 0 0 0 2px rgba(79,70,229,0.2); }
.cal-stat-count { display: block; font-size: 1.8rem; font-weight: 800; color: var(--smartpreno-text); line-height: 1; margin-bottom: 4px; }
.cal-stat-label { display: block; font-size: 0.75rem; color: var(--smartpreno-text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.cal-stat-pending { border-left: 3px solid #f39c12; }
.cal-stat-pending .cal-stat-count { color: #f39c12; }
.cal-stat-confirmed { border-left: 3px solid #27ae60; }
.cal-stat-confirmed .cal-stat-count { color: #27ae60; }
.cal-stat-seated { border-left: 3px solid #9b59b6; }
.cal-stat-seated .cal-stat-count { color: #9b59b6; }
.cal-stat-completed { border-left: 3px solid #3498db; }
.cal-stat-completed .cal-stat-count { color: #3498db; }
.cal-stat-cancelled { border-left: 3px solid #e74c3c; }
.cal-stat-cancelled .cal-stat-count { color: #e74c3c; }

/* Booking detail popup */
.detail-popup-grid { padding: 4px 0; }
.detail-popup-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--smartpreno-border); }
.detail-popup-info { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.detail-item { display: flex; align-items: flex-start; gap: 10px; }
.detail-icon { font-size: 1.2rem; line-height: 1; margin-top: 2px; }
.detail-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--smartpreno-text-muted); font-weight: 600; margin-bottom: 2px; }
.detail-value { font-size: 0.95rem; color: var(--smartpreno-text); font-weight: 500; }
.detail-value a { color: var(--smartpreno-primary); text-decoration: none; }
.detail-notes { padding: 12px; background: var(--smartpreno-bg); border-radius: var(--smartpreno-radius-sm); margin-top: 12px; font-size: 0.9rem; color: var(--smartpreno-text-light); }

/* Charts */
.analytics-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.analytics-chart-box { background: var(--smartpreno-white); border: 1px solid var(--smartpreno-border); border-radius: var(--smartpreno-radius); padding: 16px; }
.analytics-chart-box h4 { margin: 0 0 12px; font-size: 0.95rem; font-weight: 600; color: var(--smartpreno-text); }
.analytics-chart-full { grid-column: 1 / -1; }
.analytics-section { background: var(--smartpreno-white); border: 1px solid var(--smartpreno-border); border-radius: var(--smartpreno-radius); padding: 16px; margin-top: 16px; }
.analytics-section h4 { margin: 0 0 12px; font-size: 1rem; font-weight: 700; }

/* Report */
.report-filters { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.report-stats { display: flex; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.report-stat { text-align: center; padding: 14px 18px; background: var(--smartpreno-bg); border-radius: var(--smartpreno-radius-sm); font-size: 0.85rem; }
.report-stat strong { display: block; font-size: 1.4rem; margin-bottom: 2px; }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th, .report-table td { padding: 8px 10px; border: 1px solid var(--smartpreno-border); text-align: left; font-size: 0.85rem; }
.report-table th { background: var(--smartpreno-sidebar); color: #fff; }

/* Timed table options */
#timed-options { background: var(--smartpreno-timed-bg); padding: 12px 16px; border-radius: var(--smartpreno-radius-sm); border: 1px solid #fed7aa; margin-top: -4px; }

/* ============================================ */
/* Table Finder                                 */
/* ============================================ */
.finder-header {
    font-size: 0.9rem;
    color: var(--smartpreno-text);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--smartpreno-border);
}
.finder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}
.finder-card {
    background: var(--smartpreno-white);
    border: 2px solid var(--smartpreno-border);
    border-radius: var(--smartpreno-radius);
    padding: 16px;
    transition: var(--smartpreno-transition);
    cursor: default;
}
.finder-card:hover {
    box-shadow: var(--smartpreno-shadow-md);
}
.finder-card-selected {
    border-color: var(--smartpreno-seated) !important;
    background: var(--smartpreno-seated-bg) !important;
}
.finder-level-green { border-left: 5px solid var(--smartpreno-success); }
.finder-level-yellow { border-left: 5px solid var(--smartpreno-warning); }
.finder-level-red { border-left: 5px solid var(--smartpreno-danger); }
.finder-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.finder-card-info { flex: 1; min-width: 0; }
.finder-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--smartpreno-text);
}
.finder-card-area {
    font-size: 0.8rem;
    color: var(--smartpreno-text-muted);
    margin-top: 2px;
}
.finder-card-time {
    font-size: 0.88rem;
    color: var(--smartpreno-text-light);
    margin-bottom: 10px;
    line-height: 1.5;
}
.finder-card-warn {
    background: var(--smartpreno-danger-bg);
    color: var(--smartpreno-danger);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.finder-card-action {
    padding-top: 10px;
    border-top: 1px solid var(--smartpreno-border);
}
.finder-card-action .smartpreno-btn {
    width: 100%;
}

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */

/* Desktop compatto (max 1200px) — padding più stretto */
@media screen and (max-width: 1200px) {
    .smartpreno-main { padding: 16px 20px; }
}

/* Tablet landscape (max 1024px) — sidebar ridotta a sole icone */
@media screen and (max-width: 1024px) {
    .smartpreno-sidebar { width: 68px; }
    .smartpreno-sidebar-header { padding: 14px 8px; }
    .smartpreno-sidebar-logo span, .smartpreno-sidebar-user .user-info,
    .smartpreno-sidebar-nav .nav-label, .smartpreno-sidebar-nav a span:not(.nav-icon):not(.nav-badge),
    .smartpreno-sidebar-footer a span:last-child {
        display: none;
    }
    .smartpreno-sidebar-logo { justify-content: center; }
    .smartpreno-sidebar-nav a { justify-content: center; padding: 12px 8px; }
    .smartpreno-sidebar-nav a .nav-icon { margin: 0; font-size: 1.2rem; }
    .smartpreno-sidebar-nav a .nav-badge { position: absolute; top: -4px; right: 2px; font-size: 0.6rem; padding: 0 5px; min-width: 16px; text-align: center; }
    .smartpreno-sidebar-user { padding: 8px; justify-content: center; }
    .smartpreno-sidebar-footer a { justify-content: center; }
    .smartpreno-main { 
        margin-left: 68px; 
        padding: 16px;
        padding-bottom: 100px;
        width: calc(100% - 68px);
    }
    .bookings-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .live-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .analytics-charts-row { grid-template-columns: 1fr; }
}

/* Tablet portrait / grandi telefoni (max 768) — sidebar nascosta, nav mobile top */
@media screen and (max-width: 768px) {
    .smartpreno-sidebar { display: none; }
    .smartpreno-main { 
        margin-left: 0; 
        padding: 12px;
        padding-bottom: 120px;
        width: 100%;
    }
    .smartpreno-mobile-nav { display: flex !important; }
    .bookings-grid { grid-template-columns: 1fr; }
    .live-columns { grid-template-columns: 1fr; }
    .finder-grid { grid-template-columns: 1fr; }
    .live-stats-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .analytics-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .smartpreno-page-header h3 { font-size: 1.3rem; }
    /* Touch-friendly buttons */
    .smartpreno-btn { padding: 10px 16px; font-size: 0.88rem; }
    .smartpreno-btn-small { padding: 8px 12px; font-size: 0.82rem; }
    .booking-card .bc-actions { gap: 8px; }
    .booking-card .bc-actions .smartpreno-btn-small { padding: 8px 14px; }
    /* Form responsive */
    .form-row { grid-template-columns: 1fr; }
    .form-group-large, .form-group-full { grid-column: 1; }
    .form-actions { flex-direction: column; }
    .form-actions .smartpreno-btn { width: 100%; }
    /* Modal full-width on tablet */
    .smartpreno-modal-content { width: 95%; max-height: 90vh; }
    .smartpreno-form-row { flex-direction: column; }
    .smartpreno-form-group { min-width: 100% !important; }
    /* Filters */
    .smartpreno-filters-form .filter-row { flex-direction: column; gap: 8px; }
    .filter-group { width: 100%; }
    .filter-group input, .filter-group select { width: 100%; }
    .filter-actions { width: 100%; }
    .filter-actions .smartpreno-btn { flex: 1; }
    /* Calendar stats */
    .calendar-stats-grid { flex-wrap: wrap; gap: 8px; }
    .cal-stat-box { min-width: calc(33% - 8px); }
}

/* Smartphone piccoli (max 480) */
@media screen and (max-width: 480px) {
    .smartpreno-main { padding: 8px; padding-bottom: 120px; }
    .smartpreno-page-header h3 { font-size: 1.1rem; }
    .booking-card { padding: 12px; }
    .booking-card .bc-name { font-size: 0.95rem; }
    .booking-card .bc-table-badge { width: 36px; height: 36px; font-size: 0.7rem; }
    .live-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .live-stat-card { padding: 12px; gap: 10px; }
    .stat-icon { width: 36px; height: 36px; font-size: 1.2rem; }
    .stat-value { font-size: 1.2rem; }
    .manual-booking-form-container { padding: 14px; }
    .smartpreno-mobile-nav { gap: 6px; padding: 8px 0; }
    .smartpreno-mobile-nav a { padding: 8px 12px; font-size: 0.78rem; }
    .calendar-stats-grid { gap: 6px; }
    .cal-stat-box { min-width: 70px; padding: 10px 6px; }
    .cal-stat-count { font-size: 1.3rem; }
    .cal-stat-label { font-size: 0.6rem; }
    .detail-popup-info { grid-template-columns: 1fr; }
}

/* Mobile nav — nascosta su desktop, visibile su tablet/phone */
.smartpreno-mobile-nav {
    display: none;
    overflow-x: auto;
    gap: 6px;
    padding: 10px 0;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.smartpreno-mobile-nav::-webkit-scrollbar { display: none; }
.smartpreno-mobile-nav a {
    flex-shrink: 0;
    padding: 10px 16px;
    background: var(--smartpreno-white);
    border: 1px solid var(--smartpreno-border);
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--smartpreno-text);
    white-space: nowrap;
    transition: var(--smartpreno-transition);
}
.smartpreno-mobile-nav a:active { transform: scale(0.96); }
.smartpreno-mobile-nav a.active {
    background: var(--smartpreno-primary);
    color: #fff;
    border-color: var(--smartpreno-primary);
}

/* Touch-friendly: larger tap targets for all interactive elements */
@media (pointer: coarse) {
    .smartpreno-btn { min-height: 44px; }
    .smartpreno-btn-small { min-height: 40px; padding: 8px 14px; }
    .smartpreno-sidebar-nav a { min-height: 44px; }
    .form-group input, .form-group select, .form-group textarea {
        min-height: 44px;
        font-size: 16px; /* prevents iOS zoom on focus */
    }
    .smartpreno-form-group input, .smartpreno-form-group select, .smartpreno-form-group textarea {
        min-height: 44px;
        font-size: 16px;
    }
    .smartpreno-mobile-nav a { min-height: 44px; display: flex; align-items: center; }
}

/* ===== POPUP PRENOTAZIONE CREATA (Task 10) ===== */
.popup-created-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 8px;
}
.popup-created-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    color: var(--smartpreno-success, #27ae60);
    margin-bottom: 16px;
}
.popup-created-details {
    background: var(--smartpreno-bg-card, #f8f9fa);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.popup-detail-row {
    padding: 6px 0;
    font-size: 0.95rem;
    color: var(--smartpreno-text, #2c3e50);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.popup-detail-row:last-child { border-bottom: none; }
.popup-detail-icon { margin-right: 6px; }
.popup-created-countdown {
    text-align: center;
    font-size: 0.85rem;
    color: var(--smartpreno-text-light, #7f8c8d);
    margin-bottom: 12px;
    font-style: italic;
}
.popup-created-actions {
    display: flex;
    justify-content: center;
}
.popup-created-actions .smartpreno-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
}

/* ===== CALENDARIO HINT (Task 11) ===== */
.calendar-hint {
    text-align: center;
    color: var(--smartpreno-text-light, #7f8c8d);
    font-size: 0.85rem;
    margin: 8px 0 0;
    padding: 6px;
    background: rgba(52,152,219,0.08);
    border-radius: 6px;
}

/* ===== VISTA LISTA: giorni cliccabili ===== */
#smartpreno-calendar .fc-list-day {
    cursor: pointer;
    transition: background 0.2s;
}
#smartpreno-calendar .fc-list-day:hover .fc-list-day-cushion {
    background: rgba(39,174,96,0.1) !important;
}

/* ===== RIGA ESPANSIONE INLINE VISTA LISTA (Task 11) ===== */
.calendar-inline-bookings-row > td {
    background: #f8f9fa !important;
    padding: 16px !important;
    border-top: 3px solid var(--smartpreno-success, #27ae60) !important;
    border-bottom: 3px solid var(--smartpreno-success, #27ae60) !important;
}
.calendar-inline-bookings-inner {
    padding: 0;
}
.calendar-inline-title {
    font-weight: 700;
    color: var(--smartpreno-text, #2c3e50);
    margin: 0 0 14px;
    font-size: 1.05rem;
}
.calendar-inline-list {
    min-height: 40px;
}
.calendar-inline-list .bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
@media (max-width: 768px) {
    .calendar-inline-list .bookings-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   v2.9.10-dev (fix 8.8): Modal "Assegna tavolo & conferma"
   Stili specifici per il modal #sp-confirm-modal. Riusa il pattern globale
   .smartpreno-modal/-overlay/-content; questi sono solo affinamenti interni.
   ========================================================================= */
#sp-confirm-modal .sp-confirm-info {
    background: var(--smartpreno-bg);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border-left: 3px solid var(--smartpreno-primary);
}
#sp-confirm-modal .sp-confirm-info p {
    margin: 4px 0;
    font-size: 0.9rem;
}
#sp-confirm-modal .sp-confirm-info strong {
    display: inline-block;
    min-width: 90px;
    color: var(--smartpreno-text-muted);
    font-weight: 600;
}
#sp-confirm-modal .sp-confirm-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
#sp-confirm-modal #sp-confirm-table-main,
#sp-confirm-modal .sp-confirm-extra-table-select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--smartpreno-border);
    border-radius: 6px;
    font-size: 0.95rem;
    min-height: 42px; /* touch-friendly su tablet/smartphone */
    background: var(--smartpreno-white);
    color: var(--smartpreno-text);
}
#sp-confirm-modal .sp-confirm-empty {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 14px 16px;
    color: #92400e;
    font-size: 0.92rem;
    line-height: 1.5;
}
#sp-confirm-modal .sp-confirm-error {
    background: var(--smartpreno-danger-bg);
    border: 1px solid var(--smartpreno-danger);
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--smartpreno-danger);
    margin-top: 12px;
    font-size: 0.9rem;
}
#sp-confirm-modal #sp-confirm-add-extra-btn {
    background: var(--smartpreno-bg);
    color: var(--smartpreno-text);
    border: 1px dashed var(--smartpreno-border);
}
#sp-confirm-modal #sp-confirm-add-extra-btn:hover {
    background: var(--smartpreno-primary-bg);
    border-color: var(--smartpreno-primary);
}
