:root {
    --solar-gold: #F59E0B;
    --solar-gold-dark: #D97706;
    --solar-blue: #0EA5E9;
    --solar-emerald: #10B981;
    --solar-slate: #0F172A;
}

/* Make inputs look like quote lines */
.pricing-row .custom-field-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(248, 250, 252, 0.22);
    border-radius: 0;
    padding: 8px 10px;
    color: #f8fafc;
}

.pricing-row .custom-field-input:focus {
    outline: none;
    border-bottom-color: rgba(248, 250, 252, 0.7);
    box-shadow: none;
}

.pricing-row .custom-field-qty {
    text-align: center;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.9);
}

.pricing-row .custom-field-currency {
    color: rgba(226, 232, 240, 0.75);
}

.pricing-row .custom-field-price.is-disabled {
    opacity: 0.45;
}

@media (max-width: 820px) {
    .pricing-table-head,
    .pricing-row {
        grid-template-columns: 1fr 60px 140px;
    }

    .pricing-table-card {
        padding: 8px;
    }

    .pricing-table-head {
        padding: 10px 12px;
    }

    .pricing-row {
        padding: 10px 12px;
    }

    .pricing-net-input {
        width: 140px;
        font-size: 22px;
    }
}

/* Slight dark atmosphere + readable surfaces */
.calc-page {
    font-family: 'DM Sans', sans-serif !important;
    background: radial-gradient(1200px 700px at 20% -10%, rgba(245, 158, 11, 0.22), transparent 55%),
        radial-gradient(900px 600px at 90% 25%, rgba(14, 165, 233, 0.18), transparent 50%),
        radial-gradient(900px 600px at 10% 90%, rgba(16, 185, 129, 0.14), transparent 55%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 40%, #0b1220 100%) !important;
    color: #e5e7eb !important;
    min-height: 100vh;
}

/* Force all text inside calc-page to be readable */
.calc-page,
.calc-page *:not(.stc-badge):not(.bstc-badge):not(.filter-chip.active) {
    color: #e5e7eb;
}

.calc-page h1,
.calc-page h2,
.calc-page h3,
.calc-page h4,
.calc-page .font-bold {
    color: #f8fafc !important;
}

.calc-page p,
.calc-page span,
.calc-page label {
    color: #cbd5e1;
}

.calc-hero-bg {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(245, 158, 11, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(14, 165, 233, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(16, 185, 129, 0.10) 0%, transparent 55%);
}

/* Override Tailwind utility colors inside calculator to match dark theme */
.calc-page .text-white,
.calc-page [class*="text-white"] {
    color: #f8fafc !important;
}

.calc-page .text-slate-400,
.calc-page [class*="text-slate-400"] {
    color: rgba(203, 213, 225, 0.85) !important;
}

.calc-page .text-slate-300,
.calc-page [class*="text-slate-300"] {
    color: rgba(226, 232, 240, 0.9) !important;
}

.calc-page .text-slate-600,
.calc-page [class*="text-slate-600"] {
    color: rgba(203, 213, 225, 0.7) !important;
}

.calc-page .text-amber-200 {
    color: #fde68a !important;
}

.calc-page .text-amber-400 {
    color: #fbbf24 !important;
}

.calc-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 24px;
    box-shadow:
        0 22px 70px rgba(2, 6, 23, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.10) inset;
}

.calc-card-inner {
    background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.65) 100%);
    border-radius: 20px;
}

.equipment-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 2px dashed rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.equipment-btn:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(245, 158, 11, 0.55);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
}

.equipment-btn.selected {
    background: rgba(245, 158, 11, 0.10);
    border: 2px solid rgba(245, 158, 11, 0.70);
    border-style: solid;
}

.equipment-btn.inverter.selected {
    background: rgba(14, 165, 233, 0.10);
    border-color: rgba(14, 165, 233, 0.65);
}

.equipment-btn.battery.selected {
    background: rgba(16, 185, 129, 0.10);
    border-color: rgba(16, 185, 129, 0.65);
}

.qty-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    color: #f8fafc;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
}

