/* =====================================================
 * PRICING TOOL - BLUEPRINT NOIR THEME (FORM EDITION)
 * Matches Landing Page & Video Thumbnail Aesthetic
 * ===================================================== */

/* ===== SHARED VARIABLES & FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Public+Sans:wght@300;400;600&family=Rajdhani:wght@500;600;700&display=swap');

:root {
    /* Palette: Blueprint Noir */
    --bg-depth: #0B0E11;      /* Deepest background (body) */
    --bg-surface: #151920;    /* Form sections */
    --bg-card: #1A1F26;       /* Interactive elements */
    --bg-input: #0f1216;      /* Input fields */

    --accent-copper: #D4A574;
    --accent-copper-dim: #8a6b4b;
    --accent-copper-glow: rgba(212, 165, 116, 0.15);
    --accent-copper-border: rgba(212, 165, 116, 0.3);

    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #4B5563;
    --text-highlight: #D4A574;

    --grid-line: rgba(212, 165, 116, 0.08);
    --border-tech: rgba(212, 165, 116, 0.2);

    --success: #10B981;
    --error: #EF4444;

    /* Typography */
    --font-display: 'Rajdhani', sans-serif;
    --font-body: 'Public Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 2px;  /* Sharp, technical corners */
    --radius-md: 4px;
    --radius-lg: 6px;
}

/* ===== BASE FORM LAYOUT ===== */
.form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    font-family: var(--font-body);
    color: var(--text-primary);
}

/* Section Cards - Inner sections without borders (form-container has the main border) */
.form-section {
    background: transparent;
    padding: 2rem; /* Desktop: 2rem all sides for consistency */
    margin-bottom: 2rem;
    position: relative;
}

.form-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px dashed var(--border-tech);
    padding-bottom: 1rem;
}

.form-section-title {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Technical prefix for titles */
.form-section-title::before {
    content: '//';
    color: var(--accent-copper);
    font-family: var(--font-mono);
    font-size: 0.8em;
    opacity: 0.7;
}

/* ===== INPUTS & FIELDS ===== */
.form-grid {
    display: grid;
    gap: 1.5rem;
}

.form-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.form-col-span-2 {
    grid-column: span 2;
}

.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-tech);
    color: var(--text-primary);
    font-family: var(--font-mono); /* Technical font for data entry */
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-copper);
    box-shadow: 0 0 15px var(--accent-copper-glow);
    background: var(--bg-card);
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-style: dashed;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ===== BUTTONS (Blueprint Style) ===== */
.form-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.form-btn-primary {
    background: linear-gradient(135deg, var(--accent-copper) 0%, var(--accent-copper-dim) 100%);
    color: #000;
    border: 1px solid var(--accent-copper);
}

.form-btn-primary:hover {
    box-shadow: 0 0 15px var(--accent-copper-glow);
    transform: translateY(-1px);
}

.form-btn-secondary {
    background: transparent;
    border: 1px solid var(--border-tech);
    color: var(--accent-copper);
}

.form-btn-secondary:hover {
    background: var(--accent-copper-glow);
    border-color: var(--accent-copper);
}

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

/* ===== AUTOCOMPLETE ===== */
.autocomplete-results {
    background: var(--bg-card);
    border: 1px solid var(--accent-copper);
    border-top: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    /* ... positioning styles from original ... */
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-tech);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--accent-copper-glow);
    color: var(--text-primary);
}

/* ===== CALCULATION SUMMARY (Thumbnail Style) ===== */
/* This matches the .video-thumbnail-ui style */

.data-card {
    background: var(--bg-depth);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-md);
    overflow: visible; /* Allow dropdowns to extend beyond card */
}

.data-card-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-tech);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
}

.data-card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-copper);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.summary-panel-content {
    padding: 2rem; /* Desktop: consistent with form-section */
    /* The Grid Pattern from the Thumbnail */
    background-image: radial-gradient(var(--grid-line) 1px, transparent 1px);
    background-size: 20px 20px;
}

.calculation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-tech);
}

.calculation-label,
.calculation-label-strong,
.calculation-label-total,
.calculation-label-muted {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.calculation-label-strong {
    color: var(--text-primary);
    font-weight: 600;
}

.calculation-label-total {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-copper);
    text-transform: uppercase;
}

.calculation-value,
.calculation-value-strong,
.calculation-value-total,
.calculation-value-muted {
    font-family: var(--font-mono);
    text-align: right;
}

.calculation-value {
    color: var(--text-primary);
}

.calculation-value-strong {
    color: var(--text-highlight);
    font-weight: 600;
}

.calculation-value-total {
    color: var(--accent-copper);
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--accent-copper-glow);
}

