/* Global Styles for ClearTrack PWA */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.logo img {
    max-width: 100%;
    height: auto;
    width: auto;
}

/* Prevent horizontal overflow */
*:not(table):not(.table-container) {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* But ensure tables can scroll horizontally */
.table-container {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

table {
    box-sizing: border-box;
}

/* Prevent text from overflowing */
p, h1, h2, h3, h4, h5, h6, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Loading Screen Overlay - Shared across app */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Splash screen background - mobile */
    background-image: url('/splash/Splash Screen cleartrack.png');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

/* Desktop splash screen */
@media (min-width: 768px) {
    .loading-overlay {
        background-image: url('/splash/Splash Screen Travel App Mobile Prototypes (1920 x 1080 px).png');
        background-position: center 25%;
    }
}

.loading-overlay.show {
    display: flex;
    opacity: 1;
}

.loading-spinner {
    width: 100px;
    height: 100px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #0b7285;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
    z-index: 1;
}

/* Wrapper to contain spinner and static logo */
.loading-spinner-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo inside spinner - static, doesn't rotate (separate element) */
.loading-spinner-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75px;
    height: 75px;
    z-index: 10 !important;
    pointer-events: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    visibility: visible !important;
    opacity: 1 !important;
    /* No animation - logo stays static */
}

.loading-spinner-logo img,
#loadingLogoImg {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10 !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Ensure no duplicate logos - but allow the correct one */
.loading-spinner-wrapper .loading-spinner-logo:not(:first-child) {
    display: none !important;
}

/* Ensure the loading logo is always visible - override any hiding rules */
.loading-spinner-logo,
.loading-spinner-logo img,
#loadingLogoImg,
.loading-spinner-logo img#loadingLogoImg {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10 !important;
}

.loading-spinner-logo img,
#loadingLogoImg {
    display: block !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    color: #0b7285;
    font-weight: 500;
    margin-top: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: transparent;
    padding: 0;
}

.loading-subtext {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    background: transparent;
    padding: 0;
}

/* Navigation */
.nav {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Button styles moved to dashboard-styles.css (single source of truth for dashboards) */

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Card styles moved to dashboard-styles.css (single source of truth for dashboards) */

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
}

.card-title:focus,
.card-title:focus-visible,
.card-title:active,
.card-title:hover,
.card-title:focus-within {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
}

.card-header h3.card-title,
.card-header .card-title,
h3.card-title {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.8rem;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.table-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.table-count {
    color: #6b7280;
    font-size: 0.875rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

td {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Form styles moved to dashboard-styles.css (single source of truth for dashboards) */

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.875rem;
}

.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 16px; /* Prevents zoom on iOS */
    resize: vertical;
    min-height: 100px;
}

/* Modal styles moved to dashboard-styles.css (single source of truth for dashboards) */

/* Utility Classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

/* Search and Filters */
.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.875rem;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-invoiced {
    background: #dbeafe;
    color: #1e40af;
}

/* Client Cards */
.client-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.client-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.client-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.client-info p {
    color: #6b7280;
    font-size: 0.875rem;
}

.client-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.client-stat {
    text-align: center;
}

.client-stat-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2563eb;
}

.client-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Invoice Modal Styles */
.preview-banner {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #92400e;
    font-weight: 500;
}

.invoice-content {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.invoice-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #2563eb;
    padding-bottom: 20px;
}

.invoice-header h1 {
    font-size: 32px;
    font-weight: bold;
    color: #2563eb;
    margin: 0;
}

.invoice-header p {
    font-size: 18px;
    color: #6b7280;
    margin: 8px 0 0 0;
}

.preview-mode {
    font-size: 14px;
    color: #f59e0b;
    margin: 4px 0 0 0;
    font-weight: 500;
}

.invoice-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.from-section, .invoice-info {
    flex: 1;
}

.from-section h3, .invoice-info h3 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 16px;
}

.from-section p, .invoice-info p {
    margin: 5px 0;
    color: #6b7280;
    font-size: 14px;
}

