/* property-management\static\css\style.css */
/* Excel-Modern Hybrid Design for Django Property Management - BRAND UPDATED */
:root {
    /* Brand Colors */
    --brand-pink: #e91e63;
    --brand-pink-dark: #c2185b;
    --brand-pink-light: #f48fb1;
    --brand-pink-pale: #fce4ec;
    --brand-pink-gradient: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    --brand-pink-hover: #d81b60;
    
    /* UI Colors */
    --excel-header-bg: #f8f9fa;
    --excel-border: #e5e7eb;
    --excel-grid: #e0e0e0;
    --excel-hover: #f0f7ff;
    
    --primary-blue: #2563eb;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --error-red: #ef4444;
    
    --info-blue: #3b82f6;
    --info-blue-light: #dbeafe;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, sans-serif;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    
    /* Spacing */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-brand: 0 4px 12px rgba(233, 30, 99, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    color: #1a1a1a;
    font-size: var(--font-size-base);
    line-height: 1.5;
    min-height: 100vh;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: white;
    border-bottom: 1px solid var(--excel-border);
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand .icon-lg {
    color: var(--brand-pink);
    background: var(--brand-pink-pale);
    padding: 8px;
    border-radius: var(--border-radius-sm);
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-brand h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--brand-pink);
    background: linear-gradient(135deg, var(--brand-pink) 0%, var(--brand-pink-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--excel-header-bg);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--excel-border);
    padding: 2px;
}

.nav-link {
    text-decoration: none;
    color: #374151;
    padding: 10px 16px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: white;
    border-color: var(--excel-border);
    color: var(--brand-pink);
}

.nav-link.active {
    background: white;
    color: var(--brand-pink);
    font-weight: 600;
    border: 1px solid var(--excel-border);
    border-bottom: 3px solid var(--brand-pink);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--brand-pink-gradient);
}

/* User welcome - styled greeting and name */
.user-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 20px;
    margin-right: 12px;
    padding: 6px 16px 6px 6px;
    background: linear-gradient(135deg, var(--brand-pink-pale) 0%, #fff 100%);
    border-radius: 24px;
    border: 1px solid var(--brand-pink-light);
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-pink-gradient);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.5px;
}

.user-greeting {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.greeting-text {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    font-weight: 500;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.btn-logout {
    background: white;
    color: #374151;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: var(--font-size-sm);
    border: 1px solid var(--excel-border);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-logout:hover {
    background: #f8f9fa;
    color: var(--brand-pink);
    border-color: var(--brand-pink-light);
}

/* ===== MAIN CONTAINER ===== */
.container {
    max-width: 100%;
    margin: 20px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--excel-border);
    min-height: calc(100vh - 120px);
}

/* ===== PAGE HEADERS ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--excel-border);
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--brand-pink-gradient);
    border-radius: 2px;
}

.page-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h1 i {
    color: var(--brand-pink);
    background: var(--brand-pink-pale);
    padding: 10px;
    border-radius: var(--border-radius-sm);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* ===== SHEET TABS ===== */
.sheet-tabs {
    display: flex;
    gap: 1px;
    background: var(--excel-header-bg);
    border-bottom: 1px solid var(--excel-border);
    padding: 0 20px;
    margin: 20px -20px;
    overflow-x: auto;
}

.sheet-tab {
    padding: 12px 24px;
    background: white;
    border: 1px solid var(--excel-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
}

.sheet-tab:hover {
    background: #f8f9fa;
    color: var(--brand-pink);
}

.sheet-tab.active {
    background: white;
    border-bottom: 3px solid var(--brand-pink);
    font-weight: 600;
    color: var(--brand-pink);
    z-index: 1;
}

.sheet-tab.active::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--brand-pink-gradient);
}

.sheet-content {
    display: none;
    padding: 20px 0;
}

.sheet-content.active {
    display: block;
}

/* Pagination Styles */
.pagination {
    margin: 30px 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pagination .current {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
}

.pagination a {
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination a:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination a:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 20px;
    border: 1px solid var(--excel-border);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.stat-card:hover {
    border-color: var(--brand-pink);
    box-shadow: var(--shadow-brand);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--brand-pink-gradient);
}

.stat-icon {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--brand-pink);
    width: 36px;
    height: 36px;
    background: var(--brand-pink-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
}

/* Special stat icons for different categories */
.stat-card:nth-child(2) .stat-icon { /* Today's Revenue */
    background: #d1fae5;
    color: var(--success-green);
}

.stat-card:nth-child(3) .stat-icon { /* This Month's Revenue */
    background: #dbeafe;
    color: var(--primary-blue);
}

.stat-card:nth-child(4) .stat-icon { /* Vacant Properties */
    background: #fef3c7;
    color: var(--warning-orange);
}

.stat-card:nth-child(5) .stat-icon { /* Occupied Properties */
    background: #fce7f3;
    color: var(--brand-pink);
}

.stat-value {
    font-size: clamp(0.95rem, 2.2vw + 0.8rem, 1.75rem);
    font-weight: 700;
    color: #1f2937;
    margin: 4px 0;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
}

.stat-label {
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--excel-border);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--excel-header-bg);
    padding: 16px 24px;
    border-bottom: 1px solid var(--excel-border);
    font-weight: 600;
    color: #374151;
    font-size: var(--font-size-base);
    position: relative;
    padding-left: 16px;
}