.qty-input:focus {
    outline: none;
    border-color: var(--solar-gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    font-size: 20px;
    font-weight: 800;
    transition: all 0.18s;
}

.qty-btn:hover {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.55);
}

.postcode-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    color: #f8fafc;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.postcode-input:focus {
    outline: none;
    border-color: var(--solar-blue);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.postcode-input::placeholder {
    color: rgba(248, 250, 252, 0.55);
}

.result-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(239, 68, 68, 0.10) 50%, rgba(139, 92, 246, 0.12) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 20px;
}

.result-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #fb7185);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stc-badge {
    background: linear-gradient(135deg, #F59E0B, #F97316);
    border-radius: 12px;
    padding: 2px 12px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0b1220;
}

.bstc-badge {
    background: linear-gradient(135deg, #10B981, #06B6D4);
    border-radius: 12px;
    padding: 2px 12px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0f172a;
}

/* Native Dialog Modal */
.equipment-dialog {
    padding: 0;
    border: none;
    background: transparent;
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.equipment-dialog::backdrop {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
}

.equipment-dialog[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.dialog-panel {
    position: relative;
    z-index: 1;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    margin: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: dialogSlideIn 0.2s ease-out;
}

/* Lock background scroll when modal open */
html.modal-open,
body.modal-open {
    overflow: hidden !important;
    height: 100%;
}

@keyframes dialogSlideIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: #f8fafc;
}

.dialog-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.dialog-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.dialog-search {
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dialog-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 14px 20px 14px 48px;
    color: #f8fafc;
    font-size: 15px;
}

.dialog-search-input:focus {
    outline: none;
    border-color: var(--solar-gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.dialog-search-input::placeholder {
    color: rgba(248, 250, 252, 0.45);
}

.dialog-body {
    max-height: calc(85vh - 180px);
    overflow-y: auto;
    color: #e2e8f0;
    padding-bottom: 28px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
}

/* Add spacing so last equipment isn't hidden behind safe-area / scroll bars */
#equipmentList {
    padding-bottom: 18px;
}

/* Download PDF button + overlay */
.download-pdf-btn {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.28);
    color: rgba(226, 232, 240, 0.95);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: all 0.18s;
}

.download-pdf-btn:hover {
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(14, 165, 233, 0.45);
}

.download-pdf-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pdf-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(10px);
    display: none;
    padding: 24px;
}

.pdf-overlay:not(.hidden),
.pdf-overlay[aria-hidden="false"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-overlay-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 18px;
    text-align: center;
}

.pdf-spinner {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 4px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(14, 165, 233, 0.9);
    margin: 0 auto 14px;
    animation: pdfSpin 0.9s linear infinite;
}

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

.pdf-overlay-title {
    color: #f8fafc;
    font-weight: 900;
    font-size: 16px;
}

.pdf-overlay-sub {
    color: rgba(148, 163, 184, 0.9);
    font-size: 13px;
    margin-top: 6px;
}

dialog.pdf-lead-dialog {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    inset: 0;
    box-sizing: border-box;
}

dialog.pdf-lead-dialog[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

dialog.pdf-lead-dialog::backdrop {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(10px);
}

dialog.pdf-lead-dialog .pdf-lead-panel {
    width: calc(100% - 32px);
    max-width: 640px;
    margin: 0;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    animation: dialogSlideIn 0.2s ease-out;
}

.pdf-lead-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.pdf-lead-title {
    color: #f8fafc;
    font-weight: 950;
    letter-spacing: -0.01em;
    font-size: 18px;
}

.pdf-lead-sub {
    margin-top: 4px;
    color: rgba(148, 163, 184, 0.9);
    font-size: 13px;
    line-height: 1.45;
}

.pdf-lead-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: rgba(226, 232, 240, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.pdf-lead-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.pdf-lead-body {
    padding: 18px 20px 20px;
}

.pdf-lead-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .pdf-lead-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.pdf-lead-field span {
    display: block;
    color: rgba(226, 232, 240, 0.9);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
}

.pdf-lead-field input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 12px 12px;
    color: #f8fafc;
    font-size: 14px;
    outline: none;
}

.pdf-lead-field input:focus {
    border-color: rgba(14, 165, 233, 0.55);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.pdf-lead-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.08);
    color: rgba(254, 226, 226, 0.95);
    font-weight: 700;
    font-size: 13px;
}

.pdf-lead-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.pdf-lead-submit {
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(14, 165, 233, 0.35);
    background: rgba(14, 165, 233, 0.14);
    color: #e0f2fe;
    font-weight: 950;
    cursor: pointer;
    transition: all 0.16s;
}

.pdf-lead-submit:hover {
    background: rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.55);
}

