/* Jawad Zafar Estimates — client proposal page */

:root {
	--estprop-brand: #1f4e79;
	--estprop-ink: #1b1f24;
	--estprop-muted: #5f6872;
	--estprop-line: #e3e6ea;
	--estprop-soft: #f5f7f9;
	--estprop-ok: #0a7a33;
	--estprop-warn: #9a6400;
	--estprop-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--estprop-font-head: var(--estprop-font);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.estprop-proposal-body {
	margin: 0;
	background: #eef1f4;
	color: var(--estprop-ink);
	font: 15px/1.55 var(--estprop-font);
}
.estprop-doc {
	max-width: 860px;
	margin: 0 auto 48px;
	background: #fff;
	border-top: 6px solid var(--estprop-brand);
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 10px 30px rgba(0,0,0,.05);
	padding: 40px 48px;
}
.estprop-doc--message { margin-top: 64px; text-align: center; }
.estprop-toolbar { max-width: 860px; margin: 16px auto 8px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 0 4px; }
.estprop-toolbar .estprop-btn { padding: 8px 16px; font-size: 14px; }
.estprop-preview-bar { background: #fff8e1; border-bottom: 1px solid #f0d78c; padding: 10px 16px; text-align: center; font-size: 14px; }
.estprop-preview-bar a { margin-left: 8px; color: var(--estprop-brand); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-family: var(--estprop-font-head); }
.estprop-company, .estprop-project-title, .estprop-sum__total th, .estprop-sum__total td { font-family: var(--estprop-font-head); }
.estprop-input, .estprop-btn, .estprop-sigtabs button, .estprop-link { font-family: inherit; }
.estprop-muted { color: var(--estprop-muted); }
.estprop-small { font-size: 13px; }
.estprop-nowrap { white-space: nowrap; }
a { color: var(--estprop-brand); }

/* Header */
.estprop-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--estprop-line); }
.estprop-head__brand { display: flex; flex-direction: column; gap: 10px; }
.estprop-logo { max-height: 64px; max-width: 220px; object-fit: contain; align-self: flex-start; }
.estprop-company { font-size: 22px; font-weight: 700; color: var(--estprop-brand); }
.estprop-contact { font-size: 13px; color: var(--estprop-muted); }
.estprop-head__meta { text-align: right; }
.estprop-doc-type { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--estprop-brand); font-weight: 700; margin-bottom: 8px; }
.estprop-head__meta dl { display: grid; grid-template-columns: auto auto; gap: 2px 12px; margin: 0; font-size: 14px; }
.estprop-head__meta dt { color: var(--estprop-muted); }
.estprop-head__meta dd { margin: 0; font-weight: 600; }

/* Banners */
.estprop-banner { margin: 20px 0 0; padding: 12px 16px; border-radius: 6px; font-size: 14px; }
.estprop-banner--ok { background: #e7f6ec; color: #0b5d27; }
.estprop-banner--info { background: #e8f1fb; color: #134b80; }
.estprop-banner--warn { background: #fff4dc; color: #7a5200; }
.estprop-banner--muted { background: var(--estprop-soft); color: var(--estprop-muted); }

/* Parties */
.estprop-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--estprop-line); font-size: 14px; }
.estprop-parties h4 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--estprop-muted); margin-bottom: 6px; }
.estprop-project-title { font-size: 18px; }

/* Sections */
.estprop-section { padding: 28px 0 0; }
.estprop-section > h2 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--estprop-brand); margin-bottom: 14px; }
.estprop-rich p { margin: 0 0 10px; }
.estprop-rich ul, .estprop-rich ol { margin: 0 0 10px 20px; padding: 0; }
.estprop-terms .estprop-rich { font-size: 13px; color: #3a424b; }

/* Items */
.estprop-items { width: 100%; border-collapse: collapse; font-size: 14px; }
.estprop-items thead th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--estprop-muted); padding: 0 0 8px; border-bottom: 2px solid var(--estprop-ink); }
.estprop-items td { padding: 10px 0; border-bottom: 1px solid var(--estprop-line); vertical-align: top; }
.estprop-items td + td, .estprop-items th + th { padding-left: 16px; }
.estprop-items__section th, .estprop-items__section td { padding: 16px 0 8px !important; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--estprop-line); background: none; text-align: left; }
.estprop-items__section td { text-align: right; }
.estprop-num { text-align: right !important; white-space: nowrap; }

