/* 丹阳店订货工具 - 样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  min-height: 100vh;
  color: #2c3e50;
  padding: 24px 16px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

/* ========== Header ========== */
.header {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.header-title h1 {
  font-size: 22px;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 4px;
}

.header-title p {
  font-size: 13px;
  color: #64748b;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.15s;
}
.nav-link:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* ========== Card ========== */
.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-desc {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.6;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
}

/* ========== Upload area ========== */
.upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
}

.upload-zone:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.upload-zone.dragover {
  border-color: #3b82f6;
  background: #dbeafe;
}

.upload-zone.has-file {
  border-color: #10b981;
  border-style: solid;
  background: #ecfdf5;
}

.upload-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.upload-text-main {
  font-size: 15px;
  color: #334155;
  margin-bottom: 6px;
  font-weight: 500;
}
.upload-text-sub {
  font-size: 12px;
  color: #94a3b8;
}

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  margin-top: 16px;
  border: 1px solid #e2e8f0;
}
.file-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-size: 14px;
}
.file-info-icon {
  color: #10b981;
  font-size: 18px;
}

input[type="file"] {
  display: none;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 24px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}
.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.btn-success:hover:not(:disabled) {
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}
.btn-ghost {
  background: white;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.btn-ghost:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ========== Summary ========== */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.summary-item {
  padding: 18px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  position: relative;
  transition: all 0.15s;
}

.summary-item.count {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
}

.summary-item.excluded {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #fca5a5;
}

.summary-label {
  font-size: 13px;
  color: #475569;
  margin-bottom: 8px;
  font-weight: 500;
}

.summary-value {
  font-size: 28px;
  font-weight: 700;
  color: #1e3a8a;
  line-height: 1;
}
.summary-item.excluded .summary-value {
  color: #991b1b;
}

.summary-extra {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}

/* ========== Files download ========== */
.files-list {
  margin-top: 16px;
}

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.15s;
}
.file-row:hover {
  background: #f1f5f9;
}

.file-row-name {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
  word-break: break-all;
}
.file-row-tag {
  font-size: 11px;
  color: #64748b;
  margin-left: 8px;
}

.download-btn {
  padding: 6px 14px;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
  flex-shrink: 0;
  margin-left: 12px;
}
.download-btn:hover {
  background: #2563eb;
}
.download-all {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

/* ========== Toast / Status ========== */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(8px);
}
.toast.success {
  background: #10b981;
  color: white;
}
.toast.error {
  background: #ef4444;
  color: white;
}
.toast.info {
  background: #3b82f6;
  color: white;
}

.status-text {
  margin-top: 12px;
  font-size: 13px;
  color: #64748b;
  min-height: 20px;
}
.status-text.error {
  color: #dc2626;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hidden */
.hidden { display: none !important; }

/* Mobile */
@media (max-width: 640px) {
  body { padding: 12px 8px; }
  .card { padding: 20px 16px; }
  .header { padding: 18px 20px; }
  .upload-zone { padding: 28px 12px; }
  .summary-value { font-size: 22px; }
}