/**
 * FOR-RENT.CA Modern Design System
 * Consolidated styles for v2 interface
 * Version: 2.0
 */

/* ============================================
   CSS VARIABLES
============================================ */
:root {
    /* Layout Dimensions */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 60px;
    
    /* ========== BACKUP - Original Brand Colors (Purple Theme) ========== */
    /* --primary-color: #8b5cf6; */
    /* --primary-hover: #7c3aed; */
    /* --secondary-color: #3b82f6;  [Later changed to #1E40AF blue, then #2C3E50 charcoal] */
    /* --sidebar-active: #8b5cf6; */
    /* ==================================================================== */
    
    /* Brand Colors - FOR-RENT.CA Red Theme */
    --primary-color: #FD0315;           /* Brand Red (Coroplast Sign Color) */
    --primary-hover: #D10212;           /* Darker Red for hover states */
    --secondary-color: #7e8c99;         /* Dark Charcoal for accents */
    --success-color: #10b981;           /* Green (keep for Available status) */
    --warning-color: #f59e0b;           /* Orange (keep for Maintenance) */
    --danger-color: #ef4444;            /* Red (alerts/errors) */
    
    /* Supporting Colors */
    --text-primary: #2C3E50;            /* Charcoal for primary text */
    --text-secondary: #7F8C8D;          /* Slate gray for secondary text */
    --bg-light: #F8F9FA;                /* Cool white background */
    --bg-page: whitesmoke;              /* Official page background color */
    --border-gray: #E5E7EB;             /* Borders and dividers */
    
    /* Sidebar Colors */
    --sidebar-bg: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-hover: #334155;
    --sidebar-active: #FD0315;          /* Brand red for active menu items */
}

/* ============================================
   BASE & RESET STYLES
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-page);
    overflow-x: hidden;
}

/* Auth pages body override */
body.auth-page {
    /* BACKUP: background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: var(--bg-page); /* Whitesmoke background */
    min-height: 100vh;
    padding-bottom: 20px;
}

/* ============================================
   SIDEBAR NAVIGATION (Dashboard Pages)
============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

html.sidebar-collapsed-preload .sidebar {
    width: var(--sidebar-collapsed-width);
    transition: none;
}

html.sidebar-collapsed-preload .main-content,
html.sidebar-collapsed-preload .footer {
    margin-left: var(--sidebar-collapsed-width);
    transition: none;
}

html.sidebar-collapsed-preload .sidebar-logo h5,
html.sidebar-collapsed-preload .menu-section-title,
html.sidebar-collapsed-preload .menu-item span,
html.sidebar-collapsed-preload .menu-item .badge {
    opacity: 0;
    width: 0;
    overflow: hidden;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
}

html.sidebar-collapsed-preload .sidebar-logo h5,
html.sidebar-collapsed-preload .menu-section-title {
    height: 0;
    position: absolute;
}

html.sidebar-collapsed-preload .sidebar-logo-collapsed {
    display: block;
}

html.sidebar-collapsed-preload .menu-item {
    justify-content: center;
    padding: 12px 10px;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo h5 {
    color: white;
    margin: 0;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-logo h5 {
    opacity: 0;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.sidebar-logo-collapsed {
    display: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-logo-collapsed {
    display: block;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-section-title {
    color: var(--sidebar-text);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    opacity: 0.6;
    transition: opacity 0.2s ease, height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    height: auto;
    overflow: hidden;
}

.sidebar.collapsed .menu-section-title {
    opacity: 0;
    height: 0;
    padding: 0 20px;
    margin: 0;
    transition: opacity 0.15s ease, height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.menu-item:hover {
    background: var(--sidebar-hover);
    color: white;
}

.menu-item.active {
    background: rgba(253, 3, 21, 0.15);
    color: white;
    border-left: 3px solid var(--sidebar-active);
}

.menu-item i {
    font-size: 20px;
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 12px 10px;
}

.sidebar.collapsed .menu-item.active {
    border-left: 3px solid var(--sidebar-active);
}

/* Collapsed navigation keeps labels inside the sidebar. */
.sidebar.collapsed .menu-item:hover::before,
.sidebar.collapsed .menu-item:hover::after {
    content: none !important;
    display: none !important;
}

