/* 
* Main Stylesheet for Property Management System
* This contains base styles that apply regardless of theme
*/
:root {
    --sidebar-width: 220px; /* Reduced to allow tighter fit */
    --header-height: 60px;
    --transition-speed: 0.3s;
    --pm-help-icon-color: #6c757d;
    --pm-help-icon-hover-color: #0d6efd;
    --pm-help-icon-focus-ring: rgba(13, 110, 253, 0.35);
    --pm-help-icon-size: 0.9rem;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Layout Structure */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.content {
    width: 100%;
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--header-height) - 20px); /* Reduced from var(--header-height) to create more space */
    transition: margin-left var(--transition-speed);
}

/* Header */
header.navbar {
    height: var(--header-height);
    padding: 0 1rem;
    z-index: 1030;
}

#sidebar-toggle {
    color: #fff;
    margin-right: 1rem;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Sidebar */
.sidebar {
    width: auto; /* Autofit width based on content */
    min-width: var(--sidebar-width); /* Reduced to allow tighter fit */
    max-width: 300px; /* Reduced to better fit longest text */
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    transition: transform var(--transition-speed);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0.75rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-user {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.user-role {
    font-size: 0.8rem;
    opacity: 0.8;
}

.sidebar-menu {
    list-style: none; /* Remove bullets from sidebar menu */
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-menu li {
    position: relative;
}

.sidebar-menu li.header {
    padding: 0.75rem 0.75rem 0.5rem; /* Adjusted padding */
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.5rem; /* Reduced from 0.4rem to 0.3rem for more compact layout */
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.5; /* Improved readability */
}

.sidebar-menu a i {
    width: 20px;
    margin-right: 0.3rem; /* Reduced from 0.4rem to 0.3rem */
    text-align: center;
}

.sidebar-menu li.active > a {
    font-weight: 600;
}

/* Menu Dropdown and Collapsible Sections */
.menu-dropdown > a {
    position: relative;
}

.dropdown-icon {
    display: none; /* Hide dropdown icons */
}

.menu-dropdown {
    position: relative;
}

.menu-dropdown .submenu {
    list-style: none; /* Remove bullets from submenu */
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.1);
    max-height: 1000px; /* Expanded state - visible by default */
    overflow: hidden;
    transition: max-height var(--transition-speed) ease-in-out;
}

.menu-dropdown.collapsed .submenu {
    max-height: 0; /* Collapsed state - hidden when collapsed class added */
}

.menu-dropdown > a::after {
    content: '\25BC'; /* Down arrow - expanded */
    font-size: 0.7rem;
    margin-left: 0.3rem; /* Reduced from 0.4rem */
    transition: transform var(--transition-speed);
}

.menu-dropdown.collapsed > a::after {
    transform: rotate(-90deg); /* Right arrow when collapsed */
}

.submenu li a {
    padding: 0.3rem 0.5rem 0.3rem 1.8rem; /* Reduced from 0.4rem to 0.3rem */
    font-size: 0.85rem;
    line-height: 1.5; /* Improved readability */
}

/* Submenu Section Headers (AR/AP dividers) */
.submenu-header {
    padding: 0.4rem 0.5rem 0.2rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 0.3rem;
    cursor: default;
}

.submenu-header:first-child {
    border-top: none;
    margin-top: 0;
}

.submenu-header i {
    margin-right: 0.3rem;
    font-size: 0.65rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 0.75rem;
    font-size: 0.75rem;
    text-align: center;
}

/* Cards */
.card {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.card-header {
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaf6 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header .card-actions {
    margin-left: auto;
}

/* Stats Cards */
.stat-card {
    display: flex;
    align-items: center;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Individual stat card color variants */
.stat-card.stat-primary {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #e1f5fe;
}

.stat-card.stat-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border: 1px solid #e0f2e0;
}

.stat-card.stat-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid #fff3e0;
}

.stat-card.stat-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 1px solid #fce4ec;
}

/* Small Box Cards (used in leases and other dashboard widgets) */
.small-box {
    display: flex;
    align-items: center;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background-color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.small-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.small-box .inner {
    flex-grow: 1;
}

.small-box .inner h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: #fff;
}

.small-box .inner p {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-bottom: 0;
    color: #fff;
}

.small-box .icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    border-radius: 16px;
    margin-left: 1.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Small box color variants with modern soft backgrounds */
.small-box.bg-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border: 1px solid #e1f5fe;
}

.small-box.bg-info .inner h3,
.small-box.bg-info .inner p {
    color: #1565c0;
}

.small-box.bg-info .icon {
    background-color: rgba(21, 101, 192, 0.1);
    color: #1565c0;
}

.small-box.bg-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #e0f2e0;
}

