/* Adithya Online Tools — standalone tech-style site. Loaded only on /online-tools/ pages. */

:root {
	--aot-primary: #4f46e5;
	--aot-primary-2: #6366f1;
	--aot-accent: #f97316;
	--aot-bg: #f7f8fc;
	--aot-surface: #ffffff;
	--aot-surface-2: #f1f3f9;
	--aot-ink: #0f172a;
	--aot-muted: #5b6478;
	--aot-line: #e4e7f0;
	--aot-ok: #15803d;
	--aot-ok-bg: #e8f7ee;
	--aot-err: #b91c1c;
	--aot-err-bg: #fdecec;
	--aot-info: #1e40af;
	--aot-info-bg: #eaf0fe;
	--aot-hero-1: #0b1020;
	--aot-hero-2: #1b1f4b;
	--aot-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
	--aot-c-image: #0ea5e9;
	--aot-c-pdf: #ef4444;
	--aot-c-card: #8b5cf6;
	--aot-radius: 14px;
	--aot-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
	--aot-primary: #818cf8;
	--aot-primary-2: #a5b4fc;
	--aot-bg: #0b1020;
	--aot-surface: #121933;
	--aot-surface-2: #182042;
	--aot-ink: #e7eaf6;
	--aot-muted: #9aa3bd;
	--aot-line: #252e55;
	--aot-ok: #4ade80;
	--aot-ok-bg: #0f2d1d;
	--aot-err: #f87171;
	--aot-err-bg: #3a1414;
	--aot-info: #93b4ff;
	--aot-info-bg: #16224a;
	--aot-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

body.aot-site {
	margin: 0;
	background: var(--aot-bg);
	color: var(--aot-ink);
	font-family: var(--aot-font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	color-scheme: light;
}
:root[data-theme="dark"] body.aot-site { color-scheme: dark; }
.aot-site *, .aot-site *::before, .aot-site *::after { box-sizing: border-box; }
.aot-site img { max-width: 100%; }
.aot-site a { color: var(--aot-primary); }
.aot-site h1, .aot-site h2, .aot-site h3 { line-height: 1.25; color: var(--aot-ink); margin: 0 0 .5em; letter-spacing: -.01em; }
.aot-site h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); font-weight: 800; }
.aot-site h2 { font-size: 1.35rem; font-weight: 700; }
.aot-site h3 { font-size: 1.05rem; font-weight: 700; }

.aot-container { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.aot-narrow { max-width: 860px; }
.aot-hidden { display: none !important; }
.aot-skip { position: absolute; left: -9999px; }
.aot-skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--aot-surface); padding: 8px 12px; border-radius: 8px; }
.aot-main { min-height: 60vh; padding-bottom: 56px; }
/* Safety net: hide menus/popups other plugins print at page level (ads, admin bar and scripts stay). */
body.aot-site > nav, body.aot-site > ul, body.aot-site > ol,
body.aot-site > div[class*="menu"], body.aot-site > div[id*="menu"],
body.aot-site > div[class*="offcanvas"], body.aot-site > div[class*="off-canvas"],
body.aot-site > div[class*="popup"], body.aot-site > div[class*="drawer"],
body.aot-site > div[class*="mobile"], body.aot-site > aside { display: none !important; }