.menu-item span {
    margin-left: 15px;
    transition: opacity 0.2s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .menu-item span {
    opacity: 0;
    width: 0;
    margin-left: 0;
    transition: opacity 0.15s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin 0.3s ease;
}

.menu-item .badge {
    margin-left: auto;
    transition: opacity 0.2s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.sidebar.collapsed .menu-item .badge {
    opacity: 0;
    width: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    transition: opacity 0.15s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   MAIN CONTENT AREA (Dashboard Pages)
============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

/* Authenticated tenant browsing shell for public listing pages. */
.tenant-public-page {
    padding-left: var(--sidebar-width);
    padding-top: 58px;
}
.tenant-public-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--sidebar-width);
    overflow-y: auto;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
}
.tenant-public-sidebar__brand {
    padding: 18px 15px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.tenant-public-sidebar__brand a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    background: #FD0315;
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}
.tenant-public-sidebar__nav { padding: 20px 0; }
.tenant-public-sidebar__nav a {
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
    min-height: 42px;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
}
.tenant-public-sidebar__nav a:hover,
.tenant-public-sidebar__nav a.is-active {
    background: rgba(253, 3, 21, 0.15);
    border-left-color: var(--sidebar-active);
    color: #fff;
}
.tenant-public-sidebar__nav a i {
    flex-shrink: 0;
    font-size: 20px;
    text-align: center;
    width: 30px;
}
.tenant-public-sidebar__nav a span { margin-left: 15px; }
.tenant-public-sidebar__group { margin: 0; }
.tenant-public-sidebar__chevron { margin-left: auto !important; width: auto !important; font-size: .75rem !important; }
.tenant-public-sidebar__submenu-toggle {
    display: flex;
    align-items: center;
    width: calc(100% - 30px);
    min-height: 42px;
    margin: 0 10px 8px 20px;
    padding: 12px 20px;
    border: 0;
    border-left: 2px solid #64748b;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.tenant-public-sidebar__submenu-toggle:hover,
.tenant-public-sidebar__submenu-toggle[aria-expanded="true"] { color: #fff; }
.tenant-public-sidebar__submenu-toggle i {
    flex-shrink: 0;
    font-size: 20px;
    text-align: center;
    width: 30px;
}
.tenant-public-sidebar__section {
    color: var(--sidebar-text);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    opacity: .6;
    padding: 10px 20px;
}
.tenant-public-topbar {
    position: fixed;
    inset: 0 0 auto var(--sidebar-width);
    z-index: 1030;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15,23,42,.05);
}
.tenant-public-topbar__title { color: #1e293b; font-weight: 700; text-decoration: none; }
.tenant-public-topbar__account { display: flex; align-items: center; gap: 8px; color: #64748b; font-size: .85rem; }
.tenant-public-topbar__toggle { display: none; border: 0; background: transparent; color: #1e293b; font-size: 1.35rem; }
.tenant-identity-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #bbf7d0;
    border-radius: 7px;
    background: #f0fdf4;
    color: #166534;
    font-size: .9rem;
}
@media (max-width: 991.98px) {
    .tenant-public-page { padding-left: 0; padding-top: 58px; }
    .tenant-public-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .tenant-public-sidebar.is-open { transform: translateX(0); }
    .tenant-public-topbar { left: 0; }
    .tenant-public-topbar__toggle { display: inline-flex; }
}

/* ============================================
   TOP BAR (Dashboard Pages)
============================================ */
.topbar {
    background: white;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-topbar-brand {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    transition: color 0.3s;
}

.sidebar-toggle:hover {
    color: var(--primary-color);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.15s;
}
.user-avatar:hover {
    opacity: 0.85;
}

/* User dropdown menu */
.user-info.dropdown {
    position: relative;
}
.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1050;
    overflow: hidden;
    animation: userMenuFadeIn 0.15s ease;
}
.user-dropdown-menu.open {
    display: block;
}
@keyframes userMenuFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
}
.user-dropdown-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}
.user-dropdown-email {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-dropdown-role {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 1px;
}
.user-dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0;
}
.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    transition: background 0.12s;
}
.user-dropdown-item:hover {
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
}
.user-dropdown-item i {
    font-size: 15px;
    color: #64748b;
    width: 18px;
    text-align: center;
}
.user-dropdown-logout {
    color: var(--primary-color);
}
.user-dropdown-logout i {
    color: var(--primary-color);
}
.user-dropdown-logout:hover {
    background: #fff5f5;
    color: var(--primary-hover);
}

/* ============================================
   CONTENT AREA (Dashboard Pages)
============================================ */
.content-area {
    padding: 30px;
}

.page-shell {
    width: 100%;
    margin-inline: 0 auto;
}

.page-shell--form {
    max-width: 1200px;
}

.page-shell--dashboard {
    max-width: 1600px;
}

.page-shell--data {
    max-width: 1920px;
}

.page-shell--full {
    max-width: none;
}

@media (min-width: 1600px) {
    .content-area {
        padding-inline: 48px;
    }
}

/* ============================================
   AUTH NAVIGATION (Login, Register, Logout)
============================================ */
.auth-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e9ecef;
}

