
/* ========================================
IMPROVED MOBILE-FIRST CSS FOR PROFILE
======================================== */

/* CSS Variables for Consistent Design */
:root {
    /* Spacing Scale */
    --spacing-xs: 0.5rem;    /* 8px */
    --spacing-sm: 1rem;      /* 16px */
    --spacing-md: 1.5rem;    /* 24px */
    --spacing-lg: 2rem;      /* 32px */
    --spacing-xl: 3rem;      /* 48px */
    
    /* Colors */
    --primary: #3b82f6;
    --primary-dark: #1e40af;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #212529;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Typography */
    --font-size-xs: 0.75rem;   /* 12px */
    --font-size-sm: 0.875rem;  /* 14px */
    --font-size-base: 1rem;    /* 16px */
    --font-size-lg: 1.125rem;  /* 18px */
    --font-size-xl: 1.25rem;   /* 20px */
    --font-size-2xl: 1.5rem;   /* 24px */
    --font-size-3xl: 2rem;     /* 32px */
}

/* ========================================
BASE STYLES & MOBILE-FIRST TYPOGRAPHY
======================================== */

/* Prevent zoom on input focus (iOS) */
body {
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Responsive Typography */
.display-4 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    line-height: 1.2;
}

.display-6 {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.lead {
    font-size: var(--font-size-base);
    font-weight: 400;
}

/* Scale up on larger screens */
@media (min-width: 768px) {
    .display-4 {
        font-size: var(--font-size-3xl);
    }
    
    .display-6 {
        font-size: var(--font-size-2xl);
    }
    
    .lead {
        font-size: var(--font-size-lg);
    }
}

/* ========================================
PROFILE HEADER
======================================== */

.profile-header {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Profile Image - Responsive Sizing */
.account-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.account-img:hover {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .account-img {
        width: 160px;
        height: 160px;
    }
}

@media (min-width: 992px) {
    .account-img {
        width: 200px;
        height: 200px;
    }
}

/* Verification Badges - Mobile Optimized */
.badge {
    font-size: var(--font-size-xs);
    padding: 0.5em 0.9em;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 32px;
}

@media (min-width: 576px) {
    .badge {
        font-size: var(--font-size-sm);
        min-height: 36px;
    }
}

/* ========================================
ACTION BUTTONS - TOUCH-FRIENDLY
======================================== */

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.action-buttons .btn {
    flex: 1 1 auto;
    min-width: 150px;
    min-height: 48px; /* Minimum touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-base);
}

/* Stack buttons vertically on small screens */
@media (max-width: 576px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

.btn-primary,
.btn-outline-primary {
    transition: all var(--transition-base);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* Small buttons - still meet touch target size */
.btn-sm {
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

/* ========================================
SERVICE PROVIDER STATS
======================================== */

.service-provider-stats {
    margin-bottom: var(--spacing-md);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--spacing-sm);
    background: var(--light);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    transition: background-color var(--transition-base);
}

.stat-item:hover {
    background: #e9ecef;
}

.stat-item i {
    font-size: var(--font-size-xl);
}

/* Stack stats vertically on mobile */
@media (max-width: 768px) {
    .service-provider-stats .row {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .service-provider-stats .col-md-4 {
        width: 100%;
    }
}

/* ========================================
CARDS - RESPONSIVE & MODERN
======================================== */

.card {
    margin-bottom: var(--spacing-md);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: box-shadow var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: none;
}

.card-body {
    padding: var(--spacing-md);
}

@media (min-width: 768px) {
    .card-body {
        padding: var(--spacing-lg);
    }
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

/* ========================================
VEHICLE CARDS - ENHANCED
======================================== */

.vehicle-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    height: 100%;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.vehicle-card .card-body {
    padding: var(--spacing-md);
}

@media (min-width: 768px) {
    .vehicle-card .card-body {
        padding: var(--spacing-lg);
    }
}

/* Vehicle Documents Toggle */
.document-toggle {
    cursor: pointer;
    color: var(--primary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    min-height: 44px;
}

.document-toggle:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    background: rgba(59, 130, 246, 0.1);
}

.vehicle-documents {
    transition: max-height var(--transition-base) ease-in-out;
}

/* ========================================
ALERTS - IMPROVED VISIBILITY
======================================== */

.alert {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 576px) {
    .alert {
        padding: var(--spacing-md);
        font-size: var(--font-size-base);
    }
}

.alert i {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

/* Alert variants */
.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

/* ========================================
MODALS - MOBILE-FIRST OPTIMIZATION
======================================== */

/* Fix z-index issues */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

/* Prevent multiple backdrops */
.modal-backdrop ~ .modal-backdrop {
    display: none !important;
}

/* Mobile-first modal design */
.modal-dialog {
    margin: var(--spacing-sm);
}

@media (min-width: 576px) {
    .modal-dialog {
        margin: 1.75rem auto;
        max-width: 500px;
    }
}

/* Full-screen modals on mobile for better UX */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
        display: flex;
        align-items: stretch;
    }
    
    .modal-content {
        height: 100vh;
        border-radius: 0;
        border: none;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        border-radius: 0;
        flex-shrink: 0;
    }
    
    .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        flex-shrink: 0;
        border-radius: 0;
    }
}

.modal-header {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid #dee2e6;
    gap: var(--spacing-sm);
}

/* Stack modal buttons on mobile */
@media (max-width: 576px) {
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        min-height: 48px;
    }
}

/* ========================================
FACE PHOTO INTERFACE - SIMPLIFIED
======================================== */

/* Upload mode toggle */
.btn-group {
    width: 100%;
    display: flex;
    gap: 0.5rem;
}

.btn-group .btn {
    flex: 1;
    min-height: 48px;
    border-radius: var(--radius-md) !important;
    transition: all var(--transition-base);
}

/* Camera/video preview container */
.media-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
}

#camera-stream,
#captured-preview {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    border: 2px solid #dee2e6;
}

#captured-preview {
    border-color: var(--success);
}

/* Face overlay - simplified for mobile */
.face-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    max-width: 200px;
    aspect-ratio: 3/4;
    border: 3px solid var(--primary);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: rgba(59, 130, 246, 0.1);
    pointer-events: none;
    z-index: 10;
    transition: all var(--transition-base);
}

