/**
 * BuySellCy - User Pages Shared Styles
 * Clean, professional, minimal design
 * 
 * Brand Colors:
 * - Primary Dark: #1d283a
 * - Light Background: #f4f7f9
 * - Accent (Amber): #f59e0b
 * - White: #ffffff
 */

/* ==========================================================================
   CSS Variables (Brand Palette)
   ========================================================================== */
:root {
    --user-brand-dark: #1d283a;
    --user-brand-light: #f4f7f9;
    --user-brand-accent: #f59e0b;
    --user-brand-accent-hover: #d97706;
    --user-brand-white: #ffffff;
    --user-border-color: #e2e8f0;
    --user-text-primary: #1d283a;
    --user-text-secondary: #64748b;
    --user-text-muted: #94a3b8;
    --user-success: #22c55e;
    --user-warning: #f59e0b;
    --user-danger: #ef4444;
    --user-info: #3b82f6;
}

/* ==========================================================================
   Page Layout
   ========================================================================== */
.user-page-container {
    padding: 1.5rem 0 3rem;
    min-height: calc(100vh - 300px);
    background: var(--user-brand-white);
}

/* ==========================================================================
   Cards - Clean & Minimal
   ========================================================================== */
.user-card {
    background: var(--user-brand-white);
    border: 1px solid var(--user-border-color);
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-card:hover {
    border-color: var(--user-brand-accent);
}

.user-card-header {
    padding: 1rem 1.25rem;
    background: var(--user-brand-white);
    border-bottom: 1px solid var(--user-border-color);
    border-radius: 12px 12px 0 0;
}

.user-card-header h5,
.user-card-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--user-text-primary);
}

.user-card-header .card-icon {
    color: var(--user-brand-accent);
}

.user-card-body {
    padding: 1.25rem;
}

.user-card-footer {
    padding: 0.75rem 1.25rem;
    background: var(--user-brand-light);
    border-top: 1px solid var(--user-border-color);
    border-radius: 0 0 12px 12px;
}

/* ==========================================================================
   Stats Cards - Compact & Clean
   ========================================================================== */
.user-stat-card {
    background: var(--user-brand-white);
    border: 1px solid var(--user-border-color);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    transition: all 0.2s ease;
    height: 100%;
}

.user-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--user-brand-accent);
    box-shadow: 0 4px 12px rgba(29, 40, 58, 0.08);
}

.user-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    margin: 0 auto 0.625rem;
}

.user-stat-icon.accent {
    background: rgba(245, 158, 11, 0.12);
    color: var(--user-brand-accent);
}

.user-stat-icon.success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--user-success);
}

.user-stat-icon.info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--user-info);
}

.user-stat-icon.dark {
    background: rgba(29, 40, 58, 0.08);
    color: var(--user-text-secondary);
}

.user-stat-number {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--user-text-primary);
    line-height: 1.2;
    margin-bottom: 0.125rem;
}

.user-stat-number small {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--user-text-secondary);
}