.calculation-separator {
    height: 1px;
    background: var(--accent-copper);
    opacity: 0.3;
    margin: 1rem 0;
}

/* Editable Inputs in Calculation */
.input-with-unit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-tech);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.input-with-unit .form-input {
    border: none;
    background: transparent;
    padding: 0.2rem;
    text-align: right;
    width: 80px;
}

.input-with-unit .form-input:focus {
    box-shadow: none;
}

.input-unit {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ===== CATEGORIES & LINE ITEMS ===== */
.categories-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Line Item styling hooks to ensure they match */
.line-item-grid {
    background: var(--bg-depth);
    border: 1px solid var(--border-tech);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.line-item-grid:hover {
    border-color: var(--accent-copper-dim);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .form-col-span-2 {
        grid-column: span 1;
    }

    .form-section {
        padding: 1.5rem;
    }

    .calculation-label-total {
        font-size: 1rem;
    }

    .calculation-value-total {
        font-size: 1.2rem;
    }

    .form-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== UTILITIES & ERRORS ===== */
.form-errors {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-sm);
}

.form-errors-title {
    color: var(--error);
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.form-errors-text {
    color: #FCA5A5;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 0.5rem 0;
}

.form-errors-list {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0.5rem 0 0 0;
    color: #FCA5A5;
    font-size: 0.85rem;
    line-height: 1.6;
}

.form-errors-item {
    margin-bottom: 0.25rem;
}

.form-actions-right {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-tech);
    padding-top: 2rem;
    padding-bottom: 2rem; /* Space at bottom of form */
}

.form-field-spaced {
    margin-top: 2rem;
}

/* ===== ESTIMATES INDEX TABLE STYLES ===== */

/* Client Information Display */
.client-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.client-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.client-address {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Amount/Currency Display */
.amount-value {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--accent-copper);
    text-align: right;
    white-space: nowrap;
}

/* Actions Menu (Three Dots Dropdown) */
.actions-menu {
    position: relative;
    display: inline-block;
}

.actions-trigger {
    background: transparent;
    border: 1px solid var(--border-tech);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.actions-trigger:hover {
    background: var(--accent-copper-glow);
    border-color: var(--accent-copper);
    color: var(--text-primary);
}

.actions-trigger svg {
    width: 1.25rem;
    height: 1.25rem;
}

.actions-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Higher z-index to appear above everything */
    overflow: hidden;
}

.actions-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(212, 165, 116, 0.1);
}

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

.actions-dropdown-item:hover {
    background: var(--accent-copper-glow);
    color: var(--accent-copper);
}

.actions-dropdown-item-danger {
    color: var(--error);
}

.actions-dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #FCA5A5;
}

.dropdown-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

/* ===== AUTOCOMPLETE DROPDOWN ===== */

.autocomplete-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 0.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    max-height: 16rem;
    overflow-y: auto;
}

.autocomplete-results-visible {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-tech);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.autocomplete-item:hover,
.autocomplete-item-selected {
    background: var(--accent-copper-glow);
    color: var(--text-primary);
}

/* ===== CATEGORY COMPONENTS ===== */

.form-section-padded {
    padding: 2.5rem;
}

.category-card {
    background: var(--bg-depth);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.category-card:hover {
    border-color: var(--accent-copper-dim);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-tech);
}

.category-name-input {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    width: 100%;
    max-width: min(400px, 100%); /* Responsive: 400px on large screens, 100% on small */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-name-input:focus {
    outline: none;
    border-color: var(--accent-copper);
    background: var(--bg-card);
}

.btn-icon-danger {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: #FCA5A5;
}

.btn-icon-danger svg {
    width: 1.125rem;
    height: 1.125rem;
}

.line-items-section {
    margin-top: 1rem;
}

.line-items-header {
    margin-bottom: 0.75rem;
}

.line-items-header-grid {
    display: grid;
    /* 7 columns: Opis | Ilosc | Jedn. | Cena jedn. | Suma | Zapisz | Usun */
    grid-template-columns: minmax(200px, 1fr) 90px 70px 110px 130px 40px 40px;
    gap: 0.75rem;
    padding: 0 1rem;
}

.line-items-header-cell {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.line-items-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-tech);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.category-subtotal-label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-subtotal-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-copper);
}

/* ===== LINE ITEM COMPONENTS ===== */

.line-item-row {
    position: relative;
}

