/**
 * Responsive Framework for Carpentry Asana Theme
 * Optimized for Desktop, Laptop, Tablet, and Mobile
 */

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */

:root {
    /* Breakpoints */
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;
    
    /* Container max-widths */
    --container-xs: 100%;
    --container-sm: 540px;
    --container-md: 720px;
    --container-lg: 960px;
    --container-xl: 1140px;
    --container-xxl: 1320px;
    
    /* Asana-Inspired Color Palette */
    --primary-blue: #0052CC;
    --primary-blue-light: #0065FF;
    --primary-blue-dark: #003D99;
    --primary-blue-50: #F0F4FF;
    --primary-blue-100: #E6F0FF;
    --primary-blue-500: #0052CC;
    --primary-blue-600: #003D99;
    --primary-blue-700: #002966;
    
    --success-green: #00875A;
    --success-green-light: #00A86B;
    --success-green-dark: #006644;
    --success-green-50: #F0F9F4;
    --success-green-100: #E6F4ED;
    --success-green-500: #00875A;
    --success-green-600: #006644;
    --success-green-700: #004D33;
    
    --warning-orange: #FF8B00;
    --warning-orange-light: #FFAB00;
    --warning-orange-dark: #E65100;
    --warning-orange-50: #FFF8F0;
    --warning-orange-100: #FFF0E6;
    --warning-orange-500: #FF8B00;
    --warning-orange-600: #E65100;
    --warning-orange-700: #CC4400;
    
    --error-red: #DE350B;
    --error-red-light: #FF5630;
    --error-red-dark: #BF2600;
    --error-red-50: #FFF4F0;
    --error-red-100: #FFE6E6;
    --error-red-500: #DE350B;
    --error-red-600: #BF2600;
    --error-red-700: #991F00;
    
    /* Asana Accent Colors */
    --accent-purple: #8777D9;
    --accent-purple-light: #9B8DF0;
    --accent-purple-dark: #6B5CE6;
    --accent-purple-50: #F8F7FF;
    --accent-purple-100: #F0EDFF;
    
    --accent-teal: #00B8D9;
    --accent-teal-light: #00C7E6;
    --accent-teal-dark: #00A3BF;
    --accent-teal-50: #F0FCFF;
    --accent-teal-100: #E6F9FF;
    
    --accent-pink: #E91E63;
    --accent-pink-light: #F06292;
    --accent-pink-dark: #C2185B;
    --accent-pink-50: #FCE4EC;
    --accent-pink-100: #F8BBD9;
    
    --accent-indigo: #5E6C84;
    --accent-indigo-light: #7A869A;
    --accent-indigo-dark: #42526E;
    --accent-indigo-50: #F4F5F7;
    --accent-indigo-100: #EBECF0;
    
    /* Asana Neutral Colors */
    --neutral-gray: #5E6C84;
    --neutral-gray-light: #7A869A;
    --neutral-gray-dark: #42526E;
    --neutral-gray-50: #F4F5F7;
    --neutral-gray-100: #EBECF0;
    --neutral-gray-200: #DFE1E6;
    --neutral-gray-300: #C1C7D0;
    --neutral-gray-400: #97A0AF;
    --neutral-gray-500: #5E6C84;
    --neutral-gray-600: #42526E;
    --neutral-gray-700: #253858;
    --neutral-gray-800: #172B4D;
    --neutral-gray-900: #091E42;
    
    /* Asana Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F4F5F7;
    --bg-tertiary: #EBECF0;
    --bg-accent: #F0F4FF;
    
    /* Asana Text Colors */
    --text-primary: #172B4D;
    --text-secondary: #5E6C84;
    --text-tertiary: #97A0AF;
    --text-inverse: #FFFFFF;
    
    /* Asana Subtle Gradients */
    --gradient-primary: linear-gradient(135deg, #0052CC 0%, #0065FF 100%);
    --gradient-success: linear-gradient(135deg, #00875A 0%, #00A86B 100%);
    --gradient-warning: linear-gradient(135deg, #FF8B00 0%, #FFAB00 100%);
    --gradient-error: linear-gradient(135deg, #DE350B 0%, #FF5630 100%);
    --gradient-hero: linear-gradient(135deg, #F4F5F7 0%, #EBECF0 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #F4F5F7 100%);
    --gradient-nav: linear-gradient(90deg, #F4F5F7 0%, #EBECF0 100%);
    
    /* Spacing scale */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-xxl: 3rem;     /* 48px */
    --spacing-xxxl: 4rem;    /* 64px */
    
    /* Typography scale */
    --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: 1.875rem;   /* 30px */
    --font-size-4xl: 2.25rem;    /* 36px */
    --font-size-5xl: 3rem;       /* 48px */
    
    /* Line heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Grid system */
    --grid-columns: 12;
    --grid-gap: 1rem;
    
    /* Border radius */
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 0.75rem;
    --border-radius-2xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Base Responsive Styles
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: #172B4D;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* ==========================================================================
   Container System
   ========================================================================== */

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.container-fluid {
    width: 100%;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: var(--container-sm);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: var(--container-md);
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
    }
    
    .container-fluid {
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: var(--container-lg);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: var(--container-xl);
    }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: var(--container-xxl);
    }
}

/* ==========================================================================
   Grid System
   ========================================================================== */

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: calc(var(--grid-gap) / -2);
    margin-right: calc(var(--grid-gap) / -2);
}

.col {
    flex: 1 0 0%;
    padding-left: calc(var(--grid-gap) / 2);
    padding-right: calc(var(--grid-gap) / 2);
}

/* Grid columns */
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Responsive grid columns */
@media (min-width: 576px) {
    .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
    .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
    .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 768px) {
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 992px) {
    .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
    .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 1200px) {
    .col-xl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xl-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xl-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-xl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-xl-9 { flex: 0 0 75%; max-width: 75%; }
    .col-xl-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-xl-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
}

/* ==========================================================================
   Responsive Typography
   ========================================================================== */

h1, .h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-lg);
}

h2, .h2 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
}

h3, .h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    line-height: var(--line-height-normal);
    margin-bottom: var(--spacing-md);
}

