:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header h1 { margin: 0; font-size: 1.25rem; }

.site-header nav {
  display: flex;
  gap: 1.25rem;
}

.site-header a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.site-header a:hover { color: var(--text); }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.card h2 { margin-top: 0; font-size: 1.4rem; }

.hint { color: var(--text-muted); margin-bottom: 1.25rem; }

.required { color: var(--danger); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field.span-2 { grid-column: 1 / -1; }

label { font-size: 0.9rem; color: var(--text-muted); }

input[type="text"],
input[type="tel"],
input[type="number"],
textarea {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input:invalid:not(:placeholder-shown) { border-color: var(--danger); }

textarea { resize: vertical; }

.drop-zone {
  border: 2px dashed var(--surface-2);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-zone p { margin: 0 0 0.25rem; }

.drop-zone small { color: var(--text-muted); }

.file-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.file-list button {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.85rem;
}

.actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-secondary:hover { background: #475569; }

.result-box {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--surface-2);
}

.result-box.success { border-color: var(--success); }
.result-box.error { border-color: var(--danger); }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-approved { background: rgba(59, 130, 246, 0.15); color: var(--primary); }
.status-ready { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.status-rejected { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.query-row {
  display: flex;
  gap: 0.75rem;
}

.query-row input { flex: 1; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 0 3rem;
  font-size: 0.9rem;
}

/* 移动端 */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .header-inner { justify-content: center; }
  .site-header nav { width: 100%; justify-content: center; }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
}
