/**
 * BusinessZindagi Smart Invoice – premium SaaS styles
 */
.bz-si { overflow-x: hidden; }
.bz-si-hero { margin-bottom: 12px; }
.bz-si-features {
	display: flex; flex-wrap: wrap; gap: 10px 18px;
	margin: 12px 0 20px; font-size: 0.92rem; font-weight: 600; color: var(--bz-text);
}
.bz-si-home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.bz-si-home-actions .bz-btn { min-height: 48px; }

.bz-si-stepper {
	display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
	gap: 0; margin: 8px 0 22px; padding: 14px 10px;
	background: var(--bz-card-bg); border: 1px solid var(--bz-border);
	border-radius: 16px; box-shadow: var(--bz-shadow);
}
.bz-si-step {
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	background: transparent; border: none; cursor: pointer; padding: 6px 8px;
	min-width: 56px; font-family: inherit; color: var(--bz-text-muted);
}
.bz-si-step-num {
	width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center;
	justify-content: center; font-weight: 700; font-size: 0.85rem; background: #e9ecef; color: #495057;
}
.bz-si-step.is-active .bz-si-step-num {
	background: linear-gradient(135deg, var(--bz-primary), var(--bz-secondary));
	color: #fff; box-shadow: 0 4px 12px rgba(13,110,253,.35);
}
.bz-si-step.is-active { color: var(--bz-primary); font-weight: 600; }
.bz-si-step.is-done .bz-si-step-num { background: #198754; color: #fff; }
.bz-si-step-lbl { font-size: 0.7rem; font-weight: 600; }
.bz-si-step-line { flex: 1 1 12px; height: 3px; min-width: 8px; max-width: 36px; background: #dee2e6; border-radius: 2px; }

.bz-si-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
	gap: 22px; align-items: start;
}
.bz-si-form, .bz-si-preview-col { min-width: 0; }
.bz-si-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-si-hint { font-size: 0.85rem; color: var(--bz-text-muted); margin: 0 0 14px; line-height: 1.45; }
.bz-si-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 16px; }
.bz-si-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px 16px; }
.bz-si-span2 { grid-column: 1 / -1; }
.bz-si .bz-form-group { margin-bottom: 0; }
.bz-si .bz-input { min-height: 44px; }
.bz-si-logo-preview img { max-height: 64px; margin-top: 8px; border-radius: 8px; }

.bz-si-table-wrap {
	width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
	border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 12px; background: #fff;
}
.bz-si-table {
	width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; font-size: 0.85rem;
}
.bz-si-table th {
	background: #f1f5f9; padding: 10px 6px; text-align: left; font-weight: 700;
	font-size: 0.72rem; color: #334155; border-bottom: 1px solid #e2e8f0; white-space: nowrap;
}
.bz-si-table td { padding: 6px 4px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.bz-si-table .bz-input { min-height: 38px; padding: 6px 8px; font-size: 13px; width: 100%; }
.si-amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; padding-right: 6px !important; }

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

.bz-si-pay-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.bz-si-check {
	display: flex; align-items: center; gap: 8px; padding: 10px 12px;
	border: 1.5px solid #e2e8f0; border-radius: 10px; font-weight: 600; font-size: 0.9rem;
	cursor: pointer; background: #fff;
}
.bz-si-check input { accent-color: var(--bz-primary); width: 16px; height: 16px; }

.bz-si-nav {
	display: flex; justify-content: space-between; gap: 12px; margin-top: 18px;
	padding-top: 16px; border-top: 1px solid rgba(0,0,0,.06); flex-wrap: wrap;
}
.bz-si-actions {
	display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px;
}
.bz-si-actions .bz-btn { min-height: 46px; }