h4, .h4 {
    font-size: var(--font-size-xl);
    font-weight: 500;
    line-height: var(--line-height-normal);
    margin-bottom: var(--spacing-sm);
}

h5, .h5 {
    font-size: var(--font-size-lg);
    font-weight: 500;
    line-height: var(--line-height-normal);
    margin-bottom: var(--spacing-sm);
}

h6, .h6 {
    font-size: var(--font-size-base);
    font-weight: 500;
    line-height: var(--line-height-normal);
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-normal);
}

/* Responsive typography scaling */
@media (max-width: 767px) {
    h1, .h1 { font-size: var(--font-size-3xl); }
    h2, .h2 { font-size: var(--font-size-2xl); }
    h3, .h3 { font-size: var(--font-size-xl); }
    h4, .h4 { font-size: var(--font-size-lg); }
    h5, .h5 { font-size: var(--font-size-base); }
    h6, .h6 { font-size: var(--font-size-sm); }
}

@media (min-width: 1200px) {
    h1, .h1 { font-size: var(--font-size-5xl); }
    h2, .h2 { font-size: var(--font-size-4xl); }
    h3, .h3 { font-size: var(--font-size-3xl); }
}

/* ==========================================================================
   Responsive Cards
   ========================================================================== */

.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--neutral-gray-200);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: var(--neutral-gray-300);
}

.card-header {
    padding: var(--spacing-lg);
    background: #ededed;
    border-radius: 7px;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    font-size: var(--font-size-lg);
}

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

.card-footer {
    padding: var(--spacing-lg);
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Responsive card padding */
@media (max-width: 767px) {
    .card-header,
    .card-body,
    .card-footer {
        padding: var(--spacing-md);
    }
}

/* Hide WordPress admin bar for staff users on mobile */
@media (max-width: 767px) {
    body.admin-bar {
        padding-top: 0 !important;
    }
    
    #wpadminbar {
        display: none !important;
    }
}

/* Make sidebars full width */
.work-request-sidebar, .quotation-sidebar, .invoice-sidebar {
    width: 100% !important;
}

/* Remove border-left from headers and work progress section */
.work-request-header, .quotation-header, .invoice-header, .work-progress-section {
    border-left: none !important;
}

