/* ========================================================================
   PDFStack Toolkit
   Workspace flow, option widgets, PDF viewer, visual editor, modals,
   forms, maintenance page and ad slots. Pairs with main.css tokens.
   ===================================================================== */

/* ---------------------------------------------------------------------
   Workspace: 4-step flow
   ------------------------------------------------------------------- */
.workspace{
	max-width:var(--container);
	margin:0 auto;
	padding:16px 24px 72px;
}
.workspace-head{
	text-align:center;
	max-width:720px;
	margin:0 auto 28px;
}
.workspace-head h1{font-family:var(--font-display);font-size:clamp(1.7rem,3.4vw,2.4rem);margin:14px 0 10px}
.workspace-head p{color:var(--slate);font-size:1.06rem;line-height:1.7}
.workspace-panel{max-width:820px;margin:0 auto}

.upload-dropzone{
	display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
	padding:56px 24px;border:2px dashed var(--border);border-radius:var(--radius-lg);
	background:var(--mist);cursor:pointer;text-align:center;transition:border-color .2s,background .2s,transform .2s;
}
.upload-dropzone:hover{border-color:var(--primary-light)}
.upload-dropzone:focus-visible{outline:3px solid var(--primary-light);outline-offset:2px}
.upload-dropzone.is-dragover{border-color:var(--primary);background:var(--mist-2);transform:scale(1.01)}
.dropzone-icon{
	width:64px;height:64px;border-radius:18px;background:var(--white);
	display:grid;place-items:center;box-shadow:var(--shadow-md);color:var(--primary);
}
.upload-dropzone p{font-size:1.08rem;color:var(--ink)}
.link-strong{color:var(--primary);text-decoration:underline;text-underline-offset:3px}
.dropzone-hint{font-size:.85rem;color:var(--slate-light)}
.upload-dropzone.is-dragover .dropzone-icon{animation:bounce-soft .5s ease}
@keyframes bounce-soft{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}

.recent-files{margin-top:26px}
.recent-files h4{font-family:var(--font-display);font-size:.95rem;margin-bottom:10px;color:var(--slate)}
.recent-files ul{list-style:none}
.recent-files li{margin-bottom:6px}
.recent-files button{
	width:100%;display:flex;align-items:center;gap:10px;padding:10px 14px;
	background:var(--mist);border:1px solid var(--border);border-radius:var(--radius-sm);
	font:inherit;color:var(--ink);cursor:pointer;transition:border-color .15s,background .15s;
}
.recent-files button:hover{border-color:var(--primary-light);background:var(--mist-2)}
.recent-files button svg{color:var(--primary);flex:0 0 auto}

