/* ========================================
   OPTUS-STYLE ERP SYSTEM THEME
   ======================================== */

/* Global Variables */
:root {
    --optus-primary: #1e3a8a;
    --optus-primary-light: #3b82f6;
    --optus-secondary: #059669;
    --optus-accent: #f59e0b;
    --optus-danger: #dc2626;
    --optus-gray: #6b7280;
    --optus-light-gray: #f3f4f6;
    --optus-border: #e5e7eb;
    --optus-text: #111827;
    --optus-text-light: #6b7280;
}

/* Base Styles */
body {
    background-color: #f8fafc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--optus-text);
    line-height: 1.6;
}

/* FontAwesome Icon Fixes for Cross-Browser Compatibility */
.fas, .far, .fab, .fal, .fa {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    display: inline-block !important;
}

/* Ensure icons render properly across browsers */
.fa-trash:before { content: "\f1f8"; }
.fa-edit:before { content: "\f044"; }
.fa-info-circle:before { content: "\f05a"; }
.fa-lightbulb:before { content: "\f0eb"; }
.fa-grip-vertical:before { content: "\f58d"; }
.fa-image:before { content: "\f03e"; }
.fa-plus:before { content: "\f067"; }
.fa-arrow-left:before { content: "\f060"; }
.fa-save:before { content: "\f0c7"; }
.fa-box:before { content: "\f466"; }
.fa-search:before { content: "\f002"; }
.fa-eye:before { content: "\f06e"; }
.fa-spinner:before { content: "\f110"; }
.fa-check-circle:before { content: "\f058"; }
.fa-percentage:before { content: "\f541"; }
.fa-calculator:before { content: "\f1ec"; }
.fa-undo:before { content: "\f0e2"; }
.fa-images:before { content: "\f302"; }
.fa-star:before { content: "\f005"; }
.fa-th:before { content: "\f00a"; }

/* Navigation - Optus Style */
.navbar {
    background: white !important;
    border-bottom: 1px solid var(--optus-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--optus-primary) !important;
}

.navbar-brand img {
    filter: none;
}

.brand-text {
    color: var(--optus-primary);
    font-weight: 700;
}

.navbar-nav .nav-link {
    color: var(--optus-text) !important;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: var(--optus-light-gray);
    color: var(--optus-primary) !important;
}

.navbar-nav .nav-link i {
    color: var(--optus-primary);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Dashboard Styles */
.dashboard-header {
    margin-bottom: 2rem;
    margin-top: 1.5rem;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--optus-text);
    margin-bottom: 0.5rem;
}

/* Page Headers - Consistent spacing for all pages */
.page-header {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--optus-text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--optus-text-light);
    margin-bottom: 0;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: var(--optus-text-light);
    margin-bottom: 0;
}

/* Stat Cards - Optus Style */
.stats-grid {
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--optus-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--optus-primary), var(--optus-primary-light));
}

.stat-card.stat-success::before {
    background: linear-gradient(90deg, var(--optus-secondary), #10b981);
}

.stat-card.stat-info::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.stat-card.stat-warning::before {
    background: linear-gradient(90deg, var(--optus-accent), #fbbf24);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--optus-primary), var(--optus-primary-light));
    color: white;
    font-size: 1.5rem;
}

.stat-success .stat-icon {
    background: linear-gradient(135deg, var(--optus-secondary), #10b981);
}

.stat-info .stat-icon {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.stat-warning .stat-icon {
    background: linear-gradient(135deg, var(--optus-accent), #fbbf24);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--optus-text);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--optus-text-light);
    font-weight: 500;
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--optus-border);
    overflow: hidden;
}

.content-card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--optus-border);
    background: var(--optus-light-gray);
    display: flex;
    justify-content: between;
    align-items: center;
}

.content-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--optus-text);
    margin: 0;
    flex: 1;
}

.content-card-body {
    padding: 1rem; /* compact */
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--optus-border);
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.quick-action-btn.primary {
    background: linear-gradient(135deg, var(--optus-primary), var(--optus-primary-light));
    color: white;
}

.quick-action-btn.secondary {
    background: linear-gradient(135deg, var(--optus-gray), #9ca3af);
    color: white;
}

.quick-action-btn.success {
    background: linear-gradient(135deg, var(--optus-secondary), #10b981);
    color: white;
}

.quick-action-btn.info {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.quick-action-content {
    flex: 1;
}

.quick-action-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.quick-action-desc {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Status Badges */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background-color: var(--optus-gray);
    color: white;
}

.status-sent {
    background-color: var(--optus-accent);
    color: white;
}

.status-approved {
    background-color: var(--optus-secondary);
    color: white;
}

.status-rejected {
    background-color: var(--optus-danger);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--optus-border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    color: var(--optus-text-light);
    font-size: 0.875rem;
}

/* Enhanced Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.4rem 0.75rem; /* compact */
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--optus-primary), var(--optus-primary-light));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: var(--optus-primary);
    color: var(--optus-primary);
}

.btn-outline-primary:hover {
    background-color: var(--optus-primary);
    border-color: var(--optus-primary);
}

/* Enhanced Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--optus-light-gray);
    border-bottom: 2px solid var(--optus-border);
    font-weight: 600;
    color: var(--optus-text);
    padding: 0.5rem; /* compact */
}

