@import url('arial-web-fonts.css');

/* Brand Colors */
:root {
    --off-black: #1F0E0E;
    --claret: #5C051A;
    --bone: #EDEAD6;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --info: #3b82f6;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #6b7280;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--off-black);
    background-color: var(--light-gray);
    font-size: 16px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

@media (min-width: 768px) {
    .container {
        padding: 40px;
    }
}

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--claret) 0%, var(--off-black) 100%);
    color: var(--bone);
    padding: 0.75rem 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.header-right .btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.header-right .btn-sm:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
}

/* Main Header */
header {
    background: linear-gradient(135deg, var(--claret) 0%, var(--off-black) 100%);
    color: var(--bone);
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}


/* Loading Spinner */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--claret);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Alerts and Messages */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--success);
}

.alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--info);
}

.alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fed7aa;
    color: var(--warning);
}

.alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
}

.error-message, .success-message {
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin: 2rem 0;
}

.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
}

.success-message {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--success);
}

.success-message h2 {
    margin-bottom: 0.5rem;
}

/* Form Sections */
.form-section {
    background: white;
    padding: 2rem;
    margin-bottom: 24px;
    border-radius: var(--radius-xl);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid var(--medium-gray);
    transition: all 0.3s ease;
}

/* Collapsible form sections */
.form-section.collapsible {
    padding: 0;
    overflow: hidden;
}

.form-section.collapsible .section-header {
    padding: 1.5rem 2rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.form-section.collapsible .section-header:hover {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.form-section.collapsible .section-header h2 {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.section-collapse-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.section-collapse-indicator {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: var(--dark-gray);
    font-size: 1.125rem;
}

.form-section.collapsible.collapsed .section-collapse-indicator {
    transform: rotate(-90deg);
}

.section-content {
    padding: 2rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.form-section.collapsible.collapsed .section-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.form-section.collapsible:not(.collapsed) .section-content {
    max-height: none;
    opacity: 1;
}

/* Section summary for collapsed state */
.section-summary {
    display: none;
    margin-left: auto;
    margin-right: 1rem;
    font-size: 0.875rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.form-section.collapsible.collapsed .section-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-item-count {
    background: #e2e8f0;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.section-total-amount {
    color: var(--claret);
    font-weight: 600;
}

/* Global accordion controls */
.accordion-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: var(--radius-lg);
    border: 1px solid var(--medium-gray);
}

.accordion-control-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion-control-btn:hover {
    border-color: var(--claret);
    background: var(--claret);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(92, 5, 26, 0.2);
}

.accordion-control-btn i {
    font-size: 0.75rem;
}

/* Animation improvements for collapsible sections */
@keyframes section-expand {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 2000px;
        opacity: 1;
    }
}

@keyframes section-collapse {
    from {
        max-height: 2000px;
        opacity: 1;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

.form-section.collapsible .section-content.expanding {
    animation: section-expand 0.4s ease-out;
}

.form-section.collapsible .section-content.collapsing {
    animation: section-collapse 0.4s ease-in;
}

.form-section h2 {
    color: var(--claret);
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 2px solid #e2e8f0;
    border-top: 3px solid var(--claret);
    background: linear-gradient(to right, rgba(92, 5, 26, 0.02), transparent);
    margin-left: -2rem;
    margin-right: -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    margin-top: -2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    position: relative;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1; /* Span full width in grid */
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Required field indicator */
.required-indicator {
    color: #dc2626;
    font-weight: 700;
    margin-left: 2px;
}

/* Form note styling */
.form-note {
    color: var(--dark-gray);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Auto-expanding textarea */
textarea.form-control {
    resize: vertical;
    min-height: 3rem;
    font-family: Arial, sans-serif;
}

/* Specific styling for Casting Quote Info and Job Details */
#casting-quote-info,
#job-details {
    font-family: Arial, sans-serif !important;
}

/* Ensure placeholder text also uses Arial */
#casting-quote-info::placeholder,
#job-details::placeholder {
    font-family: Arial, sans-serif !important;
}

textarea.form-control[rows="3"] {
    min-height: 4.5rem;
    font-family: Arial, sans-serif;
}

textarea.form-control[rows="6"] {
    min-height: 7.5rem;
    font-family: Arial, sans-serif;
}

/* Enhanced validation states for form inputs */
.form-control.is-valid {
    border-color: #16a34a;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2316a34a' d='m2.3 6.73.94-.94-.94-.94L1.36 6l-.94.94 1.94 1.94L5.64 4.66l-.94-.94L2.3 6.73z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
    padding-right: 2.5rem;
    background-color: #f0fdf4;
}

.form-control.is-valid:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    background-color: #f0fdf4;
}

.form-control.is-invalid {
    border-color: #dc2626;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc2626'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.5 5.5 1 1m0 0 1 1m-1-1 1-1m-1 1-1 1'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
    padding-right: 2.5rem;
    background-color: #fef2f2;
}

.form-control.is-invalid:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
    background-color: #fef2f2;
}

/* Progressive validation states */
.form-control.validating {
    border-color: #f59e0b;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
    padding-right: 2.5rem;
    animation: validating-pulse 1.5s ease-in-out infinite;
}

@keyframes validating-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Real-time validation feedback */
.validation-message {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.validation-message.show {
    opacity: 1;
    transform: translateY(0);
}

.validation-message.valid {
    color: #16a34a;
}

.validation-message.invalid {
    color: #dc2626;
}

.validation-message.warning {
    color: #f59e0b;
}

/* Character counter for text inputs */
.character-counter {
    position: absolute;
    bottom: -20px;
    right: 0;
    font-size: 0.75rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.character-counter.warning {
    color: #f59e0b;
}

.character-counter.danger {
    color: #dc2626;
}

/* Input formatting hints */
.input-hint {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #9ca3af;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-control:focus + .input-hint,
.form-control.has-hint + .input-hint {
    opacity: 1;
}

/* Smart input formatting */
.form-control.currency {
    padding-left: 2rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
    background-size: 1rem 1rem;
}

.form-control.percentage {
    padding-right: 2rem;
}

.form-control.percentage::after {
    content: '%';
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    color: var(--dark-gray);
    font-weight: 500;
}

/* Keyboard navigation helpers */
.keyboard-focus {
    outline: 2px solid var(--claret) !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(92, 5, 26, 0.2) !important;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--claret);
    color: var(--bone);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 100;
    transition: top 0.3s ease;
}

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

/* Form section navigation */
.form-navigation {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-navigation.visible {
    opacity: 1;
    pointer-events: auto;
}

.form-navigation h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    text-align: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    color: var(--dark-gray);
}

.nav-item:hover {
    background: #f3f4f6;
    color: #374151;
}

.nav-item.active {
    background: var(--claret);
    color: var(--bone);
}

.nav-item.completed {
    color: #16a34a;
}

.nav-item.error {
    color: #dc2626;
}

.nav-item i {
    width: 12px;
    text-align: center;
}

/* Progress indicator */
.form-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #e5e7eb;
    z-index: 1001;
}

.form-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--claret), #8b5cf6);
    width: 0%;
    transition: width 0.3s ease;
}

/* Auto-save indicator */
.auto-save-status {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #f3f4f6;
    color: #374151;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid #d1d5db;
}

.auto-save-status.visible {
    opacity: 1;
    transform: translateX(0);
}

.auto-save-status.saving {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.auto-save-status.saved {
    background: #ecfdf5;
    border-color: #16a34a;
    color: #065f46;
}

.auto-save-status.error {
    background: #fef2f2;
    border-color: #dc2626;
    color: #991b1b;
}

/* Keyboard shortcuts help */
.keyboard-shortcuts {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 99;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
    max-width: 250px;
}

.keyboard-shortcuts.visible {
    opacity: 1;
    transform: translateY(0);
}

.keyboard-shortcuts h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.75rem;
    color: var(--dark-gray);
}

.shortcut-key {
    background: #f3f4f6;
    color: #374151;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 0.625rem;
}

/* Mobile usability improvements */
@media (max-width: 768px) {
    .form-navigation {
        display: none;
    }
    
    .keyboard-shortcuts {
        display: none;
    }
    
    .auto-save-status {
        position: static;
        margin: 1rem;
        transform: none;
        opacity: 1;
    }
    
    .form-progress {
        height: 6px;
    }
    
    /* Larger touch targets */
    .form-control {
        min-height: 48px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Better spacing for mobile */
    .form-group {
        margin-bottom: 1.5rem;
    }
}

/* Validation feedback messages */
.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #16a34a;
    font-weight: 500;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #dc2626;
    font-weight: 500;
}

/* Required field glow effect */
.form-control[required]:focus {
    box-shadow: 0 0 0 3px rgba(92, 5, 26, 0.1), 0 0 0 1px var(--claret);
}

/* Form validation animations */
@keyframes field-error {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-control.is-invalid {
    animation: field-error 0.3s ease-in-out;
}

@keyframes field-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.form-control.is-valid {
    animation: field-success 0.3s ease-in-out;
}

/* Date input container */
.date-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.date-input-container input[type="date"] {
    padding-right: 2.5rem;
}

.date-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-gray);
    pointer-events: none;
    z-index: 2;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.date-input-container:hover .date-icon {
    color: var(--claret);
}

.date-input-container input[type="date"]:focus + .date-icon {
    color: var(--claret);
}

/* Ensure date input icon doesn't interfere with native date picker */
.date-input-container input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: relative;
    z-index: 3;
    cursor: pointer;
}

/* Custom date picker styling for better consistency */
.date-input-container input[type="date"] {
    position: relative;
}

.date-input-container input[type="date"]::-webkit-inner-spin-button,
.date-input-container input[type="date"]::-webkit-clear-button {
    display: none;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--claret);
    box-shadow: 0 0 0 3px rgba(92, 5, 26, 0.1);
}