.pdf-lead-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pdf-lead-btn-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(224, 242, 254, 0.35);
    border-top-color: rgba(224, 242, 254, 0.95);
    display: none;
    margin-left: 10px;
    animation: pdfLeadSpin 0.8s linear infinite;
}

.pdf-lead-submit.is-loading .pdf-lead-btn-spinner {
    display: inline-block;
}

.pdf-lead-submit.is-loading .pdf-lead-submit-text {
    opacity: 0.9;
}

@keyframes pdfLeadSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pdf-lead-fine {
    margin-top: 10px;
    color: rgba(148, 163, 184, 0.85);
    font-size: 11px;
    line-height: 1.4;
}

.pdf-lead-thanks {
    text-align: center;
    padding: 6px 4px 4px;
}

.pdf-lead-check {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    margin: 2px auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: rgba(167, 243, 208, 0.95);
    font-size: 18px;
}

/* PDF capture mode (temporarily enabled during html2canvas) */
html.pdf-mode,
body.pdf-mode {
    background: #ffffff !important;
}

.pdf-mode .calc-page {
    background: #ffffff !important;
    color: #0f172a !important;
}

.pdf-mode .calc-card,
.pdf-mode .result-card,
.pdf-mode .pricing-table-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
}

.pdf-mode .pricing-table-head {
    background: #f8fafc !important;
    color: #334155 !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

.pdf-mode .pricing-row {
    border-bottom: 1px solid #e2e8f0 !important;
}

.pdf-mode .pricing-desc-title,
.pdf-mode .text-white,
.pdf-mode [class*="text-white"] {
    color: #0f172a !important;
}

.pdf-mode .text-slate-400,
.pdf-mode [class*="text-slate-400"],
.pdf-mode .pricing-desc-sub {
    color: #475569 !important;
}

.pdf-mode .custom-field-input {
    color: #0f172a !important;
    border-bottom-color: #94a3b8 !important;
}

.pdf-mode .custom-field-currency {
    color: #475569 !important;
}

.pdf-mode .pricing-summary-card {
    max-width: none;
}

/* Hide interactive-only elements in PDF */
.pdf-mode .download-pdf-btn,
.pdf-mode .qty-btn,
.pdf-mode #panelSelectBtn,
.pdf-mode #inverterSelectBtn,
.pdf-mode #batterySelectBtn,
.pdf-mode .delete-field-btn,
.pdf-mode #equipmentDialog,
.pdf-mode .pdf-overlay {
    display: none !important;
}

.equipment-item {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.18s;
}

.equipment-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

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

.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(248, 250, 252, 0.78);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.18s;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.09);
}

.filter-chip.active {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.55);
    color: #0f172a;
}

/* Pricing breakdown */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-table-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 12px;
    overflow-x: auto;
}

