/**
 * Window & Door Fabrication Quotation styles
 */
.bz-wq { overflow-x: hidden; }
.bz-wq-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.bz-wq-toolbar .bz-btn {
	display: inline-flex !important; align-items: center !important; min-height: 44px !important;
	padding: 10px 16px !important; border-radius: 12px !important; font-weight: 600 !important;
}
.bz-wq-history { margin-bottom: 20px; }
.bz-wq-layout {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
	gap: 22px; align-items: start;
}
.bz-wq-h { margin: 0 0 14px; font-size: 1.08rem; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid rgba(0,0,0,.07); }
.bz-wq-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 16px; }
.bz-wq-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px 16px; }
.bz-wq-span2 { grid-column: 1 / -1; }
.bz-wq .bz-form-group { margin-bottom: 0; }
.bz-wq .bz-input { min-height: 44px; }

.bz-wq-item {
	border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px; margin-bottom: 14px; background: #fafbfc;
}
.bz-wq-item-head {
	display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap;
}
.bz-wq-item-code {
	font-weight: 800; color: #1e40af; background: #dbeafe; padding: 4px 12px; border-radius: 8px; font-size: 0.9rem;
}
.bz-wq-item .bz-wq-grid2, .bz-wq-item .bz-wq-grid3 { margin-top: 8px; }
.bz-wq-item label { font-size: 0.75rem; font-weight: 600; color: #64748b; }

.bz-wq-totals {
	display: grid; gap: 8px; background: #f8fafc; border: 1px solid #e2e8f0;
	padding: 14px 16px; border-radius: 12px; margin-top: 16px;
}
.bz-wq-totals > div { display: flex; justify-content: space-between; gap: 12px; }
.bz-wq-grand { font-size: 1.08rem; font-weight: 700; color: var(--bz-primary); padding-top: 8px; border-top: 1px solid #e2e8f0; }

.bz-wq-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.bz-wq-actions .bz-wq-btn {
	display: inline-flex !important; align-items: center !important; justify-content: center !important;
	min-height: 52px !important; padding: 12px 18px !important; border-radius: 12px !important;
	font-weight: 600 !important; white-space: nowrap;
}

.bz-wq-preview-sticky { position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.bz-wq-preview-bar { display: flex; justify-content: space-between; margin-bottom: 10px; }
.bz-wq-a4 { font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; background: #dbeafe; color: #1e40af; }
.bz-wq-sheet {
	background: #fff; color: #111; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px;
	font-size: 0.72rem; line-height: 1.4; overflow: auto; flex: 1; min-height: 240px; max-height: calc(100vh - 100px);
}
.bz-wq-sheet .wq-title { text-align: center; font-size: 1.15rem; font-weight: 800; letter-spacing: 0.08em; margin-bottom: 4px; }
.bz-wq-sheet .wq-co { text-align: right; font-weight: 700; font-size: 0.9rem; }
.bz-wq-sheet .wq-muted { color: #555; font-size: 0.68rem; }
.bz-wq-sheet .wq-meta-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.bz-wq-sheet .wq-meta-table th, .bz-wq-sheet .wq-meta-table td {
	border: 1px solid #333; padding: 5px 6px; text-align: left; font-size: 0.7rem;
}
.bz-wq-sheet .wq-meta-table th { background: #334155; color: #fff; }
.bz-wq-sheet .wq-line {
	display: grid; grid-template-columns: 36px 1fr 2fr 40px 55px 70px;
	border: 1px solid #333; border-top: none; font-size: 0.65rem;
}
.bz-wq-sheet .wq-line:first-of-type { border-top: 1px solid #333; }
.bz-wq-sheet .wq-line > div { padding: 6px; border-right: 1px solid #ccc; }
.bz-wq-sheet .wq-line > div:last-child { border-right: none; }
.bz-wq-sheet .wq-line-code { font-weight: 800; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.bz-wq-sheet .wq-sketch {
	min-height: 70px; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 4px;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	font-size: 0.6rem; color: #64748b; padding: 4px; text-align: center;
}
.bz-wq-sheet .wq-sketch strong { color: #0f172a; font-size: 0.65rem; }
.bz-wq-sheet .wq-tot-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.bz-wq-sheet .wq-tot-table td { border: 1px solid #333; padding: 5px 8px; font-size: 0.7rem; }
.bz-wq-sheet .wq-tot-table .wq-r { text-align: right; font-weight: 600; }
.bz-wq-sheet .wq-terms { margin-top: 14px; font-size: 0.65rem; white-space: pre-wrap; }
.bz-wq-sheet .wq-sign { display: flex; justify-content: space-between; margin-top: 28px; gap: 24px; }
.bz-wq-sheet .wq-sign div { border-top: 1px solid #333; min-width: 120px; padding-top: 6px; font-size: 0.65rem; }

@media (max-width: 1024px) {
	.bz-wq-layout { grid-template-columns: 1fr; }
	.bz-wq-preview-sticky { position: static; max-height: none; }
	.bz-wq-sheet { max-height: none; }
	.bz-wq-grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	.bz-wq-grid2, .bz-wq-grid3 { grid-template-columns: 1fr; }
	.bz-wq-actions .bz-btn { width: 100%; }
	.bz-wq-sheet .wq-line { grid-template-columns: 1fr; }
}
@media print {
	.bz-back-link, .bz-wq-toolbar, .bz-wq-form, .bz-wq-actions, .bz-calc-note, .bz-wq-preview-bar, .bz-wq-history {
		display: none !important;
	}
	.bz-wq-sheet { box-shadow: none !important; border: none !important; max-height: none !important; }
}