.auth-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    color: #1e293b;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.nav-brand:hover {
    color: #FD0315;
    transform: translateY(-2px);
}

.nav-brand i {
    font-size: 24px;
    color: #FD0315;
}

.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-links a {
    color: #475569;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-links a:hover {
    background: #f8fafc;
    color: #FD0315;
    transform: translateY(-2px);
}

.auth-nav-toggle {
    display: none;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #1e293b;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 1.25rem;
    line-height: 1;
}

/* ============================================
   PAGE WRAPPER (Auth Pages)
============================================ */
.page-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================
   LOGIN PAGE
============================================ */
.login-container {
    width: 100%;
    max-width: 950px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #FD0315 80%, #2C3E50 20%); /* Brand red to charcoal gradient */
    padding: 30px 40px;
    text-align: center;
    color: white;
}

.login-header h5 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    opacity: 0.95;
}

.login-body {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 0;
}

.login-left {
    padding: 40px;
    border-right: 1px solid #e2e8f0;
}

.login-right {
    padding: 40px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============================================
   REGISTER PAGE
============================================ */
.register-container {
    width: 100%;
    max-width: 900px;
}

.register-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin-bottom: 20px;
}

.register-header {
    background: linear-gradient(135deg, #FD0315 80%, #2C3E50 20%); /* Match login-header gradient */
    padding: 30px 40px;
    text-align: center;
    color: white;
}

.register-header h5 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    opacity: 0.95;
}

.register-body {
    padding: 40px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.step-number.active {
    background: var(--primary-color);
    color: white;
}

.step-number.completed {
    background: var(--success-color);
    color: white;
}

.step-text {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.step-text.active {
    color: var(--primary-color);
}

.step-divider {
    width: 40px;
    height: 2px;
    background: #e2e8f0;
}

/* Account Type Cards */
.account-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.account-type-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.account-type-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
}

.account-type-card input[type="radio"] {
    display: none;
}

.account-type-card:has(input[type="radio"]:checked),
.account-type-card.selected {
    border-color: var(--primary-color);
    /* BACKUP: background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(59, 130, 246, 0.05)); */
    background: linear-gradient(135deg, rgba(253, 3, 21, 0.05), rgba(44, 62, 80, 0.05)); /* Brand red to charcoal tint */
}

.account-type-card:has(input[type="radio"]:checked) .account-icon,
.account-type-card.selected .account-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.account-type-card:has(input[type="radio"]:checked) .account-title,
.account-type-card.selected .account-title {
    color: var(--primary-color);
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.account-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--primary-color);
    transition: all 0.3s;
}

.account-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: #1e293b;
}

.account-desc {
    font-size: 12px;
    color: #64748b;
}

/* ============================================
   LOGOUT PAGE
============================================ */
.logout-container {
    width: 100%;
    max-width: 950px;
}

.logout-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.logout-header {
    background: linear-gradient(135deg, var(--success-color), #059669);
    padding: 30px 40px;
    text-align: center;
    color: white;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.logout-header h5 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    opacity: 0.95;
}

.logout-body {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 0;
}

.logout-left {
    padding: 40px 30px 40px 40px;
    border-right: 1px solid #e2e8f0;
}

/* ============================================
   WELCOME CONTENT (Login/Logout)
============================================ */
.welcome-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.welcome-content p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: start;
    gap: 12px;
    margin-bottom: 16px;
    color: #475569;
    font-size: 14px;
}

.feature-list li i {
    color: var(--primary-color);
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================
   STATS CARDS (Dashboard)
============================================ */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    height: 100%;
    border-left: 4px solid transparent;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stats-card.primary {
    border-left-color: var(--primary-color);
}

.stats-card.secondary {
    border-left-color: var(--secondary-color);
}

.stats-card.success {
    border-left-color: var(--success-color);
}

.stats-card.warning {
    border-left-color: var(--warning-color);
}

.stats-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stats-card.primary .stats-card-icon {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-color);
}