.bz-si-preview-sticky {
	position: sticky; top: 16px; max-height: calc(100vh - 32px);
	display: flex; flex-direction: column; overflow: hidden;
}
.bz-si-preview-bar {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 10px; flex-shrink: 0;
}
.bz-si-a4 {
	font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 6px;
	background: #e2e8f0; color: #475569;
}
.bz-si-sheet {
	background: #fff; color: #111; border: 1px solid #e2e8f0; border-radius: 12px;
	padding: 16px; font-size: 0.78rem; line-height: 1.45; overflow: auto;
	flex: 1; min-height: 220px; max-height: calc(100vh - 100px);
}
.bz-si-sheet .si-doc-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.bz-si-sheet .si-doc-title { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.04em; }
.bz-si-sheet .si-doc-co { font-weight: 700; margin-top: 4px; word-break: break-word; }
.bz-si-sheet .si-doc-muted { color: #555; font-size: 0.72rem; word-break: break-word; }
.bz-si-sheet .si-doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.bz-si-sheet .si-doc-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.bz-si-sheet .si-doc-table th,
.bz-si-sheet .si-doc-table td { border: 1px solid #ddd; padding: 6px; font-size: 0.72rem; word-break: break-word; }
.bz-si-sheet .si-doc-table th { background: #f5f7fb; }
.bz-si-sheet .si-doc-totals { text-align: right; }
.bz-si-sheet .si-doc-grand { font-size: 0.95rem; font-weight: 700; }
.bz-si-sheet .si-doc-sign { margin-top: 22px; border-top: 1px solid #999; width: 140px; padding-top: 6px; font-size: 0.7rem; }
.bz-si-sheet .si-doc-foot { margin-top: 12px; font-size: 0.65rem; color: #666; }
.bz-si-sheet.theme-blue .si-doc-title { color: #0d6efd; }
.bz-si-sheet.theme-green .si-doc-title { color: #198754; }
.bz-si-sheet.theme-corporate .si-doc-title { color: #1e3a5f; }
.bz-si-sheet.theme-minimal .si-doc-table th { background: #fafafa; }

.bz-si-invoice-list { display: grid; gap: 10px; margin: 12px 0 16px; }
.bz-si-inv-card {
	display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
	padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff;
}
.bz-si-inv-card strong { font-size: 0.95rem; }
.bz-si-inv-meta { font-size: 0.8rem; color: var(--bz-text-muted); }

.bz-tools-wrapper.bz-dark .bz-si-sheet { background: #0f172a; color: #e2e8f0; border-color: #334155; }
.bz-tools-wrapper.bz-dark .bz-si-sheet .si-doc-table th { background: #1e293b; }
.bz-tools-wrapper.bz-dark .bz-si-sheet .si-doc-table th,
.bz-tools-wrapper.bz-dark .bz-si-sheet .si-doc-table td { border-color: #334155; }
.bz-tools-wrapper.bz-dark .bz-si-totals { background: #1e293b; border-color: #334155; }
.bz-tools-wrapper.bz-dark .bz-si-check { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.bz-tools-wrapper.bz-dark .bz-si-table th { background: #1e293b; color: #e2e8f0; }

@media (max-width: 1024px) {
	.bz-si-layout { grid-template-columns: 1fr; }
	.bz-si-preview-sticky { position: static; max-height: none; }
	.bz-si-sheet { max-height: none; }
	.bz-si-grid3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
	.bz-si-grid2, .bz-si-grid3 { grid-template-columns: 1fr; }
	.bz-si-step { min-width: 44px; }
	.bz-si-step-lbl { display: none; }
	.bz-si-nav { flex-direction: column; }
	.bz-si-nav .bz-btn, .bz-si-actions .bz-btn { width: 100%; }
	.bz-si-sheet .si-doc-parties { grid-template-columns: 1fr; }
}
@media print {
	.bz-back-link, .bz-si-stepper, .bz-si-form, .bz-si-home, .bz-si-actions,
	.bz-si-nav, .bz-reco-card, .bz-continue-learning, .bz-calc-note, .bz-si-list-panel {
		display: none !important;
	}
	.bz-si-preview-col, .bz-si-sheet { box-shadow: none !important; border: none !important; max-height: none !important; }
}


/* ===== Smart Invoice action buttons – fixed height, no clip ===== */
.bz-si-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 20px 0 8px;
	align-items: stretch;
}
.bz-si-actions .bz-si-btn,
.bz-si-actions .bz-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px;
	min-height: 52px !important;
	height: auto !important;
	padding: 12px 20px !important;
	line-height: 1.25 !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	border-radius: 12px !important;
	white-space: nowrap;
	box-sizing: border-box;
	overflow: visible !important;
	text-overflow: clip;
	vertical-align: middle;
}
.bz-si-btn-ico {
	flex: 0 0 auto;
	font-size: 1.1rem;
	line-height: 1;
	display: inline-flex;
	align-items: center;
}
.bz-si-btn-txt {
	line-height: 1.25;
	display: inline-block;
}
.bz-si-home-actions .bz-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 52px !important;
	padding: 12px 22px !important;
	line-height: 1.25 !important;
	border-radius: 12px !important;
	font-weight: 600 !important;
}
.bz-si-nav .bz-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 48px !important;
	padding: 12px 20px !important;
	line-height: 1.25 !important;
	border-radius: 12px !important;
}

@media (max-width: 640px) {
	.bz-si-actions .bz-si-btn,
	.bz-si-actions .bz-btn {
		width: 100%;
		min-height: 52px !important;
	}
}

/* Print: only invoice content */
@media print {
	body * { visibility: hidden !important; }
	#si-preview, #si-preview * { visibility: visible !important; }
	#si-preview {
		position: absolute !important;
		left: 0 !important;
		top: 0 !important;
		width: 100% !important;
		max-height: none !important;
		overflow: visible !important;
		box-shadow: none !important;
		border: none !important;
		background: #fff !important;
		color: #111 !important;
		padding: 0 !important;
	}
	.bz-back-link, .bz-si-stepper, .bz-si-form, .bz-si-home, .bz-si-actions,
	.bz-si-nav, .bz-reco-card, .bz-continue-learning, .bz-calc-note, .bz-si-list-panel,
	.bz-si-preview-bar, .bz-si-preview-sticky > .bz-si-preview-bar {
		display: none !important;
		visibility: hidden !important;
	}
}

/* Tax summary in live preview + PDF/print clone */
.bz-si-sheet .si-totals-block { margin-top: 12px; max-width: 300px; margin-left: auto; }
.bz-si-sheet .si-tax-summary { margin-top: 10px; border-top: 1px solid #e2e8f0; padding-top: 8px; }
.bz-si-sheet .si-tax-summary-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.bz-si-sheet .si-tax-sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 0.78rem; }
.bz-si-sheet .si-tax-sum-total { border-top: 1px solid #ccc; margin-top: 4px; padding-top: 6px; font-weight: 700; }