.table tbody td {
    padding: 0.5rem; /* compact */
    border-bottom: 1px solid var(--optus-border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* Enhanced Cards */
.card {
    border-radius: 12px;
    border: 1px solid var(--optus-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: var(--optus-light-gray);
    border-bottom: 1px solid var(--optus-border);
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 0.75rem; /* compact */
}

/* Enhanced Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .main-content {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }
    
    .dashboard-title,
    .page-title {
        font-size: 2rem;
    }
    
    .page-header,
    .dashboard-header {
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .content-card-body {
        padding: 1.5rem;
    }
    
    .quick-action-btn {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .navbar .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .main-content {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

.navbar-brand {
    font-weight: bold;
}

/* Cheng Guo Logo styling */
.navbar-brand img {
    filter: brightness(0) invert(1); /* Make logo white for dark navbar */
    transition: transform 0.2s ease-in-out;
}

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

.navbar-brand span {
    font-size: 1.25rem;
    font-weight: 600;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.table th {
    border-top: none;
    font-weight: 600;
}

.btn {
    border-radius: 0.375rem;
}

.badge {
    font-size: 0.75em;
}

.alert {
    border-radius: 0.5rem;
}

/* Dashboard cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning {
    border: none;
}

/* Product table */
.product-checkbox {
    transform: scale(1.2);
}

/* Modal styles */
.modal-content {
    border-radius: 0.5rem;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Form styles */
.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--optus-primary);
    box-shadow: 0 0 0 0.25rem rgba(30, 58, 138, 0.15);
    outline: none;
}

.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;
}

/* Products page specific form styling */
.products-page .form-control,
.products-page .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.products-page .form-control:focus,
.products-page .form-select:focus {
    border-color: var(--optus-primary);
    box-shadow: 0 0 0 0.25rem rgba(30, 58, 138, 0.15);
    outline: none;
}

.products-page .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 adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .card-header,
    .btn,
    .modal {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    body {
        background: white !important;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Status badges */
.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Hover effects */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

.btn:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease-in-out;
}

/* Animation for alerts */
.alert {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Product image styles */
.product-thumbnail {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

.product-thumbnail:hover {
    transform: scale(1.1);
}

/* Existing product thumbnails in upload confirmation */
.product-thumbnail-existing {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.product-thumbnail-existing:hover {
    transform: scale(1.1);
}

/* Charts Section */
.charts-section {
    margin-top: 2rem;
}

.charts-section .content-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.charts-section .content-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.charts-section canvas {
    max-height: 350px;
    flex: 1;
}

.charts-section .quick-actions {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Chart responsive adjustments */
@media (max-width: 768px) {
    .charts-section .col-lg-6 {
        margin-bottom: 1rem;
    }
    
    .charts-section canvas {
        max-height: 300px;
    }
    
    .charts-section .quick-actions {
        justify-content: flex-start;
        gap: 1rem;
    }
}

/* Product Image Album Styles */
.product-images-album .image-container {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-images-album .image-container:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.main-image-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.image-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover .image-actions {
    opacity: 1;
}

.image-actions .btn {
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 4px;
}

.add-image-slot {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.add-image-slot:hover {
    border-color: #007bff;
    background-color: #e7f3ff;
    color: #007bff;
}

.add-image-slot i {
    margin-bottom: 5px;
}

.product-placeholder {
    transition: background-color 0.2s ease-in-out;
}

.product-placeholder:hover {
    background-color: #e9ecef !important;
}

/* Image upload modal */
#imagePreview img {
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive image table */
@media (max-width: 768px) {
    .product-thumbnail,
    .product-placeholder {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ========================================
   PROFESSIONAL QUOTATION STYLES - OPTUS INVOICE STYLE
   ======================================== */

/* Quotation Container - A4 Format */
.quotation-container {
    max-width: 210mm; /* A4 width */
    min-height: 297mm; /* A4 height */
    margin: 0 auto;
    background: white;
    padding: 15mm; /* Professional margins */
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.4;
    color: #333;
    position: relative;
}

/* Ensure on-screen preview respects A4 aspect ratio */
html, body {
    -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
}

/* Header Section - Optus Style */
.quotation-header {
    background: white;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 100%;
}

.header-left {
    flex: 1;
    max-width: 50%;
}

.header-right {
    flex: 1;
    max-width: 50%;
    text-align: right;
}

.company-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.company-logo {
    height: 50px;
    width: auto;
    filter: none;
}

.company-info {
    flex: 1;
}

.company-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0;
    line-height: 1.2;
}

.company-abn {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 5px 0 0 0;
}

/* Customer Info Box in Header */
.header-left .customer-info-box {
    background: #e5e7eb;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #1e40af;
    margin-top: 10px;
    margin-right: 20px;
}

.header-left .customer-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-left .customer-details {
    font-size: 0.85rem;
    line-height: 1.4;
}

.header-left .customer-name {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.header-left .customer-company,
.header-left .customer-contact,
.header-left .customer-address,
.header-left .customer-phone,
.header-left .customer-email {
    margin-bottom: 3px;
    color: #374151;
}

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

.page-info {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 5px;
}

.invoice-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 15px 0;
}

.invoice-details {
    margin-bottom: 15px;
}

.invoice-number,
.invoice-date,
.invoice-period {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.invoice-number .label,
.invoice-date .label,
.invoice-period .label {
    font-weight: 600;
    color: #374151;
}

.invoice-number .value,
.invoice-date .value,
.invoice-period .value {
    font-weight: 700;
    color: #111827;
}

.amount-due-box {
    background: #1e40af;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    margin-top: 20px;
}

.delivery-terms {
    text-align: left;
}

.delivery-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.delivery-item {
    font-size: 0.9rem;
    margin: 0 0 6px 0;
    color: white;
    line-height: 1.4;
}

.delivery-item:last-child {
    margin-bottom: 0;
}

/* Customer Information Section - REMOVED (now in header) */

/* Main Content Section */
.main-content {
    margin-bottom: 30px;
    padding-top: 0;
}

.content-grid {
    display: block;
}

.left-column {
    background: white;
}

.right-column {
    background: white;
}

.items-section,
.payment-terms-section,
.status-section,
.bill-summary,
.contact-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.items-section {
    margin-top: 0;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

/* Payment Terms Section */
.terms-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.term-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #1e40af;
}

.term-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 8px 0;
}

.term-item p {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.4;
}

/* Right Column Styles */
.status-box {
    background: #f8fafc;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #1e40af;
}

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

.status-label {
    font-weight: 600;
    color: #374151;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background-color: #6b7280;
    color: white;
}

.status-sent {
    background-color: #f59e0b;
    color: white;
}

.status-approved {
    background-color: #10b981;
    color: white;
}

.status-rejected {
    background-color: #ef4444;
    color: white;
}

/* Bill Summary */
.summary-content {
    background: #f8fafc;
    padding: 15px;
    border-radius: 6px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-item.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e40af;
    border-top: 2px solid #1e40af;
    padding-top: 10px;
    margin-top: 10px;
}

.summary-item .label {
    color: #374151;
}

.summary-item .value {
    font-weight: 600;
    color: #111827;
}

/* Contact Section */
.contact-content {
    background: #f8fafc;
    padding: 15px;
    border-radius: 6px;
}

.contact-content p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #374151;
}

.contact-details p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-details i {
    color: #1e40af;
    width: 16px;
}

/* Footer Styles */
.quotation-footer {
    border-top: 2px solid #e5e7eb;
    padding-top: 20px;
    margin-top: 30px;
    background: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.footer-left,
.footer-right {
    flex: 1;
}

.footer-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-text i {
    color: #1e40af;
    width: 16px;
}

/* Profile section in footer */
.footer-profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-picture-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #1e40af;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-picture-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-picture-container .default-avatar {
    font-size: 24px;
    color: #1e40af;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #374151;
}

.contact-item i {
    color: #1e40af;
    width: 16px;
    text-align: center;
}

.contact-label {
    font-weight: 600;
    color: #1e40af;
    min-width: 60px;
}

.contact-value {
    color: #374151;
}

.contact-separator {
    color: #9ca3af;
    margin: 0 8px;
    font-weight: 300;
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.footer-company-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-contact-details {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

.footer-contact-item i {
    color: #1e40af;
    width: 14px;
    text-align: center;
}

.contact-hours-line {
    margin-left: 20px;
    font-size: 0.8rem;
}

.contact-hours-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-hours-line {
    font-size: 0.8rem;
}

.company-footer {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
    margin: 0;
}

/* Items Table - Updated for Optus Style */
.items-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.items-table thead {
    background: #1e40af;
    color: white;
}

.items-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.items-table tbody tr:hover {
    background-color: #f8fafc;
}

.items-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* Table Columns */
.col-image { width: 15%; }
.col-code { width: 25%; }
.col-sizes { width: 20%; }
.col-unit-price { width: 20%; text-align: right; }

.item-code {
    font-family: 'Courier New', monospace;
    background-color: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.item-sizes {
    color: #374151;
    font-size: 0.9rem;
}

.item-unit-price {
    font-weight: 600;
    color: #111827;
    font-family: 'Courier New', monospace;
}

/* Table Footer */
.items-table tfoot {
    background-color: #f8fafc;
    font-weight: 700;
}

.subtotal-row {
    border-top: 2px solid #e5e7eb;
}

.tax-row {
    background-color: #fef3c7;
}

.total-row {
    background-color: #d1fae5;
    border-top: 3px solid #10b981;
    font-size: 1.1rem;
}

.subtotal-label,
.tax-label,
.total-label {
    text-align: right;
    padding-right: 20px;
    font-size: 1rem;
    width: 100%;
}

.subtotal-amount,
.tax-amount,
.total-amount {
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
}

.total-amount {
    font-size: 1.3rem;
    color: #10b981;
}

.company-logo {
    height: 60px;
    width: auto;
    filter: none;
}

.company-details {
    flex: 1;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--optus-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    line-height: 1.3;
    max-width: 320px; /* Slightly wider for better readability */
    word-wrap: break-word;
}

.company-tagline {
    font-size: 1rem;
    color: var(--optus-text-light);
    font-style: italic;
    margin-bottom: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.company-contact {
    font-size: 0.85rem;
    color: var(--optus-text-light);
    margin-top: 8px;
    line-height: 1.4;
}

.company-contact p {
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.company-contact i {
    color: var(--optus-primary);
    width: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.customer-section {
    margin-top: 15px;
}

.customer-section .section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--optus-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.customer-info {
    background-color: var(--optus-light-gray);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--optus-primary);
}

.customer-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--optus-text);
    margin-bottom: 6px;
}

.customer-company {
    font-size: 1.1rem;
    color: var(--optus-text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.customer-contact p {
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: var(--optus-text);
    line-height: 1.4;
}

/* Right Column Styles */
.header-right {
    height: 100%;
    padding-right: 15px; /* Add padding back to content */
}

.terms-section {
    height: 100%;
}

.terms-section .section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--optus-primary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.terms-content {
    background-color: var(--optus-light-gray);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--optus-secondary);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quotation-details {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--optus-border);
}

.quotation-number,
.quotation-date,
.quotation-validity {
    margin-bottom: 6px;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quotation-number .label,
.quotation-date .label,
.quotation-validity .label {
    font-weight: 600;
    color: var(--optus-text-light);
    flex: 1;
}

.quotation-number .value,
.quotation-date .value,
.quotation-validity .value {
    font-weight: 700;
    color: var(--optus-text);
    text-align: right;
    flex: 1;
}

.quotation-status {
    margin-top: 10px;
}

.terms-list {
    flex: 1;
}

.terms-list h5 {
    color: var(--optus-primary);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1rem;
    margin-top: 10px;
}

.terms-list ul {
    margin-bottom: 12px;
    padding-left: 18px;
}

.terms-list li {
    margin-bottom: 4px;
    color: var(--optus-text);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Main Body Section */
.quotation-body {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.quotation-body .quotation-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--optus-primary);
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.quotation-items-section {
    margin-top: 20px;
}

.quotation-number,
.quotation-date,
.quotation-validity {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.quotation-number .label,
.quotation-date .label,
.quotation-validity .label {
    font-weight: 600;
    color: #555;
}

.quotation-number .value,
.quotation-date .value,
.quotation-validity .value {
    font-weight: 700;
    color: #333;
}

.quotation-status {
    margin-top: 15px;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-draft {
    background-color: #6c757d;
    color: white;
}

.status-sent {
    background-color: #ffc107;
    color: #000;
}

.status-approved {
    background-color: #198754;
    color: white;
}

.status-rejected {
    background-color: #dc3545;
    color: white;
}

/* Quotation Sections */
.quotation-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #007bff;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Customer Information */
.customer-info {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid #007bff;
}

.customer-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.customer-company {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.customer-contact p {
    margin-bottom: 5px;
    font-size: 1rem;
}

/* Items Table */
.items-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.items-table thead {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.items-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

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

.items-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* Table Columns */
.col-image { width: 12%; }
.col-item { width: 35%; }
.col-code { width: 18%; }
.col-qty { width: 10%; text-align: center; }
.col-unit-price { width: 15%; text-align: right; }
.col-total { width: 15%; text-align: right; }

.item-name {
    font-weight: 600;
    color: #333;
}

.item-code {
    font-family: 'Courier New', monospace;
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.item-supplier {
    color: #666;
    font-size: 0.95rem;
}

.item-qty {
    font-weight: 600;
    color: #333;
}

.item-unit-price,
.item-total {
    font-weight: 600;
    color: #333;
    font-family: 'Courier New', monospace;
}

/* Table Columns - Updated for new layout */
.col-product { width: 100%; }

/* Product Row Layout */
.product-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
}

.product-image-section {
    flex-shrink: 0;
}

.product-details-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.detail-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 700;
    color: #111827;
    font-size: 0.95rem;
}

/* Special styling for unit price row */
.product-detail-row:last-child {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 8px;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.2);
    position: relative;
    overflow: hidden;
}

.product-detail-row:last-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.product-detail-row:last-child .detail-label {
    color: #92400e;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-detail-row:last-child .detail-value {
    color: #dc2626;
    font-weight: 900;
    font-size: 1.3rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Updated Product Images */
.items-table .product-image-container {
    position: relative;
    display: inline-block;
    width: 200px;
    height: 200px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-image:hover {
    transform: scale(1.05);
    border-color: #1e40af;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.more-images-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #1e40af;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.more-images-indicator:hover {
    background-color: #1e3a8a;
    transform: scale(1.1);
}

.items-table .no-image-placeholder {
    width: 200px;
    height: 200px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
}

.no-image-placeholder i {
    font-size: 32px;
    margin-bottom: 6px;
}

.no-image-placeholder span {
    font-size: 12px;
    text-align: center;
}

/* Table Footer */
.items-table tfoot {
    background-color: #f8f9fa;
    font-weight: 700;
}

.subtotal-row {
    border-top: 2px solid #dee2e6;
}

.tax-row {
    background-color: #fff3cd;
}

.total-row {
    background-color: #d4edda;
    border-top: 3px solid #28a745;
    font-size: 1.1rem;
}

.subtotal-label,
.tax-label,
.total-label {
    text-align: right;
    padding-right: 20px;
    font-size: 1rem;
}

.subtotal-amount,
.tax-amount,
.total-amount {
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
}

.total-amount {
    font-size: 1.3rem;
    color: #28a745;
}

/* Terms and Conditions */
.terms-content {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid #28a745;
}

.terms-content h5 {
    color: #007bff;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.terms-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.terms-content li {
    margin-bottom: 8px;
    color: #555;
}

.quotation-notes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.quotation-notes h5 {
    color: #007bff;
    font-weight: 700;
    margin-bottom: 10px;
}

.quotation-notes p {
    color: #555;
    font-style: italic;
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid #ffc107;
}

/* Quotation Footer */
.quotation-footer {
    border-top: 2px solid #e9ecef;
    padding-top: 30px;
    margin-top: 40px;
}

.footer-text {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Action Buttons */
.quotation-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.action-buttons .btn {
    min-width: 180px;
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

/* Print Styles */
@media print {
    /* Exact A4 page size and margins for PDF/export */
    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        background: white !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    html, body {
        width: 210mm;
        height: 297mm;
    }
    
    .quotation-container {
        max-width: 210mm;
        min-height: calc(297mm - 24mm); /* account for @page margins */
        margin: 0 auto;
        padding: 0;
        box-shadow: none;
        background: white;
    }
    
    .quotation-actions,
    .navbar,
    .card-header,
    .btn,
    .modal,
    .alert {
        display: none !important;
    }
    
    .quotation-header {
        border-bottom: 3px solid #000;
        padding-bottom: 10px;
        margin-bottom: 15px;
        background: white !important;
        box-shadow: none !important;
        max-height: 74mm; /* Maintain 1/4 A4 height in print */
        overflow: hidden;
        padding: 10px 0; /* Remove left/right padding in print */
    }
    
    .logo-section {
        border-bottom: 2px solid #000;
    }
    
    .company-logo {
        height: 45px;
    }
    
    .company-name {
        font-size: 1.3rem;
        color: #000;
        max-width: 280px; /* Slightly wider for print readability */
        line-height: 1.2;
    }
    
    .quotation-body .quotation-title {
        font-size: 2.2rem;
        color: #000;
        text-shadow: none;
    }
    
    .customer-info,
    .terms-content {
        background-color: #f9f9f9 !important;
        border-left: 3px solid #000 !important;
    }
    
    .section-title {
        color: #000;
        border-bottom: 2px solid #000;
    }
    
    .items-table {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .items-table thead {
        background: #000 !important;
        color: white !important;
    }
    
    .items-table th,
    .items-table td {
        border: 1px solid #000;
        padding: 8px;
    }
    
    .items-table tbody tr:nth-child(even) {
        background-color: #f5f5f5 !important;
    }
    
    .items-table tfoot {
        background-color: #f0f0f0 !important;
    }
    
    .total-row {
        background-color: #e0e0e0 !important;
        border-top: 2px solid #000 !important;
    }
    
    .customer-info,
    .terms-content {
        background-color: #f9f9f9 !important;
        border-left: 3px solid #000 !important;
    }
    
    .quotation-footer {
        border-top: 2px solid #000;
        margin-top: 30px;
        padding-top: 20px;
    }
    
    .status-badge {
        background-color: #000 !important;
        color: white !important;
        border: 1px solid #000;
    }
    
    /* Page breaks */
    .quotation-section {
        page-break-inside: avoid;
    }
    
    .items-table {
        page-break-inside: avoid;
    }
    
    .quotation-footer {
        page-break-inside: avoid;
    }
    
    /* Image styles for print */
    .product-image {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .product-image:hover {
        transform: none !important;
    }
    
    .more-images-indicator {
        background-color: #000 !important;
        border-color: #000 !important;
    }
    
    .no-image-placeholder {
        border-color: #000 !important;
        color: #000 !important;
    }
    
    /* Enhanced print styles for better PDF generation */
    body.printing {
        font-size: 11pt;
        line-height: 1.3;
    }
    
    .quotation-container {
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
    }
    
    .quotation-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 2px solid #333;
        max-height: 74mm; /* Maintain 1/4 A4 height in enhanced print */
        overflow: hidden;
        padding: 8px 0; /* Remove left/right padding in enhanced print */
    }
    
    .quotation-section {
        margin-bottom: 15px;
        page-break-inside: avoid;
    }
    
    .items-table {
        font-size: 10pt;
        border-collapse: collapse;
    }
    
    .items-table th,
    .items-table td {
        padding: 6px 4px;
        border: 1px solid #333;
    }
    
    .items-table thead th {
        background-color: #f5f5f5 !important;
        font-weight: bold;
        color: #000 !important;
    }
    
    .product-image {
        max-width: 35px;
        max-height: 35px;
    }
    
    .quotation-footer {
        margin-top: 20px;
        padding-top: 15px;
        border-top: 2px solid #333;
    }
    
    .footer-contact-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .contact-label {
        min-width: auto;
        font-size: 0.8rem;
    }
    
    /* Ensure proper page breaks */
    .items-table tbody tr {
        page-break-inside: avoid;
    }

    /* Utility to force manual page breaks where needed */
    .page-break {
        break-after: page;
        page-break-after: always;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .quotation-container {
        padding: 15px;
        margin: 10px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 20px;
    }
    
    .header-left,
    .header-right {
        max-width: 100%;
    }
    
    .company-section {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .company-logo {
        height: 40px;
    }
    
    .company-name {
        font-size: 1.2rem;
    }
    
    .invoice-info {
        text-align: center;
    }
    
    .invoice-title {
        font-size: 1.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .customer-info-box {
        padding: 15px;
    }
    
    .items-section,
    .payment-terms-section,
    .status-section,
    .bill-summary,
    .contact-section {
        padding: 15px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .items-table {
        font-size: 0.8rem;
    }
    
    .items-table th,
    .items-table td {
        padding: 6px 4px;
    }
    
    /* Mobile image adjustments */
    .product-image-container {
        width: 50px;
        height: 50px;
    }
    
    .more-images-indicator {
        width: 18px;
        height: 18px;
        font-size: 8px;
    }
    
    .no-image-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .no-image-placeholder i {
        font-size: 16px;
    }
    
    .no-image-placeholder span {
        font-size: 7px;
    }
}

/* High DPI / Retina Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .company-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Customer Search Styles */
.search-container {
    margin-bottom: 1rem;
}

.search-container .input-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.search-container .input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.search-container .form-control {
    border-color: #dee2e6;
    font-size: 0.95rem;
}

.search-container .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.search-container .btn-outline-secondary {
    border-color: #dee2e6;
    color: #6c757d;
}

.search-container .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.search-results-info {
    font-size: 0.9rem;
}

.search-results-info .badge {
    font-size: 0.8rem;
    padding: 0.5em 0.75em;
}

/* Search highlighting */
mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.1em 0.2em;
    border-radius: 3px;
    font-weight: 600;
}

/* Customer table search enhancements */
#customersTable {
    transition: opacity 0.3s ease;
}

#noSearchResults {
    transition: all 0.3s ease;
}

/* ========================================
   ENHANCED EDIT USER PAGE STYLES
   ======================================== */

/* User Header Card */
.user-header-card {
    background: linear-gradient(135deg, var(--optus-primary), var(--optus-primary-light));
    color: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.user-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.user-header-card .back-btn {
    color: white;
    font-size: 1.2rem;
    padding: 0.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.user-header-card .back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
    color: white;
}

.user-header-card .user-info h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.user-header-card .user-badges .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.user-header-card .user-avatar {
    position: relative;
    z-index: 2;
}

.user-header-card .avatar-container {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

/* Form Card */
.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--optus-border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.form-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.form-card-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 2rem;
    border-bottom: 1px solid var(--optus-border);
    position: relative;
}

.form-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--optus-primary), var(--optus-primary-light));
}

.form-card-header .user-avatar-small {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--optus-primary), var(--optus-primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.form-card-body {
    padding: 2rem;
}

/* Enhanced Form Styles */
.enhanced-form {
    position: relative;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--optus-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--optus-primary), var(--optus-primary-light));
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--optus-text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--optus-primary);
    margin-right: 0.5rem;
}

.input-group {
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.15);
    transform: translateY(-1px);
}

.input-group-text {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 2px solid #e2e8f0;
    border-right: none;
    color: var(--optus-primary);
    font-weight: 600;
    padding: 0.875rem 1rem;
    border-radius: 8px 0 0 8px;
}

.input-group .form-control {
    border: 2px solid #e2e8f0;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.input-group .form-control:focus {
    border-color: var(--optus-primary);
    box-shadow: none;
    background: #fafbfc;
}

.form-text {
    font-size: 0.85rem;
    color: var(--optus-text-light);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.form-text i {
    color: var(--optus-primary);
    margin-right: 0.25rem;
}

/* Permission Cards */
.permission-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.permission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--optus-secondary), #10b981);
}

.permission-card:hover {
    border-color: var(--optus-primary);
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.1);
    transform: translateY(-2px);
}

.permission-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.permission-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--optus-primary), var(--optus-primary-light));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.permission-title {
    font-weight: 700;
    color: var(--optus-text);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.permission-desc {
    font-size: 0.85rem;
    color: var(--optus-text-light);
}

/* Form Check Switch Enhancement */
.form-check-input {
    width: 3rem;
    height: 1.5rem;
    border-radius: 1rem;
    background-color: #e2e8f0;
    border: none;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--optus-primary);
    border-color: var(--optus-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(30, 58, 138, 0.25);
}

/* Form Actions */
.form-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    margin: 2rem -2rem -2rem -2rem;
    padding: 2rem;
    border-radius: 0 0 16px 16px;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-primary.btn-lg {
    background: linear-gradient(135deg, var(--optus-primary), var(--optus-primary-light));
    border: none;
}

.btn-primary.btn-lg:hover {
    background: linear-gradient(135deg, #1e40af, #2563eb);
}

.btn-outline-secondary.btn-lg {
    border: 2px solid #e2e8f0;
    color: var(--optus-text-light);
    background: white;
}

.btn-outline-secondary.btn-lg:hover {
    background: #f8fafc;
    border-color: var(--optus-primary);
    color: var(--optus-primary);
}

/* Enhanced Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-header-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .user-header-card .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-header-card .user-avatar {
        order: -1;
    }
    
    .form-card-header,
    .form-card-body {
        padding: 1.5rem;
    }
    
    .form-actions {
        margin: 1.5rem -1.5rem -1.5rem -1.5rem;
        padding: 1.5rem;
    }
    
    .permission-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .permission-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Responsive search */
@media (max-width: 768px) {
    .search-container .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .search-results-info {
        margin-top: 0.5rem;
        text-align: center;
    }
    
    .search-results-info .badge {
        font-size: 0.75rem;
    }
}

/* Quotation Modal Product Images */
.quotation-container .product-image-container {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.quotation-container .product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quotation-container .product-thumbnail:hover {
    transform: scale(1.05);
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

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

.product-item-row .no-image-placeholder {
    width: 60px;
    height: 60px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 10px;
}

.product-item-row .no-image-placeholder i {
    font-size: 18px;
    margin-bottom: 2px;
}

.product-item-row .no-image-placeholder span {
    font-size: 8px;
    text-align: center;
}

/* Modal responsive adjustments */
@media (max-width: 768px) {
    .product-image-container {
        width: 50px;
        height: 50px;
    }
    
    .product-item-row .no-image-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .product-item-row .no-image-placeholder i {
        font-size: 16px;
    }
    
    .product-item-row .no-image-placeholder span {
        font-size: 7px;
    }
}

/* Quotation Edit Page Alignment Fixes */
.item-row {
    align-items: center;
    min-height: 80px;
}

.item-row .col-md-1,
.item-row .col-md-2,
.item-row .col-md-3 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 0;
    padding-bottom: 0;
}

.item-row .form-label {
    margin-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
}

.item-row .form-control,
.item-row .form-select {
    height: 38px;
    font-size: 0.875rem;
    border-radius: 4px;
}

.item-row .btn {
    height: 38px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.item-row .product-images-container {
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.item-row .images-display-container {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    overflow: hidden;
}

.item-row .main-image-wrapper {
    position: relative;
    display: inline-block;
}

.item-row .main-product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #007bff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.item-row .main-product-image:hover {
    border-color: #0056b3;
    transform: scale(1.05);
}

.item-row .image-count-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: #ffc107;
    color: #000;
    padding: 1px 4px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
    border: 1px solid #fff;
}

.item-row .no-image-placeholder {
    width: 50px;
    height: 50px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.item-row .no-image-placeholder:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}

.item-row .image-actions {
    height: 20px;
    display: flex;
    gap: 2px;
    justify-content: center;
    margin-top: 2px;
}

.item-row .image-actions .btn {
    height: 20px;
    width: 20px;
    padding: 0;
    font-size: 10px;
    border-radius: 2px;
}

/* Ensure consistent spacing */
.item-row > div {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Drag and Drop Styles */
.sortable-item {
    transition: all 0.2s ease;
}

.sortable-item:hover {
    background-color: #f8f9fa;
}

.drag-handle {
    user-select: none;
    transition: all 0.2s ease;
}

.drag-handle:hover {
    background-color: #e9ecef !important;
    transform: scale(1.05);
}

.sortable-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.sortable-item.drag-over {
    border: 2px dashed #007bff !important;
    background-color: #f8f9ff !important;
    transform: scale(1.02);
}

/* Product Selection Modal Styles */
.product-selection-card {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.product-selection-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-selection-card.selected {
    border-color: #28a745;
    background-color: #f8fff9;
}

/* Image Management Modal Styles */
.image-preview-card {
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
}

.image-preview-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.image-preview-card.selected {
    border-color: #28a745;
    background-color: #f8fff9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.image-preview-card.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #28a745;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.image-preview-card .card-img-top {
    transition: all 0.2s ease;
}

.image-preview-card:hover .card-img-top {
    transform: scale(1.05);
}

.image-preview-card.selected .card-img-top {
    transform: scale(1.02);
}

/* Notes Section Styling */
.notes-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.notes-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.notes-content {
    font-size: 14px;
    line-height: 1.6;
    color: #6c757d;
    white-space: pre-wrap;
}

/* Print styles for notes */
@media print {
    .notes-section {
        background-color: transparent !important;
        border: 1px solid #000 !important;
        margin-top: 20px;
        page-break-inside: avoid;
    }
    
    .notes-title {
        color: #000 !important;
        border-bottom-color: #000 !important;
    }
    
    .notes-content {
        color: #000 !important;
    }
}

/* Enhanced PDF Generation Styles for WeasyPrint */
@media print {
    /* Reset and optimize for PDF */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-sizing: border-box !important;
    }
    
    /* Page setup */
    @page {
        size: A4;
        margin: 15mm;
        @top-center {
            content: "";
        }
        @bottom-center {
            content: "";
        }
    }
    
    body {
        font-family: Arial, sans-serif !important;
        font-size: 11pt !important;
        line-height: 1.3 !important;
        color: #000 !important;
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Hide non-essential elements */
    .quotation-actions,
    .navbar,
    .btn,
    .modal,
    .alert,
    .card-header,
    .action-buttons {
        display: none !important;
    }
    
    /* Quotation container optimization */
    .quotation-container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 15mm !important;
        box-shadow: none !important;
        background: white !important;
        border: none !important;
        font-family: Arial, sans-serif !important;
    }
    
    /* Header optimization - Override flexbox completely */
    .quotation-header {
        border-bottom: 2px solid #000 !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
        background: white !important;
        page-break-inside: avoid;
    }
    
    .header-top {
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    .header-left {
        display: block !important;
        width: 60% !important;
        float: left !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .header-right {
        display: block !important;
        width: 35% !important;
        float: right !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: right !important;
    }
    
    /* Company section - Override flexbox */
    .company-section {
        display: block !important;
        margin-bottom: 20px !important;
        overflow: hidden !important;
    }
    
    .company-logo {
        height: 50px !important;
        width: auto !important;
        max-width: 120px !important;
        float: left !important;
        margin-right: 15px !important;
    }
    
    .company-info {
        display: block !important;
        overflow: hidden !important;
    }
    
    .company-name {
        font-size: 18pt !important;
        font-weight: bold !important;
        color: #000 !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        padding-top: 10px !important;
    }
    
    /* Customer info box */
    .customer-info-box {
        background: #f5f5f5 !important;
        border: 1px solid #000 !important;
        padding: 15px !important;
        margin-bottom: 15px !important;
        border-left: 4px solid #000 !important;
        clear: both !important;
    }
    
    .customer-title {
        font-size: 12pt !important;
        font-weight: bold !important;
        color: #000 !important;
        margin: 0 0 10px 0 !important;
        text-transform: uppercase !important;
    }
    
    .customer-details {
        font-size: 10pt !important;
        line-height: 1.4 !important;
    }
    
    .customer-name {
        font-weight: bold !important;
        font-size: 12pt !important;
        margin-bottom: 5px !important;
    }
    
    .customer-company,
    .customer-contact,
    .customer-address,
    .customer-phone,
    .customer-email {
        margin-bottom: 3px !important;
        font-size: 10pt !important;
    }
    
    /* Invoice info */
    .invoice-info {
        text-align: right !important;
        margin-bottom: 15px !important;
    }
    
    .page-info {
        font-size: 9pt !important;
        color: #666 !important;
        margin-bottom: 10px !important;
    }
    
    .invoice-title {
        font-size: 24pt !important;
        font-weight: bold !important;
        color: #000 !important;
        margin: 0 0 15px 0 !important;
    }
    
    .invoice-details {
        font-size: 10pt !important;
        margin-bottom: 15px !important;
    }
    
    .invoice-number,
    .invoice-date,
    .invoice-period {
        margin-bottom: 5px !important;
        display: block !important;
    }
    
    .label {
        font-weight: bold !important;
        display: inline-block !important;
        width: 80px !important;
    }
    
    .value {
        font-weight: normal !important;
    }
    
    /* Amount due box */
    .amount-due-box {
        background: #f9f9f9 !important;
        border: 1px solid #000 !important;
        padding: 10px !important;
        margin-top: 10px !important;
    }
    
    .delivery-terms {
        font-size: 9pt !important;
    }
    
    .delivery-title {
        font-size: 10pt !important;
        font-weight: bold !important;
        margin-bottom: 5px !important;
    }
    
    .delivery-item {
        margin-bottom: 3px !important;
        font-size: 9pt !important;
    }
    
    /* Main content */
    .main-content {
        clear: both !important;
        margin-top: 20px !important;
    }
    
    /* Items table */
    .items-section {
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }
    
    .section-title {
        font-size: 16pt !important;
        font-weight: bold !important;
        color: #000 !important;
        margin-bottom: 15px !important;
        border-bottom: 2px solid #000 !important;
        padding-bottom: 8px !important;
    }
    
    .items-table-container {
        width: 100% !important;
    }
    
    .items-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 9pt !important;
        page-break-inside: avoid;
        margin-bottom: 20px !important;
    }
    
    .items-table th,
    .items-table td {
        border: 1px solid #000 !important;
        padding: 10px !important;
        vertical-align: top !important;
    }
    
    .items-table th {
        background: #f0f0f0 !important;
        font-weight: bold !important;
        text-align: center !important;
        font-size: 10pt !important;
    }
    
    /* Product details */
    .product-row {
        display: block !important;
        overflow: hidden !important;
    }
    
    .product-image-section {
        float: left !important;
        margin-right: 15px !important;
        margin-bottom: 10px !important;
    }
    
    .product-image-container {
        width: 80px !important;
        height: 80px !important;
    }
    
    .product-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border: 1px solid #000 !important;
    }
    
    .more-images-indicator {
        background: #000 !important;
        color: white !important;
        border: 1px solid #000 !important;
        font-size: 8pt !important;
    }
    
    .no-image-placeholder {
        border: 1px solid #000 !important;
        color: #000 !important;
        background: #f9f9f9 !important;
    }
    
    .product-details-section {
        display: block !important;
        overflow: hidden !important;
        margin-left: 100px !important;
    }
    
    .product-detail-row {
        margin-bottom: 5px !important;
        font-size: 9pt !important;
        display: block !important;
    }
    
    .detail-label {
        font-weight: bold !important;
        display: inline-block !important;
        width: 80px !important;
    }
    
    .detail-value {
        font-weight: normal !important;
    }
    
    /* Footer */
    .quotation-footer {
        border-top: 2px solid #000 !important;
        padding-top: 20px !important;
        margin-top: 30px !important;
        page-break-inside: avoid;
        clear: both !important;
    }
    
    .footer-content {
        display: block !important;
        width: 100% !important;
    }
    
    .footer-profile-section {
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    .profile-picture-container {
        float: left !important;
        margin-right: 20px !important;
        margin-bottom: 15px !important;
    }
    
    .profile-picture-container img {
        width: 60px !important;
        height: 60px !important;
        border: 1px solid #000 !important;
    }
    
    .default-avatar {
        font-size: 24pt !important;
        color: #000 !important;
        width: 60px !important;
        height: 60px !important;
        border: 1px solid #000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .contact-info {
        display: block !important;
        overflow: hidden !important;
        margin-left: 80px !important;
    }
    
    .contact-item {
        margin-bottom: 8px !important;
        font-size: 10pt !important;
        display: block !important;
    }
    
    .contact-item i {
        margin-right: 8px !important;
        color: #000 !important;
        width: 16px !important;
        text-align: center !important;
    }
    
    .contact-label {
        font-weight: bold !important;
        color: #000 !important;
    }
    
    .contact-value {
        color: #000 !important;
    }
    
    .contact-separator {
        color: #000 !important;
        margin: 0 8px !important;
    }
    
    /* Footer bottom */
    .footer-bottom {
        border-top: 1px solid #000 !important;
        padding-top: 15px !important;
        margin-top: 20px !important;
        text-align: center !important;
        clear: both !important;
    }
    
    .footer-company-info {
        display: block !important;
        text-align: center !important;
    }
    
    .company-footer {
        font-size: 12pt !important;
        font-weight: bold !important;
        color: #000 !important;
        margin-bottom: 10px !important;
    }
    
    .footer-contact-details {
        display: block !important;
        text-align: center !important;
    }
    
    .footer-contact-item {
        margin-bottom: 5px !important;
        font-size: 10pt !important;
        color: #000 !important;
        display: block !important;
    }
    
    .footer-contact-item i {
        margin-right: 5px !important;
        color: #000 !important;
    }
    
    .contact-hours-container {
        display: block !important;
        text-align: center !important;
    }
    
    .contact-hours-line {
        font-size: 10pt !important;
        color: #000 !important;
        margin-left: 0 !important;
        display: block !important;
        margin-bottom: 2px !important;
    }
    
    /* Notes section */
    .notes-section {
        background: white !important;
        border: 1px solid #000 !important;
        padding: 15px !important;
        margin-top: 20px !important;
        page-break-inside: avoid;
    }
    
    .notes-title {
        font-size: 14pt !important;
        font-weight: bold !important;
        color: #000 !important;
        margin-bottom: 10px !important;
        border-bottom: 1px solid #000 !important;
        padding-bottom: 5px !important;
    }
    
    .notes-content {
        font-size: 10pt !important;
        line-height: 1.4 !important;
        color: #000 !important;
    }
    
    /* Clear floats */
    .clearfix::after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }
}

/* Clickable stat cards */
.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.stat-card-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
}

.stat-card-link:hover .stat-card {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.stat-card-link .stat-card {
    transition: all 0.3s ease;
}

.stat-card-link .stat-card:hover::before {
    background: linear-gradient(90deg, var(--optus-primary), var(--optus-primary-light)) !important;
}

.stat-card-link:hover .stat-card.stat-success::before {
    background: linear-gradient(90deg, var(--optus-secondary), #10b981) !important;
}

.stat-card-link:hover .stat-card.stat-info::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa) !important;
}

.stat-card-link:hover .stat-card.stat-warning::before {
    background: linear-gradient(90deg, var(--optus-accent), #fbbf24) !important;
}