.stats-card.secondary .stats-card-icon {
    background: rgba(44, 62, 80, 0.1);
    color: var(--secondary-color);
}

.stats-card.success .stats-card-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stats-card.warning .stats-card-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.stats-card-title {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 8px;
}

.stats-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.stats-card-detail {
    font-size: 13px;
    color: #94a3b8;
}

/* ============================================
   CONTENT CARDS
============================================ */
.content-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.content-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-card-body {
    padding: 24px;
}

/* Content Card Status Borders (matches unit-badge colors) */
/* Using ::before pseudo-element for reliable left border */
.content-card.border-occupied::before,
.content-card.border-available::before,
.content-card.border-maintenance::before,
.content-card.border-unavailable::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    z-index: 10;
}

.content-card.border-occupied::before {
    background: #10b981; /* Green - Occupied */
}

.content-card.border-available::before {
    background: #f59e0b; /* Orange - Available */
}

.content-card.border-maintenance::before {
    background: #0ea5e9; /* Cyan - Maintenance */
}

.content-card.border-unavailable::before {
    background: #7e8c99; /* Grey - Unavailable */
}

/* Legacy border classes for backwards compatibility */
.content-card.border-active::before,
.content-card.border-success::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #10b981; /* Green - Active */
    z-index: 10;
}

.content-card.border-inactive::before,
.content-card.border-secondary::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #7e8c99; /* Grey - Inactive */
    z-index: 10;
}

.content-card.border-warning::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #f59e0b; /* Orange - Warning */
    z-index: 10;
}

.content-card.border-archived::before,
.content-card.border-dark::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #212529; /* Dark Grey/Black - Archived */
    z-index: 10;
}

.content-card.border-primary::before,
.content-card.border-danger::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #FD0315; /* Red - Primary/Danger */
    z-index: 10;
}

/* Archived Property Background */
.content-card.archived-property {
    background: #f8f9fa !important; /* Light grey background for archived properties */
    opacity: 0.60;
}

.info-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* ============================================
   PAGE HEADERS
============================================ */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.page-header p {
    color: #64748b;
    margin: 0;
}

h3 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 8px;
}

.text-muted {
    color: #64748b !important;
    font-size: 14px;
}

/* ============================================
   PROPERTY & UNIT COMPONENTS
============================================ */
.property-item {
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.property-item:last-child {
    border-bottom: none;
}

.property-item:hover {
    background: #f8fafc;
}

/* Unit Cards */
.unit-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    overflow: hidden;
}