@media (max-width: 576px) {
    .face-overlay {
        width: 70%;
    }
}

/* Face guide text */
.face-guide-text {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    font-size: var(--font-size-xs);
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 576px) {
    .face-guide-text {
        font-size: var(--font-size-sm);
    }
}

/* Darkening overlay for webcam mode */
#darkening-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 5;
    border-radius: var(--radius-lg);
}

/* File preview container */
.file-preview-container {
    margin-top: var(--spacing-md);
    text-align: center;
}

.file-preview-container img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* ========================================
DOCUMENT STATUS INDICATORS
======================================== */

.document-status {
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition-base);
}

.document-status:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.document-status i {
    color: var(--primary);
}

.document-status h6 {
    margin: var(--spacing-sm) 0;
    font-size: var(--font-size-base);
    font-weight: 600;
}

/* ========================================
REFERRAL SECTION
======================================== */

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group .form-control {
    flex: 1;
    min-height: 44px;
    border-radius: var(--radius-md);
}

.input-group .btn {
    min-height: 44px;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

/* Stack referral buttons on mobile */
@media (max-width: 576px) {
    .input-group {
        flex-direction: column;
    }
    
    .input-group .btn {
        width: 100%;
    }
}

/* Referral stats */
.stat-item {
    text-align: center;
}

.stat-item h4 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.stat-item small {
    font-size: var(--font-size-sm);
    color: #6c757d;
}

/* ========================================
LOADING STATES & ANIMATIONS
======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.vehicle-card {
    animation: fadeIn 0.3s ease-out;
}

/* Skeleton loading state */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========================================
FORM ELEMENTS - ACCESSIBLE & TOUCH-FRIENDLY
======================================== */

.form-control,
.form-select {
    min-height: 48px;
    font-size: var(--font-size-base);
    border-radius: var(--radius-md);
    border: 2px solid #dee2e6;
    transition: border-color var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-sm);
    color: var(--dark);
}