/* Enhanced status badge visibility in work-request-header */
.work-request-header .status-badge.status-work-in-progress {
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    background: #FF6B35 !important;
    color: white !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3) !important;
    border: 2px solid #FF6B35 !important;
    animation: pulse 2s infinite !important;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.6);
    }
    100% {
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    }
}

/* Comprehensive Status Badge Colors with Enhanced Styling */
.status-badge.status-new { 
    background: #6B7280; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
    border: 2px solid #6B7280 !important;
}

.status-badge.status-quotation-needed { 
    background: #F59E0B; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
    border: 2px solid #F59E0B !important;
}

.status-badge.status-quotation-created { 
    background: #3B82F6; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    border: 2px solid #3B82F6 !important;
}

.status-badge.status-quotation-sent { 
    background: #06B6D4; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3) !important;
    border: 2px solid #06B6D4 !important;
}

.status-badge.status-quotation-approved { 
    background: #8B5CF6; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    border: 2px solid #8B5CF6 !important;
}

.status-badge.status-work-completed { 
    background: #10B981; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    border: 2px solid #10B981 !important;
}

.status-badge.status-in-progress { 
    background: #F59E0B; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
    border: 2px solid #F59E0B !important;
}

.status-badge.status-work-in-progress { 
    background: #3B82F6; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    border: 2px solid #3B82F6 !important;
}

.status-badge.status-completed { 
    background: #10B981; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    border: 2px solid #10B981 !important;
}

.status-badge.status-draft { 
    background: #6B7280; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
    border: 2px solid #6B7280 !important;
}

.status-badge.status-under-review { 
    background: #F59E0B; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
    border: 2px solid #F59E0B !important;
}

.status-badge.status-in-review { 
    background: #06B6D4; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3) !important;
    border: 2px solid #06B6D4 !important;
}

.status-badge.status-approved { 
    background: #10B981; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    border: 2px solid #10B981 !important;
}

.status-badge.status-sent { 
    background: #3B82F6; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    border: 2px solid #3B82F6 !important;
}

.status-badge.status-rejected { 
    background: #EF4444; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
    border: 2px solid #EF4444 !important;
}

.status-badge.status-unpaid { 
    background: #EF4444; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
    border: 2px solid #EF4444 !important;
}

.status-badge.status-paid { 
    background: #10B981; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    border: 2px solid #10B981 !important;
}

.status-badge.status-overdue { 
    background: #DC2626; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
    border: 2px solid #DC2626 !important;
}

.status-badge.status-cancelled { 
    background: #6B7280; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
    border: 2px solid #6B7280 !important;
}

.status-badge.status-payment-received { 
    background: #10B981; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    border: 2px solid #10B981 !important;
}

.status-badge.status-site-visit-completed { 
    background: #8B5CF6; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    border: 2px solid #8B5CF6 !important;
}

.status-badge.status-initial-payment-pending { 
    background: #F59E0B; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
    border: 2px solid #F59E0B !important;
}

.status-badge.status-final-payment-pending { 
    background: #F59E0B; 
    color: white; 
    padding: 4px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
    border: 2px solid #F59E0B !important;
}

/* ==========================================================================
   Responsive Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-base);
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px; /* Touch-friendly minimum */
    white-space: nowrap;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 132, 255, 0.25);
}

.btn-primary {
    background: var(--primary-blue);
    color: white !important;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 82, 204, 0.2);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    box-shadow: 0 2px 6px rgba(0, 82, 204, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    background: var(--primary-blue-700);
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 82, 204, 0.2);
}

.btn-secondary {
    background: var(--neutral-gray-100);
    color: var(--text-primary);
    border: 1px solid var(--neutral-gray-300);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--neutral-gray-200);
    border-color: var(--neutral-gray-400);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-green);
    color: var(--text-inverse);
    border: none;
    box-shadow: 0 1px 3px rgba(0, 135, 90, 0.2);
    transition: all 0.2s ease;
}