/* Search Container */
.search-container {
    position: relative;
    display: block;
}

.form-group {
    position: relative;
}

/* Selected Contact Display */
.selected-contact-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-details {
    flex: 1;
}

.contact-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #2d5a27;
}

.contact-email {
    font-size: 0.9em;
    color: #3d7c47;
    margin-top: 0.25rem;
}

/* Quote Options */
.quote-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quote-action-item {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.quote-action-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    margin: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 1rem;
    position: relative;
    flex-shrink: 0;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #667eea;
    background-color: #667eea;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.action-content {
    flex: 1;
}

.action-title {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 0.25rem;
}

.action-description {
    font-size: 0.9em;
    color: #666;
}

/* Original PO Document Link */
.po-document-link {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.po-document-link .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.po-document-link .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-icon-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.search-icon-btn:hover {
    color: #5a67d8;
    transform: translateY(-50%) scale(1.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

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

.search-result-item:last-child {
    border-bottom: none;
}

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

.search-result-details {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

/* New Contact Form */
.new-contact-form {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    margin-top: 1rem;
}

.new-contact-form h3 {
    margin-bottom: 1rem;
    color: #495057;
}

/* Items Section */
.items-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.items-header {
    display: grid;
    grid-template-columns: 2fr 1fr 80px 80px 120px 120px 100px 80px;
    gap: 0.75rem;
    background-color: #f8f9fa;
    padding: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    font-size: 0.9rem;
}

.items-header .item-column:nth-child(5) {
    color: #6c757d;
    font-style: italic;
}

.items-header .item-column:nth-child(6) {
    color: #667eea;
    font-weight: 700;
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 80px 80px 120px 120px 100px 80px;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.item-row:last-child {
    border-bottom: none;
}

.item-column {
    font-weight: 500;
    color: #666;
}

.item-product {
    position: relative;
}

.item-product input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.product-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 3px 3px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 999;
    display: none;
}

.product-result-item {
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
}

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

.item-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9rem;
}

.item-input.recommended-price {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    font-style: italic;
    border-color: #e9ecef;
}

.item-input.final-price:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.item-total {
    font-weight: 600;
    text-align: right;
}

.items-footer {
    background-color: #f8f9fa;
    padding: 1rem;
    text-align: center;
}

/* Totals Section */
.totals-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.total-final {
    font-weight: 700;
    font-size: 1.3rem;
    border-top: 2px solid #667eea;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    color: #667eea;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--claret) 0%, var(--off-black) 100%);
    color: var(--bone);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(92, 5, 26, 0.4);
}

.btn-secondary {
    background-color: var(--dark-gray);
    color: white;
    border-color: var(--dark-gray);
}

.btn-secondary:hover {
    background-color: var(--off-black);
    border-color: var(--off-black);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.4);
}

.btn-outline-secondary {
    background-color: transparent;
    color: var(--dark-gray);
    border: 1px solid var(--dark-gray);
}

.btn-outline-secondary:hover {
    background-color: var(--dark-gray);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--claret);
    border: 1px solid var(--claret);
}

.btn-outline-primary:hover {
    background-color: var(--claret);
    color: var(--bone);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(92, 5, 26, 0.4);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.btn-link {
    background: none;
    color: var(--claret);
    border: none;
    text-decoration: underline;
    padding: 0;
    font-size: inherit;
    cursor: pointer;
}

.btn-link:hover {
    color: var(--off-black);
    text-decoration: none;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

/* Success and Warning button styles */
.btn-success {
    background-color: var(--success);
    color: white;
    border-color: var(--success);
}

.btn-success:hover {
    background-color: #15803d;
    border-color: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.4);
}

.btn-warning {
    background-color: var(--warning);
    color: white;
    border-color: var(--warning);
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Icon consistency in buttons */
.btn i {
    font-size: 0.875em;
    line-height: 1;
}

.btn i:first-child {
    margin-right: 0.125rem;
}

.btn i:last-child {
    margin-left: 0.125rem;
}

.btn i:only-child {
    margin: 0;
}

/* Checkbox and Radio */
.checkbox-label, .radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0.75rem;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
}

.checkmark, .radiomark {
    font-weight: 600;
}

/* Existing Quotes Styles */
.existing-quote-item {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease;
}

.existing-quote-item:hover {
    border-color: #667eea;
}

.existing-quote-item.selected {
    border-color: #667eea;
    background-color: #e7f3ff;
}

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

.quote-title {
    font-weight: 600;
    color: #333;
}

.quote-total {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.quote-details {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.quote-date {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.25rem;
}

/* Quote Summary */
#quote-summary {
    margin-bottom: 1.5rem;
}

#quote-summary h4 {
    margin-bottom: 1rem;
    color: #0c5460;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quote-summary-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
    font-size: 0.95rem;
}

.quote-summary-details div {
    padding: 0.25rem 0;
}

.quote-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.quote-summary-header h4 {
    margin: 0;
}

.quote-summary-header .btn {
    white-space: nowrap;
}

/* Submit Section */
.submit-container {
    text-align: center;
    padding: 2rem 0;
}

.submit-container .btn {
    min-width: 200px;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.submit-status {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn.loading {
    pointer-events: none;
}

.btn.loading i {
    animation: spin 1s linear infinite;
}

/* Body padding when fixed header is visible */
body.fixed-header-visible {
    padding-top: 70px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Comparison View Additional Styles */
.quote-section-comparison {
    margin-bottom: 1.5rem;
}

.quote-section-comparison h4 {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.comparison-table {
    width: 100%;
    font-size: 0.75rem;
}

.comparison-table th {
    font-size: 0.7rem;
    padding: 0.5rem 0.25rem;
    background: #f3f4f6;
}

.comparison-table td {
    padding: 0.375rem 0.25rem;
    font-size: 0.75rem;
}

/* Responsive comparison view */
@media (max-width: 1024px) {
    .comparison-view-container.active {
        grid-template-columns: 1fr;
    }
    
    .comparison-column {
        margin-bottom: 1rem;
    }
}

/* Print styles for comparison view */
@media print {
    .comparison-mode-toggle {
        display: none !important;
    }
    
    .comparison-view-container {
        page-break-inside: avoid;
    }
}

/* Sticky totals footer */
.sticky-totals-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-top: 2px solid var(--claret);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sticky-totals-footer.hidden {
    transform: translateY(100%);
}

.sticky-footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 2rem;
    align-items: center;
}

.sticky-totals {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.sticky-total-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sticky-total-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.sticky-total-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--off-black);
    font-feature-settings: 'tnum';
}

.sticky-total-final .sticky-total-value {
    font-size: 1.5rem;
    color: #02744e;
}

.sticky-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sticky-submit-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    min-width: 200px;
    white-space: nowrap;
}

.toggle-footer-btn {
    background: rgba(92, 5, 26, 0.1);
    border: 1px solid var(--claret);
    color: var(--claret);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-footer-btn:hover {
    background: var(--claret);
    color: white;
    transform: scale(1.05);
}

.toggle-footer-btn i {
    transition: transform 0.3s ease;
}

.sticky-totals-footer.hidden .toggle-footer-btn i {
    transform: rotate(180deg);
}

/* Body padding for sticky footer */
body.has-sticky-footer {
    padding-bottom: 120px;
}

@media (max-width: 1024px) {
    .sticky-footer-content {
        grid-template-columns: 1fr auto;
        gap: 1rem;
    }
    
    .sticky-totals {
        gap: 1rem;
    }
    
    .sticky-total-item:not(.sticky-total-final) {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    body.fixed-header-visible {
        padding-top: 60px;
    }

    body.has-sticky-footer {
        padding-bottom: 100px;
    }

    .fixed-header-content {
        padding: 0 16px;
    }

    .header-left span {
        display: none;
    }

    header h1 {
        font-size: 1.875rem;
    }

    .form-section {
        padding: 1.25rem;
        margin-bottom: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Mobile table improvements */
    .table-responsive {
        max-height: 400px;
        border-radius: var(--radius-sm);
    }

    .performer-quote-section .table {
        font-size: 0.75rem;
        min-width: 600px;
    }

    .performer-quote-section .table th {
        padding: 8px 4px;
        font-size: 0.625rem;
    }

    .performer-quote-section .table td {
        padding: 6px 4px;
    }

    .performer-quote-section input.form-control,
    .performer-quote-section select.form-control {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        min-height: 36px;
    }

    /* Sticky totals footer mobile */
    .sticky-footer-content {
        padding: 0.75rem 1rem;
        grid-template-columns: 1fr auto;
        gap: 0.75rem;
    }

    .sticky-totals {
        justify-content: flex-start;
    }

    .sticky-total-label {
        font-size: 0.625rem;
    }

    .sticky-total-value {
        font-size: 1rem;
    }

    .sticky-total-final .sticky-total-value {
        font-size: 1.25rem;
    }

    .sticky-submit-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
        min-width: 150px;
    }

    /* Hide original submit container on mobile when sticky footer is active */
    .submit-container {
        display: none;
    }

    /* Improve mobile totals */
    .totals-container {
        padding: 1rem;
    }

    .totals-container .total-row {
        font-size: 0.875rem;
        padding: 0.5rem 0;
    }

    .totals-container .total-final {
        font-size: 1.25rem;
        padding: 0.75rem 1rem;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

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

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

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

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

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

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

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Quote Items Preview */
.quote-items-preview {
    margin-top: 1rem;
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.quote-items-preview h5 {
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.quote-items-preview .table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.quote-items-preview .table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
    padding: 0.5rem;
}

.quote-items-preview .table td {
    padding: 0.5rem;
    vertical-align: middle;
}

.quote-items-preview code {
    font-size: 0.8rem;
    background-color: #e9ecef;
    color: #495057;
}

/* Edit Loading Overlay */
.edit-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: var(--radius-sm);
}

.loading-content {
    text-align: center;
    padding: 2rem;
}

.loading-content .spinner-border {
    margin-bottom: 1rem;
}

.loading-text {
    margin-top: 1rem;
}

.loading-text strong {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: block;
}

.loading-text small {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Quote Summary needs relative positioning for overlay */
#quote-summary {
    position: relative;
}

/* Item table improvements */
.item-product-id {
    width: 80px !important;
    min-width: 80px;
    max-width: 80px;
}

.item-product-id .product-id-readonly {
    font-size: 0.85rem;
    text-align: center;
}

.item-product {
    width: 250px !important;
    min-width: 250px;
}

.item-code {
    width: 120px !important;
    min-width: 120px;
}

.item-stock {
    width: 80px !important;
    min-width: 80px;
    text-align: center;
}

.product-textarea, .code-textarea {
    resize: none;
    min-height: 40px;
    line-height: 1.3;
    font-size: 0.9rem;
    overflow: hidden;
    height: auto;
}

.product-textarea {
    word-wrap: break-word;
    white-space: normal;
}

.code-textarea {
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
}

/* Remove spinner arrows from number inputs */
.recommended-price {
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

.recommended-price::-webkit-outer-spin-button,
.recommended-price::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Items Container - full width */
.items-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible; /* Allow dropdowns to show */
    position: relative;
}

/* Table responsive wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 500px;
    -webkit-overflow-scrolling: touch;
    position: relative;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-md);
    background: white;
}

/* Ensure sticky headers work properly */
.table-responsive .table {
    margin-bottom: 0;
    position: relative;
}

.table-responsive .table thead th {
    position: sticky;
    top: 0;
    background-color: var(--light-gray);
    z-index: 10;
    border-bottom: 2px solid #e2e8f0;
}

/* Ensure table maintains structure */
.table {
    margin-bottom: 0;
    border-collapse: collapse;
}

.table-sm td, .table-sm th {
    padding: 0.5rem;
}

/* Override Bootstrap form-control widths in table */
#items-table .form-control {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure text-center doesn't affect width */
#items-table td.text-center {
    text-align: center !important;
}

/* Items footer content styling */
.items-footer-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0 0 5px 5px;
}

.po-number-group {
    flex: 1;
    margin-bottom: 0;
    margin-right: 20px;
}

.po-number-group .form-control {
    width: 100%;
}

/* Totals section styling */
.totals-section {
    flex: 0 0 300px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.totals-section .total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.totals-section .total-row:last-child {
    border-bottom: none;
}

.totals-section .total-final {
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid #28a745;
    border-bottom: none;
}

/* Items Table Styling - Bootstrap Table Format */
#items-table {
    margin-bottom: 0;
    width: 100%;
    table-layout: fixed !important;
    min-width: 1070px; /* Ensure minimum width for all columns */
    border-collapse: collapse;
}

/* Reset all table cells to ensure consistent sizing */
#items-table * {
    box-sizing: border-box !important;
}

#items-table tr {
    display: table-row !important;
}

/* Side-by-side View Styles */
.side-by-side-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    background-color: #f5f5f5;
}

.pdf-viewer-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    background-color: #e9ecef;
    border-right: 2px solid #dee2e6;
}

.pdf-viewer-header {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pdf-viewer-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-viewer-header .btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.pdf-viewer-header .btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.pdf-iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    background-color: #ffffff;
    /* Allow user interaction with iframe content */
    pointer-events: auto;
    user-select: auto;
    -webkit-user-select: auto;
}

.form-panel {
    width: 50%;
    overflow-y: auto;
    padding: 20px;
    background-color: #ffffff;
}


/* Ensure form sections look good in side-by-side view */
.form-panel .form-section {
    margin-bottom: 1.5rem;
}

.form-panel header {
    margin-top: 0;
}

/* Adjust container when in side-by-side mode */
body.side-by-side-mode {
    overflow: hidden;
}

body.side-by-side-mode .fixed-header {
    display: none;
}

/* Side-by-side button styling */
#side-by-side-btn {
    margin-left: 0.5rem;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

#side-by-side-btn:hover {
    background-color: #138496;
    border-color: #117a8b;
    transform: translateY(-1px);
}

