/* Global Styles - Mobile First */
:root {
    --primary: #2196F3;
    --primary-dark: #1976D2;
    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #F44336;
    --info: #2196F3;
    --dark: #333;
    --light: #f5f5f5;
    --white: #fff;
    --gray: #666;
    --border: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    padding-bottom: 70px;
}

/* Header */
.app-header {
    background: var(--primary);
    color: var(--white);
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.app-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-size: 0.9rem;
}

.btn-logout {
    color: var(--white);
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid var(--white);
    border-radius: var(--radius);
    font-size: 0.8rem;
}

/* Main Content */
.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray);
    font-size: 0.75rem;
    padding: 5px 10px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    transition: background 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.85rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.alert-error {
    background: #ffebee;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-success {
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid var(--success);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h1 {
    font-size: 1.5rem;
    color: var(--dark);
}

.breadcrumb {
    width: 100%;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Sections */
.section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 1.2rem;
}

/* Apartments Grid */
.apartments-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.apartment-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
}

.apartment-photo {
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #e0e0e0;
}

.apartment-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.apartment-info {
    padding: 10px;
}

.apartment-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.apartment-info p {
    font-size: 0.85rem;
    color: var(--gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Apartments List */
.apartments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.apartment-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.apartment-link {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.apartment-thumb {
    width: 80px;
    height: 80px;
    background-size: cover;
    background-position: center;
    background-color: #e0e0e0;
    flex-shrink: 0;
}

.apartment-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.apartment-details {
    padding: 10px;
    flex: 1;
}

.apartment-details h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.apartment-details p {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.apartment-actions {
    display: flex;
    gap: 5px;
    padding: 10px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #e8f5e9;
    color: var(--success);
}

.badge-warning {
    background: #fff8e1;
    color: #f57c00;
}

.badge-danger {
    background: #ffebee;
    color: var(--danger);
}

.badge-info {
    background: #e3f2fd;
    color: var(--info);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* Apartment Detail */
.apartment-detail .apartment-header {
    position: relative;
    margin: -15px -15px 20px;
}

.apartment-hero {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.apartment-title {
    padding: 15px;
    background: var(--white);
}

.apartment-title h1 {
    font-size: 1.5rem;
}

.apartment-title p {
    color: var(--gray);
}

.apartment-actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Notifications Section */
.notifications-section {
    background: #fff8e1;
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 4px solid var(--warning);
}

.notifications-section h3 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.notification-item {
    padding: 10px;
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.notification-item.unread {
    border-left: 3px solid var(--primary);
}

.notification-item strong {
    display: block;
    margin-bottom: 5px;
}

.notification-item p {
    font-size: 0.9rem;
    color: var(--gray);
}

.notification-item small {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Reservations */
.reservations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reservation-card {
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.reservation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reservation-header h4 {
    font-size: 1rem;
}

.reservation-dates {
    color: var(--gray);
    margin-bottom: 10px;
}

.reservation-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* Activities */
.activity-form {
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.activity-form .form-row {
    margin-bottom: 10px;
}

.activity-form select,
.activity-form input,
.activity-form textarea {
    flex: 1;
}

/* Modern Activities Form */
.activities-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid #dee2e6;
}

/* Collapsible Activity Form */
.activity-form-collapsible {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 25px;
    overflow: hidden;
}

.activity-form-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.activity-form-toggle:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1565C0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.toggle-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-icon {
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.toggle-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.toggle-hint {
    font-size: 0.85rem;
    opacity: 0.9;
    font-style: italic;
}

.activity-form-modern {
    background: var(--white);
    padding: 25px;
    border-radius: 0 0 12px 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-form-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.activity-form-header h3 {
    color: var(--dark);
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.activity-form-header p {
    color: var(--gray);
    font-size: 0.95rem;
    margin: 0;
}

.activity-form-modern .form-group {
    margin-bottom: 20px;
}

.activity-form-modern .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.activity-form-modern .form-group input,
.activity-form-modern .form-group textarea,
.activity-form-modern .form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.activity-form-modern .form-group input:focus,
.activity-form-modern .form-group textarea:focus,
.activity-form-modern .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
}

.activity-form-modern .form-group input::placeholder,
.activity-form-modern .form-group textarea::placeholder {
    color: #adb5bd;
}

/* File Upload Styling */
.file-upload-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.file-upload-group:hover {
    border-color: var(--primary);
    background: #e3f2fd;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--primary);
    width: 100%;
}

.file-input-label:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.file-icon {
    font-size: 1.3rem;
}

.file-text {
    font-size: 1rem;
}

.file-help {
    display: block;
    margin-top: 10px;
    color: var(--gray);
    font-size: 0.85rem;
    text-align: center;
}

/* Submit Button Enhancement */
.activity-form-modern .form-actions {
    margin-top: 25px;
}

.activity-form-modern .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 16px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.activity-form-modern .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.activity-form-modern .btn-primary span {
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .activity-form-modern {
        padding: 20px 15px;
    }
    
    .activity-form-header h3 {
        font-size: 1.1rem;
    }
    
    .file-input-label {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .activity-form-toggle {
        padding: 15px 20px;
    }
    
    .toggle-text {
        font-size: 1rem;
    }
    
    .toggle-hint {
        display: none;
    }
}


.activities-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-card {
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 15px;
}

.activity-type-icon {
    font-size: 1.5rem;
}

.activity-content h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.activity-content p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.activity-content small {
    font-size: 0.8rem;
    color: var(--gray);
}

.file-link {
    color: var(--primary);
    text-decoration: none;
    margin-right: 10px;
}

/* Calendar */
.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-navigation h2 {
    font-size: 1.2rem;
}

.calendar {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 10px 0;
    font-weight: 500;
    font-size: 0.85rem;
    /* Ensure header cells have equal width */
    width: 100%;
}

.calendar-header > div {
    /* Ensure each header cell takes equal space */
    width: 100%;
    min-width: 0;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* Prevent cells from stretching horizontally, only stretch vertically */
    align-items: start;
}

.calendar-day {
    min-height: 90px;
    border: 1px solid var(--border);
    padding: 5px;
    font-size: 0.85rem;
    /* Ensure cells maintain equal width */
    width: 100%;
    min-width: 0;
    /* Allow content to flow naturally vertically */
    height: auto;
}

.calendar-day.empty {
    background: #f5f5f5;
}

.calendar-day.today {
    background: #e3f2fd;
}

.calendar-day.today .day-number {
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-number {
    font-weight: 500;
    display: block;
}

.reservation-indicator {
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 4px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* Ensure reservation indicators don't stretch cell width */
    display: block;
    width: 100%;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.legend-item .badge {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    padding: 0;
}

.reservations-list-section {
    margin-top: 20px;
}

.reservation-card-mini {
    background: var(--white);
    padding: 10px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Notifications Page */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-card {
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 15px;
}

.notification-card.unread {
    border-left: 4px solid var(--primary);
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.notification-content p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.notification-meta {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--gray);
}

.apartment-name {
    font-weight: 500;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Share Page */
.share-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.share-card h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.share-detail {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.share-detail .label {
    color: var(--gray);
}

.share-detail .value {
    font-weight: 500;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    color: var(--white);
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.email {
    background: var(--primary);
}

.share-btn.copy {
    background: var(--gray);
}

.share-btn.sms {
    background: #9C27B0;
}

.share-icon {
    font-size: 1.2rem;
}

.share-text-preview {
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.share-text-preview h3 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.share-text-preview pre {
    white-space: pre-wrap;
    font-size: 0.9rem;
    background: #f5f5f5;
    padding: 10px;
    border-radius: var(--radius);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-container {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray);
}

.login-form {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    color: var(--gray);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Current Photo/File Display */
.current-photo,
.current-file {
    margin-bottom: 10px;
}

.current-photo img {
    max-width: 150px;
    border-radius: var(--radius);
}

/* Form */
.form {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form h3 {
    margin: 20px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.form h3:first-child {
    margin-top: 0;
}

/* Responsive */
@media (min-width: 768px) {
    .apartments-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .share-options {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .apartments-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Map Styles */
.map-container {
    width: 100%;
    height: 300px;
    border-radius: var(--radius);
    margin-top: 10px;
    box-shadow: var(--shadow);
}

.map-section {
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.location-inputs {
    margin-bottom: 10px;
}

.coord-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.coord-inputs input {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.coord-inputs button {
    white-space: nowrap;
}

@media (min-width: 768px) {
    .map-container {
        height: 400px;
    }
}

/* Incidents Section Styles */
.incidents-section {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid #ffcc80;
    margin-top: 20px;
}

.incidents-section h3 {
    color: #e65100;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.incident-card {
    background: var(--white);
    border-left: 4px solid #ff9800;
}

.incident-card .activity-type-icon {
    color: #e65100;
}

.incident-files {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: var(--radius);
}

.incident-files small {
    display: block;
    margin-bottom: 5px;
    color: var(--dark);
}

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-list .file-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.file-list .file-link:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Selected files display */
.selected-files {
    margin-top: 10px;
}

.selected-files ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.selected-files li {
    padding: 5px 10px;
    background: #e3f2fd;
    border-radius: var(--radius);
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-files li::before {
    content: "📄";
}

/* Incidents section toggle - override colors */
.incidents-section .activity-form-toggle {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.incidents-section .activity-form-toggle:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

/* User Profile & Admin Styles */
.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-profile,
.btn-admin,
.btn-logout {
    color: var(--white);
    text-decoration: none;
    padding: 6px 10px;
    border: 1px solid var(--white);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-profile:hover,
.btn-admin:hover,
.btn-logout:hover {
    background: var(--white);
    color: var(--primary);
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card Styles */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.card-body {
    padding: 20px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.9rem;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Form Select */
.form-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--white);
    cursor: pointer;
}

/* Inline Form */
.inline-form {
    display: inline;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-info {
    background: var(--info);
    color: var(--white);
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 0;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.close {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.8;
}

.modal form {
    padding: 20px;
}

/* Form text helper */
.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--gray);
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--gray);
}

/* Checkbox Label Styling */
.checkbox-label {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    border: 2px solid #2196F3;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.checkbox-label span {
    font-size: 1rem;
    font-weight: 500;
    color: #1976D2;
}

.text-success {
    color: var(--success);
}

/* Page Header */
.page-header {
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.page-header p {
    color: var(--gray);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Admin Panel Enhancements */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Enhanced Table Styles for Admin */
.data-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: var(--dark);
}

.data-table td {
    vertical-align: middle;
}

.data-table tr {
    transition: background-color 0.2s ease;
}

/* Role Select Styling */
.form-select option {
    padding: 8px;
}

/* Status Button Enhancements */
.btn-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
    border: none;
}

.btn-success:hover, .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Action Buttons Compact */
.action-buttons .btn-sm {
    border-radius: 6px;
    transition: all 0.2s ease;
}

.action-buttons .btn-sm:hover {
    transform: scale(1.05);
}

/* Card Header Enhancement */
.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid var(--primary);
}

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Page Header Enhancement */
.page-header {
    background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
}

/* Responsive table */
@media (max-width: 768px) {
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px;
    }
    
    .data-table th {
        font-size: 0.75rem;
    }
    
    .action-buttons {
        flex-direction: row;
        gap: 3px;
    }
    
    .action-buttons .btn-sm {
        padding: 4px 6px;
        font-size: 0.75rem;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 1.2rem;
    }
}

/* ==================== APARTMENT GALLERY STYLES ==================== */

/* Gallery Section */
.gallery-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid #dee2e6;
    margin-bottom: 30px;
}

.gallery-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--dark);
    font-size: 1.3rem;
}

/* Gallery Upload Form */
.gallery-upload-form {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 25px;
    overflow: hidden;
}

.gallery-upload-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.gallery-upload-toggle:hover {
    background: linear-gradient(135deg, #7B1FA2 0%, #6A1B9A 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.gallery-upload-form .toggle-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-upload-form .toggle-icon {
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.gallery-upload-form .toggle-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.gallery-upload-form .toggle-hint {
    font-size: 0.85rem;
    opacity: 0.9;
    font-style: italic;
}

.gallery-upload-content {
    background: var(--white);
    padding: 25px;
    border-radius: 0 0 12px 12px;
    animation: slideDown 0.3s ease-out;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Gallery Item */
.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    background: #e0e0e0;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Gallery Item Overlay */
.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-caption {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 8px;
}

.gallery-item-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.gallery-item-actions .btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.9);
    color: var(--dark);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-item-actions .btn-small:hover {
    background: var(--white);
    transform: scale(1.1);
}

.gallery-item-actions .btn-danger {
    background: rgba(244, 67, 54, 0.9);
    color: var(--white);
}

.gallery-item-actions .btn-danger:hover {
    background: var(--danger);
}

/* Empty Gallery State */
.gallery-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.gallery-empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.gallery-empty h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--white);
    font-size: 1.1rem;
    padding: 15px;
    background: rgba(0,0,0,0.5);
    border-radius: 0 0 8px 8px;
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Lightbox Close */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 2001;
}

.lightbox-close:hover {
    background: rgba(244, 67, 54, 0.8);
    transform: scale(1.1);
}

/* Lightbox Counter */
.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* Multiple File Upload Preview */
.file-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.file-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: var(--white);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.file-preview-remove:hover {
    transform: scale(1.1);
}

/* Gallery Responsive */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        top: 10px;
        right: 10px;
    }
    
    .gallery-upload-toggle {
        padding: 15px 20px;
    }
    
    .gallery-upload-form .toggle-text {
        font-size: 1rem;
    }
    
    .gallery-upload-form .toggle-hint {
        display: none;
    }
}

/* ==================== APARTMENT DETAIL - AUDIT & RESERVATION STYLES ==================== */

/* Audit Info Bar */
.audit-info-bar {
    background: #e3f2fd;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-left: 4px solid #2196F3;
}

.audit-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.audit-label {
    font-weight: 600;
    color: #1976d2;
    font-size: 0.9rem;
}

.audit-value {
    color: #333;
    font-size: 0.9rem;
}

.audit-value small {
    color: #666;
    margin-left: 5px;
}

/* Reservation Meta */
.reservation-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    color: #666;
    font-size: 0.85rem;
}

.reservation-creator {
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 4px;
    color: #1976d2;
}

/* Gallery Uploader */
.gallery-item-uploader {
    color: #fff;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Activity Meta */
.activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.activity-creator {
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 4px;
    color: #1976d2;
}

/* Audit Log Section */
.audit-log-section {
    background: #f8f9fa;
}

.audit-log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audit-log-item {
    display: flex;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.audit-log-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3f2fd;
    border-radius: 50%;
    flex-shrink: 0;
}

.audit-log-content {
    flex: 1;
}

.audit-log-header {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.audit-log-action {
    font-weight: 600;
    color: #2196F3;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.audit-log-entity {
    color: #666;
    font-size: 0.85rem;
}

.audit-log-details {
    color: #333;
    margin: 5px 0;
    font-size: 0.95rem;
}

.audit-log-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.audit-log-meta small {
    color: #888;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .audit-info-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .audit-log-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .audit-log-icon {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}

/* ==================== APARTMENTS LIST STYLES ==================== */

.apartment-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.apartment-owner {
    margin-top: 8px;
    color: #666;
    font-size: 0.85rem;
}

.apartment-owner small {
    background: #e3f2fd;
    padding: 3px 8px;
    border-radius: 4px;
    color: #1976d2;
}

/* ==================== RESERVATIONS ADMIN STYLES ==================== */

.filters-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.reservations-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.summary-card {
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 120px;
}

.summary-card.confirmed {
    border-left: 4px solid #28a745;
}

.summary-card.pending {
    border-left: 4px solid #ffc107;
}

.summary-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.summary-label {
    font-size: 0.85rem;
    color: #666;
}

.reservations-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reservations-table th,
.reservations-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.reservations-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.reservations-table tr:hover {
    background: #f8f9fa;
}

.owner-info {
    display: block;
    color: #888;
    font-size: 0.8rem;
    margin-top: 2px;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #1976d2;
}

.actions {
    display: flex;
    gap: 5px;
}

.actions .btn {
    padding: 6px 10px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-actions {
        margin-left: 0;
        justify-content: stretch;
    }
    
    .reservations-summary {
        justify-content: center;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
}

/* ==================== DASHBOARD CALENDAR STYLES ==================== */

.dashboard-calendar {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.dashboard-calendar .calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-calendar .calendar-navigation h3 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--dark);
}

.dashboard-calendar .calendar {
    box-shadow: none;
}

.dashboard-calendar .calendar-header {
    /* Ensure header cells have equal width */
    width: 100%;
}

.dashboard-calendar .calendar-header > div {
    /* Ensure each header cell takes equal space */
    width: 100%;
    min-width: 0;
}

.dashboard-calendar .calendar-body {
    /* Prevent cells from stretching horizontally, only stretch vertically */
    align-items: start;
}

.dashboard-calendar .calendar-day {
    min-height: 100px;
    /* Ensure cells maintain equal width */
    width: 100%;
    min-width: 0;
    /* Allow content to flow naturally vertically */
    height: auto;
}

.dashboard-calendar .calendar-day.weekend {
    background: #fff3e0;
}

.dashboard-calendar .calendar-day.holiday {
    background: #ffebee;
    border-color: #f44336;
}

.dashboard-calendar .holiday-label {
    display: block;
    font-size: 0.65rem;
    color: #d32f2f;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
}

.dashboard-calendar .calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    justify-content: center;
}

.dashboard-calendar .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--gray);
}

.dashboard-calendar .legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

.dashboard-calendar .legend-color.badge-success {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
}

.dashboard-calendar .legend-color.badge-warning {
    background: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
}

.dashboard-calendar .legend-color.badge-danger {
    background: linear-gradient(135deg, #F44336 0%, #D32F2F 100%);
}

.dashboard-calendar .legend-color.badge-info {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.dashboard-calendar .legend-color.legend-weekend {
    background: #ffe0b2;
}

.dashboard-calendar .legend-color.legend-holiday {
    background: #ffcdd2;
}

.dashboard-calendar .reservation-indicator {
    font-size: 0.65rem;
    padding: 2px 4px;
    margin-top: 2px;
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.dashboard-calendar .day-number {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Responsive dashboard calendar */
@media (max-width: 768px) {
    .dashboard-calendar .calendar-day {
        min-height: 60px;
        padding: 3px;
    }
    
    .dashboard-calendar .day-number {
        font-size: 0.75rem;
    }
    
    .dashboard-calendar .reservation-indicator {
        font-size: 0.55rem;
        padding: 1px 2px;
    }
    
    .dashboard-calendar .holiday-label {
        font-size: 0.55rem;
    }
    
    .dashboard-calendar .calendar-legend {
        gap: 10px;
    }
    
    .dashboard-calendar .legend-item {
        font-size: 0.7rem;
    }
}