.user-stat-label {
    font-size: 0.75rem;
    color: var(--user-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Inline stat cards */
.user-stat-inline {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--user-brand-white);
    border: 1px solid var(--user-border-color);
    border-radius: 12px;
    height: 100%;
    transition: border-color 0.2s ease;
}

.user-stat-inline:hover {
    border-color: var(--user-brand-accent);
}

.user-stat-inline .user-stat-icon {
    margin: 0;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.user-stat-inline .user-stat-info {
    flex: 1;
    min-width: 0;
}

.user-stat-inline .user-stat-number {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.user-stat-inline .user-stat-number small {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--user-text-muted);
}

.user-stat-inline .user-stat-label {
    font-size: 0.6875rem;
}

/* ==========================================================================
   Buttons - Brand Styled
   ========================================================================== */
.btn-user-primary {
    background: var(--user-brand-dark);
    border-color: var(--user-brand-dark);
    color: var(--user-brand-white);
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-user-primary:hover,
.btn-user-primary:focus {
    background: var(--user-brand-accent);
    border-color: var(--user-brand-accent);
    color: var(--user-brand-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-user-accent {
    background: var(--user-brand-accent);
    border-color: var(--user-brand-accent);
    color: var(--user-brand-white);
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-user-accent:hover,
.btn-user-accent:focus {
    background: var(--user-brand-accent-hover);
    border-color: var(--user-brand-accent-hover);
    color: var(--user-brand-white);
    transform: translateY(-1px);
}

.btn-user-outline {
    background: transparent;
    border: 1px solid var(--user-border-color);
    color: var(--user-text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-user-outline:hover {
    border-color: var(--user-brand-dark);
    color: var(--user-brand-dark);
    background: var(--user-brand-light);
}

/* Light variant for dark backgrounds */
.btn-user-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--user-brand-white);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-user-outline-light:hover {
    border-color: var(--user-brand-white);
    color: var(--user-brand-dark);
    background: var(--user-brand-white);
}

/* ==========================================================================
   Tables - Clean Design
   ========================================================================== */
.user-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.user-table thead {
    background: var(--user-brand-light);
}

.user-table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--user-text-muted);
    padding: 0.75rem 0.875rem;
    border: none;
    border-bottom: 1px solid var(--user-border-color);
    white-space: nowrap;
}

.user-table tbody tr {
    border-bottom: 1px solid var(--user-border-color);
    transition: background-color 0.15s ease;
}

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

.user-table tbody tr:hover {
    background-color: var(--user-brand-light);
}

.user-table tbody td {
    padding: 0.75rem 0.875rem;
    vertical-align: middle;
    color: var(--user-text-primary);
    font-size: 0.875rem;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */
.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.user-badge i {
    font-size: 0.625rem;
}

.user-badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.user-badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.user-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.user-badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.user-badge-dark {
    background: rgba(29, 40, 58, 0.08);
    color: var(--user-text-secondary);
}

.user-badge-accent {
    background: var(--user-brand-accent);
    color: var(--user-brand-white);
}

/* Status-specific badges */
.status-active,
.user-badge.status-active {
    background-color: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.status-pending,
.user-badge.status-pending {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.status-expired,
.user-badge.status-expired {
    background-color: rgba(108, 117, 125, 0.1);
    color: #64748b;
}

.status-sold,
.user-badge.status-sold {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.status-withdrawn,
.user-badge.status-withdrawn {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ==========================================================================
   Alerts - Clean Style
   ========================================================================== */
.user-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid;
    margin-bottom: 1rem;
}

.user-alert-icon {
    flex-shrink: 0;
    font-size: 1.125rem;
    margin-top: 0.0625rem;
}

.user-alert-content {
    flex: 1;
    min-width: 0;
}

.user-alert-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.user-alert-text {
    font-size: 0.8125rem;
    opacity: 0.85;
    line-height: 1.5;
}

.user-alert.warning {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.25);
    color: #92400e;
}

.user-alert.warning .user-alert-icon {
    color: var(--user-brand-accent);
}

.user-alert.info {
    background: var(--user-brand-light);
    border-color: var(--user-border-color);
    color: var(--user-brand-dark);
}

.user-alert.info .user-alert-icon {
    color: var(--user-brand-dark);
}

.user-alert.danger {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.user-alert.danger .user-alert-icon {
    color: var(--user-danger);
}

.user-alert.success {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
    color: #166534;
}

.user-alert.success .user-alert-icon {
    color: var(--user-success);
}

/* ==========================================================================
   Plan Banner - Minimal
   ========================================================================== */
.user-plan-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.user-plan-banner.free {
    background: var(--user-brand-white);
    border: 1px solid var(--user-border-color);
}

.user-plan-banner.premium {
    background: var(--user-brand-dark);
    color: var(--user-brand-white);
}

.user-plan-banner.limit-reached {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: var(--user-brand-white);
}

.user-plan-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.user-plan-icon {
    font-size: 1.375rem;
    color: var(--user-brand-accent);
}

.user-plan-banner.premium .user-plan-icon,
.user-plan-banner.limit-reached .user-plan-icon {
    color: var(--user-brand-accent);
}

.user-plan-name {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.3;
}

.user-plan-detail {
    font-size: 0.8125rem;
    opacity: 0.75;
    line-height: 1.3;
}

/* ==========================================================================
   Activity / Notification Lists
   ========================================================================== */
.user-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-activity-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--user-border-color);
    transition: background-color 0.15s ease;
    text-decoration: none;
    color: inherit;
}

.user-activity-item:last-child {
    border-bottom: none;
}

.user-activity-item:hover {
    background: var(--user-brand-light);
}

.user-activity-item.unread {
    background: rgba(245, 158, 11, 0.03);
}

.user-activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9375rem;
}

/* Activity icon colors - more subtle */
.user-activity-icon.accent {
    background: rgba(245, 158, 11, 0.1);
    color: var(--user-brand-accent);
}

.user-activity-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--user-success);
}

.user-activity-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--user-info);
}

.user-activity-icon.dark {
    background: rgba(29, 40, 58, 0.06);
    color: var(--user-text-secondary);
}

.user-activity-content {
    flex: 1;
    min-width: 0;
}

.user-activity-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--user-text-primary);
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-activity-time {
    font-size: 0.75rem;
    color: var(--user-text-muted);
}

.user-activity-badge {
    background: var(--user-brand-accent);
    color: var(--user-brand-white);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.1875rem 0.5rem;
    border-radius: 999px;
}

/* ==========================================================================
   Ad Thumbnail in Tables/Lists
   ========================================================================== */
.user-listing-thumb {
    width: 52px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--user-brand-light);
    flex-shrink: 0;
    border: 1px solid var(--user-border-color);
}

