:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #1d4f91;
  --primary-dark: #163e72;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { color: var(--primary); }

.topbar {
  background: #111827;
  color: #fff;
}

.topbar-inner,
.wrap {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.brand {
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-user form { margin: 0; }

.linkish {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.wrap { padding: 28px 0 48px; }

.panel,
.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h1 {
  margin: 0;
  font-size: 20px;
}

.muted { color: var(--muted); }

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 18px 0;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
}

button.primary {
  height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

button.primary:hover { background: var(--primary-dark); }

.text-btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th { color: var(--muted); font-weight: 600; }

.desc {
  max-width: 360px;
  white-space: pre-wrap;
  word-break: break-word;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.empty { color: var(--muted); padding: 24px 0; }

.login-card {
  width: min(380px, 100%);
  margin: 12vh auto 0;
}

.login-card h1 { margin-bottom: 4px; }

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.login-card input { width: 100%; }

.login-card button.primary { margin-top: 6px; }

.error {
  margin: 12px 0 0;
  color: var(--danger);
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 18px 0 8px;
}

.meta div { min-width: 0; }

.meta .wide { grid-column: 1 / -1; }

dt { color: var(--muted); font-size: 12px; }

dd {
  margin: 4px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.shot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}

.shot img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.shot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .meta { grid-template-columns: 1fr; }
}
