/* ===================================================
   FR4 PCB Quote Calculator - Compact & Modern
   Primary Color: #007BC4
   Inspired by JLCPCB-style dense layout
   =================================================== */

/* CSS Variables */
:root {
    --primary: #007BC4;
    --primary-dark: #005a8f;
    --primary-light: #e8f4f8;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --bg: #f5f6f8;
    --bg-alt: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 123, 196, 0.15);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================================
   Navbar
   =================================================== */

.navbar {
    background: var(--primary);
    box-shadow: var(--shadow-md);
    padding: 0.65rem 0;
}

.navbar-brand {
    color: white !important;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ===================================================
   Quote Hero
   =================================================== */

.quote-page-hero {
    margin-bottom: 1.3rem;
}

.quote-page-hero__banner {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 123, 196, 0.12);
    background: #dff2ff;
}

.quote-page-hero__banner img {
    display: block;
    width: 100%;
    height: auto;
}

.quote-page-hero__spacer {
    height: 2.7rem;
}

.quote-page-hero__content {
    padding: 0 0.25rem;
}

.quote-page-hero__title {
    margin: 0;
    font-size: clamp(0.95rem, 0.8vw + 0.8rem, 1.25rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
}

#fr4-quote-form > .form-section--upload:first-child {
    margin-top: 1rem;
}

/* ===================================================
   Form Sections
   =================================================== */

.form-section {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.form-section--upload {
    padding: 0.75rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 2.5rem;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title i {
    font-size: 1rem;
    color: var(--primary);
    background: var(--primary-light);
    width: 1.875rem;
    height: 1.875rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-title h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: var(--text);
}

/* Section divider within merged sections */
.section-divider {
    padding-top: 0.625rem !important;
    border-top: 1px solid var(--border-light);
}

/* ===================================================
   Form Labels & Inputs
   =================================================== */

.form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.form-label::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 0.875em;
    background: var(--primary);
    border-radius: 2px;
    flex-shrink: 0;
    opacity: 0.7;
}

.form-control,
.form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--transition);
    background: white;
}

.form-control-sm,
.form-select-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 196, 0.10);
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
}

.input-wrapper .form-control {
    padding-right: 2.5rem;
}

.input-suffix {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 500;
    pointer-events: none;
}

/* Material Badge */
.material-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-light);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
}

.material-badge i {
    font-size: 1rem;
}

/* Gerber Upload */
.gerber-upload-wrap {
    text-align: center;
    border: 2px dashed #f16d6d;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
    padding: 0.875rem;
}

.gerber-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 260px;
    max-width: 100%;
    padding: 0.625rem 1.5rem;
    border: 2px solid #e53935;
    border-radius: var(--radius-sm);
    color: #e53935;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
}

.gerber-upload-btn:hover {
    background: #fff0f0;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.18);
    transform: translateY(-1px);
}

.gerber-upload-hint {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.bom-upload-wrap {
    text-align: center;
    border: 2px dashed #79a9d5;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #f4f9ff 0%, #fff 100%);
    padding: 0.875rem;
}

.bom-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 260px;
    max-width: 100%;
    padding: 0.625rem 1.5rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
}

.bom-upload-btn:hover {
    background: #eef7ff;
    box-shadow: 0 4px 12px rgba(0, 123, 196, 0.14);
    transform: translateY(-1px);
}

.upload-file-state {
    margin-top: 0.5rem;
}

.upload-file-state__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    max-width: 100%;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(26, 26, 26, 0.08);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.upload-file-state.has-file .upload-file-state__badge {
    background: #ffffff;
    color: var(--text);
    border-color: rgba(0, 123, 196, 0.24);
    box-shadow: 0 4px 12px rgba(0, 123, 196, 0.08);
}

/* ===================================================
   Option Cards (Radio Buttons) - Compact
   =================================================== */

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.375rem;
}

.options-grid-sm {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 0.375rem;
}

