/* Sidebar Custom Colors */
.main-sidebar,
.sidebar {
    background-color: #1F2937 !important;
}

/* Hide sidebar scrollbar */
.wrapper .main-sidebar,
.wrapper .sidebar,
.main-sidebar,
.sidebar {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.wrapper .main-sidebar::-webkit-scrollbar,
.wrapper .sidebar::-webkit-scrollbar,
.main-sidebar::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Hide overlay scrollbars */
.wrapper .main-sidebar .os-scrollbar,
.wrapper .sidebar .os-scrollbar,
.main-sidebar .os-scrollbar,
.sidebar .os-scrollbar {
    display: none !important;
}

.wrapper .main-sidebar .os-viewport,
.wrapper .sidebar .os-viewport,
.main-sidebar .os-viewport,
.sidebar .os-viewport {
    overflow: hidden !important;
}

/* Active menu item */
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active,
.sidebar-dark-primary .nav-sidebar .nav-link.active,
.nav-sidebar .nav-item>.nav-link.active,
.nav-sidebar .nav-link.active,
.nav-sidebar .nav-item.menu-open>.nav-link,
.nav-sidebar .nav-item.menu-is-opening>.nav-link {
    background-color: #206BC4 !important;
    color: #fff !important;
}

/* Active menu item icons */
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active i,
.sidebar-dark-primary .nav-sidebar .nav-link.active i,
.nav-sidebar .nav-item>.nav-link.active i,
.nav-sidebar .nav-link.active i,
.nav-sidebar .nav-item.menu-open>.nav-link i,
.nav-sidebar .nav-item.menu-is-opening>.nav-link i {
    color: #fff !important;
}

/* Hover effect */
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link:hover,
.sidebar-dark-primary .nav-sidebar .nav-link:hover,
.nav-sidebar .nav-item>.nav-link:hover,
.nav-sidebar .nav-link:hover {
    background-color: rgba(32, 107, 196, 0.15) !important;
    color: #206BC4 !important;
}

/* Default menu item color */
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link,
.sidebar-dark-primary .nav-sidebar .nav-link,
.nav-sidebar .nav-item>.nav-link,
.nav-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    letter-spacing: 0 !important;
}

/* Submenu active items */
.nav-sidebar .nav-treeview>.nav-item>.nav-link.active,
.nav-sidebar .nav-treeview .nav-link.active {
    background-color: #206BC4 !important;
    color: #fff !important;
    border-left-color: #206BC4 !important;
}

/* Submenu hover */
.nav-sidebar .nav-treeview>.nav-item>.nav-link:hover,
.nav-sidebar .nav-treeview .nav-link:hover {
    background-color: rgba(32, 107, 196, 0.1) !important;
    color: #206BC4 !important;
}

/* Brand/Logo area */
.sidebar-dark-primary .brand-link,
.main-sidebar .brand-link {
    background-color: #1F2937 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Modern Form Styles */
.form-content-wrapper {
    width: 100%;
}

.content-section {
    width: 100%;
    margin-bottom: 1rem;
}

.section-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 100%;
}

.section-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

/* Custom Table Styles */
table.dataTable thead th,
table.table thead th {
    font-weight: 700 !important;
    color: #000 !important;
    /* Force black headers */
    vertical-align: middle !important;
}

table.dataTable tbody td,
table.table tbody td {
    font-weight: 400 !important;
    color: inherit;
    /* Maintain default text color usually gray/black but not forced black if not needed */
    vertical-align: middle !important;
}

/* Ensure price and other specific columns are not bold */
table.dataTable tbody td strong,
table.dataTable tbody td b {
    font-weight: 400 !important;
    /* Override strong tags in table cells */
}

/* Table Action Buttons — generic icon buttons outside grouped toolbar */
table.dataTable .btn-xs,
table.table .btn-xs {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.2rem 0.5rem !important;
}

table.dataTable .btn-xs i,
table.table .btn-xs i {
    font-size: 0.85rem !important;
}

table.dataTable .btn-xs:hover,
table.table .btn-xs:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 4px;
}

/* Form Section Titles */
.section-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700 !important;
    /* Make section titles bold */
    color: #2d3748;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 0.5rem;
    color: #667eea;
    font-size: 0.9rem;
}

.section-body {
    padding: 1rem;
}

/* Ensure columns take full width */
.section-body .row {
    margin-left: 0;
    margin-right: 0;
}

