:root { --bg:#f6f5f2; --card:#fff; --ink:#15130f; --mute:#6b675e; --line:#e4e1d9; --accent:#15130f; --ok:#1f7a4d; --warn:#b4570b; --bad:#b3261e; }
* { box-sizing: border-box; }
body { margin:0; font:14px/1.5 -apple-system, "Segoe UI", system-ui, sans-serif; background:var(--bg); color:var(--ink); }
button, input, select, textarea { font:inherit; color:inherit; }
button { cursor:pointer; }
.wrap { max-width:1100px; margin:0 auto; padding:24px 16px 64px; }
.top { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
.top h1 { font-size:20px; margin:0; }
.btn { border:1px solid var(--line); background:var(--card); border-radius:8px; padding:7px 12px; }
.btn.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
.btn.danger { color:var(--bad); }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:20px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px 16px; }
.stat b { display:block; font-size:26px; line-height:1.1; }
.stat span { color:var(--mute); font-size:12px; }
.filters { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.filters input, .filters select { border:1px solid var(--line); background:var(--card); border-radius:8px; padding:7px 10px; }
.filters input { flex:1; min-width:180px; }
.list { background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.row { display:grid; grid-template-columns:1.4fr 1.4fr 1fr 110px; gap:12px; padding:12px 16px; border-bottom:1px solid var(--line); cursor:pointer; align-items:center; }
.row:last-child { border-bottom:0; }
.row:hover { background:#faf9f6; }
.row small { display:block; color:var(--mute); }
.pill { display:inline-block; border-radius:999px; padding:2px 9px; font-size:12px; border:1px solid var(--line); background:#f1efe9; }
.pill.new { background:#e6f0ff; border-color:#c4d8ff; }
.pill.won { background:#e1f4ea; border-color:#b9e3cc; color:var(--ok); }
.pill.lost, .pill.spam { color:var(--mute); }
.pill.partial { background:#fff1de; border-color:#f3d6ac; color:var(--warn); }
.pager { display:flex; justify-content:space-between; align-items:center; margin-top:12px; color:var(--mute); }
.detail { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:20px; }
.detail h2 { margin:0 0 4px; font-size:20px; }
.grid { display:grid; grid-template-columns:140px 1fr; gap:6px 16px; margin:16px 0; }
.grid dt { color:var(--mute); }
.grid dd { margin:0; word-break:break-word; }
.msg { white-space:pre-wrap; background:#faf9f6; border:1px solid var(--line); border-radius:8px; padding:12px; }
.notes { margin-top:20px; }
.note { border-left:3px solid var(--line); padding:4px 12px; margin:8px 0; }
.note small { color:var(--mute); display:block; }
textarea { width:100%; min-height:70px; border:1px solid var(--line); border-radius:8px; padding:8px; margin:8px 0; }
.login { max-width:340px; margin:12vh auto; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:24px; }
.login input { width:100%; border:1px solid var(--line); border-radius:8px; padding:9px 10px; margin:6px 0 12px; }
.err { color:var(--bad); min-height:20px; }
.empty { padding:32px; text-align:center; color:var(--mute); }
@media (max-width:700px) { .row { grid-template-columns:1fr auto; } .row > :nth-child(2), .row > :nth-child(3) { display:none; } .grid { grid-template-columns:1fr; } }
.login .hint { color: var(--mute); margin: 0 0 14px; }
.login input.code { font-size: 22px; letter-spacing: 6px; text-align: center; }
.btn.link { border: 0; background: none; color: var(--mute); text-decoration: underline; margin-left: 8px; }