/* ---------- Header ---------- */
.aot-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 16, 32, .92); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.admin-bar .aot-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .aot-header { top: 46px; } }
.aot-header-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.aot-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff !important; font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; white-space: nowrap; }
.aot-logo-mark { flex: none; }
.aot-nav { display: flex; gap: 4px; margin-left: auto; }
.aot-nav a { color: #c9cee0; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.aot-nav a:hover, .aot-nav a[aria-current] { color: #fff; background: rgba(255, 255, 255, .08); }
.aot-header-actions { display: flex; gap: 8px; }
.aot-header .aot-icon-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #e7eaf6; }
.aot-header .aot-icon-btn:hover { background: rgba(255, 255, 255, .14); }
.aot-menu-btn { display: none !important; }
.aot-i-sun { display: none; }
:root[data-theme="dark"] .aot-i-sun { display: block; }
:root[data-theme="dark"] .aot-i-moon { display: none; }

@media (max-width: 860px) {
	.aot-menu-btn { display: inline-flex !important; }
	.aot-header-actions { margin-left: auto; }
	.aot-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 8px 16px 16px; background: #0b1020; border-bottom: 1px solid rgba(255, 255, 255, .08); }
	.aot-nav.is-open { display: flex; }
	.aot-nav a { padding: 12px; }
}

/* ---------- Hero ---------- */
.aot-hero { position: relative; overflow: hidden; color: #fff; padding: 64px 0 56px; text-align: center; background: radial-gradient(1000px 400px at 15% -10%, rgba(99, 102, 241, .45), transparent 60%), radial-gradient(800px 380px at 95% 10%, rgba(249, 115, 22, .32), transparent 60%), linear-gradient(180deg, var(--aot-hero-1), var(--aot-hero-2)); }
.aot-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.aot-hero .aot-container { position: relative; z-index: 1; }
.aot-hero h1 { color: #fff; max-width: 860px; margin: 0 auto 16px; }
.aot-eyebrow { display: inline-block; margin: 0 0 16px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #c7cbe8; font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.aot-grad { background: linear-gradient(90deg, #a5b4fc, #fdba74); -webkit-background-clip: text; background-clip: text; color: transparent; }
.aot-hero-sub { color: #c3c8de; max-width: 640px; margin: 0 auto 28px; font-size: 1.05rem; }
.aot-search-wrap { position: relative; max-width: 580px; margin: 0 auto; }
.aot-search-wrap svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #7c84a6; }
.aot-search { width: 100%; padding: 16px 20px 16px 50px; font-size: 1rem; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .97); color: #0f172a; outline: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-family: inherit; }
.aot-search:focus { border-color: var(--aot-accent); box-shadow: 0 0 0 4px rgba(249, 115, 22, .25), 0 10px 30px rgba(0, 0, 0, .25); }
.aot-stats { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; padding: 0; margin: 26px 0 0; color: #aab1cc; font-size: .92rem; }
.aot-stats strong { color: #fff; font-size: 1.05rem; margin-right: 4px; }
@media (max-width: 600px) { .aot-hero { padding: 44px 0 40px; } .aot-br { display: none; } }

/* ---------- Category tabs + sections ---------- */
.aot-tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 28px 0 8px; }
.aot-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--aot-surface); border: 1px solid var(--aot-line); color: var(--aot-ink) !important; text-decoration: none; font-weight: 600; font-size: .95rem; box-shadow: var(--aot-shadow); }
.aot-tab:hover { border-color: var(--aot-primary); }
.aot-tab .aot-ci { width: 18px; height: 18px; }
.aot-cat { margin: 40px 0; scroll-margin-top: 90px; }
.aot-cat-head p { color: var(--aot-muted); margin: 0 0 18px; }
.aot-cat-image { --aot-c: var(--aot-c-image); }
.aot-cat-pdf { --aot-c: var(--aot-c-pdf); }
.aot-cat-card { --aot-c: var(--aot-c-card); }
.aot-noresults { text-align: center; color: var(--aot-muted); padding: 24px 0; }

.aot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.aot-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--aot-line); border-radius: var(--aot-radius); background: var(--aot-surface); text-decoration: none; color: var(--aot-ink) !important; transition: border-color .15s, transform .15s, box-shadow .15s; }
.aot-card:hover { border-color: var(--aot-c, var(--aot-primary)); transform: translateY(-3px); box-shadow: var(--aot-shadow); }
.aot-card strong { font-size: 1.02rem; }
.aot-card-desc { color: var(--aot-muted); font-size: .9rem; line-height: 1.45; }
.aot-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: var(--aot-c, var(--aot-primary)); background: color-mix(in srgb, var(--aot-c, var(--aot-primary)) 14%, transparent); margin-bottom: 6px; flex: none; }
.aot-badge { position: absolute; top: 12px; right: 12px; font-style: normal; font-size: .7rem; font-weight: 700; background: var(--aot-accent); color: #fff; padding: 2px 8px; border-radius: 999px; }
.aot-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.aot-chip { padding: 7px 13px; border-radius: 999px; background: var(--aot-surface); border: 1px solid var(--aot-line); color: var(--aot-ink) !important; text-decoration: none; font-size: .87rem; font-weight: 500; }
.aot-chip:hover { border-color: var(--aot-c, var(--aot-primary)); color: var(--aot-c, var(--aot-primary)) !important; }
.aot-soon { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: var(--aot-radius); border: 1px dashed var(--aot-line); background: var(--aot-surface); color: var(--aot-muted); }
.aot-soon .aot-ci { color: var(--aot-c, var(--aot-primary)); }

/* ---------- Features + FAQ ---------- */
.aot-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 56px 0 40px; }
.aot-feature { padding: 22px; border-radius: var(--aot-radius); background: var(--aot-surface); border: 1px solid var(--aot-line); }
.aot-feature-i { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.aot-feature p { color: var(--aot-muted); margin: 0; font-size: .95rem; }
.aot-faq { max-width: 860px; margin: 0 auto; }
.aot-faq details { border: 1px solid var(--aot-line); background: var(--aot-surface); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.aot-faq summary { cursor: pointer; font-weight: 600; }
.aot-faq p { margin: 8px 0 0; color: var(--aot-muted); }

/* ---------- Tool page ---------- */
.aot-tool-hero { background: linear-gradient(180deg, var(--aot-hero-1), var(--aot-hero-2)); color: #fff; padding: 22px 0 70px; }
.aot-tool-hero .aot-crumbs, .aot-tool-hero .aot-crumbs a { color: #aab1cc; }
.aot-tool-title { display: flex; gap: 16px; align-items: center; margin-top: 14px; }
.aot-tool-title h1 { color: #fff; margin: 0 0 4px; font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
.aot-tool-title p { margin: 0; color: #c3c8de; }
.aot-tool-hero .aot-card-icon { width: 54px; height: 54px; background: rgba(255, 255, 255, .1); color: #fff; }
.aot-tool-hero + .aot-container { margin-top: -48px; }
.aot-crumbs { font-size: .87rem; color: var(--aot-muted); padding-top: 4px; }
.aot-crumbs a { text-decoration: none; color: var(--aot-muted); }
.aot-crumbs a:hover { text-decoration: underline; }
.aot-crumbs span[aria-hidden] { margin: 0 4px; opacity: .6; }
.aot-app { position: relative; border: 1px solid var(--aot-line); border-radius: 18px; padding: 24px; background: var(--aot-surface); box-shadow: var(--aot-shadow); }
.aot-locked { text-align: center; }
.aot-privacy { font-size: .87rem; color: var(--aot-muted); text-align: center; margin: 14px 0 24px; }
.aot-related { margin-top: 36px; }
/* v0.7.0: How to use + FAQ */
.aot-help { background: var(--aot-surface); border: 1px solid var(--aot-line); border-radius: 18px; padding: clamp(18px, 3.5vw, 32px); margin-top: 28px; }
.aot-help h2 { font-size: 1.15rem; margin: 0 0 10px; }
.aot-help h2 + ol { margin-top: 0; }
.aot-help ol { padding-left: 1.3em; margin: 0 0 14px; }
.aot-help li { margin: 6px 0; }
.aot-help .aot-tip { background: var(--aot-surface-2); border-radius: 12px; padding: 10px 14px; margin: 0 0 22px; }
.aot-help details { border: 1px solid var(--aot-line); border-radius: 12px; margin: 0 0 8px; background: var(--aot-surface); }
.aot-help summary { cursor: pointer; padding: 10px 14px; font-weight: 600; }
.aot-help details p { margin: 0; padding: 0 14px 12px; color: var(--aot-muted); }
.aot-help .aot-by { font-size: .87rem; color: var(--aot-muted); margin: 16px 0 0; }
.aot-ad { margin: 16px 0; text-align: center; min-height: 1px; }

/* ---------- Info pages + 404 ---------- */
.aot-prose { background: var(--aot-surface); border: 1px solid var(--aot-line); border-radius: 18px; padding: clamp(20px, 4vw, 40px); margin-top: 16px; }
.aot-prose h2 { margin-top: 1.6em; font-size: 1.15rem; }
.aot-prose p, .aot-prose li { color: var(--aot-ink); }
.aot-prose ul { padding-left: 1.3em; }
.aot-main > .aot-narrow:first-child { padding-top: 24px; }
.aot-contact-mail { font-size: 1.15rem; font-weight: 600; }
.aot-404 { text-align: center; padding-top: 72px !important; }
.aot-404-code { font-size: 5rem; font-weight: 800; margin: 0; line-height: 1; background: linear-gradient(90deg, var(--aot-primary), var(--aot-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Footer ---------- */
.aot-footer { background: var(--aot-hero-1); color: #aab1cc; padding: 48px 0 0; font-size: .93rem; }
.aot-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.aot-footer h3 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.aot-footer-grid a:not(.aot-logo) { display: block; color: #aab1cc; text-decoration: none; padding: 3px 0; }
.aot-footer-grid a:not(.aot-logo):hover { color: #fff; }
.aot-footer-brand p { margin: 12px 0 0; max-width: 340px; }
.aot-footer a.aot-footer-owner, .aot-footer-bottom a { display: inline; padding: 0; color: #fff; text-decoration: none; font-weight: 600; }
.aot-footer-bottom a:hover, .aot-footer a.aot-footer-owner:hover { text-decoration: underline; }
.aot-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 36px; padding-top: 18px; padding-bottom: 22px; font-size: .85rem; }
@media (max-width: 760px) { .aot-footer-grid { grid-template-columns: 1fr 1fr; } .aot-footer-brand { grid-column: 1 / -1; } }

/* ---------- Tool UI components (used by all tools) ---------- */
.aot-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 44px 16px; border: 2px dashed color-mix(in srgb, var(--aot-primary) 45%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--aot-primary) 5%, transparent); text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.aot-drop.is-over { background: color-mix(in srgb, var(--aot-primary) 12%, transparent); border-color: var(--aot-primary); }
.aot-drop small { color: var(--aot-muted); }
.aot-drop input[type=file] { display: none; }

.aot-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 22px; border: 0; border-radius: 11px; background: linear-gradient(135deg, var(--aot-primary), #7c3aed); color: #fff !important; font-size: 1rem; font-weight: 700; font-family: inherit; cursor: pointer; text-decoration: none; box-shadow: 0 6px 16px rgba(79, 70, 229, .28); transition: transform .1s, filter .15s; }
.aot-btn:hover { filter: brightness(1.08); }
.aot-btn:active { transform: translateY(1px); }
.aot-btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.aot-btn-ghost { background: transparent; color: var(--aot-primary) !important; border: 1px solid var(--aot-line); box-shadow: none; }
.aot-btn-ghost:hover { background: var(--aot-surface-2); filter: none; }
.aot-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 18px 0; }
.aot-field { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; font-weight: 600; color: var(--aot-muted); }
.aot-field { max-width: 100%; }
.aot-field select, .aot-field input { max-width: 100%; padding: 10px 12px; border: 1px solid var(--aot-line); border-radius: 10px; font-size: 1rem; font-family: inherit; min-width: 130px; background: var(--aot-surface); color: var(--aot-ink); }
.aot-field select:focus, .aot-field input:focus { outline: 2px solid var(--aot-primary); outline-offset: 1px; }
.aot-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.aot-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.aot-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--aot-line); border-radius: 12px; background: var(--aot-surface-2); }
.aot-item img, .aot-item .aot-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--aot-surface); flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.aot-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aot-item-meta { color: var(--aot-muted); font-size: .85rem; white-space: nowrap; }
.aot-item-btns { display: flex; gap: 4px; flex: none; }
.aot-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--aot-line); border-radius: 10px; background: var(--aot-surface); cursor: pointer; font-size: .95rem; line-height: 1; color: var(--aot-ink); padding: 0; font-family: inherit; }
.aot-icon-btn:hover { border-color: var(--aot-primary); }
.aot-icon-btn[disabled] { opacity: .35; cursor: default; }
.aot-item .aot-icon-btn { width: 32px; height: 32px; }

.aot-status { margin-top: 14px; padding: 11px 14px; border-radius: 10px; font-size: .95rem; }
.aot-status.is-info { background: var(--aot-info-bg); color: var(--aot-info); }
.aot-status.is-ok { background: var(--aot-ok-bg); color: var(--aot-ok); }
.aot-status.is-err { background: var(--aot-err-bg); color: var(--aot-err); }
.aot-result { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--aot-surface-2); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.aot-result img { max-width: 220px; max-height: 220px; border-radius: 10px; border: 1px solid var(--aot-line); background: #fff; }
.aot-result-info { flex: 1; min-width: 200px; }
.aot-result-info p { margin: 0 0 6px; }
.aot-loading { color: var(--aot-muted); text-align: center; margin: 0; }
.aot-hint { color: var(--aot-muted); font-size: .9rem; margin: 12px 0 0; }

/* ---------- Image tools ---------- */
.aot-picked { margin: 0 0 6px; padding: 10px 14px; border-radius: 10px; background: var(--aot-surface-2); font-size: .92rem; color: var(--aot-muted); overflow-wrap: anywhere; }
.aot-results { display: flex; flex-direction: column; gap: 10px; }
.aot-results > .aot-actions { margin-top: 16px; }
.aot-field input[type=range] { padding: 0; border: 0; accent-color: var(--aot-primary); background: transparent; min-width: 160px; }
.aot-field output { color: var(--aot-ink); font-weight: 700; }
.aot-sub { margin: 18px 0 4px; }
.aot-sub h3 { font-size: 1rem; }
.aot-sub .aot-drop { padding: 22px 16px; }

.aot-stage { margin: 14px 0; }
.aot-preview { margin: 14px 0; text-align: center; }
.aot-preview-canvas { display: flex; justify-content: center; padding: 12px; border-radius: 12px; background-color: var(--aot-surface-2); background-image: linear-gradient(45deg, rgba(127,127,127,.12) 25%, transparent 25%, transparent 75%, rgba(127,127,127,.12) 75%), linear-gradient(45deg, rgba(127,127,127,.12) 25%, transparent 25%, transparent 75%, rgba(127,127,127,.12) 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.aot-preview-img { max-width: 100%; max-height: 460px; height: auto; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }

.aot-crop { position: relative; display: inline-block; max-width: 100%; line-height: 0; user-select: none; -webkit-user-select: none; touch-action: none; }
.aot-stage { text-align: center; }
.aot-crop-img { display: block; max-width: 100%; max-height: 520px; height: auto; width: auto; border-radius: 6px; }
.aot-crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); cursor: move; outline: 1px dashed rgba(0, 0, 0, .6); }
.aot-crop { overflow: hidden; border-radius: 6px; }
.aot-crop-box.is-circle { border-radius: 50%; }
.aot-crop-h { position: absolute; width: 18px; height: 18px; background: #fff; border: 2px solid var(--aot-primary); border-radius: 50%; }
.aot-crop-nw { left: -10px; top: -10px; cursor: nwse-resize; }
.aot-crop-ne { right: -10px; top: -10px; cursor: nesw-resize; }
.aot-crop-sw { left: -10px; bottom: -10px; cursor: nesw-resize; }
.aot-crop-se { right: -10px; bottom: -10px; cursor: nwse-resize; }
.aot-crop-n { left: calc(50% - 9px); top: -10px; cursor: ns-resize; }
.aot-crop-s { left: calc(50% - 9px); bottom: -10px; cursor: ns-resize; }
.aot-crop-e { right: -10px; top: calc(50% - 9px); cursor: ew-resize; }
.aot-crop-w { left: -10px; top: calc(50% - 9px); cursor: ew-resize; }
@media (pointer: coarse) { .aot-crop-h { width: 26px; height: 26px; } .aot-crop-nw, .aot-crop-sw, .aot-crop-w { left: -14px; } .aot-crop-ne, .aot-crop-se, .aot-crop-e { right: -14px; } .aot-crop-nw, .aot-crop-ne, .aot-crop-n { top: -14px; } .aot-crop-sw, .aot-crop-se, .aot-crop-s { bottom: -14px; } }

.aot-paint { position: relative; display: block; width: fit-content; max-width: 100%; margin: 12px auto; line-height: 0; touch-action: none; }
.aot-paint-img { display: block; max-width: 100%; max-height: 560px; height: auto; border-radius: 8px; }
.aot-paint-mask { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.aot-textout { width: 100%; min-height: 180px; padding: 14px; border: 1px solid var(--aot-line); border-radius: 12px; background: var(--aot-surface-2); color: var(--aot-ink); font: 15px/1.6 var(--aot-font); resize: vertical; }
.aot-textout:focus { outline: 2px solid var(--aot-primary); outline-offset: 1px; }
.aot-hw-preview { flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.aot-hw-preview .aot-preview-img { width: 100%; max-width: 420px; }

/* ---------- PDF tools ---------- */
.aot-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 12px 0; }
.aot-page { position: relative; padding: 8px 8px 30px; border: 2px solid var(--aot-line); border-radius: 12px; background: var(--aot-surface-2); text-align: center; }
.aot-page.is-selectable { cursor: pointer; }
.aot-page.is-selected { border-color: var(--aot-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--aot-primary) 25%, transparent); }
.aot-page.is-selected::after { content: "✓"; position: absolute; top: 6px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--aot-primary); color: #fff; font-size: .8rem; line-height: 22px; }
.aot-page.is-deleted .aot-page-thumb { opacity: .25; }
.aot-page.is-deleted::before { content: "Deleted"; position: absolute; top: 40%; left: 0; right: 0; font-weight: 700; color: var(--aot-err); z-index: 1; }
.aot-page-thumb { display: flex; align-items: center; justify-content: center; min-height: 150px; transition: transform .2s; }
.aot-page-thumb img { max-width: 100%; max-height: 170px; box-shadow: 0 1px 6px rgba(0,0,0,.18); background: #fff; }
.aot-page-loading { color: var(--aot-muted); }
.aot-page-num { position: absolute; bottom: 6px; left: 0; right: 0; font-size: .8rem; color: var(--aot-muted); font-weight: 600; }
.aot-page-tools { display: flex; justify-content: center; gap: 3px; flex-wrap: wrap; margin-top: 6px; }
.aot-page-tools .aot-icon-btn { width: 28px; height: 28px; font-size: .85rem; }

.aot-edbar { position: sticky; top: 72px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; margin-bottom: 10px; border: 1px solid var(--aot-line); border-radius: 12px; background: var(--aot-surface); box-shadow: var(--aot-shadow); }
.admin-bar .aot-edbar { top: 104px; }
.aot-edtool { padding: 8px 11px; border: 1px solid var(--aot-line); border-radius: 9px; background: var(--aot-surface-2); color: var(--aot-ink); font: 600 .88rem var(--aot-font); cursor: pointer; }
.aot-edtool.is-on { background: var(--aot-primary); border-color: var(--aot-primary); color: #fff; }
.aot-edtool[disabled] { opacity: .45; cursor: default; }
.aot-edcolor { width: 40px; height: 36px; padding: 2px; border: 1px solid var(--aot-line); border-radius: 8px; background: var(--aot-surface); }
.aot-edsize { height: 36px; border: 1px solid var(--aot-line); border-radius: 8px; background: var(--aot-surface); color: var(--aot-ink); }
.aot-edpages { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.aot-edpage { position: relative; max-width: 100%; box-shadow: 0 2px 12px rgba(0,0,0,.18); background: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.aot-edcanvas, .aot-edink { position: absolute; inset: 0; width: 100%; height: 100%; }
.aot-edlayer { position: absolute; inset: 0; }
.aot-edpages[data-tool=text] .aot-edpage { cursor: text; }
.aot-edpages[data-tool=whiteout] .aot-edpage, .aot-edpages[data-tool=rect] .aot-edpage, .aot-edpages[data-tool=highlight] .aot-edpage, .aot-edpages[data-tool=pen] .aot-edpage, .aot-edpages[data-tool=redact] .aot-edpage { cursor: crosshair; }
.aot-edpage > .aot-page-num { bottom: -22px; }
.aot-edobj { position: absolute; box-sizing: border-box; }
.aot-edobj.is-sel { outline: 2px dashed var(--aot-primary); outline-offset: 2px; }
.aot-ed-whiteout { background: #fff; outline: 1px dashed #bbb; }
.aot-ed-rect { border: 2px solid #000; }
.aot-ed-highlight { background: rgba(255, 235, 59, .45); mix-blend-mode: multiply; }
.aot-ed-redact { background: #000; }
.aot-ed-image img { width: 100%; height: 100%; display: block; pointer-events: none; }
.aot-edtext { min-width: 30px; padding: 2px; line-height: 1.2; white-space: pre; outline: 1px dashed rgba(79,70,229,.5); font-family: Helvetica, Arial, sans-serif; cursor: text; }
.aot-edresize { position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--aot-primary); border: 2px solid #fff; cursor: nwse-resize; }

.aot-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 8, 20, .6); }
.aot-modal-box { width: 100%; max-width: 640px; padding: 20px; border-radius: 16px; background: var(--aot-surface); color: var(--aot-ink); box-shadow: 0 20px 60px rgba(0,0,0,.4); }

.aot-paper-wrap { max-height: 520px; overflow: auto; padding: 16px; border-radius: 12px; background: var(--aot-surface-2); }
.aot-paper { max-width: 794px; margin: 0 auto; padding: 40px 48px; background: #fff; color: #111; font: 11pt/1.45 Calibri, Carlito, Arial, sans-serif; box-shadow: 0 2px 10px rgba(0,0,0,.15); overflow-wrap: anywhere; }
.aot-paper img { max-width: 100%; height: auto; }
.aot-paper table { border-collapse: collapse; margin: 8px 0; font-size: 10pt; }
.aot-paper td, .aot-paper th { border: 1px solid #9aa0a6; padding: 3px 6px; vertical-align: top; }
.aot-paper h1, .aot-paper h2, .aot-paper h3 { color: #111; }
.aot-paper pre, .aot-paper .aot-plain { white-space: pre-wrap; font: 10pt/1.45 Consolas, "Courier New", monospace; }
.aot-paper-print { box-shadow: none; }

.aot-formfields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.aot-formfields input[type=text], .aot-formfields textarea, .aot-formfields select { width: 100%; padding: 9px 10px; border: 1px solid var(--aot-line); border-radius: 8px; background: var(--aot-surface); color: var(--aot-ink); font: 1rem var(--aot-font); }
.aot-field-check { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; }

.aot-qr-preview { display: flex; justify-content: center; margin: 16px 0; }
.aot-qr-preview canvas { border-radius: 8px; }
.aot-pw-out { width: 100%; padding: 16px; font: 700 1.35rem ui-monospace, Consolas, monospace; letter-spacing: .04em; text-align: center; border: 2px solid var(--aot-primary); border-radius: 12px; background: var(--aot-surface-2); color: var(--aot-ink); }

/* ---------- ID / PVC card tools ---------- */
.aot-card-notice { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--aot-ok-bg); color: var(--aot-ok); font-size: .92rem; }
.aot-pwhint { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--aot-info-bg); color: var(--aot-info); font-size: .92rem; }
.aot-card-stage { margin: 14px 0; }
.aot-card-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.aot-card-side { padding: 12px; border: 1px solid var(--aot-line); border-radius: 12px; background: var(--aot-surface-2); text-align: center; }
.aot-card-side-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; text-align: left; }
.aot-card-side-head h3 { margin: 0; font-size: 1rem; }
.aot-card-pagesel { padding: 6px 8px; border: 1px solid var(--aot-line); border-radius: 8px; background: var(--aot-surface); color: var(--aot-ink); }
.aot-card-lock { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--aot-muted); }
.aot-card-side .aot-crop-img { max-height: 420px; }
.aot-card-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 6px; }
.aot-card-picks .aot-drop { padding: 18px 10px; }
.aot-idc-preview { gap: 16px; flex-wrap: wrap; align-items: center; }
.aot-idc-preview .aot-preview-img { max-height: 340px; border-radius: 12px; }

.aot-sigwrap { position: relative; border: 1px solid var(--aot-line); border-radius: 12px; background: #fff; overflow: hidden; }
.aot-sigpad { display: block; width: 100%; touch-action: none; cursor: crosshair; }
.aot-sigline { position: absolute; left: 6%; right: 6%; bottom: 22%; border-top: 1px dashed #c3c8d4; color: #9aa3b2; font-size: .75rem; padding-top: 4px; pointer-events: none; }

.aot-info { margin-top: 16px; }
.aot-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.aot-table th, .aot-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--aot-line); vertical-align: top; overflow-wrap: anywhere; }
.aot-table th { width: 34%; color: var(--aot-muted); font-weight: 600; }

.aot-picker-img { display: block; max-width: 100%; max-height: 480px; margin: 8px auto; border-radius: 8px; cursor: crosshair; }
.aot-picked-color { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 14px 0 24px; }
.aot-swatch { width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--aot-line); flex: none; }
.aot-color-values { display: flex; flex-wrap: wrap; gap: 8px; }
.aot-copy { padding: 8px 12px; border: 1px solid var(--aot-line); border-radius: 8px; background: var(--aot-surface-2); color: var(--aot-ink); font-family: ui-monospace, Consolas, monospace; font-size: .92rem; cursor: pointer; }
.aot-copy:hover { border-color: var(--aot-primary); }
.aot-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.aot-pal { height: 70px; border-radius: 10px; border: 1px solid var(--aot-line); cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 6px; }
.aot-pal span { background: rgba(255,255,255,.88); color: #111; border-radius: 6px; padding: 1px 6px; font-size: .75rem; font-family: ui-monospace, Consolas, monospace; }

@media (max-width: 600px) {
	.aot-app { padding: 16px; border-radius: 14px; }
	.aot-item { flex-wrap: wrap; }
	.aot-item-name { flex-basis: calc(100% - 60px); }
	.aot-item-meta { order: 5; font-size: .78rem; margin-left: 60px; flex: 1; }
	.aot-actions .aot-btn { width: 100%; }
	.aot-tool-title .aot-card-icon { display: none; }
}
