/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow-x: hidden;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.6s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #2E7D32;
    margin-bottom: 10px;
}

.login-header h1 {
    color: #2E7D32;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

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

.form-group input {
    width: 100%;
    padding: 12px 40px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #2E7D32;
}

.form-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(46, 125, 50, 0.3);
}

.error-message {
    color: #f44336;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    background: #ffebee;
    display: none;
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-areas:
        "header header"
        "sidebar main";
    grid-template-rows: 70px 1fr;
    grid-template-columns: 250px 1fr;
    height: 100vh;
    background: #f5f7fa;
}

/* Header */
.dashboard-header {
    grid-area: header;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left i {
    font-size: 1.8rem;
    color: #2E7D32;
}

.header-left h1 {
    font-size: 1.5rem;
    color: #2E7D32;
}

.library-name {
    background: #e8f5e8;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #2E7D32;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #f5f5f5;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background: #2c3e50;
    overflow-y: auto;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #bdc3c7;
    cursor: pointer;
    transition: all 0.3s;
    gap: 15px;
}

.nav-item:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.nav-item.active {
    background: linear-gradient(90deg, #3498db, #2980b9);
    color: white;
    border-right: 4px solid #3498db;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
}

/* Main Content */
.main-content {
    grid-area: main;
    overflow-y: auto;
    padding: 30px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
}

.page-actions {
    margin-left: auto;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.users {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.stat-icon.present {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.stat-icon.events {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.stat-icon.occupancy {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

.stat-content p {
    color: #7f8c8d;
    margin-bottom: 3px;
}

.stat-content small {
    color: #95a5a6;
    font-size: 0.8rem;
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    height: 350px;
    display: flex;
    flex-direction: column;
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    flex-shrink: 0;
}

.chart-container canvas {
    flex: 1;
    height: 250px !important;
    max-height: 250px;
}

/* Recent Activity */
.recent-activity {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

.recent-activity h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.activities-list {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
}

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

.activity-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
}

.activity-icon.user {
    background: #3498db;
}

.activity-icon.event {
    background: #f39c12;
}

.activity-icon.scan {
    background: #27ae60;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin-bottom: 3px;
    color: #2c3e50;
}

.activity-content small {
    color: #7f8c8d;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.toast {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    border-left: 4px solid #27ae60;
    animation: slideInRight 0.3s ease-out;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.warning {
    border-left-color: #f39c12;
}

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

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        grid-template-areas:
            "header"
            "main";
        grid-template-columns: 1fr;
        grid-template-rows: 70px 1fr;
    }

    .sidebar {
        position: fixed;
        left: -250px;
        top: 70px;
        height: calc(100vh - 70px);
        z-index: 200;
        transition: left 0.3s;
    }

    .sidebar.open {
        left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }
}

/* Tables */
.data-table {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

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

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

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

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Modal */
.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;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #7f8c8d;
    cursor: pointer;
}

.modal-close:hover {
    color: #2c3e50;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

/* Button Icons */
.btn-icon {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-icon.primary {
    background: #3498db;
    color: white;
}

.btn-icon.primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-icon.success {
    background: #27ae60;
    color: white;
}

.btn-icon.success:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.btn-icon.warning {
    background: #f39c12;
    color: white;
}

.btn-icon.warning:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.btn-icon.danger {
    background: #e74c3c;
    color: white;
}

.btn-icon.danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* User Details Styling */
.user-details .user-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
}

.user-details .info-card {
    transition: transform 0.2s;
}

.user-details .info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-section {
    border-left: 4px solid #3498db;
}

.form-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Room Management Styles */
.room-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.layout-templates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.layout-option {
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.layout-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.layout-option.selected {
    border-color: #27ae60;
    background: #d5f4e6;
}

.layout-option i {
    font-size: 24px;
    color: #666;
    width: 30px;
    text-align: center;
}

.layout-option strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.layout-option small {
    color: #666;
    font-size: 12px;
    line-height: 1.3;
}

/* Room Details Modal */
.room-details {
    max-width: 100%;
}

.room-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.room-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.room-info h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 24px;
}

.room-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.room-status {
    margin-left: auto;
}

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

.room-stat {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.room-stat .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.room-stat .stat-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.room-occupancy {
    margin-bottom: 30px;
}

.room-occupancy h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.occupancy-bar {
    height: 12px;
    background: #ecf0f1;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.occupancy-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s;
}

.occupancy-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #7f8c8d;
}

.seat-layout-section {
    margin-bottom: 30px;
}

.seat-layout-section h4 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.seat-layout-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
}

.seat-grid {
    min-width: 300px;
    margin-bottom: 20px;
}

.seat {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.seat.available {
    background: #27ae60;
}

.seat.available:hover {
    background: #219a52;
    transform: scale(1.1);
}

.seat.occupied {
    background: #e74c3c;
    cursor: not-allowed;
}

.seat.desk {
    border-radius: 2px;
}

.seat.theater_seat {
    border-radius: 50%;
}

.seat.table_seat {
    border-radius: 50%;
    border: 2px solid #fff;
}

.seat.lab_bench {
    border-radius: 2px;
    border: 1px solid #fff;
}

.seat.reading_chair {
    border-radius: 8px;
    width: 35px;
    height: 35px;
}

.seat-empty {
    width: 30px;
    height: 30px;
}

.seat-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.legend-item .seat {
    width: 20px;
    height: 20px;
    font-size: 0;
    cursor: default;
}

.no-seats {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.room-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.meta-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.meta-item strong {
    color: #2c3e50;
    margin-right: 8px;
}

/* Responsive adjustments for room management */
@media (max-width: 768px) {
    .room-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .room-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .room-stat {
        padding: 15px;
    }

    .seat-layout-container {
        padding: 15px;
    }

    .seat-legend {
        flex-direction: column;
        gap: 10px;
    }

    .room-meta {
        grid-template-columns: 1fr;
    }
}

/* Event Management Styles */
.event-form .form-section {
    margin-bottom: 30px;
}

.event-form .form-section h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

#recurring-options {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #3498db;
}

/* Event Details Modal */
.event-details {
    max-width: 100%;
}

.event-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.event-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.event-info h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 24px;
}

.event-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.4;
}

.event-status {
    margin-left: auto;
}

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

.detail-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.2s;
}

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

.detail-card i {
    font-size: 20px;
    color: #3498db;
    width: 24px;
    text-align: center;
}

.detail-card strong {
    display: block;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 5px;
}

.detail-card span {
    color: #666;
    font-size: 14px;
}

.organizer-info, .attendees-section, .event-tags {
    margin-bottom: 30px;
}

.organizer-info h4, .attendees-section h4, .event-tags h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.organizer-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
}

.organizer-details p {
    margin: 5px 0;
    color: #666;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #3498db;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.attendees-list {
    max-height: 300px;
    overflow-y: auto;
}

.attendee-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ecf0f1;
}

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

.attendee-info strong {
    display: block;
    color: #2c3e50;
}

.attendee-info small {
    color: #7f8c8d;
    font-size: 12px;
}

.attendee-details .badge {
    background: #27ae60;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.no-attendees {
    text-align: center;
    padding: 40px;
    color: #999;
}

.no-attendees i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.event-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.event-meta .meta-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.event-meta .meta-item strong {
    color: #2c3e50;
    margin-right: 8px;
}

/* Calendar view styles */
#calendar-view {
    background: #fff;
    border-radius: 10px;
    margin-top: 15px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 10px;
}

.calendar-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
}