.btn-success:hover {
    background: var(--success-green-dark);
    box-shadow: 0 2px 6px rgba(0, 135, 90, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error-red);
    color: var(--text-inverse);
    border: none;
    box-shadow: 0 1px 3px rgba(222, 53, 11, 0.2);
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: var(--error-red-dark);
    box-shadow: 0 2px 6px rgba(222, 53, 11, 0.3);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning-orange);
    color: var(--text-inverse);
    border: none;
    box-shadow: 0 1px 3px rgba(255, 139, 0, 0.2);
    transition: all 0.2s ease;
}

.btn-warning:hover {
    background: var(--warning-orange-dark);
    box-shadow: 0 2px 6px rgba(255, 139, 0, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--primary-blue-50);
    border-color: var(--primary-blue-dark);
    color: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 82, 204, 0.15);
}

/* Button sizes */
.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
    min-height: 36px;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
    min-height: 52px;
}

/* Full width buttons on mobile */
@media (max-width: 767px) {
    .btn-mobile-full {
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }
}

/* ==========================================================================
   Responsive Forms
   ========================================================================== */

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: #172B4D;
    font-size: var(--font-size-sm);
}

.form-control {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--neutral-gray-300);
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    min-height: 44px; /* Touch-friendly */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.1);
}

.form-control:hover {
    border-color: var(--neutral-gray-400);
}

.form-control::placeholder {
    color: #6B778C;
    opacity: 1;
}

/* Form validation states */
.form-control.is-invalid {
    border-color: #FF5630;
}

.form-control.is-valid {
    border-color: #36B37E;
}

/* Select styling */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* ==========================================================================
   Responsive Tables
   ========================================================================== */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: var(--spacing-lg);
    background: #fff;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: var(--spacing-md);
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #172B4D;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Mobile table styling */
@media (max-width: 767px) {
    .table th,
    .table td {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
    
    /* Stack table on very small screens */
    .table-mobile-stack {
        display: block;
    }
    
    .table-mobile-stack thead {
        display: none;
    }
    
    .table-mobile-stack tbody,
    .table-mobile-stack tr,
    .table-mobile-stack td {
        display: block;
        width: 100%;
    }
    
    .table-mobile-stack tr {
        border: 1px solid #e9ecef;
        border-radius: var(--border-radius-md);
        margin-bottom: var(--spacing-md);
        padding: var(--spacing-md);
        background: #fff;
    }
    
    .table-mobile-stack td {
        border: none;
        padding: var(--spacing-xs) 0;
        text-align: left !important;
    }
    
    .table-mobile-stack td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #6B778C;
        display: inline-block;
        width: 40%;
    }
}

/* ==========================================================================
   Responsive Navigation
   ========================================================================== */

.navbar {
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--neutral-gray-200);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-content {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-around;
}

.navbar-brand {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: #172B4D;
    text-decoration: none;
}

.brand-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .brand-logo {
        height: 35px;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .brand-logo {
        height: 30px;
        max-width: 120px;
    }
}

.brand-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-xl);
    transition: color 0.2s ease;
}

.brand-link:hover {
    color: var(--primary-blue);
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: var(--spacing-lg);
}

.navbar-nav .nav-item {
    margin: 0;
}