.invoice-info {
    text-align: right;
}

.client-section {
    margin-bottom: 30px;
}

.client-section h3 {
    margin: 0 0 10px 0;
    color: #374151;
    font-size: 16px;
}

.client-section p {
    margin: 5px 0;
    color: #6b7280;
    font-size: 14px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.invoice-table th {
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
    color: #374151;
    font-weight: bold;
    background-color: #f9fafb;
}

.invoice-table th:last-child {
    text-align: right;
}

.invoice-table td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
}

.invoice-table td:last-child {
    text-align: right;
}

.totals-section {
    margin-top: 30px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
}

.total-final {
    border-top: 2px solid #2563eb;
    margin-top: 10px;
    font-weight: bold;
    font-size: 18px;
    color: #2563eb;
}

.vat-reason {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
    color: #9ca3af;
}

.payment-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.payment-section h4 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 16px;
}

.payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.payment-grid h5 {
    margin: 0 0 8px 0;
    color: #374151;
    font-size: 14px;
}

.payment-grid p {
    margin: 2px 0;
    font-size: 13px;
    color: #6b7280;
}

.notes {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* Mobile Navigation - REMOVED: Using Style 6 only */

/* Responsive Design - Comprehensive Breakpoints */
/* Extra Small Devices (phones, up to 480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-content {
        padding: 0 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .header-top {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.875rem 1rem !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: relative !important;
    }
    
    /* Hamburger menu - REMOVED: Using Style 6 only */
    
    /* Logo - centered and smaller */
    .header-top .logo {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.125rem !important;
        width: auto !important;
        max-width: 140px !important;
        z-index: 1 !important;
        pointer-events: auto !important;
    }
    
    .header-top .logo img {
        max-width: 120px !important;
        height: 32px !important;
    }
    
    /* User menu - hide on mobile (no longer exists in header) */
    
    /* Mobile navigation divider */
    
    /* Mobile logout button */
    .mobile-logout-btn {
        width: calc(100% - 2rem) !important;
        margin: 0.5rem 1rem !important;
        min-height: 44px !important;
        font-size: 0.9375rem !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        border: 2px solid #e5e7eb !important;
        background: rgba(255, 255, 255, 0.9) !important;
        color: #374151 !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    }
    
    .mobile-logout-btn:hover {
        background: white !important;
        border-color: #dc2626 !important;
        color: #dc2626 !important;
        box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1) !important;
    }
    
    .user-menu button {
        font-size: 0.75rem;
        padding: 0.5rem 0.875rem;
        min-height: 44px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Show name on slightly larger mobile */
    @media (min-width: 360px) {
        .user-menu span {
            display: inline;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100px;
            font-weight: 600;
        }
        
        .user-menu button {
            font-size: 0.8125rem;
            padding: 0.625rem 1rem;
        }
    }
    
    .nav-links {
        display: none;
    }
    
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.875rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .client-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .client-stat-value {
        font-size: 1.125rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
        font-weight: 600;
        min-height: 48px;
        min-width: 120px;
        white-space: nowrap;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    .btn-sm {
        padding: 0.625rem 1.25rem;
        min-height: 44px;
        min-width: 100px;
        font-size: 0.875rem;
        font-weight: 600;
        border-radius: 10px;
    }
    
    .btn-lg {
        padding: 0.875rem 1.75rem;
        min-height: 52px;
        min-width: 140px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 12px;
    }
    
    /* Full-width buttons on mobile for better UX */
    .btn-full {
        width: 100%;
        min-width: 100%;
    }
    
    /* Button groups stack on mobile */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Quick Actions buttons - REBUILT: side-by-side on mobile - MUST BE LAST */
    /* Using maximum specificity and !important to override ALL button styles */
    body div.card > div.card-body.quick-actions-buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        width: 100% !important;
        align-items: stretch !important;
    }
    
    body div.card > div.card-body.quick-actions-buttons > button.btn,
    body div.card > div.card-body.quick-actions-buttons > button.btn-primary,
    body div.card > div.card-body.quick-actions-buttons > button.btn-secondary,
    body div.card > div.card-body.quick-actions-buttons > button.btn-success,
    body div.card > div.card-body.quick-actions-buttons > button.btn-outline {
        display: inline-flex !important;
        flex: 1 1 calc(50% - 0.25rem) !important;
        flex-basis: calc(50% - 0.25rem) !important;
        flex-grow: 1 !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
        width: calc(50% - 0.25rem) !important;
        max-width: calc(50% - 0.25rem) !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
        min-height: 38px !important;
        max-height: none !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        box-sizing: border-box !important;
    }
    
    .actions-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    .actions-grid .action-btn {
        flex: 1 1 calc(50% - 0.25rem) !important;
        min-width: 0 !important;
        max-width: calc(50% - 0.25rem) !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
        min-height: 38px !important;
        margin: 0 !important;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        border-radius: 0;
    }
    
    table {
        min-width: 600px;
    }
    
    th, td {
        padding: 0.625rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    .modal {
        max-width: 95vw;
        width: 95vw;
        margin: 0.5rem;
        padding: 0; /* Remove padding so header fills edge-to-edge */
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-actions {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.125rem;
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .search-input-wrapper {
        min-width: 100%;
    }
    
    .invoice-content {
        padding: 20px 15px;
    }
    
    .invoice-header h1 {
        font-size: 24px;
    }
    
    .invoice-details {
        flex-direction: column;
        gap: 20px;
    }
    
    .invoice-info {
        text-align: left;
    }
    
    .payment-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .invoice-table th,
    .invoice-table td {
        padding: 10px 8px;
        font-size: 0.8125rem;
    }
    
    .chat-container {
        height: calc(100vh - 120px);
        flex-direction: column;
    }
    
    .chat-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        max-height: 200px;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .summary-item {
        padding: 1rem 0.75rem;
    }
    
    .summary-number {
        font-size: 1.5rem;
    }
}

/* Small Devices (landscape phones, 481px to 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .nav-links {
        display: none;
    }
    
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .client-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .modal {
        max-width: 90vw;
        width: 90vw;
        padding: 0; /* Remove padding so header fills edge-to-edge */
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .invoice-details {
        flex-direction: column;
        gap: 20px;
    }
    
    .invoice-info {
        text-align: left;
    }
    
    .payment-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-container {
        height: calc(100vh - 140px);
    }
    
    .chat-sidebar {
        width: 35%;
        min-width: 200px;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .documents-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .btn {
        min-height: 44px;
    }
}

/* Tablets (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .nav-links {
        display: flex;
        gap: 1.5rem;
    }
    
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .client-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .modal {
        max-width: 85vw;
        width: 85vw;
    }
    
    .invoice-details {
        gap: 30px;
    }
    
    .payment-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .chat-container {
        height: 600px;
    }
    
    .chat-sidebar {
        width: 300px;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .documents-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
    
    button[class*="mobile-menu-toggle"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        min-width: 0 !important;
        min-height: 0 !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .client-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .modal {
        max-width: 90vw;
    }
    
    .payment-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .chat-sidebar {
        width: 300px;
    }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .modal {
        max-width: 900px;
    }
    
    .invoice-content {
        max-width: 900px;
    }
}

/* Landscape Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .modal {
        max-height: 95vh;
        padding: 0; /* Remove padding so header fills edge-to-edge */
    }
    
    .modal-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .chat-container {
        height: calc(100vh - 80px);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    
    .btn {
        padding: 0.75rem 1.5rem;
    }
    
    .table th,
    .table td {
        padding: 1rem 0.75rem;
    }
    
    /* Increase tap target sizes */
    .whatsapp-chat-item,
    .document-card,
    .client-card {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .nav,
    .btn,
    .modal-overlay,
    .whatsapp-messaging {
        display: none !important;
    }
    
    .card {
        page-break-inside: avoid;
    }
    
    .table {
        page-break-inside: auto;
    }
    
    .table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========================================
   EXTRACTED INLINE STYLES
   ======================================== */

/* Button Styles */
.btn-copy-code {
    margin: 1rem 0;
}

/* Success Message */
.copy-success-message {
    display: none;
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    color: #166534;
    text-align: center;
    font-weight: 500;
}

/* Text Styles */
.text-muted-small {
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.text-muted-center {
    color: #6b7280;
    text-align: center;
}

/* Chat Container Styles */
.chat-container {
    display: flex;
    height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.chat-sidebar {
    width: 300px;
    border-right: 1px solid #e5e7eb;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.chat-clients {
    flex: 1;
    overflow-y: auto;
}

.chat-clients-empty {
    color: #6b7280;
    text-align: center;
    padding: 1.5rem;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header-flex {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-flex h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.chat-header-flex p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f9fafb;
}

.chat-empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.chat-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.chat-empty-title {
    margin: 0 0 0.5rem 0;
    color: #374151;
}

.chat-empty-text {
    margin: 0;
}

/* Chat Input Styles */
.chat-input {
    padding: 0;
    border-top: 1px solid #e5e7eb;
    background: white;
    position: relative;
}

.attachment-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 200px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.attachment-menu-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.attachment-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
    text-align: left;
}

.attachment-button:hover {
    background-color: #f9fafb;
}

.attachment-icon {
    font-size: 1.25rem;
}

.attachment-text {
    font-size: 0.875rem;
    color: #374151;
}

/* Emoji Picker Styles */
.emoji-picker {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.emoji-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.emoji-picker-title {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.75rem;
}

.emoji-picker-close {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #9ca3af;
    padding: 0.25rem;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.25rem;
    max-height: 120px;
    overflow-y: auto;
}

/* Message Input Styles */
.message-input-container {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    margin: 0.5rem;
}

.input-button {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.input-button:hover {
    background-color: #f9fafb;
}

.message-textarea {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
    max-height: 100px;
}

.send-button {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* File Inputs */
.hidden-input {
    display: none;
}

/* Voice Recording */
.voice-recording {
    display: none;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 12px;
    padding: 0.75rem;
    margin: 0.5rem;
    text-align: center;
}

/* Profile Image Styles */
.profile-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.profile-image-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.profile-image-placeholder {
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
}

/* Invoice Styles */
.invoice-preview-banner {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #92400e;
    font-weight: 500;
}

.invoice-content {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.invoice-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #2563eb;
    padding-bottom: 20px;
}

.invoice-title {
    font-size: 32px;
    font-weight: bold;
    color: #2563eb;
    margin: 0;
}

.invoice-subtitle {
    font-size: 18px;
    color: #6b7280;
    margin: 8px 0 0 0;
}

.preview-mode {
    font-size: 14px;
    color: #f59e0b;
    margin: 4px 0 0 0;
    font-weight: 500;
}

.invoice-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.from-section, .invoice-info {
    flex: 1;
}

.from-section h3, .invoice-info h3 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 16px;
}

.from-section p, .invoice-info p {
    margin: 5px 0;
    color: #6b7280;
    font-size: 14px;
}

.invoice-info {
    text-align: right;
}

.client-section {
    margin-bottom: 30px;
}

.client-section h3 {
    margin: 0 0 10px 0;
    color: #374151;
    font-size: 16px;
}

.client-section p {
    margin: 5px 0;
    color: #6b7280;
    font-size: 14px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.invoice-table th {
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
    color: #374151;
    font-weight: bold;
    background-color: #f9fafb;
}

.invoice-table th:last-child {
    text-align: right;
}

.invoice-table td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
}

.invoice-table td:last-child {
    text-align: right;
}

.totals-section {
    margin-top: 30px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
}

.total-final {
    border-top: 2px solid #2563eb;
    margin-top: 10px;
    font-weight: bold;
    font-size: 18px;
    color: #2563eb;
}

.vat-reason {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
    color: #9ca3af;
}

.payment-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.payment-section h4 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 16px;
}

.payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.payment-grid h5 {
    margin: 0 0 8px 0;
    color: #374151;
    font-size: 14px;
}

.payment-grid p {
    margin: 2px 0;
    font-size: 13px;
    color: #6b7280;
}

.notes {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* Additional Extracted Styles */

/* Emoji Picker Header */
.emoji-picker-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.emoji-picker-title {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.75rem;
}

.emoji-picker-close-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #9ca3af;
    padding: 0.25rem;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.25rem;
    max-height: 120px;
    overflow-y: auto;
}

/* Voice Recording */
.voice-recording-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.recording-indicator {
    width: 12px;
    height: 12px;
    background: #dc2626;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.recording-text {
    color: #dc2626;
    font-weight: 600;
}

.recording-stop-btn {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
}

/* Empty States */
.no-client-selected {
    text-align: center;
    color: #6b7280;
    padding: 1.5rem;
}

.no-client-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.no-client-title {
    margin: 0 0 0.5rem 0;
    color: #374151;
}

.no-client-text {
    margin: 0;
}

/* Table Empty State */
.table-empty-cell {
    text-align: center;
    color: #6b7280;
}

/* Profile Section */
.profile-section-flex {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.profile-image-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-image-container.clickable {
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-image-container.clickable:hover {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.profile-image-container.clickable.drag-over {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.05);
}

.profile-image-container.flash-success {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35);
    animation: profile-flash 900ms ease-out;
}

@keyframes profile-flash {
    from { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.45); }
    to { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.profile-image-placeholder {
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
}

.profile-edit-btn {
    background: #0b7285;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
}

.profile-edit-btn:hover {
    background: #095a69;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px; /* Prevents zoom on iOS */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.button-group .btn {
    margin: 0;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-in-progress {
    background: #dbeafe;
    color: #1e40af;
}

/* Card Variations */
.card-compact {
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.card-header-compact {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Text Utilities */
.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-muted {
    color: #6b7280;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Spacing Utilities */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }

/* Form Checkbox Styles */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    padding: 0.375rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.checkbox-label:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.checkbox-input {
    margin: 0;
    width: 14px;
    height: 14px;
    accent-color: #2563eb;
    cursor: pointer;
}

/* Layout Utilities */
.flex-1 {
    flex: 1;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

/* Common Inline Style Replacements */
.inline-flex {
    display: inline-flex;
}

.inline-block {
    display: inline-block;
}

.block {
    display: block;
}

.hidden {
    display: none;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

/* Common Color Classes */
.bg-white {
    background-color: white;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-900 {
    color: #111827;
}

/* Font Weight Utilities */
.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Width Utilities */
.min-w-35 {
    min-width: 140px;
}

.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }
.w-40 { width: 10rem; }
.w-48 { width: 12rem; }
.w-56 { width: 14rem; }
.w-64 { width: 16rem; }

.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-32 { height: 8rem; }
.h-40 { height: 10rem; }
.h-48 { height: 12rem; }
.h-56 { height: 14rem; }
.h-64 { height: 16rem; }

/* Border Utilities */
.border {
    border: 1px solid #e5e7eb;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.rounded {
    border-radius: 4px;
}

.rounded-md {
    border-radius: 6px;
}

.rounded-lg {
    border-radius: 8px;
}

.rounded-full {
    border-radius: 9999px;
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Enhanced Form Styles */
.checkbox-label-large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f8fafc;
    transition: all 0.2s;
}

.checkbox-label-large:hover {
    background-color: #f0f9ff;
    border-color: #bae6fd;
}

.checkbox-input-large {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

.checkbox-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checkbox-title {
    font-weight: 500;
    color: #374151;
}

.checkbox-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Common Display Patterns */
.display-flex {
    display: flex;
}

.display-grid {
    display: grid;
}

.display-block {
    display: block;
}

.display-inline-block {
    display: inline-block;
}

.display-none {
    display: none;
}

/* Common Width/Height Patterns */
.w-auto {
    width: auto;
}

.h-auto {
    height: auto;
}

.w-screen {
    width: 100vw;
}

.h-screen {
    height: 100vh;
}

/* Common Margin/Padding Patterns */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }
.m-5 { margin: 1.25rem; }
.m-6 { margin: 1.5rem; }

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.my-auto {
    margin-top: auto;
    margin-bottom: auto;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.ml-5 { margin-left: 1.25rem; }
.ml-6 { margin-left: 1.5rem; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.mr-5 { margin-right: 1.25rem; }
.mr-6 { margin-right: 1.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-5 { padding-top: 1.25rem; }
.pt-6 { padding-top: 1.5rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-5 { padding-bottom: 1.25rem; }
.pb-6 { padding-bottom: 1.5rem; }

.pl-0 { padding-left: 0; }
.pl-1 { padding-left: 0.25rem; }
.pl-2 { padding-left: 0.5rem; }
.pl-3 { padding-left: 0.75rem; }
.pl-4 { padding-left: 1rem; }
.pl-5 { padding-left: 1.25rem; }
.pl-6 { padding-left: 1.5rem; }

.pr-0 { padding-right: 0; }
.pr-1 { padding-right: 0.25rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-3 { padding-right: 0.75rem; }
.pr-4 { padding-right: 1rem; }
.pr-5 { padding-right: 1.25rem; }
.pr-6 { padding-right: 1.5rem; }

/* Icon Styles */
.icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-lg {
    width: 1.5rem;
    height: 1.5rem;
}

.icon-xl {
    width: 2rem;
    height: 2rem;
}

.icon-2xl {
    width: 3rem;
    height: 3rem;
}

/* Icon Colors */
.icon-gray-500 {
    color: #6b7280;
}

.icon-gray-600 {
    color: #4b5563;
}

.icon-gray-700 {
    color: #374151;
}

.icon-blue-600 {
    color: #2563eb;
}

.icon-green-600 {
    color: #16a34a;
}

.icon-red-600 {
    color: #dc2626;
}

/* Icon Button Styles */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.icon-button:hover {
    background-color: #f3f4f6;
}

.icon-button-primary {
    background-color: #2563eb;
    color: white;
}

.icon-button-primary:hover {
    background-color: #1d4ed8;
}

.icon-button-secondary {
    background-color: #6b7280;
    color: white;
}

.icon-button-secondary:hover {
    background-color: #4b5563;
}

/* White icons on colored buttons */
.btn-primary .icon,
.btn-primary img[src*="assets/icons/"],
.btn-success .icon,
.btn-success img[src*="assets/icons/"],
.btn-secondary .icon,
.btn-secondary img[src*="assets/icons/"] {
    filter: brightness(0) invert(1);
}

/* Ensure SVG icons in colored buttons are white */
.btn-primary svg,
.btn-success svg,
.btn-secondary svg {
    stroke: white !important;
    fill: white !important;
}

/* Responsive adjustments for extracted styles */
@media (max-width: 768px) {
    .chat-container {
        height: 500px;
    }
    
    .chat-sidebar {
        width: 250px;
    }
    
    .attachment-menu {
        width: 180px;
    }
    
    .invoice-details {
        flex-direction: column;
        gap: 20px;
    }
    
    .invoice-info {
        text-align: left;
    }
    
    .payment-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .button-group {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Enhanced Client Details Modal Styles */
.enhanced-client-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.client-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.client-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.client-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.client-status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-badge .icon {
    width: 12px;
    height: 12px;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-invoiced {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-new {
    background: #f3f4f6;
    color: #6b7280;
}

.client-info-section {
    flex: 1;
}

.client-name-large {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.client-email-large {
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.client-phone-large {
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.client-connected {
    color: #9ca3af;
    font-size: 0.875rem;
}

.quick-actions-section,
.recent-activity-section,
.documents-section,
.invoices-section,
.contact-info-section,
.tax-summary-section,
.notes-section {
    margin-bottom: 1.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
}

.action-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon .icon {
    width: 16px;
    height: 16px;
}

.activity-invoice {
    background: #dcfce7;
    color: #166534;
}

.activity-document {
    background: #dbeafe;
    color: #1d4ed8;
}

.activity-complete {
    background: #fef3c7;
    color: #92400e;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.875rem;
    color: #6b7280;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
}

.document-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #6b7280;
}

.document-icon .icon {
    width: 20px;
    height: 20px;
}

.document-info {
    flex: 1;
}

.document-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.document-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.invoices-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.invoice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
}

.invoice-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.invoice-number {
    font-weight: 600;
    color: #1f2937;
}

.invoice-amount {
    font-weight: 500;
    color: #059669;
}

.invoice-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-paid {
    background: #dcfce7;
    color: #166534;
}

.status-overdue {
    background: #fee2e2;
    color: #dc2626;
}

.no-invoices {
    color: #6b7280;
    text-align: center;
    padding: 1.5rem;
    font-style: italic;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.contact-label {
    min-width: 120px;
    font-weight: 600;
    color: #4b5563;
    font-size: 0.9rem;
}

.contact-value {
    color: #1f2937;
    font-weight: 500;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
}

.summary-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.summary-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.summary-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.client-notes-textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}


.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Client Documents Viewer Modal */
.documents-viewer {
    max-height: 70vh;
    overflow-y: auto;
}

.documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.documents-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.document-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
}

.document-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.document-card .document-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #6b7280;
    flex-shrink: 0;
}

.document-card .document-icon .icon {
    width: 20px;
    height: 20px;
}

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

.document-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.document-type {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-weight: 500;
}

.document-size {
    color: #9ca3af;
}

.document-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.no-documents {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.no-documents .icon {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-documents h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.no-documents p {
    font-size: 0.875rem;
    color: #9ca3af;
}

.modal-large {
    max-width: 900px;
    width: 90vw;
}

/* Premium Document Viewer Modal */
.document-viewer {
    max-height: 80vh;
    overflow-y: auto;
}

.document-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.document-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: #374151;
    min-width: 60px;
    font-size: 0.875rem;
}

.detail-value {
    color: #1f2937;
    font-weight: 500;
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

.document-actions-header {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.document-content {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.document-preview {
    padding: 1.5rem;
}

.preview-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f3f4f6;
}

.preview-header .icon {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.preview-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.preview-header p {
    color: #6b7280;
    font-size: 0.875rem;
}

.preview-content {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PDF Preview Styles */
.pdf-preview .preview-content {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.pdf-placeholder {
    width: 100%;
    max-width: 400px;
}

.pdf-page {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    aspect-ratio: 8.5/11;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-content {
    padding: 1.5rem;
    text-align: center;
}

.pdf-text {
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
}

/* Image Preview Styles */
.image-preview .preview-content {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.image-placeholder {
    text-align: center;
    color: #6b7280;
}

.image-placeholder .icon {
    margin-bottom: 1rem;
    opacity: 0.6;
}

/* Text Preview Styles */
.text-preview .preview-content {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.text-placeholder {
    width: 100%;
    max-width: 500px;
}

.document-text {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-text h4 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 600;
}

.document-text p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.document-details {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin: 1rem 0;
}

.document-details p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
}

.document-details strong {
    color: #1f2937;
    font-weight: 600;
}

/* Enhanced Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0; /* Match modal's top corners - removes white gaps */
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

/* Responsive Design for Document Viewer */
@media (max-width: 768px) {
    .document-info-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .document-actions-header {
        width: 100%;
        justify-content: center;
    }
    
    .modal-large {
        width: 95vw;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
}

/* Responsive design for enhanced client modal */
@media (max-width: 768px) {
    .enhanced-client-header {
        flex-direction: column;
        text-align: center;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .document-card {
        flex-direction: column;
        text-align: center;
    }
    
    .document-actions {
        justify-content: center;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}