/* Active state for side-by-side button */
body.side-by-side-mode #side-by-side-btn {
    background-color: #dc3545;
    border-color: #dc3545;
}

body.side-by-side-mode #side-by-side-btn:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Responsive adjustments for side-by-side view */
@media (max-width: 1024px) {
    .pdf-viewer-panel {
        width: 40%;
    }
    
    .form-panel {
        width: 60%;
    }
}

@media (max-width: 768px) {
    .side-by-side-container {
        flex-direction: column;
    }
    
    .pdf-viewer-panel {
        width: 100%;
        height: 40vh;
        border-right: none;
        border-bottom: 2px solid #dee2e6;
    }
    
    .form-panel {
        width: 100%;
        height: 60vh;
    }
}

#items-table td, #items-table th {
    display: table-cell !important;
    position: static !important;
}

#items-table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
    padding: 12px 8px;
    font-size: 0.9rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Force exact column widths */
#items-table th:nth-child(1), 
#items-table td:nth-child(1) { 
    width: 80px !important; 
    max-width: 80px !important; 
    min-width: 80px !important;
}   /* Product ID */

#items-table th:nth-child(2), 
#items-table td:nth-child(2) { 
    width: 150px !important; 
    max-width: 150px !important; 
    min-width: 150px !important;
}  /* Code */

