/**
 * admin-material.css - Stili Material Design per admin
 * @version 1.3.0 - UPDATED WITH NEW FILTERS
 * @date 2025-06-28
 */

:root {
    --primary-color: #1976d2;
    --primary-dark: #004ba0;
    --primary-light: #63a4ff;
    --secondary-color: #ff6f00;
    --accent-color: #00bcd4;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --text-primary: #212121;
    --text-secondary: #757575;
    --divider-color: #e0e0e0;
    --background: #f5f5f5;
    --surface: #ffffff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* App Bar */
.app-bar {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.app-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
}

.app-title {
    font-size: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-button {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    margin-top: 64px;
    padding: 24px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards */
.card {
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.card-content {
    padding: 24px;
}

/* Filters */
.filters-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.filters-left {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    flex: 1;
}

.filters-right {
    display: flex;
    gap: 16px;
}

/* ===== FILTRI BOOKINGS MIGLIORATI (NEW) ===== */
/* Separatore filtri */
.filter-separator {
    display: inline-block;
    margin: 0 16px;
    color: #ccc;
    font-size: 24px;
    vertical-align: middle;
    line-height: 36px;
}

/* Contenitore filtri migliorato */
.date-filter-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Tab buttons più compatti per fare spazio */
.date-filter-tabs .tab-btn {
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.date-filter-tabs .tab-btn i {
    font-size: 18px;
    margin-right: 4px;
}

/* Responsive: su schermi piccoli il separatore va a capo */
@media (max-width: 1200px) {
    .filter-separator {
        display: none;
    }
    
    .date-filter-tabs {
        gap: 4px;
    }
    
    /* Crea una separazione visiva con margine */
    .date-filter-tabs .tab-btn:nth-child(4) {
        margin-right: 16px;
    }
}

/* Colori distintivi per stati */
.tab-btn[onclick*="active"] i { color: #4CAF50; }
.tab-btn[onclick*="unpaid"] i { color: #FF9800; }
.tab-btn[onclick*="paid"] i { color: #4CAF50; }
.tab-btn[onclick*="cancelled"] i { color: #F44336; }
.tab-btn[onclick*="expired"] i { color: #9E9E9E; }

/* Active state con colori appropriati */
.tab-btn[onclick*="active"].active { background-color: #4CAF50; }
.tab-btn[onclick*="unpaid"].active { background-color: #FF9800; }
.tab-btn[onclick*="paid"].active { background-color: #4CAF50; }
.tab-btn[onclick*="cancelled"].active { background-color: #F44336; }
.tab-btn[onclick*="expired"].active { background-color: #9E9E9E; }
/* ===== FINE FILTRI BOOKINGS MIGLIORATI ===== */

/* Input Fields - Material Design */
.input-field {
    position: relative;
    margin-bottom: 20px;
}

.input-field input,
.input-field textarea {
    width: 100%;
    padding: 12px 0 8px 0;
    font-size: 16px;
    border: none;
    border-bottom: 1px solid var(--divider-color);
    background-color: transparent;
    transition: border-color 0.3s;
}

.input-field input:focus,
.input-field textarea:focus {
    outline: none;
    border-bottom: 2px solid var(--primary-color);
}

.input-field label {
    position: absolute;
    top: 12px;
    left: 0;
    font-size: 16px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s;
}

.input-field input:focus ~ label,
.input-field input:not(:placeholder-shown) ~ label,
.input-field textarea:focus ~ label,
.input-field textarea:not(:placeholder-shown) ~ label,
.input-field label.active {
    top: -12px;
    font-size: 12px;
    color: var(--primary-color);
}

.input-field .helper-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Select Fields */
.select-field {
    position: relative;
    display: inline-block;
    min-width: 150px;
}

.select-field select {
    width: 100%;
    padding: 12px 0 8px 0;
    font-size: 16px;
    border: none;
    border-bottom: 1px solid var(--divider-color);
    background-color: transparent;
    cursor: pointer;
}

.select-field label {
    position: absolute;
    top: -12px;
    left: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.btn-sm .material-icons {
    font-size: 18px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background-color: var(--divider-color);
}

.btn-icon.btn-danger {
    color: var(--danger-color);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--divider-color);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--divider-color);
}

.data-table tr:hover {
    background-color: rgba(0,0,0,0.02);
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Modal - UNICO STILE CORRETTO */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

/* Modal active state - UNICO MODO PER MOSTRARE IL MODAL */
.modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Modal large - per contenuti estesi */
.modal.modal-large {
    max-width: 900px !important;
    width: 95% !important;
}

@media (max-width: 768px) {
    .modal.modal-large {
        max-width: 100% !important;
        width: 100% !important;
        height: 100%;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
    }
}

.modal-content {
    padding: 0;
}

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

.modal-large {
    max-width: 900px !important;
    width: 90%;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--divider-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background-color 0.3s;
}

.modal-close:hover {
    background-color: var(--divider-color);
}

.modal-body {
    padding: 24px;
}

.modal-actions {
    padding: 16px 24px;
    border-top: 1px solid var(--divider-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

/* Modal overlay active state */
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Form Elements */
form {
    padding: 24px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.col-6 {
    flex: 1;
}

.col-4 {
    flex: 0 0 33.333%;
}

.form-section {
    margin: 24px 0;
}

.form-section h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* Checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Messages */
.message {
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
    display: none;
}

.message-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--success-color);
}

.message-error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--danger-color);
}

.message-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid var(--primary-color);
}

/* Loading */
.loading {
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
}

.spinner {
    border: 3px solid var(--divider-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
}

.empty-state .material-icons {
    font-size: 64px;
    opacity: 0.3;
    margin-bottom: 16px;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    text-align: right;
    margin-right: 8px;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
}

.logout-button {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.logout-button:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--divider-color);
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    margin: 0 4px;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.page-dots {
    padding: 0 8px;
    color: var(--text-secondary);
}

/* Badges and Chips */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 1;
}

.badge-warning {
    background: #ff9800;
    color: white;
}

.badge-info {
    background: #2196f3;
    color: white;
}

.badge-secondary {
    background: #757575;
    color: white;
}

.chip {
    display: inline-block;
    padding: 4px 12px;
    background: #e0e0e0;
    border-radius: 16px;
    font-size: 13px;
    margin: 2px;
}

/* Textarea Material Style */
.materialize-textarea {
    width: 100%;
    min-height: 60px;
    padding: 12px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    transition: border-color 0.3s;
}

.materialize-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background-color: #ffebee;
    color: #c62828;
}

.status-deleted {
    background-color: #f5f5f5;
    color: #757575;
}

/* Price Chips */
.price-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.price-chips .chip {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

/* Stepper Container */
.stepper-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stepper-container .stepper-button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 32px !important;
    border-radius: 4px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stepper-container .stepper-button:hover:not(:disabled) {
    background-color: #e0e0e0;
    border-color: #bbb;
}

.stepper-container .stepper-button:active:not(:disabled) {
    background-color: #d0d0d0;
    transform: scale(0.95);
}

.stepper-container .stepper-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stepper-container input[type="number"] {
    height: 32px !important;
    font-size: 14px !important;
    padding: 4px 8px !important;
    text-align: center;
    min-width: 60px;
    max-width: 80px;
}

/* Remove number input arrows */
.stepper-container input[type="number"]::-webkit-inner-spin-button,
.stepper-container input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stepper-container input[type="number"] {
    -moz-appearance: textfield;
}

/* Stepper Group */
.stepper-group {
    margin-bottom: 20px;
}

.stepper-group label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-grid-full {
    grid-column: 1 / -1;
}

/* Booking Detail Styles */
.booking-detail {
    padding: 20px;
}

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

.detail-header h3 {
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.detail-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0;
}

.detail-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.detail-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
}

.detail-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 16px 0;
    color: var(--primary-color);
}

.detail-section h4 .material-icons {
    font-size: 20px;
    opacity: 0.8;
}

.detail-section p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.detail-section p strong {
    font-weight: 500;
    color: var(--text-primary);
    display: inline-block;
    min-width: 140px;
}

.detail-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.detail-section a:hover {
    text-decoration: underline;
}

.detail-section pre {
    background: white;
    padding: 12px;
    border-radius: 4px;
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* History List */
.history-list {
    margin-top: 12px;
}

.history-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}

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

.history-date {
    color: var(--text-secondary);
    min-width: 130px;
}

.history-action {
    font-weight: 500;
    color: var(--text-primary);
}

.history-details {
    color: var(--text-secondary);
    font-style: italic;
}

/* Detail Actions */
.detail-actions {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.detail-actions .input-field {
    margin-bottom: 16px;
}

.detail-actions textarea {
    min-height: 80px;
    resize: vertical;
}

/* Status and Payment Badges in Detail View */
.booking-detail .booking-status,
.booking-detail .payment-badge {
    display: inline-block;
    margin-left: 12px;
}

/* Modal Loading */
.modal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.modal-loading .spinner {
    width: 50px;
    height: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-left {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .languages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .user-info {
        display: none;
    }
    
    .data-table {
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }
    
    .modal-large {
        max-width: 95%;
        margin: 10px;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .detail-sections {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .detail-section p strong {
        display: block;
        margin-bottom: 4px;
    }
    
    .history-item {
        flex-direction: column;
        gap: 4px;
    }
    
    .stepper-container .stepper-button {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        font-size: 16px !important;
        line-height: 28px !important;
    }
    
    .stepper-container input[type="number"] {
        height: 28px !important;
        font-size: 13px !important;
        min-width: 50px;
        max-width: 70px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Textarea style per compatibilità */
textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 1px solid var(--divider-color);
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    min-height: 60px;
    background: transparent;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-bottom: 2px solid var(--primary-color);
}

/* Missing booking styles */
.page-btn {
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid var(--divider-color);
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-dots {
    padding: 0 8px;
    color: var(--text-secondary);
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-warning {
    background: #ff9800;
    color: white;
}

.badge-info {
    background: #2196f3;
    color: white;
}

.badge-secondary {
    background: #757575;
    color: white;
}

/* Booking Details Modal Styles */
.booking-details-body {
    max-height: 80vh;
    overflow-y: auto;
}

.details-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

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

.details-section {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.details-section h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}

.details-section h3 .material-icons {
    font-size: 20px;
}

.details-content {
    font-size: 14px;
}

.details-content p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-content .material-icons {
    font-size: 16px;
    color: #666;
}

.participants-breakdown {
    background: white;
    padding: 12px;
    border-radius: 4px;
    margin-top: 8px;
}

.participant-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

.participant-row.total {
    border-top: 1px solid #e0e0e0;
    margin-top: 8px;
    padding-top: 8px;
    font-weight: 500;
}

.price-total {
    font-size: 24px;
    font-weight: 500;
    color: var(--primary-color);
    margin: 0 0 8px 0;
}

.details-alert {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.details-alert .material-icons {
    color: #f57c00;
}

.details-notes {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.details-notes h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-notes p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.details-history {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.details-history h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-list {
    font-size: 13px;
}

.history-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}

.history-date {
    color: #666;
}

.history-action {
    font-weight: 500;
}

.details-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #666;
}

.details-footer p {
    margin: 4px 0;
}

/* Modal size adjustment for large content */
.modal-content.large {
    max-width: 900px;
    width: 90%;
}

/* Text color utilities */
.text-success { color: #4caf50; }
.text-warning { color: #ff9800; }
.text-info { color: #2196f3; }
.text-danger { color: #f44336; }

/* File: /public/assets/css/admin-material.css
   Percorso: /public/assets/css/admin-material.css
   Aggiungere questi stili per il nuovo design del modal */

/* Modern Modal Design */
.modal-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-modern.active {
    opacity: 1;
    visibility: visible;
}

.booking-modal-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-modern.active .booking-modal-container {
    transform: scale(1);
}

/* Modal Header */
.booking-modal-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.booking-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.booking-modal-close {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #666;
}

.booking-modal-close:hover {
    background-color: #f5f5f5;
}

.booking-modal-close .material-icons {
    font-size: 24px;
}

/* Modal Content */
.booking-modal-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* Booking Code Section */
.booking-code-section {
    margin-bottom: 24px;
}

.booking-code-label {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    color: #333;
}

/* Info Sections */
.booking-info-section {
    margin-bottom: 32px;
}

.booking-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #1a1a1a;
}

.info-row {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
}

.info-label {
    font-size: 15px;
    color: #666;
    min-width: 140px;
    font-weight: 400;
}

.info-value {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 500;
    flex: 1;
}

/* Experience Grid */
.experience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 600px) {
    .experience-grid {
        grid-template-columns: 1fr;
    }
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-confirmed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background-color: #fff3e0;
    color: #ef6c00;
}

.status-cancelled {
    background-color: #ffebee;
    color: #c62828;
}

/* Price Text */
.price-text {
    font-size: 20px;
    font-weight: 600;
    color: #1976d2;
}

/* Date Text */
.date-text {
    font-size: 14px;
    color: #999;
}

/* Guide Section */
.guide-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.guide-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.guide-avatar {
    width: 60px;
    height: 60px;
    background-color: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1976d2;
}

.guide-avatar .material-icons {
    font-size: 30px;
}

.guide-details {
    flex: 1;
}

.guide-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1a1a1a;
}

.guide-languages {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
}

.guide-contact {
    font-size: 14px;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.guide-contact .material-icons {
    font-size: 16px;
}

/* Equipment Section */
.equipment-alert {
    background-color: #fff8e1;
    border: 1px solid #ffecb3;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.equipment-alert .material-icons {
    color: #f9a825;
    font-size: 24px;
    flex-shrink: 0;
}

.equipment-alert p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

/* Notes Section */
.notes-content {
    background-color: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Payment Status Banner */
.payment-status-banner {
    margin: 24px 0 0 0;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.payment-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.payment-warning {
    background-color: #fff3e0;
    color: #ef6c00;
}

/* Modal Footer */
.booking-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Modal Buttons */
.btn-modal {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-modal .material-icons {
    font-size: 20px;
}

.btn-voucher {
    background-color: white;
    color: #666;
    border: 1px solid #e0e0e0;
}

.btn-voucher:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.btn-primary {
    background-color: #1976d2;
    color: white;
}

.btn-primary:hover {
    background-color: #1565c0;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

/* Scrollbar styling */
.booking-modal-content::-webkit-scrollbar {
    width: 6px;
}

.booking-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.booking-modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.booking-modal-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ===== BOOKING CARD STYLES (Original Design) ===== */

/* Booking Card Container */
.booking-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.booking-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Booking Header */
.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.booking-code {
    font-size: 16px;
    font-weight: 600;
    color: #1976d2;
    margin-right: 12px;
}

.booking-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-status.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.booking-status.status-confirmed {
    background: #e8f5e9;
    color: #2e7d32;
}

.booking-status.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.booking-status.status-completed {
    background: #e3f2fd;
    color: #1565c0;
}

/* Booking Body */
.booking-body {
    padding: 20px;
}

.booking-info {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.info-group {
    display: flex;
    gap: 12px;
    flex: 1;
}

.info-group .material-icons {
    color: #757575;
    font-size: 24px;
    margin-top: 4px;
}

.info-content {
    flex: 1;
}

.info-content h4 {
    font-size: 12px;
    font-weight: 500;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 4px 0;
}

.info-content p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #424242;
    line-height: 1.4;
}

.info-content p strong {
    font-weight: 500;
    color: #212121;
}

/* Booking Footer */
.booking-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.booking-price {
    display: flex;
    align-items: center;
    gap: 16px;
}

.price-label {
    font-size: 14px;
    color: #757575;
}

.price-amount {
    font-size: 20px;
    font-weight: 500;
    color: #1976d2;
}

.payment-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.payment-status.payment-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.payment-status.payment-unpaid {
    background: #fff3e0;
    color: #e65100;
}

.payment-status.payment-refunded {
    background: #e3f2fd;
    color: #1565c0;
}

/* Booking Actions */
.booking-actions {
    display: flex;
    gap: 8px;
}

.booking-actions .btn-icon {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.booking-actions .btn-icon:hover {
    background: #f5f5f5;
    border-color: #bdbdbd;
    transform: translateY(-2px);
}

.booking-actions .btn-icon .material-icons {
    font-size: 20px;
    color: #424242;
}

.booking-actions .btn-icon.text-warning .material-icons {
    color: #ff9800;
}

.booking-actions .btn-icon.text-danger .material-icons {
    color: #f44336;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-warning {
    background: #ff9800;
    color: white;
}

.badge-info {
    background: #2196f3;
    color: white;
}

.badge-secondary {
    background: #757575;
    color: white;
}

.badge-danger {
    background: #f44336;
    color: white;
}

/* Empty state */
.empty-bookings {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.empty-bookings .material-icons {
    font-size: 72px;
    color: #e0e0e0;
    margin-bottom: 16px;
}

.empty-bookings p {
    font-size: 18px;
    color: #757575;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .booking-info {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .booking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .booking-header > div:last-child {
        align-self: flex-start;
    }
    
    .booking-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .booking-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .booking-actions {
        align-self: flex-end;
    }
}

@media (max-width: 576px) {
    .booking-body {
        padding: 16px;
    }
    
    .info-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .info-group .material-icons {
        font-size: 20px;
    }
}

<style>
.date-filter-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.date-filter-group .select-field {
    margin-bottom: 0;
}
</style>

/* Aggiungi questi stili al tuo admin-material.css */

/* Modal Compatto */
.modal-content.modal-compact {
  width: 10024px;
  max-width: 700px;
  max-height: 85vh;
}

/* Bottoni più compatti nei modal */
.details-actions .btn {
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.details-actions .btn .material-icons {
  font-size: 16px;
  margin-right: 4px;
  vertical-align: middle;
}

/* Badge più compatti */
.badge {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge .material-icons {
  font-size: 14px;
}

/* Card hover effect */
.modal-body > div > div {
  transition: transform 0.2s, box-shadow 0.2s;
}

.modal-body > div > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* Scrollbar personalizzata per il modal */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ========== MODAL PAGAMENTI AFFILIATI ========== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Modal Content */
.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
}

/* Modal Header */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: #f5f5f5;
}

/* Modal Body */
.modal-body {
    padding: 20px;
}

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

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.modal-body .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.modal-body .form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.modal-body .form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.modal-body textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Modal Footer */
.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Balance Section */
.balance-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.balance-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .balance-section > div {
        grid-template-columns: 1fr !important;
    }
}