.card-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--brand-pink-gradient);
}

/* ===== TABLES ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.data-table thead {
    background: var(--excel-header-bg);
    border-bottom: 2px solid var(--excel-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-right: 1px solid var(--excel-border);
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
}

.data-table th:last-child {
    border-right: none;
}

.data-table td {
    padding: 12px;
    border-right: 1px solid var(--excel-grid);
    border-bottom: 1px solid var(--excel-grid);
    vertical-align: middle;
}

.data-table td:last-child {
    border-right: none;
}

.data-table tbody tr {
    background: white;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.data-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, var(--brand-pink-pale) 0%, transparent 100%);
    border-left-color: var(--brand-pink);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: var(--font-size-sm);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--excel-border);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    background: white;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-pink);
    box-shadow: 0 0 0 3px var(--brand-pink-pale);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #374151;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--brand-pink-gradient);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-pink-hover) 0%, #ad1457 100%);
    box-shadow: var(--shadow-brand);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-green) 0%, #059669 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.25);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-red) 0%, #dc2626 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-orange) 0%, #d97706 100%);
    color: white;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-blue) 0%, #2563eb 100%);
    color: white;
    border: none;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Button with icon */
.btn-icon {
    padding: 10px 16px;
    gap: 8px;
}

.btn-icon i {
    font-size: 14px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    gap: 4px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    gap: 10px;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

.badge-primary {
    background: var(--brand-pink-pale);
    color: var(--brand-pink-dark);
    border-color: var(--brand-pink);
}

/* ===== ALERTS ===== */
.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

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

.alert {
    padding: 15px;
    border-radius: var(--border-radius-md);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.5s ease;
}

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

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.alert-error, .alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

.alert-primary {
    background: var(--brand-pink-pale);
    color: var(--brand-pink-dark);
    border-color: var(--brand-pink);
}

.alert .close-btn {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    color: inherit;
    opacity: 0.85;
    transition: background 0.2s, opacity 0.2s;
}

.alert .close-btn:hover {
    background: rgba(0, 0, 0, 0.15);
    opacity: 1;
}

.alert-success .close-btn { background: rgba(6, 95, 70, 0.15); border-color: rgba(6, 95, 70, 0.25); }
.alert-success .close-btn:hover { background: rgba(6, 95, 70, 0.25); }

.alert-danger .close-btn, .alert-error .close-btn { background: rgba(153, 27, 27, 0.15); border-color: rgba(153, 27, 27, 0.25); }
.alert-danger .close-btn:hover, .alert-error .close-btn:hover { background: rgba(153, 27, 27, 0.25); }

.alert-warning .close-btn { background: rgba(146, 64, 14, 0.15); border-color: rgba(146, 64, 14, 0.25); }
.alert-warning .close-btn:hover { background: rgba(146, 64, 14, 0.25); }

.alert-info .close-btn { background: rgba(30, 64, 175, 0.15); border-color: rgba(30, 64, 175, 0.25); }
.alert-info .close-btn:hover { background: rgba(30, 64, 175, 0.25); }

.permanent-message {
    animation: none !important;
    display: block !important;
    opacity: 1 !important;
}

/* ===== CUSTOM HEADER STYLES ===== */
.tenant-list-header,
.all-properties-header,
.properties-list-header,
.landlord-list-header {
    padding: 16px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-bottom: 2px solid #e9ecef;
    position: relative;
}

.tenant-list-header::before,
.all-properties-header::before,
.properties-list-header::before,
.landlord-list-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--brand-pink-gradient);
}