/* File list */
.file-preview-list{display:flex;flex-direction:column;gap:10px;margin-bottom:24px}
.file-preview-item{
	display:flex;align-items:center;gap:14px;padding:12px 14px;
	background:var(--white);border:1px solid var(--border);border-radius:var(--radius-md);
	transition:opacity .2s,transform .2s,box-shadow .2s;
}
.file-preview-item.is-dragging{opacity:.55;transform:scale(.985)}
.file-preview-item.is-active{border-color:var(--primary);box-shadow:var(--shadow-sm)}
.ficon{
	width:44px;height:52px;flex:0 0 auto;border-radius:8px 8px 8px 16px;
	background:linear-gradient(160deg,#EF4444,#DC2626);color:#fff;
	display:grid;place-items:center;font-size:1.15rem;font-weight:700;
	position:relative;overflow:hidden;
}
.ficon::after{content:"";position:absolute;top:4px;left:4px;right:4px;height:3px;border-radius:3px;background:rgba(255,255,255,.28)}
.file-preview-item[data-ext="docx"] .ficon{background:linear-gradient(160deg,#22C55E,#16A34A)}
.file-preview-item[data-ext="xlsx"] .ficon{background:linear-gradient(160deg,#22C55E,#16A34A)}
.file-preview-item[data-ext="pptx"] .ficon{background:linear-gradient(160deg,#F97316,#EA580C)}
.file-preview-item[data-ext="jpg"] .ficon,.file-preview-item[data-ext="png"] .ficon{background:linear-gradient(160deg,#A855F7,#9333EA)}
.fname{flex:1;min-width:0;font-weight:600;font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fsize{font-size:.8rem;color:var(--slate-light);font-family:var(--font-mono)}
.fremove{
	border:0;background:transparent;color:var(--slate-light);font-size:1.3rem;line-height:1;
	cursor:pointer;padding:4px 8px;border-radius:8px;transition:color .15s,background .15s;
}
.fremove:hover{color:#EF4444;background:rgba(239,68,68,.08)}

/* Options */
.tool-options{
	display:flex;flex-direction:column;gap:14px;margin-bottom:24px;
}
.tool-options:empty{display:none}
.option-row{
	display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;
	background:var(--white);border:1px solid var(--border);border-radius:var(--radius-md);
	padding:14px 18px;
}
.option-label{flex:1 1 180px;font-weight:600;font-size:.92rem;display:flex;align-items:center;gap:8px}
.option-label em{font-style:normal;font-family:var(--font-mono);font-size:.8rem;color:var(--primary)}
.option-hint{font-size:.78rem;color:var(--slate-light);font-weight:400}
.option-chip-group{display:flex;flex-wrap:wrap;gap:8px}
.option-chip{
	border:1px solid var(--border);background:var(--white);color:var(--slate);
	padding:7px 14px;border-radius:999px;font:600 .85rem var(--font-body);cursor:pointer;
	transition:all .15s;
}
.option-chip:hover{border-color:var(--primary-light);color:var(--primary)}
.option-chip.is-active{background:var(--primary);border-color:var(--primary);color:#fff}
.option-row select,
.option-row input[type="text"],
.option-row input[type="number"],
.option-row input[type="password"],
.option-row input[type="email"]{
	font:inherit;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius-sm);
	background:var(--white);color:var(--ink);min-width:220px;
}
.option-row input:focus,.option-row select:focus{outline:2px solid var(--primary-light);outline-offset:1px;border-color:var(--primary)}
.option-range input[type="range"]{flex:1 1 200px;accent-color:var(--primary)}
.option-checker{flex-direction:column;align-items:flex-start}
.option-checker .option-label{flex:none}
.checker-grid{
	display:grid;gap:2px;background:var(--border);border:1px solid var(--border);border-radius:var(--radius-sm);
	width:min(100%,520px);aspect-ratio:21/9.5;overflow:hidden;
}
.checker-cell{background:var(--white);cursor:pointer;transition:background .12s}
.checker-cell.is-checked{background:var(--primary)}

/* Signature pad (upload side) */
.sig-canvas-wrap{display:flex;flex-direction:column;gap:10px;width:100%}
.sig-canvas{border:1px dashed var(--border);border-radius:var(--radius-md);background:#FAFAFA;touch-action:none;width:100%;cursor:crosshair}
.sig-canvas[hidden]{display:none}

/* Cover erase canvas */
.cover-canvas-wrap{display:flex;flex-direction:column;gap:10px;width:100%}
.cover-canvas{border:1px dashed var(--border);border-radius:var(--radius-md);background:var(--mist);max-width:100%;touch-action:none;cursor:crosshair}
.erase-actions{display:flex;gap:10px;flex-wrap:wrap}

/* Page pickers */
.pick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:10px;width:100%}
.pick-page{
	position:relative;border:2px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;
	background:var(--mist);padding:0;cursor:pointer;transition:border-color .15s,transform .15s;
	aspect-ratio:3/4;
}
.pick-page:hover{transform:translateY(-2px)}
.pick-page.is-selected{border-color:var(--primary)}
.pick-page canvas{width:100%;height:100%;display:block;object-fit:contain;background:#fff}
.pick-num{
	position:absolute;top:6px;left:6px;background:rgba(15,23,42,.72);color:#fff;
	font:600 11px var(--font-mono);padding:2px 7px;border-radius:6px;pointer-events:none;
}
.pick-page.is-selected .pick-num{background:var(--primary)}

/* Reorder grid */
.reorder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:12px;width:100%}
.reorder-page{
	position:relative;border:2px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;
	background:var(--white);cursor:grab;transition:border-color .15s,transform .15s,box-shadow .2s;
	aspect-ratio:3/4;
}
.reorder-page:active{cursor:grabbing}
.reorder-page.is-dragging{opacity:.5}
.reorder-page.is-active{border-color:var(--primary);box-shadow:var(--shadow-md)}
.reorder-page canvas{width:100%;height:100%;display:block;object-fit:contain;background:#fff}
.reorder-thumb{position:absolute;top:6px;left:6px;background:rgba(15,23,42,.72);color:#fff;font:600 11px var(--font-mono);padding:2px 7px;border-radius:6px;pointer-events:none}

/* Processing */
.processing-visual{display:grid;place-items:center;margin-bottom:18px}
.progress-ring{transform:rotate(-90deg)}
.progress-ring-fill{stroke-dasharray:251.2;stroke-dashoffset:251.2;transition:stroke-dashoffset .3s ease}
#processing-label{text-align:center;font-family:var(--font-display);font-size:1.2rem}
.progress-bar{
	height:8px;border-radius:99px;background:var(--mist-2);overflow:hidden;margin:18px auto 12px;max-width:420px;
}
.progress-bar span{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,var(--primary),var(--cyan));transition:width .3s ease}
.processing-note{text-align:center;color:var(--slate-light);font-size:.85rem}

/* Success */
.success-icon{display:grid;place-items:center;margin-bottom:14px}
#success-meta{text-align:center;color:var(--slate);margin-bottom:6px}
.success-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:22px}

.workspace-error{
	display:flex;align-items:center;gap:10px;color:#B91C1C;background:rgba(239,68,68,.07);
	border:1px solid rgba(239,68,68,.25);border-radius:var(--radius-md);padding:12px 16px;margin-bottom:16px;
	font-size:.9rem;
}
.workspace-error svg{flex:0 0 auto}

.btn-block{width:100%}
.btn-note{font-weight:500;font-size:.78rem;opacity:.75;margin-left:6px}
.btn.btn-sm{padding:8px 16px;font-size:.85rem}
.btn.btn-lg{padding:14px 26px;font-size:1rem}

/* Editor launch teaser */
.editor-launch{
	display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
	background:linear-gradient(120deg,rgba(22,163,74,.06),rgba(20,184,166,.06));
	border:1px dashed var(--primary-light);border-radius:var(--radius-md);padding:16px 20px;margin-bottom:18px;
}
.editor-launch strong{font-family:var(--font-display);display:block;margin-bottom:2px}
.editor-launch p{color:var(--slate);font-size:.86rem}

/* =====================================================================
   Built-in PDF viewer
   =================================================================== */
.pdf-viewer{
	border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;
	background:var(--white);box-shadow:var(--shadow-sm);
}
.viewer-bar{
	display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--border);background:var(--mist);
}
.viewer-bar .vname{flex:1;font-weight:600;font-size:.9rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.viewer-bar .vcount{font-size:.8rem;color:var(--slate-light);font-family:var(--font-mono)}
.viewer-sep{width:1px;height:20px;background:var(--border)}
.viewer-flex{display:flex;gap:0;align-items:stretch}
.viewer-thumbs{
	width:120px;flex:0 0 auto;overflow-y:auto;max-height:560px;padding:10px;display:flex;flex-direction:column;gap:8px;
	background:var(--mist);border-right:1px solid var(--border);
}
.viewer-thumb{
	border:2px solid var(--border);border-radius:8px;overflow:hidden;background:#fff;cursor:pointer;
	aspect-ratio:3/4;transition:border-color .15s;
}
.viewer-thumb.is-active{border-color:var(--primary)}
.viewer-thumb canvas{width:100%;height:100%;object-fit:contain;display:block}
.viewer-stage{flex:1;display:grid;place-items:center;padding:20px;min-height:420px;background:var(--mist-2);overflow:auto}
.viewer-stage img{max-width:100%;max-height:70vh;box-shadow:var(--shadow-lg);border-radius:4px}
.viewer-empty-msg{color:var(--slate-light);font-size:.9rem}
@media(max-width:640px){.viewer-flex{flex-direction:column}.viewer-thumbs{width:auto;flex-direction:row;max-height:110px;border-right:0;border-bottom:1px solid var(--border)}.viewer-thumb{width:70px;flex:0 0 auto}}

/* =====================================================================
   Visual PDF editor
   =================================================================== */
.editor-app{min-height:calc(100vh - var(--header-h) - 60px);display:flex;flex-direction:column}
.editor-empty{
	flex:1;display:grid;place-items:center;padding:48px 24px;
	background:
		radial-gradient(600px 300px at 20% 0%,rgba(22,163,74,.08),transparent 60%),
		radial-gradient(600px 300px at 80% 100%,rgba(20,184,166,.08),transparent 60%);
}
.editor-empty-inner{max-width:620px;text-align:center}
.editor-empty-inner h1{font-family:var(--font-display);font-size:clamp(1.6rem,3vw,2.2rem);margin:18px 0 12px}
.editor-empty-inner p{color:var(--slate);line-height:1.7}
.editor-empty-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:26px}
.editor-dropzone-hint{margin-top:18px;font-size:.85rem;color:var(--slate-light)}

.editor-shell{display:flex;flex-direction:column;flex:1;min-height:0}
.editor-toolbar{
	display:flex;align-items:center;gap:6px;padding:8px 12px;flex-wrap:wrap;
	background:var(--white);border-bottom:1px solid var(--border);
	position:sticky;top:var(--header-h);z-index:30;
}
.tb-group{display:flex;align-items:center;gap:4px}
.tb-btn{
	border:1px solid transparent;background:transparent;color:var(--slate);width:38px;height:38px;
	display:grid;place-items:center;border-radius:10px;cursor:pointer;transition:all .15s;
}
.tb-btn:hover:not(:disabled){background:var(--mist);color:var(--ink)}
.tb-btn:disabled{opacity:.35;cursor:not-allowed}
.tb-btn.is-active{background:var(--primary);color:#fff;box-shadow:var(--shadow-sm)}
.tb-danger:hover:not(:disabled){color:#fff;background:#EF4444}
.tb-divider{width:1px;height:24px;background:var(--border);margin:0 6px}
.tb-zoom{margin-left:auto}
.tb-zoom-label{font-family:var(--font-mono);font-size:.78rem;color:var(--slate);min-width:44px;text-align:center}

.editor-body{flex:1;display:grid;grid-template-columns:172px 1fr 260px;min-height:0}
.editor-thumbs{
	background:var(--mist);border-right:1px solid var(--border);overflow-y:auto;padding:12px;
	display:flex;flex-direction:column;gap:10px;
}
.editor-thumb{
	position:relative;border:2px solid var(--border);border-radius:10px;overflow:hidden;background:#fff;
	cursor:pointer;aspect-ratio:3/4;transition:border-color .15s,transform .15s;
}
.editor-thumb:hover{transform:translateY(-1px)}
.editor-thumb.is-active{border-color:var(--primary)}
.editor-thumb.is-dragging{opacity:.5}
.editor-thumb.is-drop-target{border-color:var(--cyan)}
.editor-thumb canvas{width:100%;height:100%;object-fit:contain;display:block;background:#fff}
.editor-thumb-label{
	position:absolute;bottom:6px;right:6px;background:rgba(15,23,42,.72);color:#fff;
	font:600 10px var(--font-mono);padding:1px 6px;border-radius:5px;pointer-events:none;
}
.editor-thumb-del{
	position:absolute;top:5px;right:5px;width:22px;height:22px;border-radius:6px;
	background:rgba(239,68,68,.9);border:0;color:#fff;display:grid;place-items:center;cursor:pointer;
	opacity:0;transition:opacity .15s;
}
.editor-thumb:hover .editor-thumb-del{opacity:1}
.editor-thumb-del:hover{background:#DC2626}

.editor-stage{
	position:relative;overflow:auto;background:var(--mist-2);padding:24px;
	display:grid;place-items:start center;
	background-image:radial-gradient(rgba(15,23,42,.06) 1px,transparent 1px);
	background-size:22px 22px;
}
.editor-page-wrap{position:relative;box-shadow:var(--shadow-lg);border-radius:3px;overflow:hidden}
.editor-page-wrap canvas{display:block;background:#fff}
#editor-overlay-canvas{position:absolute;inset:0;touch-action:none}
#editor-overlay-canvas.cursor-select{cursor:default}
#editor-overlay-canvas.cursor-draw{cursor:crosshair}
#editor-overlay-canvas.cursor-crop{cursor:crosshair}
#editor-overlay-canvas.is-moving{cursor:grabbing}
#editor-overlay-canvas[data-hint]::after{
	content:attr(data-hint);position:absolute;left:50%;bottom:-34px;transform:translateX(-50%);
	background:rgba(15,23,42,.85);color:#fff;font-size:.75rem;padding:5px 12px;border-radius:99px;
	white-space:nowrap;pointer-events:none;z-index:5;
}
.editor-page-flash{
	position:absolute;top:14px;left:50%;transform:translateX(-50%);z-index:40;
	background:rgba(22,163,74,.92);color:#fff;font-size:.85rem;font-weight:600;
	padding:8px 18px;border-radius:99px;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;
	box-shadow:var(--shadow-md);max-width:90%;
}
.editor-page-flash.show{opacity:1;transform:translateX(-50%) translateY(4px)}
.editor-page-flash.is-error{background:rgba(239,68,68,.92)}
.editor-inline-input{
	position:absolute;z-index:20;border:2px solid var(--primary);border-radius:6px;
	background:rgba(255,255,255,.94);padding:6px 8px;resize:none;overflow:hidden;
	line-height:1.25;min-height:40px;box-shadow:var(--shadow-md);outline:none;
}

.editor-props{
	background:var(--white);border-left:1px solid var(--border);overflow-y:auto;padding:16px;
}
.editor-props h4{font-family:var(--font-display);font-size:.95rem;margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid var(--border)}
.props-note p{color:var(--slate);font-size:.85rem;margin-bottom:6px;line-height:1.6}
.props-tip{font-size:.78rem;color:var(--slate-light);margin-top:10px}
.editor-field{margin-bottom:12px}
.editor-field-label{display:block;font-size:.78rem;font-weight:600;color:var(--slate);margin-bottom:6px;text-transform:uppercase;letter-spacing:.04em}
.editor-field-ctrl{display:flex;align-items:center;gap:10px}
.editor-field-ctrl input[type="color"]{width:44px;height:32px;border:1px solid var(--border);border-radius:8px;padding:2px;background:var(--white);cursor:pointer}
.editor-field-ctrl input[type="number"]{flex:1}
.editor-field-check{display:flex;align-items:center;gap:8px;font-size:.85rem;cursor:pointer}
.editor-field-check input{accent-color:var(--primary);width:16px;height:16px}

.editor-statusbar{
	display:flex;align-items:center;gap:12px;padding:7px 16px;font-size:.78rem;color:var(--slate);
	background:var(--white);border-top:1px solid var(--border);
}
.editor-status-sep{width:1px;height:14px;background:var(--border)}
.editor-status-spacer{flex:1}
@media(max-width:1024px){.editor-body{grid-template-columns:120px 1fr}.editor-props{display:none}}
@media(max-width:700px){.editor-body{grid-template-columns:1fr}.editor-thumbs{display:none}.tb-tools{order:2;width:100%;border-top:1px solid var(--border);padding-top:6px}}

/* Editor modals */
.editor-modal-backdrop{
	position:fixed;inset:0;z-index:90;background:rgba(15,23,42,.5);backdrop-filter:blur(3px);
	display:grid;place-items:center;padding:20px;
}
.editor-modal{
	background:var(--white);border-radius:var(--radius-lg);width:min(560px,100%);max-height:88vh;
	display:flex;flex-direction:column;box-shadow:var(--shadow-lg);animation:modal-in .22s ease;
}
@keyframes modal-in{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
.editor-modal-head{
	display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border);
}
.editor-modal-head h3{font-family:var(--font-display);font-size:1.05rem}
.editor-modal-close{border:0;background:transparent;font-size:1.5rem;color:var(--slate);cursor:pointer;line-height:1;padding:4px 8px;border-radius:8px}
.editor-modal-close:hover{background:var(--mist);color:var(--ink)}
.editor-modal-body{padding:18px 20px;overflow-y:auto;display:flex;flex-direction:column;gap:14px}
.editor-modal-foot{display:flex;gap:10px;justify-content:flex-end;padding:14px 20px;border-top:1px solid var(--border)}
.editor-modal-tabs{display:flex;gap:6px;border-bottom:1px solid var(--border);padding-bottom:10px}
.sig-tab{border:1px solid var(--border);background:var(--white);padding:7px 16px;border-radius:999px;font:600 .85rem var(--font-body);color:var(--slate);cursor:pointer}
.sig-tab.is-active{background:var(--primary);border-color:var(--primary);color:#fff}
.sig-pad{
	border:1px dashed var(--border);border-radius:var(--radius-md);background:#FAFAFA;width:100%;
	touch-action:none;cursor:crosshair;
}
.editor-input{
	font:inherit;padding:9px 12px;border:1px solid var(--border);border-radius:var(--radius-sm);
	background:var(--white);color:var(--ink);width:100%;
}
.editor-input:focus{outline:2px solid var(--primary-light);outline-offset:1px;border-color:var(--primary)}
.editor-range{flex:1;accent-color:var(--primary)}
.field-val{font-family:var(--font-mono);font-size:.8rem;color:var(--slate);min-width:30px;text-align:right}

/* =====================================================================
   Forms (contact, cards) + statuses
   =================================================================== */
.card-form{background:var(--white);border:1px solid var(--border);border-radius:var(--radius-lg);padding:26px;box-shadow:var(--shadow-sm)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.card-form label{display:block;font-weight:600;font-size:.85rem;margin-bottom:14px;color:var(--ink)}
.card-form input:not([type="hidden"]),.card-form textarea{
	display:block;width:100%;margin-top:6px;font:inherit;padding:11px 14px;
	border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--white);color:var(--ink);
}
.card-form input:focus,.card-form textarea:focus{outline:2px solid var(--primary-light);outline-offset:1px;border-color:var(--primary)}
.card-form textarea{resize:vertical;min-height:130px}
.honeypot{position:absolute;left:-9999px;opacity:0;height:0;width:0;overflow:hidden}
.form-status{margin-top:14px;font-size:.88rem;font-weight:600}
.form-status.is-ok{color:var(--success)}
.form-status.is-error{color:#B91C1C}
.newsletter{display:flex;gap:8px;margin-top:14px}
.newsletter input[type="email"]{
	flex:1;min-width:0;font:inherit;padding:11px 14px;border:1px solid var(--border);
	border-radius:var(--radius-sm);background:var(--white);color:var(--ink);
}
.newsletter input:focus{outline:2px solid var(--primary-light);outline-offset:1px;border-color:var(--primary)}
.contact-details{list-style:none;margin-top:18px}
.contact-details li{background:var(--white);border:1px solid var(--border);border-radius:var(--radius-md);padding:14px 18px;margin-bottom:10px;color:var(--slate);font-size:.9rem}
.contact-details strong{display:block;color:var(--ink);margin-bottom:4px;font-family:var(--font-display)}
@media(max-width:640px){.form-row{grid-template-columns:1fr}}

/* =====================================================================
   Misc shared bits
   =================================================================== */
.ad-slot{margin:36px auto}
.ad-card{
	border:1.5px dashed var(--border);border-radius:var(--radius-lg);padding:26px;text-align:center;
	background:var(--mist);color:var(--slate);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
	min-height:140px;
}
.ad-card small{font-family:var(--font-mono);font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;color:var(--slate-light)}
.no-results{text-align:center;color:var(--slate);padding:40px 0}
.tool-search{max-width:560px;margin:0 auto 22px}
.tool-search input{
	width:100%;font:inherit;padding:14px 20px 14px 48px;border:1px solid var(--border);
	border-radius:999px;background:var(--white);color:var(--ink);
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%2394A3B8' stroke-width='2'/%3E%3Cpath d='M21 21l-4-4' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat:no-repeat;background-position:18px center;box-shadow:var(--shadow-sm);
}
.tool-search input:focus{outline:3px solid var(--primary-light);outline-offset:1px;border-color:var(--primary)}
.tool-filters{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:30px}
.filter-chip{
	border:1px solid var(--border);background:var(--white);color:var(--slate);padding:8px 18px;
	border-radius:999px;font:600 .85rem var(--font-body);cursor:pointer;transition:all .15s;
}
.filter-chip:hover{border-color:var(--primary-light);color:var(--primary)}
.filter-chip.is-active{background:var(--primary);border-color:var(--primary);color:#fff}
[hidden]{display:none !important}

/* Maintenance / coming soon */
.maintenance-body{
	min-height:100vh;display:grid;place-items:center;padding:24px;
	background:
		radial-gradient(700px 340px at 15% 0%,rgba(22,163,74,.12),transparent 60%),
		radial-gradient(700px 340px at 85% 100%,rgba(20,184,166,.12),transparent 60%),
		var(--mist);
	font-family:var(--font-body);color:var(--ink);
}
.maintenance-card{
	background:var(--white);border:1px solid var(--border);border-radius:24px;padding:48px 40px;
	text-align:center;max-width:520px;box-shadow:var(--shadow-lg);
}
.maintenance-card h1{font-family:var(--font-display);font-size:1.9rem;margin:16px 0 10px}
.maintenance-card p{color:var(--slate);line-height:1.7;font-size:.95rem}
.maintenance-card .btn{margin-top:22px;display:inline-block}
.maintenance-pulse{display:flex;justify-content:center;gap:6px;margin-top:24px}
.maintenance-pulse span{
	width:9px;height:9px;border-radius:50%;background:var(--primary);animation:pulse 1.2s ease-in-out infinite;
}
.maintenance-pulse span:nth-child(2){animation-delay:.15s}
.maintenance-pulse span:nth-child(3){animation-delay:.3s}
@keyframes pulse{0%,100%{opacity:.25;transform:scale(.8)}50%{opacity:1;transform:scale(1)}}

/* print-friendly editor */
@media print{
	.site-header,.site-footer,.editor-toolbar,.editor-thumbs,.editor-props,.editor-statusbar,.breadcrumb{display:none !important}
	.editor-body{display:block}
	.editor-page-wrap{box-shadow:none}
}

/* =====================================================================
   Full-screen SaaS Editor UI Extensions
   =================================================================== */
.editor-fullscreen{margin:0;padding:0;overflow:hidden;height:100vh}

/* Toolbar enhanced */
.tb-brand{display:flex;align-items:center;gap:10px;margin-right:12px}
.tb-back{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:var(--mist);color:var(--slate);transition:all .15s}
.tb-back:hover{background:var(--mist-2);color:var(--primary)}
.tb-brand-name{font-family:var(--font-display);font-weight:700;font-size:1rem;color:var(--ink)}
.tb-centre{display:flex;align-items:center;gap:4px;flex:1;min-width:0}
.tb-right{display:flex;align-items:center;gap:6px;margin-left:auto}
.tb-group-inner{display:flex;align-items:center;gap:2px;background:var(--mist);padding:2px;border-radius:10px}

.props-header{border-bottom:1px solid var(--border);padding-bottom:10px;margin-bottom:14px}
.props-header h4{margin-bottom:2px!important;border-bottom:0!important;padding-bottom:0!important}
.props-coords{font-family:var(--font-mono);font-size:.78rem;color:var(--slate-light)}

.editor-field-btns{display:flex;align-items:center;justify-content:space-between}
.btn-xs{padding:4px 10px;font-size:12px;border-radius:6px}

/* Fullscreen drop overlay */
.editor-drop-overlay{
	position:fixed;inset:0;z-index:999;background:rgba(22,163,74,.88);backdrop-filter:blur(6px);
	display:grid;place-items:center;pointer-events:none;animation:modal-in .15s ease;
}
.editor-drop-label{
	background:var(--white);color:var(--primary);font-family:var(--font-display);
	font-weight:700;font-size:1.4rem;padding:24px 44px;border-radius:20px;box-shadow:var(--shadow-lg);
}

/* Loading overlay */
.editor-loading{
	position:fixed;inset:0;z-index:998;background:rgba(15,23,42,.7);backdrop-filter:blur(4px);
	display:grid;place-items:center;color:#fff;
}
.editor-loading-inner{text-align:center}
.editor-loading-spinner{
	width:48px;height:48px;border:4px solid rgba(255,255,255,.2);border-top-color:#fff;
	border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 16px;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* Shortcut modal */
.editor-shortcut-panel{
	position:fixed;inset:0;z-index:950;background:rgba(15,23,42,.6);backdrop-filter:blur(4px);
	display:grid;place-items:center;padding:20px;
}
.editor-shortcut-inner{
	background:var(--white);border-radius:20px;padding:28px;max-width:680px;width:100%;
	box-shadow:var(--shadow-lg);animation:modal-in .2s ease;
}
.editor-shortcut-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}
.editor-shortcut-head h2{font-size:1.3rem}
.editor-shortcut-close{background:none;border:none;font-size:1.6rem;cursor:pointer;color:var(--slate)}
.editor-shortcut-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.shortcut-group h3{font-size:.85rem;color:var(--primary);text-transform:uppercase;letter-spacing:.04em;margin-bottom:10px}
.shortcut-group dl{display:grid;grid-template-columns:auto 1fr;gap:8px 14px;font-size:.88rem}
.shortcut-group kbd{background:var(--mist);border:1px solid var(--border);border-radius:5px;padding:2px 6px;font-family:var(--font-mono);font-size:.78rem}

/* Welcome screen cards */
.editor-welcome-card{
	background:var(--white);border:1px solid var(--border);border-radius:24px;
	padding:48px 40px;text-align:center;max-width:560px;box-shadow:var(--shadow-lg);
}
.editor-welcome-icon{margin-bottom:16px}
.editor-welcome-card h1{font-size:2rem;margin-bottom:10px}
.editor-welcome-card p{color:var(--slate);margin-bottom:24px;line-height:1.6}
.editor-welcome-actions{display:flex;gap:12px;justify-content:center;margin-bottom:14px}
.editor-welcome-hint{font-size:.85rem;color:var(--slate-light);margin-bottom:20px}
.editor-welcome-nav{display:flex;justify-content:space-between;align-items:center;font-size:.88rem;border-top:1px solid var(--border);padding-top:16px}
.editor-welcome-nav a{color:var(--primary);font-weight:600}
.editor-welcome-shortcut-btn{background:none;border:none;color:var(--slate);cursor:pointer;font:inherit}
.editor-welcome-shortcut-btn:hover{color:var(--ink)}