.options-row {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.option-card {
    position: relative;
    cursor: pointer;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-card > span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4375rem 0.4rem;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    text-align: center;
    transition: var(--transition);
    min-height: 34px;
    user-select: none;
    word-break: break-word;
    line-height: 1.3;
}

.option-card:hover > span {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.option-card input[type="radio"]:checked + span {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 2px 6px rgba(0, 123, 196, 0.3);
}

.option-card.active > span {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 2px 6px rgba(0, 123, 196, 0.3);
}

.options-row--material {
    flex-wrap: nowrap;
    gap: 0.45rem;
}

.option-card--material {
    flex: 1 1 0;
    min-width: 0;
}

.option-card--material > span {
    min-height: 42px;
    padding: 0.5rem 0.55rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

.special-material-fields {
    margin-top: 0.25rem;
}

.special-material-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.special-material-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #eef7ff 0%, #f9fcff 100%);
    border: 1px solid rgba(0, 123, 196, 0.18);
    color: var(--primary-dark);
    font-size: 0.775rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

/* Quantity Presets */
.quantity-dropdown {
    position: relative;
    overflow: visible;
    z-index: 20;
}

.quantity-selector {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.quantity-selector:hover {
    border-color: var(--primary);
}

.quantity-selector i {
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.75rem;
}

.quantity-dropdown.open .quantity-selector {
    border-color: var(--primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.quantity-dropdown.open .quantity-selector i {
    transform: rotate(180deg);
}

.quantity-dropdown-panel {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    width: clamp(380px, 56vw, 560px);
    max-width: min(94vw, 560px);
    min-width: 100%;
    border: 1.5px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: #f7f7f7;
    padding: 0.625rem;
    box-shadow: var(--shadow-md);
    z-index: 30;
}

.quantity-preset-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 0.3rem;
}

.quantity-chip {
    border: 1px solid #d5d5d5;
    background: white;
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.quantity-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.quantity-chip.active {
    border-color: #3e2f2f;
    background: #3e2f2f;
    color: #fff;
}

.quantity-custom .btn {
    white-space: nowrap;
    border-radius: var(--radius-sm);
}

.quantity-custom .form-control {
    border-radius: var(--radius-sm);
}

.quantity-manual-hint {
    margin-top: 0.375rem;
    color: #222;
}

/* ===================================================
   Color Options - Compact Inline (JLCPCB style)
   =================================================== */

.color-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-option-compact {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.color-option-compact input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    transition: var(--transition);
}

.color-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

.color-option-compact:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.color-option-compact.active,
.color-option-compact:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.color-option-compact.active .color-dot,
.color-option-compact:has(input:checked) .color-dot {
    box-shadow: 0 0 0 2px white, 0 0 0 3.5px var(--primary);
}

.color-option-compact.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Legacy color-option styles (keep for compatibility) */
.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.color-grid-sm {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.color-option {
    position: relative;
    cursor: pointer;
}

.color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.color-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.color-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text);
}

.color-option input[type="radio"]:checked ~ .color-swatch {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary);
}

.color-option.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.color-option.active .color-swatch {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary);
}

.color-option.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.color-option.disabled .color-name {
    color: var(--text-secondary);
}

/* ===================================================
   Checkbox Cards - Compact
   =================================================== */

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.375rem;
}

.checkbox-card {
    position: relative;
    cursor: pointer;
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.checkbox-card i {
    font-size: 1rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: var(--transition);
}

.checkbox-card span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
}

.checkbox-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.checkbox-card input[type="checkbox"]:checked ~ i {
    color: var(--primary);
}

.checkbox-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.checkbox-card:has(input:checked) i {
    color: var(--primary);
}

/* Large Checkbox Card */
.checkbox-card-large {
    position: relative;
    cursor: pointer;
    display: block;
}

.checkbox-card-large input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.checkbox-content i {
    font-size: 1.375rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: var(--transition);
}

.checkbox-content strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.checkbox-content span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.checkbox-card-large:hover .checkbox-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.checkbox-card-large:has(input:checked) .checkbox-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.checkbox-card-large:has(input:checked) .checkbox-content i {
    color: var(--primary);
}

/* ===================================================
   Info Banner
   =================================================== */

.info-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, white 100%);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-md);
}

.info-banner--compact {
    padding: 0.5rem 0.75rem;
}

.info-banner i {
    font-size: 1.125rem;
    color: var(--primary);
    flex-shrink: 0;
}

