* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    --info-gradient: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    --dark-gradient: linear-gradient(135deg, #434343 0%, #000000 100%);
    --sidebar-bg: linear-gradient(180deg, #1e1e2e 0%, #16213e 100%);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    transition: var(--transition);
    min-height: 100vh;
}

/* Dark theme overrides */
body.theme-dark {
    --glass-bg: rgba(15, 23, 42, 0.96);
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    background: radial-gradient(circle at top, #020617 0%, #020617 25%, #0b1120 55%, #020617 100%);
}

body.theme-dark .sidebar {
    background: linear-gradient(180deg, #020617 0%, #0b1120 100%);
}

body[dir="rtl"] {
    font-family: 'Inter', 'Segoe UI', 'Arial', 'Tahoma', sans-serif;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    left: 0;
    top: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    transition: var(--transition);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

body[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-header {
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sidebar-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 4px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
    position: relative;
    font-weight: 500;
    font-size: 14px;
    gap: 12px;
}

.sidebar-nav a span {
    flex: 1;
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 0 4px 4px 0;
    transition: var(--transition);
}

body[dir="rtl"] .sidebar-nav a::before {
    left: auto;
    right: 0;
    border-radius: 4px 0 0 4px;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(4px);
}

body[dir="rtl"] .sidebar-nav a:hover {
    transform: translateX(-4px);
}

.sidebar-nav li.active a {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.sidebar-nav li.active a::before {
    height: 60%;
}

.sidebar-nav i:not(.chevron-icon):not(.fa-chevron-right) {
    margin-right: 12px;
    width: 20px;
    font-size: 16px;
    flex-shrink: 0;
}

body[dir="rtl"] .sidebar-nav i:not(.chevron-icon):not(.fa-chevron-right) {
    margin-right: 0;
    margin-left: 12px;
}

.sidebar-nav .fa-chevron-right,
.sidebar-nav .chevron-icon {
    margin-right: 0;
    margin-left: auto;
    font-size: 11px;
    opacity: 0.6;
}

body[dir="rtl"] .sidebar-nav .fa-chevron-right,
body[dir="rtl"] .sidebar-nav .chevron-icon {
    margin-left: 0;
    margin-right: auto;
    transform: scaleX(-1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 32px;
    background: transparent;
}

body[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: 280px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 20px 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: white;
    color: #667eea;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-right: 12px;
    font-size: 18px;
}

.mobile-menu-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.4);
}

.header-left {
    display: flex;
    align-items: center;
}

.header:hover {
    box-shadow: var(--card-shadow-hover);
}

.header-left h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-logout {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
    min-height: 40px;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-logout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-logout:hover::before {
    left: 100%;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.35);
}

.btn-logout:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.btn-logout i {
    font-size: 15px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-logout:hover i {
    transform: translateX(2px);
}

.btn-logout span {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.language-select {
    padding: 10px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--border-radius-sm);
    background: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.language-select:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.language-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
}

/* Profile modal */
.profile-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.profile-modal {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    padding: 22px 22px 18px;
}

.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.profile-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-modal-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
}

.profile-modal-body {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.profile-modal-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(102, 126, 234, 0.4);
}

.profile-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-modal-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-modal-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-modal-email {
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-modal-role {
    font-size: 12px;
    color: #4f46e5;
    font-weight: 500;
}

.profile-modal-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin: 8px 0 4px;
}

.profile-modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 6px 0;
}

.profile-modal-row span:first-child {
    color: var(--text-secondary);
}

.profile-modal-row span:last-child {
    font-weight: 500;
    color: var(--text-primary);
}

.profile-inline-button {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.profile-inline-button i {
    font-size: 11px;
    color: var(--text-secondary);
}

.profile-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.btn-profile-secondary {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: #ffffff;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
}

.btn-profile-primary {
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
}

.user-profile:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-profile span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.metric-card:hover::before {
    transform: scaleX(1);
}

.metric-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.metric-card:hover .metric-icon {
    transform: scale(1.1) rotate(5deg);
}

.metric-card.blue .metric-icon {
    background: var(--success-gradient);
}

.metric-card.yellow .metric-icon {
    background: var(--warning-gradient);
}

.metric-card.green .metric-icon {
    background: var(--success-gradient);
}

.metric-card.red .metric-icon {
    background: var(--danger-gradient);
}

.metric-card.teal .metric-icon {
    background: var(--info-gradient);
}

.metric-card.dark-gray .metric-icon {
    background: var(--dark-gradient);
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.metric-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart Section */
.chart-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 36px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.chart-section:hover {
    box-shadow: var(--card-shadow-hover);
}

.chart-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 12px;
}

.chart-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Dashboard Alerts */
.alerts-section {
    margin-top: 0;
}

.alerts-summary {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.alert-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.alert-chip i {
    font-size: 12px;
}

.alert-chip span:first-of-type {
    font-weight: 700;
}

.alert-chip.overdue {
    background: rgba(239, 68, 68, 0.06);
    color: #b91c1c;
    border: 1px solid rgba(248, 113, 113, 0.7);
}

.alert-chip.expiring {
    background: rgba(245, 158, 11, 0.06);
    color: #92400e;
    border: 1px solid rgba(252, 211, 77, 0.7);
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(249, 250, 251, 0.9);
    border: 1px solid rgba(229, 231, 235, 0.9);
}

.alert-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.alert-item-icon.overdue {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}

.alert-item-icon.expiring {
    background: rgba(245, 158, 11, 0.08);
    color: #92400e;
}

.alert-item-content {
    flex: 1;
}

.alert-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.alert-item-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

.alert-item-meta span + span::before {
    content: '•';
    margin: 0 4px;
    color: rgba(148, 163, 184, 0.9);
}

.alert-item-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.alert-item-badge.overdue {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.alert-item-badge.expiring {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.chart-container {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.metric-card:nth-child(1) { animation-delay: 0.1s; }
.metric-card:nth-child(2) { animation-delay: 0.2s; }
.metric-card:nth-child(3) { animation-delay: 0.3s; }
.metric-card:nth-child(4) { animation-delay: 0.4s; }
.metric-card:nth-child(5) { animation-delay: 0.5s; }
.metric-card:nth-child(6) { animation-delay: 0.6s; }

.chart-section {
    animation: fadeInUp 0.6s ease-out 0.7s backwards;
}

@media (max-width: 900px) {
    .chart-section {
        margin-bottom: 16px;
    }
}

/* House Type Page Styles */
.house-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.house-type-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.house-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.house-type-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.house-type-card:hover::before {
    transform: scaleX(1);
}

.house-type-card:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.house-type-card:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.house-type-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    background: var(--primary-gradient);
}

.house-type-card:nth-child(2) .house-type-icon {
    background: var(--secondary-gradient);
}

.house-type-card:hover .house-type-icon {
    transform: scale(1.1) rotate(5deg);
}

.house-type-content {
    flex: 1;
}

.house-type-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.house-type-content p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.house-type-stats {
    display: flex;
    gap: 24px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.house-type-action {
    margin-top: auto;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary {
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

/* House Details Page Styles */
.back-btn {
    background: rgba(102, 126, 234, 0.1);
    border: none;
    border-radius: var(--border-radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 16px;
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 16px;
}

.back-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(-2px);
}

body[dir="rtl"] .back-btn {
    margin-right: 0;
    margin-left: 16px;
}

body[dir="rtl"] .back-btn:hover {
    transform: translateX(2px);
}

.header-left {
    display: flex;
    align-items: center;
}

.house-info-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.house-info-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.house-info-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.house-info-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.house-info-text p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.house-info-stats {
    display: flex;
    gap: 32px;
}

.info-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius-sm);
    flex: 1;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.info-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.info-stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.units-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.filter-buttons {
    display: flex;
    gap: 12px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: white;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.05);
}

.filter-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.unit-card {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: var(--transition);
    animation: fadeInUp 0.4s ease-out backwards;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.unit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

.unit-card.available {
    border-left: 4px solid #27ae60;
}

.unit-card.occupied {
    border-left: 4px solid #e74c3c;
}

body[dir="rtl"] .unit-card.available {
    border-left: none;
    border-right: 4px solid #27ae60;
}

body[dir="rtl"] .unit-card.occupied {
    border-left: none;
    border-right: 4px solid #e74c3c;
}

.unit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.unit-id {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.unit-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.unit-status.available {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.unit-status.occupied {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.unit-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.unit-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.unit-detail-item i {
    width: 20px;
    color: #667eea;
    font-size: 16px;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
    margin-left: auto;
}

.rating-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    display: inline-flex;
    gap: 2px;
    color: #fbbf24;
    font-size: 14px;
}

.rating-stars i {
    width: auto;
}

.no-rating {
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 400;
}

body[dir="rtl"] .detail-value {
    margin-left: 0;
    margin-right: auto;
}

.rating-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    display: inline-flex;
    gap: 2px;
    color: #f39c12;
    font-size: 14px;
}

.rating-stars i {
    color: #f39c12;
}

.rating-stars .far {
    color: #ddd;
}

.no-units {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.unit-action {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.btn-view-contract,
.btn-view-payments,
.btn-rate-tenant,
.btn-add-tenant {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0;
    padding: 10px 6px;
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-view-contract {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-view-contract:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-view-payments {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.btn-view-payments:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

.btn-rate-tenant {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-rate-tenant:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
}

.btn-view-contract:active,
.btn-view-payments:active,
.btn-rate-tenant:active {
    transform: translateY(0);
}

.btn-view-contract i,
.btn-view-payments i,
.btn-rate-tenant i,
.btn-add-tenant i {
    font-size: 14px;
    flex-shrink: 0;
}

.btn-add-tenant {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    flex: 1 1 100%;
}

.btn-add-tenant:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.btn-add-tenant:active {
    transform: translateY(0);
}

/* Payment Options Section */
.payment-options-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out 0.15s backwards;
}

.payment-options-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 12px;
}

.payment-options-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.payment-option-card {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.payment-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.payment-option-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

.payment-option-card:hover::before {
    transform: scaleX(1);
}

.payment-option-card:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.payment-option-card:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.payment-option-card:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.payment-option-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    margin: 0 auto 20px;
    transition: var(--transition);
}

.payment-option-card:hover .payment-option-icon {
    transform: scale(1.1) rotate(5deg);
}

.payment-option-card:nth-child(2) .payment-option-icon {
    background: var(--secondary-gradient);
}

.payment-option-card:nth-child(3) .payment-option-icon {
    background: var(--info-gradient);
}

.payment-option-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.payment-option-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.payment-option-benefit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
}

.payment-option-benefit i {
    color: #27ae60;
    font-size: 14px;
}

/* Payments list table */
.payments-table-section {
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-top: 24px;
}

.payments-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.payments-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
    font-size: 14px;
    background: white;
}

.payments-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.payments-table thead th {
    padding: 16px 20px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.payments-table thead th:first-child {
    border-top-left-radius: 12px;
}

.payments-table thead th:last-child {
    border-top-right-radius: 12px;
}

.payments-table tbody tr {
    background: rgba(255, 255, 255, 1);
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.payments-table tbody tr:last-child {
    border-bottom: none;
}

.payments-table tbody tr:nth-child(even) {
    background: rgba(248, 249, 252, 1);
}

.payments-table tbody tr:hover {
    background: rgba(230, 235, 255, 0.6);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.payments-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
    vertical-align: middle;
}

.payments-table td:nth-child(1),
.payments-table td:nth-child(2) {
    font-weight: 600;
    color: var(--text-primary);
}

.payments-table td:nth-child(3) {
    font-family: 'Courier New', monospace;
    color: #667eea;
    font-weight: 600;
}

.payments-table td:nth-child(4) {
    color: var(--text-secondary);
    font-weight: 500;
}

.payments-table td:nth-child(5) {
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #27ae60;
    font-size: 15px;
}

.payments-table td:nth-child(6) {
    text-align: center;
}

.payments-table td:nth-child(7) {
    white-space: nowrap;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .payments-table {
        min-width: 600px;
    }
}

/* Payments Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin: 0;
}

.modal-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 18px;
}

.modal-close-btn:hover {
    background: #f5576c;
    color: white;
    border-color: #f5576c;
    transform: rotate(90deg);
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 18px;
}

.modal-close:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.payment-info-card {
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.payment-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.payment-info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.info-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.payments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.payment-item {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: var(--transition);
    display: flex;
    gap: 20px;
    align-items: center;
}

.payment-item:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

body[dir="rtl"] .payment-item:hover {
    transform: translateX(-4px);
}

.payment-number {
    flex-shrink: 0;
}

.payment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.payment-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-date-row,
.payment-amount-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-date-row i,
.payment-amount-row i {
    color: #667eea;
    font-size: 16px;
    width: 20px;
}

.payment-date {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.payment-date.past {
    color: #27ae60;
}

.payment-date.due {
    color: #f39c12;
    font-weight: 700;
}

.payment-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.payment-status.paid {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15) 0%, rgba(46, 204, 113, 0.15) 100%);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.payment-status.paid:hover {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.25) 0%, rgba(46, 204, 113, 0.25) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.2);
}

.payment-status.due {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15) 0%, rgba(241, 196, 15, 0.15) 100%);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
    font-weight: 700;
}

.payment-status.due:hover {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.25) 0%, rgba(241, 196, 15, 0.25) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.2);
}

.payment-status.pending {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.payment-status.pending:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.payment-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.no-payments {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Detailed Report Modal Styles */
.detailed-report-modal {
    max-width: 900px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 32px;
    border-top: 2px solid rgba(102, 126, 234, 0.1);
    background: rgba(102, 126, 234, 0.02);
}

.btn-modal-print,
.btn-modal-close {
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    border: none;
}

.btn-modal-print {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-modal-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-modal-close {
    background: white;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-modal-close:hover {
    background: rgba(0, 0, 0, 0.02);
}

.detailed-report-section {
    margin-bottom: 32px;
}

.detailed-report-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.report-stat-large {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 16px 0;
    letter-spacing: -1px;
}

.detailed-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.detailed-report-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.detailed-report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.report-card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 12px;
}

.report-card-icon.revenue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.report-card-icon.properties {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.report-card-icon.payments {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.report-card-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.report-card-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
}

.report-card-value {
    font-size: 24px;
    font-weight: 800;
    color: #667eea;
    margin: 8px 0;
    letter-spacing: -0.5px;
}

.report-card-stats {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    font-size: 12px;
}

.stat-occupied {
    color: #27ae60;
    font-weight: 600;
}

.stat-available {
    color: #3498db;
    font-weight: 600;
}

.revenue-breakdown,
.tenants-breakdown,
.payment-projection {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.revenue-item,
.breakdown-item,
.projection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid #667eea;
}

.revenue-amount,
.breakdown-value,
.projection-amount {
    font-weight: 700;
    color: #667eea;
    font-size: 16px;
}

.tenants-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.tenant-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tenant-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.tenant-info {
    flex: 1;
}

.tenant-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.tenant-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 2px 0;
}

.tenant-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
    color: #f39c12;
}

.occupancy-rate {
    margin-top: 16px;
}

.occupancy-bar {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
}

.occupancy-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    border-radius: 15px;
}

.occupancy-percentage {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin: 0;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Rate Tenant Modal Styles */
.rate-tenant-info {
    background: rgba(102, 126, 234, 0.05);
    padding: 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
    border-left: 4px solid #667eea;
}

.rate-tenant-info p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.rate-tenant-info strong {
    color: var(--text-secondary);
    margin-right: 8px;
}

body[dir="rtl"] .rate-tenant-info strong {
    margin-right: 0;
    margin-left: 8px;
}

.rating-section {
    margin-bottom: 24px;
}

.rating-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.star-rating {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    cursor: pointer;
}

.star-rating i {
    font-size: 32px;
    color: #ddd;
    transition: var(--transition);
}

.star-rating i:hover {
    transform: scale(1.1);
}

.star-rating .fas.fa-star {
    color: #f39c12;
}

.rating-value-display {
    font-size: 18px;
    font-weight: 700;
    color: #f39c12;
    text-align: center;
    margin-top: 8px;
}

.rating-comments {
    margin-top: 24px;
}

.rating-comments label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.rating-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    transition: var(--transition);
    color: var(--text-primary);
}

.rating-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-modal-save {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-modal-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* Modal Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Reports Page Styles */
.reports-filters {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out backwards;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--border-radius-sm);
    background: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.filter-select:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-generate-report {
    padding: 12px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.btn-generate-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.report-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 28px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.report-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.report-card:hover::before {
    transform: scaleX(1);
}

.report-card:nth-child(1) { animation-delay: 0.1s; }
.report-card:nth-child(2) { animation-delay: 0.2s; }
.report-card:nth-child(3) { animation-delay: 0.3s; }
.report-card:nth-child(4) { animation-delay: 0.4s; }

.report-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    transition: var(--transition);
}

.report-card:nth-child(2) .report-icon {
    background: var(--secondary-gradient);
}

.report-card:nth-child(3) .report-icon {
    background: var(--info-gradient);
}

.report-card:nth-child(4) .report-icon {
    background: var(--success-gradient);
}

.report-card:hover .report-icon {
    transform: scale(1.1) rotate(5deg);
}

.report-content {
    flex: 1;
}

.report-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.report-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.report-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.report-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.report-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-view-report {
    width: 100%;
    padding: 12px 20px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-view-report:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Saved Reports Section */
.saved-reports-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.saved-reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.saved-reports-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.btn-refresh-reports {
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-refresh-reports:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.saved-reports-list {
    min-height: 100px;
}

.no-saved-reports {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-saved-reports i {
    font-size: 48px;
    color: var(--text-secondary);
    opacity: 0.3;
    margin-bottom: 16px;
}

.no-saved-reports p {
    font-size: 14px;
    margin: 0;
}

.saved-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.saved-report-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.saved-report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

.saved-report-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.saved-report-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.saved-report-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.saved-report-type {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.saved-report-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.saved-report-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.saved-report-detail-item i {
    width: 16px;
    color: #667eea;
    font-size: 14px;
}

.saved-report-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-view-saved-report,
.btn-print-saved-report,
.btn-delete-saved-report {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    border: none;
}

.btn-view-saved-report {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.btn-view-saved-report:hover {
    background: rgba(102, 126, 234, 0.2);
}

.btn-print-saved-report {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.btn-print-saved-report:hover {
    background: rgba(39, 174, 96, 0.2);
}

.btn-delete-saved-report {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.btn-delete-saved-report:hover {
    background: rgba(231, 76, 60, 0.2);
}

/* Report Forms Section */
.report-forms-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.report-forms-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.report-forms-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.btn-report-form {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--border-radius);
    padding: 28px 24px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-report-form:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.05);
}

.btn-report-form i {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 4px;
    transition: var(--transition);
}

.btn-report-form:hover i {
    transform: scale(1.1);
    color: #764ba2;
}

.btn-report-form span {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.btn-report-form p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Report Form Section */
.report-form-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.report-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.report-form-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.btn-close-form {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 18px;
}

.btn-close-form:hover {
    background: #f5576c;
    color: white;
    border-color: #f5576c;
    transform: rotate(90deg);
}

.report-form-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.damage-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.damage-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.damage-field-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.damage-input {
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: white;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    color: var(--text-primary);
}

.damage-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.damage-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.damage-notes-group {
    grid-column: 1 / -1;
}

.damage-checklist {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.03);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.damage-checklist-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.damage-checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.damage-checklist-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.damage-checklist-grid label:hover {
    background: rgba(102, 126, 234, 0.05);
}

.damage-checklist-item {
    margin-bottom: 12px;
}

.damage-description-field {
    margin-top: 8px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    animation: slideDown 0.3s ease-out;
}

.damage-description-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.damage-description-field textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.damage-description-field textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.damage-checklist-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.damage-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-damage-primary,
.btn-damage-secondary,
.btn-damage-print {
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    border: none;
}

.btn-damage-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-damage-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-damage-print {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-damage-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
}

.btn-damage-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-damage-secondary:hover {
    background: rgba(0, 0, 0, 0.02);
}

.reports-chart-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 36px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

.reports-chart-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 12px;
}

.reports-chart-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .main-content {
        padding: 24px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
        min-width: 260px;
    }
    
    .main-content {
        margin-left: 260px;
    }
    
    body[dir="rtl"] .main-content {
        margin-left: 0;
        margin-right: 260px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        width: 280px;
        min-width: 280px;
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    body[dir="rtl"] .sidebar {
        transform: translateX(100%);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    }
    
    body[dir="rtl"] .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
        width: 100%;
    }
    
    body[dir="rtl"] .main-content {
        margin-right: 0;
    }
    
    /* Overlay for mobile sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(4px);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .header-left h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        box-shadow: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    body[dir="rtl"] .main-content {
        margin-right: 0;
    }
    
    .container {
        flex-direction: column;
    }
    
    .metric-card {
        padding: 20px;
    }
    
    .metric-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .metric-value {
        font-size: 28px;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .house-type-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .house-type-card {
        padding: 24px;
    }
    
    .house-type-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
    
    .house-type-content h2 {
        font-size: 20px;
    }
    
    .house-type-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .house-info-header {
        flex-direction: column;
        text-align: center;
    }
    
    .house-info-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .filter-buttons {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .units-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-options-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .payment-option-card {
        padding: 24px;
    }
    
    .unit-action {
        flex-direction: column;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .btn-view-contract,
    .btn-view-payments,
    .btn-rate-tenant,
    .btn-add-tenant {
        width: 100%;
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .modal-container {
        max-width: 100%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .payment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .payment-details {
        width: 100%;
    }
    
    .reports-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .btn-generate-report {
        width: 100%;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .report-card {
        padding: 24px;
    }
    
    .report-forms-buttons {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .btn-report-form {
        padding: 24px 20px;
    }
    
    .report-form-section {
        padding: 24px;
    }
    
    .damage-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .damage-checklist-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .damage-actions {
        flex-direction: column;
    }
    
    .btn-damage-primary,
    .btn-damage-secondary {
        width: 100%;
    }
    
    .saved-reports-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .saved-report-actions {
        flex-direction: column;
    }
    
    .btn-view-saved-report,
    .btn-print-saved-report,
    .btn-delete-saved-report {
        width: 100%;
    }
}

/* Tenants Page Styles */
.tenants-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-select,
.filter-input {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.tenants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.tenant-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.tenant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Color variants for tenants by property */
.tenant-card-alyarmouk {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.18) 0%, rgba(118, 75, 162, 0.18) 100%);
    border-color: rgba(102, 126, 234, 0.4);
}

.tenant-card-alyarmouk .tenant-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tenant-card-alyarmouk .tenant-rating-badge {
    background: rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.35);
}

.tenant-card-alyasmin {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.18) 0%, rgba(245, 87, 108, 0.18) 100%);
    border-color: rgba(240, 147, 251, 0.4);
}

.tenant-card-alyasmin .tenant-avatar {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tenant-card-alyasmin .tenant-rating-badge {
    background: rgba(245, 87, 108, 0.12);
    border-color: rgba(245, 87, 108, 0.35);
}

.tenant-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tenant-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tenant-name-section {
    flex: 1;
    min-width: 0;
}

.tenant-name-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.tenant-property {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.tenant-rating-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.rating-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.rating-stars-small {
    font-size: 12px;
    color: #fbbf24;
}

.tenant-card-body {
    margin-bottom: 20px;
}

.tenant-info-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.tenant-info-row:last-child {
    margin-bottom: 0;
}

.tenant-info-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.tenant-info-item i {
    color: var(--primary-color);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.tenant-info-item .info-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.tenant-info-item .info-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
    margin-left: auto;
    text-align: right;
    max-width: 55%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.tenant-card-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-tenant-action {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.btn-tenant-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-tenant-action:active {
    transform: translateY(0);
}

.btn-tenant-action i {
    font-size: 14px;
}

.no-tenants {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-tenants i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-tenants p {
    font-size: 18px;
    margin: 0;
}

/* RTL Support for Tenants Page */
[dir="rtl"] .tenant-card-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .tenant-name-section {
    text-align: right;
}

[dir="rtl"] .tenant-info-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .tenant-info-item .info-value {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .tenant-card-actions {
    flex-direction: row-reverse;
}

/* Responsive Design for Tenants Page */
@media (max-width: 768px) {
    .tenants-filters {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .tenants-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tenant-card {
        padding: 20px;
    }
    
    .tenant-card-header {
        flex-wrap: wrap;
    }
    
    .tenant-info-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .tenant-card-actions {
        flex-direction: column;
    }
    
    .btn-tenant-action {
        width: 100%;
    }
}

/* Tenants Overview Section Enhancements */
.tenants-section {
    margin-top: 8px;
}

.tenants-section-header {
    margin-bottom: 20px;
}

.tenants-section-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.tenants-section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.tenants-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.tenants-summary-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
}

.tenants-summary-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.tenants-summary-count {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.tenants-summary-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .tenants-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ========================= */
/* Login Page                */
/* ========================= */

.login-body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top left, #667eea 0%, transparent 55%),
                radial-gradient(circle at bottom right, #fbc2eb 0%, transparent 55%),
                #f5f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    max-width: 1040px;
    margin: 24px;
    padding: 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(26px);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.16);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-hero {
    border-radius: 20px;
    padding: 32px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #fbc2eb 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.login-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 60%);
    opacity: 0.9;
}

.login-hero-inner {
    position: relative;
    z-index: 1;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.18);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-badge i {
    font-size: 13px;
}

.login-title {
    margin-top: 20px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.login-subtitle {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.9;
    max-width: 320px;
}

.login-metrics {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.login-metric-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.login-metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.login-metric-value {
    font-size: 18px;
    font-weight: 700;
}

.login-card {
    border-radius: 20px;
    padding: 32px 28px 28px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
}

.login-card-header {
    margin-bottom: 18px;
}

.login-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.25);
    font-size: 11px;
    font-weight: 500;
    color: #4f46e5;
}

.login-card-title {
    margin-top: 12px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.login-card-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.login-form-footer {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* Login form specific styles */
#loginForm {
    margin-top: 24px;
}

#loginForm .damage-form-grid {
    gap: 20px;
    margin-bottom: 20px;
}

#loginForm .damage-field-group {
    margin-bottom: 0;
}

#loginForm .damage-input {
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: #f8f9fa;
    transition: all 0.2s ease;
}

#loginForm .damage-input:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

#loginForm .damage-field-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

#loginForm .damage-actions {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.login-form-actions {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.login-submit-wrapper {
    margin-top: 0;
    padding-top: 0;
}

.login-forgot-link {
    font-size: 12px;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.login-forgot-link:hover {
    text-decoration: underline;
    color: #667eea;
}

.login-form-footer a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.login-form-footer a:hover {
    text-decoration: underline;
}

.login-hint {
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.9;
}

.login-hint span {
    font-weight: 600;
    color: #4f46e5;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.login-remember input[type="checkbox"] {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.login-submit-btn {
    width: 100%;
    margin-top: 10px;
    padding: 14px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    background: var(--primary-gradient) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--border-radius-sm) !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.login-submit-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.login-submit-btn:active {
    transform: translateY(0) !important;
}

@media (max-width: 900px) {
    .login-wrapper {
        grid-template-columns: minmax(0, 1fr);
        padding: 24px;
    }

    .login-hero {
        order: 2;
        padding: 24px 20px;
    }

    .login-card {
        order: 1;
    }
}

@media (max-width: 600px) {
    .login-wrapper {
        margin: 16px;
        padding: 18px;
        border-radius: 18px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .login-card {
        padding: 24px 20px;
    }
    
    .login-card-title {
        font-size: 20px;
    }
    
    #loginForm .damage-form-grid {
        gap: 16px;
    }
    
    #loginForm .damage-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .login-submit-btn {
        padding: 16px 24px !important;
        font-size: 16px !important;
    }
    
    #loginForm .damage-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .login-remember {
        width: 100%;
    }
}

/* Contract Expiry Alert Banner */
.contract-expiry-alert {
    margin: 16px 32px 24px 32px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: slideDown 0.4s ease-out;
    z-index: 100;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contract-expiry-alert-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    color: #ffffff;
}

.contract-expiry-alert-icon {
    font-size: 28px;
    color: #ffffff;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.contract-expiry-alert-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contract-expiry-alert-text strong {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.contract-expiry-alert-text span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.contract-expiry-alert-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    font-size: 16px;
    transition: var(--transition);
    flex-shrink: 0;
}

.contract-expiry-alert-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

body[dir="rtl"] .contract-expiry-alert {
    margin: 16px 32px 24px 32px;
}

@media (max-width: 768px) {
    .contract-expiry-alert {
        margin: 12px 16px 16px 16px;
    }

    .contract-expiry-alert-content {
        padding: 16px;
        gap: 12px;
    }

    .contract-expiry-alert-icon {
        font-size: 24px;
    }

    .contract-expiry-alert-text strong {
        font-size: 14px;
    }

    .contract-expiry-alert-text span {
        font-size: 12px;
    }
}

/* Comprehensive Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Tables - Horizontal scroll on mobile */
    .payments-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    .payments-table {
        min-width: 800px;
        font-size: 14px;
    }
    
    .payments-table th,
    .payments-table td {
        padding: 12px 8px;
    }
    
    /* Unit Cards - Stack on mobile */
    .units-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .unit-card {
        padding: 20px;
    }
    
    /* Tenant Cards - Full width */
    .tenants-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tenant-card {
        padding: 20px;
    }
    
    /* Forms - Single column on mobile */
    .damage-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Modal adjustments */
    .modal-container {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(95vh - 140px);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 16px 20px;
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-modal-save,
    .btn-modal-close {
        width: 100%;
    }
    
    /* Region buttons - Stack on mobile */
    .region-buttons {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .region-button {
        padding: 24px;
    }
    
    /* Header adjustments */
    .header {
        padding: 16px 20px;
    }
    
    .header-left h1 {
        font-size: 20px;
    }
    
    .header-right {
        gap: 12px;
    }
    
    .user-profile span {
        display: none;
    }
    
    .btn-logout {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 38px;
    }
    
    .btn-logout span {
        display: none;
    }
    
    .btn-logout i {
        font-size: 14px;
    }
    
    /* Back button adjustments */
    .back-btn {
        margin-right: 8px;
    }
    
    /* Portfolio overview and quick actions */
    .portfolio-grid,
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Charts */
    .chart-container {
        height: 250px;
        padding: 16px;
    }
    
    /* Employee apartments table */
    .employee-apartments-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    .employee-apartments-table {
        min-width: 900px;
        font-size: 14px;
    }
    
    /* Notifications chips */
    .notifications-chips {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .notification-chip {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .main-content {
        padding: 16px;
    }
    
    .header {
        padding: 12px 16px;
        margin-bottom: 20px;
    }
    
    .header-left h1 {
        font-size: 18px;
    }
    
    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin-right: 8px;
    }
    
    .unit-card,
    .tenant-card {
        padding: 16px;
    }
    
    .modal-container {
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-footer {
        padding: 12px 16px;
    }
    
    .payments-table,
    .employee-apartments-table {
        min-width: 700px;
        font-size: 12px;
    }
    
    .payments-table th,
    .payments-table td,
    .employee-apartments-table th,
    .employee-apartments-table td {
        padding: 8px 6px;
    }
    
    .metric-card {
        padding: 16px;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    .metric-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .chart-container {
        height: 200px;
        padding: 12px;
    }
    
    .region-button {
        padding: 20px;
        font-size: 18px;
    }
    
    .region-button i {
        font-size: 32px;
    }
    
    /* Language select and logout button */
    .language-select {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .btn-logout {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
        box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
    }
    
    .btn-logout:hover {
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    }
    
    .btn-logout span {
        display: none;
    }
    
    .btn-logout i {
        font-size: 13px;
    }

    .user-profile {
        gap: 8px;
    }
    
    .profile-img {
        width: 32px;
        height: 32px;
    }
    
    /* Login page mobile adjustments */
    .login-hero {
        display: none;
    }
    
    .login-card {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        padding: 40px 24px;
    }
    
    .login-card-header {
        margin-bottom: 32px;
    }
    
    .login-card-title {
        font-size: 28px;
    }
    
    .login-card-subtitle {
        font-size: 14px;
    }
    
    .login-form-group {
        margin-bottom: 20px;
    }
    
    .login-form-group input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .login-form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .btn-login {
        padding: 16px;
        font-size: 16px;
        width: 100%;
    }
    
    .login-metrics {
        display: none;
    }
    
    /* Touch targets - minimum 44x44px */
    button,
    .btn,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for mobile */
    .section-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    /* Filter and search inputs */
    .filter-group input,
    .filter-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
}