/* ==========================================================================
   Rental Management System - Single Stylesheet
   Loaded by every layout (admin, super-admin, auth, public, resident) so a
   change here takes effect everywhere. Previously split across admin.css,
   navigation-theme.css, notifications.css, plus resources/css/accessibility.css
   and resources/css/mobile-responsive.css, which were never actually linked
   into any page and so never took effect - their rules are folded in below.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base
   -------------------------------------------------------------------------- */
html {
    font-size: 14px;
}

* {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   2. Navigation theme (single color, single set of variables)
   -------------------------------------------------------------------------- */
:root {
    --nav-primary-color: #1a3451;
    --nav-accent-color: #4a90e2;
    --nav-hover-color: rgba(255, 255, 255, 0.1);
}

.sb-topnav,
.navbar-dark,
.navbar.bg-dark,
.bg-primary,
.custom-nav-bg,
.sb-sidenav,
.custom-sidenav-bg,
.sidebar {
    background-color: var(--nav-primary-color) !important;
}

.sb-sidenav,
.custom-sidenav-bg,
.sidebar {
    color: #ffffff !important;
}

.sb-sidenav .sb-sidenav-menu .nav-link,
.sidebar .nav-link {
    color: #ffffff !important;
}

.sb-sidenav .sb-sidenav-menu .nav-link:hover,
.sidebar .nav-link:hover {
    color: #ffffff !important;
    text-decoration: none;
}

.sb-sidenav .sb-sidenav-menu .nav-link .sb-nav-link-icon {
    color: #ffffff !important;
}

.sb-sidenav .sb-sidenav-menu .nav-link:hover .sb-nav-link-icon {
    color: #ffffff !important;
}

.sb-sidenav .sb-sidenav-menu .nav-link.active,
.sidebar .nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
    background-color: var(--nav-hover-color) !important;
    border-left-color: var(--nav-accent-color) !important;
}

.sb-sidenav .sb-sidenav-menu .nav-link.active .sb-nav-link-icon {
    color: var(--nav-accent-color) !important;
}

.sb-sidenav .sb-sidenav-menu-heading {
    color: #ffffff !important;
    opacity: 0.8;
}

.sb-sidenav-footer {
    background-color: var(--nav-primary-color) !important;
    color: #ffffff !important;
}

.sb-sidenav-footer .small {
    color: #ffffff !important;
}

.sb-topnav .nav-link {
    color: #ffffff !important;
}

.sb-topnav .nav-link:hover {
    color: #ffffff !important;
}

.sb-topnav .navbar-brand {
    color: #ffffff !important;
}

.sb-sidenav-toggled .sb-sidenav .nav-link:hover::after {
    background-color: var(--nav-primary-color) !important;
    color: #ffffff !important;
}

.btn-primary {
    background-color: var(--nav-primary-color) !important;
    border-color: var(--nav-primary-color) !important;
}

.btn-primary:hover {
    background-color: #244a6f !important;
    border-color: #244a6f !important;
}

/* --------------------------------------------------------------------------
   3. Admin layout structure (topbar, sidebar, content)
   -------------------------------------------------------------------------- */
.sb-topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    z-index: 1039;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
    transition: all 0.3s ease;
}

.sb-topnav .dropdown-menu {
    z-index: 1040;
}

.sb-topnav .navbar-nav {
    align-items: center;
}

.sb-topnav .nav-link {
    transition: color 0.15s ease;
}

body.sb-nav-fixed {
    padding-top: 56px;
}

#layoutSidenav {
    display: flex;
}

#layoutSidenav_nav {
    width: 250px;
    height: calc(100vh - 56px);
    z-index: 1038;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
    transition: width 0.3s ease-in-out;
    position: fixed;
    top: 56px;
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#layoutSidenav_content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    flex-grow: 1;
    min-height: calc(100vh - 56px);
    margin-left: 250px;
    margin-top: 0;
    transition: margin-left 0.3s ease-in-out;
    background-color: #f8f9fa;
    padding-top: 1rem;
}

.sb-sidenav-toggled #layoutSidenav_nav {
    width: 70px;
}

.sb-sidenav-toggled #layoutSidenav_content {
    margin-left: 70px;
}

.sb-sidenav {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-wrap: nowrap;
}

.sb-sidenav .sb-sidenav-menu {
    flex-grow: 1;
    overflow-y: auto;
}