.info-banner div {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.info-banner strong {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
}

.info-banner span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ===================================================
   Sub-Options
   =================================================== */

.sub-option {
    padding: 0.75rem;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
}

/* ===================================================
   Price Sidebar
   =================================================== */

.price-sidebar {
    position: sticky;
    top: 1rem;
}

.price-card {
    background: linear-gradient(135deg, var(--primary) 0%, #0091d4 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-lg);
    color: white;
    position: relative;
    overflow: hidden;
}

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

.price-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
    position: relative;
}

.price-loading {
    text-align: center;
    padding: 2rem 0;
    position: relative;
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.75rem;
}

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

.price-content {
    position: relative;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
}

.price-label {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.price-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.price-total-section {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.75rem;
}

.price-total {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.375rem;
}

.price-quantity {
    font-size: 0.8125rem;
    opacity: 0.9;
}

.price-area {
    font-size: 0.9375rem;
    font-weight: 600;
}

/* Buttons in Price Card */
.price-card .btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    transition: var(--transition);
}

.price-card .btn-primary {
    background: white;
    color: var(--primary);
    border: none;
    margin-bottom: 0.5rem;
}

.price-card .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.price-card .btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.price-card .btn-outline:hover {
    background: white;
    color: var(--primary);
}

.quote-submit-panel {
    margin: 0.875rem 0;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.quote-submit-field {
    display: none;
}

.quote-submit-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.16);
}

.quote-submit-note__icon {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.8125rem;
}

.quote-submit-note__content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.quote-submit-note__content strong {
    font-size: 0.8125rem;
    font-weight: 700;
}

.quote-submit-note__content span {
    font-size: 0.75rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
}

.quote-auth-status {
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-bottom: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
}

.quote-auth-status--pending {
    background: rgba(255, 255, 255, 0.12);
}

.quote-auth-status--success {
    background: rgba(18, 181, 107, 0.18);
}

.quote-auth-status--warning,
.quote-auth-status--error {
    background: rgba(255, 255, 255, 0.16);
}

.quote-auth-status__actions,
.quote-order-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.quote-order-feedback {
    margin-bottom: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.quote-order-feedback--pending {
    background: rgba(255, 255, 255, 0.14);
}

.quote-order-feedback--error {
    background: rgba(213, 53, 69, 0.22);
}

.quote-order-feedback--success {
    background: rgba(18, 181, 107, 0.22);
}

.quote-order-result__status {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.9);
}

.quote-order-result__title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.quote-order-result__meta {
    font-size: 0.8125rem;
}

.price-error {
    margin-bottom: 0.625rem;
}

/* Price Breakdown */
.breakdown-list {
    background: white;
    border-radius: var(--radius-md);
    padding: 0.875rem;
    margin-top: 0.75rem;
    color: var(--text);
}

.breakdown-list h6 {
    font-weight: 700;
    margin-bottom: 0.625rem;
    font-size: 0.875rem;
    color: var(--text);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3125rem 0;
    font-size: 0.8125rem;
}

.breakdown-item span {
    color: var(--text-secondary);
}

.breakdown-item strong {
    color: var(--text);
    font-weight: 600;
}

.breakdown-item.total {
    padding-top: 0.5rem;
    margin-top: 0.375rem;
    border-top: 2px solid var(--border);
}

.breakdown-item.total span,
.breakdown-item.total strong {
    font-weight: 700;
    font-size: 0.9375rem;
}

/* Manual Quote */
.price-manual {
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
}

.price-manual i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.price-manual h5 {
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: #fff;
}

.price-manual p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.price-manual .btn-light {
    background: white;
    color: var(--primary);
    border: none;
    font-weight: 600;
}

/* ===================================================
   Help Card
   =================================================== */

.help-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    margin-top: 0.75rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    border: 1px solid var(--border-light);
}

.help-card i {
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
}

.help-card strong {
    display: block;
    font-weight: 700;
    margin-bottom: 0.125rem;
    font-size: 0.875rem;
}

.help-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition);
}

.btn-link:hover {
    color: var(--primary-dark);
    gap: 0.5rem;
}

/* ===================================================
   Footer
   =================================================== */

.footer {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.7);
    padding: 1.25rem 0;
    margin-top: 2rem;
}

.footer p {
    font-size: 0.8125rem;
    margin: 0;
}

/* ===================================================
   Animations
   =================================================== */