/* Options */
.estprop-options { margin: 24px 0 0; padding: 16px; background: var(--estprop-soft); border-radius: 8px; }
.estprop-options h3 { font-size: 15px; margin-bottom: 4px; }
.estprop-options .estprop-muted { margin: 0 0 12px; font-size: 13px; }
.estprop-option { display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid var(--estprop-line); border-radius: 6px; padding: 12px 14px; margin-top: 8px; cursor: pointer; transition: border-color .15s; }
.estprop-option.is-on { border-color: var(--estprop-brand); box-shadow: inset 3px 0 0 var(--estprop-brand); }
.estprop-option input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--estprop-brand); }
.estprop-option__text { flex: 1; }
.estprop-option__text small { display: block; color: var(--estprop-muted); }
.estprop-option__price { font-weight: 600; white-space: nowrap; }

/* Totals */
.estprop-totals-wrap { margin: 24px 0 0 auto; max-width: 380px; transition: opacity .15s; }
.estprop-totals-wrap.is-loading { opacity: .5; }
.estprop-sum { width: 100%; border-collapse: collapse; font-size: 14px; }
.estprop-sum th { text-align: left; font-weight: 400; color: #3a424b; padding: 5px 0; }
.estprop-sum td { text-align: right; padding: 5px 0; white-space: nowrap; }
.estprop-sum__row--discount td { color: var(--estprop-ok); }
.estprop-sum__row--tax_included th, .estprop-sum__row--tax_included td { color: var(--estprop-muted); font-size: 13px; }
.estprop-sum__total + .estprop-sum__row--tax_included th, .estprop-sum__total + .estprop-sum__row--tax_included td { padding-top: 6px; }
.estprop-sum__total th, .estprop-sum__total td { font-size: 20px; font-weight: 700; border-top: 2px solid var(--estprop-ink); padding-top: 10px; color: var(--estprop-ink); }
.estprop-schedule-box { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--estprop-line); border-radius: 6px; }
.estprop-schedule-box h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--estprop-muted); margin-bottom: 6px; }
.estprop-sched { width: 100%; border-collapse: collapse; font-size: 13px; }
.estprop-sched td { padding: 4px 0; }
.estprop-sched__n { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: var(--estprop-soft); align-items: center; justify-content: center; font-size: 11px; margin-right: 4px; }
.estprop-sched__pct { color: var(--estprop-muted); text-align: right; padding-right: 12px !important; }
.estprop-sched__amt { text-align: right; font-weight: 600; white-space: nowrap; }
.estprop-deposit-line { text-align: right; font-size: 14px; }

