body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.table th {
    background-color: #f8f9fa;
}

.badge {
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.item-row {
    margin-bottom: 15px;
}

@media print {
    .no-print {
        display: none;
    }
    
    body {
        background-color: white;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
}

.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
    /* Card header adjustments */
    .card-header {
        padding: 0.75rem;
    }
    
    /* Navigation tabs */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .nav-tabs .nav-item {
        display: inline-block;
        float: none;
    }
    
    /* Search form adjustments */
    .card-header form.row {
        margin-bottom: 10px;
    }
    
    .card-header .col-md-6 {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Table adjustments */
    .table-responsive {
        border: 0;
    }
    
    .table thead {
        display: none;
    }
    
    .table tr {
        display: block;
        margin-bottom: 15px;
        border-bottom: 2px solid #dee2e6;
    }
    
    .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        border-bottom: 1px dotted #dee2e6;
        text-align: right;
    }
    
    .table td::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: auto;
        padding-right: 10px;
        text-align: left;
    }
    
    /* Button group adjustments */
    .btn-group {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .btn-group .btn {
        margin-bottom: 5px;
    }
    
    /* Hide some elements on mobile */
    .no-mobile {
        display: none;
    }
}

/* Additional mobile styles for quotations page */
@media (max-width: 576px) {
    /* Status badges */
    .badge {
        font-size: 0.75rem;
        padding: 0.25em 0.4em;
    }
    
    /* Action buttons */
    .btn-sm {
        padding: 0.15rem 0.3rem;
        font-size: 0.75rem;
    }
    
    /* Table cell content */
    .table td {
        font-size: 0.875rem;
    }
}

/* Add this to your existing table styles */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
}

.table td, .table th {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

/* Add this to make sure the table headers are visible on mobile */
@media (max-width: 768px) {
    .table td[data-label]::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
    }
}

/* Add this for better button visibility */
.btn {
    white-space: nowrap;
}

/* Add this for the status filter tabs */
.nav-tabs .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Add this for the search form */
.form-control {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Add this for the card header */
.card-header {
    padding: 0.75rem 1.25rem;
}
/* Mobile-specific styles for view_quotation.php */
@media (max-width: 768px) {
    /* Card header with action buttons */
    .card-header.d-flex {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .card-header .text-center {
        margin: 0.5rem 0;
        width: 100%;
    }
    
    .card-header .btn-group {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }
    
    .card-header .btn-group .btn {
        margin: 0.25rem;
        flex-grow: 1;
        min-width: 40px;
    }
    
    /* Two-column layouts to single column */
    .row > .col-md-6 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Items table adjustments */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-striped {
        min-width: 600px; /* Force horizontal scroll for wide tables */
    }
    
    /* Message panel adjustments */
    #messagePanel .card-body {
        padding: 1rem;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem auto;
    }
    
    /* PDF status section */
    #pdfStatus {
        font-size: 0.9rem;
    }
    
    #pdfStatus .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    /* Even smaller screens */
    .card-header h4 {
        font-size: 1.25rem;
    }
    
    .card-header small {
        font-size: 0.75rem;
    }
    
    .badge.fs-5 {
        font-size: 1rem !important;
        padding: 0.4rem 0.8rem;
    }
    
    /* Company and customer cards */
    .card-body h5 {
        font-size: 1.1rem;
    }
    
    .card-body p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    /* Summary cards */
    .card-body .row > div {
        margin-bottom: 0.5rem;
    }
    
    /* Footer text */
    .card-footer {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
}

/* Additional utility classes */
.mobile-stack {
    display: flex;
    flex-direction: column;
}

@media (min-width: 769px) {
    .mobile-stack {
        flex-direction: row;
    }
}

/* Better button spacing */
.btn-group {
    gap: 0.5rem;
}

/* Status badge adjustments */
.badge.fs-5 {
    white-space: nowrap;
}

/* PDF status section */
#pdfStatus {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

/* System messages styling */
#systemMessages div {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 0.25rem;
}

#systemMessages .bg-danger {
    background-color: #dc3545;
    color: white;
}

#systemMessages .bg-success {
    background-color: #198754;
    color: white;
}

/* Print-specific adjustments */
@media print {
    .card-header {
        background-color: transparent !important;
        border-bottom: 1px solid #ddd !important;
    }
    
    .btn-group {
        display: none !important;
    }
    
    #messagePanel {
        display: none !important;
    }
    
    .table-striped {
        min-width: auto !important;
    }
}

.bank-account-section {
    border: 1px solid #dee2e6;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.bank-account-section.active {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}