/* SMS V3 - Main Styles */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

.sms-admin-dashboard {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-top: 0 !important;
}

/* Remove top margin when admin bar is hidden */
body.admin-bar .sms-admin-dashboard {
    margin-top: 0 !important;
}

/* Ensure no top spacing issues */
html body {
    margin-top: 0 !important;
}

/* Sidebar */
.sms-sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sms-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.sms-logo {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: white;
}

.sms-logo-suffix {
    color: #3498db;
    font-weight: 400;
}

.sms-sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sms-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sms-nav-item {
    margin: 0;
}

.sms-nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sms-nav-link:hover {
    background: #34495e;
    color: white;
}

.sms-nav-link.active {
    background: #3498db;
    color: white;
    border-left-color: #2980b9;
}

.sms-nav-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sms-nav-text {
    font-weight: 500;
}

/* Main Content */
.sms-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.sms-content-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sms-page-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
}

.sms-header-actions {
    display: flex;
    gap: 10px;
}

.sms-content-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Sections */
.sms-section {
    display: none;
}

.sms-section.active {
    display: block;
}

/* Dashboard Overview */
.sms-welcome-message {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.sms-welcome-message h2 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.sms-welcome-message p {
    color: #7f8c8d;
    margin: 0;
    font-size: 16px;
}

.sms-dashboard-overview {
    display: grid;
    gap: 30px;
}

.sms-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.sms-stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.sms-stat-card:hover {
    transform: translateY(-2px);
}

.sms-stat-icon {
    font-size: 32px;
    margin-right: 20px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
}

.sms-stat-icon-classi {
    background: #e3f2fd;
    color: #1976d2;
}

.sms-stat-icon-corsi {
    background: #f3e5f5;
    color: #7b1fa2;
}

.sms-stat-icon-corsisti {
    background: #e8f5e8;
    color: #388e3c;
}

.sms-stat-icon-docenti {
    background: #fff3e0;
    color: #f57c00;
}

.sms-stat-content {
    flex: 1;
}

.sms-stat-title {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0 0 5px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sms-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.sms-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.sms-info-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sms-info-title {
    font-size: 18px;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.sms-info-text {
    color: #7f8c8d;
    margin: 0;
    line-height: 1.6;
}

/* Section Headers */
.sms-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #e9ecef;
}

.sms-section-header h2 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.sms-section-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* View Toggles */
.sms-view-toggles {
    display: flex;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 3px;
}

.sms-view-toggle {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.sms-view-toggle:hover {
    background: #e9ecef;
    color: #495057;
}

.sms-view-toggle.active {
    background: #6c5ce7;
    color: white;
}

.sms-view-icon {
    font-size: 16px;
}

/* Buttons */
.sms-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 8px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.sms-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.sms-btn:hover::before {
    left: 100%;
}

.sms-btn-primary {
    background: linear-gradient(135deg, #6c5ce7 0%, #5f3dc4 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.sms-btn-primary:hover {
    background: linear-gradient(135deg, #5f3dc4 0%, #4c63d2 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

.sms-btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.sms-btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sms-btn-icon {
    font-size: 16px;
    font-weight: bold;
}

.sms-btn-text {
    font-weight: 500;
}

/* Content Areas */
.sms-classi-content,
.sms-corsi-content,
.sms-corsisti-content,
.sms-docenti-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    min-height: 400px;
}

/* Lists */
.sms-classi-list,
.sms-corsi-list,
.sms-corsisti-list,
.sms-docenti-list {
    display: grid;
    gap: 20px;
}

.sms-classi-list.grid,
.sms-corsi-list.grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.sms-classi-list.list,
.sms-corsi-list.list {
    grid-template-columns: 1fr;
}

/* List Items */
.sms-classi-item,
.sms-corso-item,
.sms-corsista-item,
.sms-docente-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.sms-classi-item:hover,
.sms-corso-item:hover,
.sms-corsista-item:hover,
.sms-docente-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.sms-classi-name,
.sms-corso-name,
.sms-corsista-name,
.sms-docente-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.sms-corso-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* List view specific styles for courses */
.sms-corsi-list.list .sms-corso-name {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    margin: 0;
}

.sms-corsi-list.list .sms-corso-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sms-corsi-list.list .sms-corso-day {
    margin-left: 0;
    flex-shrink: 0;
}

.sms-corsi-list.list .sms-corso-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sms-corsi-list.list .sms-item-actions {
    flex-shrink: 0;
    margin-left: 20px;
}

.sms-corso-name .sms-corso-title {
    font-weight: 600;
}

.sms-corso-name .sms-corso-day {
    font-size: 14px;
    font-weight: 400;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
}

/* Grid view specific styles for courses */
.sms-corsi-list.grid .sms-corso-item {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.sms-corsi-list.grid .sms-corso-name {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.sms-corsi-list.grid .sms-corso-name .sms-corso-day {
    margin-left: 0;
    margin-top: 5px;
}

.sms-corsi-list.grid .sms-item-actions {
    justify-content: center;
    margin-top: auto;
}

.sms-corso-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

.sms-item-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 5px;
}

.sms-btn-edit,
.sms-btn-delete {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sms-btn-edit {
    background: #17a2b8;
    color: white;
}

.sms-btn-edit:hover {
    background: #138496;
}

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

.sms-btn-delete:hover {
    background: #c82333;
}

.sms-btn-view {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.sms-btn-view:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* Empty state */
.sms-empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    grid-column: 1 / -1;
}

.sms-empty-state h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 18px;
}

.sms-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Loading state */
.sms-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 768px) {
    .sms-admin-dashboard {
        flex-direction: column;
    }
    
    .sms-sidebar {
        width: 100%;
        height: auto;
    }
    
    .sms-nav-list {
        display: flex;
        overflow-x: auto;
        padding: 0 20px;
    }
    
    .sms-nav-item {
        flex-shrink: 0;
    }
    
    .sms-nav-link {
        white-space: nowrap;
        padding: 10px 15px;
    }
    
    .sms-content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .sms-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .sms-info-grid {
        grid-template-columns: 1fr;
    }
    
    .sms-section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .sms-section-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* WPBakery Compatibility */
.sms-section { display: none !important; }
.sms-section.active { display: block !important; }

/* Force WPBakery containers to be visible */
.wpb-content-wrapper { display: block !important; }
.wpb_wrapper { display: block !important; }
.wpb_text_column { display: block !important; }
.vc_row { display: block !important; }
.vc_column_container { display: block !important; }
.vc_column-inner { display: block !important; }

/* Override any WPBakery hiding */
.sms-admin-dashboard { display: flex !important; }
.sms-main-content { display: block !important; }
.sms-content-body { display: block !important; }

/* Force all dashboard elements to be visible */
.sms-admin-dashboard * { visibility: visible !important; opacity: 1 !important; }

/* Override any WPBakery CSS that might hide elements */
.wpb-content-wrapper * { visibility: visible !important; opacity: 1 !important; }
.wpb_wrapper * { visibility: visible !important; opacity: 1 !important; }
.wpb_text_column * { visibility: visible !important; opacity: 1 !important; }

/* Modals */
.sms-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sms-modal.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.sms-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden; /* Changed from overflow-y: auto */
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sms-modal.show .sms-modal-content {
    transform: scale(1);
}

/* Specific width for corsisti modals */
.sms-modal.show .sms-modal-content {
    min-width: 900px;
}

.sms-modal-header {
    padding: 20px 32px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.sms-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e9ecef 50%, transparent 100%);
}

.sms-modal-header h3 {
    margin: 0;
    font-size: 22px;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Header actions container */
.sms-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sms-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 300;
}

.sms-modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Save button in header */
#sms-corsista-save-btn,
#sms-docente-save-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    min-width: 80px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sms-modal-body {
    padding: 32px;
    background: #ffffff;
    overflow-y: auto;
    flex: 1;
}

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

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

.sms-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.sms-form-group input,
.sms-form-group select,
.sms-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.sms-form-group input:focus,
.sms-form-group select:focus,
.sms-form-group textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.sms-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
    background: #fafbfc;
    margin: 32px -32px -32px;
    padding: 24px 32px 32px;
    border-radius: 0 0 12px 12px;
}

/* Color Options */
.sms-color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.sms-color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    position: relative;
}

.sms-color-option:hover {
    transform: scale(1.1);
}

.sms-color-option.selected {
    border-color: #2c3e50;
    transform: scale(1.1);
}

.sms-color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: bold;
}

.sms-color-option[data-color="custom"] {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff);
    color: white;
    border: 2px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.sms-color-option[data-color="custom"]:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sms-color-option[data-color="custom"]::before {
    content: '🎨';
    font-size: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sms-color-option[data-color="custom"].selected::after {
    content: '✓';
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

/* Corsi Selection */
.sms-corsi-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.sms-corso-selection-item {
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
}

.sms-corso-selection-item:hover {
    border-color: #6c5ce7;
    background: #f0f0ff;
}

.sms-corso-selection-item.selected {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

/* Loading States */
.sms-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.sms-empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.sms-empty-state h3 {
    margin: 0 0 10px 0;
    color: #495057;
}

.sms-empty-state p {
    margin: 0;
}

/* Form validation */
.sms-form-group input:invalid {
    border-color: #e74c3c;
}

.sms-form-group input:valid {
    border-color: #27ae60;
}

/* Notifications */
.sms-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 4px solid #28a745;
}

.sms-notification.show {
    transform: translateX(0);
}

.sms-notification.success {
    border-left-color: #28a745;
}

.sms-notification.error {
    border-left-color: #dc3545;
}

.sms-notification.warning {
    border-left-color: #ffc107;
}

.sms-notification.info {
    border-left-color: #17a2b8;
}

.sms-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sms-notification-title {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    font-size: 14px;
}

.sms-notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sms-notification-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.sms-notification-message {
    color: #6c757d;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.sms-notification-icon {
    margin-right: 8px;
    font-size: 16px;
}

.sms-notification.success .sms-notification-icon {
    color: #28a745;
}

.sms-notification.error .sms-notification-icon {
    color: #dc3545;
}

.sms-notification.warning .sms-notification-icon {
    color: #ffc107;
}

.sms-notification.info .sms-notification-icon {
    color: #17a2b8;
}

/* Custom Color Picker */
.sms-custom-color-picker {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.sms-custom-color-picker::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #e9ecef;
}

.sms-custom-color-picker::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 21px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #ffffff;
}

.sms-color-picker-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.sms-color-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    background: #6c5ce7;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sms-color-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
}

.sms-color-inputs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sms-color-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sms-color-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    min-width: 20px;
    text-align: center;
}