/* File input styling */
input[type="file"] {
    padding: var(--spacing-sm);
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: background var(--transition-base);
    margin-right: var(--spacing-sm);
    min-height: 44px;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-dark);
}

/* ========================================
ERROR MESSAGES
======================================== */

.error-message {
    display: none;
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: var(--radius-md);
    color: #721c24;
    font-size: var(--font-size-sm);
}

.error-message i {
    margin-right: var(--spacing-xs);
}

/* ========================================
TOOLTIPS - TOUCH-FRIENDLY
======================================== */

[data-bs-toggle="tooltip"] {
    cursor: help;
    text-decoration: underline dotted;
}

.tooltip {
    font-size: var(--font-size-sm);
}

.tooltip-inner {
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    max-width: 250px;
}

/* ========================================
ACCESSIBILITY IMPROVEMENTS
======================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to content link */
.visually-hidden-focusable:focus {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    padding: var(--spacing-md);
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 0 0 var(--radius-md) 0;
}

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

/* ========================================
PRINT STYLES
======================================== */

@media print {
    .modal,
    .btn,
    .action-buttons,
    .document-toggle {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .profile-header {
        page-break-after: avoid;
    }
}

/* ========================================
UTILITY CLASSES
======================================== */

/* Spacing utilities */
.mt-6 { margin-top: var(--spacing-xl); }
.mb-6 { margin-bottom: var(--spacing-xl); }
.p-6 { padding: var(--spacing-xl); }

/* Text utilities */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

/* Flexbox utilities */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========================================
PERFORMANCE OPTIMIZATIONS
======================================== */

/* GPU acceleration for animations */
.vehicle-card,
.portfolio-card,
.btn {
    will-change: transform;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Optimize repaints */
.modal-backdrop {
    will-change: opacity;
}
/* ======================================== Referral Section Styles ======================================= */
.referral-section-wrapper .referral-card-main {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: white;
}

.referral-section-wrapper .referral-header-gradient {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
}

.referral-section-wrapper .referral-header-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.referral-section-wrapper .referral-header-gradient h5 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
}

.referral-section-wrapper .referral-body-content {
    padding: 24px;
}

.referral-section-wrapper .referral-code-display-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #198754;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.referral-section-wrapper .referral-code-display-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(25, 135, 84, 0.1) 0%, transparent 70%);
}

.referral-section-wrapper .referral-code-text-large {
    font-size: 28px;
    font-weight: 700;
    color: #198754;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    position: relative;
    z-index: 1;
}

.referral-section-wrapper .referral-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.referral-section-wrapper .referral-action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.referral-section-wrapper .referral-btn-custom {
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.referral-section-wrapper .referral-btn-copy {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
}

.referral-section-wrapper .referral-btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.referral-section-wrapper .referral-btn-share {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    color: white;
}

.referral-section-wrapper .referral-btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
}

.referral-section-wrapper .referral-help-text {
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.referral-section-wrapper .referral-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.referral-section-wrapper .referral-stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.referral-section-wrapper .referral-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.referral-section-wrapper .referral-stat-number {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #0d6efd 0%, #198754 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.referral-section-wrapper .referral-stat-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.referral-section-wrapper .referral-referred-by-banner {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
    color: white;
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.3);
}

.referral-section-wrapper .referral-users-list-section {
    margin-top: 28px;
}

.referral-section-wrapper .referral-list-header {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.referral-section-wrapper .referral-user-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
}

.referral-section-wrapper .referral-user-item:hover {
    border-color: #198754;
    box-shadow: 0 4px 16px rgba(25, 135, 84, 0.15);
    transform: translateX(4px);
}

.referral-section-wrapper .referral-user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.referral-section-wrapper .referral-user-details {
    flex: 1;
}

.referral-section-wrapper .referral-user-name {
    font-weight: 600;
    color: #212529;
    margin-bottom: 3px;
    font-size: 15px;
}

.referral-section-wrapper .referral-user-date {
    font-size: 12px;
    color: #6c757d;
}