#items-table th:nth-child(3), 
#items-table td:nth-child(3) { 
    width: 300px !important; 
    max-width: 300px !important; 
    min-width: 300px !important;
}  /* Product */

#items-table th:nth-child(4), 
#items-table td:nth-child(4) { 
    width: 70px !important; 
    max-width: 70px !important; 
    min-width: 70px !important;
}   /* Stock */

#items-table th:nth-child(5), 
#items-table td:nth-child(5) { 
    width: 70px !important; 
    max-width: 70px !important; 
    min-width: 70px !important;
}   /* Qty */

#items-table th:nth-child(6), 
#items-table td:nth-child(6) { 
    width: 120px !important; 
    max-width: 120px !important; 
    min-width: 120px !important;
}  /* Recommended */

#items-table th:nth-child(7), 
#items-table td:nth-child(7) { 
    width: 100px !important; 
    max-width: 100px !important; 
    min-width: 100px !important;
}  /* Final Price */

#items-table th:nth-child(8), 
#items-table td:nth-child(8) { 
    width: 100px !important; 
    max-width: 100px !important; 
    min-width: 100px !important;
}  /* Line Total */

#items-table th:nth-child(9), 
#items-table td:nth-child(9) { 
    width: 80px !important; 
    max-width: 80px !important; 
    min-width: 80px !important;
}   /* Actions */

#items-table td {
    padding: 8px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
    overflow: visible; /* Changed to visible for dropdowns */
    box-sizing: border-box;
    position: relative; /* Added for absolute positioned children */
}

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

.item-row td {
    min-height: 80px;
}

/* Final Unit Price styling (renamed from line-total) */
.final-unit-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #28a745;
}

/* New styling for calculated line total */
.calculated-line-total {
    font-size: 0.9rem;
    font-weight: 600;
    color: #28a745;
}

/* Ensure all form controls inside table cells respect column widths */
#items-table td input,
#items-table td textarea,
#items-table td select {
    max-width: 100%;
    box-sizing: border-box;
}

/* Product code textarea specific styling */
#items-table td:nth-child(2) textarea {
    width: 100%;
    max-width: 134px; /* 150px - 16px padding */
}

/* Product search textarea specific styling */
#items-table td:nth-child(3) textarea {
    width: calc(100% - 40px); /* Account for search button */
    max-width: calc(284px - 40px); /* 300px - 16px padding - button */
}

/* Quantity input specific styling */
#items-table td:nth-child(5) input {
    width: 100%;
    max-width: 54px; /* 70px - 16px padding */
}

/* Prevent flex containers from expanding beyond cell width */
#items-table td .product-search-container {
    max-width: 284px; /* 300px - 16px padding */
}

#items-table td .recommended-price-display {
    max-width: 104px; /* 120px - 16px padding */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product code display styling */
.product-code-display {
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    color: #495057;
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 2px;
}

/* Product name display styling */
.product-name-display {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #495057;
    word-wrap: break-word;
}

/* Product search container with button */
.product-search-container {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: visible; /* Changed from hidden to visible for dropdown */
}

.product-search-input {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
    min-height: 70px;
    line-height: 1.4;
    max-width: 250px;
}

