:root {
    --wlbm-primary: #4f46e5;
    --wlbm-primary-hover: #4338ca;
    --wlbm-secondary: #64748b;
    --wlbm-success: #10b981;
    --wlbm-info: #0ea5e9;
    --wlbm-warning: #f59e0b;
    --wlbm-danger: #ef4444;
    --wlbm-bg: #f8fafc;
    --wlbm-card-bg: #ffffff;
    --wlbm-text-main: #1e293b;
    --wlbm-text-muted: #64748b;
    --wlbm-border: #e2e8f0;
    --wlbm-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --wlbm-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --wlbm-radius: 0.75rem;
    --wlbm-btn-radius: 0.5rem;
}

.wlbm-modern-dashboard {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--wlbm-text-main);
    background-color: var(--wlbm-bg);
    padding: 1.5rem;
    border-radius: var(--wlbm-radius);
}

/* Header Section */
.wlbm-header-card {
    background: linear-gradient(135deg, var(--wlbm-primary) 0%, #6366f1 100%);
    color: white;
    padding: 2.5rem;
    border-radius: var(--wlbm-radius);
    text-align: center;
    box-shadow: var(--wlbm-shadow);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.wlbm-header-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(30deg);
    pointer-events: none;
}

.wlbm-header-card h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    color: white;
}

.wlbm-header-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.wlbm-shortcode-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-family: monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Stats Grid */
.wlbm-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.wlbm-modern-stat-item {
    background: var(--wlbm-card-bg);
    border-radius: var(--wlbm-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: var(--wlbm-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--wlbm-border);
    text-decoration: none !important;
}

.wlbm-modern-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--wlbm-shadow-hover);
    border-color: var(--wlbm-primary);
}

.wlbm-stat-icon-wrapper {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1.25rem;
}

/* Stat Colors */
.stat-buildings {
    background-color: #ecfdf5;
    color: #059669;
}

.stat-flats {
    background-color: #eff6ff;
    color: #2563eb;
}

.stat-suppliers {
    background-color: #fef2f2;
    color: #dc2626;
}

.stat-clients {
    background-color: #f5f3ff;
    color: #7c3aed;
}

.stat-total-complaints {
    background-color: #fffbeb;
    color: #d97706;
}

.stat-resolved {
    background-color: #f0fdf4;
    color: #16a34a;
}

.wlbm-stat-info {
    flex: 1;
}

.wlbm-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wlbm-text-main);
    line-height: 1;
}

.wlbm-stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wlbm-text-muted);
    margin-top: 0.25rem;
}

/* Recent Activities Section */
.wlbm-header-card h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.wlbm-header-card h1 span.text-secondary {
    color: rgba(255, 255, 255, 0.7) !important;
    margin-left: 0.5rem;
}

.wlbm-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    color: var(--wlbm-text-main);
}

.wlbm-section-title i {
    margin-right: 0.75rem;
    color: var(--wlbm-primary);
}

.wlbm-activity-card {
    background: var(--wlbm-card-bg);
    border-radius: var(--wlbm-radius);
    box-shadow: var(--wlbm-shadow);
    border: 1px solid var(--wlbm-border);
    margin-bottom: 2rem;
    overflow: hidden;
}

.wlbm-activity-header {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--wlbm-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wlbm-activity-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--wlbm-text-main);
}

.wlbm-activity-header i {
    color: var(--wlbm-primary);
}

.wlbm-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wlbm-list-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--wlbm-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

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

.wlbm-list-item:hover {
    background-color: #f1f5f9;
}

.wlbm-item-link {
    font-weight: 600;
    color: var(--wlbm-primary);
    text-decoration: none !important;
}

.wlbm-item-link:hover {
    color: var(--wlbm-primary-hover);
}

.wlbm-item-date {
    font-size: 0.8125rem;
    color: var(--wlbm-text-muted);
}

.wlbm-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--wlbm-text-muted);
}

.wlbm-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .wlbm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wlbm-modern-dashboard {
        padding: 1rem;
    }

    .wlbm-header-card {
        padding: 1.5rem;
    }

    .wlbm-header-card h1 {
        font-size: 1.75rem;
    }

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

    .wlbm-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .wlbm-item-date {
        margin-top: 0.5rem;
    }
}

/* Modern Tables */
.wlbm-modern-table-card {
    background: var(--wlbm-card-bg);
    border-radius: var(--wlbm-radius);
    box-shadow: var(--wlbm-shadow);
    border: 1px solid var(--wlbm-border);
    margin-top: 1.5rem;
    position: relative;
    overflow: visible;
    z-index: 1;
}

/* Ensure the card being interacted with is always on top of other cards */
.wlbm-modern-table-card:focus-within {
    z-index: 10 !important;
}

.wlbm-table-header {
    background: #f8fafc;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--wlbm-border);
}

.wlbm-table-info {
    color: var(--wlbm-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.wlbm-table-container {
    padding: 1rem;
}

table.wlbm-modern-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0 !important;
}

table.wlbm-modern-table thead th {
    background: #f1f5f9;
    color: var(--wlbm-text-main);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--wlbm-border);
}

table.wlbm-modern-table tbody td {
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid var(--wlbm-border);
    vertical-align: middle;
    color: var(--wlbm-text-main);
    font-size: 0.9375rem;
}

table.wlbm-modern-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Action Buttons */
.wlbm-action-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    margin-right: 0.5rem;
    border: 1px solid transparent;
}

.wlbm-action-view {
    background: #f0f9ff;
    color: #0ea5e9;
    border-color: #e0f2fe;
}

.wlbm-action-edit {
    background: #f5f3ff;
    color: #6366f1;
    border-color: #ede9fe;
}