.referral-section-wrapper .referral-more-users-text {
    text-align: center;
    padding: 12px;
    color: #6c757d;
    font-size: 13px;
    font-style: italic;
}

.referral-section-wrapper .referral-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.referral-section-wrapper .referral-empty-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.referral-section-wrapper .referral-empty-title {
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 8px;
}

.referral-section-wrapper .referral-empty-subtitle {
    color: #adb5bd;
    font-size: 13px;
}

@media (max-width: 576px) {
    .referral-section-wrapper .referral-body-content {
        padding: 20px 16px;
    }
    
    .referral-section-wrapper .referral-code-text-large {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .referral-section-wrapper .referral-stat-number {
        font-size: 30px;
    }
    
    .referral-section-wrapper .referral-action-buttons-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
DARK MODE SUPPORT (Optional)
======================================== */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
    :root {
        --light: #212529;
        --dark: #f8f9fa;
    }
}

.account-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.verified-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--primary-color);
    border-radius: 15px;
    margin-top: 10px;
    font-size: 0.9rem;
}
.service-provider-stats .stat-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.875rem;
    color: var(--text-color);
}
.stat-item i {
    margin-right: 8px;
    color: var(--primary-color);
}
.action-buttons .btn {
    margin-right: 10px;
    font-size: 0.9rem;
}
.card {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.card-header {
    background-color: var(--primary-color);
    color: #fff;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.document-status {
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}
.document-status:hover {
    transform: scale(1.02);
}
.document-status i {
    color: var(--primary-color);
}
.vehicles-section .card {
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.experience-item, .education-item {
    position: relative;
}
.divider {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}
.portfolio-card {
    position: relative;
    transition: var(--transition-smooth);
    border: none;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(145deg, var(--background-color), #fff);
    box-shadow: var(--card-shadow);
}
.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
.portfolio-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    transition: var(--transition-smooth);
}
.portfolio-image:hover {
    transform: scale(1.05);
}
.card-body {
    padding: 1.5rem;
}
.card-title {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}
.card-text {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
}
.portfolio-meta {
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    opacity: 0.7;
}
.portfolio-meta i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}
.media-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}
.media-icon {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}
.media-icon i {
    margin-right: 0.5rem;
}
.media-icon.video {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
}
.media-icon.video:hover {
    background-color: var(--accent-color);
    color: #fff;
}
.media-icon.audio {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
}
.media-icon.audio:hover {
    background-color: var(--accent-color);
    color: #fff;
}
.media-icon.pdf {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
}
.media-icon.pdf:hover {
    background-color: var(--accent-color);
    color: #fff;
}
.media-icon.url {
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--primary-color);
}
.media-icon.url:hover {
    background-color: var(--primary-color);
    color: #fff;
}
.media-icon.text {
    background-color: rgba(12, 74, 110, 0.1);
    color: var(--secondary-color);
}
.media-icon.text:hover {
    background-color: var(--secondary-color);
    color: #fff;
}
.text-block-content {
    background: #fff;
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 1rem;
    box-shadow: var(--card-shadow);
}
.action-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-smooth);
    border-radius: 15px;
}
.portfolio-card:hover .action-overlay {
    opacity: 1;
}
.action-buttons {
    display: flex;
    gap: 0.75rem;
}
.action-buttons .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition-smooth);
}
.btn-view {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.btn-view:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}
.btn-edit {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-color);
}
.btn-edit:hover {
    background-color: #2a9de0;
    border-color: #2a9de0;
    color: #fff;
}
.btn-delete {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
.btn-delete:hover {
    background-color: #c82333;
    border-color: #c82333;
}
.experience-item:hover, .education-item:hover {
    transform: translateY(-5px);
    transition: transform 0.2s ease-in-out;
}
.experience-item .card-body, .education-item .card-body {
    padding: 1.25rem;
}
.experience-item .description, .education-item .description {
    font-size: 0.95rem;
}
@media (max-width: 768px) {
    .portfolio-image {
        height: 150px;
    }
    .card-title {
        font-size: 1.1rem;
    }
    .card-text {
        font-size: 0.9rem;
    }
    .action-buttons .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}