.tenant-list-header-content,
.all-properties-header-content,
.properties-list-header-content,
.landlord-list-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.tenant-list-header-title,
.all-properties-header-title,
.properties-list-header-title,
.landlord-list-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.tenant-list-header-title i,
.all-properties-header-title i,
.properties-list-header-title i,
.landlord-list-header-title i {
    font-size: 20px;
    color: var(--brand-pink);
    background: var(--brand-pink-pale);
    padding: 10px;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tenant-list-header-title h3,
.all-properties-header-title h3,
.properties-list-header-title h3,
.landlord-list-header-title h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.tenant-count,
.filter-count,
.properties-count,
.landlord-count {
    background: var(--brand-pink-pale);
    color: var(--brand-pink);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(233, 30, 99, 0.2);
}

/* ===== ACTION BUTTONS CONTAINERS ===== */
.tenant-list-header-actions,
.all-properties-header-actions,
.properties-list-header-actions,
.landlord-list-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ===== SEARCH BOX ===== */
.search-box {
    position: relative;
    min-width: 250px;
    max-width: 400px;
    flex-grow: 1;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    font-size: 14px;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    background: white;
    transition: all 0.2s;
    color: #4a5568;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-pink);
    box-shadow: 0 0 0 3px var(--brand-pink-pale);
}

.search-input::placeholder {
    color: #a0aec0;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* ===== ACTION CARDS ===== */
.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.action-card:hover {
    border-color: var(--brand-pink);
    box-shadow: var(--shadow-brand);
    transform: translateY(-2px);
    color: var(--brand-pink);
}

.action-card i {
    color: var(--brand-pink);
    margin-bottom: 15px;
}

.action-card h4 {
    margin: 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.action-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* ===== UTILITY CLASSES ===== */
.icon {
    width: 16px;
    height: 16px;
}

.icon-lg {
    width: 20px;
    height: 20px;
}

.text-center { text-align: center; }
.text-muted { color: #6b7280; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }

/* ===== LOADING STATES ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--brand-pink-pale);
    border-top: 3px solid var(--brand-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===== FORM VALIDATION ===== */
.is-valid {
    border-color: var(--success-green) !important;
    background-color: rgba(16, 185, 129, 0.1) !important;
}

.is-invalid {
    border-color: var(--error-red) !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .tenant-list-header-content,
    .all-properties-header-content,
    .properties-list-header-content,
    .landlord-list-header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .search-box {
        min-width: 100%;
        max-width: 100%;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 16px;
    }
    
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 12px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        margin-top: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .sheet-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .btn-icon {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .tenant-list-header-title,
    .all-properties-header-title,
    .properties-list-header-title,
    .landlord-list-header-title {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-icon {
        width: 100%;
        justify-content: center;
    }
    
    .stat-value {
        font-size: clamp(0.85rem, 4vw, 1.25rem);
    }
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 800px;
}

.modal-header {
    background: var(--excel-header-bg);
    padding: 20px;
    border-bottom: 1px solid var(--excel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding-left: 24px;
}

.modal-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--brand-pink-gradient);
}

.modal-header h3 {
    margin: 0;
    color: var(--brand-pink);
}

.modal-header .close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s;
}

.modal-header .close:hover {
    color: var(--brand-pink);
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.mark-left-row {
    margin-bottom: 8px;
    font-size: 14px;
}
.text-danger { color: var(--error-red); }
.text-warning { color: var(--warning-orange); }
.font-weight-bold { font-weight: 600; }

/* Search box with clear button - clean professional layout */
.tenant-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

.search-input-wrapper .search-input {
    width: 100%;
    padding: 8px 36px 8px 38px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper .search-input:focus {
    outline: none;
    border-color: var(--brand-pink);
    box-shadow: 0 0 0 2px var(--brand-pink-pale);
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.search-clear-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.search-clear-btn:active {
    background: #d1d5db;
}

.search-submit-btn {
    flex-shrink: 0;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-pink);
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .page-actions,
    .btn:not(.no-print) {
        display: none !important;
    }
    
    .container {
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}