:root {
  --ink: #1e3a4c;
  --muted: #6b7c88;
  --line: #e6eef2;
  --paper: #f4f7f8;
  --card: #fff;
  --accent: #2f6f8f;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", "PingFang SC", sans-serif; color: var(--ink); background: var(--paper); }
button, input, textarea, select { font: inherit; color: inherit; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: var(--card); border-radius: 18px; padding: 28px; }
.login-card h1 { margin: 0 0 8px; font-size: 28px; }
.hint { color: var(--muted); margin: 0 0 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field span { font-size: 13px; color: var(--muted); }
input, textarea, select { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
textarea { resize: vertical; }
.btn { border: 0; background: var(--accent); color: #fff; border-radius: 999px; padding: 10px 16px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: #9f3d3d; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.layout { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.side { background: #173246; color: #f4f7f8; padding: 22px 16px; }
.brand { font-size: 20px; font-weight: 700; margin-bottom: 22px; }
.nav-btn { display: block; width: 100%; text-align: left; margin-bottom: 8px; background: transparent; color: #d5e4ec; border: 0; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.nav-btn.active { background: #2f6f8f; color: white; }
.main { padding: 22px; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.top h1 { margin: 0; font-size: 22px; }
.panel { background: var(--card); border-radius: 16px; padding: 16px; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.grow { flex: 1; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.thumb { width: 72px; height: auto; object-fit: contain; border-radius: 8px; background: #eef3f6; display: block; }
.pill { border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.pill.on { background: #e5f4ea; color: #1f7a45; }
.pill.off { background: #f3f4f6; color: var(--muted); }
.ops { white-space: nowrap; }
.mask { position: fixed; inset: 0; background: rgba(23, 50, 70, 0.45); display: flex; align-items: center; justify-content: center; padding: 24px; }
.dialog { width: min(760px, 100%); max-height: 90vh; overflow: auto; background: white; border-radius: 18px; padding: 22px; }
.dialog h3 { margin: 0 0 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gallery { display: flex; flex-wrap: wrap; gap: 12px; }
.shot { width: 100%; }
.shot img, .shot video { width: 100%; height: auto; object-fit: contain; border-radius: 10px; background: #eef3f6; display: block; }
.shot-ops { display: flex; gap: 4px; margin-top: 6px; }
.file-btn { position: relative; overflow: hidden; width: fit-content; margin-top: 10px; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.muted { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 28px 0; }
.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: white; padding: 10px 16px; border-radius: 999px; z-index: 30; }
@media (max-width: 800px) {
  .layout, .row2 { grid-template-columns: 1fr; }
}