.user-listing-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-listing-info > div {
    min-width: 0;
}

.user-listing-title {
    font-weight: 500;
    color: var(--user-text-primary);
    font-size: 0.8125rem;
    text-decoration: none;
    display: block;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.user-listing-title:hover {
    color: var(--user-brand-accent);
}

.user-listing-price {
    font-weight: 600;
    color: var(--user-brand-accent);
    font-size: 0.8125rem;
}

@media (max-width: 991.98px) {
    .user-listing-title {
        max-width: 200px;
    }
}

@media (max-width: 575.98px) {
    .user-listing-title {
        max-width: 140px;
    }
}

/* ==========================================================================
   Pagination - Minimal
   ========================================================================== */
.user-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.user-pagination .page-link {
    border: 1px solid var(--user-border-color);
    color: var(--user-text-primary);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-pagination .page-link:hover {
    background: var(--user-brand-accent);
    border-color: var(--user-brand-accent);
    color: var(--user-brand-white);
}

.user-pagination .page-item.active .page-link {
    background: var(--user-brand-dark);
    border-color: var(--user-brand-dark);
    color: var(--user-brand-white);
}

.user-pagination .page-item.disabled .page-link {
    color: var(--user-text-muted);
    background: transparent;
}

/* ==========================================================================
   Empty States
   ========================================================================== */
.user-empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.user-empty-icon {
    font-size: 3.5rem;
    color: var(--user-border-color);
    margin-bottom: 1rem;
}

.user-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--user-text-primary);
    margin-bottom: 0.5rem;
}

.user-empty-text {
    color: var(--user-text-secondary);
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Quick Actions Row
   ========================================================================== */
.user-quick-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
}

.user-quick-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--user-border-color);
    background: var(--user-brand-white);
    color: var(--user-text-muted);
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.8125rem;
}

.user-quick-action-btn:hover {
    border-color: var(--user-brand-accent);
    color: var(--user-brand-accent);
    background: rgba(245, 158, 11, 0.05);
}

.user-quick-action-btn.danger {
    color: var(--user-text-muted);
}

.user-quick-action-btn.danger:hover {
    border-color: var(--user-danger);
    color: var(--user-danger);
    background: rgba(239, 68, 68, 0.05);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.user-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.user-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--user-text-primary);
    margin: 0;
}

.user-section-title i {
    color: var(--user-brand-accent);
    margin-right: 0.5rem;
}

/* ==========================================================================
   Modal Overrides
   ========================================================================== */
.user-modal .modal-content {
    border: none;
    border-radius: 12px;
}

.user-modal .modal-header {
    background: var(--user-brand-light);
    border-bottom: 1px solid var(--user-border-color);
    border-radius: 12px 12px 0 0;
    padding: 1rem 1.25rem;
}

.user-modal .modal-footer {
    background: var(--user-brand-light);
    border-top: 1px solid var(--user-border-color);
    border-radius: 0 0 12px 12px;
    padding: 0.75rem 1.25rem;
}

/* ==========================================================================
   Tabs - Clean Style
   ========================================================================== */
.user-tabs {
    border-bottom: 1px solid var(--user-border-color);
    margin-bottom: 1.5rem;
}

.user-tabs .nav-link {
    color: var(--user-text-secondary);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.user-tabs .nav-link:hover {
    color: var(--user-text-primary);
    border-color: transparent;
}

.user-tabs .nav-link.active {
    color: var(--user-brand-dark);
    background: transparent;
    border-bottom-color: var(--user-brand-accent);
    font-weight: 600;
}

/* ==========================================================================
   Trial / Upgrade Banners
   ========================================================================== */
.user-trial-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--user-brand-dark) 0%, #2d3e50 100%);
    border-radius: 12px;
    color: var(--user-brand-white);
    margin-bottom: 1.5rem;
}

.user-trial-banner .trial-icon {
    font-size: 1.5rem;
    color: var(--user-brand-accent);
    flex-shrink: 0;
}

.user-trial-banner .trial-content {
    flex: 1;
    min-width: 0;
}

.user-trial-banner .trial-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
    line-height: 1.3;
}

.user-trial-banner .trial-text {
    font-size: 0.8125rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 991.98px) {
    .user-stat-card {
        padding: 1rem 0.875rem;
    }
    
    .user-stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .user-stat-number {
        font-size: 1.375rem;
    }
    
    .user-stat-label {
        font-size: 0.6875rem;
    }
}

