:root {
  --bg: #f3f5fa;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff6ff;
  --green: #047857;
  --green-soft: #ecfdf5;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --red: #b91c1c;
  --red-soft: #fef2f2;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 17px;
}

h3 {
  font-size: 16px;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

input,
select {
  font: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.sub {
  color: var(--muted);
  font-size: 13px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.error {
  color: var(--red);
  font-size: 13px;
  margin-top: 10px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 60px;
  display: grid;
  gap: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 550;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-strong);
}

.btn.ghost {
  border-color: var(--line);
  color: #334155;
  background: #fff;
}

.btn.ghost:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.btn.danger {
  border-color: #fecaca;
  color: var(--red);
  background: var(--red-soft);
}

.btn.small {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn.block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}

.badge.pending {
  background: #f1f5f9;
  color: #475569;
}

.badge.partial,
.badge.ready {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.completed {
  background: var(--green-soft);
  color: var(--green);
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
input[type="file"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  outline: none;
}

input[type="file"] {
  padding: 7px 12px;
  height: auto;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 18px;
  padding: 26px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
}

.modal-card h3 {
  margin-bottom: 16px;
}

.modal-card img {
  width: 100%;
  max-width: 260px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
}

.modal-close:hover {
  background: #f1f5f9;
}

.link-text {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.modal-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
