.sda-tool-card-icon--edit-text {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6c453' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M7 8h6'/%3E%3Cpath d='M7 12h4'/%3E%3Cpath d='m13 15 5-5'/%3E%3Cpath d='m12 16 1.5-.3L18 11.2'/%3E%3C/svg%3E");
}

.sda-form--pdf-text {
	grid-template-columns: 1fr;
	gap: 18px;
}

.sda-form--pdf-text .sda-panel--source,
.sda-form--pdf-text .sda-panel--result {
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.sda-pdf-text-controls,
.sda-pdf-text-workspace {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.sda-pdf-text-shell {
	padding: 16px 18px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 22px;
	background:
		radial-gradient(circle at top left, rgba(246, 196, 83, 0.14), transparent 34%),
		linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.96));
	box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.sda-pdf-text-shell-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
}

.sda-pdf-text-shell-copy {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.sda-pdf-text-shell-copy .sda-back-btn {
	align-self: flex-start;
}

.sda-pdf-text-shell-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.sda-docs-summary--pdf-text {
	margin-top: 12px;
}

.sda-pdf-text-editor {
	display: grid;
	grid-template-columns: 126px minmax(0, 1fr) 286px;
	gap: 16px;
	align-items: stretch;
	min-height: 780px;
}

.sda-pdf-text-sidebar,
.sda-pdf-text-inspector {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	border-radius: 22px;
}

.sda-pdf-text-sidebar {
	background: linear-gradient(180deg, #f6f9fc, #eef3f8);
	border: 1px solid rgba(15, 23, 42, 0.08);
}

.sda-pdf-text-sidebar-head,
.sda-pdf-text-nav,
.sda-pdf-text-statusbar,
.sda-pdf-text-topbar,
.sda-pdf-text-toolset,
.sda-pdf-text-actions,
.sda-pdf-text-style-row,
.sda-pdf-text-ai-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sda-pdf-text-sidebar-head,
.sda-pdf-text-statusbar,
.sda-pdf-text-topbar {
	justify-content: space-between;
}

.sda-pdf-text-topbar {
	align-items: flex-start;
}

.sda-pdf-text-pages {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 710px;
	overflow: auto;
	padding-right: 2px;
}

.sda-pdf-text-page {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 10px;
	padding: 10px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.9);
	text-align: left;
	cursor: pointer;
	transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.sda-pdf-text-page:hover,
.sda-pdf-text-page.is-active {
	transform: translateY(-1px);
	border-color: rgba(246, 196, 83, 0.8);
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

.sda-pdf-text-page-thumb {
	display: block;
	width: 52px;
	height: 68px;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.08);
}

.sda-pdf-text-page-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sda-pdf-text-page-copy {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.sda-pdf-text-page-num {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

.sda-pdf-text-page-meta,
.sda-pdf-text-page-origin,
.sda-pdf-text-shortcuts,
.sda-pdf-text-inspector-meta,
.sda-pdf-text-inspector-hint {
	font-size: 12px;
	line-height: 1.5;
	color: #5b677a;
}

.sda-pdf-text-main {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 14px;
	border-radius: 24px;
	background:
		radial-gradient(circle at top right, rgba(246, 196, 83, 0.12), transparent 26%),
		linear-gradient(180deg, #132033, #0b1220);
	box-shadow: 0 26px 54px rgba(15, 23, 42, 0.20);
}

.sda-pdf-text-topbar {
	padding: 10px 12px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.sda-pdf-text-toolset,
.sda-pdf-text-actions {
	flex-wrap: nowrap;
}

.sda-pdf-text-toolset {
	overflow-x: auto;
	padding-bottom: 2px;
	scrollbar-width: thin;
}

.sda-pdf-text-actions {
	flex: 0 0 auto;
}

.sda-pdf-text-tool {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	padding: 0;
	box-sizing: border-box;
	border-radius: 13px;
	border: 1px solid rgba(255, 255, 255, 0.09);
	background: rgba(255, 255, 255, 0.06);
	color: #f8fafc;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.sda-pdf-text-tool:hover:not(:disabled),
.sda-pdf-text-tool.is-active {
	transform: translateY(-1px);
	background: rgba(246, 196, 83, 0.18);
	border-color: rgba(246, 196, 83, 0.64);
}

.sda-pdf-text-tool--primary {
	background: linear-gradient(135deg, #f6c453, #f59e0b);
	color: #111827;
	border-color: transparent;
	box-shadow: 0 10px 20px rgba(245, 158, 11, 0.28);
}

.sda-pdf-text-tool:disabled {
	opacity: .45;
	cursor: not-allowed;
	transform: none;
}

.sda-pdf-text-stage-shell {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	border-radius: 22px;
	background: linear-gradient(180deg, rgba(9, 15, 28, 0.28), rgba(9, 15, 28, 0.42));
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 14px;
}

.sda-pdf-text-statusbar {
	padding: 0 4px 12px;
}

.sda-pdf-text-status-copy {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sda-pdf-text-statusbar .sda-pdf-title,
.sda-pdf-text-statusbar .sda-pdf-subtitle,
.sda-pdf-text-statusbar .sda-pdf-text-shortcuts {
	color: #d8e1ef;
}

.sda-pdf-text-stage {
	flex: 1;
	min-height: 660px;
	max-height: 740px;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	overflow: auto;
	padding: 20px;
	border-radius: 20px;
	background:
		repeating-linear-gradient(45deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04) 12px, rgba(255,255,255,0.02) 12px, rgba(255,255,255,0.02) 24px),
		linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.sda-pdf-text-stage canvas {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.sda-pdf-empty--editor {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 660px;
	padding: 12px;
	border: 0;
	background: transparent;
}

.sda-upload-zone--editor {
	width: min(100%, 820px);
	min-height: 420px;
	border-radius: 30px;
	background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
	border: 1px dashed rgba(255, 255, 255, 0.24);
	color: #eff6ff;
}

.sda-upload-zone--editor .sda-upload-title,
.sda-upload-zone--editor .sda-upload-hint {
	color: inherit;
}

.sda-pdf-text-inspector {
	background: linear-gradient(180deg, #101a2a, #0a101b);
	color: #e5edf8;
	border: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sda-pdf-text-inspector .sda-section-label,
.sda-pdf-text-inspector .sda-editor-control span,
.sda-pdf-text-inspector .sda-check span {
	color: #eff6ff;
}

.sda-pdf-text-inspector .sda-input,
.sda-pdf-text-inspector .sda-select {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.12);
	color: #f8fafc;
}

.sda-pdf-text-inspector .sda-input::placeholder {
	color: rgba(226, 232, 240, 0.54);
}

.sda-pdf-text-inspector .sda-input:disabled,
.sda-pdf-text-inspector .sda-select:disabled {
	opacity: .55;
}

.sda-pdf-text-inspector-meta,
.sda-pdf-text-inspector-hint,
.sda-pdf-text-inspector-empty {
	padding: 12px 14px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.sda-pdf-text-inspector-panel {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sda-editor-control--stack {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sda-editor-control-grid--pdf-text {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sda-input--color {
	min-height: 42px;
	padding: 4px;
}

.sda-done-actions--pdf-text {
	justify-content: flex-start;
	flex-wrap: wrap;
}

.sda-pdf-text-ai-actions {
	flex-wrap: wrap;
}

.sda-pdf-text-ai-actions .sda-btn,
.sda-done-actions--pdf-text .sda-btn,
.sda-pdf-text-nav .sda-btn {
	text-transform: none;
	letter-spacing: 0;
}

.sda-pdf-message--info {
	border-color: rgba(246, 196, 83, 0.24);
	background: rgba(246, 196, 83, 0.12);
	color: #fef3c7;
}

.sda-pdf-message--error {
	border-color: rgba(248, 113, 113, 0.28);
	background: rgba(248, 113, 113, 0.12);
	color: #fecaca;
}

@media (max-width: 1380px) {
	.sda-pdf-text-editor {
		grid-template-columns: 116px minmax(0, 1fr) 268px;
	}
}

@media (max-width: 1180px) {
	.sda-pdf-text-shell-head,
	.sda-pdf-text-editor {
		grid-template-columns: 1fr;
		display: flex;
		flex-direction: column;
	}

	.sda-pdf-text-toolset,
	.sda-pdf-text-actions {
		flex-wrap: wrap;
	}

	.sda-pdf-text-main,
	.sda-pdf-text-sidebar,
	.sda-pdf-text-inspector {
		min-height: auto;
	}

	.sda-pdf-text-pages {
		max-height: none;
	}
}

@media (max-width: 860px) {
	.sda-pdf-text-shell {
		padding: 18px;
	}

	.sda-pdf-text-shell-actions,
	.sda-pdf-text-topbar,
	.sda-pdf-text-statusbar {
		align-items: stretch;
	}

	.sda-pdf-text-toolset,
	.sda-pdf-text-actions {
		overflow: auto;
		padding-bottom: 2px;
	}

	.sda-pdf-text-stage {
		min-height: 420px;
		max-height: none;
		padding: 12px;
	}

	.sda-editor-control-grid--pdf-text {
		grid-template-columns: 1fr;
	}
}

/* v0.4 editor redesign: light green workspace with overlay rails. */
.sda-shell--pdf-text {
	background: #f7fbf2;
	border-color: #dfead3;
	box-shadow: 0 22px 70px rgba(52, 86, 48, 0.12);
}

.sda-form--pdf-text {
	display: block;
	width: 100%;
	gap: 12px;
}

.sda-pdf-text-controls {
	width: 100%;
	gap: 10px;
}

.sda-pdf-text-workspace,
.sda-form--pdf-text .sda-panel--source,
.sda-form--pdf-text .sda-panel--result {
	width: 100%;
	max-width: none;
}

.sda-form--pdf-text .sda-panel--result {
	min-height: auto;
	justify-content: stretch;
}

.sda-pdf-text-shell {
	padding: 12px 14px;
	border-color: #d7e7c8;
	border-radius: 8px;
	background: #fbfef7;
	box-shadow: 0 10px 28px rgba(72, 106, 60, 0.08);
}

.sda-pdf-text-shell-head {
	align-items: center;
}

.sda-pdf-text-shell-copy {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	column-gap: 14px;
	row-gap: 2px;
}

.sda-pdf-text-shell-copy .sda-back-btn {
	grid-row: 1 / span 2;
	border-color: #d8e6cc;
	background: #ffffff;
}

.sda-pdf-text-shell-copy .sda-home-kicker,
.sda-pdf-text-shell-copy .sda-home-sub {
	display: none;
}

.sda-pdf-text-shell-copy .sda-workspace-title {
	font-size: 18px;
	line-height: 1.2;
	color: #22331c;
}

.sda-pdf-text-shell-actions .sda-btn {
	border-radius: 8px;
}

.sda-docs-summary--pdf-text {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin-top: 10px;
}

.sda-docs-summary--pdf-text .sda-docs-summary-item {
	border-radius: 8px;
	background: #ffffff;
	border: 1px solid #e0ebd6;
}

.sda-pdf-text-editor {
	position: relative;
	display: block;
	min-height: min(980px, calc(100vh - 190px));
	border: 1px solid #d9e8ce;
	border-radius: 8px;
	background:
		linear-gradient(90deg, rgba(220, 236, 206, 0.82), transparent 120px),
		linear-gradient(180deg, #f5faef, #edf6e7);
	overflow: hidden;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.sda-pdf-text-main {
	width: 100%;
	min-height: min(980px, calc(100vh - 190px));
	padding: 14px 18px 18px 100px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.sda-pdf-text-sidebar {
	position: absolute;
	inset: 14px auto 14px 14px;
	z-index: 8;
	width: 70px;
	padding: 8px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.88);
	border-color: #d6e6c9;
	box-shadow: 0 16px 34px rgba(65, 93, 55, 0.12);
	backdrop-filter: blur(10px);
}

.sda-pdf-text-sidebar-head {
	justify-content: center;
}

.sda-pdf-text-sidebar-head > div:first-child,
.sda-pdf-text-sidebar > .sda-pdf-subtitle {
	display: none;
}

.sda-pdf-text-nav {
	flex-direction: column;
	gap: 6px;
}

.sda-pdf-text-nav .sda-btn {
	width: 36px;
	height: 32px;
	padding: 0;
	border-radius: 8px;
}

.sda-pdf-text-pages {
	max-height: calc(100% - 76px);
	padding: 2px 0;
	gap: 8px;
	overflow-x: hidden;
}

.sda-pdf-text-page {
	display: flex;
	width: 52px;
	min-height: 66px;
	padding: 5px;
	border-radius: 8px;
	background: #ffffff;
	border-color: #dce8d1;
	box-shadow: none;
}

.sda-pdf-text-page:hover,
.sda-pdf-text-page.is-active {
	transform: none;
	border-color: #8fb94c;
	box-shadow: 0 0 0 2px rgba(143, 185, 76, 0.18);
}

.sda-pdf-text-page-thumb {
	width: 40px;
	height: 56px;
	border-radius: 6px;
}

.sda-pdf-text-page-copy {
	display: none;
}

.sda-pdf-text-topbar {
	position: sticky;
	top: 0;
	z-index: 6;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	border-color: #d7e7c8;
	box-shadow: 0 10px 26px rgba(57, 84, 49, 0.10);
	backdrop-filter: blur(10px);
}

.sda-pdf-text-toolset {
	flex: 1 1 auto;
	gap: 8px;
}

.sda-pdf-text-actions {
	gap: 8px;
}

.sda-pdf-text-tool {
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	padding: 0;
	box-sizing: border-box;
	border-radius: 8px;
	border-color: #d7e4ca;
	background: #ffffff;
	color: #305326;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.sda-pdf-text-tool svg,
.sda-pdf-text-tool img.emoji {
	display: block;
	width: 1em;
	height: 1em;
	pointer-events: none;
	flex-shrink: 0;
}

.sda-pdf-text-tool:hover:not(:disabled),
.sda-pdf-text-tool.is-active {
	background: #e8f3dc;
	border-color: #8fb94c;
	color: #1f3c17;
	box-shadow: 0 0 0 3px rgba(143, 185, 76, 0.18);
}

.sda-pdf-text-tool--primary {
	background: #8fb94c;
	color: #ffffff;
	border-color: #8fb94c;
	box-shadow: 0 10px 22px rgba(93, 130, 50, 0.24);
}

.sda-pdf-text-tool--primary:hover:not(:disabled),
.sda-pdf-text-tool--primary.is-active {
	background: #789f3d;
	color: #ffffff;
}

.sda-pdf-text-tool:disabled {
	opacity: 0.38;
	pointer-events: none;
}

.sda-pdf-text-stage-shell {
	min-height: calc(100% - 58px);
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.sda-pdf-text-statusbar {
	display: grid;
	grid-template-columns: 1fr;
	gap: 4px;
	padding: 10px 2px 8px;
}

.sda-pdf-text-statusbar .sda-pdf-title {
	display: none;
}

.sda-pdf-text-statusbar .sda-pdf-subtitle {
	color: #48633f;
	font-size: 13px;
}

.sda-pdf-text-shortcuts {
	display: none;
}

.sda-pdf-text-stage,
.sda-pdf-empty--editor {
	min-height: calc(100vh - 290px);
	max-height: none;
	border-radius: 8px;
	background:
		linear-gradient(90deg, rgba(255, 255, 255, 0.68) 1px, transparent 1px),
		linear-gradient(180deg, #f9fcf5, #eef7e8);
	background-size: 28px 28px, auto;
	border: 1px solid #d9e8ce;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.sda-pdf-text-stage {
	padding: 18px 18px 18px 28px;
}

.sda-pdf-text-stage canvas {
	border-radius: 4px;
	box-shadow: 0 18px 42px rgba(63, 86, 54, 0.20);
}

.sda-upload-zone--editor {
	width: min(100%, 760px);
	min-height: 360px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.82);
	border-color: #bdd8a9;
	color: #27421f;
	box-shadow: 0 12px 30px rgba(70, 100, 56, 0.10);
}

.sda-upload-zone--editor .sda-upload-icon {
	color: #8fb94c;
}

.sda-upload-zone--editor .sda-upload-link {
	color: #6c9639;
}

.sda-pdf-text-inspector {
	position: absolute;
	top: 70px;
	right: 18px;
	z-index: 12;
	width: min(360px, calc(100% - 130px));
	max-height: calc(100% - 92px);
	overflow: auto;
	border-radius: 8px;
	background: #fbfff7;
	color: #26391e;
	border-color: #cfe3c0;
	box-shadow: 0 24px 60px rgba(54, 82, 45, 0.20);
	transform: translateX(calc(100% + 28px));
	opacity: 0;
	pointer-events: none;
	transition: transform .18s ease, opacity .18s ease;
}

.sda-pdf-text-editor.has-selection .sda-pdf-text-inspector {
	transform: translateX(0);
	opacity: 1;
	pointer-events: auto;
}

.sda-pdf-text-inspector .sda-section-label,
.sda-pdf-text-inspector .sda-editor-control span,
.sda-pdf-text-inspector .sda-check span {
	color: #26391e;
}

.sda-pdf-text-inspector .sda-input,
.sda-pdf-text-inspector .sda-select {
	background: #ffffff;
	border-color: #d8e7ce;
	color: #1d2c17;
}

.sda-pdf-text-inspector-meta,
.sda-pdf-text-inspector-hint,
.sda-pdf-text-inspector-empty {
	border-radius: 8px;
	background: #f2f8ec;
	border-color: #d8e7ce;
	color: #52664b;
}

.sda-pdf-message--info {
	border-color: #cfe3c0;
	background: #f2f8ec;
	color: #2f4b26;
}

.sda-pdf-message--error {
	border-color: #efb8b8;
	background: #fff4f4;
	color: #8a2020;
}

@media (max-width: 1180px) {
	.sda-pdf-text-editor {
		min-height: auto;
		overflow: visible;
	}

	.sda-pdf-text-main {
		padding: 86px 12px 12px;
		min-height: auto;
	}

	.sda-pdf-text-sidebar {
		inset: 12px 12px auto 12px;
		width: auto;
		height: 58px;
		flex-direction: row;
		align-items: center;
	}

	.sda-pdf-text-pages {
		flex-direction: row;
		max-height: none;
		overflow-x: auto;
	}

	.sda-pdf-text-nav {
		flex-direction: row;
	}

	.sda-pdf-text-inspector {
		position: fixed;
		top: auto;
		right: 14px;
		bottom: 14px;
		left: 14px;
		width: auto;
		max-height: min(74vh, 640px);
		transform: translateY(calc(100% + 24px));
	}

	.sda-pdf-text-editor.has-selection .sda-pdf-text-inspector {
		transform: translateY(0);
	}
}

@media (max-width: 760px) {
	.sda-pdf-text-shell-head {
		align-items: stretch;
		flex-direction: column;
	}

	.sda-docs-summary--pdf-text {
		grid-template-columns: 1fr;
	}

	.sda-pdf-text-main {
		padding-top: 82px;
	}

	.sda-pdf-text-topbar {
		overflow-x: auto;
	}

	.sda-pdf-text-stage,
	.sda-pdf-empty--editor {
		min-height: 520px;
	}
}