@media (max-width: 767.98px) {
    .user-page-container {
        padding: 1rem 0 2rem;
    }
    
    .user-card-header,
    .user-card-body {
        padding: 0.875rem 1rem;
    }
    
    .user-table thead th {
        font-size: 0.625rem;
        padding: 0.625rem 0.5rem;
    }
    
    .user-table tbody td {
        padding: 0.625rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    .user-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .user-plan-banner {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .user-plan-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-trial-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .user-alert {
        padding: 0.875rem 1rem;
    }
    
    .user-quick-action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .user-stat-card {
        padding: 0.875rem 0.75rem;
    }
    
    .user-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9375rem;
        margin-bottom: 0.5rem;
    }
    
    .user-stat-number {
        font-size: 1.25rem;
    }
    
    .user-listing-thumb {
        width: 44px;
        height: 34px;
    }
    
    .user-listing-info {
        gap: 0.5rem;
    }
}

/* ==========================================================================
   Mobile App-Like Styles
   ========================================================================== */
@media (max-width: 991.98px) {
    /* Hide desktop sections on mobile */
    .user-page-container.d-none.d-lg-block,
    .hero-section.d-none.d-lg-block {
        display: none !important;
    }
    
    /* Mobile page wrapper */
    .user-mobile-page {
        padding: 0;
        background: var(--user-brand-white);
        min-height: 100vh;
    }
    
    /* Mobile header */
    .user-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        background: var(--user-brand-white);
        border-bottom: 1px solid var(--user-border-color);
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .user-mobile-title {
        font-size: 1.125rem;
        font-weight: 700;
        color: var(--user-text-primary);
        margin: 0;
    }
    
    .user-mobile-action {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: var(--user-brand-accent);
        color: var(--user-brand-white);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        text-decoration: none;
        transition: transform 0.15s ease;
    }
    
    .user-mobile-action:hover,
    .user-mobile-action:active {
        color: var(--user-brand-white);
        transform: scale(0.95);
    }
    
    /* Mobile tabs - horizontal scroll */
    .user-mobile-tabs {
        display: flex;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background: var(--user-brand-white);
        border-bottom: 1px solid var(--user-border-color);
    }
    
    .user-mobile-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .user-mobile-tab {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.5rem 0.875rem;
        border-radius: 999px;
        border: 1px solid var(--user-border-color);
        background: var(--user-brand-white);
        color: var(--user-text-secondary);
        font-size: 0.8125rem;
        font-weight: 500;
        white-space: nowrap;
        text-decoration: none;
        transition: all 0.15s ease;
    }
    
    .user-mobile-tab.active {
        background: var(--user-brand-dark);
        border-color: var(--user-brand-dark);
        color: var(--user-brand-white);
    }
    
    .user-mobile-tab-count {
        font-size: 0.6875rem;
        font-weight: 600;
        padding: 0.125rem 0.375rem;
        border-radius: 999px;
        background: rgba(0, 0, 0, 0.06);
    }
    
    .user-mobile-tab.active .user-mobile-tab-count {
        background: rgba(255, 255, 255, 0.2);
    }
    
    /* Mobile list */
    .user-mobile-list {
        padding: 0.75rem;
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
    }
    
    /* Mobile list item */
    .user-mobile-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem;
        background: var(--user-brand-white);
        border: 1px solid var(--user-border-color);
        border-radius: 12px;
        transition: border-color 0.15s ease;
    }
    
    .user-mobile-item:active {
        border-color: var(--user-brand-accent);
    }
    
    .user-mobile-thumb {
        width: 64px;
        height: 64px;
        border-radius: 10px;
        overflow: hidden;
        flex-shrink: 0;
        background: var(--user-brand-light);
    }
    
    .user-mobile-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .user-mobile-content {
        flex: 1;
        min-width: 0;
    }
    
    .user-mobile-item-title {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--user-text-primary);
        margin-bottom: 0.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-decoration: none;
        display: block;
    }
    
    .user-mobile-item-title:hover {
        color: var(--user-brand-accent);
    }
    
    .user-mobile-price {
        font-size: 0.9375rem;
        font-weight: 700;
        color: var(--user-brand-accent);
        margin-bottom: 0.125rem;
    }
    
    .user-mobile-meta {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.75rem;
        color: var(--user-text-muted);
    }
    
    .user-mobile-meta span {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .user-mobile-meta i {
        color: var(--user-brand-accent);
    }
    
    .user-mobile-status {
        display: inline-block;
        font-size: 0.5625rem;
        font-weight: 600;
        padding: 0.125rem 0.375rem;
        border-radius: 999px;
        text-transform: capitalize;
        letter-spacing: 0.01em;
    }
    
    .user-mobile-actions {
        display: flex;
        gap: 0.375rem;
    }
    
    .user-mobile-btn {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        border: 1px solid var(--user-border-color);
        background: var(--user-brand-white);
        color: var(--user-text-muted);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.875rem;
        transition: all 0.15s ease;
    }
    
    .user-mobile-btn:active {
        background: var(--user-brand-light);
        border-color: var(--user-brand-accent);
        color: var(--user-brand-accent);
    }
    
    /* Mobile empty state */
    .user-mobile-empty {
        text-align: center;
        padding: 3rem 1.5rem;
    }
    
    .user-mobile-empty-icon {
        font-size: 3rem;
        color: var(--user-border-color);
        margin-bottom: 1rem;
    }
    
    .user-mobile-empty-title {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--user-text-primary);
        margin-bottom: 0.5rem;
    }
    
    .user-mobile-empty-text {
        font-size: 0.875rem;
        color: var(--user-text-secondary);
        margin-bottom: 1.5rem;
    }
    
    /* Mobile stats bar */
    .user-mobile-stats {
        display: flex;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        background: var(--user-brand-light);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .user-mobile-stat {
        flex: 1;
        min-width: 80px;
        text-align: center;
        padding: 0.625rem 0.5rem;
        background: var(--user-brand-white);
        border-radius: 10px;
        border: 1px solid var(--user-border-color);
    }
    
    .user-mobile-stat-number {
        font-size: 1.125rem;
        font-weight: 700;
        color: var(--user-text-primary);
        line-height: 1.2;
    }
    
    .user-mobile-stat-number small {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--user-text-muted);
    }
    
    .user-mobile-stat-label {
        font-size: 0.625rem;
        font-weight: 600;
        color: var(--user-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
}

/* ==========================================================================
   Ad Management Cards (My Ads page)
   ========================================================================== */
.user-listing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 12px;
    border: 1px solid var(--user-border-color);
    background: var(--user-brand-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
}

.user-listing-card:hover {
    border-color: var(--user-brand-accent);
    box-shadow: 0 4px 12px rgba(29, 40, 58, 0.08);
}

.user-listing-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--user-brand-light);
}