/* Sign */
.estprop-sign { margin-top: 28px; padding: 24px; border: 2px solid var(--estprop-brand); border-radius: 10px; }
.estprop-due { margin: 0 0 16px; padding: 10px 14px; background: var(--estprop-soft); border-radius: 6px; }
.estprop-label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.estprop-input { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #c5ccd3; border-radius: 6px; background: #fff; }
.estprop-input:focus { outline: 2px solid var(--estprop-brand); outline-offset: 1px; border-color: transparent; }
.estprop-input.is-invalid { border-color: #c62828; outline-color: #c62828; }
.estprop-sigtabs { display: inline-flex; gap: 2px; margin: 16px 0 8px; background: var(--estprop-soft); padding: 3px; border-radius: 6px; }
.estprop-sigtabs button { border: 0; background: none; font: inherit; font-size: 13px; padding: 6px 14px; border-radius: 4px; cursor: pointer; color: var(--estprop-muted); }
.estprop-sigtabs button.is-active { background: #fff; color: var(--estprop-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.estprop-sigpad { position: relative; border: 1px dashed #9aa5b1; border-radius: 8px; background: #fcfdfd; }
.estprop-sigpad canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.estprop-sigpad.is-typed canvas { cursor: default; }
.estprop-sigpad__hint { position: absolute; left: 0; right: 0; bottom: 40%; text-align: center; color: #a0a9b3; pointer-events: none; font-size: 14px; }
.estprop-sigpad.has-ink .estprop-sigpad__hint, .estprop-sigpad.is-typed .estprop-sigpad__hint { display: none; }
.estprop-sigpad .estprop-link { position: absolute; right: 10px; bottom: 6px; }
.estprop-agree { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font-size: 14px; }
.estprop-agree input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--estprop-brand); }
.estprop-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }

.estprop-btn { display: inline-block; font: inherit; font-weight: 600; padding: 11px 22px; border-radius: 6px; border: 1px solid var(--estprop-brand); cursor: pointer; text-decoration: none; background: #fff; color: var(--estprop-brand); }
.estprop-btn--primary { background: var(--estprop-brand); color: #fff; }
.estprop-btn--primary:hover { filter: brightness(1.1); }
.estprop-btn--ghost { background: #fff; }
.estprop-btn:disabled { opacity: .6; cursor: wait; }
.estprop-link { background: none; border: 0; font: inherit; font-size: 13px; color: var(--estprop-brand); cursor: pointer; text-decoration: underline; padding: 4px; }
.estprop-link--muted { color: var(--estprop-muted); }

/* Signed / pay */
.estprop-signed__img { max-width: 320px; max-height: 110px; display: block; border-bottom: 1px solid var(--estprop-ink); margin-bottom: 6px; }
.estprop-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.estprop-method { padding: 12px 14px; background: var(--estprop-soft); border-radius: 6px; font-size: 14px; }
.estprop-method p { margin: 6px 0 0; color: #3a424b; }

.estprop-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--estprop-line); font-size: 12px; color: var(--estprop-muted); text-align: center; }

/* ==========================================================================
   Design: Modern  (body.estprop-design-modern)
   ========================================================================== */
body.estprop-proposal-body.estprop-design-modern { background: #eef0f4; }
.estprop-design-modern .estprop-doc { border-top: 0; border-radius: 16px; overflow: hidden; padding: 0 48px 40px; box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 18px 40px rgba(16,24,40,.08); }
.estprop-design-modern .estprop-head { margin: 0 -48px; padding: 36px 48px 32px; background: var(--estprop-brand); color: #fff; border-bottom: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.estprop-design-modern .estprop-logo { background: #fff; padding: 8px 12px; border-radius: 10px; max-height: 72px; }
.estprop-design-modern .estprop-company { color: #fff; font-size: 26px; }
.estprop-design-modern .estprop-contact { color: rgba(255,255,255,.82); }
.estprop-design-modern .estprop-doc-type { color: #fff; opacity: .85; }
.estprop-design-modern .estprop-head__meta dt { color: rgba(255,255,255,.72); }
.estprop-design-modern .estprop-head__meta dd { color: #fff; }
.estprop-design-modern .estprop-banner { margin-top: 24px; border-radius: 10px; }
.estprop-design-modern .estprop-parties { gap: 16px; padding: 24px 0 0; border-bottom: 0; }
.estprop-design-modern .estprop-parties > div { background: var(--estprop-soft); border-radius: 12px; padding: 16px 18px; }
.estprop-design-modern .estprop-project-title { font-size: 22px; }
.estprop-design-modern .estprop-section { padding-top: 32px; }
.estprop-design-modern .estprop-section > h2 { font-size: 20px; letter-spacing: 0; text-transform: none; color: var(--estprop-ink); padding-left: 12px; border-left: 4px solid var(--estprop-brand); }
.estprop-design-modern .estprop-items thead th { border-bottom-color: var(--estprop-brand); }
.estprop-design-modern .estprop-items .estprop-items__section th, .estprop-design-modern .estprop-items .estprop-items__section td { background: var(--estprop-soft); padding: 10px 12px !important; border-bottom: 0; }
.estprop-design-modern .estprop-items td:first-child { padding-left: 12px; }
.estprop-design-modern .estprop-items td:last-child { padding-right: 12px; }
.estprop-design-modern .estprop-options { border-radius: 12px; }
.estprop-design-modern .estprop-option { border-radius: 10px; }
.estprop-design-modern .estprop-sum__total th, .estprop-design-modern .estprop-sum__total td { background: var(--estprop-brand); color: #fff; border-top: 0; padding: 14px 16px; font-size: 22px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.estprop-design-modern .estprop-sum__total th { border-radius: 10px 0 0 10px; }
.estprop-design-modern .estprop-sum__total td { border-radius: 0 10px 10px 0; }
.estprop-design-modern .estprop-sum th { padding-left: 16px; }
.estprop-design-modern .estprop-sum td { padding-right: 16px; }
.estprop-design-modern .estprop-schedule-box { border-radius: 12px; background: var(--estprop-soft); border: 0; }
.estprop-design-modern .estprop-sched__n { background: var(--estprop-brand); color: #fff; }
.estprop-design-modern .estprop-sign { border: 0; background: var(--estprop-soft); border-radius: 16px; }
.estprop-design-modern .estprop-due { background: #fff; border-radius: 10px; }
.estprop-design-modern .estprop-btn { border-radius: 999px; }
.estprop-design-modern .estprop-method { border-radius: 12px; }

/* ==========================================================================
   Design: Minimal  (body.estprop-design-minimal)
   ========================================================================== */
body.estprop-proposal-body.estprop-design-minimal { background: #fff; }
.estprop-design-minimal .estprop-toolbar { max-width: 780px; }
.estprop-design-minimal .estprop-doc { max-width: 780px; border-top: 0; box-shadow: none; border-radius: 0; padding: 40px 24px 56px; }
.estprop-design-minimal .estprop-head { padding-bottom: 28px; border-bottom: 1px solid var(--estprop-ink); }
.estprop-design-minimal .estprop-company { color: var(--estprop-ink); font-weight: 600; font-size: 24px; letter-spacing: -.01em; }
.estprop-design-minimal .estprop-doc-type { color: var(--estprop-ink); letter-spacing: .3em; font-weight: 600; font-size: 12px; }
.estprop-design-minimal .estprop-head__meta dd { font-weight: 500; }
.estprop-design-minimal .estprop-banner { background: none; border: 1px solid var(--estprop-line); color: var(--estprop-ink); border-radius: 0; }
.estprop-design-minimal .estprop-parties { padding: 32px 0; border-bottom: 0; }
.estprop-design-minimal .estprop-project-title { font-size: 22px; font-weight: 600; }
.estprop-design-minimal .estprop-section { padding-top: 40px; }
.estprop-design-minimal .estprop-section > h2 { color: var(--estprop-muted); font-size: 11px; letter-spacing: .24em; font-weight: 600; margin-bottom: 18px; }
.estprop-design-minimal .estprop-items thead th { border-bottom: 1px solid var(--estprop-ink); font-weight: 600; }
.estprop-design-minimal .estprop-items td { border-bottom-color: #f0f1f3; padding: 12px 0; }
.estprop-design-minimal .estprop-items .estprop-items__section th, .estprop-design-minimal .estprop-items .estprop-items__section td { font-weight: 600; padding-top: 24px !important; border-bottom-color: var(--estprop-line); }
.estprop-design-minimal .estprop-options { background: none; border: 1px solid var(--estprop-line); border-radius: 0; }
.estprop-design-minimal .estprop-option { border-radius: 0; }
.estprop-design-minimal .estprop-option.is-on { border-color: var(--estprop-ink); box-shadow: inset 2px 0 0 var(--estprop-ink); }
.estprop-design-minimal .estprop-sum__total th, .estprop-design-minimal .estprop-sum__total td { border-top-width: 1px; font-weight: 600; font-size: 24px; letter-spacing: -.01em; }
.estprop-design-minimal .estprop-schedule-box { border-radius: 0; border-color: var(--estprop-line); }
.estprop-design-minimal .estprop-sched__n { background: none; border: 1px solid var(--estprop-line); }
.estprop-design-minimal .estprop-sign { border: 1px solid var(--estprop-ink); border-radius: 0; }
.estprop-design-minimal .estprop-due, .estprop-design-minimal .estprop-method { background: none; border: 1px solid var(--estprop-line); border-radius: 0; }
.estprop-design-minimal .estprop-btn { border-radius: 0; }
.estprop-design-minimal .estprop-btn--primary { background: var(--estprop-ink); border-color: var(--estprop-ink); }
.estprop-design-minimal .estprop-btn--ghost { color: var(--estprop-ink); border-color: var(--estprop-ink); }
.estprop-design-minimal a { color: var(--estprop-ink); }
.estprop-design-minimal .estprop-foot { border-top-color: var(--estprop-ink); }

/* Font pairing tweaks */
.estprop-font-construction h2, .estprop-font-construction .estprop-doc-type { letter-spacing: .06em; }
.estprop-font-construction .estprop-company, .estprop-font-construction .estprop-project-title { text-transform: uppercase; letter-spacing: .02em; }
.estprop-font-construction .estprop-section > h2 { font-size: 15px; }
.estprop-font-construction.estprop-design-modern .estprop-section > h2 { font-size: 22px; text-transform: uppercase; }
.estprop-font-formal .estprop-company, .estprop-font-formal .estprop-project-title { font-weight: 600; }

@media (max-width: 640px) {
	.estprop-doc { padding: 24px 18px; border-radius: 0; }
	.estprop-head { flex-direction: column; }
	.estprop-head__meta { text-align: left; }
	.estprop-parties { grid-template-columns: 1fr; gap: 16px; }
	.estprop-totals-wrap { max-width: none; }
	.estprop-sign { padding: 16px; }
	.estprop-actions .estprop-btn { width: 100%; text-align: center; }
	.estprop-design-modern .estprop-doc { padding: 0 18px 24px; border-radius: 0; }
	.estprop-design-modern .estprop-head { margin: 0 -18px; padding: 24px 18px; }
	.estprop-design-modern .estprop-parties { grid-template-columns: 1fr; }
}

@media print {
	body.estprop-proposal-body { background: #fff; font-size: 12px; }
	.estprop-doc { box-shadow: none; border-radius: 0; padding: 0; margin: 0; max-width: none; border-top-width: 4px; }
	.estprop-toolbar, .estprop-preview-bar, .estprop-sign, .estprop-options .estprop-muted { display: none !important; }
	.estprop-option { break-inside: avoid; }
	.estprop-option:not(.is-on) { display: none; }
	.estprop-section, .estprop-items tr, .estprop-totals-wrap, .estprop-signed { break-inside: avoid; }
	a { color: inherit; text-decoration: none; }
	.estprop-design-modern .estprop-doc { padding: 0; border-radius: 0; }
	.estprop-design-modern .estprop-head { margin: 0 0 4px; padding: 20px 22px; border-radius: 8px; }
	.estprop-design-modern .estprop-items .estprop-items__section th, .estprop-design-modern .estprop-items .estprop-items__section td, .estprop-design-modern .estprop-parties > div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	@page { margin: 16mm 14mm; }
}

/* Card payment (Stripe) */
.estprop-card-pay { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border: 2px solid var(--estprop-brand); border-radius: 10px; }
.estprop-card-pay strong { display: block; font-size: 17px; }
@media print { .estprop-card-pay { display: none; } }

/* Photos & documents */
.estprop-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.estprop-gallery figure { margin: 0; }
.estprop-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 1px solid #e3e6ea; background: #f4f6f8; }
.estprop-gallery figcaption { font-size: 13px; color: #5f6872; margin-top: 5px; line-height: 1.4; }
.estprop-files { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.estprop-files a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e3e6ea; border-radius: 6px; text-decoration: none; color: inherit; }
.estprop-files a:hover { border-color: var(--estprop-brand); }
.estprop-files__ext { flex: none; min-width: 44px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 6px 4px; border-radius: 4px; background: var(--estprop-brand); color: #fff; }
.estprop-files small { color: #5f6872; margin-left: 6px; }
.estprop-design-minimal .estprop-gallery img, .estprop-design-minimal .estprop-files a { border-radius: 0; }
@media print { .estprop-gallery { grid-template-columns: repeat(3, 1fr); } .estprop-gallery img { break-inside: avoid; } }