.sb-sidenav .sb-sidenav-menu .nav {
    flex-direction: column;
    flex-wrap: nowrap;
    padding-top: 1rem;
}

.sb-sidenav .sb-sidenav-menu .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    position: relative;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.sb-sidenav .sb-sidenav-menu .nav-link.active {
    padding-left: calc(1rem - 4px);
    border-left: 4px solid var(--nav-accent-color);
}

.sb-sidenav .sb-sidenav-menu .nav-link .sb-nav-link-icon {
    font-size: 0.9rem;
    margin-right: 0.75rem;
    width: 1.25rem;
    min-width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.sb-sidenav .sb-sidenav-menu-heading {
    padding: 1.25rem 1rem 0.75rem;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.sb-sidenav-footer {
    padding: 0.75rem 1rem;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: opacity 0.3s ease;
}

.sb-sidenav-toggled .sb-sidenav .sb-sidenav-menu .nav-link {
    padding: 0.75rem 0;
    justify-content: center;
}

.sb-sidenav-toggled .sb-sidenav .sb-sidenav-menu .nav-link .sb-nav-link-icon {
    margin-right: 0;
    font-size: 1.1rem;
}

.sb-sidenav-toggled .sb-sidenav .sb-sidenav-menu .nav-link .nav-link-text {
    display: none;
}

.sb-sidenav-toggled .sb-sidenav .sb-sidenav-menu-heading,
.sb-sidenav-toggled .sb-sidenav .sb-sidenav-footer {
    opacity: 0;
    visibility: hidden;
    padding: 0;
    height: 0;
    overflow: hidden;
}

.sb-sidenav-toggled .sb-sidenav .nav-link {
    position: relative;
}

.sb-sidenav-toggled .sb-sidenav .nav-link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.3);
    font-size: 0.875rem;
}

@media (max-width: 991.98px) {
    #layoutSidenav_nav {
        left: -250px;
        transition: left 0.3s ease-in-out;
    }

    body:not(.sb-sidenav-toggled) #layoutSidenav_nav {
        left: 0;
    }

    #layoutSidenav_content {
        margin-left: 0;
    }

    body.sb-nav-fixed:not(.sb-sidenav-toggled)::before {
        content: '';
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1037;
    }
}

@media (min-width: 992px) {
    #layoutSidenav_nav {
        left: 0 !important;
    }
}

/* --------------------------------------------------------------------------
   4. Cards, tables, buttons, forms, dashboard stats
   -------------------------------------------------------------------------- */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-bottom: 1.5rem;
}

.card .card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(33, 40, 50, 0.125);
    padding: 1rem 1.35rem;
}

.card-header h6 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    margin-bottom: 0;
    color: #4e73df;
}

.card-body {
    padding: 1.35rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid rgba(33, 40, 50, 0.125);
    padding: 1rem 1.35rem;
}