.navbar-nav .nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-blue);
    background: var(--primary-blue-50);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle:focus {
    outline: 2px solid #2684FF;
    outline-offset: 2px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile navigation */
.mobile-nav {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(233, 236, 239, 0.3);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 80px;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-content {
    padding: var(--spacing-md) 0;
    background: white;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 16px 24px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    margin: 4px 16px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-nav-link:hover {
    color: #2684FF;
    background: rgba(38, 132, 255, 0.1);
    text-decoration: none;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(38, 132, 255, 0.2);
}

.mobile-nav-link:active {
    transform: translateX(4px) scale(0.98);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Mobile navigation adjustments */
@media (max-width: 991px) {
    .navbar-nav {
        display: none;
    }
    
    .mobile-nav {
        display: none;
    }
    
    .mobile-nav.active {
        display: block;
        z-index: -9999;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    }
    
    .navbar-content {
        padding: 0 16px;
    }
    
    .brand-link {
        font-size: var(--font-size-lg);
    }
    
    .brand-logo {
        height: 32px;
        border-radius: 6px;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .navbar {
        padding: 25px 0;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
    }
    
    .navbar-content {
        padding: 0 30px;
        justify-content: space-between;
    }
    
    .brand-link {
        font-size: var(--font-size-base);
    }
    
    .brand-logo {
        height: 40px;
        border-radius: 4px;
    }
    
    .mobile-menu-toggle {
        padding: 10px;
        border-radius: 10px;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
    }
    
    .mobile-nav-link {
        padding: 14px 20px;
        font-size: 18px;
        font-weight: bold;
        margin: 25px 12px;
        border-radius: 10px;
        background: burlywood;
    }
    
    .mobile-nav-link .nav-icon {
        display: none;
    }
}

/* ==========================================================================
   Responsive Modals
   ========================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: var(--spacing-md);
}

.modal-dialog {
    background: #fff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: 0;
}

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

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    cursor: pointer;
    color: #6B778C;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile modal adjustments */
@media (max-width: 767px) {
    .modal {
        padding: var(--spacing-sm);
    }
    
    .modal-dialog {
        max-width: 100%;
        margin: 0;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--spacing-md);
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Responsive Images
   ========================================================================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-thumbnail {
    padding: var(--spacing-xs);
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius-md);
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive image containers */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Aspect ratio containers */
.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

.aspect-ratio-3-2 {
    aspect-ratio: 3 / 2;
}

/* Lazy loading images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* Image galleries */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.image-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    aspect-ratio: 1;
    cursor: pointer;
}

.image-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-gallery-item:hover img {
    transform: scale(1.1);
}

/* Mobile image adjustments */
@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .image-gallery-item {
        aspect-ratio: 1;
    }
}

@media (max-width: 480px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Image modal styles */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-lg);
}

.image-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius-md);
}

.image-modal-close {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: var(--font-size-2xl);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile image modal */
@media (max-width: 768px) {
    .image-modal {
        padding: var(--spacing-md);
    }
    
    .image-modal-close {
        top: var(--spacing-md);
        right: var(--spacing-md);
        width: 36px;
        height: 36px;
        font-size: var(--font-size-xl);
    }
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

/* Display utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
    .d-sm-inline { display: inline !important; }
    .d-sm-inline-block { display: inline-block !important; }
}

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    .d-md-inline { display: inline !important; }
    .d-md-inline-block { display: inline-block !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
    .d-lg-inline { display: inline !important; }
    .d-lg-inline-block { display: inline-block !important; }
}

@media (min-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; }
    .d-xl-inline { display: inline !important; }
    .d-xl-inline-block { display: inline-block !important; }
}

/* Text alignment */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

@media (min-width: 576px) {
    .text-sm-left { text-align: left !important; }
    .text-sm-center { text-align: center !important; }
    .text-sm-right { text-align: right !important; }
}

@media (min-width: 768px) {
    .text-md-left { text-align: left !important; }
    .text-md-center { text-align: center !important; }
    .text-md-right { text-align: right !important; }
}

@media (min-width: 992px) {
    .text-lg-left { text-align: left !important; }
    .text-lg-center { text-align: center !important; }
    .text-lg-right { text-align: right !important; }
}

/* Spacing utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--spacing-xs) !important; }
.m-2 { margin: var(--spacing-sm) !important; }
.m-3 { margin: var(--spacing-md) !important; }
.m-4 { margin: var(--spacing-lg) !important; }
.m-5 { margin: var(--spacing-xl) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--spacing-xs) !important; }
.p-2 { padding: var(--spacing-sm) !important; }
.p-3 { padding: var(--spacing-md) !important; }
.p-4 { padding: var(--spacing-lg) !important; }
.p-5 { padding: var(--spacing-xl) !important; }

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a, a:visited {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    .btn {
        border: 1px solid #000;
    }
    
    .table {
        border-collapse: collapse !important;
    }
    
    .table th,
    .table td {
        border: 1px solid #000 !important;
    }
    
    .modal {
        display: none !important;
    }
    
    .navbar {
        display: none !important;
    }
}

/* ==========================================================================
   Accessibility Improvements
   ========================================================================== */

/* Focus indicators */
*:focus {
    outline: 2px solid #2684FF;
    outline-offset: 2px;
}

/* Skip links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Screen reader only content */
.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;
}

/* ==========================================================================
   Enhanced Status Badges and Indicators
   ========================================================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

/* Status Colors */
.status-pending {
    background: var(--warning-orange-50);
    color: var(--warning-orange-dark);
    border-color: var(--warning-orange-100);
}

.status-in-progress {
    background: var(--primary-blue-50);
    color: var(--primary-blue-dark);
    border-color: var(--primary-blue-100);
}

.status-completed {
    background: var(--success-green-50);
    color: var(--success-green-dark);
    border-color: var(--success-green-100);
}

.status-cancelled {
    background: var(--error-red-50);
    color: var(--error-red-dark);
    border-color: var(--error-red-100);
}

.status-approved {
    background: var(--success-green-50);
    color: var(--success-green-dark);
    border-color: var(--success-green-100);
}

.status-rejected {
    background: var(--error-red-50);
    color: var(--error-red-dark);
    border-color: var(--error-red-100);
}

.status-paid {
    background: var(--success-green-50);
    color: var(--success-green-dark);
    border-color: var(--success-green-100);
}

.status-unpaid {
    background: var(--warning-orange-50);
    color: var(--warning-orange-dark);
    border-color: var(--warning-orange-100);
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--neutral-gray-200);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-blue);
    border-radius: var(--border-radius-sm);
    transition: width 0.3s ease;
}

