/* =========================================================
   PDFTools — Rediseño visual profesional y responsive
   Capa de estilos sin cambios en la lógica JavaScript
   ========================================================= */

:root {
  --bg: #07111f;
  --bg-alt: #0a1728;
  --surface: rgba(13, 27, 46, 0.86);
  --surface-strong: #0f1e33;
  --surface-soft: rgba(255, 255, 255, 0.045);
  --card-bg: #0d1b2e;
  --accent: #6d7cff;
  --accent-strong: #5364f5;
  --accent-2: #31d6c4;
  --accent-soft: rgba(109, 124, 255, 0.16);
  --text: #f4f7fb;
  --muted: #9dadc3;
  --muted-strong: #c7d2e2;
  --success: #3ddc97;
  --danger: #ff7185;
  --warning: #f7c966;
  --border-soft: rgba(163, 184, 214, 0.16);
  --border-strong: rgba(163, 184, 214, 0.28);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius: 22px;
  --radius-xl: 30px;
  --shadow-soft: 0 18px 45px rgba(1, 7, 17, 0.28);
  --shadow-card: 0 24px 70px rgba(1, 7, 17, 0.34);
  --shadow-accent: 0 16px 38px rgba(83, 100, 245, 0.25);
}

html {
  display: block;
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  scrollbar-color: rgba(109, 124, 255, 0.52) #07111f;
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at 10% -10%, rgba(109, 124, 255, 0.22), transparent 34rem),
    radial-gradient(circle at 94% 7%, rgba(49, 214, 196, 0.12), transparent 30rem),
    linear-gradient(180deg, #081423 0%, #07111f 48%, #050d18 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

* {
  box-sizing: border-box;
}

::selection {
  color: white;
  background: rgba(109, 124, 255, 0.72);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
select,
input,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.file-label:focus-within {
  outline: 3px solid rgba(49, 214, 196, 0.28);
  outline-offset: 3px;
}

/* =============================
   Encabezado y navegación
   ============================= */

.header {
  position: sticky;
  top: 0;
  z-index: 80;
  width: 100%;
  padding: 14px 22px 12px;
  background: rgba(7, 17, 31, 0.78);
  border-bottom: 1px solid rgba(173, 194, 224, 0.12);
  box-shadow: 0 8px 30px rgba(1, 7, 17, 0.12);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.header-top,
.subtitle,
.nav {
  width: min(1180px, 100%);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.header-top {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #f8fbff;
  font-size: clamp(1.18rem, 1.6vw, 1.46rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  white-space: nowrap;
}

.logo::before {
  content: "PDF";
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  border-radius: 11px;
  background: linear-gradient(145deg, #7a86ff, #4f60ef 58%, #2dc4b6);
  box-shadow: 0 10px 24px rgba(83, 100, 245, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.logo span {
  color: transparent;
  background: linear-gradient(120deg, #aeb7ff 12%, #62e6d8 92%);
  -webkit-background-clip: text;
  background-clip: text;
}

.subtitle {
  margin-top: 2px;
  margin-bottom: 9px;
  padding-left: 47px;
  color: #8fa2bb;
  font-size: 0.78rem;
  line-height: 1.25;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.lang-select,
.select-premium,
.a4-select {
  min-height: 38px;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background-color: rgba(13, 27, 46, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.lang-select {
  min-width: 64px;
  padding: 6px 28px 6px 11px;
  font-size: 0.77rem;
}

.lang-select:hover,
.select-premium:hover,
.a4-select:hover {
  border-color: rgba(109, 124, 255, 0.64);
  background-color: rgba(16, 34, 57, 0.98);
}

.lang-select:focus,
.select-premium:focus,
.a4-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(109, 124, 255, 0.14);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 5px;
  margin-top: 0;
  padding: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(165, 187, 217, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav::after {
  content: none;
}

.nav__link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 7px 12px;
  color: #9badc5;
  font-size: 0.77rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav__link:hover {
  color: #f6f9fd;
  border-color: rgba(165, 187, 217, 0.14);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.nav__link--active {
  color: white;
  border-color: rgba(126, 139, 255, 0.5);
  background: linear-gradient(135deg, rgba(109, 124, 255, 0.95), rgba(83, 100, 245, 0.95));
  box-shadow: 0 8px 20px rgba(83, 100, 245, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* =============================
   Contenedor y portada
   ============================= */

.container {
  width: min(1180px, 100%);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 50px) 22px 72px;
}

.hero {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 0 30px;
  padding: clamp(32px, 5vw, 62px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(168, 190, 221, 0.17);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 82% 22%, rgba(49, 214, 196, 0.18), transparent 31%),
    radial-gradient(circle at 4% 10%, rgba(109, 124, 255, 0.28), transparent 38%),
    linear-gradient(135deg, rgba(15, 31, 53, 0.98), rgba(9, 22, 39, 0.96));
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.hero::before {
  content: "";
  position: absolute;
  right: -65px;
  top: 50%;
  width: 270px;
  height: 270px;
  z-index: -1;
  border: 1px solid rgba(129, 143, 255, 0.2);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow:
    0 0 0 34px rgba(109, 124, 255, 0.035),
    0 0 0 72px rgba(49, 214, 196, 0.025);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  z-index: 1;
  opacity: 0.85;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
}

.hero h1 {
  max-width: 800px;
  margin: 0 0 12px;
  color: #f8fbff;
  font-size: clamp(2rem, 4.5vw, 3.65rem);
  font-weight: 840;
  line-height: 1.04;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero p {
  max-width: 700px;
  margin: 0;
  color: #afbdd0;
  font-size: clamp(0.98rem, 1.45vw, 1.12rem);
  line-height: 1.72;
}

/* =============================
   Tarjetas y rejillas
   ============================= */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 34px;
}

.tools-grid--single {
  width: 100%;
  max-width: 880px;
  grid-template-columns: minmax(0, 1fr);
  margin-left: auto;
  margin-right: auto;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(16, 33, 55, 0.94), rgba(10, 23, 40, 0.94));
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 3px;
  opacity: 0.9;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  pointer-events: none;
}

.tool-card::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 190px;
  height: 190px;
  opacity: 0.55;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 124, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 139, 255, 0.42);
  background: linear-gradient(145deg, rgba(18, 37, 62, 0.98), rgba(11, 25, 43, 0.98));
  box-shadow: 0 28px 72px rgba(1, 7, 17, 0.4), 0 0 0 1px rgba(109, 124, 255, 0.08);
}

.tool-card h2,
.tool-card h3,
.tool-card h4 {
  position: relative;
  z-index: 1;
  color: #f5f8fc;
  letter-spacing: -0.025em;
}

.tool-card h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 780;
  line-height: 1.28;
}

.tool-card h3 {
  margin: 25px 0 8px;
  font-size: 1.04rem;
}

.tool-card h4 {
  margin: 20px 0 7px;
  font-size: 0.94rem;
}

.tool-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.68;
}

.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card {
  min-height: 245px;
}

.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.09rem;
}

.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card h2::before {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #eaf0ff;
  font-size: 1.15rem;
  border: 1px solid rgba(139, 153, 255, 0.28);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(109, 124, 255, 0.2), rgba(49, 214, 196, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card:nth-child(1) h2::before { content: "⊕"; }
.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card:nth-child(2) h2::before { content: "✂"; }
.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card:nth-child(3) h2::before { content: "↕"; }
.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card:nth-child(4) h2::before { content: "⇲"; }
.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card:nth-child(5) h2::before { content: "A4"; font-size: 0.76rem; font-weight: 850; }
.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card:nth-child(6) h2::before { content: "✎"; }
.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card:nth-child(7) h2::before { content: "▧"; }
.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card:nth-child(8) h2::before { content: "Aa"; font-size: 0.78rem; font-weight: 850; }

.tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card p {
  flex: 1 1 auto;
}

.tools-grid:not(.tools-grid--single):not(.shop-grid) .btn-full {
  margin-top: auto;
}

.tools-grid--single .tool-card {
  padding: clamp(24px, 4vw, 40px);
  border-color: rgba(165, 187, 217, 0.2);
  box-shadow: var(--shadow-card);
}

.tools-grid--single .tool-card:hover {
  transform: none;
}

.tools-grid--single .tool-card > h2 {
  margin-bottom: 10px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.tools-grid--single .tool-card > p {
  max-width: 720px;
  margin-bottom: 26px;
  font-size: 0.96rem;
}

/* =============================
   Botones y controles
   ============================= */

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  color: white;
  font-size: 0.86rem;
  font-weight: 730;
  line-height: 1.1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn.primary {
  color: white;
  border-color: rgba(135, 147, 255, 0.42);
  background: linear-gradient(135deg, #7180ff, #5263f3 64%, #4454da);
  box-shadow: 0 11px 24px rgba(83, 100, 245, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #7d8aff, #5b6cf8 64%, #4a5be2);
  box-shadow: 0 16px 32px rgba(83, 100, 245, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn.secondary {
  color: #dce5f1;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.btn.secondary:hover:not(:disabled) {
  color: white;
  border-color: rgba(109, 124, 255, 0.46);
  background: rgba(109, 124, 255, 0.12);
}

.btn-sm {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.75rem;
  border-radius: 9px;
}

.btn-xs,
.btn.btn-xs {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 8px;
}

.btn-full {
  width: 100%;
  margin-top: 6px;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: saturate(0.6);
}

.file-label {
  position: relative;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 16px;
  padding: 22px;
  overflow: hidden;
  color: #dce7f5;
  font-size: 0.92rem;
  font-weight: 720;
  text-align: center;
  border: 1.5px dashed rgba(132, 149, 255, 0.5);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(109, 124, 255, 0.12), transparent 58%),
    rgba(8, 19, 34, 0.68);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.file-label::before {
  content: "↑";
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #dfe5ff;
  font-size: 1.32rem;
  font-weight: 750;
  border: 1px solid rgba(145, 158, 255, 0.35);
  border-radius: 13px;
  background: rgba(109, 124, 255, 0.15);
  box-shadow: 0 10px 24px rgba(83, 100, 245, 0.14);
}

.file-label::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.08), transparent 65%);
  transform: translateX(-100%);
  transition: opacity 0.2s ease, transform 0.55s ease;
}

.file-label:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 216, 202, 0.68);
  background:
    radial-gradient(circle at 50% 0%, rgba(49, 214, 196, 0.13), transparent 58%),
    rgba(9, 22, 38, 0.88);
  box-shadow: 0 14px 35px rgba(1, 7, 17, 0.2);
}

.file-label:hover::after {
  opacity: 1;
  transform: translateX(100%);
}

.file-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-list-wrapper,
.split-mode,
.compress-quality,
.signature-pad,
.reviews-summary {
  margin-bottom: 16px;
  padding: 14px;
  color: var(--muted);
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  background: rgba(5, 15, 28, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.file-list-header,
.signature-pad__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--muted-strong);
  font-size: 0.79rem;
  font-weight: 680;
}

.file-list {
  max-height: 190px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.file-list-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 4px;
  color: #c7d3e2;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(163, 184, 214, 0.1);
}

.file-list-item:last-child {
  border-bottom: 0;
}

.split-mode,
.compress-quality {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.split-mode__label,
.compress-quality__label {
  color: #e6edf7;
  font-size: 0.84rem;
  font-weight: 750;
}

.split-mode__option,
.compress-quality__option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  color: #aebdd0;
  font-size: 0.82rem;
}

input[type="radio"],
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.select-premium {
  width: 100%;
  max-width: 250px;
  min-height: 42px;
  padding: 8px 38px 8px 12px;
  border-radius: 11px;
}

.hint,
.split-info,
.split-info--secondary {
  color: #8fa1b9;
  font-size: 0.78rem;
}

.hint {
  margin-top: 9px;
}

.status,
.a4-status {
  min-height: 22px;
  margin-top: 12px;
  font-size: 0.84rem;
  font-weight: 650;
}

.status--success,
.a4-status--success { color: var(--success); }
.status--error,
.a4-status--error { color: var(--danger); }
.status--info,
.a4-status--info { color: #7fdaf0; }

.ocr-textarea,
.review-form input,
.review-form select,
.review-form textarea,
.a4-file-input {
  width: 100%;
  color: #edf3fb;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(5, 15, 28, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.ocr-textarea,
.review-form textarea {
  min-height: 190px;
  padding: 13px 14px;
  resize: vertical;
}

.review-form input,
.review-form select,
.a4-file-input {
  min-height: 44px;
  padding: 9px 12px;
}

.ocr-textarea:focus,
.review-form input:focus,
.review-form select:focus,
.review-form textarea:focus,
.a4-file-input:focus {
  outline: none;
  border-color: rgba(109, 124, 255, 0.72);
  background: rgba(7, 19, 34, 0.9);
  box-shadow: 0 0 0 4px rgba(109, 124, 255, 0.12);
}

.ocr-actions,
.sign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 13px;
}

.ocr-actions .btn,
.sign-actions .btn {
  flex: 1 1 180px;
}

.signature-pad__canvas-wrapper,
.sign-preview-container {
  border: 1px dashed rgba(151, 171, 203, 0.36);
  border-radius: 13px;
  background: #06101d;
}

/* =============================
   Modal y vistas previas
   ============================= */

.modal {
  z-index: 120;
  padding: 18px;
}

.modal__backdrop,
.intro-modal__backdrop {
  background: rgba(2, 8, 17, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal__dialog,
.intro-modal__dialog {
  color: var(--text);
  border: 1px solid rgba(167, 189, 220, 0.2);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(16, 33, 55, 0.99), rgba(8, 20, 36, 0.99));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal__dialog {
  width: min(960px, 100%);
  max-width: 960px;
  max-height: calc(100dvh - 36px);
  padding: 18px;
}

.modal__header {
  min-height: 42px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.modal__header h3 {
  font-size: 1.02rem;
  font-weight: 760;
}

.modal__close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #b9c6d8;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.modal__close:hover {
  color: white;
  border-color: rgba(255, 113, 133, 0.35);
  background: rgba(255, 113, 133, 0.1);
}

.modal__body {
  margin-top: 14px;
}

.modal__footer {
  padding-top: 13px;
  border-top: 1px solid var(--border-soft);
}

.thumb-grid {
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
  max-height: 52vh;
  padding: 3px;
}

.thumb-item {
  padding: 8px;
  color: var(--text);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(5, 15, 28, 0.66);
  box-shadow: 0 8px 20px rgba(1, 7, 17, 0.16);
}

.thumb-item:hover {
  border-color: rgba(109, 124, 255, 0.4);
}

.thumb-item__canvas-wrapper {
  border-radius: 10px;
  background: #040b14;
}

.intro-modal {
  z-index: 140;
  padding: 18px;
}

.intro-modal__dialog {
  width: min(500px, 100%);
  max-width: 500px;
  margin: 8vh auto;
  padding: 28px;
}

.intro-modal__dialog h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
}

.intro-modal__dialog p {
  color: var(--muted);
  line-height: 1.7;
}

/* =============================
   Secciones de contenido
   ============================= */

.content-section,
.faq,
.guide-section,
.reviews-section,
.testimonials,
.faq-section {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 34px);
  color: var(--muted-strong);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(10, 23, 40, 0.72);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.content-section h2,
.faq h2,
.guide-title,
.reviews-title,
.testimonials h2,
.faq-title {
  margin: 0 0 14px;
  color: #f2f6fb;
  font-size: clamp(1.3rem, 2.7vw, 1.75rem);
  font-weight: 790;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.content-section h2::before,
.faq > h2::before,
.guide-title::before,
.reviews-title::before,
.faq-title::before {
  content: "";
  width: 28px;
  height: 4px;
  display: block;
  margin-bottom: 12px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.content-section p,
.content-section ul,
.guide-intro,
.guide-steps,
.guide-tips ul,
.reviews-subtitle {
  color: #aebdd0;
  font-size: 0.94rem;
  line-height: 1.76;
}

.content-section p:last-child,
.content-section ul:last-child {
  margin-bottom: 0;
}

.content-section ul,
.guide-steps,
.guide-tips ul {
  padding-left: 1.25rem;
}

.content-section li,
.guide-steps li,
.guide-tips li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.content-section li::marker,
.guide-steps li::marker,
.guide-tips li::marker {
  color: var(--accent-2);
  font-weight: 800;
}

.guide-tips {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(49, 214, 196, 0.14);
  border-radius: 16px;
  background: rgba(49, 214, 196, 0.045);
}

.guide-tips h3 {
  margin-top: 0;
  color: #eaf6f4;
}

.guide-tips a,
.content-section a,
.tool-card p a {
  color: #91a0ff;
  text-decoration-color: rgba(145, 160, 255, 0.45);
  text-underline-offset: 3px;
}

.guide-tips a:hover,
.content-section a:hover,
.tool-card p a:hover {
  color: #72e2d5;
}

.faq details {
  margin-bottom: 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(5, 15, 28, 0.48);
}

.faq details[open] {
  border-color: rgba(109, 124, 255, 0.4);
  box-shadow: 0 10px 28px rgba(1, 7, 17, 0.17);
}

.faq summary {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 14px 52px 14px 16px;
  color: #e3eaf4;
  font-size: 0.91rem;
  font-weight: 690;
  cursor: pointer;
  list-style: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  float: none;
  color: #bdc7ff;
  font-size: 1.1rem;
  border: 1px solid rgba(135, 149, 255, 0.2);
  border-radius: 9px;
  background: rgba(109, 124, 255, 0.1);
  transform: translateY(-50%);
}

.faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%);
}

.faq p {
  margin: 0;
  padding: 0 16px 16px;
  color: #a9b9cc;
  line-height: 1.7;
}

/* FAQ de la tienda */
.faq-section {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.faq-title {
  text-align: left;
}

.faq-item {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(5, 15, 28, 0.48);
  box-shadow: none;
}

.faq-item.is-open {
  border-color: rgba(109, 124, 255, 0.42);
  box-shadow: 0 10px 28px rgba(1, 7, 17, 0.17);
}

.faq-toggle {
  min-height: 54px;
  padding: 13px 15px;
  color: #e3eaf4;
}

.faq-question {
  font-size: 0.91rem;
}

.faq-icon {
  width: 29px;
  height: 29px;
  color: #bdc7ff;
  border: 1px solid rgba(135, 149, 255, 0.2);
  border-radius: 9px;
  background: rgba(109, 124, 255, 0.1);
}

.faq-item.is-open .faq-question {
  color: #e9ecff;
}

.faq-item.is-open .faq-icon {
  color: white;
  background: var(--accent);
}

.faq-content p {
  color: #a9b9cc;
}

/* =============================
   Banner promocional
   ============================= */

.promo-banner {
  margin: 30px 0;
}

.promo-banner__content {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(26px, 5vw, 46px);
  text-align: left;
  border: 1px solid rgba(134, 149, 255, 0.3);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 26%, rgba(49, 214, 196, 0.18), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(109, 124, 255, 0.24), transparent 42%),
    linear-gradient(135deg, #101f38, #111b3d 55%, #0b2534);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.promo-banner__content::before {
  top: -80%;
  left: 55%;
  width: 70%;
  height: 190%;
  opacity: 0.32;
  animation: promoGlow 8s ease-in-out infinite alternate;
}

.promo-banner__content h3 {
  margin: 0 0 8px;
  color: #f5f7ff;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  background: none;
  -webkit-background-clip: initial;
}

.promo-banner__content p {
  max-width: 620px;
  margin: 0 0 18px;
  color: #afbdd0;
  font-size: 0.95rem;
}

.promo-banner__content .btn.secondary {
  min-height: 44px;
  margin: 0;
  padding: 10px 18px;
  color: white !important;
  border: 1px solid rgba(135, 147, 255, 0.42);
  border-radius: 12px;
  background: linear-gradient(135deg, #7180ff, #5263f3);
  box-shadow: 0 11px 24px rgba(83, 100, 245, 0.25);
}

/* =============================
   Tienda
   ============================= */

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  background: rgba(10, 23, 40, 0.7);
}

.chip {
  min-height: 38px;
  padding: 8px 14px;
  color: #aebdd0;
  font-size: 0.82rem;
  font-weight: 680;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.chip:hover {
  color: white;
  border-color: var(--border-soft);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.chip--active {
  color: white;
  border-color: rgba(135, 147, 255, 0.42);
  background: linear-gradient(135deg, #7180ff, #5263f3);
  box-shadow: 0 8px 18px rgba(83, 100, 245, 0.22);
}

.shop-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.shop-card {
  min-height: 260px;
}

.shop-card::before {
  content: "Producto";
  inset: 18px 18px auto auto;
  width: auto;
  height: auto;
  padding: 5px 8px;
  color: #bfcbda;
  font-size: 0.65rem;
  font-weight: 780;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.shop-card[data-category="windows"]::before { content: "Windows"; color: #9bdcf5; }
.shop-card[data-category="office"]::before { content: "Office"; color: #ffc996; }
.shop-card[data-category="antivirus"]::before { content: "Seguridad"; color: #8be3ba; }

.shop-card h2 {
  max-width: calc(100% - 78px);
  margin-top: 28px;
}

.shop-card p {
  flex: 1 1 auto;
}

.shop-card .price {
  display: block;
  margin: 5px 0 18px;
  color: #f7f9fc;
  font-size: 1.45rem;
  font-weight: 820;
  letter-spacing: -0.035em;
}

/* =============================
   Imágenes a PDF, OCR y firma
   ============================= */

.img2pdf-file-list .file-list-item.img2pdf-item {
  padding: 10px 4px;
}

.img2pdf-thumb {
  border-color: var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(1, 7, 17, 0.2);
}

.img2pdf-name {
  color: #dfe7f2;
}

.img2pdf-size {
  color: #8497b0;
}

.img2pdf-icon-btn {
  width: 34px;
  height: 34px;
  border-color: var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.img2pdf-icon-btn:hover {
  border-color: rgba(109, 124, 255, 0.5);
  background: rgba(109, 124, 255, 0.14);
}

.ocr-output__label,
.a4-label {
  color: #dce6f3;
  font-size: 0.84rem;
  font-weight: 720;
}

.resize-handle {
  width: 15px;
  height: 15px;
  border: 2px solid #dfe5ff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(1, 7, 17, 0.4);
}

/* =============================
   Transformar a A4
   ============================= */

.a4-tool-card {
  max-width: 880px;
  margin: 0 auto 30px;
  padding: clamp(24px, 4vw, 40px);
  color: var(--text);
  border: 1px solid rgba(165, 187, 217, 0.2);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(16, 33, 55, 0.96), rgba(10, 23, 40, 0.96));
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.a4-file-input,
.a4-select {
  min-height: 44px;
  padding: 9px 12px;
  color: #edf3fb;
  border-color: var(--border-strong);
  border-radius: 12px;
  background: rgba(5, 15, 28, 0.68);
}

.a4-file-info {
  color: #94a6bd;
}

.a4-options-grid {
  gap: 14px;
}

.a4-notice {
  padding: 14px 16px;
  color: #bceee8;
  border: 1px solid rgba(49, 214, 196, 0.18);
  border-radius: 13px;
  background: rgba(49, 214, 196, 0.07);
}

.a4-progress-track {
  height: 9px;
  background: rgba(255, 255, 255, 0.08);
}

.a4-progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* =============================
   Opiniones
   ============================= */

.reviews-section {
  background: rgba(10, 23, 40, 0.72);
}

.review-form {
  gap: 12px;
}

.review-card {
  padding: 17px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(5, 15, 28, 0.52);
}

.review-text {
  color: #dce5f1;
}

.review-author,
.reviews-summary-count {
  color: #91a2b9;
}

/* =============================
   Pie de página y flotantes
   ============================= */

.footer {
  margin-top: auto;
  padding: 28px 22px 30px;
  color: #8294ab;
  font-size: 0.8rem;
  text-align: center;
  border-top: 1px solid rgba(163, 184, 214, 0.1);
  background: rgba(4, 12, 22, 0.84);
}

.footer p {
  margin: 0 0 7px;
}

.footer-author {
  margin: 4px 0;
}

.footer-x,
.footer-links a {
  color: #96a7bc;
  text-decoration: none;
}

.footer-x:hover,
.footer-links a:hover {
  color: #8f9dff;
  text-decoration: none;
}

.visit-badge,
.suggest-fab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  color: #aab8ca;
  font-size: 0.76rem;
  border: 1px solid rgba(165, 187, 217, 0.2);
  border-radius: 12px;
  background: rgba(10, 23, 40, 0.88);
  box-shadow: 0 15px 35px rgba(1, 7, 17, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.visit-badge {
  right: 14px;
  bottom: 14px;
}

.suggest-fab {
  left: 14px;
  bottom: 14px;
}

.visit-badge__value {
  color: #8f9dff;
}

.suggest-fab:hover,
.visit-badge:hover {
  color: white;
  border-color: rgba(109, 124, 255, 0.42);
  background: rgba(17, 34, 58, 0.94);
  box-shadow: 0 18px 42px rgba(1, 7, 17, 0.38);
}

/* =============================
   Páginas de error
   ============================= */

.error-box {
  width: min(680px, 100%);
  margin: 8vh auto;
  padding: clamp(30px, 6vw, 60px);
  text-align: center;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(16, 33, 55, 0.95), rgba(9, 21, 37, 0.96));
  box-shadow: var(--shadow-card);
}

.error-icon {
  font-size: 3rem;
}

.error-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* =============================
   Adaptación para tablets
   ============================= */

@media (max-width: 1024px) {
  .tools-grid,
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 230px;
  }
}

/* =============================
   Adaptación para móviles
   ============================= */

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  body::before {
    background-size: 34px 34px;
  }

  .header {
    padding: 10px 12px 9px;
  }

  .header-top {
    min-height: 40px;
    flex-direction: row !important;
    align-items: center;
  }

  .logo {
    max-width: calc(100% - 92px);
    font-size: 1.15rem;
  }

  .logo::before {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .lang-label {
    display: none;
  }

  .lang-select {
    min-width: 58px;
    min-height: 34px;
    padding: 5px 25px 5px 9px;
  }

  .subtitle {
    margin: 3px 0 8px;
    padding-left: 43px;
    font-size: 0.71rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav {
    width: calc(100% + 4px);
    max-width: none;
    margin-left: -2px;
    margin-right: -2px;
    padding: 4px;
    border-radius: 12px;
  }

  .nav__link {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 0.72rem;
    border-radius: 9px;
  }

  .container {
    padding: 22px 14px 58px;
  }

  .hero {
    min-height: 0;
    margin-bottom: 20px;
    padding: 28px 22px 32px;
    border-radius: 22px;
  }

  .hero::before {
    right: -115px;
    width: 230px;
    height: 230px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 11vw, 2.6rem);
    line-height: 1.08;
  }

  .hero p {
    font-size: 0.93rem;
    line-height: 1.65;
  }

  .tools-grid,
  .shop-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .tool-card,
  .tools-grid--single .tool-card,
  .a4-tool-card {
    padding: 21px;
    border-radius: 19px;
  }

  .tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card {
    min-height: 0;
  }

  .tools-grid:not(.tools-grid--single):not(.shop-grid) .tool-card h2::before {
    width: 40px;
    height: 40px;
  }

  .tool-card:hover {
    transform: none;
  }

  .tools-grid--single .tool-card > h2 {
    font-size: 1.45rem;
  }

  .file-label {
    min-height: 118px;
    padding: 18px;
  }

  .file-list-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-list-header .btn {
    width: 100%;
  }

  .tools-grid--single form > .btn.primary,
  .tools-grid--single > .tool-card > .btn.primary {
    width: 100%;
  }

  .split-mode__option,
  .compress-quality__option {
    align-items: flex-start;
  }

  .img2pdf-item-left {
    gap: 9px;
  }

  .img2pdf-thumb {
    width: 54px;
    height: 54px;
  }

  .img2pdf-controls {
    gap: 4px;
  }

  .content-section,
  .faq,
  .guide-section,
  .reviews-section,
  .testimonials,
  .faq-section {
    margin-top: 18px;
    padding: 21px;
    border-radius: 19px;
  }

  .guide-tips {
    padding: 16px;
  }

  .promo-banner {
    margin: 22px 0;
  }

  .promo-banner__content {
    min-height: 0;
    align-items: stretch;
    padding: 25px 21px;
    border-radius: 19px;
  }

  .promo-banner__content .btn.secondary {
    width: 100%;
  }

  .shop-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .shop-filters::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: 0 0 auto;
  }

  .shop-card {
    min-height: 0;
  }

  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal__dialog {
    width: 100%;
    max-height: 94dvh;
    padding: 16px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .modal__controls,
  .modal__footer,
  .ocr-actions,
  .sign-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modal__controls .btn,
  .modal__footer .btn,
  .ocr-actions .btn,
  .sign-actions .btn {
    width: 100%;
    flex-basis: auto;
  }

  .thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-modal {
    padding: 12px;
  }

  .intro-modal__dialog {
    margin: 4vh auto;
    padding: 22px;
    border-radius: 20px;
  }

  .a4-options-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    padding-bottom: 76px;
  }

  .visit-badge,
  .suggest-fab {
    width: 44px;
    height: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0;
    border-radius: 13px;
  }

  .visit-badge__label,
  .suggest-fab__text {
    display: none;
  }

  .visit-badge {
    right: 10px;
    bottom: 10px;
  }

  .suggest-fab {
    left: 10px;
    bottom: 10px;
  }
}

@media (max-width: 390px) {
  .logo {
    font-size: 1.05rem;
  }

  .subtitle {
    max-width: calc(100vw - 24px);
  }

  .container {
    padding-left: 11px;
    padding-right: 11px;
  }

  .hero,
  .tool-card,
  .tools-grid--single .tool-card,
  .a4-tool-card,
  .content-section,
  .faq,
  .guide-section,
  .reviews-section,
  .testimonials,
  .faq-section,
  .promo-banner__content {
    border-radius: 17px;
  }

  .thumb-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (hover: none) {
  .tool-card:hover,
  .btn:hover,
  .file-label:hover,
  .nav__link:hover,
  .chip:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