.unit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.unit-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.unit-image-placeholder {
    width: 100%;
    height: 200px;
    /* BACKUP: background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: linear-gradient(135deg, #2C3E50 0%, #FD0315 100%); /* Dark charcoal to Brand Red */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Unit Badge */
.unit-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.unit-badge.occupied {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.unit-badge.available {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.unit-badge.maintenance {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.unit-badge.unavailable {
    background: rgba(126, 140, 153, 0.1);
    color: var(--secondary-color);
}

/* Featured Photo */
.featured-photo {
    width: 100%;
    height: 500px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 12px;
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
}

.gallery-item-caption {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #475569;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-caption-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
    border-radius: 0 0 12px 12px;
    pointer-events: none;
}

/* Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #64748b;
    font-weight: 500;
}

.info-value {
    color: #1e293b;
    font-weight: 600;
    text-align: right;
}

/* Amenity Badge */
.amenity-badge {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px;
    background-color: #f1f5f9;
    border-radius: 6px;
    font-size: 13px;
}

/* Price Highlight */
.price-highlight {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ============================================
   BUTTONS
============================================ */
.btn-primary-custom {
    background: linear-gradient(135deg, #FD0315 80%, #2C3E50 20%); /* Brand red to charcoal gradient */
    border: 2px solid #ffffff;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
}

.btn-primary-custom:hover {
    color: white;
    background: linear-gradient(135deg, #FD0315 80%, #6b6b6b 20%);
    border: 2px solid #10b981;
}

.btn-primary-custom.btn-sm {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-primary-custom.btn-md {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 7px;
}

.btn-secondary-custom {
    background: linear-gradient(135deg, #f1f5f9 90%, #2C3E50 10%); 
    border: 2px solid #e2e8f0;
    color: #475569;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
}

.btn-secondary-custom:hover {
    color: rgb(0, 0, 0);
    background: linear-gradient(135deg, #e2e8f0 90%, #ffffff 10%);
    border: 2px solid #10b981;
}

.btn-secondary-custom.btn-sm {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-secondary-custom.btn-md {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 7px;
}

.btn-danger-custom {
    background: linear-gradient(135deg, #dc2626 80%, #7f1d1d 20%);
    border: 2px solid #ffffff;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
}

.btn-danger-custom:hover:not(:disabled) {
    color: white;
    background: linear-gradient(135deg, #b91c1c 80%, #450a0a 20%);
    border: 2px solid #f87171;
}

.btn-danger-custom:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-danger-custom.btn-sm {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-danger-custom.btn-md {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 7px;
}

/* Brand-Aligned Badge Classes */
.badge.badge-brand-primary {
    background-color: #FD0315;
    color: white;
}

.badge.badge-brand-secondary {
    background-color: #7e8c99;
    color: white;
}

.badge.badge-brand-success {
    background-color: #10b981;
    color: white;
}

.badge.badge-brand-warning {
    background-color: #f59e0b;
    color: #1e293b;
    font-weight: 600;
}

.badge.badge-brand-info {
    background-color: #0ea5e9;
    color: white;
}

.badge.badge-brand-danger {
    background-color: #dc3545;
    color: white;
}

.btn-outline-primary-custom {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 14px 24px;
    font-weight: 600;
    border-radius: 12px;
    background: white;
    transition: all 0.3s;
}

.btn-outline-primary-custom:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

.btn-toggle-password {
    border: 1px solid #e2e8f0;
    border-left: none;
    background: #f8fafc;
    padding: 0 16px;
    border-radius: 0 8px 8px 0;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-toggle-password:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Match button border to input when password field is focused */
#password:focus ~ .btn-toggle-password {
    border-color: var(--primary-color);
    border-left: none;
}

/* ============================================
   FORMS
============================================ */
.form-control, .form-select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.15);
    outline: none;
}

.form-floating {
    margin-bottom: 0;
}

.form-floating .form-control {
    border-radius: 0 8px 8px 0 !important;
}

/* Input group with icon styling */
.input-group-text {
    border: 1px solid #a78bfa !important;
    border-right: 1px solid #a78bfa !important;
    color: #7c3aed !important;
    background-color: #f9fafb;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Icon color inside input-group-text */
.input-group-text i {
    color: #7c3aed !important;
}

/* Invalid state for input-group-text (applied when the paired input is missing/invalid) */
.input-group-text-invalid {
    border: 1px solid #f70303 !important;
    border-right: 1px solid #f70303 !important;
    color: #f70303 !important;
    background-color: #eef0a0;
}

.input-group-text-invalid i {
    color: #f70303 !important;
}

/* Remove left border on form control inside input group */
.input-group .form-control,
.input-group .form-select {
    border: 1px solid #a78bfa !important;
    border-left: none !important;
}

/* Keep invalid grouped controls red while preserving the icon-side seam. */
.input-group .form-control.is-invalid,
.input-group .form-select.is-invalid,
.input-group .form-control.profanity-flagged,
.input-group .form-select.profanity-flagged {
    border: 1px solid #dc2626 !important;
    border-left: none !important;
}

/* Ensure proper borders on input group buttons */
.input-group .btn {
    border: 1px solid #a78bfa !important;
    border-left: none !important;
}

/* Unified glow effect around entire input group when focused */
.input-group:focus-within {
    box-shadow: 0 0 0 0.25rem rgba(167, 139, 250, 0.25);
    border-radius: 0.375rem;
}

.input-group:focus-within .form-control,
.input-group:focus-within .form-select {
    box-shadow: none !important;
}

/* Accent line after icon on focus */
.input-group:focus-within .input-group-text {
    border-right: 3px solid #7c3aed !important;
}

/* Keep the invalid icon divider red while an invalid control is focused. */
.input-group:focus-within .input-group-text.input-group-text-invalid {
    border-right-color: #dc2626 !important;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Password Field */
.password-field-wrapper {
    position: relative;
}

.password-icons {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 4px;
}

.password-icon {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-icon:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.password-icon.success {
    color: var(--success-color);
}

.password-icon i {
    font-size: 16px;
}

.password-section {
    display: none;
}

.password-section.visible {
    display: block;
}

/* Password Requirements */
.password-requirements {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    font-size: 13px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.password-requirements li {
    padding: 4px 0;
    color: #64748b;
}

.password-requirements li i {
    width: 20px;
    margin-right: 8px;
}

.password-requirements li.valid {
    color: var(--success-color);
}

.password-requirements li.invalid {
    color: #64748b;
}

/* Code Input */
.code-input {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.code-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s;
}

.code-digit:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
}

/* ============================================
   ALERTS
============================================ */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: start;
    gap: 12px;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
}

/* ============================================
   DIVIDERS
============================================ */
.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 0;
}

.divider span {
    background: white;
    padding: 0 16px;
    color: #64748b;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* ============================================
   BREADCRUMBS
============================================ */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #94a3b8;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #64748b;
}

/* ============================================
   TABLES
============================================ */
.table > :not(caption) > * > * {
    padding: 12px 16px;
}

.table thead th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* ============================================
   UTILITY CLASSES
============================================ */
.text-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.text-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.help-text {
    text-align: center;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h5 {
    color: #64748b;
    margin-bottom: 12px;
}

.empty-state p {
    color: #94a3b8;
    margin-bottom: 24px;
}

/* Brand Color Utilities */
.text-brand-primary {
    color: var(--primary-color) !important;
}

.text-brand-secondary {
    color: var(--secondary-color) !important;
}

.bg-brand-light {
    background-color: var(--bg-light) !important;
}

/* Card Hover Effect */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}

/* Carousel Controls Themed */
.carousel-control-themed .carousel-control-prev-icon,
.carousel-control-themed .carousel-control-next-icon {
    background-color: var(--secondary-color);
    border-radius: 50%;
    padding: 1.5rem;
}

/* Table Header Themed */
.table-header-themed {
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   SPINNER/LOADING
============================================ */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-overlay.active {
    display: flex;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

/* ============================================
   PUBLIC PAGE HEROES
============================================ */
.public-page-hero {
    background: #1e293b;
    color: #fff;
    padding: 2rem 0;
}

.public-page-hero--compact {
    padding: 4rem 0 3rem;
}

.public-page-hero p {
    color: #cbd5e1;
    font-size: 1.125rem;
}

/* ============================================
   FOOTER STYLES
============================================ */
.footer {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

.public-site-footer {
    margin-left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    color: #475569;
}

.public-site-footer__inner {
    padding-top: 32px;
    padding-bottom: 24px;
}

.public-site-footer__brand {
    display: inline-flex;
    margin-bottom: 12px;
}

.public-site-footer__summary {
    max-width: 340px;
    margin: 0;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
}

.public-site-footer__socials {
    display: none;
    gap: 8px;
    margin-top: 16px;
}

.public-site-footer__social {
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
    width: 36px;
}

.public-site-footer__social:hover {
    background: #f8fafc;
    border-color: #FD0315;
    color: #FD0315;
    transform: translateY(-2px);
}

.public-site-footer__heading {
    color: #1e293b;
    font-size: 15px;
    font-weight: 700;
    margin: 4px 0 12px;
}

.public-site-footer__links li,
.public-site-footer__contact li {
    margin-bottom: 8px;
}

.public-site-footer .footer-link {
    color: #475569;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s;
}

.public-site-footer .footer-link:hover {
    color: #FD0315;
}

.public-site-footer__links .footer-link {
    align-items: center;
    display: inline-flex;
}

.public-site-footer__links .footer-link:hover {
    transform: translateY(-2px);
}

.public-site-footer__links .footer-link i,
.public-site-footer__contact i,
.public-site-footer__bottom .bi-heart-fill {
    color: #FD0315;
}

.public-site-footer__contact li {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    line-height: 1.6;
}

.public-site-footer__contact i {
    margin-top: 3px;
}

.public-site-footer__bottom {
    border-top: 1px solid #e9ecef;
    color: #64748b;
    margin-top: 28px;
    padding-top: 20px;
}

/* Public/auth pages have no sidebar — reset footer offset */
.auth-page .footer {
    margin-left: 0;
}

.auth-page .public-site-footer {
    margin-left: 0;
    width: 100%;
}

.footer-links a {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
    transform: translateX(3px);
}

.footer-contact-link {
    transition: all 0.3s ease;
}

.footer-contact-link:hover {
    color: var(--primary-color) !important;
}

.footer-social-btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */

/* Mobile Button Sizing (XS Breakpoint) */
@media (max-width: 576px) {
    .btn:not(.btn-lg):not(.footer-social-btn) {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    /* Stats Card Icon Sizing - reduce padding and icon size on mobile */
    .card-body .rounded-circle.p-3 {
        padding: 0.5rem !important;
    }
    
    .card-body .rounded-circle .fs-3 {
        font-size: 1.5rem !important;
    }
    
    /* Stats Card Number Sizing - slightly reduce display font on mobile */
    .card-body .display-6 {
        font-size: 1.75rem !important;
    }
    
    /* Badge Mobile Optimization - prevent overflow */
    .badge.rounded-pill {
        padding: 0.35rem 0.65rem !important;
        font-size: 0.75rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        max-width: 100%;
        line-height: 1.3;
    }
    
    /* List group items - better mobile layout */
    .list-group-item .d-flex .flex-shrink-0:last-child {
        flex-shrink: 1 !important;
        min-width: 0;
        max-width: 110px;
    }
    
    /* Avatar sizing on mobile */
    .list-group-item .flex-shrink-0:first-child > div {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 767.98px) {
    .auth-nav .container {
        flex-wrap: wrap;
        padding: 0 16px;
    }

    .auth-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .auth-nav .nav-links {
        display: none;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding-top: 12px;
    }

    .auth-nav .nav-links.is-open {
        display: flex;
    }

    .auth-nav .nav-links a {
        padding: 10px 12px;
        font-size: 15px;
    }

    .auth-nav .nav-links a i {
        display: inline-block;
    }
}

@media (max-width: 768px) {
    .mobile-topbar-brand {
        display: block;
        width: 100%;
        background-color: #FD0315;
        color: white;
        padding: 8px 10px;
        text-align: center;
        font-size: 0.8rem;
        font-weight: 600;
        line-height: 1.2;
        white-space: nowrap;
    }

    .mobile-topbar-brand sup {
        font-size: 0.5em;
    }

    /* Sidebar Mobile */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .footer {
        margin-left: 0;
    }
    
    .content-area {
        padding: 20px 15px;
    }

    .topbar-left > h5 {
        display: none;
    }
    
    /* Auth Pages Mobile */
    .login-body, .logout-body {
        grid-template-columns: 1fr;
    }
    
    .login-left, .logout-left {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 30px 24px;
    }
    
    .login-right {
        padding: 30px 24px;
    }
    
    .welcome-content h2 {
        font-size: 24px;
    }
    
    .nav-links {
        gap: 12px;
    }
    
    .nav-links a {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .nav-links a i {
        display: none;
    }
    
    /* Register Mobile */
    .register-body {
        padding: 24px 20px;
    }
    
    .account-type-grid {
        grid-template-columns: 1fr;
    }
    
    .step-text {
        display: none;
    }
    
    .step-indicator {
        gap: 8px;
    }
    
    .step-divider {
        width: 20px;
    }
    
    /* Featured Photo Mobile */
    .featured-photo {
        height: 300px;
    }
}

@media (max-width: 576px) {
    /* Auth Navigation Mobile */
    .auth-nav .container {
        padding: 0 16px;
    }
    
    .nav-brand {
        font-size: 16px;
    }
    
    .nav-brand i {
        font-size: 20px;
    }
    
    .nav-links {
        gap: 8px;
    }
    
    .nav-links a {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    /* Card Headers Mobile */
    .login-header, .register-header, .logout-header {
        padding: 24px;
    }
    
    .login-left, .logout-left {
        padding: 24px 20px;
    }
    
    .login-right {
        padding: 24px 20px;
    }
    
    .welcome-content h2 {
        font-size: 22px;
    }
    
    /* Code Input Mobile */
    .code-digit {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
}

/* ============================================
   RESPONSIVE PAGINATION SIZING
============================================ */
.pagination-responsive {
    font-size: 0.875rem; /* Small on mobile */
}

.pagination-responsive .page-link {
    padding: 0.375rem 0.75rem;
}

@media (min-width: 768px) {
    .pagination-responsive {
        font-size: 1.125rem; /* Large on MD+ */
    }
    
    .pagination-responsive .page-link {
        padding: 0.75rem 1.5rem;
    }
}