.sms-color-input-group input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.sms-color-input-group input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sms-color-input-group input[type="text"]:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.sms-color-slider {
    width: 100%;
    height: 20px;
    border-radius: 10px;
    background: linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
    border: none;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.sms-color-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #6c5ce7;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sms-color-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #6c5ce7;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sms-color-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.sms-color-actions .sms-btn {
    padding: 8px 16px;
    font-size: 12px;
}

/* Corsisti table styles */
.sms-corsisti-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sms-corsisti-table-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 2px solid #e9ecef;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 1fr 1.5fr 120px;
    gap: 15px;
    align-items: center;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sms-corsista-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 1fr 1.5fr 120px;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.sms-corsista-item:hover {
    background: #f8f9fa;
}

.sms-corsista-item:last-child {
    border-bottom: none;
}

.sms-corsisti-table-body {
    background: white;
}

.sms-corsisti-table-body .sms-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.sms-corsista-name,
.sms-corsista-surname {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.sms-corsista-email {
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sms-corsista-email::before {
    content: '📧';
    font-size: 12px;
}

.sms-corsista-phone {
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sms-corsista-phone::before {
    content: '📞';
    font-size: 12px;
}

.sms-corsista-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sms-corso-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sms-no-courses {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

/* Course selection in modals */
.sms-corso-selection-item {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.sms-corso-selection-item:hover {
    border-color: #6c5ce7;
    background: #f0f0ff;
    transform: translateY(-1px);
}

.sms-corso-selection-item.selected {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.sms-corso-selection-item .sms-corso-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}


/* Search and filter styles */
.sms-search-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.sms-section-actions .sms-search-filter {
    margin-bottom: 0;
}

.sms-search-input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    width: 220px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sms-search-input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #fafafa;
}

.sms-search-input::placeholder {
    color: #6c757d;
    font-weight: 400;
}

.sms-search-input:hover {
    border-color: #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Corsi Table Styles */
.sms-corsi-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 15px;
}

.sms-corsi-by-day-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sms-corsi-by-day-table .sms-day-header {
    background: #6c5ce7;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.sms-corsi-by-day-table .sms-day-header:last-child {
    border-right: none;
}

.sms-corsi-by-day-table .sms-day-cell {
    padding: 8px;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    min-height: 50px;
}

.sms-corsi-by-day-table .sms-day-cell:last-child {
    border-right: none;
}

.sms-corso-table-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    margin-bottom: 6px;
}

.sms-corso-table-item:hover {
    border-color: #6c5ce7;
    background: #f0f0ff;
    transform: translateY(-1px);
}

.sms-corso-table-item.selected {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.sms-corso-table-item .sms-corso-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.sms-corso-table-item .sms-corso-table-name {
    font-weight: 500;
    font-size: 13px;
    flex: 1;
    min-width: 0;
}

/* Make corsi selection container take full width */
.sms-corsi-selection {
    display: contents !important;
}
    align-items: center;
}

.sms-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.sms-search-input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.sms-filter-select {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sms-filter-select:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

/* Docenti table styles */
.sms-docenti-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Docenti search and filter bar - same as corsisti */
.sms-docenti-content .sms-search-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.sms-docenti-content .sms-search-box {
    flex: 1;
    position: relative;
}

.sms-docenti-content .sms-search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.sms-docenti-content .sms-search-input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.sms-docenti-content .sms-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
    pointer-events: none;
}

.sms-docenti-content .sms-filter-box {
    min-width: 200px;
}

.sms-docenti-content .sms-filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sms-docenti-content .sms-filter-select:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.sms-docenti-table-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 2px solid #e9ecef;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 1fr 1.5fr 120px;
    gap: 15px;
    align-items: center;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sms-docente-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 1fr 1.5fr 120px;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.sms-docente-item:hover {
    background: #f8f9fa;
}

.sms-docente-item:last-child {
    border-bottom: none;
}

.sms-docenti-table-body {
    background: white;
}

.sms-docenti-table-body .sms-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.sms-docente-name,
.sms-docente-surname {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    margin: 0;
}

.sms-docente-email {
    color: #6c757d;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sms-docente-email::before {
    content: "📧";
    font-size: 12px;
}

.sms-docente-phone {
    color: #6c757d;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sms-docente-phone::before {
    content: "📞";
    font-size: 12px;
}

.sms-docente-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sms-docente-courses .sms-corso-tag {
    background: #6c5ce7;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.sms-docente-courses .sms-no-courses {
    color: #adb5bd;
    font-style: italic;
    font-size: 12px;
}

/* Children fields dynamic styling */
.sms-children-fields {
    display: none;
    margin-top: 15px;
}

.sms-children-fields.show {
    display: block;
}

.sms-child-block {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sms-child-block:last-child {
    margin-bottom: 0;
}

.sms-child-title {
    color: #6c5ce7;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.sms-child-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sms-child-field {
    display: flex;
    flex-direction: column;
}

.sms-child-field.full-width {
    grid-column: 1 / -1;
}

.sms-child-field label {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sms-child-field input {
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.sms-child-field input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.sms-child-field input[type="date"] {
    position: relative;
}

.sms-child-field input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c5ce7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sms-child-fields {
        grid-template-columns: 1fr;
    }
    
    .sms-child-field.full-width {
        grid-column: 1;
    }
}

/* View modal styling */
.sms-view-content {
    max-height: 70vh;
    overflow-y: auto;
}

.sms-view-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6c5ce7;
}

.sms-view-section h4 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.sms-view-field {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
}

.sms-view-field:last-child {
    margin-bottom: 0;
}

.sms-view-label {
    font-weight: 600;
    color: #495057;
    min-width: 140px;
    margin-right: 15px;
    font-size: 14px;
}

.sms-view-value {
    color: #2c3e50;
    font-size: 14px;
    flex: 1;
    word-break: break-word;
}

.sms-view-value.empty {
    color: #6c757d;
    font-style: italic;
}

.sms-view-children {
    margin-top: 15px;
}

.sms-view-child {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.sms-view-child:last-child {
    margin-bottom: 0;
}

.sms-view-child-title {
    color: #6c5ce7;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #e9ecef;
}

.sms-view-child-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sms-view-child-field {
    display: flex;
    flex-direction: column;
}

.sms-view-child-field.full-width {
    grid-column: 1 / -1;
}

.sms-view-child-label {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sms-view-child-value {
    color: #2c3e50;
    font-size: 14px;
}

.sms-view-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sms-view-course-tag {
    background: #6c5ce7;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.sms-view-no-courses {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

.sms-optional {
    color: #6c757d;
    font-size: 12px;
    font-weight: normal;
    font-style: italic;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1024px) {
    .sms-modal.show .sms-modal-content {
        min-width: 95%;
        max-width: 95%;
    }
    
    .sms-view-child-fields {
        grid-template-columns: 1fr;
    }
    
    .sms-view-child-field.full-width {
        grid-column: 1;
    }
}

/* Form sections */
.sms-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.sms-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.sms-form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #6c5ce7;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #6c5ce7;
    position: relative;
}

.sms-form-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #6c5ce7;
}

/* Course selection grid */
.sms-corsi-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* Responsive modals */
@media (max-width: 768px) {
    .sms-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .sms-form-row {
        grid-template-columns: 1fr;
    }
    
    .sms-form-actions {
        flex-direction: column;
    }
    
    .sms-form-actions .sms-btn {
        width: 100%;
    }
    
    .sms-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .sms-color-picker-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .sms-color-preview {
        width: 100%;
        height: 80px;
    }
}

/* ============================================================================
   PROGRAMMA SETTIMANALE STYLES
   ============================================================================ */

/* Modelli Table */
.sms-modelli-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sms-modelli-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    padding: 15px;
    border-bottom: 2px solid #dee2e6;
}

.sms-modelli-table-body {
    max-height: 60vh;
    overflow-y: auto;
}

.sms-modello-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
    transition: background-color 0.2s ease;
}

.sms-modello-item:hover {
    background: #f8f9fa;
}

.sms-modello-item:last-child {
    border-bottom: none;
}

.sms-modello-nome {
    font-weight: 600;
    color: #2c3e50;
}

.sms-modello-date {
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
}

.sms-modello-stato {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sms-modello-stato::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.sms-modello-stato:hover::before {
    left: 100%;
}

.sms-modello-stato.attivo {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: 2px solid #28a745;
}

.sms-modello-stato.attivo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.sms-modello-stato.non-attivo {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
    border: 2px solid #dc3545;
}

.sms-modello-stato.non-attivo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.sms-modello-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.sms-modello-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sms-btn-open-programma {
    background: #17a2b8;
    color: white;
}

.sms-btn-open-programma:hover {
    background: #138496;
}

.sms-btn-edit-modello {
    background: #007bff;
    color: white;
}

.sms-btn-edit-modello:hover {
    background: #0056b3;
}

.sms-btn-duplicate-modello {
    background: #28a745;
    color: white;
}

.sms-btn-duplicate-modello:hover {
    background: #1e7e34;
}

.sms-btn-delete-modello {
    background: #dc3545;
    color: white;
}

.sms-btn-delete-modello:hover {
    background: #c82333;
}

/* Programma Editor Modal - Fixed Header */
.sms-programma-add-slot-fixed {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Programma Editor Modal */
.sms-programma-add-slot {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 0;
    border: 1px solid #dee2e6;
}

.sms-programma-add-slot h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
}

.sms-programma-schedule h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
}

.sms-programma-info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.sms-programma-info p {
    margin: 0;
    color: #1976d2;
    font-size: 14px;
}

/* Schedule Sections */
.sms-schedule-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sms-schedule-section {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.sms-schedule-section .sms-section-header {
    background: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #dee2e6;
}

.sms-schedule-section .sms-section-header h5 {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
}

.sms-section-toggle {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.sms-schedule-section.collapsed .sms-section-toggle {
    transform: rotate(-90deg);
}

.sms-schedule-section.collapsed .sms-schedule-grid {
    display: none;
}

/* Schedule Grid */
.sms-schedule-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: #dee2e6;
    padding: 1px;
}

.sms-schedule-day {
    background: white;
    min-height: 120px;
}

.sms-day-header {
    background: #e9ecef;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

.sms-day-slots {
    padding: 10px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Schedule Slots */
.sms-slot {
    background: #007bff;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.sms-slot:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.sms-slot-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}

.sms-slot-teacher {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 3px;
    line-height: 1.2;
}

.sms-slot-time {
    font-size: 13px;
    opacity: 0.8;
    font-weight: 500;
    line-height: 1.2;
}

/* Confirmation Modal Styles */
.sms-confirmation-content {
    text-align: center;
    padding: 20px 0;
}

.sms-confirmation-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.sms-confirmation-content p {
    font-size: 16px;
    color: #2c3e50;
    margin: 0;
    line-height: 1.5;
}

.sms-btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sms-btn-danger:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.sms-btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

/* ============================================================================
   DOCENTE DASHBOARD STYLES - MOBILE FIRST
   ============================================================================ */

.sms-docente-dashboard {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hide WordPress Admin Bar for Docente Dashboard */
body.sms-docente-dashboard #wpadminbar {
    display: none !important;
}

/* Hide WordPress Admin Bar for Admin Dashboard */
html.sms-admin-dashboard #wpadminbar {
    display: none !important;
}

/* Remove top margin for admin dashboard when admin bar is hidden */
html.sms-admin-dashboard .vc_desktop {
    margin-top: 0 !important;
}

html.sms-admin-dashboard body {
    margin-top: 0 !important;
}

/* Remove margin and padding from html element for admin dashboard */
html.sms-admin-dashboard {
    margin: 0 !important;
    padding: 0 !important;
}

/* Reset margins and padding for clean start */
body.sms-docente-dashboard {
    margin: 0 !important;
    padding: 0 !important;
}

html.sms-docente-dashboard {
    margin: 0 !important;
    padding: 0 !important;
}

body.sms-docente-dashboard {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove any top margin from the dashboard container */
body.sms-docente-dashboard .sms-docente-dashboard {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure full viewport height without admin bar */
body.sms-docente-dashboard .sms-docente-dashboard {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
}

/* Hide any WordPress admin elements that might appear */
body.sms-docente-dashboard .wp-admin,
body.sms-docente-dashboard #wpfooter,
body.sms-docente-dashboard .update-nag,
body.sms-docente-dashboard .notice {
    display: none !important;
}

/* Ensure clean viewport */
body.sms-docente-dashboard {
    overflow-x: hidden;
}

/* Remove any default margins and padding that might cause white space */
body.sms-docente-dashboard,
body.sms-docente-dashboard * {
    box-sizing: border-box;
}

/* Ensure the header starts at the very top */
body.sms-docente-dashboard .sms-docente-header {
    margin-top: 0 !important;
    padding-top: 20px;
}

/* Mobile Header */
.sms-docente-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 15px;
}

.sms-docente-welcome h1 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 700;
}

.sms-docente-welcome p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.sms-docente-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    width: auto;
    min-width: 45px;
}

/* Mobile specific adjustments */
@media (max-width: 767px) {
    .sms-docente-header {
        flex-wrap: nowrap;
        padding: 15px 20px;
    }
    
    .sms-docente-welcome {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    .sms-docente-welcome h1 {
        font-size: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .sms-docente-welcome p {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .sms-docente-actions {
        flex-shrink: 0;
        margin-left: 10px;
    }
}

.sms-logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sms-logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.sms-logout-icon {
    font-size: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Content Area */
.sms-docente-content {
    padding: 20px;
}

/* Agenda Section */
.sms-agenda-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sms-agenda-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sms-agenda-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.sms-week-info {
    font-size: 14px;
    opacity: 0.9;
}

/* Weekly Agenda */
.sms-weekly-agenda {
    display: flex;
    overflow-x: auto;
    padding: 0;
    gap: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sms-weekly-agenda::-webkit-scrollbar {
    display: none;
}

.sms-day-card {
    min-width: 120px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    padding: 15px 10px;
    text-align: center;
    position: relative;
}

.sms-day-card:last-child {
    border-right: none;
}

.sms-day-header {
    margin-bottom: 15px;
}

.sms-day-name {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 5px 0;
}

.sms-day-date {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.sms-lesson-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid;
}

.sms-lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sms-lesson-card:last-child {
    margin-bottom: 0;
}

.sms-lesson-title {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.sms-lesson-class {
    font-size: 12px;
    color: #6c757d;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.sms-lesson-time {
    font-size: 11px;
    color: #6c757d;
    margin: 0;
    font-weight: 600;
}

.sms-no-lesson {
    background: #e9ecef;
    border-radius: 8px;
    padding: 20px 12px;
    text-align: center;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
    border: 2px dashed #dee2e6;
}

/* Attendance Modal */
.sms-attendance-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sms-lesson-info h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
}

.sms-lesson-info p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.sms-attendance-list {
    max-height: 400px;
    overflow-y: auto;
}

.sms-student-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    background: white;
    gap: 15px;
}

.sms-student-item:last-child {
    border-bottom: none;
}

.sms-student-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.sms-attendance-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0; /* Prevent buttons from shrinking */
    align-self: flex-start; /* Align to top */
}

.sms-attendance-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sms-attendance-btn.present {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.sms-attendance-btn.present.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.sms-attendance-btn.late {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

.sms-attendance-btn.late.active {
    background: #ffc107;
    color: white;
    border-color: #ffc107;
}

.sms-attendance-btn.absent {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.sms-attendance-btn.absent.active {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.sms-attendance-btn.not-registered {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.sms-attendance-btn.not-registered.active {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.sms-attendance-btn:hover {
    transform: scale(1.05);
}

.sms-attendance-btn.disabled,
.sms-attendance-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.sms-attendance-btn.disabled:hover,
.sms-attendance-btn:disabled:hover {
    transform: none;
}

/* Student details in attendance modal */
.sms-student-info {
    flex: 1;
    min-width: 0; /* Allow text to wrap */
}

.sms-student-details {
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.sms-details-label {
    font-weight: 600;
    color: #495057;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.sms-details-content {
    color: #212529;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    word-wrap: break-word;
}

.sms-details-period {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design */
@media (min-width: 768px) {
    .sms-docente-dashboard {
        padding: 20px;
    }
    
    .sms-docente-header {
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .sms-weekly-agenda {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 0;
        overflow: visible;
    }
    
    .sms-day-card {
        min-width: auto;
        border-right: 1px solid #e9ecef;
        border-bottom: 1px solid #e9ecef;
    }
    
    .sms-day-card:nth-child(7n) {
        border-right: none;
    }
}

@media (min-width: 1024px) {
    .sms-docente-content {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* ============================================================================
   PRESENZE SECTION STYLES
   ============================================================================ */

/* Tabs */
.sms-presenze-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.sms-tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.sms-tab-btn:hover {
    color: #2c3e50;
    background: #f8f9fa;
}

.sms-tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: white;
}

/* Tab Content */
.sms-tab-content {
    display: none;
}

.sms-tab-content.active {
    display: block;
}

/* Filters */
.sms-presenze-filters,
.sms-docenti-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.sms-filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.sms-filter-group .sms-input,
.sms-filter-group .sms-select {
    min-width: 200px;
}

/* Docenti Hours Header */
.sms-docenti-hours-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sms-docenti-hours-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 700;
}

/* Tables */
.sms-presenze-table-container,
.sms-docenti-hours-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sms-presenze-table,
.sms-docenti-hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sms-presenze-table th,
.sms-presenze-table td,
.sms-docenti-hours-table th,
.sms-docenti-hours-table td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.sms-presenze-table th,
.sms-docenti-hours-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sms-presenze-table td:first-child,
.sms-presenze-table th:first-child {
    text-align: left;
    padding-left: 16px;
}

.sms-presenze-table td:nth-child(2),
.sms-presenze-table th:nth-child(2) {
    text-align: left;
}

/* Course Tags */
.sms-course-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Attendance Status Indicators */
.sms-attendance-cell {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 auto;
}

.sms-attendance-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sms-attendance-cell.present {
    background: #28a745;
}

.sms-attendance-cell.late {
    background: #ffc107;
}

.sms-attendance-cell.absent {
    background: #dc3545;
}

.sms-attendance-cell.empty {
    background: #e9ecef;
    color: #6c757d;
}

.sms-attendance-cell.empty:hover {
    background: #dee2e6;
}

/* Totals */
.sms-total-presenze {
    color: #28a745;
    font-weight: 700;
}

.sms-total-assenze {
    color: #dc3545;
    font-weight: 700;
}

/* Status Buttons in Modal */
.sms-status-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.sms-status-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.sms-status-btn .sms-status-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
}

.sms-status-btn.present {
    border-color: #28a745;
    color: #28a745;
}

.sms-status-btn.present.active {
    background: #28a745;
    color: white;
}

.sms-status-btn.present .sms-status-icon {
    background: #28a745;
}

.sms-status-btn.present.active .sms-status-icon {
    background: white;
    color: #28a745;
}

.sms-status-btn.late {
    border-color: #ffc107;
    color: #ffc107;
}

.sms-status-btn.late.active {
    background: #ffc107;
    color: white;
}

.sms-status-btn.late .sms-status-icon {
    background: #ffc107;
}

.sms-status-btn.late.active .sms-status-icon {
    background: white;
    color: #ffc107;
}

.sms-status-btn.absent {
    border-color: #dc3545;
    color: #dc3545;
}

.sms-status-btn.absent.active {
    background: #dc3545;
    color: white;
}

.sms-status-btn.absent .sms-status-icon {
    background: #dc3545;
}

.sms-status-btn.absent.active .sms-status-icon {
    background: white;
    color: #dc3545;
}

/* Presenza Info */
.sms-presenza-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sms-info-item {
    margin-bottom: 8px;
    font-size: 14px;
}

.sms-info-item:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .sms-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sms-filter-group .sms-input,
    .sms-filter-group .sms-select {
        min-width: auto;
        width: 100%;
    }
    
    .sms-presenze-table-container {
        overflow-x: auto;
    }
    
    .sms-presenze-table {
        min-width: 800px;
    }
    
    .sms-docenti-hours-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .sms-status-buttons {
        flex-direction: column;
    }
}

/* Additional styles for presenze */
.sms-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.sms-total-row {
    background: #f8f9fa;
    font-weight: 600;
}

.sms-total-row td {
    border-top: 2px solid #dee2e6;
}

.sms-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.sms-btn-icon {
    margin-right: 4px;
}

.sms-btn-sm .sms-btn-icon {
    margin-right: 2px;
}

.sms-slot-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.sms-slot-remove:hover {
    background: rgba(255,255,255,0.3);
}

/* Slot Colors based on course */
.sms-slot[data-corso-color] {
    background: var(--corso-color);
}

/* Body scroll lock when fullscreen modal is open */
body.modal-open {
    overflow: hidden;
}

/* Fullscreen Modal for Programma Editor */
.sms-modal-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
}

.sms-modal-fullscreen.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sms-modal-content-fullscreen {
    width: 95vw;
    height: 95vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sms-modal-header-fullscreen {
    background: #2c3e50;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #3498db;
}

.sms-modal-header-fullscreen h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.sms-modal-close-fullscreen {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.sms-modal-close-fullscreen:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sms-modal-body-fullscreen {
    flex: 1;
    padding: 30px;
    padding-top: 20px; /* Reduced top padding since form is fixed */
    overflow-y: auto;
    background: #f8f9fa;
}

/* Improved Programma Add Slot Form */
.sms-programma-add-slot {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin: 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sms-programma-add-slot h4 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.sms-programma-add-slot .sms-form-row-single {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.sms-programma-add-slot .sms-form-row-single select,
.sms-programma-add-slot .sms-form-row-single input {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    flex: 1;
    min-width: 120px;
}

.sms-programma-add-slot .sms-form-row-single select:focus,
.sms-programma-add-slot .sms-form-row-single input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.sms-programma-add-slot .sms-form-row-single button {
    flex-shrink: 0;
    margin-left: 10px;
}

.sms-programma-add-slot .sms-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sms-programma-add-slot .sms-btn-primary {
    background: #3498db;
    color: white;
}

.sms-programma-add-slot .sms-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Improved Schedule Sections */
.sms-schedule-sections {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sms-schedule-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.sms-schedule-section.active {
    border-color: #3498db;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
}

.sms-schedule-section.collapsed {
    background: #f8f9fa;
}

.sms-schedule-section .sms-section-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sms-schedule-section.collapsed .sms-section-header {
    background: #6c757d;
}

.sms-schedule-section .sms-section-header:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
}

.sms-schedule-section.collapsed .sms-section-header:hover {
    background: #5a6268;
}

.sms-schedule-section .sms-section-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sms-section-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sms-section-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sms-schedule-section.collapsed .sms-section-toggle {
    transform: rotate(-90deg);
}

/* Improved Schedule Grid */
.sms-schedule-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    background: #e9ecef;
    padding: 2px;
    min-height: 200px;
}

.sms-schedule-day {
    background: white;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.sms-schedule-day.weekend-day {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.sms-schedule-day.weekend-day .sms-day-header {
    color: #6c757d;
    font-weight: 600;
}

.sms-day-header {
    background: #f8f9fa;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    font-size: 14px;
}

.sms-day-slots {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 150px;
}

/* Improved Slot Styling */
.sms-slot {
    background: #007bff;
    color: white;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sms-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.sms-slot-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.sms-slot-teacher {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 3px;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.sms-slot-time {
    font-size: 13px;
    opacity: 0.8;
    font-weight: 500;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.sms-slot-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    opacity: 0;
}

.sms-slot:hover .sms-slot-remove {
    opacity: 1;
}

.sms-slot-remove:hover {
    background: rgba(255, 255, 255, 0.4);
}

.sms-no-slots {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Responsive Design for Programma */
@media (max-width: 1200px) {
    .sms-programma-add-slot .sms-form-row-single {
        flex-wrap: wrap;
    }
    
    .sms-programma-add-slot .sms-form-row-single select,
    .sms-programma-add-slot .sms-form-row-single input {
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .sms-modal-content-fullscreen {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .sms-modal-body-fullscreen {
        padding: 20px;
    }
    
    .sms-modelli-table-header,
    .sms-modello-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .sms-modello-actions {
        justify-content: center;
        margin-top: 10px;
    }
    
    .sms-schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .sms-programma-add-slot .sms-form-row-single {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sms-programma-add-slot .sms-form-row-single select,
    .sms-programma-add-slot .sms-form-row-single input {
        min-width: auto;
        width: 100%;
    }
    
    .sms-programma-add-slot .sms-form-row-single button {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* ============================================================================
   PRESENZE SECTION STYLES
   ============================================================================ */

/* Presenze Section */
.sms-presenze-content {
    padding: 20px;
}

/* Presenze Tabs */
.sms-presenze-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.sms-tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.sms-tab-btn:hover {
    color: #495057;
    background: #f8f9fa;
}

.sms-tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: #f8f9fa;
}

/* Tab Content */
.sms-tab-content {
    display: none;
}

.sms-tab-content.active {
    display: block;
}

/* Presenze Filters */
.sms-presenze-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.sms-presenze-filters .sms-filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.sms-presenze-filters .sms-input,
.sms-presenze-filters .sms-select {
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sms-presenze-filters .sms-input:focus,
.sms-presenze-filters .sms-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.sms-presenze-filters .sms-btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sms-presenze-filters .sms-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Presenze Table */
.sms-presenze-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.sms-presenze-table {
    width: 100%;
    border-collapse: collapse;
}

.sms-presenze-table th,
.sms-presenze-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.sms-presenze-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sms-presenze-table tbody tr:hover {
    background: #f8f9fa;
}

/* Student name styling in presenze table */
.sms-presenze-table .sms-student-name {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

/* Presenze Status Indicators */
.sms-presenza-status {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-weight: bold;
    font-size: 12px;
    color: white;
}

.sms-presenza-status.presente {
    background: #28a745;
}

.sms-presenza-status.ritardo {
    background: #ffc107;
    color: #212529;
}

.sms-presenza-status.assente {
    background: #dc3545;
}

.sms-presenza-status.vuoto {
    background: #e9ecef;
    color: #6c757d;
}

.sms-presenza-status {
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.sms-presenza-status:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sms-presenza-status.vuoto:hover {
    background: #dee2e6;
}

/* Presenze Totals */
.sms-presenze-totals {
    font-weight: 600;
    color: #495057;
}

.sms-presenze-totals .totale-presenze {
    color: #28a745;
}

.sms-presenze-totals .totale-assenze {
    color: #dc3545;
}

/* Docenti Hours Section */
.sms-docenti-hours-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sms-docenti-hours-header h3 {
    margin: 0;
    color: #495057;
}

.sms-docenti-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.sms-docenti-filters .sms-filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.sms-docenti-filters .sms-input,
.sms-docenti-filters .sms-select {
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sms-docenti-filters .sms-input:focus,
.sms-docenti-filters .sms-select:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.sms-docenti-filters .sms-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sms-docenti-filters .sms-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Docente Hours Modal Actions */
.sms-docente-hours-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding: 20px 32px 32px 32px;
    border-top: 1px solid #e9ecef;
}

.sms-docente-hours-actions .sms-btn-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Docenti Hours Table Actions */
.sms-docenti-hours-table .sms-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.sms-docenti-hours-table .sms-actions .sms-btn {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
}

/* Docenti Hours Table - Docente Name Styling */
.sms-docenti-hours-table .sms-docente-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

/* ============================================================================
   NOTIFICATIONS SYSTEM STYLES
   ============================================================================ */

/* Inbox Button in Welcome Message */
.sms-welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sms-welcome-text {
    flex: 1;
}

.sms-inbox-btn {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
    margin-left: 20px;
}

.sms-inbox-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

.sms-inbox-icon {
    font-size: 24px;
    color: white;
}

/* Notifications Modal */
.sms-notifications-modal-content {
    max-width: 900px;
    width: 90%;
}

.sms-recipients-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.sms-search-container {
    flex: 1;
    position: relative;
}

.sms-filter-container {
    min-width: 200px;
}

.sms-filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #495057;
    cursor: pointer;
}

.sms-filter-select:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.1);
}

.sms-modal.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.sms-notifications-body {
    display: flex;
    gap: 30px;
    padding: 0;
}

/* Search Field Styling */
.sms-search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 8px 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sms-search-container:focus-within {
    border-color: #6c5ce7;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.15);
    background: #fff;
}

.sms-search-icon {
    font-size: 16px;
    color: #6c5ce7;
    margin-right: 12px;
    pointer-events: none;
}

.sms-search-input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 14px;
    color: #2d3436;
    font-weight: 500;
}

.sms-search-input::placeholder {
    color: #a0a0a0;
    font-weight: 400;
}

.sms-notification-form-container {
    flex: 1;
    padding: 20px;
}

.sms-notification-recipients {
    flex: 1;
    padding: 20px;
    border-left: 1px solid #e9ecef;
    background: #f8f9fa;
}

.sms-notification-recipients h4 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.sms-recipients-search {
    margin-bottom: 15px;
}

.sms-recipients-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.sms-separator {
    color: #6c757d;
    font-weight: 300;
}

.sms-btn-link {
    background: none;
    border: none;
    color: #6c5ce7;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.sms-btn-link:hover {
    color: #5a4fcf;
}

.sms-recipients-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: white;
}

.sms-recipient-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.sms-recipient-item:hover {
    background-color: #f8f9fa;
}

.sms-recipient-item:last-child {
    border-bottom: none;
}

.sms-recipient-checkbox {
    margin-right: 12px;
}

.sms-recipient-name {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.sms-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
}

.sms-checkbox {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.sms-checkbox-text {
    font-weight: 500;
}

.sms-urgent-container {
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 15px;
    background: #fdf2f2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sms-urgent-container .sms-checkbox-label {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #e74c3c;
}

.sms-urgent-container .sms-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #e74c3c;
}

.sms-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.sms-textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.sms-notifications-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 25px;
    padding: 20px 32px 32px 32px;
    border-top: 1px solid #e9ecef;
}

/* Docente Notifications Panel */
.sms-docente-notifications {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 24px;
    margin-bottom: 20px;
    overflow: hidden;
}

.sms-new-notification-indicator {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    text-align: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    margin: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Confirmation Modal Styles */
.sms-confirm-modal-content {
    max-width: 400px;
    width: 90%;
}

.sms-confirm-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.sms-confirm-message {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.4;
}

.sms-confirm-subtitle {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    margin-bottom: 0;
    font-style: italic;
}

.sms-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.sms-btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sms-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* System Notifications Modal Styles */
.sms-system-modal {
    z-index: 100000 !important;
    pointer-events: auto; /* Ensure modal is clickable */
}

.sms-system-modal .sms-modal-content {
    pointer-events: auto; /* Ensure modal content is clickable */
}

/* Hide close button for system notifications modal */
.sms-system-modal .sms-modal-close {
    display: none !important;
}

.sms-system-modal .sms-modal-content {
    max-width: 500px;
    width: 90%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid #007cba;
}

.sms-system-modal .sms-modal-header {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    border-bottom: 3px solid #005a87;
}

.sms-system-modal .sms-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: white !important; /* Force white color */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sms-system-modal .sms-modal-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.sms-system-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sms-system-notification-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.sms-system-notification-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sms-system-notification-text {
    font-size: 16px;
    line-height: 1.5;
    color: #2c3e50;
    margin: 0;
}

.sms-system-notification-added {
    color: #28a745;
    font-weight: 600;
}

.sms-system-notification-removed {
    color: #dc3545;
    font-weight: 600;
}

.sms-system-modal .sms-modal-footer {
    padding: 20px 24px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.sms-system-modal .sms-btn-primary {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.sms-system-modal .sms-btn-primary:hover {
    background: linear-gradient(135deg, #005a87, #004066);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 124, 186, 0.4);
}

.sms-system-modal .sms-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

/* Notifications History Styles */
.sms-notifications-history-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sms-notifications-history-section .sms-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
}

.sms-notifications-history-section .sms-section-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.sms-notifications-history {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    max-height: 300px;
}

.sms-notification-history-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.sms-notification-history-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sms-notification-history-item:last-child {
    margin-bottom: 0;
}

.sms-notification-history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.sms-notification-history-subject {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    margin: 0;
    flex: 1;
}

.sms-notification-history-urgent {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.sms-notification-history-recipients {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
}

.sms-notification-history-description {
    color: #495057;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.sms-notification-history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
}

.sms-notification-history-date {
    font-style: italic;
}

.sms-notification-history-actions {
    display: flex;
    gap: 8px;
}

.sms-notification-history-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sms-notification-history-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.sms-notifications-history-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.sms-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

/* Confirmation Modal Styles */
.sms-confirm-modal-content {
    max-width: 400px;
    width: 90%;
}

.sms-confirm-icon {
    text-align: center;
    margin-bottom: 16px;
}

.sms-confirm-icon i {
    font-size: 48px;
    color: #ffc107;
}

.sms-confirm-modal-content .sms-modal-body {
    text-align: center;
    padding: 24px;
}

.sms-confirm-modal-content .sms-modal-body p {
    font-size: 16px;
    color: #2c3e50;
    margin: 0;
}

.sms-confirm-modal-content .sms-modal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 24px;
}

/* Show modal class */
.sms-modal.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10000 !important;
}


/* System Status Card Styles */
.sms-system-status-card {
    padding: 20px;
}

.sms-system-status-list {
    margin-top: 16px;
}

.sms-system-status-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.sms-system-status-item:last-child {
    border-bottom: none;
}

.sms-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.sms-status-operational {
    background-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.sms-status-configured {
    background-color: #17a2b8;
    box-shadow: 0 0 0 2px rgba(23, 162, 184, 0.2);
}

.sms-status-updated {
    background-color: #6f42c1;
    box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.2);
}

.sms-status-component {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

.sms-status-value {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    text-align: right;
}

/* Responsive adjustments for system status */
@media (max-width: 768px) {
    .sms-system-status-card {
        padding: 16px;
    }
    
    .sms-system-status-item {
        padding: 10px 0;
    }
    
    .sms-status-indicator {
        width: 6px;
        height: 6px;
        margin-right: 10px;
    }
    
    .sms-status-component,
    .sms-status-value {
        font-size: 13px;
    }
}

.sms-notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
}

.sms-notifications-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sms-notifications-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sms-notifications-icon {
    font-size: 20px;
}

.sms-notifications-list {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.sms-notification-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.sms-notification-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.sms-notification-item:last-child {
    margin-bottom: 0;
}

.sms-notification-item.urgent {
    border-left: 4px solid #e74c3c;
    background: #fdf2f2;
}

.sms-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.sms-notification-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.sms-notification-urgent-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 10px;
}

.sms-notification-actions {
    display: flex;
    gap: 8px;
}

.sms-notification-delete {
    background: #dc3545;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.sms-notification-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.sms-notification-content {
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.sms-notification-date {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.sms-no-notifications {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
}

/* Field Validation Styles */
.field-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}

.field-valid {
    border-color: #27ae60 !important;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sms-notifications-body {
        flex-direction: column;
        gap: 20px;
    }
    
    .sms-notification-recipients {
        border-left: none;
        border-top: 1px solid #e9ecef;
        background: white;
    }
    
    .sms-notifications-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .sms-notifications-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .sms-notifications-actions .sms-btn {
        width: 100%;
    }
    
    .sms-recipients-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .sms-filter-container {
        min-width: auto;
    }
}

/* Docenti Hours Table */
.sms-docenti-hours-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.sms-docenti-hours-table {
    width: 100%;
    border-collapse: collapse;
}

.sms-docenti-hours-table th,
.sms-docenti-hours-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.sms-docenti-hours-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.sms-docenti-hours-table tbody tr:hover {
    background: #f8f9fa;
}

/* Docenti Hours Actions */
.sms-docenti-hours-actions {
    display: flex;
    gap: 8px;
}

.sms-docenti-hours-actions .sms-btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* Presenze Modal */
.sms-presenza-modal .sms-modal-content {
    max-width: 500px;
    min-width: 600px;
}

/* Student info styling */
.sms-presenza-info {
    background: #f8f9fa;
    padding: 15px 32px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sms-presenza-info p {
    margin: 5px 0;
    color: #495057;
}

/* Make student name and date bold */
.sms-presenza-info .sms-student-name,
.sms-presenza-info .sms-student-date {
    font-weight: bold;
    color: #212529;
}

.sms-presenza-form {
    padding: 0 32px;
}

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

.sms-presenza-form .sms-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.sms-presenza-form .sms-form-group input,
.sms-presenza-form .sms-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.sms-presenza-form .sms-form-group input:focus,
.sms-presenza-form .sms-form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Presenze Status Buttons */
.sms-presenza-status-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.sms-presenza-status-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #f8f9fa;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.sms-presenza-status-btn:hover {
    background: #e9ecef;
}

.sms-presenza-status-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.sms-presenza-status-btn.presente.active {
    border-color: #28a745;
    background: #28a745;
}

.sms-presenza-status-btn.ritardo.active {
    border-color: #ffc107;
    background: #ffc107;
    color: #212529;
}

.sms-presenza-status-btn.assente.active {
    border-color: #dc3545;
    background: #dc3545;
}

/* Presenza Modal Actions - Updated to match concept */
.sms-presenza-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding: 20px 32px 32px 32px;
    border-top: 1px solid #e9ecef;
}

.sms-presenza-actions .sms-btn-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sms-presenza-actions .sms-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Delete button - Red with icon */
.sms-presenza-actions .sms-btn-danger {
    background: #dc3545;
    color: white;
}

.sms-presenza-actions .sms-btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Cancel button - Gray */
.sms-presenza-actions .sms-btn-secondary {
    background: #6c757d;
    color: white;
}

.sms-presenza-actions .sms-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Save button - Blue */
.sms-presenza-actions .sms-btn-primary {
    background: #007bff;
    color: white;
}

.sms-presenza-actions .sms-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Button icons */
.sms-presenza-actions .sms-btn-icon {
    font-size: 16px;
}

/* Status Buttons in Modal */
.sms-status-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.sms-status-btn {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

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

.sms-status-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.sms-status-btn.present.active {
    border-color: #28a745;
    background: #28a745;
}

.sms-status-btn.late.active {
    border-color: #ffc107;
    background: #ffc107;
    color: #212529;
}

.sms-status-btn.absent.active {
    border-color: #dc3545;
    background: #dc3545;
}

.sms-status-icon {
    font-size: 24px;
    font-weight: bold;
}

.sms-presenza-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.sms-info-item {
    margin-bottom: 8px;
}

.sms-info-item:last-child {
    margin-bottom: 0;
}

/* Responsive Design for Presenze */
@media (max-width: 768px) {
    .sms-presenze-filters .sms-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sms-presenze-filters .sms-input,
    .sms-presenze-filters .sms-select {
        min-width: auto;
        width: 100%;
    }
    
    .sms-presenze-table-container {
        overflow-x: auto;
    }
    
    .sms-presenze-table {
        min-width: 600px;
    }
    
    .sms-docenti-hours-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .sms-docenti-filters .sms-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sms-docenti-filters .sms-select {
        min-width: auto;
        width: 100%;
    }
}