.giapha-export-modal-open { overflow: hidden; }
.giapha-export-modal[hidden] { display: none !important; }
.giapha-export-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 18px;
	background: rgba(15, 23, 42, .64);
}
.giapha-export-dialog {
	width: min(1180px, 100%);
	max-height: calc(100vh - 36px);
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 25px 80px rgba(0, 0, 0, .32);
	overflow: hidden;
}
.giapha-export-header,
.giapha-export-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 16px;
	border-bottom: 1px solid #dfe5ed;
	background: #f8fafc;
}
.giapha-export-footer { border-top: 1px solid #dfe5ed; border-bottom: 0; flex-wrap: wrap; }
.giapha-export-header h2 { margin: 0; font-size: 20px; }
.giapha-export-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; font-size: 25px; cursor: pointer; }
.giapha-export-close:hover { background: #e8edf3; }
.giapha-export-body { min-height: 0; display: grid; grid-template-columns: minmax(285px, 340px) minmax(0, 1fr); }
.giapha-export-form { overflow: auto; padding: 15px; border-right: 1px solid #e1e6ed; background: #fbfcfd; }
.giapha-export-field { display: grid; gap: 5px; margin-bottom: 13px; }
.giapha-export-field > span:first-child,
.giapha-export-fieldset legend { font-weight: 650; color: #273247; }
.giapha-export-field input[type="text"],
.giapha-export-field input[type="search"],
.giapha-export-field select {
	width: 100%;
	min-height: 39px;
	border: 1px solid #c6cfda;
	border-radius: 7px;
	padding: 7px 9px;
	background: #fff;
	font: inherit;
}
.giapha-export-root { position: relative; }
.giapha-export-root__selected { padding: 7px 9px; border-left: 3px solid #7b3f1d; background: #fff; color: #47536a; font-size: 13px; }
.giapha-export-search__results { position: absolute; left: 0; right: 0; top: 100%; z-index: 12; max-height: 280px; overflow: auto; border: 1px solid #cbd3de; border-radius: 8px; background: #fff; box-shadow: 0 12px 30px rgba(15,23,42,.18); }
.giapha-export-search__item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 0; border-bottom: 1px solid #edf0f4; background: #fff; text-align: left; cursor: pointer; }
.giapha-export-search__item:hover { background: #f4f7fa; }
.giapha-export-search__photo { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #e7ecf2; font-weight: 700; }
.giapha-export-search__photo img { width: 100%; height: 100%; object-fit: cover; }
.giapha-export-search__text { min-width: 0; display: grid; }
.giapha-export-search__text strong,
.giapha-export-search__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.giapha-export-search__text small { color: #69758a; }
.giapha-export-search__empty { padding: 10px; color: #69758a; }
.giapha-export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.giapha-export-fieldset { margin: 0 0 13px; padding: 10px; border: 1px solid #d9e0e8; border-radius: 8px; background: #fff; }
.giapha-export-fieldset label { display: block; margin: 6px 0; }
.giapha-export-field small,
.giapha-export-fieldset small { color: #69758a; line-height: 1.35; }
.giapha-export-preview-pane { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #eef2f6; }
.giapha-export-status,
.giapha-export-summary { padding: 8px 11px; font-size: 13px; }
.giapha-export-status { background: #fff8e5; color: #735600; }
.giapha-export-status.is-error { background: #fff0f0; color: #9b1c1c; }
.giapha-export-status.is-warning { background: #fff8e5; color: #735600; }
.giapha-export-summary { color: #536075; background: #fff; border-bottom: 1px solid #dde3ea; }
.giapha-export-preview { min-height: 430px; overflow: auto; padding: 18px; }
.giapha-export-preview:empty::before { content: 'Chọn thiết lập và bấm “Xem trước” để dựng bản in.'; min-height: 300px; display: grid; place-items: center; color: #6a7689; text-align: center; }
.giapha-export-preview svg { display: block; max-width: none; height: auto; background: #fff; box-shadow: 0 5px 24px rgba(15,23,42,.16); }
.giapha-export-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.giapha-export-note { flex: 1 1 300px; color: #5f6b7e; font-size: 12px; }
.giapha-export-button { min-height: 38px; padding: 7px 13px; border: 1px solid #b9c2cf; border-radius: 7px; background: #fff; font: inherit; cursor: pointer; }
.giapha-export-button:hover { background: #f2f5f8; }
.giapha-export-button.is-primary { border-color: #7b3f1d; background: #7b3f1d; color: #fff; }
.giapha-export-button:disabled { opacity: .48; cursor: not-allowed; }
@media (max-width: 820px) {
	.giapha-export-modal { padding: 0; }
	.giapha-export-dialog { width: 100%; height: 100vh; max-height: none; border-radius: 0; }
	.giapha-export-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(420px, 1fr); overflow: auto; }
	.giapha-export-form { overflow: visible; border-right: 0; border-bottom: 1px solid #e1e6ed; }
	.giapha-export-preview-pane { min-height: 520px; }
}
@media (max-width: 520px) {
	.giapha-export-grid { grid-template-columns: 1fr; }
	.giapha-export-footer { align-items: stretch; }
	.giapha-export-actions { width: 100%; }
	.giapha-export-actions .giapha-export-button { flex: 1 1 130px; }
}
