/* Tool pages */
.tool-page {
  padding: 2rem 0 3rem;
}
.tool-header {
  text-align: center;
  margin-bottom: 2rem;
}
.tool-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.tool-header p {
  color: #64748b;
  margin: 0;
  max-width: 560px;
  margin-inline: auto;
}

/* Drop zone */
.dropzone {
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: border-color .2s, background .2s;
  cursor: pointer;
  max-width: 720px;
  margin: 0 auto 1.5rem;
}
.dropzone.dragover {
  border-color: #2563eb;
  background: #eff6ff;
}
.dropzone .dz-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: #eff6ff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #2563eb;
}
.dropzone h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 650;
}
.dropzone p {
  margin: 0 0 1.25rem;
  color: #64748b;
  font-size: 0.9rem;
}
.dropzone .btn { pointer-events: none; }

.file-list {
  max-width: 720px;
  margin: 0 auto 1.5rem;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}
.file-item .fi-icon {
  width: 40px;
  height: 40px;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.file-item .fi-info { flex: 1; min-width: 0; }
.file-item .fi-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-item .fi-meta { font-size: 0.8rem; color: #94a3b8; }
.file-item .fi-remove {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
}
.file-item .fi-remove:hover { background: #fee2e2; color: #dc2626; }

.tool-actions {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.options-panel {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
}
.options-panel label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}
.options-panel input[type="text"],
.options-panel input[type="number"],
.options-panel select,
.options-panel textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  margin-bottom: 0.85rem;
}
.options-panel .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 520px) {
  .options-panel .row { grid-template-columns: 1fr; }
}

.progress-wrap {
  max-width: 720px;
  margin: 1.5rem auto 0;
  display: none;
}
.progress-wrap.visible { display: block; }
.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar > div {
  height: 100%;
  background: #2563eb;
  width: 0%;
  transition: width .25s;
  border-radius: 999px;
}
.progress-text {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.5rem;
  text-align: center;
}

.result-box {
  max-width: 720px;
  margin: 1.5rem auto 0;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  display: none;
}
.result-box.visible { display: block; }
.result-box h3 { margin: 0 0 0.5rem; color: #065f46; }
.result-box p { margin: 0 0 1rem; color: #047857; font-size: 0.9rem; }

.how-it-works {
  max-width: 720px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}
.how-it-works h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.step {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}
.step .num {
  width: 28px;
  height: 28px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.step h4 { margin: 0 0 0.25rem; font-size: 0.95rem; }
.step p { margin: 0; font-size: 0.8rem; color: #64748b; }
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
}

/* Status badges for tools that need server */
.server-note {
  max-width: 720px;
  margin: 0 auto 1.25rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #92400e;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.server-note.ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