.section-body .row>[class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.form-group-modern {
    margin-bottom: 1rem;
}

.form-label-modern {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.form-label-modern i {
    margin-right: 0.4rem;
    color: #667eea;
    width: 16px;
    font-size: 0.85rem;
}

.form-control-modern {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.form-control-modern:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-control-modern.is-invalid {
    border-color: #e53e3e;
}

/* Ensure all input types take full width */
.form-group-modern input[type="text"],
.form-group-modern input[type="number"],
.form-group-modern input[type="email"],
.form-group-modern input[type="url"],
.form-group-modern input[type="date"],
.form-group-modern input[type="time"],
.form-group-modern input[type="datetime-local"],
.form-group-modern textarea,
.form-group-modern select {
    width: 100%;
    box-sizing: border-box;
}

/* Ensure form-group takes full width of column */
.form-group-modern {
    width: 100%;
}

.custom-file-modern {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 0;
}

.custom-file-input-modern {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.custom-file-label-modern {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.custom-file-input-modern:focus~.custom-file-label-modern {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-file-label-modern::after {
    position: absolute;
    top: -1.5px;
    /* Account for border */
    right: -1.5px;
    bottom: -1.5px;
    z-index: 3;
    display: flex;
    align-items: center;
    padding: 0.375rem 1rem;
    line-height: 1.5;
    color: #fff;
    content: "Browse";
    background-color: #667eea;
    border-left: 1.5px solid #e2e8f0;
    border-radius: 0 6px 6px 0;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-file-input-modern:hover~.custom-file-label-modern::after {
    background-color: #5a67d8;
}

/* RTL Support */
html[dir="rtl"] .custom-file-label-modern::after {
    right: auto;
    left: -1.5px;
    border-left: none;
    border-right: 1.5px solid #e2e8f0;
    border-radius: 6px 0 0 6px;
    content: "استعراض";
}

html[dir="rtl"] .custom-file-label-modern {
    text-align: right;
    padding-left: 6rem;
    /* Space for the button */
    padding-right: 0.75rem;
}

/* Video Upload Styling */
.video-upload-wrapper {
    position: relative;
    width: 100%;
}

.video-file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
}

.video-upload-label {
    display: block;
    width: 100%;
    min-height: 120px;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.video-upload-label:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.video-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.video-upload-content i {
    font-size: 2.5rem;
    color: #28a745;
    margin-bottom: 0.5rem;
}

.video-upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.video-upload-text strong {
    color: #2d3748;
    font-size: 0.95rem;
    font-weight: 600;
}

.video-upload-text small {
    color: #718096;
    font-size: 0.8rem;
}

.video-file-input:focus+.video-upload-label {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.video-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.video-preview-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.video-preview-info i {
    color: #e53e3e;
    font-size: 1.25rem;
}

.video-preview-info span {
    color: #4a5568;
    font-size: 0.875rem;
    font-weight: 500;
}

.switch-modern {
    padding: 0.35rem 0;
}

.switch-modern .custom-control-label {
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.85rem;
}

.switch-modern .custom-control-label i {
    margin-right: 0.4rem;
    color: #667eea;
    font-size: 0.85rem;
}

.btn-primary-modern {
    background: #28a745;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    color: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.25);
    font-size: 0.875rem;
}

.btn-primary-modern:hover {
    background: #218838;
    box-shadow: 0 3px 12px rgba(40, 167, 69, 0.35);
    color: #fff;
}

.btn-success-modern {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    color: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.25);
    font-size: 0.875rem;
}

.btn-success-modern:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    box-shadow: 0 3px 12px rgba(40, 167, 69, 0.35);
    color: #fff;
}

.btn-success-modern.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8rem;
}

.btn-secondary-modern {
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-secondary-modern:hover {
    background: #cbd5e0;
    color: #2d3748;
}

.btn-danger-modern {
    background: #e53e3e;
    border: none;
    border-radius: 6px;
    color: #fff;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-danger-modern:hover {
    background: #c53030;
    transform: translateY(-1px);
}

/* File Preview Card */
.file-preview-card {
    display: inline-block;
}

.file-preview-image-container {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s ease;
}

.file-preview-image-container:hover {
    border-color: #cbd5e0;
}

.file-preview-img {
    display: block;
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

/* Image + filename (e.g. property gallery existing files) */
.file-preview-image-row {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.5rem 0.35rem 0.35rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-width: 100%;
}

.file-preview-image-container--row {
    flex-shrink: 0;
}

.file-preview-img--row {
    width: 52px;
    height: 52px;
    max-width: 52px;
    max-height: 52px;
    object-fit: cover;
}

.file-preview-filename {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #2d3748;
    line-height: 1.3;
    word-break: break-word;
    min-width: 0;
    flex: 1;
    max-width: 220px;
}

html[dir="rtl"] .file-preview-image-row {
    flex-direction: row-reverse;
}

/* Gallery grid: uniform tiles, no filename (compactGallery) */
.file-preview-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 96px);
    gap: 0.65rem;
    max-width: 100%;
}

.file-preview-gallery-tile {
    position: relative;
}

.file-preview-image-container--gallery {
    width: 96px;
    height: 96px;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
}

.file-preview-img--gallery {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.file-preview-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e53e3e;
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 10px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(229, 62, 62, 0.4);
    transition: all 0.2s ease;
    z-index: 5;
    opacity: 0;
}

.file-preview-image-container:hover .file-preview-remove-btn {
    opacity: 1;
}

.file-preview-remove-btn:hover {
    background: #c53030;
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(229, 62, 62, 0.5);
}

.file-preview-remove-btn i {
    font-size: 9px;
}

/* RTL support for remove button */
html[dir="rtl"] .file-preview-remove-btn {
    right: auto;
    left: -8px;
}

/* Non-image file preview */
.file-preview-file-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
}

.file-preview-file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.file-preview-file-info i {
    color: #667eea;
    font-size: 1rem;
}

.file-preview-file-info span {
    color: #4a5568;
    font-size: 0.825rem;
    font-weight: 500;
}

.file-preview-remove-btn-inline {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: transparent;
    color: #a0aec0;
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 10px;
    transition: all 0.2s ease;
}

.file-preview-remove-btn-inline:hover {
    background: #e53e3e;
    color: #fff;
    border-color: #e53e3e;
    transform: scale(1.1);
}

.form-footer-modern {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.alert-modern {
    border-radius: 6px;
    border: none;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    font-size: 0.875rem;
}

.flag-icon {
    width: 20px;
    height: 15px;
    margin-right: 5px;
    border-radius: 3px;
    object-fit: cover;
}

/* Language switcher flag in navbar */
.nav-item.dropdown .nav-link img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    vertical-align: middle;
    display: inline-block;
}

.nav-item.dropdown .dropdown-item img.flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    vertical-align: middle;
    display: inline-block;
}

/* Amenities Grid */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.amenity-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1.5px solid #e2e8f0;
}

.amenity-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.amenity-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    object-fit: contain;
}

.amenity-icon-placeholder {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    color: #cbd5e0;
}

/* Prevent horizontal scrollbar */
body {
    overflow-x: hidden;
}


/* Select2 Modern Style */
.select2-container--bootstrap4 {
    width: 100% !important;
}

.select2-container--bootstrap4 .select2-selection {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    height: 40px !important;
    /* Unify height to ~40px */
    font-size: 0.9rem !important;
    width: 100%;
    display: flex !important;
    align-items: center !important;
    padding-left: 0.5rem !important;
}

.select2-container--bootstrap4 .select2-selection:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select2-container--bootstrap4 .select2-selection__rendered {
    line-height: normal !important;
    color: #4a5568 !important;
    padding-left: 0 !important;
}

.select2-container--bootstrap4 .select2-selection__arrow {
    height: 38px !important;
    /* Match container height minus borders */
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 5px !important;
}

.select2-container {
    width: 100% !important;
}

/* Fix Select2 dropdown overflow */
.select2-dropdown {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    z-index: 9999;
}

.select2-container--open .select2-dropdown {
    left: 0;
}

/* Ensure Select2 dropdown doesn't cause horizontal scroll */
.select2-results {
    font-size: 0.9rem;
}

.select2-results__option {
    padding: 8px 12px;
    /* Comfortable padding for options */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Standard Select & Input Height */
select.form-control,
input[type="text"].form-control,
input[type="number"].form-control,
input[type="email"].form-control,
input[type="password"].form-control,
input[type="search"].form-control {
    height: 40px !important;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

/* Floor Plan Item */
.floor-plan-item {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.floor-plan-item .card-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-bottom: 1.5px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.floor-plan-item .card-header h5 {
    font-size: 0.9rem;
    margin: 0;
}

/* SEO Preview */
.seo-preview-wrapper {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

.seo-preview-wrapper h6 {
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.seo-preview-wrapper h6 i {
    margin-right: 0.5rem;
    color: #667eea;
}

.seo-preview-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.seo-preview-url {
    font-size: 0.75rem;
    color: #006621;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.seo-preview-domain {
    color: #006621;
}

.seo-preview-path {
    color: #545454;
}

.seo-preview-title {
    font-size: 1.25rem;
    color: #1a0dab;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.seo-preview-title:hover {
    text-decoration: underline;
}

.seo-preview-description {
    font-size: 0.875rem;
    color: #545454;
    line-height: 1.5;
    word-wrap: break-word;
}

.seo-preview-image {
    margin-top: 0.75rem;
}

.seo-preview-image img {
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* Custom Table Styles */
table.dataTable thead th,
table.table thead th {
    font-weight: 700 !important;
    vertical-align: middle !important;
}

table.dataTable tbody td,
table.table tbody td {
    font-weight: 400 !important;
    vertical-align: middle !important;
}

/* ============================================
   RESPONSIVE STYLES - Professional Mobile UI
   ============================================ */

/* --- Tablet & Below (max 991.98px) --- */
@media (max-width: 991.98px) {

    /* Content wrapper full width on mobile */
    .content-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .main-header .navbar {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .main-footer {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Sidebar overlay improvements */
    .main-sidebar {
        z-index: 1050;
        transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
    }

    body.sidebar-open .main-sidebar {
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3);
    }

    /* Content header */
    .content-header {
        padding: 0.75rem 1rem;
    }

    .content-header .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .content-header h1 {
        font-size: 1.1rem;
        flex: 1;
    }

    .content-header .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.75rem;
    }

    /* Content padding */
    .content {
        padding: 0.5rem !important;
    }

    .content>.container-fluid {
        padding: 0;
    }

    /* Section cards */
    .section-card {
        border-radius: 6px;
        margin-bottom: 0.75rem !important;
    }

    .section-header {
        padding: 0.6rem 0.75rem;
    }

    .section-body {
        padding: 0.75rem;
    }

    .section-title {
        font-size: 0.85rem;
    }

    /* Form improvements */
    .form-content-wrapper {
        padding: 0;
    }

    .form-group-modern {
        margin-bottom: 0.75rem;
    }

    .form-label-modern {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    .form-control-modern {
        font-size: 0.85rem;
        padding: 0.45rem 0.65rem;
    }

    /* Cards */
    .card {
        margin-bottom: 0.75rem;
        border-radius: 6px;
    }

    .card-header {
        padding: 0.5rem 0.75rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    /* Tab navigation */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs .nav-item {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* --- Mobile (max 767.98px) --- */
@media (max-width: 767.98px) {

    /* Make cols stack properly */
    .row>[class*="col-md-"],
    .row>[class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Content header */
    .content-header h1 {
        font-size: 1rem;
        word-break: break-word;
    }

    /* Section */
    .section-body {
        padding: 0.5rem;
    }

    .section-body .row {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }

    .section-body .row>[class*="col-"] {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    /* Form footer */
    .form-footer-modern {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .form-footer-modern .btn {
        width: 100%;
        justify-content: center;
    }

    /* Tables responsive */
    .table-responsive {
        border: 0;
    }

    table.dataTable {
        font-size: 0.8rem;
    }

    table.dataTable thead th {
        font-size: 0.75rem;
        padding: 0.5rem 0.5rem;
        white-space: nowrap;
    }

    table.dataTable tbody td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    /* DataTables controls */
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .dataTables_wrapper .dataTables_info {
        text-align: center;
        float: none;
    }

    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        float: none;
        margin-top: 0.5rem;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        margin: 0.1rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }

    /* DataTables buttons */
    .dt-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        justify-content: center;
    }

    .dt-buttons .btn {
        margin-right: 0 !important;
        margin-bottom: 0.25rem;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Alert */
    .alert {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Select2 */
    .select2-container {
        width: 100% !important;
    }

    /* Amenities grid */
    .amenities-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Bulk actions: responsive rules in bulk-actions.css */

    /* SEO Preview */
    .seo-preview-card {
        max-width: 100%;
    }

    /* Table actions — compact on small screens */
    .table-actions .btn,
    .table-actions .table-action-btn,
    table.dataTable .table-actions .btn,
    table.dataTable .table-actions .table-action-btn {
        width: 1.75rem;
        height: 1.75rem;
        min-width: 1.75rem;
    }

    .table-actions .btn i,
    table.dataTable .table-actions .btn i {
        font-size: 0.76rem !important;
    }

    /* Navbar */
    .main-header .navbar {
        padding: 0.25rem 0.5rem;
    }

    .main-header .navbar-nav .nav-link {
        padding: 0.4rem 0.5rem;
    }

    /* Video upload */
    .video-upload-label {
        min-height: 80px;
        padding: 1rem;
    }

    .video-upload-content i {
        font-size: 1.75rem;
    }
}

/* --- Small Mobile (max 575.98px) --- */
@media (max-width: 575.98px) {
    .content {
        padding: 0.25rem !important;
    }

    .content-header {
        padding: 0.5rem;
    }

    .content-header h1 {
        font-size: 0.9rem;
    }

    .content-header h1 i {
        font-size: 0.85rem;
    }

    .section-body {
        padding: 0.35rem;
    }

    .form-control-modern,
    .form-control {
        font-size: 0.85rem;
    }

    /* Cards */
    .card {
        border-radius: 4px;
    }

    .card-body {
        padding: 0.5rem;
    }

    .card-header {
        padding: 0.4rem 0.5rem;
    }

    /* Buttons */
    .btn {
        font-size: 0.8rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }

    /* Switch modern */
    .switch-modern .custom-control-label {
        font-size: 0.8rem;
    }
}

/* DataTables Professional Styling */
.dataTables_wrapper {
    padding: 1rem 0;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.dataTables_wrapper .dataTables_info {
    color: #718096;
    font-size: 0.75rem;
    padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
    font-size: 0.75rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.25rem 0.5rem;
    margin: 0 0.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #4a5568 !important;
    background: #fff !important;
    transition: none;
    box-shadow: none !important;
    font-size: 0.75rem;
    min-width: auto;
    line-height: 1.5;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #fff !important;
    border-color: #e2e8f0;
    color: #4a5568 !important;
    box-shadow: none !important;
    transform: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #667eea !important;
    border-color: #667eea !important;
    color: #fff !important;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* DataTables Buttons Styling */
.dt-buttons {
    margin-bottom: 1rem;
}

.dt-buttons .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    transition: none;
    box-shadow: none !important;
}

.dt-buttons .btn:hover {
    transform: none;
    box-shadow: none !important;
}

/* Table Checkbox Styling */
.table-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.table-checkbox:checked {
    background-color: #667eea;
    border-color: #667eea;
}

/* Bulk actions bar: see public/css/bulk-actions.css (loaded on index pages) */

/* Enhanced Table Styling */
table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0;
    width: 100% !important;
}

table.dataTable thead th {
    background: #f8f9fa !important;
    color: #4a5568 !important;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0 !important;
    text-transform: none;
    letter-spacing: normal;
}

table.dataTable thead th:first-child {
    border-top-left-radius: 8px;
}

table.dataTable thead th:last-child {
    border-top-right-radius: 8px;
}

table.dataTable tbody tr {
    transition: none !important;
    background-color: transparent !important;
}

table.dataTable tbody tr:hover {
    background-color: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

table.dataTable tbody tr:hover td {
    background-color: transparent !important;
}

table.dataTable tbody tr td {
    background-color: transparent !important;
}

/* Remove all hover effects from DataTables */
table.dataTable tbody tr:hover,
table.dataTable tbody tr:hover td,
table.dataTable tbody tr:hover th {
    background-color: transparent !important;
    color: inherit !important;
}

/* Striped row background colors - Light gray alternating */
table.dataTable.stripe tbody tr.odd,
table.dataTable.stripe tbody tr.odd td,
table.dataTable.stripe tbody tr.odd th,
table.dataTable.display tbody tr.odd,
table.dataTable.display tbody tr.odd td,
table.dataTable.display tbody tr.odd th {
    background-color: #f8f9fa !important;
    background: #f8f9fa !important;
}

table.dataTable.stripe tbody tr.even,
table.dataTable.stripe tbody tr.even td,
table.dataTable.stripe tbody tr.even th,
table.dataTable.display tbody tr.even,
table.dataTable.display tbody tr.even td,
table.dataTable.display tbody tr.even th {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* Keep hover effects transparent - no color change on hover */
table.dataTable.stripe tbody tr.odd:hover,
table.dataTable.stripe tbody tr.odd:hover td,
table.dataTable.stripe tbody tr.odd:hover th,
table.dataTable.stripe tbody tr.even:hover,
table.dataTable.stripe tbody tr.even:hover td,
table.dataTable.stripe tbody tr.even:hover th,
table.dataTable.display tbody tr.odd:hover,
table.dataTable.display tbody tr.odd:hover td,
table.dataTable.display tbody tr.odd:hover th,
table.dataTable.display tbody tr.even:hover,
table.dataTable.display tbody tr.even:hover td,
table.dataTable.display tbody tr.even:hover th {
    background-color: inherit !important;
    background: inherit !important;
    color: inherit !important;
}

/* Ensure base row colors */
table.dataTable tbody tr.odd,
table.dataTable tbody tr.odd td,
table.dataTable tbody tr.odd th {
    background-color: #f8f9fa !important;
}

table.dataTable tbody tr.even,
table.dataTable tbody tr.even td,
table.dataTable tbody tr.even th {
    background-color: #ffffff !important;
}

/* No hover color change */
table.dataTable tbody tr:hover,
table.dataTable tbody tr:hover td,
table.dataTable tbody tr:hover th {
    background-color: inherit !important;
    background: inherit !important;
}

/* Remove shadows from all buttons in DataTables */
table.dataTable .btn,
table.dataTable .btn-xs,
table.dataTable .btn-sm,
table.dataTable .btn-default,
table.dataTable .btn-primary,
table.dataTable .btn-secondary,
table.dataTable .btn-success,
table.dataTable .btn-danger,
table.dataTable .btn-warning,
table.dataTable .btn-info {
    box-shadow: none !important;
    text-shadow: none !important;
}

table.dataTable .btn:hover,
table.dataTable .btn:focus,
table.dataTable .btn:active,
table.dataTable .btn-xs:hover,
table.dataTable .btn-sm:hover {
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
}

/* Remove all shadows and hover effects from buttons with shadow class */
table.dataTable .btn.shadow,
table.dataTable .btn-xs.shadow,
table.dataTable .btn-sm.shadow,
.shadow {
    box-shadow: none !important;
}

table.dataTable .btn.shadow:hover,
table.dataTable .btn-xs.shadow:hover,
table.dataTable .btn-sm.shadow:hover,
.shadow:hover {
    box-shadow: none !important;
    transform: none !important;
}

/* Remove hover effects from all elements in table */
table.dataTable * {
    transition: none !important;
}

table.dataTable *:hover {
    transform: none !important;
    box-shadow: none !important;
}

table.dataTable tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

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

/* Property list: expiration column (badge + date) */
.expiration-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
    max-width: 14rem;
}

.expiration-cell__date {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #4a5568;
}

.expiration-cell__date-label {
    color: #718096;
    font-weight: 500;
    margin-inline-end: 0.2rem;
}

.expiration-cell__date--muted {
    color: #a0aec0;
    font-size: 0.8125rem;
}

/* Action buttons in table — inline, no wrapper card, compact */
.table-actions,
table.dataTable .table-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.1rem;
    padding: 0;
    margin: 0;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    vertical-align: middle;
}

.table-actions .table-action-btn,
.table-actions .btn,
table.dataTable .table-actions .table-action-btn,
table.dataTable .table-actions .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 1.95rem;
    height: 1.95rem;
    min-width: 1.95rem;
    padding: 0 !important;
    margin: 0 2px 0 0 !important;
    border: none !important;
    border-radius: 4px !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: background-color 0.1s ease, color 0.1s ease !important;
}

.table-actions .table-action-btn:last-child,
.table-actions .btn:last-child,
table.dataTable .table-actions .table-action-btn:last-child,
table.dataTable .table-actions .btn:last-child {
    margin-right: 0 !important;
}

.table-actions .table-action-btn i,
.table-actions .btn i,
table.dataTable .table-actions .table-action-btn i,
table.dataTable .table-actions .btn i {
    font-size: 0.84rem !important;
    line-height: 1;
}

.table-actions .table-action-btn:hover,
.table-actions .btn:hover,
table.dataTable .table-actions .table-action-btn:hover,
table.dataTable .table-actions .btn:hover {
    transform: none !important;
    box-shadow: none !important;
}

.table-actions .text-success:hover,
.table-actions .btn.text-success:hover,
table.dataTable .table-actions .text-success:hover,
table.dataTable .table-actions .btn.text-success:hover {
    background: rgba(56, 161, 105, 0.12) !important;
    color: #276749 !important;
}

.table-actions .text-warning:hover,
.table-actions .btn.text-warning:hover,
table.dataTable .table-actions .text-warning:hover,
table.dataTable .table-actions .btn.text-warning:hover {
    background: rgba(214, 158, 46, 0.15) !important;
    color: #c05621 !important;
}

.table-actions .text-primary:hover,
.table-actions .btn.text-primary:hover,
table.dataTable .table-actions .text-primary:hover,
table.dataTable .table-actions .btn.text-primary:hover {
    background: rgba(49, 130, 206, 0.12) !important;
    color: #2c5282 !important;
}

.table-actions .text-danger:hover,
.table-actions .btn.text-danger:hover,
table.dataTable .table-actions .text-danger:hover,
table.dataTable .table-actions .btn.text-danger:hover {
    background: rgba(229, 62, 62, 0.1) !important;
    color: #c53030 !important;
}

.table-actions .text-info:hover,
.table-actions .btn.text-info:hover,
table.dataTable .table-actions .text-info:hover,
table.dataTable .table-actions .btn.text-info:hover {
    background: rgba(56, 178, 172, 0.12) !important;
    color: #285e61 !important;
}

.table-actions .text-secondary:hover,
.table-actions .btn.text-secondary:hover,
table.dataTable .table-actions .text-secondary:hover,
table.dataTable .table-actions .btn.text-secondary:hover {
    background: rgba(113, 128, 150, 0.12) !important;
}

.table-actions .text-muted:hover,
.table-actions .btn.text-muted:hover,
table.dataTable .table-actions .text-muted:hover,
table.dataTable .table-actions .btn.text-muted:hover {
    background: rgba(113, 128, 150, 0.1) !important;
    color: #4a5568 !important;
}

/* Remove all shadows and hover effects from table buttons */
table.dataTable .btn,
table.dataTable .btn:hover,
table.dataTable .btn:focus,
table.dataTable .btn:active {
    box-shadow: none !important;
    transform: none !important;
}

/* Remove hover effects from all table elements */
table.dataTable tbody tr td,
table.dataTable tbody tr td:hover,
table.dataTable thead th,
table.dataTable thead th:hover {
    transition: none !important;
}

table.dataTable tbody tr:hover td {
    background-color: transparent !important;
}

/* Select All Checkbox */
.select-all-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Modern Tag Selector Styling */
.select2-container--bootstrap4 .select2-selection--multiple {
    min-height: 38px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding-bottom: 2px !important;
    padding-left: 6px !important;
    background-color: #fff !important;
    transition: all 0.2s ease;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection--multiple {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    background-color: #3b82f6 !important;
    border: none !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 2px 10px !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    margin-right: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: background-color 0.2s ease;
    height: 24px !important;
    line-height: normal !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff !important;
    margin-right: 6px !important;
    margin-left: 0 !important;
    font-weight: bold !important;
    order: 2 !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline {
    flex: 1 !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-search__field {
    margin-top: 0 !important;
    height: 24px !important;
    line-height: 24px !important;
    font-size: 0.875rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
}

/* Image/Icon Preview Styling */
.icon-preview-wrapper,
.image-preview-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
}

.icon-preview-wrapper:hover,
.image-preview-wrapper:hover {
    border-color: #667eea;
    background: #f8faff;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.05);
}

.icon-preview-thumbnail,
.image-preview-thumbnail {
    max-width: 100%;
    max-height: 120px;
    border-radius: 6px;
    object-fit: contain;
    transition: all 0.3s ease;
    background-color: transparent;
}

/* Specific styling for icon thumbnails (smaller) */
.icon-preview-thumbnail {
    max-width: 64px;
    max-height: 64px;
}

.icon-preview-thumbnail:hover,
.image-preview-thumbnail:hover {
    transform: scale(1.05);
}

/* Remove button inside preview */
.icon-preview-wrapper .btn-danger-modern,
.image-preview-wrapper .btn-danger-modern {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    width: 100%;
    justify-content: center;
}

/* Floor Plan Large Preview */
.floor-plan-preview-container-large {
    display: inline-block;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
}

.floor-plan-preview-thumbnail-large {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.floor-plan-preview-thumbnail-large:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* Updated Image Preview Component Styles */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.25rem;
}

.image-preview-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border: none !important;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.image-preview-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.image-preview-item.removed {
    opacity: 0.4;
    filter: grayscale(1);
}

.image-preview-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-preview-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    display: block;
    transition: transform 0.5s ease;
}

.image-preview-item:hover .image-preview-thumbnail {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    /* Completely transparent by default */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.image-preview-item:hover .image-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.2);
    /* Semi-transparent background on hover covering the full area */
}

/* Circular Remove Button */
.image-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: #ff4d4f !important;
    color: white !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease !important;
    font-size: 10px !important;
}

.image-remove-btn:hover {
    transform: scale(1.1);
    background: #cf1322 !important;
}

.image-preview-item:hover .image-overlay {
    display: none !important;
}

.image-view-btn {
    width: 45px;
    height: 45px;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #333 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.image-view-btn:hover {
    background: #fff !important;
    transform: scale(1.1);
}

/* Ensure font weight is normal for file inputs */
.custom-file-label-modern {
    font-weight: 400 !important;
}

.custom-file-label-modern::after {
    font-weight: 400 !important;
}

/* RTL Fixes for Card Title */
html[dir="rtl"] .card-title {
    float: right !important;
    text-align: right !important;
}

/* Ensure proper spacing for card tools in RTL */
html[dir="rtl"] .card-tools {
    float: left !important;
}

/* Validation Errors Styling */
.alert-modern {
    border-radius: 12px;
    padding: 1.25rem;
}

.alert-danger.alert-modern {
    background-color: #fff1f0;
    border: 1px solid #ffa39e !important;
    color: #cf1322;
}

.error-list {
    padding-left: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.error-list li {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    color: #cf1322;
}

.error-list li i {
    color: #f5222d;
    font-size: 0.75rem;
    margin-right: 8px;
}

html[dir="rtl"] .error-list li i {
    margin-right: 0;
    margin-left: 8px;
}

.alert-icon-wrapper.bg-danger {
    background-color: #ff4d4f !important;
}

.opacity-80 {
    opacity: 0.8;
}

.validation-errors-container {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Amenity Input Styles */
.rules-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

/* Property / project form: one card per amenity (icon + translated name + distance) */
.amenity-distance-field {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.amenity-distance-field:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.amenity-distance-field__identity {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.6rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    min-height: 52px;
}

.amenity-distance-field__icon-wrap {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amenity-distance-field__icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.amenity-distance-field__icon-placeholder {
    color: #a0aec0;
    font-size: 0.95rem;
    line-height: 1;
}

.amenity-distance-field__name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #2d3748;
    line-height: 1.35;
    min-width: 0;
    flex: 1;
}

.amenity-distance-field__inputs {
    width: 100%;
}

html[dir="rtl"] .amenity-distance-field__identity {
    flex-direction: row-reverse;
}

.amenity-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.amenity-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.amenity-label {
    font-size: 0.8rem;
    font-weight: 400;
    color: #4a5568;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amenity-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.8;
}

.input-group-amenity .form-control:not(.input-group-unit-select) {
    border: none;
    background: #f7fafc;
    height: 32px;
    font-size: 0.9rem;
    padding: 0 0.5rem;
}

.input-group-amenity .form-control:not(.input-group-unit-select):focus {
    background: #edf2f7;
    box-shadow: none;
}

.input-group-amenity {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    height: 34px;
    /* Explicit height to align perfectly */
}

.input-group-amenity:focus-within {
    border-color: #a0aec0;
}

.input-group-unit-select {
    border: none;
    background: #edf2f7;
    height: 32px;
    font-size: 0.68rem;
    line-height: 1.15;
    padding: 0 0.3rem 0 0.45rem;
    min-width: 3rem;
    width: auto !important;
    max-width: 4.5rem;
    flex: 0 0 auto;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    vertical-align: middle;
}

.input-group-unit-select:focus {
    box-shadow: none;
    background: #e2e8f0;
}

/* Remove borders from unit select in RTL/LTR specifically */
html[dir="rtl"] .input-group-unit-select {
    border-radius: 0 !important;
}

html[dir="rtl"] .input-group-amenity .form-control {
    border-radius: 0 !important;
}

/* Fix Select Box Arrow for RTL (exclude compact amenity unit selects — see below) */
html[dir="rtl"] select.form-control:not([multiple]):not(.input-group-unit-select),
body[dir="rtl"] select.form-control:not([multiple]):not(.input-group-unit-select),
html[dir="rtl"] .custom-select,
body[dir="rtl"] .custom-select {
    background-position: left 0.75rem center !important;
    padding-right: 0.75rem !important;
    padding-left: 2.25rem !important;
}

/* Amenity distance unit (م / كم): narrow box + global RTL padding hid the selected label */
html[dir="rtl"] select.form-control.input-group-unit-select:not([multiple]),
body[dir="rtl"] select.form-control.input-group-unit-select:not([multiple]) {
    padding-left: 1.45rem !important;
    padding-right: 0.3rem !important;
    background-position: left 0.3rem center !important;
    min-width: 3rem;
    width: auto !important;
    max-width: 4.5rem;
    text-align: right;
    font-size: 0.68rem !important;
    line-height: 1.15 !important;
}

/* Fix Select2 Default Theme Arrow for RTL */
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__arrow {
    left: 1px;
    right: auto;
}

html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-right: 8px;
    padding-left: 20px;
}

/* Fix Select2 Bootstrap4 Theme Arrow for RTL */
html[dir="rtl"] .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    left: 3px !important;
    right: auto !important;
    position: absolute;
    top: 1px;
    height: 100%;
}

html[dir="rtl"] .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    padding-left: 24px !important;
    padding-right: 0.75rem !important;
}

html[dir="rtl"] .select2-container--bootstrap4 .select2-results__option {
    text-align: right;
}

/* Floor Plan Preview */
.floor-plan-preview-wrapper {
    display: inline-block;
    text-align: center;
}

.floor-plan-preview-thumbnail {
    max-width: 200px;
    max-height: 200px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 5px;
    background: #f8f9fa;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.floor-plan-preview-thumbnail:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Modern Tag Selector Styling Refined */
.select2-container--bootstrap4 .select2-selection--multiple {
    min-height: 38px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding-bottom: 2px !important;
    padding-left: 6px !important;
    background-color: #fff !important;
    transition: all 0.2s ease;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection--multiple {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    background-color: #3b82f6 !important;
    border: none !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 2px 10px !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    margin-right: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: background-color 0.2s ease;
    height: 24px !important;
    line-height: normal !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff !important;
    margin-right: 6px !important;
    margin-left: 0 !important;
    font-weight: bold !important;
    order: 2 !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline {
    flex: 1 !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-search__field {
    margin-top: 0 !important;
    height: 24px !important;
    line-height: 24px !important;
    font-size: 0.875rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
}

/* RTL Adjustments */
html[dir="rtl"] .select2-container--bootstrap4 .select2-selection--multiple {
    padding-right: 6px !important;
    padding-left: 0 !important;
}

html[dir="rtl"] .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    margin-right: 0 !important;
    margin-left: 6px !important;
}

html[dir="rtl"] .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
    margin-left: 6px !important;
    margin-right: 0 !important;
    order: -1 !important;
}

html[dir="rtl"] .select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline {
    text-align: right !important;
}

/* Make text white in warning small-box (users count card) */
.small-box.bg-warning .inner,
.small-box.bg-warning .inner h3,
.small-box.bg-warning .inner p {
    color: #fff !important;
}