/* ============================================
   LANKA PROPERTY BROKER - MAIN DESIGN SYSTEM
   ============================================ */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Primary Palette */
    --primary: #0f3460;
    --primary-dark: #1a1a2e;
    --primary-light: #1a5276;
    --secondary: #16213e;
    
    /* Accent */
    --accent: #e2b714;
    --accent-light: #f7e07c;
    --accent-hover: #f0c040;
    
    /* Backgrounds */
    --bg-main: #f0f2f5;
    --bg-card: #ffffff;
    --bg-sidebar: #1a1a2e;
    --bg-input: #f8f9fa;
    
    /* Text */
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --text-white: #ffffff;
    
    /* Status */
    --success: #00b894;
    --danger: #e74c3c;
    --warning: #fdcb6e;
    --info: #74b9ff;
    --purple: #a29bfe;
    
    /* Borders & Shadows */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    /* Sidebar */
    --sidebar-width: 270px;
    --sidebar-collapsed: 80px;
    --topbar-height: 65px;
    
    /* Font */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(15, 52, 96, 0.2);
    border-radius: 10px;
    border: 2px solid var(--bg-main);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 52, 96, 0.4);
}

/* ---------- Layout ---------- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    transition: var(--transition);
    min-height: 100vh;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed);
}

.content-wrapper {
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

/* ---------- Page Header ---------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h1 i {
    color: var(--accent);
    font-size: 24px;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.page-breadcrumb a {
    color: var(--text-secondary);
}

.page-breadcrumb a:hover {
    color: var(--primary);
}

.page-breadcrumb .separator {
    color: var(--text-muted);
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

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

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

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--accent);
}

.card-body {
    padding: 28px;
}

.card-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-input);
}

/* ---------- Glass Card ---------- */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
}

/* ---------- Stat Cards ---------- */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-card .stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2px;
}

.stat-card .stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card .stat-trend {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.stat-card .stat-trend.up { color: var(--success); }
.stat-card .stat-trend.down { color: var(--danger); }

/* Stat card color variants */
.stat-card.primary::before { background: var(--primary); }
.stat-card.primary .stat-icon { background: rgba(15,52,96,0.1); color: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.success .stat-icon { background: rgba(0,184,148,0.1); color: var(--success); }
.stat-card.warning::before { background: var(--accent); }
.stat-card.warning .stat-icon { background: rgba(226,183,20,0.1); color: var(--accent); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.danger .stat-icon { background: rgba(231,76,60,0.1); color: var(--danger); }
.stat-card.info::before { background: var(--info); }
.stat-card.info .stat-icon { background: rgba(116,185,255,0.1); color: var(--info); }
.stat-card.purple::before { background: var(--purple); }
.stat-card.purple .stat-icon { background: rgba(162,155,254,0.1); color: var(--purple); }

/* ---------- Status Badges ---------- */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    gap: 6px;
    white-space: nowrap;
}

/* Base style logic updated to soft background */
.status-badge {
    background: rgba(0,0,0,0.05);
    color: var(--text-secondary);
}

/* If inline styles specify color, we can't easily override without !important or changing inline. 
   Assuming they use inline color:#00b894, the background override handles soft styling if possible. */
.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: var(--primary-dark);
}

.btn-success {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

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

.btn-warning {
    background: linear-gradient(135deg, #fdcb6e, #ffeaa7);
    color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(15,52,96,0.05);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: var(--bg-input);
    color: var(--text-primary);
    box-shadow: none;
    transform: none;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
    outline: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.error {
    border-color: var(--danger);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23636e72' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

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

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.input-group {
    position: relative;
    display: flex;
}

.input-group .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    z-index: 1;
}

.input-group .form-control {
    padding-left: 44px;
}

.form-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

/* ---------- Tables ---------- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

table.dataTable {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
}

table.dataTable thead th {
    background: var(--bg-input);
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

table.dataTable tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 14px;
}

table.dataTable tbody tr:hover {
    background: rgba(15,52,96,0.03);
}

table.dataTable tbody tr:last-child td {
    border-bottom: none;
}

/* DataTables Overrides */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-family: var(--font);
    outline: none;
    transition: var(--transition);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--radius-sm) !important;
    margin: 0 2px;
    border: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
}

.dataTables_wrapper .dataTables_info {
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 15px;
}

/* ---------- Modals ---------- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-backdrop.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 18px;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---------- Dropzone ---------- */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary);
    background: rgba(15,52,96,0.05);
}

.dropzone i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.dropzone h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.dropzone p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ---------- Image Gallery ---------- */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    group: true;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 12px;
    pointer-events: none;
}

.gallery-item .overlay .btn {
    pointer-events: auto;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .featured-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: var(--primary-dark);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* ---------- Property Cards (Gallery) ---------- */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.property-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.property-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.property-card .card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.property-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.property-card:hover .card-image img {
    transform: scale(1.08);
}

.property-card .card-image .price-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 16px;
}

.property-card .card-image .status-tag {
    position: absolute;
    top: 12px;
    right: 12px;
}

.property-card .card-image .type-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-card .card-details {
    padding: 20px;
}

.property-card .card-details h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card .card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.property-card .card-location i {
    color: var(--danger);
}

.property-card .card-meta {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.property-card .card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.property-card .card-meta .meta-item i {
    color: var(--primary);
}

.property-card .card-actions {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---------- Tabs ---------- */
.nav-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}

.nav-tabs .tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-tabs .tab:hover {
    color: var(--primary);
}

.nav-tabs .tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.alert-success {
    background: rgba(0,184,148,0.1);
    color: #00b894;
    border: 1px solid rgba(0,184,148,0.2);
}

.alert-danger {
    background: rgba(231,76,60,0.1);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,0.2);
}

.alert-warning {
    background: rgba(253,203,110,0.1);
    color: #e17055;
    border: 1px solid rgba(253,203,110,0.2);
}

.alert-info {
    background: rgba(116,185,255,0.1);
    color: #0984e3;
    border: 1px solid rgba(116,185,255,0.2);
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 60px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 20px;
}

/* ---------- Loading ---------- */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

/* ---------- Notification Badge ---------- */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}

/* ---------- Avatar ---------- */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }

.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

/* ---------- Tooltip ---------- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    padding: 6px 12px;
    background: var(--primary-dark);
    color: white;
    font-size: 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* ---------- Progress Bar ---------- */
.progress-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade { animation: fadeIn 0.5s ease; }
.animate-slide-up { animation: slideUp 0.5s ease; }
.animate-slide-left { animation: slideInLeft 0.5s ease; }
.animate-slide-right { animation: slideInRight 0.5s ease; }
.animate-scale { animation: scaleIn 0.3s ease; }

/* ---------- Utilities ---------- */
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-accent { background-color: var(--accent) !important; }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }

.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }

.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.p-0 { padding: 0; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }

.w-100 { width: 100%; }
.cursor-pointer { cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.position-relative { position: relative; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .stat-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .property-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 20px 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card .stat-info h3 {
        font-size: 22px;
    }
    
    .property-grid {
        grid-template-columns: 1fr;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .card-header {
        padding: 16px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 576px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        padding: 16px 12px;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 14px;
    }
}
