:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1a1d23;
  --muted: #6b7280;
  --primary: #2f5fe0;
  --primary-hover: #2549b3;
  --success: #1a9e5c;
  --danger: #d64545;
  --warn: #b8860b;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 56px;
}

.topbar .brand { font-weight: 700; font-size: 16px; }
.topbar nav { display: flex; gap: 18px; align-items: center; }
.topbar nav a.active { color: var(--text); font-weight: 600; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input[type=text], input[type=password], input[type=url], textarea, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; min-height: 70px; }
input[type=file] { margin-top: 4px; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
}
.btn:hover { background: var(--primary-hover); }
.btn.secondary { background: #eef0f4; color: var(--text); }
.btn.secondary:hover { background: #e2e5ea; }
.btn.danger { background: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }

.thumb-row { display: flex; gap: 12px; flex-wrap: wrap; }
.thumb {
  flex: none;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f0f1f3;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.draft { background: #eef0f4; color: var(--muted); }
.badge.queued, .badge.pending { background: #fef3c7; color: var(--warn); }
.badge.generating, .badge.running { background: #dbeafe; color: var(--primary); }
.badge.done, .badge.success { background: #dcfce7; color: var(--success); }
.badge.failed { background: #fee2e2; color: var(--danger); }
.badge.partial { background: #fef3c7; color: var(--warn); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.gallery .shot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.gallery .shot img { width: 100%; display: block; aspect-ratio: 1/1; object-fit: cover; background: #f0f1f3; }
.gallery .shot .meta { padding: 8px 10px; font-size: 12px; }
.gallery .shot .meta .name { font-weight: 600; margin-bottom: 4px; }

.alert { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.alert.error { background: #fee2e2; color: var(--danger); }
.alert.warn { background: #fef3c7; color: var(--warn); }
.alert.success { background: #dcfce7; color: var(--success); }

.muted { color: var(--muted); font-size: 13px; }
.login-wrap { max-width: 360px; margin: 90px auto; }