.wlbm-action-delete {
    background: #fff1f2;
    color: #f43f5e;
    border-color: #ffe4e6;
}

.wlbm-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: white !important;
}

.wlbm-action-btn:hover i {
    color: white !important;
}

.wlbm-action-view:hover {
    color: white;
    background: #0ea5e9;
    border-color: #0ea5e9;
}

.wlbm-action-edit:hover {
    color: white;
    background: #6366f1;
    border-color: #6366f1;
}

.wlbm-action-delete:hover {
    color: white;
    background: #f43f5e;
    border-color: #f43f5e;
}

/* DataTables Overrides */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 1rem 0;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--wlbm-border);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 1.5rem !important;
    color: var(--wlbm-text-muted) !important;
    font-size: 0.8125rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 1.5rem !important;
}

.dt-buttons .btn-secondary {
    background: #f1f5f9;
    border: 1px solid var(--wlbm-border);
    color: var(--wlbm-text-main);
    border-radius: 0.5rem;
    margin-right: 0.5rem;
}

/* Premium Buttons & Bootstrap Overrides */
.wlbm .btn-primary,
.wlbm .wlbm-btn-primary {
    background: var(--wlbm-primary) !important;
    color: white !important;
    padding: 0.625rem 1.5rem !important;
    border-radius: var(--wlbm-btn-radius) !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -2px rgba(79, 70, 229, 0.1) !important;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    cursor: pointer;
}

.wlbm .btn-primary:hover,
.wlbm .wlbm-btn-primary:hover {
    background: var(--wlbm-primary-hover) !important;
    color: white !important;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3), 0 4px 6px -4px rgba(79, 70, 229, 0.2) !important;
    transform: translateY(-2px);
}

.wlbm .btn-info,
.wlbm .wlbm-btn-secondary {
    background: white !important;
    color: var(--wlbm-primary) !important;
    padding: 0.625rem 1.5rem !important;
    border-radius: var(--wlbm-btn-radius) !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid var(--wlbm-primary) !important;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.wlbm .btn-info:hover,
.wlbm .wlbm-btn-secondary:hover {
    background: var(--wlbm-primary) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(79, 70, 229, 0.2) !important;
}

/* Header Card Specific Button Fixes */
.wlbm-header-card .wlbm-btn-secondary,
.wlbm-header-card .btn-info,
.wlbm-header-card .btn-secondary {
    background: rgba(255, 255, 255, 0.12) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(8px);
    box-shadow: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.wlbm-header-card .wlbm-btn-secondary:hover,
.wlbm-header-card .btn-info:hover,
.wlbm-header-card .btn-secondary:hover {
    background: white !important;
    color: var(--wlbm-primary) !important;
    border-color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

.wlbm-header-card .wlbm-btn-secondary i,
.wlbm-header-card .btn-info i,
.wlbm-header-card .btn-secondary i {
    color: inherit !important;
}



/* Specific fix for "Add New" button in table headers */
.wlbm-table-header .wlbm-btn-primary,
.wlbm-table-header .btn-primary {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
}

/* Utility Classes */
.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--wlbm-shadow-hover) !important;
}

.bg-soft-primary {
    background-color: rgba(79, 70, 229, 0.08) !important;
}

.bg-soft-success {
    background-color: rgba(16, 185, 129, 0.08) !important;
}

.bg-soft-warning {
    background-color: rgba(245, 158, 11, 0.08) !important;
}

.bg-soft-danger {
    background-color: rgba(239, 68, 68, 0.08) !important;
}

.leading-relaxed {
    line-height: 1.625;
}

.custom-file-upload {
    transition: all 0.3s ease;
    cursor: pointer;
}

.custom-file-upload:hover {
    background-color: #f1f5f9 !important;
    border-color: var(--wlbm-primary) !important;
}

/* Form Styles */
.wlbm .form-control {
    border-radius: 0.5rem;
    border: 1px solid var(--wlbm-border);
    padding: 0.6rem 0.875rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wlbm .form-control:focus {
    border-color: var(--wlbm-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.wlbm .input-group-text {
    border-radius: 0.5rem 0 0 0.5rem;
    border: 1px solid var(--wlbm-border);
}

.wlbm label {
    margin-bottom: 0.5rem;
    color: var(--wlbm-text-main);
}

/* --- Property Card & Frontend Components --- */
.wlbm-modern-public {
    color: #334155;
    line-height: 1.6;
}

.wlbm-property-card {
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.wlbm-property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

.wlbm-property-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wlbm-property-card:hover .wlbm-property-image-wrapper img {
    transform: scale(1.1);
}

.wlbm-property-price-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 800;
    color: #4f46e5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.wlbm-property-badge-type {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #4f46e5;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

.wlbm-property-content {
    padding: 1.25rem;
}

.wlbm-property-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wlbm-property-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.wlbm-property-title a:hover {
    color: #4f46e5;
}

.wlbm-property-excerpt {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.wlbm-property-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.75rem;
    color: #64748b;
}

.wlbm-property-spec-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.wlbm-property-spec-item i {
    color: #94a3b8;
}

.wlbm-property-footer {
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Detail Page Specifics */
.wlbm-property-snapshot-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.wlbm-property-snapshot-header {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4f46e5;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
}

.wlbm-property-snapshot-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8fafc;
}

.wlbm-property-snapshot-item:last-child {
    border-bottom: none;
}

.wlbm-property-snapshot-icon {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    margin-right: 0.75rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.wlbm-property-snapshot-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    line-height: 1;
}

.wlbm-property-snapshot-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.9rem;
    margin-top: 0.1rem;
}