/* Enhanced line-item-grid with proper grid layout */
.line-item-grid {
    display: grid;
    /* 7 columns: Opis | Ilosc | Jedn. | Cena jedn. | Suma | Zapisz | Usun */
    grid-template-columns: minmax(200px, 1fr) 90px 70px 110px 130px 40px 40px;
    gap: 0.75rem;
    align-items: center;
    background: var(--bg-depth);
    border: 1px solid var(--border-tech);
    padding: 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.line-item-grid:hover {
    border-color: var(--accent-copper-dim);
    background: rgba(26, 31, 38, 0.7);
}

.line-item-grid-cell {
    display: flex;
    flex-direction: column;
}

.line-item-grid-input {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    width: 100%;
    transition: all 0.2s ease;
}

.line-item-grid-input:focus {
    outline: none;
    border-color: var(--accent-copper);
    background: var(--bg-surface);
}

.line-item-grid-input-number {
    font-family: var(--font-mono);
    text-align: right;
}

.line-item-grid-total {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-copper);
    text-align: right;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
}

/* Save to Price List Button */
.line-item-save-btn {
    background: transparent;
    border: 1px solid var(--border-tech);
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.line-item-save-btn:hover:not(:disabled) {
    background: var(--accent-copper-glow);
    border-color: var(--accent-copper);
    color: var(--accent-copper);
}

.line-item-save-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.line-item-save-btn svg {
    width: 1rem;
    height: 1rem;
}

/* Remove Button */
.line-item-remove-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.line-item-remove-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.line-item-remove-btn svg {
    width: 1rem;
    height: 1rem;
}

.line-item-add-row {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-start;
}

.btn-add-line-item {
    background: transparent;
    border: 1px dashed var(--border-tech);
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-add-line-item:hover {
    background: var(--accent-copper-glow);
    border-color: var(--accent-copper);
    border-style: solid;
    color: var(--accent-copper);
}

.btn-add-line-item svg {
    width: 1rem;
    height: 1rem;
}

/* ===== RESPONSIVE FOR NEW COMPONENTS ===== */

/* Small screens - reduce padding for maximum content width */
@media (max-width: 640px) {
    .form-container {
        padding: 0 0.5rem; /* Minimal padding: 8px */
    }

    .form-section {
        padding: 1rem 0.5rem; /* Reduced horizontal padding */
    }

    .form-section-padded {
        padding: 1rem 0.5rem; /* Minimal horizontal padding */
    }

    .category-card {
        padding: 0.75rem; /* Reduced to 12px for max field width */
        margin-bottom: 1rem;
    }

    .line-item-grid {
        padding: 0.5rem; /* Minimal padding: 8px */
    }

    .categories-container {
        gap: 1rem; /* Reduced gap between categories */
    }

    .summary-panel-content {
        padding: 1rem 0.5rem; /* Reduced for mobile */
    }

    .form-actions-right {
        padding-bottom: 1rem; /* Less bottom padding on mobile */
    }
}

@media (max-width: 768px) {
    .line-items-header-grid,
    .line-item-grid {
        display: grid;
        grid-template-columns: 1fr; /* Stack vertically */
        gap: 0.75rem;
    }

    .line-items-header {
        display: none;
    }

    /* Description field - vertical layout (label on top) */
    .line-item-grid-cell:nth-child(1) {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Label left-aligned */
        gap: 0.5rem;
    }

    /* Other fields - horizontal layout (label | input) */
    .line-item-grid-cell {
        display: grid;
        grid-template-columns: 100px 1fr; /* Label (100px) | Input (rest) */
        gap: 0.75rem;
        align-items: center;
    }

    .line-item-grid-cell::before {
        content: attr(data-label);
        font-family: var(--font-mono);
        font-size: 0.75rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    /* Right-align numeric inputs for consistency */
    .line-item-grid-input,
    .line-item-grid-total {
        text-align: right;
    }

    /* Description input stays left-aligned */
    .line-item-grid-cell:nth-child(1) .line-item-grid-input {
        text-align: left;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .category-name-input {
        max-width: 100%;
    }

    /* Autocomplete dropdown mobile positioning */
    .autocomplete-results {
        left: 0;
        right: 0;
        max-width: calc(100vw - 1.5rem); /* Prevent viewport overflow */
        z-index: 200; /* Ensure it overlays mobile grid cells */
    }

    /* Description field needs relative positioning for autocomplete */
    .line-item-grid-cell:first-child {
        position: relative;
    }

    /* Action buttons container on mobile - side by side */
    .line-item-save-btn,
    .line-item-remove-btn {
        width: 44px; /* Minimum touch target size */
        height: 44px;
    }

    .line-item-save-btn svg,
    .line-item-remove-btn svg {
        width: 1.25rem; /* Slightly larger icon on mobile */
        height: 1.25rem;
    }
}

/* ===== PRICING SUB-NAVIGATION ===== */
.pricing-subnav {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-tech);
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.pricing-subnav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.pricing-subnav-links {
    display: flex;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.pricing-subnav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #D1D5DB;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-base);
    position: relative;
}

.pricing-subnav-link:hover {
    color: var(--accent-copper);
    background: var(--accent-copper-glow);
    border-bottom: none;
}

.pricing-subnav-link.active {
    color: #FFFFFF;
    border-bottom-color: var(--accent-copper);
    background: var(--accent-copper-glow);
}

.pricing-subnav-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

/* ===== MISSING ICON CLASSES ===== */
.btn-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

.file-upload-icon,
.file-preview-icon {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    color: var(--accent-copper);
}

/* Mobile sub-navigation */
@media (max-width: 768px) {
    .pricing-subnav-link {
        padding: 0.875rem 1rem;
        font-size: 0.8rem;
    }

    .pricing-subnav-icon {
        width: 1rem;
        height: 1rem;
    }

    /* Override data-display component padding for pricing pages */
    .data-table-cell {
        padding: 0.875rem 1rem !important; /* Reduced from 1.25rem 2rem */
    }

    .data-card-header,
    .data-card-content {
        padding: 1.5rem !important; /* Reduced from 2rem */
    }

    .badge {
        font-size: 0.6875rem;
        padding: 0.25rem 0.625rem;
    }
}

@media (max-width: 640px) {
    /* Even tighter spacing on small phones */
    .data-table-cell {
        padding: 0.75rem 0.75rem !important; /* Minimal padding for max content width */
    }

    .data-card-header,
    .data-card-content {
        padding: 1rem !important; /* Reduced from 1.5rem */
    }
}
/* ===== CLIENT LIST STYLES ===== */

/* Clickable rows */
.data-table-row-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.data-table-row-clickable:hover {
    background: var(--accent-copper-glow);
}

/* Client company name (smaller, muted) */
.client-company {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Clickable links (phone, email) */
.client-link {
    color: var(--accent-copper);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.client-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Client estimates list */
.client-estimates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.client-estimates-list .client-link {
    background: var(--bg-input);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.client-estimates-more {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
}

/* ===== SEARCH BAR (from price list) ===== */
.search-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-md);
}

.search-input-wrapper {
    flex: 0 1 40%;
    position: relative;
    display: flex;
    align-items: center;
}

.search-count {
    margin-left: auto;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-copper);
    background: var(--bg-card);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 0.5rem;
    background: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.search-clear:hover {
    color: var(--text-primary);
}

.search-clear svg {
    width: 1rem;
    height: 1rem;
}

.search-clear.hidden {
    display: none;
}

.search-divider {
    color: var(--border-tech);
    font-size: 1.25rem;
}

.search-count {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .search-bar-container {
        flex-wrap: wrap;
    }

    .search-input-wrapper {
        width: 100%;
    }

    .search-divider {
        display: none;
    }

    .search-count {
        width: 100%;
        text-align: center;
    }
}

/* ===== MODAL COMPONENT ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-tech);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: 1px solid var(--border-tech);
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--accent-copper-glow);
    border-color: var(--accent-copper);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-description {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

/* ===== SCAN UPLOAD COMPONENT ===== */
.scan-upload {
    position: relative;
}

.scan-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2.5rem 2rem;
    background: var(--bg-input);
    border: 2px dashed var(--border-tech);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.scan-upload-zone:hover,
.scan-upload-zone.drag-over {
    border-color: var(--accent-copper);
    background: var(--accent-copper-glow);
}

.scan-upload-icon {
    color: var(--accent-copper);
}

.scan-upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.scan-upload-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.scan-upload-hint {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* File preview */
.scan-upload-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-md);
}

.scan-upload-file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.scan-upload-file-icon {
    color: var(--accent-copper);
    flex-shrink: 0;
}

.scan-upload-file-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.scan-upload-file-name {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scan-upload-file-size {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.scan-upload-remove {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.scan-upload-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.scan-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-copper) 0%, var(--accent-copper-dim) 100%);
    color: #000;
    border: 1px solid var(--accent-copper);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scan-upload-btn:hover {
    box-shadow: 0 0 15px var(--accent-copper-glow);
    transform: translateY(-1px);
}

/* Loading state */
.scan-upload-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2.5rem 2rem;
    background: var(--bg-input);
    border: 1px solid var(--border-tech);
    border-radius: var(--radius-md);
}

.scan-upload-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--border-tech);
    border-top-color: var(--accent-copper);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.scan-upload-loading-text {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-copper);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Error state */
.scan-upload-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: var(--radius-sm);
    margin-top: 1rem;
}

.scan-upload-error-icon {
    color: var(--error);
    flex-shrink: 0;
}

.scan-upload-error-message {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: #FCA5A5;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Page header actions */
.page-header-actions {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .page-header-actions {
        margin-top: 1rem;
    }
}
