/* No @import — style.css is linked directly in the HTML <head>. */

.tool-page{ padding: 150px 0 100px; }

.tool-header{ text-align: center; max-width: 600px; margin: 0 auto 40px; }
.tool-header h1{ font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 900; letter-spacing: -0.03em; margin-bottom: 12px; }
.tool-header p{ color: var(--ink-soft); font-size: 1rem; }

.back-link{
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 700; color: var(--ink-faint);
  margin-bottom: 18px; transition: color .2s ease, gap .2s ease;
}
.back-link:hover{ color: var(--ink); gap: 10px; }
.back-link svg{ width: 14px; height: 14px; }

/* ---------- card grid ---------- */
.pdf-tools-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.pdf-card{
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s ease;
}
.pdf-card:hover{
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--yellow-line);
}
.pdf-card-icon{
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--marketing), var(--dev));
  color: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s var(--ease);
}
.pdf-card:hover .pdf-card-icon{ transform: rotate(-8deg) scale(1.06); }
.pdf-card-icon svg{ width: 20px; height: 20px; }
.pdf-card-name{ font-weight: 800; font-size: 0.98rem; letter-spacing: -0.01em; }
.pdf-card-desc{ font-size: 0.82rem; color: var(--ink-soft); }

.pdf-card.soon{ opacity: 0.7; }
.pdf-card.soon:hover{ transform: none; box-shadow: none; border-color: var(--line); }
.soon-badge{
  position: absolute; top: 14px; right: 14px;
  font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--yellow-soft); color: var(--marketing);
  border: 1px solid var(--yellow-line);
  padding: 4px 9px; border-radius: 999px;
}

/* ---------- panel wrap ---------- */
.pdf-panel-wrap{ display: none; }
.pdf-panel-wrap.active{ display: block; animation: pdf-fade .3s ease; }

.back-to-grid{
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; border: none; background: transparent; cursor: pointer;
  font-size: 0.85rem; font-weight: 700; color: var(--ink-faint);
  margin-bottom: 18px; padding: 0; transition: color .2s ease, gap .2s ease;
}
.back-to-grid:hover{ color: var(--ink); gap: 10px; }
.back-to-grid svg{ width: 14px; height: 14px; }

.tool-shell{
  max-width: 760px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 40px;
}

.panel-title{ font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; }

.pdf-panel{ display: none; }
.pdf-panel.active{ display: block; animation: pdf-fade .3s ease; }
@keyframes pdf-fade{ from{ opacity: 0; transform: translateY(6px); } to{ opacity: 1; transform: translateY(0); } }

.alert-security{
  display: flex; align-items: center; gap: 10px;
  background: var(--yellow-soft); border: 1px solid var(--yellow-line); color: var(--ink);
  font-size: 0.87rem; font-weight: 600; padding: 14px 18px;
  border-radius: var(--radius-sm); margin-bottom: 24px;
}
.alert-security svg{ width: 18px; height: 18px; flex-shrink: 0; color: var(--marketing); }

.pdf-shell label{ font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; display: block; color: var(--ink); }
.pdf-shell input[type="file"], .pdf-shell input[type="text"]{
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit; background: #fff; color: var(--ink);
  margin-bottom: 8px; transition: border-color .2s ease, background .2s ease;
}
.pdf-shell input:disabled{ background: #f4f2ec; color: var(--ink-faint); cursor: not-allowed; }
.pdf-shell input[type="file"]:focus, .pdf-shell input[type="text"]:focus{ outline: none; border-color: var(--marketing); }
.pdf-shell input[type="range"]{ width: 100%; accent-color: var(--marketing); margin-bottom: 20px; }

.field-hint{ font-size: 0.78rem; color: var(--ink-faint); margin-bottom: 20px; }
.pdf-meta{ font-size: 0.82rem; font-weight: 600; color: var(--marketing); margin-bottom: 16px; min-height: 1.2em; }

.btn-block{ width: 100%; justify-content: center; }
.btn-block:disabled{ background: #d8d2c0; color: #fff; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------- sub tabs ---------- */
.sub-tab-row{
  display: inline-flex; gap: 4px; background: var(--yellow-soft);
  border: 1px solid var(--yellow-line); padding: 4px; border-radius: 999px; margin-bottom: 24px;
}
.sub-tab-btn{
  font-family: inherit; border: none; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 0.82rem;
  color: var(--ink-faint); transition: background .25s ease, color .25s ease;
}
.sub-tab-btn.active{ background: var(--ink); color: var(--yellow); }
.sub-panel{ display: none; }
.sub-panel.active{ display: block; animation: pdf-fade .3s ease; }

/* ---------- pill options (rotate/position choices) ---------- */
.pill-options{ display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pill-option{
  font-family: inherit; border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 0.82rem;
  cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pill-option.active{ background: var(--ink); color: var(--yellow); border-color: var(--ink); }
.pill-option:hover:not(.active){ border-color: var(--yellow-line); background: var(--yellow-soft); }

/* ---------- file list ---------- */
.file-list{ display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.file-item{
  display: flex; align-items: center; gap: 10px;
  background: var(--yellow-soft); border: 1px solid var(--yellow-line);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.85rem;
}
.file-item .file-index{
  width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--yellow);
  font-size: 0.72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.file-item .file-name{ flex-grow: 1; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .file-actions{ display: flex; gap: 4px; flex-shrink: 0; }
.file-item button{
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--yellow-line);
  background: #fff; color: var(--ink-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease; font-family: inherit; font-size: 0.9rem; line-height: 1;
}
.file-item button:hover{ background: var(--ink); color: var(--yellow); }
.file-item button.remove-btn:hover{ background: var(--marketing); color: #fff; }

/* ---------- signature pad ---------- */
.signature-pad-wrap{
  border: 2px dashed var(--yellow-line); border-radius: var(--radius-md);
  background: var(--yellow-soft); margin-bottom: 12px; overflow: hidden;
}
#signaturePad{ width: 100%; height: 180px; display: block; touch-action: none; cursor: crosshair; }

/* ---------- coming soon ---------- */
.coming-soon-box{
  text-align: center; padding: 30px 10px;
}
.coming-soon-box svg{
  width: 44px; height: 44px; color: var(--ink-faint); margin: 0 auto 14px;
}
.coming-soon-box h3{ font-size: 1.1rem; font-weight: 800; margin-bottom: 10px; }
.coming-soon-box p{ color: var(--ink-soft); font-size: 0.9rem; max-width: 420px; margin: 0 auto; line-height: 1.6; }

@media (max-width: 540px){
  .tool-shell{ padding: 26px 20px; }
  .pdf-tools-grid{ grid-template-columns: repeat(2, 1fr); }
}