.border-left-primary { border-left: 0.25rem solid #4e73df !important; }
.border-left-success { border-left: 0.25rem solid #1cc88a !important; }
.border-left-info { border-left: 0.25rem solid #36b9cc !important; }
.border-left-warning { border-left: 0.25rem solid #f6c23e !important; }
.border-left-danger { border-left: 0.25rem solid #e74a3b !important; }

.text-primary { color: #4e73df !important; }
.text-success { color: #1cc88a !important; }
.text-info { color: #36b9cc !important; }
.text-warning { color: #f6c23e !important; }
.text-danger { color: #e74a3b !important; }
.text-gray-300 { color: #dddfeb !important; }
.text-gray-800 { color: #5a5c69 !important; }

.btn-circle {
    border-radius: 100%;
    height: 2.5rem;
    width: 2.5rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-circle.btn-sm {
    height: 1.8rem;
    width: 1.8rem;
    font-size: 0.75rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: 0;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5a5c69;
    padding: 0.65rem 0.9rem;
    vertical-align: middle;
}

/* Both td and th are styled here: detail cards use <th> for the label
   column inside tbody, so they need to match the value column's spacing. */
.table tbody td,
.table tbody th {
    padding: 0.65rem 0.9rem;
    vertical-align: middle;
    border-color: #e3e6f0;
    line-height: 1.4;
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table caption {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    color: #6c757d;
    text-align: left;
    caption-side: top;
}

.table th[aria-sort] {
    cursor: pointer;
    user-select: none;
}

.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.chart-area {
    position: relative;
    height: 10rem;
    width: 100%;
}

.chart-pie {
    position: relative;
    height: 15rem;
    width: 100%;
}

.property-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 0.5rem;
}

.property-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-badge {
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-stat {
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dashboard-stat::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    height: 100%;
    width: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50%, 50%);
}

.dashboard-stat-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.dashboard-stat-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.dashboard-stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.dashboard-stat-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.9);
}

.stat-primary { background: linear-gradient(45deg, #4e73df, #6610f2); color: #fff; }
.stat-success { background: linear-gradient(45deg, #1cc88a, #20c997); color: #fff; }
.stat-info { background: linear-gradient(45deg, #36b9cc, #0dcaf0); color: #fff; }
.stat-warning { background: linear-gradient(45deg, #f6c23e, #ffc107); color: #fff; }
.stat-danger { background: linear-gradient(45deg, #e74a3b, #dc3545); color: #fff; }

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.cursor-pointer {
    cursor: pointer;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --------------------------------------------------------------------------
   5. Notifications
   -------------------------------------------------------------------------- */
.icon-circle {
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-notification .dropdown-item {
    white-space: normal;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e3e6f0;
}

.admin-notification .dropdown-item:last-child {
    border-bottom: none;
}

.maintainer-notification .dropdown-list {
    padding: 0;
    font-size: .85rem;
    max-height: 350px;
    overflow-y: auto;
}

.maintainer-notification .dropdown-list .dropdown-header {
    background-color: #4e73df;
    border: 1px solid #4e73df;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    color: #fff;
}

.notification-timestamp {
    font-size: 0.8rem;
    color: #858796;
}

.notification-message {
    font-size: 0.9rem;
    color: #5a5c69;
}

/* --------------------------------------------------------------------------
   6. Accessibility
   -------------------------------------------------------------------------- */
*:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus,
.dropdown-item:focus,
.list-group-item:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

.keyboard-navigation .btn:focus,
.keyboard-navigation .nav-link:focus,
.keyboard-navigation .dropdown-item:focus {
    background-color: rgba(0, 123, 255, 0.1);
}

.form-control[aria-invalid="true"],
.form-control[aria-invalid="true"]:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status-indicator::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-active::before { background-color: #28a745; }
.status-inactive::before { background-color: #6c757d; }
.status-pending::before { background-color: #ffc107; }
.status-overdue::before { background-color: #dc3545; }

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.required-field-indicator {
    color: #dc3545;
}

/* --------------------------------------------------------------------------
   7. Mobile responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }

    .navbar {
        padding: 0.5rem 1rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }

    .navbar-collapse {
        margin-top: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e9ecef;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem 0.5rem;
    }

    .card {
        margin-bottom: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .card-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        font-weight: 600;
    }

    .card-body {
        padding: 1rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }

    .table th {
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    /* Card-style table rows for narrow screens - used by views that render
       a stacked "mobile-table-card" instead of a <table> below 768px. */
    .mobile-table-card {
        display: block;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        margin-bottom: 0.75rem;
        padding: 1rem;
        background: #fff;
    }

    .mobile-table-card .card-title {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: #495057;
    }

    .mobile-table-card .card-subtitle {
        font-size: 0.875rem;
        color: #6c757d;
        margin-bottom: 0.75rem;
    }

    .mobile-table-card .card-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .mobile-table-card .card-info:last-child {
        margin-bottom: 0;
    }

    .mobile-table-card .info-label {
        font-size: 0.75rem;
        font-weight: 600;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .mobile-table-card .info-value {
        font-size: 0.875rem;
        color: #495057;
        text-align: right;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

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

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }

    .btn-group-vertical .btn:last-child {
        margin-bottom: 0;
    }

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

    .form-label {
        font-size: 0.875rem;
        color: #495057;
    }

    .form-control,
    .form-select {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .input-group {
        margin-bottom: 1rem;
    }

    .input-group-text {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .modal-header,
    .modal-footer {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.1rem;
        font-weight: 600;
    }

    .modal-body {
        padding: 1rem;
    }

    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }

    .progress {
        height: 0.75rem;
    }

    .pagination {
        justify-content: center;
        margin-bottom: 0;
    }

    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .dropdown-menu {
        font-size: 0.875rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .accordion-button,
    .accordion-body {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .list-group-item {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .chart-container {
        position: relative;
        height: 250px;
        margin-bottom: 1rem;
    }

    .dashboard-widget {
        background: #fff;
        border-radius: 0.5rem;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .widget-title {
        font-size: 0.875rem;
        font-weight: 600;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.5rem;
    }

    .widget-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: #495057;
        margin-bottom: 0.25rem;
    }

    .widget-change {
        font-size: 0.75rem;
        color: #6c757d;
    }

    .widget-change.positive { color: #28a745; }
    .widget-change.negative { color: #dc3545; }
}

@media (max-width: 768px) and (pointer: coarse) {
    .btn,
    .form-control,
    .form-select,
    .nav-link,
    .dropdown-item,
    .list-group-item {
        min-height: 44px;
    }

    .btn-group-vertical .btn {
        margin-bottom: 0.25rem;
    }

    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
    }

    .form-check-label {
        padding-left: 0.5rem;
        font-size: 1rem;
    }

    .swipe-indicator {
        position: relative;
    }

    .swipe-indicator::after {
        content: "\2190 Swipe for more options";
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.75rem;
        color: #6c757d;
        opacity: 0.7;
    }
}

/* --------------------------------------------------------------------------
   8. Prefers-* media features (contrast, reduced motion, dark mode, print)
   -------------------------------------------------------------------------- */
@media (prefers-contrast: high) {
    .btn,
    .form-control,
    .form-select,
    .card {
        border-width: 2px;
    }

    .table th,
    .table td {
        border: 1px solid;
    }

    .nav-link {
        border: 1px solid transparent;
    }

    .nav-link:hover,
    .nav-link:focus {
        border-color: currentColor;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .sidebar,
    .carousel,
    .fade,
    .collapse,
    .btn,
    .card,
    .modal {
        transition: none;
    }
}

/* NOTE: a prefers-color-scheme:dark block existed in the old, never-loaded
   mobile-responsive.css. It only re-themed a handful of components (cards,
   form controls, modals, dropdowns) and left the rest of each page - body
   background, text, sidebar, buttons - on the light palette, so turning it
   on for the first time here would read as a half-broken theme rather than
   real dark mode support. Left out deliberately; a proper dark mode is a
   real design task, not something to switch on as a side effect of merging
   CSS files. */

@media print {
    .skip-link,
    .sr-only {
        position: static !important;
        width: auto !important;
        height: auto !important;
        padding: inherit !important;
        margin: inherit !important;
        overflow: visible !important;
        clip: auto !important;
        white-space: normal !important;
    }

    .btn,
    .form-control {
        border: 1px solid #000 !important;
    }

    .sidebar,
    .navbar,
    .pagination,
    .modal,
    .dropdown-menu {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .table {
        border-collapse: collapse !important;
    }

    .table th,
    .table td {
        border: 1px solid #000 !important;
    }
}

/* --------------------------------------------------------------------------
   9. Pastel "soft" badges - used by card-grid listings (e.g. properties)
   -------------------------------------------------------------------------- */
.badge-soft-primary {
    background-color: #e8effd;
    color: #4e73df;
    font-weight: 600;
}

.badge-soft-success {
    background-color: #e3f9ef;
    color: #1cc88a;
    font-weight: 600;
}

.badge-soft-danger {
    background-color: #fce9e7;
    color: #e74a3b;
    font-weight: 600;
}

.badge-soft-warning {
    background-color: #fef6e6;
    color: #dda60a;
    font-weight: 600;
}

.badge-soft-info {
    background-color: #e6f6fb;
    color: #36b9cc;
    font-weight: 600;
}

.badge-soft-secondary {
    background-color: #eaecf4;
    color: #858796;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   10. Card-grid listing (properties, and similar entity grids)
   -------------------------------------------------------------------------- */
.entity-card {
    transition: box-shadow 0.15s ease;
    overflow: hidden;
}

.entity-card:hover {
    box-shadow: 0 0.5rem 1.5rem 0 rgba(58, 59, 69, 0.15);
}

.entity-card-image {
    height: 180px;
    object-fit: cover;
    background-color: #eef1f5;
}

.entity-card-image-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eef1f5;
    color: #b7bfc9;
    font-size: 2.5rem;
}

.entity-card-menu-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
}

.entity-card-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
