:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1d2330; --muted: #667085; --line: #e3e6eb;
  --accent: #1f4e8c; --accent-ink: #fff; --danger: #b42318; --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; }
.wrap { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
.wrap.wide { max-width: 1280px; }
h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.page-head { margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field > span { font-weight: 600; }
.req { color: var(--danger); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }
input, select, textarea {
  font: inherit; color: inherit; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus, .drop:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; }
.drop {
  border: 2px dashed #c5cbd5; border-radius: var(--radius); padding: 22px; text-align: center;
  background: #fafbfc; color: var(--ink); cursor: default;
}
.drop.over { border-color: var(--accent); background: #eef3fa; }
.linkish { color: var(--accent); text-decoration: underline; cursor: pointer; }
.thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.thumb { position: relative; width: 150px; }
.thumb img { width: 150px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.thumb span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb .x {
  position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; line-height: 20px;
}
.btn {
  font: inherit; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); border-color: #f1c0bb; }
.btn:disabled { opacity: .6; cursor: default; }
.error { color: var(--danger); background: #fef3f2; border: 1px solid #f1c0bb; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.done { text-align: center; }

/* admin */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input { max-width: 280px; }
.toolbar select { width: auto; }
.toolbar .spacer { flex: 1; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pill { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: #eef1f5; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f9fafb; font-size: 13px; color: var(--muted); font-weight: 600; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f6f8fb; }
td.sum { max-width: 420px; }
td.sum div { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.s-New { background: #e0ecff; color: #1f4e8c; }
.s-In-progress { background: #fff4d6; color: #8a5a00; }
.s-Resolved { background: #dcf5e6; color: #146c3a; }
.s-Won-t-fix { background: #eceef2; color: #555; }
.login { max-width: 340px; margin: 12vh auto 0; }
.panel-bg { position: fixed; inset: 0; background: rgba(15, 20, 30, .35); }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100%); background: #fff;
  overflow-y: auto; padding: 24px; box-shadow: -8px 0 24px rgba(0,0,0,.12);
}
.panel dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 16px 0; }
.panel dt { color: var(--muted); font-size: 13px; }
.panel dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.panel .shots { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 10px 0 18px; }
.panel .shots img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