.small-box.bg-success .inner h3,
.small-box.bg-success .inner p {
    color: #2e7d32;
}

.small-box.bg-success .icon {
    background-color: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
}

.small-box.bg-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #ef6c00;
    border: 1px solid #fff3e0;
}

.small-box.bg-warning .inner h3,
.small-box.bg-warning .inner p {
    color: #ef6c00;
}

.small-box.bg-warning .icon {
    background-color: rgba(239, 108, 0, 0.1);
    color: #ef6c00;
}

.small-box.bg-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border: 1px solid #fce4ec;
}

.small-box.bg-danger .inner h3,
.small-box.bg-danger .inner p {
    color: #c62828;
}

.small-box.bg-danger .icon {
    background-color: rgba(198, 40, 40, 0.1);
    color: #c62828;
}

.small-box.bg-primary {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #6a1b9a;
    border: 1px solid #f8e5f8;
}

.small-box.bg-primary .inner h3,
.small-box.bg-primary .inner p {
    color: #6a1b9a;
}

.small-box.bg-primary .icon {
    background-color: rgba(106, 27, 154, 0.1);
    color: #6a1b9a;
}

.small-box.bg-secondary {
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    color: #424242;
    border: 1px solid #f0f0f0;
}

.small-box.bg-secondary .inner h3,
.small-box.bg-secondary .inner p {
    color: #424242;
}

.small-box.bg-secondary .icon {
    background-color: rgba(66, 66, 66, 0.1);
    color: #424242;
}