.search-btn {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 0.8rem;
    margin-top: 2px;
    align-self: center;
}

.search-btn:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Product code field styling */
.product-code-field {
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    min-height: 50px;
    line-height: 1.4;
    width: 100%;
    max-width: 140px;
}

/* Recommended price display */
.recommended-price-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px;
    background-color: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    min-height: 50px;
    justify-content: center;
}

.price-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 4px;
    text-align: center;
}

.price-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

/* Product code styling */
.product-code {
    font-size: 0.75rem;
    background-color: #e9ecef;
    color: #495057;
    padding: 1px 3px;
    border-radius: 2px;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Stock level styling */
.stock-level {
    color: #495057;
    font-size: 0.8rem;
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #f8f9fa;
    min-width: 50px;
    text-align: center;
}

/* Product search results positioning for table */
.product-search-results {
    position: fixed; /* Changed from absolute to fixed */
    z-index: 9999;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none; /* Hidden by default */
    min-width: 300px;
}

/* Table cell specific sizing */
#items-table .form-control-sm {
    font-size: 0.8rem;
    padding: 3px 6px;
}

#items-table td small {
    font-size: 0.75rem;
}

/* Performer Quote Specific Styles */
.performer-quote-section {
    margin-bottom: 2rem;
}

.performer-quote-section .table {
    margin-bottom: 0;
    font-size: 0.875rem;
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.performer-quote-section .table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 600;
    color: #475569;
    border-top: 1px solid #e2e8f0;
    border-bottom: 3px solid var(--claret);
    padding: 16px 12px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 15;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

.performer-quote-section .table th:first-child {
    border-left: 1px solid #e2e8f0;
    border-top-left-radius: 0.5rem;
}

.performer-quote-section .table th:last-child {
    border-right: 1px solid #e2e8f0;
    border-top-right-radius: 0.5rem;
}

.performer-quote-section .table td {
    padding: 12px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    border-left: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

/* Zebra striping for better readability */
.performer-quote-section .table tbody tr:nth-child(even) {
    background-color: var(--light-gray);
}

.performer-quote-section .table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Enhanced hover effects with zebra striping preservation */
.performer-quote-section .table-hover tbody tr:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 0.25rem;
}

.performer-quote-section .table-hover tbody tr:hover td {
    border-color: #bae6fd;
}

/* Row highlight animation */
@keyframes row-highlight {
    0% { background-color: #fef3c7; }
    100% { background-color: inherit; }
}

.performer-quote-section .table tbody tr.row-updated {
    animation: row-highlight 1s ease-out;
}

/* Sticky header improvements for scrolling tables */
.table-responsive {
    border-radius: var(--radius-lg);
    border: 1px solid var(--medium-gray);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background: white;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    position: relative;
}

.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Enhanced sticky header shadow on scroll */
.table-responsive.scrolled .table thead th {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    border-bottom: 3px solid var(--claret);
}

/* Row number indicator for large tables */
.performer-quote-section .table tbody tr::before {
    content: counter(row-counter);
    counter-increment: row-counter;
    position: absolute;
    left: -30px;
    width: 24px;
    height: 24px;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.performer-quote-section .table tbody {
    counter-reset: row-counter;
}

.performer-quote-section .table:hover tbody tr::before {
    opacity: 1;
}

/* Improved focus states for table inputs */
.performer-quote-section .table input:focus,
.performer-quote-section .table select:focus {
    box-shadow: 0 0 0 3px rgba(92, 5, 26, 0.15);
    border-color: var(--claret);
    background-color: #fefefe;
    transform: scale(1.02);
    z-index: 5;
    position: relative;
}

/* Visual separator between sections */
.performer-quote-section .table tbody tr:last-child td {
    border-bottom: 2px solid #e2e8f0;
}

/* Loading state for tables */
.table-loading {
    position: relative;
    overflow: hidden;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

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

/* Section footer styling */
.section-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--light-gray);
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    margin: 0 -2rem -2rem -2rem;
}

.section-footer .subtotal {
    font-weight: 600;
    color: #000000;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Add Item Button Styling */
.add-row-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px dashed #cbd5e1;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    color: #64748b;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    min-height: 56px;
}

.add-row-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(92, 5, 26, 0.1), transparent);
    transition: left 0.5s ease;
}

.add-row-btn:hover {
    border-color: var(--claret);
    background: linear-gradient(135deg, rgba(92, 5, 26, 0.05), rgba(92, 5, 26, 0.02));
    color: var(--claret);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 5, 26, 0.15);
}

.add-row-btn:hover::before {
    left: 100%;
}

.add-row-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(92, 5, 26, 0.1);
}

.add-row-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.add-row-btn:hover i {
    transform: scale(1.1);
}

/* Calculated fields styling */
.calculated-field {
    font-weight: 600;
    color: #28a745;
    text-align: right;
}

/* Input styling within tables */
.performer-quote-section input.form-control,
.performer-quote-section select.form-control,
.form-control {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid #d1d5db;
    transition: all 0.15s ease-in-out;
    background-color: white;
    min-height: 40px;
}

@media (min-width: 768px) {
    .performer-quote-section input.form-control,
    .performer-quote-section select.form-control,
    .form-control {
        font-size: 1rem;
    }
}

/* Make quantity and price inputs smaller but still accessible */
.performer-quote-section input[data-column="qty"],
.performer-quote-section input[data-column="unitPrice"],
.performer-quote-section input[data-column="noOfStaff"],
.performer-quote-section input[data-column="totalDays"] {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    text-align: center;
    min-height: 40px;
}

/* Make description fields larger and more readable */
.performer-quote-section input[data-column="description"] {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 40px;
}

/* Calculated fields styling with enhanced visual cues */
.calculated-field {
    font-weight: 600;
    color: #059669;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    text-align: right;
    display: inline-block;
    min-width: 80px;
    border: 1px solid #bbf7d0;
    position: relative;
    transition: all 0.3s ease;
    font-feature-settings: 'tnum';
}

.calculated-field::before {
    content: '\f1ec'; /* Calculator icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -8px;
    right: -8px;
    background: #059669;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.calculated-field:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* Calculation in progress state */
.calculated-field.calculating {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    color: #92400e;
    border-color: #fbbf24;
    animation: calculation-pulse 1s ease-in-out infinite;
}

.calculated-field.calculating::before {
    content: '\f110'; /* Spinner icon */
    animation: spin 1s linear infinite;
    opacity: 1;
    transform: scale(1);
    background: #f59e0b;
}

/* Calculation updated state */
.calculated-field.updated {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-color: #3b82f6;
    animation: calculation-updated 0.8s ease-out;
}

.calculated-field.updated::before {
    content: '\f00c'; /* Check icon */
    background: #3b82f6;
    opacity: 1;
    transform: scale(1);
    animation: bounce-check 0.5s ease-out;
}

@keyframes calculation-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
}