.calendar-header-day {
    background: #3498db;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
}

.calendar-day-events {
    margin-top: 5px;
}

.calendar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.event-count {
    color: #666;
    font-size: 14px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ecf0f1;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day {
    background: #fff;
    padding: 10px;
    min-height: 80px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.today {
    background: #e8f5e8;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #999;
}

.calendar-day-number {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.calendar-event {
    background: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-bottom: 2px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.calendar-event.gaming { background: #e74c3c; }
.calendar-event.reading { background: #3498db; }
.calendar-event.workshop { background: #f39c12; }
.calendar-event.conference { background: #9b59b6; }

/* Responsive adjustments for events */
@media (max-width: 768px) {
    .event-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .event-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .detail-card {
        padding: 15px;
    }

    .tags-list {
        justify-content: center;
    }

    .event-meta {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        font-size: 12px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 5px;
    }

    .attendee-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Invite Codes Specific Styles */
.invite-codes-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.filters-bar {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filters-bar select {
    min-width: 200px;
}

.invite-code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #dee2e6;
    color: #495057;
    font-weight: 600;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active,
.status-badge.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.inactive,
.status-badge.danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.usage-info {
    font-weight: 600;
    color: #495057;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-buttons .btn {
    padding: 6px 8px;
    min-width: auto;
}

/* Invite Code Generation Modal */
.invite-code-result {
    text-align: center;
}

.code-display {
    margin-bottom: 25px;
}

.code-box {
    background: #f8f9fa;
    border: 2px dashed #6c757d;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.code-box code {
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    letter-spacing: 2px;
}

.code-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.code-details p {
    margin: 8px 0;
    color: #495057;
}

.share-options {
    margin-top: 25px;
    text-align: center;
}

.share-options h5 {
    margin-bottom: 15px;
    color: #495057;
}

.share-options .btn {
    margin: 5px;
    min-width: 120px;
}

/* Invite Code Details Modal */
.invite-details {
    max-width: 600px;
}

.detail-section {
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.detail-section h5 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-weight: 600;
    color: #6c757d;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span,
.detail-item code {
    color: #495057;
    font-size: 14px;
}

.usage-history {
    max-height: 200px;
    overflow-y: auto;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 4px solid #007bff;
}

.usage-user strong {
    color: #495057;
    display: block;
}

.usage-user small {
    color: #6c757d;
    font-size: 12px;
}

.usage-date {
    color: #6c757d;
    font-size: 13px;
    white-space: nowrap;
}

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

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Empty state improvements for invite codes */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

.empty-state p {
    margin-bottom: 25px;
    color: #6c757d;
}

/* Error state for invite codes */
.error-state {
    padding: 40px 20px;
    text-align: center;
    color: #dc3545;
}

.error-state i {
    color: #dc3545;
    margin-bottom: 15px;
}

.error-state h3 {
    color: #721c24;
    margin-bottom: 10px;
}

.error-state p {
    color: #856404;
    margin-bottom: 20px;
}

/* Responsive adjustments for invite codes */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .usage-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-bar select {
        min-width: auto;
        width: 100%;
    }

    .code-box {
        flex-direction: column;
        gap: 10px;
    }

    .code-box code {
        font-size: 18px;
        word-break: break-all;
    }
}
/* Interactive Layout Cards - New Visuals */
.layout-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.layout-card {
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.layout-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.layout-card.selected {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.layout-card.selected::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 4px solid white;
    border-radius: 15px;
    pointer-events: none;
}

.layout-card-header {
    padding: 20px;
    text-align: center;
    color: white;
}

.layout-icon-big {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    backdrop-filter: blur(10px);
}

.layout-card-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.layout-card-preview {
    background: rgba(255,255,255,0.95);
    padding: 25px 20px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layout-card-info {
    padding: 20px;
    background: rgba(255,255,255,0.9);
    color: #333;
}

.layout-description {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.layout-capacity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.layout-capacity i {
    color: #888;
}

.layout-card-check {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.layout-card.selected .layout-card-check {
    opacity: 1;
    transform: scale(1);
}

.layout-card-check i {
    color: #27ae60;
    font-size: 20px;
}

/* Layout Preview Styles */
.layout-preview {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.classroom-preview .preview-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: center;
}

.preview-seat {
    width: 20px;
    height: 20px;
    background: #27ae60;
    border-radius: 3px;
    animation: float 2s ease-in-out infinite;
}

.preview-seat:nth-child(1) { animation-delay: 0s; }
.preview-seat:nth-child(2) { animation-delay: 0.2s; }
.preview-seat:nth-child(3) { animation-delay: 0.4s; }
.preview-seat:nth-child(4) { animation-delay: 0.6s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.roundtables-preview {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.preview-table {
    position: relative;
    width: 60px;
    height: 60px;
    background: rgba(52, 152, 219, 0.15);
    border-radius: 50%;
    border: 2px dashed #3498db;
}

.roundtables-preview .preview-seat {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3498db;
}

.ushape-preview {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.preview-u-left, .preview-u-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.preview-u-bottom {
    display: flex;
    gap: 5px;
    margin: 5px 0;
}

.ushape-preview .preview-seat {
    background: #f39c12;
}

.theater-preview {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.theater-preview .preview-row {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.theater-preview .preview-seat {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #9b59b6;
}

.lab-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preview-bench {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.lab-preview .preview-seat {
    background: #e74c3c;
    border-radius: 2px;
}

.reading-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.preview-corner {
    background: rgba(26, 188, 156, 0.2);
    border-radius: 8px;
    width: 45px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1abc9c;
    font-size: 18px;
}

/* Responsive for layout cards */
@media (max-width: 768px) {
    .layout-templates-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .layout-card {
        max-width: 100%;
    }

    .layout-card-preview {
        padding: 20px 15px;
        min-height: 100px;
    }
}

@media (max-width: 480px) {
    .layout-icon-big {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .layout-card-header h4 {
        font-size: 16px;
    }

    .preview-seat {
        width: 16px;
        height: 16px;
    }
}
