:root {
  --bg: #f7f7f9;
  --card: #ffffff;
  --text: #1b1d21;
  --muted: #6b7280;
  --border: #e4e4e7;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
}

* { box-sizing: border-box; }

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

header.site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

header.site a { color: var(--text); text-decoration: none; font-weight: 600; }
header.site nav a { margin-left: 1rem; font-weight: 400; color: var(--muted); }
header.site nav a:hover { color: var(--accent); }

main {
  max-width: 720px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.4rem; margin-top: 0; }
h2 { font-size: 1.1rem; }

label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; }
input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  background: #fff;
  color: var(--text);
}

input[type="file"] { margin-bottom: 1rem; }

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .btn:hover { background: var(--accent-hover); }
button.danger, .btn.danger { background: var(--danger); }
button.secondary, .btn.secondary { background: transparent; color: var(--muted); border: 1px solid var(--border); }

.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.92rem; }
.alert.error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert.success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }

.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.file-list li:last-child { border-bottom: none; }
.file-meta { color: var(--muted); font-size: 0.82rem; }

.inline-form { display: inline; }
.muted { color: var(--muted); font-size: 0.85rem; }
.hint { color: var(--muted); font-size: 0.82rem; margin-top: -0.6rem; margin-bottom: 1rem; }

fieldset { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1rem; padding: 1rem; }
legend { font-weight: 600; padding: 0 0.4rem; }

.progress-wrap { margin-top: 1rem; }
.progress-track {
  width: 100%;
  height: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.15s ease;
}