@keyframes calculation-updated {
    0% { transform: scale(1.1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce-check {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(180deg); }
}

/* Input field calculation dependencies */
.calculation-input {
    position: relative;
}

.calculation-input::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3px;
    background: #10b981;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0.375rem 0.375rem 0;
}

.calculation-input:focus-within::after,
.calculation-input.has-value::after {
    opacity: 1;
}

/* Calculation flow indicators */
.calculation-flow-indicator {
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 12px solid #10b981;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calculation-input:focus-within + .calculation-flow-indicator,
.calculation-input.has-value + .calculation-flow-indicator {
    opacity: 1;
    animation: flow-pulse 2s ease-in-out infinite;
}

@keyframes flow-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Smart calculation tooltips */
.calculation-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
    margin-bottom: 0.5rem;
}

.calculation-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1f2937;
}

.calculated-field:hover .calculation-tooltip {
    opacity: 1;
}

/* Auto-calculation status indicator */
.auto-calc-status {
    position: fixed;
    bottom: 140px;
    right: 20px;
    background: #065f46;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auto-calc-status.visible {
    opacity: 1;
    transform: translateX(0);
}

.auto-calc-status.calculating {
    background: #f59e0b;
    animation: status-pulse 1.5s ease-in-out infinite;
}

.auto-calc-status.error {
    background: #dc2626;
}

.auto-calc-status i {
    font-size: 1rem;
}

@keyframes status-pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4); }
}

/* Formula preview on hover */
.formula-preview {
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    background: #f8fafc;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    font-size: 0.75rem;
    color: #475569;
    font-family: Arial, sans-serif;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 15;
    pointer-events: none;
}

.calculated-field:hover .formula-preview {
    opacity: 1;
    transform: translateY(0);
}

/* Real-time calculation feedback */
.calculation-feedback {
    position: absolute;
    top: -25px;
    right: 0;
    background: #059669;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    z-index: 10;
}

.calculation-feedback.show {
    opacity: 1;
    transform: scale(1);
}

.calculation-feedback::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 8px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #059669;
}

.performer-quote-section input.form-control:focus,
.performer-quote-section select.form-control:focus,
.form-control:focus {
    border-color: var(--claret);
    box-shadow: 0 0 0 3px rgba(92, 5, 26, 0.1);
    outline: 0;
}

/* Quote information section grid layout */
.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* Statutory fringes specific styling */
.labour-fringes-table .table th,
.labour-fringes-table .table td {
    font-family: Arial, sans-serif;
    vertical-align: middle;
}

/* Column 2: CODE - center aligned */
.labour-fringes-table .table td:nth-child(2),
.labour-fringes-table .table th:nth-child(2) {
    text-align: center;
}

/* Column 3: DESCRIPTION - left aligned (default) */
.labour-fringes-table .table td:nth-child(3),
.labour-fringes-table .table th:nth-child(3) {
    text-align: left;
}

/* Column 4: RATE - center aligned */
.labour-fringes-table .table td:nth-child(4),
.labour-fringes-table .table th:nth-child(4) {
    text-align: center;
}

/* Columns 5-6: FRINGED FEES and TOTAL - right aligned */
.labour-fringes-table .table td:nth-child(5),
.labour-fringes-table .table th:nth-child(5),
.labour-fringes-table .table td:nth-child(6),
.labour-fringes-table .table th:nth-child(6) {
    text-align: right;
}

/* Totals container styling */
.totals-container {
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.totals-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--claret), #8b5cf6);
}

.totals-container .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid #e2e8f0;
}

.totals-container .total-row:last-child {
    border-bottom: none;
}

.totals-container .total-row span:last-child {
    font-weight: 600;
    color: #1f2937;
    font-feature-settings: 'tnum';
}

.totals-container .total-final {
    font-weight: 700;
    font-size: 1.5rem;
    color: #02744e;
    border-top: 2px solid #02744e;
    margin-top: 0.75rem;
    padding-top: 1rem;
    background-color: rgba(2, 116, 78, 0.05);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-radius: 0 0 0.75rem 0.75rem;
}

.totals-container .total-final span:last-child {
    color: #02744e;
    font-weight: 700;
}

/* Row action buttons container */
.row-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

/* Common styles for row action buttons */
.btn-row-action {
    padding: 0;
    font-size: 0.875rem;
    min-width: 32px;
    min-height: 32px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid;
    background-color: #fff;
    cursor: pointer;
}

/* Remove row button styling */
.btn-danger.btn-sm {
    border-color: #dc3545;
    color: #dc3545;
}

/* Duplicate row button styling */
.btn-duplicate {
    border-color: #0ea5e9;
    color: #0ea5e9;
}

.btn-danger.btn-sm:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.btn-danger.btn-sm:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

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

.btn-danger.btn-sm i {
    transition: transform 0.2s ease;
}

.btn-danger.btn-sm:hover i {
    transform: rotate(10deg);
}

/* Duplicate button hover states */
.btn-duplicate:hover {
    background-color: #0ea5e9;
    border-color: #0ea5e9;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.btn-duplicate:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3);
}

.btn-duplicate:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
    outline: none;
}

.btn-duplicate i {
    transition: transform 0.2s ease;
}

.btn-duplicate:hover i {
    transform: scale(1.2);
}

/* Enhanced tooltip styling for delete buttons */
.btn-danger.btn-sm[title] {
    position: relative;
}

.btn-danger.btn-sm[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #1f2937;
    z-index: 1001;
    margin-bottom: 0.15rem;
}

.btn-danger.btn-sm[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: tooltip-appear 0.2s ease-out;
}

@keyframes tooltip-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Category dropdown styling */
.performer-quote-section select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Success details styling */
.success-details {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    text-align: left;
}

.success-details p {
    margin-bottom: 0.5rem;
}

.success-details p:last-child {
    margin-bottom: 0;
}

/* Navigation Section Styles */
.navigation-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.nav-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

.nav-card h3 {
    color: var(--claret);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.nav-card p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.nav-actions {
    margin-top: 1rem;
}

.current-page {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Modal Styles for Item Selection */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    color: var(--claret);
    font-size: 1.3rem;
}

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

.btn-close:hover {
    background-color: #e9ecef;
    color: #495057;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.item-selection-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.item-option {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
}

.item-option:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.item-option.custom-item {
    border: 2px dashed #6c757d;
    background-color: #f8f9fa;
}

.item-option.custom-item:hover {
    border-color: #667eea;
    background-color: #e7f3ff;
}

.item-info {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    align-items: center;
}

.item-info .item-code {
    font-family: Arial, sans-serif;
    font-weight: 600;
    background-color: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
}

.item-info .item-description {
    font-weight: 500;
    color: #495057;
}

.item-info .item-price {
    font-weight: 600;
    color: #28a745;
    font-size: 0.9rem;
}

.item-code {
    background-color: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
}

/* Responsive adjustments for performer quote */
@media (max-width: 768px) {
    .navigation-section {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .nav-card {
        padding: 1rem;
    }
    
    .nav-card h3 {
        font-size: 1.1rem;
    }
    
    .form-row-3 {
        grid-template-columns: 1fr;
    }
    
    .section-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .performer-quote-section .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .performer-quote-section .table {
        min-width: 700px;
    }
    
    .totals-container {
        padding: 1rem;
    }
    
    .totals-container .total-row {
        font-size: 1rem;
    }
    
    .totals-container .total-final {
        font-size: 1.2rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .item-info {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
        gap: 0.5rem;
    }
    
    .item-info .item-price {
        grid-column: 1 / -1;
        text-align: left;
    }
}

/* VISUAL POLISH ENHANCEMENTS */

/* Add subtle shimmer animation to buttons */
.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;
    pointer-events: none;
}

.btn:hover::before {
    left: 100%;
}

/* Enhanced focus states for accessibility */
.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(92, 5, 26, 0.3);
}

.btn-outline-primary:focus {
    box-shadow: 0 0 0 3px rgba(92, 5, 26, 0.2);
}

.btn-danger:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
}