.progress-success .progress-fill {
    background: var(--success-green);
}

.progress-warning .progress-fill {
    background: var(--warning-orange);
}

.progress-error .progress-fill {
    background: var(--error-red);
}

/* Stat Cards with Asana Style */
.stat-card-enhanced {
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--neutral-gray-200);
    transition: all 0.2s ease;
}

.stat-card-enhanced:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: var(--neutral-gray-300);
}

.stat-icon-enhanced {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-inverse);
    margin-bottom: var(--spacing-md);
}

.stat-icon-work-requests {
    background: var(--primary-blue);
}

.stat-icon-quotations {
    background: var(--warning-orange);
}

.stat-icon-invoices {
    background: var(--success-green);
}

.stat-icon-revenue {
    background: var(--error-red);
}

.stat-icon-customers {
    background: var(--accent-indigo);
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

[data-theme="dark"] {
    /* Asana Dark Mode Colors */
    --bg-primary: #1D2125;
    --bg-secondary: #22272B;
    --bg-tertiary: #2C333A;
    --bg-accent: #1E3A8A;
    
    --text-primary: #F4F5F7;
    --text-secondary: #9FADBC;
    --text-tertiary: #6B778C;
    --text-inverse: #1D2125;
    
    --neutral-gray-50: #1D2125;
    --neutral-gray-100: #22272B;
    --neutral-gray-200: #2C333A;
    --neutral-gray-300: #3C434A;
    --neutral-gray-400: #6B778C;
    --neutral-gray-500: #9FADBC;
    --neutral-gray-600: #B3BAC5;
    --neutral-gray-700: #C1C7D0;
    --neutral-gray-800: #DFE1E6;
    --neutral-gray-900: #F4F5F7;
    
    /* Dark mode gradients */
    --gradient-card: linear-gradient(145deg, #22272B 0%, #2C333A 100%);
    --gradient-hero: linear-gradient(135deg, #1D2125 0%, #22272B 100%);
}

[data-theme="dark"] body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .card {
    background: var(--gradient-card);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar {
    background: var(--bg-primary);
    border-bottom-color: var(--neutral-gray-200);
}

[data-theme="dark"] .form-control {
    background: var(--bg-secondary);
    border-color: var(--neutral-gray-300);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}


/* Application background */
body {
    background: burlywood;
}

/* Hero section logo */
.hero-logo {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img {
    height: 120px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive hero logo */
@media (max-width: 768px) {
    .hero-logo-img {
        height: 100px;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-logo-img {
        height: 80px;
        max-width: 250px;
    }
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

/* Hardware acceleration for animations */
.card,
.btn,
.modal-dialog {
    transform: translateZ(0);
    will-change: transform;
}

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

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
