/* css/modules/rooms.css - Stili completi per il modulo camere avanzato */

/* ========== LAYOUT PRINCIPALE ========== */
.rooms-module {
    padding: 20px;
    background: #f5f7fa;
    min-height: 100vh;
}

/* Header aggiornato */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header-left h2 {
    margin: 0 0 8px 0;
    color: #2c5282;
    font-size: 28px;
    font-weight: 700;
}

.module-description {
    color: #718096;
    font-size: 14px;
    margin: 0;
}

.header-right {
    display: flex;
    gap: 10px;
}

/* ========== TABS NAVIGATION (AGGIORNATO) ========== */
.room-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
    background: white;
    padding: 20px 20px 0 20px;
    border-radius: 16px 16px 0 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #4a5568;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    background-color: #ebf4ff;
    color: #3182ce;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.tab-btn .nav-icon {
    font-size: 16px;
}

/* ========== TAB CONTENT (AGGIORNATO) ========== */
.room-tab-content {
    display: none;
    background: white;
    border-radius: 0 0 16px 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.room-tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== STATISTICHE (NUOVO) ========== */
.overview-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 25px;
    border-radius: 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-icon {
    font-size: 36px;
    opacity: 0.9;
}

.stat-content h3 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 800;
}

.stat-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
    font-weight: 500;
}

/* ========== TYPES SUMMARY (NUOVO) ========== */
.types-overview h3 {
    margin-bottom: 25px;
    color: #2d3748;
    font-size: 24px;
    font-weight: 700;
}

.types-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.type-summary-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-summary-card:hover {
    border-color: #4299e1;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.type-header h4 {
    margin: 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.type-code {
    background: #edf2f7;
    color: #4a5568;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.type-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.type-stat {
    text-align: center;
}

.type-stat .number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
}

