/* Base styles */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: #ecf0f1;
}

/* Fixed Banner - Matching Project Page */
.fixed-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 80px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-placeholder {
    margin-left: 40px;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
}

.logo-placeholder::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #e74c3c);
    transition: width 0.3s ease;
}

.logo-placeholder:hover::after {
    width: 100%;
}

.main-content {
    margin-top: 80px;
    padding: 30px;
    min-height: calc(100vh - 80px);
}

/* Estimates Header - Matching Project Page */
.estimates-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.estimates-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #e74c3c, #f39c12, #2ecc71);
    background-size: 300% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.estimates-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.project-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.project-info span {
    color: #bdc3c7;
    font-size: 1.3rem;
    font-weight: 500;
    margin: 0;
}

.back-to-project-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
}

.back-to-project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
}

/* Estimates Layout - Matching Project Page */
.estimates-layout {
    display: flex;
    gap: 30px;
    height: calc(100vh - 200px);
}

.estimates-sidebar {
    width: 280px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: fit-content;
}

.estimates-sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.sidebar-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    text-align: left;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #bdc3c7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.sidebar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.sidebar-btn:hover::before {
    left: 100%;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.sidebar-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.estimates-viewport {
    flex: 1;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    color: #ecf0f1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.estimates-viewport:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

/* Estimate Sections */
.estimate-section {
    display: none;
}

.estimate-section h2 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Form Styles - Matching Project Page */
.estimate-form {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.estimate-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #bdc3c7;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #95a5a6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.add-item-btn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.add-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

/* Table Styles - Matching Project Page */
.estimate-table {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.estimate-table h3 {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    padding: 20px 25px;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.estimate-table table {
    width: 100%;
    border-collapse: collapse;
}

.estimate-table th,
.estimate-table td {
    padding: 15px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.estimate-table th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estimate-table td {
    color: #bdc3c7;
    transition: all 0.3s ease;
}

.estimate-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.estimate-table tfoot {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    font-weight: 600;
}

.estimate-table tfoot td {
    color: #fff;
    font-weight: 700;
    border-top: 2px solid #3498db;
}

/* Action Buttons - Matching Project Page */
.edit-btn,
.delete-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.edit-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
}

.delete-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

/* Summary Styles */
.summary-container {
    display: flex;
    gap: 30px;
}

.summary-totals {
    flex: 1;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-row.total-row {
    border-bottom: none;
    border-top: 3px solid #3498db;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
}

.summary-label {
    font-weight: 600;
    color: #2c3e50;
}

.summary-value {
    font-weight: 700;
    color: #27ae60;
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.estimate-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.estimate-btn:hover {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Proposal Styles */
.proposal-container {
    display: flex;
    gap: 30px;
}

.proposal-preview {
    flex: 2;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.proposal-preview h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.proposal-header h4 {
    color: #3498db;
    margin-bottom: 15px;
}

.proposal-body h4 {
    color: #2c3e50;
    margin: 20px 0 15px 0;
}

.breakdown-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.proposal-total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 3px solid #3498db;
    font-size: 1.2rem;
}

/* New proposal section styles */
.proposal-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.proposal-section .section-header h5 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.proposal-section .section-items {
    margin-bottom: 12px;
}

.proposal-item {
    padding: 4px 0;
    color: #34495e;
    font-size: 0.95rem;
    line-height: 1.4;
}

.proposal-section .section-total {
    text-align: right;
    color: #2c3e50;
    font-size: 1.05rem;
    border-top: 1px solid #dee2e6;
    padding-top: 8px;
    margin-top: 8px;
}

.signature-section {
    margin-top: 30px;
}

.signature-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.signature-btn {
    padding: 8px 16px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.proposal-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.proposal-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.proposal-btn:hover {
    background: linear-gradient(135deg, #2ecc71 0%, #58d68d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

/* Signature Modal */
.signature-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.signature-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.signature-modal-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.signature-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signature-modal-body {
    padding: 30px;
}

#signature-pad {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 20px;
}

.signature-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.signature-clear-btn,
.signature-save-btn,
.signature-cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.signature-clear-btn {
    background: #95a5a6;
    color: #fff;
}

.signature-save-btn {
    background: #27ae60;
    color: #fff;
}

.signature-cancel-btn {
    background: #e74c3c;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .estimates-layout {
        flex-direction: column;
        height: auto;
    }
    
    .estimates-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 15px;
    }
    
    .sidebar-btn {
        min-width: 150px;
        margin-right: 10px;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    .estimates-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .summary-container,
    .proposal-container {
        flex-direction: column;
    }
    
    .estimate-table {
        overflow-x: auto;
    }
}

/* ============== VENDOR PRODUCTS MODAL STYLES ============== */

.browse-vendor-btn {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.browse-vendor-btn:hover {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(142, 68, 173, 0.4);
}

.vendor-products-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vendor-products-modal[style*="display: block"] {
    display: flex !important;
}

.vendor-products-modal-content {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 15px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #3498db;
}

.vendor-products-modal-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #2980b9;
}

.vendor-products-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.vendor-products-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.vendor-products-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.vendor-products-modal-body {
    padding: 30px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.vendor-filter-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(52, 73, 94, 0.3);
    border-radius: 10px;
    border: 1px solid #34495e;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #ecf0f1;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    padding: 10px;
    border: 1px solid #34495e;
    border-radius: 6px;
    background: #2c3e50;
    color: #ecf0f1;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.vendor-products-table-container {
    background: rgba(44, 62, 80, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid #34495e;
}

.vendor-products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.vendor-products-table th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vendor-products-table td {
    padding: 12px;
    border-bottom: 1px solid #34495e;
    color: #ecf0f1;
    vertical-align: middle;
}

.vendor-products-table tr:hover {
    background: rgba(52, 152, 219, 0.1);
}

.vendor-products-table .no-data {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 30px;
}

.selected-products-section {
    background: rgba(52, 73, 94, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #34495e;
}

.selected-products-section h4 {
    margin: 0 0 15px 0;
    color: #3498db;
    font-size: 18px;
    font-weight: 600;
}

.selected-product-item {
    background: rgba(44, 62, 80, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-info {
    flex: 1;
    color: #ecf0f1;
}

.product-info strong {
    color: #3498db;
    font-size: 16px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ecf0f1;
}

.quantity-controls input {
    padding: 5px 8px;
    border: 1px solid #34495e;
    border-radius: 4px;
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.no-selected {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    margin: 20px 0;
}

.vendor-products-modal-footer {
    background: rgba(44, 62, 80, 0.8);
    padding: 20px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid #34495e;
}

.vendor-products-modal-footer button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.btn-primary:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive design for vendor products modal */
@media (max-width: 768px) {
    .vendor-products-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .vendor-filter-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .selected-product-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .quantity-controls {
        justify-content: center;
    }
    
    .vendor-products-modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .vendor-products-modal-footer button {
        width: 100%;
    }
}

/* Margin Controls Styling */
.margin-controls {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    border: 1px solid #4a6741;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.margin-controls h3 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.margin-section {
    margin-bottom: 25px;
    background: rgba(52, 73, 94, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #34495e;
}

.margin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.margin-label {
    font-weight: 600;
    color: #ecf0f1;
    font-size: 1.1em;
}

.margin-value {
    font-weight: 700;
    color: #3498db;
    font-size: 1.1em;
}

.margin-amount {
    font-weight: 700;
    color: #27ae60;
    font-size: 1.1em;
}

.slider-container {
    position: relative;
    margin: 15px 0;
}

.margin-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #34495e 0%, #2c3e50 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.margin-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    cursor: pointer;
    border: 2px solid #ecf0f1;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    transition: all 0.3s ease;
}

.margin-slider::-webkit-slider-thumb:hover {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.6);
}

.margin-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    cursor: pointer;
    border: 2px solid #ecf0f1;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85em;
    color: #bdc3c7;
}

.margin-description {
    font-size: 0.9em;
    color: #95a5a6;
    font-style: italic;
    margin-top: 8px;
    text-align: center;
}

.final-totals {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
    border: 2px solid #3498db;
}

.final-total-row {
    border-top: 2px solid #3498db;
    padding-top: 15px;
    margin-top: 15px;
}

.final-total-row .summary-label {
    font-size: 1.3em;
    font-weight: 700;
    color: #3498db;
}

.final-total-row .summary-value {
    font-size: 1.3em;
    font-weight: 700;
    color: #27ae60;
}

/* Responsive design for margin controls */
@media (max-width: 768px) {
    .margin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .margin-controls {
        padding: 15px;
        margin: 15px 0;
    }
    
    .margin-section {
        padding: 15px;
    }
    
    .slider-labels {
        font-size: 0.75em;
    }
}

/* Saved Estimates Management Styles */
.saved-estimates-container {
    background: rgba(44, 62, 80, 0.6);
    border-radius: 12px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.estimates-header-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.new-estimate-btn, .refresh-estimates-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.refresh-estimates-btn {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
    padding: 12px 15px;
}

.new-estimate-btn:hover, .refresh-estimates-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.estimates-list {
    background: rgba(52, 73, 94, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.estimates-table {
    width: 100%;
    border-collapse: collapse;
}

.estimates-table th {
    background: rgba(52, 152, 219, 0.2);
    color: #ecf0f1;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
}

.estimates-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
    color: #bdc3c7;
}

.estimates-table tr:hover {
    background: rgba(52, 152, 219, 0.1);
}

.estimates-table tr.current-estimate {
    background: rgba(46, 204, 113, 0.15);
    border-left: 4px solid #2ecc71;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.status-approved {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-sent {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.actions-cell {
    text-align: center;
}

.action-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 8px;
    margin: 0 2px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: scale(1.1);
}

.edit-btn:hover { background: rgba(46, 204, 113, 0.2); }
.copy-btn:hover { background: rgba(52, 152, 219, 0.2); }
.delete-btn:hover { background: rgba(231, 76, 60, 0.2); }

.loading-text, .no-data, .error-text {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 30px;
}

.error-text {
    color: #e74c3c;
}

/* Responsive adjustments for saved estimates */
@media (max-width: 768px) {
    .estimates-header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .new-estimate-btn, .refresh-estimates-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .estimates-table {
        font-size: 12px;
    }
    
    .estimates-table th,
    .estimates-table td {
        padding: 8px 6px;
    }
    
    .action-btn {
        font-size: 14px;
        padding: 4px 6px;
    }
}