.user-listing-card-body {
    padding: 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-listing-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.user-listing-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--user-text-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.user-listing-card-title a {
    color: inherit;
    text-decoration: none;
}

.user-listing-card-title a:hover {
    color: var(--user-brand-accent);
}

.user-listing-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--user-brand-accent);
}

.user-listing-card-stats {
    display: flex;
    gap: 0.875rem;
    font-size: 0.75rem;
    color: var(--user-text-muted);
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--user-border-color);
}

.user-listing-card-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.user-listing-card-stats i {
    color: var(--user-brand-accent);
    font-size: 0.75rem;
}

.user-listing-card-footer {
    display: flex;
    gap: 0.375rem;
    padding: 0.625rem 0.875rem;
    background: var(--user-brand-light);
    border-top: 1px solid var(--user-border-color);
}

.user-listing-card-footer .btn {
    flex: 1;
}

/* Featured ribbon */
.user-listing-featured-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--user-brand-accent);
    color: var(--user-brand-white);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 5;
}

/* Premium features section */
.user-listing-premium-section {
    padding: 0.5rem 1rem;
    background: rgba(245, 158, 11, 0.05);
    border-top: 1px solid var(--user-border-color);
    font-size: 0.75rem;
}

.user-listing-premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--user-brand-accent);
    color: var(--user-brand-white);
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.1875rem 0.375rem;
    border-radius: 4px;
    margin-right: 0.25rem;
    margin-top: 0.25rem;
}

/* Dropdown menu styling */
.user-dropdown-menu {
    min-width: 200px;
    border-radius: 10px;
    border: 1px solid var(--user-border-color);
    box-shadow: 0 4px 16px rgba(29, 40, 58, 0.12);
    padding: 0.5rem 0;
}

.user-dropdown-menu .dropdown-header {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--user-text-muted);
    padding: 0.5rem 1rem 0.25rem;
}

.user-dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: var(--user-text-primary);
    transition: all 0.15s ease;
}

.user-dropdown-menu .dropdown-item:hover {
    background: var(--user-brand-light);
    padding-left: 1.125rem;
}

.user-dropdown-menu .dropdown-item i {
    width: 18px;
    text-align: center;
    margin-right: 0.5rem;
}

.user-dropdown-menu .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--user-danger) !important;
}

.user-dropdown-menu .dropdown-divider {
    margin: 0.375rem 0;
    border-color: var(--user-border-color);
}

/* ==========================================================================
   Messages Page Styles
   ========================================================================== */
.messages-card {
    background: var(--user-brand-white);
    border-radius: 12px;
    border: 1px solid var(--user-border-color);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    min-height: 550px;
}