.btn-success:focus {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.3);
}

.btn-warning:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

/* Enhanced table styling with brand colors */
.table {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--medium-gray);
}

.table th {
    background: linear-gradient(135deg, var(--light-gray), #f1f5f9);
    color: var(--off-black);
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-bottom: 2px solid var(--medium-gray);
}

/* Modal enhancements with brand colors */
.modal-content {
    border-radius: var(--radius-lg);
    border: 1px solid var(--medium-gray);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, var(--claret), var(--off-black));
    color: var(--bone);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header .btn-close {
    color: var(--bone);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

/* Card enhancements */
.nav-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--medium-gray);
    transition: all 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(92, 5, 26, 0.15);
    border-color: var(--claret);
}

/* Toast notification enhancements */
.toast {
    border-radius: var(--radius-md);
    border: 1px solid var(--medium-gray);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toast.success {
    border-color: var(--success);
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.toast.error {
    border-color: var(--danger);
    background: linear-gradient(135deg, #fef2f2, #fefefe);
}

.toast.warning {
    border-color: var(--warning);
    background: linear-gradient(135deg, #fffbeb, #fefefe);
}

/* Consistent icon sizing and spacing */
i.fas, i.far, i.fab {
    width: 1em;
    text-align: center;
    vertical-align: middle;
}

/* Loading state improvements */
.loading-overlay {
    background: rgba(248, 250, 252, 0.95);
    border-radius: var(--radius-md);
}

.loading-spinner {
    border-color: var(--medium-gray);
    border-top-color: var(--claret);
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeInUp 0.5s ease-out;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }
.form-section:nth-child(5) { animation-delay: 0.5s; }

/* Form control focus enhancement */
.form-control:focus {
    outline: none;
    border-color: var(--claret);
    box-shadow: 0 0 0 3px rgba(92, 5, 26, 0.1);
}

/* Enhanced Comment System Styles */

/* Comment Thread Display */
.comment-thread {
    margin-bottom: 1rem;
    border-left: 3px solid var(--medium-gray);
    padding-left: 1rem;
}

.comment-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    position: relative;
    max-width: 90%;
}

.comment-message.client-comment {
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
    border: 1px solid #bae6fd;
    margin-left: 0;
    margin-right: auto;
}

.comment-message.admin-comment {
    background: linear-gradient(135deg, #f3e8ff, #faf5ff);
    border: 1px solid #d8b4fe;
    margin-left: auto;
    margin-right: 0;
}

/* Enhanced threading visual flow */
.comment-message.client-comment::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 15px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid #bae6fd;
}

.comment-message.admin-comment::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 15px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #d8b4fe;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0.8;
}

.comment-meta i {
    font-size: 0.75rem;
}

.comment-time {
    margin-left: auto;
    font-weight: 400;
    font-size: 0.75rem;
    opacity: 0.6;
}

.comment-text {
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--off-black);
}

/* Field Comment Buttons */
.field-comment-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid var(--medium-gray);
    background: white;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.field-comment-btn:hover {
    background: var(--light-gray);
    border-color: var(--claret);
}

.field-comment-btn.has-comment {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
    font-weight: 500;
}

.field-comment-btn.has-comment:hover {
    background: #15803d;
    border-color: #15803d;
    transform: scale(1.05);
}

/* Field Comment Container */
.field-comment-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background: white;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 0.25rem;
    max-width: 500px;
}

.field-comment-container.field-comment-hidden {
    display: none;
}

.field-comment-container.field-comment-visible {
    display: block;
}

.field-comment-content {
    padding: 1rem;
}