@keyframes priceUpdate {
    0% {
        opacity: 0.7;
        transform: scale(0.98);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.price-updated {
    animation: priceUpdate 0.3s ease-in-out;
}

.quote-currency-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.quote-currency-toolbar__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
    white-space: nowrap;
}

.quote-currency-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(7, 23, 43, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.testquote-quote-shell .quote-currency-switcher__button,
.quote-currency-switcher__button {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    line-height: 1;
    min-width: 3.6rem;
    min-height: 2.2rem;
    padding: 0.45rem 0.9rem;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
    box-shadow: none;
    outline: none;
    transition: var(--transition);
}

.testquote-quote-shell .quote-currency-switcher__button:hover,
.quote-currency-switcher__button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.testquote-quote-shell .quote-currency-switcher__button.active,
.quote-currency-switcher__button.active {
    background: rgba(255, 255, 255, 0.96);
    color: #0d63c9;
    border-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 22px rgba(4, 16, 33, 0.16);
}

.testquote-quote-shell .quote-currency-switcher__button:focus,
.testquote-quote-shell .quote-currency-switcher__button:focus-visible,
.quote-currency-switcher__button:focus,
.quote-currency-switcher__button:focus-visible {
    outline: none;
    box-shadow: none;
}

.testquote-quote-shell .quote-currency-switcher__button:disabled,
.quote-currency-switcher__button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.quote-currency-toolbar__hint {
    display: none;
}

/* ===================================================
   Responsive Design
   =================================================== */

@media (max-width: 991px) {
    .price-sidebar {
        position: relative;
        margin-top: 1rem;
    }

    .form-section {
        padding: 1rem;
    }
}

@media (max-width: 767px) {
    .quote-currency-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-section {
        padding: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .section-title {
        gap: 0.375rem;
        margin-bottom: 0.625rem;
        padding-bottom: 0.5rem;
    }

    .options-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }

    .options-grid-sm {
        grid-template-columns: repeat(3, 1fr);
    }

    .quantity-preset-grid {
        grid-template-columns: repeat(5, minmax(48px, 1fr));
    }

    .quantity-dropdown-panel {
        position: static;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        box-shadow: none;
    }

    .options-row {
        gap: 0.3rem;
    }

    .options-row--material {
        flex-wrap: wrap;
    }

    .option-card--material {
        flex: 1 1 calc(50% - 0.3rem);
    }

    .option-card--material > span {
        min-height: 40px;
        font-size: 0.77rem;
        padding: 0.45rem 0.5rem;
    }

    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .color-row {
        gap: 0.3rem;
    }

    .color-option-compact {
        padding: 0.3rem 0.5rem;
    }

    .price-total {
        font-size: 1.75rem;
    }

    .price-value {
        font-size: 1.125rem;
    }

    .gerber-upload-btn,
    .bom-upload-btn {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .quote-page-hero__spacer {
        height: 1.8rem;
    }

    .quote-page-hero__title {
        font-size: 0.95rem;
    }

    .section-title h3 {
        font-size: 0.9375rem;
    }

    .options-grid-sm {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
    }

    .options-grid-sm .option-card > span {
        padding: 0.375rem 0.375rem;
        font-size: 0.75rem;
    }

    .special-material-tag {
        font-size: 0.73rem;
    }

    .quantity-preset-grid {
        grid-template-columns: repeat(4, minmax(46px, 1fr));
    }

    .quantity-chip {
        padding: 0.3rem 0.2rem;
        font-size: 0.75rem;
    }

    .color-option-compact .color-label {
        font-size: 0.6875rem;
    }
}

/* ===================================================
   Print Styles
   =================================================== */

@media print {
    .navbar,
    .footer,
    .price-sidebar,
    .btn {
        display: none !important;
    }

    .form-section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border);
    }
}

/* ===================================================
   Auth Panel
   =================================================== */

.quote-auth-panel {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.quote-auth-panel__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
}

.quote-auth-panel__copy {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.84);
}

.quote-auth-panel__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quote-auth-panel__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.quote-auth-panel__input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.quote-auth-panel__input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.quote-auth-panel__input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.quote-auth-panel__input--otp {
    letter-spacing: 0.42em;
    text-align: center;
    font-weight: 700;
}

.quote-auth-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quote-auth-panel__actions .btn[disabled] {
    opacity: 0.72;
    cursor: not-allowed;
}