/* Conversations Sidebar */
.messages-sidebar {
    background: var(--user-brand-white);
    border-right: 1px solid var(--user-border-color);
}

.messages-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--user-border-color);
    background: var(--user-brand-light);
}

.messages-sidebar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--user-text-primary);
    margin: 0;
}

.messages-sidebar-count {
    font-size: 0.8rem;
    color: var(--user-text-muted);
}

.conversations-list {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.conversations-list::-webkit-scrollbar {
    width: 6px;
}

.conversations-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.conversations-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

/* Conversation Item */
.conversation-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--user-text-primary);
    border-bottom: 1px solid var(--user-border-color);
    transition: all 0.2s ease;
    position: relative;
}

.conversation-item:hover {
    background-color: rgba(245, 158, 11, 0.05);
    text-decoration: none;
    color: var(--user-text-primary);
}

.conversation-item.active {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--user-brand-accent);
}

.conversation-item.has-unread {
    background-color: rgba(59, 130, 246, 0.05);
}

.conversation-item.has-unread .conversation-name {
    font-weight: 700;
}

.conversation-item.has-unread .conversation-preview {
    color: var(--user-text-primary);
    font-weight: 500;
}

.conversation-avatar {
    position: relative;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.conversation-avatar img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--user-border-color);
}

.conversation-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--user-danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.conversation-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    color: var(--user-text-primary);
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--user-text-muted);
    white-space: nowrap;
}

.conversation-listing-ref {
    font-size: 0.75rem;
    color: var(--user-brand-accent);
    margin-bottom: 2px;
}

.conversation-listing-ref i {
    font-size: 0.65rem;
}

.conversation-preview {
    font-size: 0.85rem;
    color: var(--user-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

/* Chat Area */
.messages-chat {
    display: flex;
    flex-direction: column;
    background: var(--user-brand-white);
}

.messages-chat-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--user-border-color);
    background: var(--user-brand-light);
}

.messages-chat-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.messages-chat-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.messages-chat-info h6 {
    margin: 0;
    font-weight: 600;
    color: var(--user-text-primary);
}

.messages-chat-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--user-text-muted);
}

.messages-chat-info a {
    color: var(--user-brand-accent);
    text-decoration: none;
}

