/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Size-adjusted fallback for Inter — eliminates font-swap CLS.
   Metrics tuned so system-ui glyphs occupy identical space to Inter. */
@font-face {
  font-family: 'Inter-fallback';
  src: local('Arial');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

body {
  font-family: 'Inter', 'Inter-fallback', system-ui, -apple-system, sans-serif;
  background: #0a0a0f;
  color: #e8e8f0;
  min-height: 100vh;
}

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; font-weight: 700; font-size: 1.1rem; color: #fff;
}
.brand-icon { font-size: 1.3rem; }
.nav-links { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a {
  color: #aaa; text-decoration: none; font-size: 0.88rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  /* Reserve height so page doesn't shift when hero content renders */
  min-height: 420px;
  contain: layout;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99,102,241,0.35) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 700px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.4);
  color: #a5b4fc; font-size: 0.82rem; font-weight: 600;
  padding: 0.35rem 1rem; border-radius: 99px; margin-bottom: 1.5rem;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); font-weight: 800; line-height: 1.12; margin-bottom: 1.1rem; }
.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { font-size: 1rem; color: #94a3b8; max-width: 560px; margin: 0 auto 2rem; line-height: 1.7; }
.hero-stats { display: flex; justify-content: center; gap: 2.5rem; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat strong { font-size: 1.8rem; font-weight: 800; color: #fff; }
.stat span { font-size: 0.78rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Main ── */
.main { max-width: 820px; margin: 0 auto; padding: 0 1.5rem 5rem; }

/* ── Tool section ── */
.tool-section { margin-bottom: 4rem; scroll-margin-top: 80px; }
.section-header {
  display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem;
}
.section-icon { font-size: 2rem; line-height: 1; margin-top: 0.1rem; }
.section-header h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.25rem; }
.section-header p { color: #94a3b8; font-size: 0.9rem; }

/* ── Card ── */
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.75rem;
}

/* ── Upload zone ── */
.upload-zone {
  border: 2px dashed rgba(99,102,241,0.4);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1.25rem;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: #6366f1;
  background: rgba(99,102,241,0.07);
}
.upload-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-zone p { font-size: 0.95rem; color: #ccc; margin-bottom: 0.3rem; }
.upload-zone strong { color: #fff; }
.upload-hint { font-size: 0.78rem !important; color: #94a3b8 !important; }
.link-label { color: #818cf8; cursor: pointer; text-decoration: underline; }

/* ── Preview ── */
.preview-box {
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.preview-box img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.preview-info { flex: 1; min-width: 150px; }
.preview-info .p-name { font-weight: 600; font-size: 0.9rem; word-break: break-all; }
.preview-info .p-meta { font-size: 0.78rem; color: #94a3b8; margin-top: 0.2rem; }

/* ── Format chips ── */
.format-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ccc; font-size: 0.82rem; font-weight: 500;
  padding: 0.4rem 0.9rem; border-radius: 99px;
  cursor: pointer; transition: all 0.2s;
}
.chip:hover { background: rgba(99,102,241,0.2); border-color: #6366f1; color: #fff; }
.chip.active { background: rgba(99,102,241,0.25); border-color: #6366f1; color: #a5b4fc; }
.chip-disabled { opacity: 0.6; cursor: not-allowed; color: #94a3b8; }
.badge-warn { background: #f59e0b; color: #000; font-size: 0.65rem; border-radius: 99px; padding: 0 0.4rem; margin-left: 0.3rem; font-weight: 700; }

/* ── Preset chips ── */
.sub-label { font-size: 0.82rem; color: #94a3b8; margin-bottom: 0.6rem; }
.preset-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.preset-chip {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ccc; font-size: 0.82rem; font-weight: 600;
  padding: 0.4rem 0.9rem; border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
}
.preset-chip:hover { background: rgba(16,185,129,0.15); border-color: #10b981; color: #6ee7b7; }
.preset-chip.active { background: rgba(16,185,129,0.2); border-color: #10b981; color: #6ee7b7; }

/* ── Form elements ── */
.form-row { margin-bottom: 1.1rem; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.82rem; color: #999; font-weight: 500; }
.form-group select,
.form-group input[type="number"],
.form-group input[type="text"] {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; color: #fff; padding: 0.6rem 0.85rem;
  font-size: 0.9rem; font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
.form-group select:focus,
.form-group input:focus { border-color: #6366f1; }
.form-group select option { background: #1a1a2e; }

.range-input {
  -webkit-appearance: none; width: 100%; height: 6px;
  background: rgba(255,255,255,0.1); border-radius: 3px; outline: none;
  cursor: pointer;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  background: #6366f1; border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
}

.checkbox-label {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.88rem; color: #aaa; cursor: pointer; margin-top: 0.5rem;
}
.checkbox-label input { accent-color: #6366f1; width: 16px; height: 16px; }

/* ── Tabs ── */
.tab-group { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.tab {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #999; font-size: 0.85rem; font-weight: 500;
  padding: 0.45rem 1rem; border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
}
.tab:hover { color: #fff; border-color: rgba(255,255,255,0.25); }
.tab.active { background: rgba(99,102,241,0.2); border-color: #6366f1; color: #a5b4fc; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Preset grid ── */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.preset-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px; padding: 0.85rem; cursor: pointer;
  display: flex; flex-direction: column; gap: 0.25rem; text-align: left;
  transition: all 0.2s;
}
.preset-card:hover { border-color: #6366f1; background: rgba(99,102,241,0.1); }
.preset-card.selected { border-color: #6366f1; background: rgba(99,102,241,0.2); }
.preset-name { font-size: 0.88rem; font-weight: 700; color: #fff; }
.preset-desc { font-size: 0.72rem; color: #94a3b8; }

/* ── File list (pdf) ── */
.file-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.file-item {
  display: flex; align-items: center; gap: 0.75rem;
  background: rgba(255,255,255,0.04); border-radius: 8px; padding: 0.6rem 0.9rem;
  font-size: 0.85rem; color: #ccc;
}
.file-item-icon { font-size: 1.1rem; }
.file-item-size { margin-left: auto; font-size: 0.75rem; color: #94a3b8; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  padding: 0.75rem 1.5rem; border-radius: 10px; cursor: pointer;
  border: none; transition: all 0.2s; margin-top: 0.5rem;
}
.btn-icon { font-size: 1.1rem; }
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(99,102,241,0.5); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.loading .btn-icon::after { content: ''; }

/* ── Status messages ── */
.status-msg {
  margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 8px;
  font-size: 0.88rem; font-weight: 500;
}
.status-msg.success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.status-msg.error   { background: rgba(239,68,68,0.15);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.status-msg.loading { background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.3); color: #a5b4fc; }
.hidden { display: none !important; }

/* ── Footer ── */
.footer {
  text-align: center; padding: 2.5rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06); color: #555; font-size: 0.85rem;
}
.footer strong { color: #888; }
.footer-sub { margin-top: 0.4rem; font-size: 0.78rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .hero-stats { gap: 1.5rem; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .preset-grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 1.25rem; }
}

/* ── Outline button ── */
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #aaa;
}
.btn-outline:hover:not(:disabled) { border-color: rgba(255,255,255,0.35); color: #fff; background: rgba(255,255,255,0.05); }

/* ── Small button ── */
.btn-sm { font-size: 0.8rem; padding: 0.45rem 0.9rem; border-radius: 8px; margin-top: 0.5rem; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); color: #aaa; cursor: pointer; }
.btn-sm:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ── Per-slider inline reset ── */
.sl-reset {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: #555; font-size: 0.78rem;
  cursor: pointer; padding: 0 2px; margin-left: 4px;
  border-radius: 4px; transition: color 0.15s, background 0.15s;
  vertical-align: middle; line-height: 1;
}
.sl-reset:hover { color: #a5b4fc; background: rgba(99,102,241,0.15); }

/* ── Action buttons (rotate/flip) ── */
.crop-controls { margin: 1rem 0; }
.action-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.action-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.11);
  color: #ccc; font-size: 0.82rem; font-weight: 500;
  padding: 0.42rem 0.9rem; border-radius: 8px;
  cursor: pointer; transition: all 0.18s; font-family: inherit;
}
.action-btn:hover { background: rgba(99,102,241,0.18); border-color: #6366f1; color: #a5b4fc; }
.action-btn.active { background: rgba(99,102,241,0.25); border-color: #6366f1; color: #a5b4fc; }

/* ── Cropper container ── */
.crop-container {
  max-height: 420px; overflow: hidden;
  background: #111; border-radius: 10px; margin-bottom: 1rem;
}
.crop-container img { display: block; max-width: 100%; }
.crop-btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }

/* ── Edit workspace ── */
.edit-preview-wrap {
  position: relative; text-align: center;
  background: #111; border-radius: 10px; padding: 1rem;
  margin-bottom: 1.25rem; overflow: hidden;
}
.edit-live-img {
  max-width: 100%; max-height: 320px; border-radius: 8px;
  transition: filter 0.15s ease;
  display: block; margin: 0 auto;
}
.edit-preview-badge {
  position: absolute; top: 8px; right: 10px;
  background: rgba(0,0,0,0.6); color: #888; font-size: 0.7rem;
  padding: 0.2rem 0.5rem; border-radius: 4px;
}

/* ── Edit tabs (use same .tab / .tab-group) ── */
.etab-content { display: none; }
.etab-content.active { display: block; }

/* ── Slider grid ── */
.slider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; margin-bottom: 0.75rem; }
@media (max-width: 600px) { .slider-grid { grid-template-columns: 1fr; } }

/* ── Effects grid ── */
.effects-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.65rem; }
@media (max-width: 600px) { .effects-grid { grid-template-columns: repeat(3, 1fr); } }
.effect-card {
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.09);
  border-radius: 10px; padding: 0.6rem 0.5rem 0.5rem;
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 0.4rem;
  transition: all 0.2s; font-family: inherit;
}
.effect-card:hover { border-color: #8b5cf6; background: rgba(139,92,246,0.1); }
.effect-card.active { border-color: #8b5cf6; background: rgba(139,92,246,0.22); box-shadow: 0 0 0 3px rgba(139,92,246,0.22); }
/* Colour-swatch thumbnail showing the actual CSS filter */
.effect-thumb {
  width: 52px; height: 34px; border-radius: 5px;
  background: linear-gradient(135deg, #f97316 0%, #3b82f6 40%, #22c55e 70%, #ec4899 100%);
  display: block;
}
.effect-name { font-size: 0.72rem; color: #ccc; font-weight: 500; text-align: center; }

/* ── Reset All button ── */
.btn-reset-all {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5; font-size: 0.78rem; font-weight: 600;
  padding: 0.38rem 0.85rem; border-radius: 8px;
  cursor: pointer; font-family: inherit; transition: all 0.2s; white-space: nowrap;
}
.btn-reset-all:hover { background: rgba(239,68,68,0.22); border-color: #ef4444; color: #fff; }

/* ── Watermark canvas preview ── */
.wm-preview-wrap {
  position: relative; text-align: center;
  background: repeating-conic-gradient(#1a1a2e 0% 25%, #111 0% 50%) 0 0 / 16px 16px;
  border-radius: 10px; overflow: hidden;
  margin-bottom: 1.25rem; min-height: 80px;
  display: flex; align-items: center; justify-content: center;
}
.wm-canvas {
  display: block; max-width: 100%;
  border-radius: 8px;
}
.color-input {
  height: 42px; width: 100%; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07); cursor: pointer; padding: 2px;
}
.color-input::-webkit-color-swatch-wrapper { padding: 2px; }
.color-input::-webkit-color-swatch { border-radius: 6px; border: none; }

/* ── Position grid (3x3 watermark position) ── */
.position-grid {
  display: grid; grid-template-columns: repeat(3, 40px); gap: 4px;
}
.pos-btn {
  width: 40px; height: 40px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #999; font-size: 1rem; cursor: pointer; transition: all 0.18s;
}
.pos-btn:hover { background: rgba(99,102,241,0.18); border-color: #6366f1; color: #fff; }
.pos-btn.active { background: rgba(99,102,241,0.28); border-color: #6366f1; color: #a5b4fc; }

/* ── Edit bottom row ── */
.edit-btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }

/* ══════════════════════════════════
   ADD TEXT TOOL
══════════════════════════════════ */
.at-canvas-wrap {
  position: relative; text-align: center;
  background: repeating-conic-gradient(#1a1a2e 0% 25%, #111 0% 50%) 0 0 / 16px 16px;
  border-radius: 10px; overflow: hidden; margin-bottom: 1.25rem;
  cursor: crosshair;
}
.at-canvas { display: block; max-width: 100%; border-radius: 8px; }
.at-hint-badge {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.65); color: #a5b4fc; font-size: 0.72rem;
  padding: 0.2rem 0.7rem; border-radius: 4px; white-space: nowrap; pointer-events: none;
}

/* ══════════════════════════════════
   INDIA GOVT TOOLS
══════════════════════════════════ */
.gtab-content { display: none; padding-top: 1.25rem; }
.gtab-content.active { display: block; }

/* Govtcompress hero */
.govtcompress-hero {
  display: flex; align-items: center; gap: 1rem;
  background: linear-gradient(135deg, rgba(251,191,36,0.1) 0%, rgba(239,68,68,0.08) 100%);
  border: 1px solid rgba(251,191,36,0.2); border-radius: 10px;
  padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}
.govtcompress-icon { font-size: 2rem; line-height: 1; }
.govtcompress-hero h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.govtcompress-hero p  { font-size: 0.82rem; color: #888; }

/* ── Signature mode toggle ── */
.sig-mode-toggle {
  display: flex; gap: 0.5rem; margin-bottom: 1.1rem;
  background: rgba(255,255,255,0.04); border-radius: 10px; padding: 4px;
}
.sig-mode-btn {
  flex: 1; padding: 0.5rem 0.75rem; border-radius: 7px; border: none;
  font-family: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  background: transparent; color: #888; transition: all 0.2s;
}
.sig-mode-btn.active { background: rgba(99,102,241,0.25); color: #a5b4fc; }
.sig-mode-btn:hover:not(.active) { color: #ccc; }

/* ── Signature draw toolbar ── */
.sig-draw-toolbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: rgba(255,255,255,0.04); border-radius: 10px;
  padding: 0.6rem 0.85rem; margin-bottom: 0.75rem;
}
.sig-tool-group { display: flex; align-items: center; gap: 0.4rem; }
.sig-tool-label { font-size: 0.72rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.2rem; }

.sig-color-btn {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; transition: all 0.18s; flex-shrink: 0;
}
.sig-color-btn.active  { border-color: #fff; transform: scale(1.2); box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }
.sig-color-btn:hover   { transform: scale(1.15); }

.sig-thick-btn {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  color: #ccc; border-radius: 6px; padding: 0.25rem 0.6rem; cursor: pointer;
  font-family: inherit; font-size: 0.8rem; transition: all 0.18s; line-height: 1;
}
.sig-thick-btn.active { background: rgba(99,102,241,0.25); border-color: #6366f1; color: #a5b4fc; }
.sig-thick-btn:hover  { border-color: #6366f1; }

/* ── Signature pad canvas ── */
.sig-pad-wrap {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 2px solid rgba(99,102,241,0.35);
  background: #fff; cursor: crosshair;
  user-select: none; -webkit-user-select: none;
}
.sig-pad-canvas { display: block; width: 100%; touch-action: none; }
.sig-pad-hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: #bbb; font-size: 1rem; font-weight: 500; pointer-events: none;
  transition: opacity 0.3s;
}
.sig-pad-hint.hidden-hint { opacity: 0; }
.sig-draw-confirm { font-size: 0.85rem; color: #6ee7b7; font-weight: 600; }

/* Signature preset grid */
.sig-preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
@media (max-width: 600px) { .sig-preset-grid { grid-template-columns: repeat(2, 1fr); } }
.sig-preset {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 0.6rem 0.4rem; cursor: pointer;
  font-family: inherit; font-size: 0.82rem; font-weight: 600; color: #ccc;
  text-align: center; transition: all 0.2s; line-height: 1.4;
}
.sig-preset span { display: block; font-size: 0.68rem; color: #94a3b8; font-weight: 400; margin-top: 0.15rem; }
.sig-preset:hover { border-color: #f59e0b; color: #fcd34d; background: rgba(245,158,11,0.1); }
.sig-preset.active { border-color: #f59e0b; background: rgba(245,158,11,0.15); color: #fcd34d; }

/* Merge dual upload */
.merge-upload-row { display: flex; align-items: flex-start; gap: 0.75rem; }
.merge-upload-box { flex: 1; }
.merge-plus { font-size: 1.8rem; font-weight: 700; color: #555; align-self: center; padding-top: 0.5rem; }

/* ══════════════════════════════════
   PDF TOOLS
══════════════════════════════════ */

/* Category nav pills */
.pdf-cat-nav {
  display: flex; gap: 0.5rem; margin-bottom: 1.5rem;
  background: rgba(255,255,255,0.03); border-radius: 12px; padding: 5px;
  border: 1px solid rgba(255,255,255,0.07);
}
.pdf-cat-btn {
  flex: 1; padding: 0.55rem 1rem; border-radius: 9px; border: none;
  font-family: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  background: transparent; color: #888; transition: all 0.2s; text-align: center;
}
.pdf-cat-btn:hover:not(.active) { color: #ccc; background: rgba(255,255,255,0.05); }
.pdf-cat-btn.active {
  background: linear-gradient(135deg,rgba(99,102,241,0.3),rgba(139,92,246,0.25));
  color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3);
}

/* Category panels */
.pdf-cat { display: none; }
.pdf-cat.active { display: block; }

/* Tab content panels */
.pdftab-content { display: none; }
.pdftab-content.active { display: block; }

/* PDF info bar */
.pdf-info-bar {
  display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap;
  background: linear-gradient(135deg,rgba(99,102,241,0.1),rgba(139,92,246,0.08));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 10px; padding: 0.7rem 1rem; margin-bottom: 1.1rem;
  font-size: 0.88rem;
}
.pdf-info-icon { font-size: 1.2rem; }
.pdf-info-text { color: #a5b4fc; font-weight: 600; }
.pdf-info-sub  { color: #94a3b8; font-size: 0.78rem; }

@media (max-width:600px) { .pdf-cat-nav { flex-direction: column; } }

/* ══════════════════════════════════════════════════════════
   AI TOOLS
══════════════════════════════════════════════════════════ */
.ai-tab-group { flex-wrap: wrap; }

.aitab-content { display: none; }
.aitab-content.active { display: block; }

/* OCR / PDF-Text result textarea */
.ocr-textarea {
  width: 100%;
  min-height: 220px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #e8e8f0;
  font-family: 'Inter', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 0.85rem 1rem;
  resize: vertical;
  outline: none;
}
.ocr-textarea:focus {
  border-color: rgba(99,102,241,0.5);
}

/* scale / style action buttons (reuse .action-btn from existing) */
.scale-btn.active, .style-btn.active {
  background: rgba(99,102,241,0.25);
  border-color: #6366f1;
  color: #a5b4fc;
}

/* ── BG Changer color swatches ── */
.cbg-color-swatches {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem;
}
.cbg-swatch {
  width: 32px; height: 32px; border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer; transition: all 0.18s; flex-shrink: 0;
}
.cbg-swatch:hover  { transform: scale(1.2); border-color: rgba(255,255,255,0.6); }
.cbg-swatch.active { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.4); transform: scale(1.15); }

/* ── Scene Preset Grid ─────────────────────────────────────────── */
.cbg-scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.cbg-scene-card {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  cursor: pointer;
  padding: 0.5rem 0.4rem 0.4rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  transition: all 0.18s;
  font-size: 0.72rem; color: #cbd5e1; font-weight: 500;
}
.cbg-scene-card:hover  { border-color: rgba(99,102,241,0.5); background: rgba(99,102,241,0.12); transform: translateY(-2px); }
.cbg-scene-card.active { border-color: #6366f1; background: rgba(99,102,241,0.2); box-shadow: 0 0 0 3px rgba(99,102,241,0.3); }
.cbg-scene-thumb {
  width: 100%; height: 60px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}

/* ── PDF Editor ── */
#pdfed-pages img { user-select:none; }
.pdfed-tool { opacity:0.65; }
.pdfed-tool.active { opacity:1; border-color:#6366f1 !important; box-shadow:0 0 0 2px rgba(99,102,241,0.4); }
.pdfed-ann-widget { user-select:none; }
.pdfed-ann-widget input[type=text]:focus { border-color:#6366f1 !important; background:rgba(255,255,200,1) !important; }
#pdfed-pages [data-page] { cursor:crosshair; }
#sig-modal canvas { display:block; }

/* ── Hero quick-access chips ── */
.hero-chip {
  display:inline-block;
  padding:.35rem .85rem;
  border-radius:20px;
  background:rgba(99,102,241,.15);
  border:1px solid rgba(99,102,241,.35);
  color:#a5b4fc;
  font-size:.78rem;
  font-weight:600;
  text-decoration:none;
  transition:all .18s;
  white-space:nowrap;
}
.hero-chip:hover { background:rgba(99,102,241,.3); color:#fff; }

/* ── Footer styles ── */
.site-footer { background:#0a0a14; border-top:1px solid rgba(255,255,255,.07); padding:3rem 1.5rem 1.5rem; margin-top:4rem; }
.footer-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:2rem; max-width:1100px; margin:0 auto; }
.footer-col h3 { font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:#94a3b8; margin:0 0 .8rem; }
.footer-col ul { list-style:none; padding:0; margin:0; }
.footer-col li { margin-bottom:.4rem; }
.footer-col a { color:#94a3b8; text-decoration:none; font-size:.82rem; transition:color .15s; }
.footer-col a:hover { color:#c7d2fe; }
.footer-bottom { max-width:1100px; margin:1.5rem auto 0; padding-top:1.25rem; border-top:1px solid rgba(255,255,255,.06); display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.5rem; }
.footer-bottom p { color:#94a3b8; font-size:.78rem; margin:0; }

/* ── Category cards ── */
.cat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1rem; max-width:1200px; margin:0 auto 2rem; padding:0 1rem; }
.cat-card { background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.09); border-radius:16px; padding:1.3rem 1.5rem; text-decoration:none; color:#f1f5f9; transition:all .2s; display:block; }
.cat-card:hover { border-color:#6366f1; background:rgba(99,102,241,.1); transform:translateY(-3px); box-shadow:0 8px 24px rgba(99,102,241,.15); }
.cat-card .cat-icon { font-size:2rem; margin-bottom:.6rem; }
.cat-card h3 { font-size:1rem; font-weight:700; margin:0 0 .3rem; }
.cat-card p { font-size:.81rem; color:#94a3b8; margin:0; line-height:1.5; }

/* ── Mobile global fixes ── */
@media (max-width:640px) {
  .main { padding:0 .5rem; }
  .tool-section { padding:1.5rem .75rem; }
  .card { padding:1.25rem 1rem; }
  .section-header { flex-direction:column; gap:.5rem; }
  .form-row.two-col { grid-template-columns:1fr !important; }
  .hero h1 { font-size:2rem !important; }
  .hero-stats { gap:1rem; }
  .hero-content { padding:3rem 1rem 2rem; }
  .nav-inner { padding:0 .75rem; }
  #pdfed-toolbar { flex-direction:column; align-items:flex-start; }
  #pdfed-toolbar > div:last-child { margin-left:0 !important; width:100%; justify-content:flex-start; }
}

/* ── Section label ── */
.section-label { font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:#818cf8; }