/* Info Box Cards (used in payments and account summary) */
.info-box {
    display: flex;
    align-items: center;
    padding: 1.5rem 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* Info box background variants with modern soft colors */
.info-box.bg-info {
    background: linear-gradient(135deg, #e8f4f8 0%, #d1ecf1 100%);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.info-box.bg-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.info-box.bg-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.info-box.bg-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.info-box.bg-primary {
    background: linear-gradient(135deg, #cce7ff 0%, #b3d9ff 100%);
    color: #004085;
    border: 1px solid #b3d9ff;
}

.info-box.bg-secondary {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    color: #383d41;
    border: 1px solid #d6d8db;
}

.info-box-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 12px;
    margin-right: 1rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.2);
}

.info-box-icon.bg-info {
    background: linear-gradient(135deg, #0c5460 0%, #17a2b8 100%);
    color: #fff;
}

.info-box-icon.bg-success {
    background: linear-gradient(135deg, #155724 0%, #28a745 100%);
    color: #fff;
}

.info-box-icon.bg-warning {
    background: linear-gradient(135deg, #856404 0%, #ffc107 100%);
    color: #fff;
}

.info-box-icon.bg-danger {
    background: linear-gradient(135deg, #721c24 0%, #dc3545 100%);
    color: #fff;
}

.info-box-icon.bg-primary {
    background: linear-gradient(135deg, #004085 0%, #007bff 100%);
    color: #fff;
}

.info-box-icon.bg-secondary {
    background: linear-gradient(135deg, #383d41 0%, #6c757d 100%);
    color: #fff;
}

.info-box-content {
    flex-grow: 1;
}

.info-box-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.info-box-more {
    font-size: 0.8rem;
    color: #95a5a6;
    font-weight: 500;
}

/* Text colors for soft background info boxes */
.info-box.bg-info .info-box-text {
    color: rgba(12, 84, 96, 0.8);
}

.info-box.bg-success .info-box-text {
    color: rgba(21, 87, 36, 0.8);
}

.info-box.bg-warning .info-box-text {
    color: rgba(133, 100, 4, 0.8);
}

.info-box.bg-danger .info-box-text {
    color: rgba(114, 28, 36, 0.8);
}

.info-box.bg-primary .info-box-text {
    color: rgba(0, 64, 133, 0.8);
}

.info-box.bg-secondary .info-box-text {
    color: rgba(56, 61, 65, 0.8);
}

.info-box.bg-info .info-box-number,
.info-box.bg-success .info-box-number,
.info-box.bg-warning .info-box-number,
.info-box.bg-danger .info-box-number,
.info-box.bg-primary .info-box-number,
.info-box.bg-secondary .info-box-number {
    color: inherit;
}

.info-box.bg-info .info-box-more {
    color: rgba(12, 84, 96, 0.6);
}

.info-box.bg-success .info-box-more {
    color: rgba(21, 87, 36, 0.6);
}

.info-box.bg-warning .info-box-more {
    color: rgba(133, 100, 4, 0.6);
}

.info-box.bg-danger .info-box-more {
    color: rgba(114, 28, 36, 0.6);
}

.info-box.bg-primary .info-box-more {
    color: rgba(0, 64, 133, 0.6);
}

.info-box.bg-secondary .info-box-more {
    color: rgba(56, 61, 65, 0.6);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.stat-card .stat-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    border-radius: 16px;
    margin-right: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-content {
    flex-grow: 1;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.95rem;
    opacity: 0.8;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Data Tables */
.data-table .dropdown-toggle::after {
    display: none;
}

.data-table .table th, .data-table .table td {
    vertical-align: middle;
}

.data-table .action-buttons {
    white-space: nowrap;
}

.data-table .action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.required-field::after {
    content: '*';
    color: #dc3545;
    margin-left: 0.25rem;
}

.pm-help-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--pm-help-icon-color);
    padding: 0;
    margin: 0;
    line-height: 1;
    font-size: var(--pm-help-icon-size);
    cursor: help;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.pm-filter-form .pm-filter-field,
.comm-filter-form .comm-filter-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pm-filter-form .pm-filter-field > .form-select,
.pm-filter-form .pm-filter-field > .form-control,
.pm-filter-form .pm-filter-field > .input-group,
.comm-filter-form .comm-filter-field > .form-select,
.comm-filter-form .comm-filter-field > .form-control,
.comm-filter-form .comm-filter-field > .input-group {
    flex: 1 1 auto;
    min-width: 0;
}

.pm-filter-form .pm-filter-field > .pm-help-trigger,
.comm-filter-form .comm-filter-field > .pm-help-trigger {
    flex: 0 0 auto;
    margin-left: 0 !important;
}

.pm-help-trigger:hover,
.pm-help-trigger:focus {
    color: var(--pm-help-icon-hover-color);
}

.pm-help-trigger:focus-visible {
    outline: 2px solid var(--pm-help-icon-focus-ring);
    outline-offset: 2px;
    border-radius: 999px;
}

body.pm-help-theme-blue {
    --pm-help-icon-color: #0d6efd;
    --pm-help-icon-hover-color: #084298;
    --pm-help-icon-focus-ring: rgba(13, 110, 253, 0.35);
}

body.pm-help-theme-green {
    --pm-help-icon-color: #198754;
    --pm-help-icon-hover-color: #0f5132;
    --pm-help-icon-focus-ring: rgba(25, 135, 84, 0.35);
}

body.pm-help-theme-gray {
    --pm-help-icon-color: #6c757d;
    --pm-help-icon-hover-color: #495057;
    --pm-help-icon-focus-ring: rgba(108, 117, 125, 0.35);
}

.pm-help-popover {
    --bs-popover-max-width: 320px;
    --bs-popover-border-color: #cbd5e1;
    --bs-popover-header-bg: #f8fafc;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.pm-help-popover .popover-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.pm-help-popover .popover-body {
    font-size: 0.85rem;
    color: #1f2937;
}

.pm-help-popover .pm-help-summary {
    line-height: 1.35;
}

.pm-help-popover .pm-help-example {
    margin-top: 0.4rem;
    color: #334155;
}

.pm-help-popover .pm-help-example-label {
    font-weight: 600;
}

.pm-help-popover .pm-help-link {
    margin-top: 0.4rem;
}

/* Responsive Sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        pointer-events: none;
    }

    .content {
        margin-left: 0;
        padding-top: calc(var(--header-height) - 20px); /* Reduced padding in mobile view */
    }

    #sidebar-toggle {
        display: block;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
        pointer-events: auto;
    }

    body.sidebar-open .content {
        margin-left: 0;
    }
}

/* Desktop sidebar collapse */
@media (min-width: 992px) {
    #sidebar-toggle {
        display: inline-flex;
        align-items: center;
    }

    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-collapsed .content {
        margin-left: 0;
    }
}

/* Page headers */
.page-header {
    margin-bottom: 0.5rem; /* Reduced from 1.5rem to minimize top spacing */
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
    margin-bottom: 0;
    padding: 0;
    background: none;
}

/* Badges and status indicators */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

/* Filters and search */
.filter-row {
    margin-bottom: 1rem;
}

/***** Theme Color settings panel *****/
.theme-settings {
    width: 100%;
    padding: 0.25rem 0;
}

.theme-settings .row {
    margin-bottom: 1rem;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* Adds space between squares */
}

.theme-settings .col-3 {
    padding: 0;
    flex: 0 0 40px; /* Adjusted to 40px for smaller square */
    max-width: 40px;
}

.theme-option {
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 0;
    width: 40px; /* Smaller square size */
    height: 40px; /* Smaller square size */
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.theme-option .card-body {
    padding: 0;
    width: 100%;
    height: 100%;
    background: inherit;
}

.theme-option .theme-preview {
    height: 100%;
    width: 100%;
    border-radius: 2px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--theme-color, #f8f9fa); /* Ensure theme color is applied */
}

.theme-option[data-theme] .theme-preview {
    background: var(--theme-color, #f8f9fa);
}

/* Theme-specific colors (unchanged) */
.theme-option[data-theme="default"] .theme-preview {
    --theme-color: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.theme-option[data-theme="dark"] .theme-preview {
    --theme-color: linear-gradient(135deg, #343a40 0%, #2c2f33 100%);
}

.theme-option[data-theme="light"] .theme-preview {
    --theme-color: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.theme-option[data-theme="blue"] .theme-preview {
    --theme-color: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.theme-option[data-theme="green"] .theme-preview {
    --theme-color: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.theme-option[data-theme="purple"] .theme-preview {
    --theme-color: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.theme-option[data-theme="orange"] .theme-preview {
    --theme-color: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.theme-option[data-theme="light-gray"] .theme-preview {
    --theme-color: linear-gradient(135deg, #f5f6f5 0%, #e9ecef 100%);
}

.theme-option[data-theme="light-cream"] .theme-preview {
    --theme-color: linear-gradient(135deg, #fff8e7 0%, #f7eede 100%);
}

.theme-option[data-theme="light-mint"] .theme-preview {
    --theme-color: linear-gradient(135deg, #e6f4ea 0%, #d1e8dc 100%);
}

.theme-option[data-theme="light-ivory"] .theme-preview {
    --theme-color: linear-gradient(135deg, #fffaf0 0%, #f5f0e6 100%);
}
.theme-option .card-footer {
    display: none;
}

.theme-option .theme-name {
    display: none;
}

.theme-option .theme-description {
    display: none;
}

.theme-preview-card {
    display: none; /* Remove hardcoded white cards to use theme color fully */
}
/**************theme section ends here ***********************************/
/* Dashboard widgets */
.widget {
    margin-bottom: 1.5rem;
}

.recent-activity-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.recent-activity-item:last-child {
    border-bottom: none;
}

.recent-activity-time {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Modal size adjustments */
.modal-xl {
    max-width: 95%;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1060;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.loading-spinner {
    width: 4rem;
    height: 4rem;
}

/* Print styles */
@media print {
    .sidebar, .navbar, .no-print {
        display: none !important;
    }

    .content {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }

    .card {
        break-inside: avoid;
    }
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

/* Main content area */
main {
    padding-top: 1.5rem;
}

/* Property cards */
.property-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.property-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #e9ecef;
    position: relative;
}

.property-company {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 4px;
}

.property-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
}

.property-content {
    padding: 1rem;
}

.property-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.property-address {
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.property-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.property-stat {
    text-align: center;
}

.property-stat-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.property-stat-label {
    color: #6c757d;
    font-size: 0.8rem;
}

.property-card-footer {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #ddd;
    padding: 0.75rem;
}

.property-action {
    color: #007bff;
    cursor: pointer;
}

.property-action:hover {
    text-decoration: underline;
}

/* Forms */
.form-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section {
    margin-bottom: 1.5rem;
}

.form-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    vertical-align: middle;
    border-color: #dee2e6;
}
.table th,
.table td {
    padding: 0.75rem;
    vertical-align: middle;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Status badges */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-primary {
    background-color: #008CBA;
    color: #212529;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

/* Filter bar */
.filter-bar {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-bar .form-group {
    margin-bottom: 0;
}

.search-container {
    position: relative;
    flex-grow: 1;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-input {
    padding-left: 35px;
    width: 100%;
}

/* Pagination */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 0.25rem;
}

.pagination li {
    margin-right: 0.25rem;
}

.pagination li a {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
}

.pagination li.active a {
    z-index: 3;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.pagination li.disabled a {
    color: #6c757d;
    pointer-events: none;
    cursor: auto;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Page header with actions */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    margin-right: 0.5rem;
}

/* Responsive tables */
@media (max-width: 767.98px) {
    .table-responsive-card {
        display: block;
    }

    .table-responsive-card thead {
        display: none;
    }

    .table-responsive-card tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 1rem;
        padding: 0.5rem;
    }

    .table-responsive-card tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 0.5rem;
    }

    .table-responsive-card tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
    }
}

/* Login and Register pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    padding: 1rem;
}

.auth-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Compliance & Inspections and Communications Widget Cards */
.border-left-primary,
.border-left-success,
.border-left-warning,
.border-left-danger,
.border-left-info {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    margin-bottom: 1.5rem !important;
}

.border-left-primary:hover,
.border-left-success:hover,
.border-left-warning:hover,
.border-left-danger:hover,
.border-left-info:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
}

/* Primary (Blue) - Upcoming Inspections */
.border-left-primary {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
}

.border-left-primary .card-body {
    background: transparent !important;
    border: none !important;
    padding: 2rem 1.5rem !important;
}

.border-left-primary .text-primary,
.border-left-primary .font-weight-bold {
    color: #1565c0 !important;
}

.border-left-primary .text-gray-800 {
    color: #1565c0 !important;
    font-weight: 800 !important;
    font-size: 1.75rem !important;
}

/* Success (Green) - Completed */
.border-left-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%) !important;
}

.border-left-success .card-body {
    background: transparent !important;
    border: none !important;
    padding: 2rem 1.5rem !important;
}

.border-left-success .text-success,
.border-left-success .font-weight-bold {
    color: #2e7d32 !important;
}

.border-left-success .text-gray-800 {
    color: #2e7d32 !important;
    font-weight: 800 !important;
    font-size: 1.75rem !important;
}

/* Warning (Orange) - Expiring Soon */
.border-left-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%) !important;
}

.border-left-warning .card-body {
    background: transparent !important;
    border: none !important;
    padding: 2rem 1.5rem !important;
}

.border-left-warning .text-warning,
.border-left-warning .font-weight-bold {
    color: #ef6c00 !important;
}

.border-left-warning .text-gray-800 {
    color: #ef6c00 !important;
    font-weight: 800 !important;
    font-size: 1.75rem !important;
}

/* Danger (Red) - Non-Compliant */
.border-left-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%) !important;
}

.border-left-danger .card-body {
    background: transparent !important;
    border: none !important;
    padding: 2rem 1.5rem !important;
}

.border-left-danger .text-danger,
.border-left-danger .font-weight-bold {
    color: #c62828 !important;
}

.border-left-danger .text-gray-800 {
    color: #c62828 !important;
    font-weight: 800 !important;
    font-size: 1.75rem !important;
}

/* Info (Teal) - Communications */
.border-left-info {
    background: linear-gradient(135deg, #e8f4f8 0%, #d1ecf1 100%) !important;
}

.border-left-info .card-body {
    background: transparent !important;
    border: none !important;
    padding: 2rem 1.5rem !important;
}

.border-left-info .text-info,
.border-left-info .font-weight-bold {
    color: #0c5460 !important;
}

.border-left-info .text-gray-800 {
    color: #0c5460 !important;
    font-weight: 800 !important;
    font-size: 1.75rem !important;
}

/* Icon styling for all widget cards */
.border-left-primary .fa,
.border-left-success .fa,
.border-left-warning .fa,
.border-left-danger .fa,
.border-left-info .fa {
    font-size: 1.5rem !important;
    opacity: 0.8 !important;
    margin-right: 1rem !important;
}

/* Remove any leftover borders from card headers */
.border-left-primary .card-header,
.border-left-success .card-header,
.border-left-warning .card-header,
.border-left-danger .card-header,
.border-left-info .card-header {
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
    padding: 1rem 1.5rem 0.5rem !important;
}

/* Text styling improvements */
.border-left-primary .small,
.border-left-success .small,
.border-left-warning .small,
.border-left-danger .small,
.border-left-info .small {
    font-weight: 500 !important;
    opacity: 0.8 !important;
    letter-spacing: 0.3px !important;
}

/* Utility classes */
.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.text-warning {
    color: #ffc107;
}

.text-info {
    color: #17a2b8;
}

.bg-light-gray {
    background-color: #f8f9fa;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.toast {
    max-width: 350px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    border-left: 4px solid transparent;
    overflow: hidden;
    margin-bottom: 10px;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.toast-success {
    border-left-color: #28a745;
}

.toast-error {
    border-left-color: #dc3545;
}

.toast-warning {
    border-left-color: #ffc107;
}

.toast-info {
    border-left-color: #17a2b8;
}

.toast-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.toast-body {
    padding: 0.75rem;
}

/* Custom checkbox and radio styles */
.custom-control {
    position: relative;
    min-height: 1.5rem;
    padding-left: 1.5rem;
}

.custom-control-input {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
}

.custom-control-label::before {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: 1px solid #adb5bd;
}

.custom-control-label::after {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50% / 50% 50%;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
    border-color: #007bff;
    background-color: #007bff;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

/* Summary statistics */
.stats-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background-color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(0,123,255,0.8) 0%, rgba(0,123,255,0.6) 100%);
}

.stats-icon {
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    color: #007bff;
    opacity: 0.9;
}

.stats-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.stats-label {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Chart containers */
.chart-container {
    position: relative;
    margin: auto;
    height: 300px;
    width: 100%;
}

/* Ensure left alignment for charges list page */
.charges-list .content,
.charges-list .container-fluid,
.charges-list .card,
.charges-list .card-body {
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-align: left !important;
    width: 100% !important;
}

/* Sidebar menu collapse styling */
.menu-dropdown .submenu {
    display: none;
}

.menu-dropdown:not(.collapsed) .submenu {
    display: block;
}

.menu-dropdown > a::after {
    content: none;
}