.messages-chat-info a:hover {
    text-decoration: underline;
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #fafbfc;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

/* Message Bubbles */
.message-wrapper {
    margin-bottom: 1rem;
    display: flex;
}

.message-sent {
    justify-content: flex-end;
}

.message-received {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    position: relative;
}

.message-sent .message-bubble {
    background: var(--user-brand-accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-received .message-bubble {
    background: var(--user-brand-white);
    color: var(--user-text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--user-border-color);
}

.message-content {
    line-height: 1.5;
    word-break: break-word;
}

.message-attachment {
    max-width: 100%;
    margin-bottom: 0.5rem;
}

.message-attachment img {
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    max-width: 250px;
    max-height: 250px;
}

.message-attachment img:hover {
    transform: scale(1.02);
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.message-read-status {
    font-size: 0.85rem;
}

.message-read-status .bi-check2-all {
    color: #0d6efd !important;
}

/* Message Input */
.messages-input-area {
    padding: 1rem;
    border-top: 1px solid var(--user-border-color);
    background: var(--user-brand-light);
}

.message-input-group {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    background: var(--user-brand-white);
    border: 2px solid var(--user-border-color);
    border-radius: 25px;
    padding: 0.25rem;
    transition: border-color 0.2s ease;
}

.message-input-group:focus-within {
    border-color: var(--user-brand-accent);
}

.message-input-group .attachment-btn {
    border: none;
    background: none;
    padding: 0.5rem 0.75rem;
    color: var(--user-text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.message-input-group .attachment-btn:hover {
    color: var(--user-brand-accent);
}

.message-input-group textarea {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    padding: 0.5rem;
    max-height: 100px;
    font-size: 0.95rem;
}

.message-input-group textarea:focus {
    outline: none;
    box-shadow: none;
}

.message-input-group .send-btn {
    border: none;
    background: var(--user-brand-accent);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.message-input-group .send-btn:hover {
    background: #e08d0a;
    transform: scale(1.05);
}

/* Messages Empty State */
.messages-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 3rem;
    text-align: center;
}

.messages-empty-icon {
    font-size: 4rem;
    color: var(--user-border-color);
    margin-bottom: 1.5rem;
}

.messages-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--user-text-primary);
    margin-bottom: 0.5rem;
}

.messages-empty-text {
    color: var(--user-text-muted);
    margin-bottom: 1.5rem;
}

/* Messages Mobile Styles */
@media (max-width: 991.98px) {
    .messages-card {
        min-height: auto;
    }
    
    .messages-card .row.g-0 {
        flex-direction: column;
    }
    
    .messages-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--user-border-color);
    }
    
    .conversations-list {
        max-height: 300px !important;
    }
    
    .messages-container {
        height: 350px !important;
    }
    
    .conversation-avatar img {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 576px) {
    .conversations-list {
        max-height: 250px !important;
    }
    
    .messages-container {
        height: 300px !important;
    }
    
    .conversation-item {
        padding: 0.75rem;
    }
    
    .conversation-avatar img {
        width: 38px;
        height: 38px;
    }
    
    .message-bubble {
        max-width: 85%;
    }
}

/* ==========================================================================
   Messages Mobile App-Like View
   ========================================================================== */
@media (max-width: 991.98px) {
    /* Hide desktop on mobile for messages */
    body.page-messages .hero-section.d-none.d-lg-block,
    body.page-messages .user-page-container.d-none.d-lg-block,
    body.page-messages main.d-none.d-lg-block {
        display: none !important;
    }
    
    /* Show mobile messages page */
    body.page-messages .messages-mobile-page,
    .messages-mobile-page {
        display: block !important;
        background: #ffffff !important;
        min-height: calc(100vh - 120px);
    }
    
    .messages-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
        background: var(--user-brand-white);
        border-bottom: 1px solid var(--user-border-color);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .messages-mobile-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--user-text-primary);
        margin: 0;
    }
    
    .messages-mobile-stats {
        display: flex;
        gap: 1rem;
    }
    
    .messages-mobile-stat {
        text-align: center;
    }
    
    .messages-mobile-stat-number {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--user-text-primary);
    }
    
    .messages-mobile-stat-number.unread {
        color: var(--user-brand-accent);
    }
    
    .messages-mobile-stat-label {
        font-size: 0.7rem;
        color: var(--user-text-muted);
        text-transform: uppercase;
    }
    
    /* Mobile conversation list */
    .messages-mobile-list {
        padding: 0;
    }
    
    .messages-mobile-item {
        display: flex;
        align-items: center;
        padding: 0.875rem 1rem;
        background: var(--user-brand-white);
        border-bottom: 1px solid var(--user-border-color);
        text-decoration: none;
        color: var(--user-text-primary);
        transition: background 0.15s ease;
    }
    
    .messages-mobile-item:active {
        background: var(--user-brand-light);
    }
    
    .messages-mobile-item.unread {
        background: rgba(245, 158, 11, 0.05);
    }
    
    .messages-mobile-avatar {
        position: relative;
        width: 52px;
        height: 52px;
        flex-shrink: 0;
        margin-right: 0.875rem;
    }
    
    .messages-mobile-avatar img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }
    
    .messages-mobile-badge {
        position: absolute;
        top: -2px;
        right: -2px;
        background: var(--user-danger);
        color: white;
        font-size: 0.65rem;
        font-weight: 700;
        min-width: 18px;
        height: 18px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
    }
    
    .messages-mobile-content {
        flex: 1;
        min-width: 0;
    }
    
    .messages-mobile-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.25rem;
    }
    
    .messages-mobile-name {
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--user-text-primary);
        margin: 0;
    }
    
    .messages-mobile-item.unread .messages-mobile-name {
        font-weight: 700;
    }
    
    .messages-mobile-time {
        font-size: 0.75rem;
        color: var(--user-text-muted);
    }
    
    .messages-mobile-listing {
        font-size: 0.75rem;
        color: var(--user-brand-accent);
        margin-bottom: 0.125rem;
    }
    
    .messages-mobile-preview {
        font-size: 0.85rem;
        color: var(--user-text-secondary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
    }
    
    .messages-mobile-item.unread .messages-mobile-preview {
        color: var(--user-text-primary);
        font-weight: 500;
    }
    
    .messages-mobile-arrow {
        color: var(--user-text-muted);
        margin-left: 0.5rem;
    }
    
    /* Mobile chat view */
    .messages-mobile-chat {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 120px); /* Account for header + bottom nav */
        min-height: 400px;
        background: var(--user-brand-white);
        overflow: hidden;
    }
    
    .messages-mobile-chat-header {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        background: var(--user-brand-white);
        border-bottom: 1px solid var(--user-border-color);
        gap: 0.75rem;
    }
    
    .messages-mobile-back {
        color: var(--user-text-primary);
        font-size: 1.25rem;
        text-decoration: none;
    }
    
    .messages-mobile-chat-avatar img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
    }
    
    .messages-mobile-chat-info {
        flex: 1;
        min-width: 0;
    }
    
    .messages-mobile-chat-name {
        font-weight: 600;
        font-size: 0.95rem;
        margin: 0;
    }
    
    .messages-mobile-chat-ad {
        font-size: 0.75rem;
        color: var(--user-brand-accent);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .messages-mobile-chat-actions {
        display: flex;
        gap: 0.5rem;
    }
    
    .messages-mobile-chat-btn {
        background: none;
        border: none;
        color: var(--user-text-muted);
        font-size: 1.1rem;
        padding: 0.25rem;
    }
    
    .messages-mobile-messages {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1rem;
        background: #fafbfc;
    }
    
    /* Fix message bubbles on mobile */
    .messages-mobile-messages .message-wrapper {
        width: 100%;
        padding: 0 0.25rem;
        box-sizing: border-box;
    }
    
    .messages-mobile-messages .message-bubble {
        max-width: 80%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    body.page-messages .messages-mobile-input,
    .messages-mobile-input {
        padding: 8px 12px !important;
        background: #f4f7f9 !important;
        border-top: 1px solid #e2e8f0 !important;
    }
    
    /* Single-line compact input - override everything including mobile-enhancements.css */
    body.page-messages .messages-mobile-input form,
    .messages-mobile-input form {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    body.page-messages .messages-mobile-input .message-input-group,
    .messages-mobile-input .message-input-group {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 24px !important;
        padding: 4px 4px 4px 16px !important;
        height: 48px !important;
        max-height: 48px !important;
        min-height: 48px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    body.page-messages .messages-mobile-input .message-input-group textarea,
    .messages-mobile-input .message-input-group textarea {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 50px !important;
        max-width: none !important;
        border: none !important;
        background: transparent !important;
        padding: 0 8px !important;
        margin: 0 !important;
        font-size: 16px !important;
        resize: none !important;
        height: 40px !important;
        max-height: 40px !important;
        min-height: 40px !important;
        line-height: 40px !important;
        overflow: hidden !important;
        box-shadow: none !important;
        outline: none !important;
    }
    
    body.page-messages .messages-mobile-input .attachment-btn,
    body.page-messages .messages-mobile-input label.attachment-btn,
    .messages-mobile-input .attachment-btn,
    .messages-mobile-input label.attachment-btn {
        display: none !important;
    }
    
    body.page-messages .messages-mobile-input .send-btn,
    body.page-messages .messages-mobile-input button[type="submit"],
    .messages-mobile-input .send-btn,
    .messages-mobile-input button[type="submit"] {
        flex: 0 0 40px !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        border-radius: 50% !important;
        background: #f59e0b !important;
        color: #ffffff !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 16px !important;
    }
    
    /* Fix message bubble colors for mobile - use amber not blue */
    body.page-messages .messages-mobile-messages .message-sent .message-bubble,
    .messages-mobile-messages .message-sent .message-bubble {
        background: #f59e0b !important;
        color: #ffffff !important;
    }
    
    body.page-messages .messages-mobile-messages .message-received .message-bubble,
    .messages-mobile-messages .message-received .message-bubble {
        background: #ffffff !important;
        color: #1d283a !important;
        border: 1px solid #e2e8f0 !important;
    }
    
    /* Mobile empty state */
    .messages-mobile-empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 3rem 1.5rem;
        text-align: center;
    }
    
    .messages-mobile-empty-icon {
        font-size: 3rem;
        color: var(--user-border-color);
        margin-bottom: 1rem;
    }
    
    .messages-mobile-empty-title {
        font-weight: 600;
        color: var(--user-text-primary);
        margin-bottom: 0.5rem;
    }
    
    .messages-mobile-empty-text {
        font-size: 0.9rem;
        color: var(--user-text-muted);
        margin-bottom: 1.5rem;
    }
}

/* ==========================================================================
   Footer Fixes (ensure visibility on dark background)
   ========================================================================== */
.footer-bottom .copyright a,
.footer-bottom a.text-decoration-none {
    color: #f59e0b;
}

.footer-bottom .copyright a:hover,
.footer-bottom a.text-decoration-none:hover {
    color: #fbbf24;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-user-primary { color: var(--user-text-primary) !important; }
.text-user-secondary { color: var(--user-text-secondary) !important; }
.text-user-muted { color: var(--user-text-muted) !important; }
.text-user-accent { color: var(--user-brand-accent) !important; }
.text-user-success { color: var(--user-success) !important; }
.text-user-warning { color: var(--user-warning) !important; }
.text-user-danger { color: var(--user-danger) !important; }

.bg-user-light { background-color: var(--user-brand-light) !important; }
.bg-user-white { background-color: var(--user-brand-white) !important; }
.bg-user-dark { background-color: var(--user-brand-dark) !important; }

.border-user { border-color: var(--user-border-color) !important; }






