/* ===== FBA Label Cover Tool — Batch Styles ===== */

/* ---------- Tool Topbar ---------- */
.tool-topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 22px;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(230,234,242,.8);
}
.tool-home {
  font-size: 13.5px; font-weight: 600; color: #64748b;
  transition: color .2s; white-space: nowrap;
}
.tool-home:hover { color: #101b33; }
.tool-title {
  font-size: 15.5px; font-weight: 700; color: #0f1b2d;
}
.tool-badge {
  margin-left: auto;
  font-size: 11.5px; color: #16a34a;
  background: #dcfce7; padding: 3px 10px; border-radius: 6px;
  font-weight: 600;
}

/* ---------- Layout ---------- */
body {
  font-family: "PingFang SC","HarmonyOS Sans SC","Microsoft YaHei",-apple-system,"Segoe UI",Roboto,sans-serif;
  background: #f6f7fb; color: #0f1b2d;
  font-size: 15px; line-height: 1.6; margin: 0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

.tool-main {
  max-width: 780px; margin: 0 auto; padding: 30px 20px 50px;
  display: flex; flex-direction: column; gap: 20px;
}

/* ---------- Panels ---------- */
.panel {
  background: #fff; border: 1px solid #e6eaf2;
  border-radius: 16px; padding: 26px;
  box-shadow: 0 1px 3px rgba(15,27,45,.04);
}
.panel-title { font-size: 16px; font-weight: 700; margin-bottom: 2px; }

/* ---------- Upload ---------- */
.upload-panel.condensed {
  padding: 14px 22px;
  display: flex; align-items: center; gap: 14px;
}
.upload-panel.condensed .drop-zone,
.upload-panel.condensed .drop-icon,
.upload-panel.condensed .drop-title,
.upload-panel.condensed .drop-hint,
.upload-panel.condensed .drop-hint-sub { display: none; }

.drop-zone {
  border: 2px dashed #cbd5e1; border-radius: 14px;
  padding: 42px 30px; text-align: center;
  transition: all .25s ease; cursor: pointer;
  background: #fafbfd;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: #ff6a2b; background: #fff8f5;
}
.drop-zone:focus-visible { outline: 2px solid #ff6a2b; outline-offset: 2px; }
.drop-icon { font-size: 40px; margin-bottom: 10px; }
.drop-title { font-size: 16px; font-weight: 650; color: #0f1b2d; }
.drop-hint { font-size: 13px; color: #64748b; margin-top: 8px; }
.drop-hint-sub { font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* ---------- Progress ---------- */
.progress-bar {
  width: 100%; height: 6px; background: #e6eaf2;
  border-radius: 99px; overflow: hidden; margin-top: 12px;
  position: relative;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, #ff6a2b, #f04e0b);
  border-radius: 99px; transition: width .4s ease;
}
.progress-text {
  display: block; font-size: 12.5px; color: #64748b;
  margin-top: 8px; text-align: center;
}

/* ---------- Result Header ---------- */
.result-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.result-summary {
  font-size: 13.5px; color: #64748b; font-weight: 500;
  background: #f1f5f9; padding: 3px 12px; border-radius: 8px;
}

/* ---------- Match Table ---------- */
.match-list-wrap { overflow-x: auto; }
.match-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
}
.match-table th {
  text-align: left; padding: 10px 14px;
  background: #f6f7fb; color: #64748b;
  font-weight: 600; font-size: 12.5px;
  border-bottom: 1px solid #e6eaf2;
  white-space: nowrap;
}
.match-table th:first-child { border-radius: 10px 0 0 0; }
.match-table th:last-child { border-radius: 0 10px 0 0; }
.match-table td {
  padding: 11px 14px; border-bottom: 1px solid #e6eaf2; vertical-align: middle;
}
.match-table tbody tr:hover td { background: #fafbfd; }
.match-filename {
  font-size: 13px; color: #0f1b2d;
  max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Status badges */
.status-ready {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: #f59e0b; font-weight: 600;
}
.status-ready::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }
.status-done {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: #16a34a; font-weight: 600;
}
.status-done::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #16a34a; }
.status-error {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: #ef4444; font-weight: 600;
}
.status-error::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
.status-none {
  font-size: 12.5px; color: #94a3b8;
}

/* ---------- Actions ---------- */
.result-actions {
  display: flex; gap: 10px; margin-top: 18px;
  justify-content: flex-end;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent;
  transition: all .25s ease;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #ff6a2b, #f04e0b);
  color: #fff; box-shadow: 0 4px 14px rgba(255,106,43,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,106,43,.42); }
.btn-primary:disabled { opacity: .5; transform: none; box-shadow: none; cursor: not-allowed; }
.btn-ghost {
  border-color: #e6eaf2; color: #64748b; background: #fff;
}
.btn-ghost:hover { border-color: #ff6a2b; color: #f04e0b; }
.btn-ghost:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Download Area ---------- */
.download-area {
  text-align: center; padding: 28px 20px;
  border: 2px solid #16a34a; border-radius: 14px;
  background: #f0fdf4; margin-top: 18px;
}
.download-success { font-size: 18px; font-weight: 700; color: #16a34a; margin-bottom: 6px; }
.download-info { font-size: 13px; color: #64748b; margin-bottom: 16px; }
.download-area .btn { margin: 0 6px; }

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center; padding: 30px 20px; color: #94a3b8;
}
.empty-icon { font-size: 40px; margin-bottom: 8px; }
.empty-state p { margin: 6px 0; }
.empty-hint { font-size: 13px; margin-top: 6px; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ---------- Info Panel ---------- */
.info-panel { margin-top: 8px; }
.info-body { font-size: 13.5px; color: #33415c; line-height: 1.8; }
.info-body p { margin: 10px 0; }
.info-body b { color: #0f1b2d; }

/* ---------- Footer ---------- */
.tool-footer {
  text-align: center; padding: 20px;
  font-size: 12.5px; color: #94a3b8;
}
.tool-footer a { color: #ff6a2b; }
.tool-footer a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .tool-topbar { padding: 0 14px; gap: 8px; }
  .tool-title { font-size: 14px; }
  .tool-badge { display: none; }
  .tool-main { padding: 20px 12px 40px; }
  .panel { padding: 18px; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { justify-content: center; }
  .match-table th:nth-child(3),
  .match-table td:nth-child(3) { display: none; }
}
