/**
 * Stand Manager - Modal Modern Styles
 * Stili modernizzati per il modale di visualizzazione richieste
 */

/* Stili per il nuovo sistema di multiple date per stand */
.sm-stand-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.sm-add-date-btn, .sm-remove-entry-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 10px;
    transition: background-color 0.2s;
}

.sm-add-date-btn:hover {
    background: #005a87;
}

.sm-remove-entry-btn {
    background: #dc3545;
}

.sm-remove-entry-btn:hover {
    background: #c82333;
}

.sm-selected-stand {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f9f9f9;
}

.sm-selected-stand[data-entry]:not([data-entry="0"]) {
    border-left: 4px solid #007cba;
    background: #f0f8ff;
}

.sm-selected-stand h4 {
    margin-top: 0;
    color: #007cba;
    font-size: 16px;
}

.sm-selected-stand .sm-stand-info p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.sm-date-selection {
    margin: 15px 0;
}

.sm-date-selection .sm-form-row {
    display: flex;
    gap: 15px;
}

.sm-date-selection .sm-form-group {
    flex: 1;
}

.sm-date-selection label {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.sm-date-selection input[type="date"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Stile per campi in errore */
.sm-error-field {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    animation: shake 0.5s ease-in-out;
}

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

/* Stile generale per il modale moderno */
.sm-modern {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.5;
}

/* Header della richiesta */
.sm-modern .sm-request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.sm-modern .sm-request-title {
    display: flex;
    align-items: center;
}

.sm-modern .sm-request-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.sm-modern .sm-request-id {
    color: #0073aa;
    font-weight: 700;
}

.sm-modern .sm-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 50px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    margin-left: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sm-modern .sm-request-actions {
    display: flex;
    gap: 10px;
}

/* Meta info sotto l'header */
.sm-modern .sm-request-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.sm-modern .sm-meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.sm-modern .sm-meta-item .dashicons {
    color: #0073aa;
    margin-right: 6px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.sm-modern .sm-meta-label {
    font-weight: 600;
    margin-right: 5px;
    color: #555;
}

.sm-modern .sm-meta-value {
    color: #333;
}

/* Schede/Tabs */
.sm-modern .sm-request-tabs {
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.sm-modern .sm-tabs-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.sm-modern .sm-tabs-nav li {
    flex: 0 0 auto;
}

.sm-modern .sm-tabs-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.sm-modern .sm-tabs-nav li.active a,
.sm-modern .sm-tabs-nav li:hover a {
    color: #0073aa;
    background-color: #fff;
}

.sm-modern .sm-tabs-nav li.active a {
    border-bottom-color: #0073aa;
}

.sm-modern .sm-tabs-nav li a .dashicons {
    margin-right: 6px;
    font-size: 16px;
}

.sm-modern .sm-tabs-content {
    padding: 0;
}

.sm-modern .sm-tab-panel {
    display: none;
    padding: 25px;
}

.sm-modern .sm-tab-panel.active {
    display: block;
}

/* Cards */
.sm-modern .sm-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sm-modern .sm-card-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.sm-modern .sm-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
}

.sm-modern .sm-card-header h3 .dashicons {
    margin-right: 8px;
    color: #0073aa;
    font-size: 18px;
}

.sm-modern .sm-card-body {
    padding: 20px;
}

/* Form Groups */
.sm-modern .sm-form-group {
    margin-bottom: 20px;
}

.sm-modern .sm-form-group:last-child {
    margin-bottom: 0;
}

.sm-modern .sm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.sm-modern .sm-form-row {
    display: flex;
    gap: 20px;
}

.sm-modern .sm-form-row .sm-form-group {
    flex: 1;
}

/* Modern inputs */
.sm-modern .sm-input-modern,
.sm-modern .wp-editor-area {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s;
}

.sm-modern .sm-input-modern:focus,
.sm-modern .wp-editor-area:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.sm-modern .sm-input-modern[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Textarea styling */
.sm-modern textarea.sm-input-modern {
    resize: vertical;
    min-height: 100px;
}

/* Input with icon */
.sm-modern .sm-input-icon-wrapper {
    position: relative;
}

.sm-modern .sm-input-icon-wrapper .dashicons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.sm-modern .sm-input-icon-wrapper input {
    padding-left: 38px;
}

/* Checkbox modern */
.sm-modern .sm-checkbox-modern {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.sm-modern .sm-checkbox-modern input[type="checkbox"] {
    display: none;
}

.sm-modern .sm-checkbox-checkmark {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #d0d0d0;
    border-radius: 3px;
    position: relative;
    transition: all 0.3s;
    margin-right: 10px;
}

.sm-modern .sm-checkbox-modern input[type="checkbox"]:checked + .sm-checkbox-checkmark {
    background-color: #0073aa;
    border-color: #0073aa;
}

.sm-modern .sm-checkbox-modern input[type="checkbox"]:checked + .sm-checkbox-checkmark:after {
    content: '\f147';
    font-family: dashicons;
    position: absolute;
    top: -4px;
    left: 0px;
    color: white;
    font-size: 16px;
}

/* Toggle switch */
.sm-modern .sm-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.sm-modern .sm-toggle-switch input {
    display: none;
}

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

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

.sm-modern input:checked + .sm-toggle-slider {
    background-color: #0073aa;
}

.sm-modern input:checked + .sm-toggle-slider:before {
    transform: translateX(26px);
}

/* Buttons */
.sm-modern .sm-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    gap: 6px;
}

.sm-modern .sm-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.sm-modern .sm-button:active {
    transform: translateY(0);
}

.sm-modern .sm-button .dashicons {
    font-size: 16px;
}

/* Primary button */
.sm-modern .sm-button-primary {
    color: white;
    background-color: #0073aa;
    border-color: #0073aa;
}

.sm-modern .sm-button-primary:hover {
    background-color: #005b87;
    border-color: #005b87;
}

/* Success button */
.sm-modern .sm-button-success {
    color: white;
    background-color: #28a745;
    border-color: #28a745;
}

.sm-modern .sm-button-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Danger button */
.sm-modern .sm-button-danger {
    color: white;
    background-color: #dc3545;
    border-color: #dc3545;
}

.sm-modern .sm-button-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Warning button */
.sm-modern .sm-button-warning {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}

.sm-modern .sm-button-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Secondary button */
.sm-modern .sm-button-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.sm-modern .sm-button-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Disabled button */
.sm-modern .sm-button:disabled,
.sm-modern .sm-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sm-modern .sm-button:disabled:hover,
.sm-modern .sm-button.disabled:hover {
    transform: none;
}

/* Form actions */
.sm-modern .sm-form-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

/* Tables modern */
.sm-modern .sm-table-responsive {
    overflow-x: auto;
    margin: 0 -5px;
}

.sm-modern .sm-table {
    width: 100%;
    border-collapse: collapse;
}

.sm-modern .sm-table-modern {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sm-modern .sm-table th {
    padding: 12px 15px;
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

.sm-modern .sm-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eaeaea;
}

.sm-modern .sm-table tbody tr:hover {
    background-color: #f8f9fa;
}

.sm-modern .sm-table tbody tr:last-child td {
    border-bottom: none;
}

/* Empty state */
.sm-modern .sm-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.sm-modern .sm-empty-state .dashicons {
    display: block;
    margin: 0 auto 10px;
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ddd;
}

.sm-modern .sm-empty-state p {
    margin: 0;
    font-size: 16px;
}

/* Status display */
.sm-modern .sm-status-display {
    margin: 10px 0;
}

.sm-modern .sm-status-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* Audit log specific */
.sm-modern .sm-audit-action {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.sm-modern .sm-action-create-request {
    background-color: #d1ecf1;
    color: #0c5460;
}

.sm-modern .sm-action-update-status {
    background-color: #fff3cd;
    color: #856404;
}

.sm-modern .sm-action-generate-pdf {
    background-color: #d4edda;
    color: #155724;
}

.sm-modern .sm-action-update-data {
    background-color: #e7e8ea;
    color: #383d41;
}

/* Help text */
.sm-modern .sm-help-text {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #999;
    font-style: italic;
}

/* Promotional materials */
.sm-modern .sm-promo-materials-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sm-modern .sm-checkbox-item {
    display: flex;
    flex-direction: column;
}

.sm-modern .sm-sub-field {
    margin-left: 28px;
    margin-top: 8px;
}

.sm-modern .sm-sub-field label {
    margin-bottom: 5px;
}

/* Section divider */
.sm-modern .sm-section-divider {
    text-align: center;
    margin: 30px 0 20px;
    position: relative;
}

.sm-modern .sm-section-divider:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e0e0e0;
}

.sm-modern .sm-section-divider span {
    position: relative;
    padding: 0 15px;
    background-color: #fff;
    font-weight: 600;
    color: #666;
}

/* Form disabled warning */
.sm-modern .sm-form-disabled-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sm-modern .sm-form-disabled-warning .sm-warning-icon {
    font-size: 24px;
}

.sm-modern .sm-form-disabled-warning .sm-warning-text {
    flex: 1;
}

/* Modal animations */
.sm-modern.sm-fade-in {
    animation: smFadeIn 0.3s ease-out;
}

@keyframes smFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .sm-modern .sm-request-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sm-modern .sm-request-meta {
        flex-direction: column;
    }
    
    .sm-modern .sm-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sm-modern .sm-tabs-nav li {
        flex-shrink: 0;
    }
    
    .sm-modern .sm-form-row {
        flex-direction: column;
    }
    
    .sm-modern .sm-status-buttons {
        flex-direction: column;
    }
    
    .sm-modern .sm-button {
        width: 100%;
        justify-content: center;
    }
}

/* Stand specific styles */
.sm-modern .sm-stands-list {
    margin-top: 20px;
}

.sm-modern .sm-stands-list .sm-table {
    background-color: transparent;
}

.sm-modern .sm-stands-list .sm-empty-state {
    background-color: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 40px;
}

/* Subfield styling */
.sm-modern .sm-subfield {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-left: 3px solid #0073aa;
    font-size: 14px;
}

/* Date input specific */
.sm-modern input[type="date"] {
    background-color: #fff;
}

/* Stand form specific */
.sm-modern .sm-add-stand-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sm-modern .sm-select-stand-container {
    width: 100%;
}

.sm-modern .sm-stand-dates {
    display: flex;
    gap: 15px;
}

@media (max-width: 576px) {
    .sm-modern .sm-stand-dates {
        flex-direction: column;
    }
}

/* Select2 styling override */
.sm-modern .select2-container--default .select2-selection--single {
    height: 38px;
    padding: 4px 8px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
}

.sm-modern .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    color: #333;
}

.sm-modern .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.sm-modern .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Disabled styles */
.sm-modern .sm-form-disabled-warning {
    font-weight: 500;
}

.sm-modern input:disabled,
.sm-modern select:disabled,
.sm-modern textarea:disabled {
    background-color: #f0f0f0 !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

/* Loading state */
.sm-modern .sm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: sm-spin 1s linear infinite;
}

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

/* Sub-section title */
.sm-modern h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Company data specific */
.sm-modern [readonly] {
    background-color: #f8f9fa;
}

/* Tab panel heading */
.sm-modern .sm-tab-panel > h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #23282d;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Download PDF button in header - if shown */
.sm-modern .sm-download-pdf {
    background-color: #fff;
    border: 1px solid #0073aa;
    color: #0073aa;
}

.sm-modern .sm-download-pdf:hover {
    background-color: #0073aa;
    color: white;
}

/* Attachment preview specific */
.sm-modern .sm-table .sm-attachment-preview {
    max-width: 80px;
    max-height: 80px;
    overflow: hidden;
    border-radius: 4px;
}

.sm-modern .sm-table .sm-attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* stand venue info */
.sm-modern .sm-stand-venue {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* Form toggle container */
.sm-modern .sm-form-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sm-modern .sm-form-toggle label:first-child {
    margin-bottom: 0;
}

/* Tabs without JavaScript styling */
.sm-tabs-nav li {
    cursor: pointer;
    user-select: none;
}

.sm-tabs-nav li[data-tab] {
    position: relative;
}

.sm-tabs-nav li[data-tab]:not(.active):hover {
    background-color: #f0f0f0;
}

.sm-tabs-nav li[data-tab] span {
    pointer-events: none;
}

/* Checkbox container */
.sm-modern .sm-checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Styles for disabled form state */
.sm-modern.form-disabled input,
.sm-modern.form-disabled select,
.sm-modern.form-disabled textarea,
.sm-modern.form-disabled button {
    pointer-events: none;
    opacity: 0.6;
}

/* PDF Action styles */
.sm-modern .sm-pdf-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sm-modern .sm-pdf-loading {
    display: none;
    align-items: center;
    gap: 8px;
    color: #666;
}

.sm-modern .sm-pdf-loading.active {
    display: flex;
}

/* Notification styles */
.sm-modern .sm-notification {
    position: fixed;
    top: 32px;
    right: 20px;
    max-width: 350px;
    padding: 15px 20px;
    background-color: #fff;
    border-left: 4px solid #0073aa;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 100000;
    animation: slideIn 0.3s ease-out;
}

.sm-modern .sm-notification.success {
    border-left-color: #46b450;
}

.sm-modern .sm-notification.error {
    border-left-color: #dc3232;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Empty state */
.sm-modern .sm-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.sm-modern .sm-empty-state .dashicons {
    display: block;
    margin: 0 auto 10px;
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ddd;
}

.sm-modern .sm-empty-state p {
    margin: 0;
    color: #666;
}

/* Add stand container */
.sm-modern .sm-add-stand-container {
    background-color: #f8f9fa;
    border: 1px solid #e3e4e8;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.sm-modern .sm-add-stand-container h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sm-modern .sm-add-stand-container h4 i {
    color: #0073aa;
}

.sm-modern .sm-stand-dates {
    margin-bottom: 15px;
}

.sm-modern .sm-add-stand-actions {
    text-align: left;
}

/* Date input wrapper for stands */
.sm-modern .sm-date-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.sm-modern .sm-date-input-wrapper i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

.sm-modern .sm-date-input-wrapper input {
    padding-left: 35px;
}

/* Add Stand Button */
#sm-add-stand-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#sm-add-stand-btn:hover {
    transform: translateY(-1px);
}

/* Button small variant */
.sm-button-small {
    padding: 5px 10px;
    font-size: 13px;
}

.sm-button-small .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Stili per la scheda Contratto */
.sm-tab-panel[data-tab="contract"] .sm-contract-info {
    text-align: center;
    padding: 30px;
}

.sm-tab-panel[data-tab="contract"] .sm-contract-info p {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
}

.sm-tab-panel[data-tab="contract"] .sm-contract-actions {
    margin-top: 20px;
}

.sm-tab-panel[data-tab="contract"] .sm-pdf-ready {
    color: #28a745;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 20px;
}

.sm-tab-panel[data-tab="contract"] .sm-pdf-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.sm-tab-panel[data-tab="contract"] .sm-download-pdf {
    font-size: 16px;
    padding: 12px 24px;
}

.sm-tab-panel[data-tab="contract"] .sm-download-link {
    font-size: 16px;
    padding: 12px 24px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sm-tab-panel[data-tab="contract"] .sm-email-pdf {
    font-size: 16px;
    padding: 12px 24px;
}

.sm-tab-panel[data-tab="contract"] .sm-button-tertiary {
    background-color: #f0f0f0;
    color: #666;
    border-color: #ddd;
}

.sm-tab-panel[data-tab="contract"] .sm-button-tertiary:hover {
    background-color: #e8e8e8;
    border-color: #ccc;
}

.sm-tab-panel[data-tab="contract"] .sm-contract-history {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eaeaea;
}

.sm-tab-panel[data-tab="contract"] .sm-contract-history h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.sm-tab-panel[data-tab="contract"] .sm-table-responsive {
    margin-top: 15px;
}

/* Modal Material Details */
.sm-material-details-modal {
    margin-top: 10px;
    padding: 12px;
    background-color: #f8f9fa;
    border-left: 3px solid #007cba;
    border-radius: 0 4px 4px 0;
}

.sm-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.sm-form-group-half {
    flex: 1;
}

.sm-legacy-info {
    margin-top: 8px;
    padding: 6px 8px;
    background-color: #fff3cd;
    border-left: 2px solid #ffc107;
    border-radius: 0 3px 3px 0;
    font-size: 12px;
    color: #856404;
}

.sm-legacy-info small {
    margin: 0;
}

/* Admin Material Details */
.sm-material-details-admin {
    margin-top: 10px;
    padding: 12px;
    background-color: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
}

.sm-material-details-admin .sm-form-group {
    margin-bottom: 10px;
}

.sm-material-details-admin label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 13px;
}

.sm-material-details-admin input,
.sm-material-details-admin textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.sm-material-details-admin input:focus,
.sm-material-details-admin textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px rgba(0, 124, 186, 0.2);
}

/* Responsive modal material fields */
@media (max-width: 782px) {
    .sm-form-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .sm-form-group-half {
        flex: none;
    }
}

/* Stand completion styles */
.sm-table tr.stand-completed {
    background-color: #f0f8f0 !important;
    border-left: 4px solid #4CAF50;
}

.sm-table tr.stand-completed td {
    color: #2e7d32;
    position: relative;
}

.sm-table tr.stand-completed::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(76, 175, 80, 0.05) 100%);
    pointer-events: none;
}

/* Checkbox per lo stato di completamento */
.sm-stand-completed-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transform: scale(1.2);
}

.sm-stand-completed-checkbox:checked {
    accent-color: #4CAF50;
}

.sm-stand-completed-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stili per la colonna "Pronto" */
.sm-table th:first-child {
    text-align: center;
    width: 70px;
    background-color: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

/* Animazione per il cambio di stato */
.sm-table tr {
    transition: all 0.3s ease;
}

.sm-table tr.stand-completed {
    animation: completedGlow 0.5s ease-out;
}

@keyframes completedGlow {
    0% {
        background-color: #fff;
        transform: scale(1);
    }
    50% {
        background-color: #e8f5e8;
        transform: scale(1.01);
    }
    100% {
        background-color: #f0f8f0;
        transform: scale(1);
    }
}