/* General Comments Section */
.general-comments-section {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.general-comments-section .section-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.general-comments-section .section-header h3 {
    color: var(--claret);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.general-comments-section .section-header p {
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.general-comment-container {
    max-width: 800px;
    margin: 0 auto;
}

.general-comment-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.general-comment-textarea:focus {
    outline: none;
    border-color: var(--claret);
    box-shadow: 0 0 0 3px rgba(92, 5, 26, 0.1);
}

/* Comment Actions */
.comment-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.comment-actions .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Row Comments Enhanced */
.comment-row-visible {
    background: var(--light-gray);
    display: table-row;
}

.comment-row-hidden {
    display: none !important;
    height: 0 !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.comment-row-hidden * {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.comment-cell {
    background: white !important;
    border-top: 2px solid var(--claret);
}

.comment-container {
    margin: 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
}

.comment-header {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    color: #1e40af;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.comment-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.close-comment-btn {
    background: rgba(30, 64, 175, 0.15);
    border: 1px solid rgba(30, 64, 175, 0.3);
    color: #1e40af;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.close-comment-btn:hover {
    background: rgba(30, 64, 175, 0.25);
    border-color: rgba(30, 64, 175, 0.5);
    transform: scale(1.05);
}

.comment-content {
    padding: 1rem;
}

.new-comment-section {
    border-top: 1px solid var(--medium-gray);
    padding-top: 1rem;
    margin-top: 1rem;
}

.new-comment-section:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.comment-textarea, .field-comment-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.comment-textarea:focus, .field-comment-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Comment Button Indicators */
.comment-toggle-btn.has-comment {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
    font-weight: 500;
}

.comment-toggle-btn.has-comment:hover {
    background: #15803d;
    border-color: #15803d;
    transform: scale(1.05);
}

.comment-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3);
}

/* Responsive Design for Comments */
@media (max-width: 768px) {
    .field-comment-container {
        position: fixed;
        top: 50%;
        left: 1rem;
        right: 1rem;
        transform: translateY(-50%);
        max-width: none;
        z-index: 1000;
    }
    
    .field-comment-container::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    .general-comments-section {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .comment-actions {
        flex-direction: column;
    }
    
    .comment-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Row highlighting for comments */
.row-has-comment {
    background-color: #fefce8 !important; /* Light yellow background */
    border-left: 3px solid #eab308 !important; /* Yellow left border */
    color: #92400e !important; /* Dark yellow/brown text for contrast */
}

.row-has-comment:hover {
    background-color: #fef3c7 !important; /* Slightly darker yellow on hover */
}

.row-has-comment input,
.row-has-comment select,
.row-has-comment textarea {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-color: #eab308 !important;
    color: #374151 !important; /* Dark gray text in form fields */
}

.row-has-comment input:focus,
.row-has-comment select:focus,
.row-has-comment textarea:focus {
    background-color: white !important;
    border-color: #d97706 !important;
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2) !important;
}

/* Navigation and Workflow Styling */
.nav-card.featured {
    border: 2px solid var(--claret);
    background: linear-gradient(135deg, #fef7ff, #f3e8ff);
}

.workflow-info {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md);
    padding: 2rem;
    margin: 2rem 0;
}

.workflow-info h3 {
    color: #0369a1;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step-number {
    background: var(--claret);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    color: #374151;
}

.step-content p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}

.admin-workflow-info {
    background: linear-gradient(135deg, #fff3e0, #ffcc80);
    border: 2px solid #f57c00;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
}

.workflow-step-info h4 {
    color: #e65100;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workflow-step-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.workflow-step-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: #92400e;
}

.workflow-step-info li i {
    color: #f57c00;
    width: 1rem;
}

/* PaloPay Discount Section Styles */
.section-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.discount-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.discount-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--off-black);
    margin: 0;
    white-space: nowrap;
}

.discount-label i {
    color: var(--claret);
    font-size: 0.875rem;
}

.discount-input-group {
    display: flex;
    align-items: center;
    position: relative;
}

.discount-input {
    width: 80px;
    text-align: center;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.discount-input:focus {
    border-color: var(--claret);
    box-shadow: 0 0 0 2px rgba(92, 5, 26, 0.1);
    outline: none;
}

.discount-suffix {
    margin-left: 0.375rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.subtotal-section {
    text-align: right;
    min-width: 200px;
}

.subtotal-row, .discount-row, .subtotal-final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.95rem;
}

.subtotal-row {
    color: var(--dark-gray);
    border-bottom: 1px solid var(--medium-gray);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.discount-row {
    color: var(--claret);
    font-weight: 500;
    font-style: italic;
}

.subtotal-final {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--off-black);
    border-top: 2px solid var(--claret);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

/* Responsive adjustments for discount section */
@media (max-width: 768px) {
    .section-footer-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .discount-section {
        justify-content: center;
        width: 100%;
    }
    
    .subtotal-section {
        width: 100%;
        text-align: center;
    }
    
    .subtotal-row, .discount-row, .subtotal-final {
        justify-content: center;
        gap: 1rem;
    }
}

/* Accept & Sign Modal Styles */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-backdrop {
    backdrop-filter: blur(4px);
}

.accept-sign-modal {
    font-family: inherit;
}

.accept-sign-modal .modal-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accept-sign-modal .close-modal-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.terms-content {
    border-left: 4px solid #059669;
}

.terms-content p {
    margin-bottom: 1rem;
}

.terms-content p:last-child {
    margin-bottom: 0;
}

.terms-checkbox {
    user-select: none;
}

.terms-checkbox input:checked + span {
    color: #059669;
    font-weight: 500;
}

.signature-canvas-container canvas {
    border-radius: 0.5rem;
}

.signature-field input:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    outline: none;
}

.signature-info {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Signature confirmation styles */
.signature-confirmation {
    animation: successSlideIn 0.6s ease-out;
}

@keyframes successSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Readonly styles for signed quotes */
.readonly-field {
    background-color: #f8fafc !important;
    color: #6b7280 !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed;
}

/* Mobile responsive adjustments for modal */
@media (max-width: 768px) {
    .accept-sign-modal {
        margin: 0.5rem;
        max-width: none;
        width: calc(100% - 1rem);
    }
    
    .accept-sign-modal .modal-body {
        padding: 1.5rem;
    }
    
    .signature-canvas-container canvas {
        width: 100%;
        height: 150px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-footer .action-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .terms-content {
        max-height: 150px;
    }
}

/* Status banner updates for signed quotes */
.quote-status-banner.status-signed {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #059669;
}

.quote-status-banner.status-signed i {
    color: #d1fae5;
}

/* Accept & Sign button styling */
#accept-sign-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

#accept-sign-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

#accept-sign-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Management Section Styles */
.management-section {
    background: white;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.management-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .management-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.management-card {
    background: white;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.management-card:hover {
    border-color: var(--info);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.management-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.management-header h3 {
    color: var(--off-black);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.management-header h3 i {
    color: var(--info);
    font-size: 1.1rem;
}

.management-header p {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin: 0;
}

.management-content {
    padding: 0;
}

.link-button {
    border: none;
    background: none;
    color: var(--info);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.link-button:focus-visible {
    outline: 2px solid var(--info);
    outline-offset: 2px;
}

.quote-parser-dropzone {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    border: 2px dashed var(--medium-gray);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: #f8fafc;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.quote-parser-dropzone:focus-visible,
.quote-parser-dropzone.is-active {
    border-color: var(--info);
    background: #eef2ff;
}

.quote-parser-dropzone.has-file {
    border-color: var(--success);
    background: #ecfdf5;
}

.quote-parser-dropzone .dropzone-icon {
    font-size: 2.5rem;
    color: var(--info);
}

.quote-parser-dropzone.has-file .dropzone-icon {
    color: var(--success);
}

.quote-parser-dropzone .dropzone-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--off-black);
}

.quote-parser-dropzone .dropzone-copy strong {
    font-size: 1rem;
}

.quote-parser-dropzone .dropzone-copy span {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.quote-parser-dropzone .dropzone-copy small {
    color: var(--dark-gray);
    font-size: 0.8rem;
}

.quote-parser-progress {
    margin-top: 1rem;
    background: #f9fafb;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.quote-parser-progress .progress-bar {
    width: 100%;
    height: 0.75rem;
    border-radius: var(--radius-md);
    background: #e5e7eb;
    overflow: hidden;
}

.quote-parser-progress .progress-value {
    display: block;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    transition: width 0.2s ease;
}

.quote-parser-progress .progress-copy {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.quote-parser-preview {
    margin-top: 1.5rem;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-lg);
    background: #111827;
    color: #f9fafb;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quote-parser-preview .preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
}

.quote-parser-preview .btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.quote-parser-json {
    max-height: 300px;
    overflow: auto;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.85rem;
    background: #0f172a;
    padding: 0.75rem;
    border-radius: var(--radius-md);
}

.quote-parser-preview .preview-meta {
    font-size: 0.85rem;
    color: #d1d5db;
    line-height: 1.4;
}

.quote-parser-preview .preview-meta code {
    background: rgba(59, 130, 246, 0.2);
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-sm);
    color: #bfdbfe;
}

.quote-parser-preview .preview-meta ul {
    margin: 0.5rem 0 0;
    padding-left: 1rem;
}

.quote-parser-preview .preview-meta li {
    margin-bottom: 0.25rem;
}

.quote-parser-preview .preview-meta li:last-child {
    margin-bottom: 0;
}

.management-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.management-form .form-group {
    margin-bottom: 0;
}

.management-form .form-group label {
    font-weight: 600;
    color: var(--off-black);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.management-form .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.management-form .form-control:focus {
    outline: none;
    border-color: var(--info);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.management-form .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.management-form .btn-primary {
    background: linear-gradient(135deg, var(--info), #1d4ed8);
    border: none;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.management-form .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.management-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.status-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.status-message.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-message.loading {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