.pricing-table-head {
    display: grid;
    grid-template-columns: 1fr 80px 190px;
    gap: 10px;
    padding: 12px 16px;
    font-size: 12px;
    color: rgba(148, 163, 184, 0.95);
    font-weight: 800;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pricing-row {
    display: grid;
    grid-template-columns: 1fr 80px 190px;
    gap: 10px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.pricing-desc-title {
    color: #f8fafc;
    font-weight: 800;
    font-size: 14px;
    line-height: 1.2;
}

.pricing-desc-sub {
    color: rgba(148, 163, 184, 0.85);
    font-size: 12px;
    margin-top: 4px;
}

.pricing-col.total {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.pricing-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.custom-field-price.is-disabled {
    opacity: 0.55;
}

.pricing-summary-card {
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 12px 0;
    max-width: 520px;
    margin-left: auto;
}

.pricing-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.pricing-summary-label {
    color: rgba(148, 163, 184, 0.95);
    font-size: 13px;
    font-weight: 700;
}

.pricing-summary-value {
    color: #e2e8f0;
    font-size: 18px;
    font-weight: 900;
}

.pricing-summary-sub {
    color: rgba(148, 163, 184, 0.85);
    font-size: 12px;
    margin-top: 6px;
}

.pricing-summary-divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.35);
    margin: 14px 0;
}

.pricing-discount-card {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
}

.pricing-discount-title {
    color: rgba(16, 185, 129, 0.95);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.pricing-discount-sub {
    color: rgba(226, 232, 240, 0.85);
    font-size: 12px;
    margin-top: 4px;
}

.pricing-discount-value {
    color: rgba(16, 185, 129, 0.98);
    font-weight: 900;
    font-size: 16px;
    margin-top: 8px;
    text-align: right;
}

.pricing-net-card {
    margin-top: 14px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.pricing-net-edit {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.pricing-net-currency {
    color: rgba(226, 232, 240, 0.8);
    font-weight: 900;
}

.pricing-net-input {
    width: 180px;
    background: transparent;
    border: none;
    border-bottom: 3px solid rgba(248, 250, 252, 0.22);
    color: #f8fafc;
    font-weight: 950;
    font-size: 28px;
    text-align: right;
    padding: 6px 2px;
}

.pricing-net-input:focus {
    outline: none;
    border-bottom-color: rgba(248, 250, 252, 0.7);
}

.pricing-net-label {
    color: rgba(226, 232, 240, 0.9);
    font-weight: 900;
    letter-spacing: 0.02em;
}

.pricing-net-value {
    color: #f8fafc;
    font-weight: 950;
    font-size: 28px;
}

/* Custom fields */
.custom-field-row {
    display: grid;
    grid-template-columns: 70px 1fr 130px 40px;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 8px;
}

.custom-field-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    color: #f8fafc;
    font-size: 14px;
    width: 100%;
}

.custom-field-qty {
    text-align: center;
    font-weight: 600;
}

.custom-field-input:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.custom-field-input::placeholder {
    color: rgba(248, 250, 252, 0.45);
}

/* Price column layout (fix $ overlap) */
.custom-field-price {
    position: relative;
}

.custom-field-currency {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(226, 232, 240, 0.7);
    font-weight: 700;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.custom-field-price-input {
    padding-left: 24px !important;
}

.add-field-btn {
    background: rgba(245, 158, 11, 0.08);
    border: 2px dashed rgba(245, 158, 11, 0.35);
    border-radius: 12px;
    padding: 14px 24px;
    color: #fbbf24;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}

.add-field-btn:hover {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.55);
}

.delete-field-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}

.delete-field-btn:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #fca5a5;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(245, 158, 11, 0.0); }
    50% { box-shadow: 0 18px 50px rgba(245, 158, 11, 0.22); }
}

.pulse-glow {
    animation: pulse-glow 2.2s ease-in-out infinite;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.04);
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.18);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.28);
}

@media (max-width: 640px) {
    .calc-card {
        padding: 16px !important;
    }

    .custom-field-row {
        grid-template-columns: 55px 1fr 100px 36px;
        gap: 8px;
        padding: 8px 10px;
    }

    .custom-field-input {
        padding: 8px 10px;
        font-size: 13px;
    }

    .custom-field-price-input {
        padding-left: 20px !important;
    }

    .custom-field-currency {
        left: 8px;
        font-size: 13px;
    }

    .delete-field-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .dialog-panel {
        margin: 8px;
        max-height: 92vh;
        border-radius: 18px;
    }

    .dialog-header {
        padding: 14px 16px;
    }

    .dialog-search {
        padding: 12px 16px;
    }

    .dialog-body {
        max-height: calc(92vh - 150px);
    }
}