.type-stat .label {
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-rooms-preview {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.room-preview {
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.room-preview.available {
    background: #c6f6d5;
    color: #22543d;
}

.room-preview.occupied {
    background: #fed7d7;
    color: #742a2a;
}

.room-preview.maintenance {
    background: #fbb6ce;
    color: #702459;
}

.room-preview.blocked {
    background: #e2e8f0;
    color: #4a5568;
}

.more-rooms {
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #718096;
    border: 1px dashed #cbd5e0;
}

/* ========== SECTION HEADERS (AGGIORNATO) ========== */
.section-header {
    margin-bottom: 20px;
}

.section-header h3 {
    margin: 0 0 8px 0;
    color: #2d3748;
    font-size: 24px;
    font-weight: 600;
}

.section-header p {
    margin: 0;
    color: #718096;
    font-size: 14px;
}

.section-title h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.room-count {
    color: #666;
    font-size: 14px;
    margin-top: 8px;
    display: block;
    font-weight: 500;
}

.section-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ========== ROOM TYPE EDITOR (NUOVO) ========== */
.types-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.types-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.room-type-editor {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.type-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-bottom: 2px solid #e2e8f0;
}

.type-basic-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.type-name-input {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
    min-width: 250px;
    transition: all 0.3s ease;
}

.type-name-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.1);
}

.type-code-display {
    color: #718096;
    font-size: 14px;
    font-weight: 600;
}

.type-code-display strong {
    color: #2d3748;
    font-family: 'Monaco', 'Consolas', monospace;
    background: #edf2f7;
    padding: 4px 8px;
    border-radius: 6px;
}

.type-actions {
    display: flex;
    gap: 8px;
}

.type-details {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.details-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.type-rooms-grid {
    padding: 20px;
}

.type-rooms-grid h4 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.room-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.room-card:hover {
    border-color: #4299e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.15);
}

.room-card.available {
    border-color: #48bb78;
    background: #f0fff4;
}

.room-card.occupied {
    border-color: #f56565;
    background: #fffafa;
}

.room-card.maintenance {
    border-color: #ed8936;
    background: #fefcf3;
}

.room-card.blocked {
    border-color: #a0aec0;
    background: #f7fafc;
}

.room-card .room-number {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.room-card .room-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
}

.room-card .room-floor {
    font-size: 11px;
    color: #718096;
    text-transform: uppercase;
}

.room-card .room-notes {
    font-size: 11px;
    color: #4a5568;
    font-style: italic;
}

.add-room-card {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #718096;
}

.add-room-card:hover {
    border-color: #4299e1;
    color: #4299e1;
    background: #ebf4ff;
}

.add-room-card .add-icon {
    font-size: 24px;
}

/* ========== FILTERS (AGGIORNATO) ========== */
.filters-container {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.filter-group select {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    background: white;
    font-size: 14px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-box input {
    padding: 12px 20px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    width: 100%;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #a0aec0;
}

/* ========== TABELLE (NUOVO) ========== */
.individual-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modern-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.modern-table thead {
    background: #f7fafc;
}

.modern-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #2d3748;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:hover {
    background-color: #f8fafc;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.available {
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.occupied {
    background: #fed7d7;
    color: #742a2a;
}

.status-badge.maintenance {
    background: #fbb6ce;
    color: #702459;
}

.status-badge.blocked {
    background: #e2e8f0;
    color: #4a5568;
}

/* ========== PLANNING (NUOVO) ========== */
.planning-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.planning-legend {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.planning-legend h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.legend-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.legend-item.available {
    background: #c6f6d5;
    color: #22543d;
}

.legend-item.occupied {
    background: #fed7d7;
    color: #742a2a;
}

.legend-item.maintenance {
    background: #fbb6ce;
    color: #702459;
}

.legend-item.blocked {
    background: #e2e8f0;
    color: #4a5568;
}

.planning-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.planning-type-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.planning-type-section .type-header {
    background: #f7fafc;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.planning-type-section .type-header h4 {
    margin: 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.room-count {
    background: #e2e8f0;
    color: #4a5568;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.rooms-planning-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.planning-room-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    position: relative;
}

.planning-room-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.15);
}

.planning-room-card.available {
    border-color: #48bb78;
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
}

.planning-room-card.occupied {
    border-color: #f56565;
    background: linear-gradient(135deg, #fffafa 0%, #fed7d7 100%);
}

.planning-room-card.maintenance {
    border-color: #ed8936;
    background: linear-gradient(135deg, #fefcf3 0%, #fbb6ce 100%);
}

.planning-room-card.blocked {
    border-color: #a0aec0;
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
}

.planning-room-card .room-number {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
}

.room-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.floor-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.1);
    color: #4a5568;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}

/* ========== BUTTONS (AGGIORNATO) ========== */
.btn {
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.4);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

/* ========== MODALS (AGGIORNATO) ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 3% auto;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.modal-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 22px;
    font-weight: 700;
}

.modal-close, .close {
    background: #edf2f7;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: auto;
    height: auto;
}

.modal-close:hover, .close:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 25px;
    border-top: 2px solid #e2e8f0;
    background: #f7fafc;
}

/* ========== FORMS (AGGIORNATO) ========== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.1);
}

.form-group textarea,
.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ========== LOADING STATE (NUOVO) ========== */
.loading-state {
    text-align: center;
    padding: 50px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== NOTIFICATIONS (AGGIORNATO) ========== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.4s ease;
    max-width: 400px;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.success, .notification-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.notification.error, .notification-error {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.notification.info, .notification-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.notification.warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.notification button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
}

/* ========== AMENITIES (MANTENUTO) ========== */
.room-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.amenity-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
}

.amenity-more {
    background: #e9ecef;
    color: #666;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
}

/* ========== ROOM DETAILS (MANTENUTO) ========== */
.room-card-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.room-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.detail-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.room-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.room-card-price {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
    text-align: right;
}

.room-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.room-card-code {
    font-size: 12px;
    color: #888;
    font-family: monospace;
}

.room-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .rooms-module {
        padding: 15px;
    }
    
    .module-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .room-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 15px;
    }
    
    .tab-btn {
        padding: 12px 18px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .room-tab-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .stat-icon {
        font-size: 28px;
    }
    
    .stat-content h3 {
        font-size: 24px;
    }
    
    .types-summary {
        grid-template-columns: 1fr;
    }
    
    .type-editor-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .type-basic-info {
        flex-direction: column;
        align-items: stretch;
    }
    
    .type-name-input {
        min-width: auto;
    }
    
    .type-actions {
        justify-content: center;
    }
    
    .form-row, .form-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modern-table {
        font-size: 12px;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 8px;
    }
    
    .rooms-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .rooms-planning-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }
    
    .planning-room-card {
        min-height: 50px;
        padding: 8px;
    }
    
    .planning-room-card .room-number {
        font-size: 14px;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .room-card-details {
        grid-template-columns: 1fr;
    }
    
    .room-card-actions {
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .type-stats {
        gap: 12px;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 8px;
    }
    
    .rooms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rooms-planning-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .modal,
    .btn,
    .type-actions,
    .header-right {
        display: none !important;
    }
    
    .rooms-module {
        max-width: none;
        padding: 0;
    }
    
    .room-tab-content {
        display: block !important;
    }
    
    .room-tabs {
        display: none;
    }
    
    .stat-card {
        background: #f7fafc !important;
        color: #2d3748 !important;
        border: 1px solid #e2e8f0;
    }
    
    .type-summary-card,
    .room-type-editor,
    .planning-type-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles per accessibilità */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* Supporto contrasto alto */
@media (prefers-contrast: high) {
    .stat-card {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff;
    }
    
    .btn-primary {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff;
    }
    
    .room-card,
    .planning-room-card {
        border-width: 3px;
    }
}

/*  CSS per i Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}
