/* DSquare Web Admin — plain, readable, no framework (docs/PLAN-WEBADMIN.md section 5). */
:root {
  --bg: #f6f7f9;
  --card: #fff;
  --text: #16181d;
  --muted: #6b7280;
  --line: #e3e6eb;
  --brand: #1f6fd1;
  --bad: #c0362c;
  --ok: #1d7a46;
  --new: #b25e00;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 12px 24px; background: #111827; color: #fff; }
header a { color: #e5e7eb; text-decoration: none; }
header .brand { font-weight: 700; color: #fff; }
header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; flex: 1; }
header nav a.on { color: #fff; border-bottom: 2px solid #60a5fa; }
header .who { display: flex; align-items: center; gap: 12px; color: #9ca3af; font-size: 13px; margin: 0; }
main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 28px 0 8px; }
a { color: var(--brand); }
.muted { color: var(--muted); }
.flash { background: #e8f1fd; border: 1px solid #bcd6f7; padding: 8px 12px; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; background: #fafbfc; }
td.actions { display: flex; gap: 6px; }
td.actions form { margin: 0; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #eef0f3; color: var(--muted); }
.tag.new { background: #fff3e0; color: var(--new); }
.tag.ok { background: #e7f6ee; color: var(--ok); }
form { margin: 12px 0; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); padding: 6px 8px; border: 1px solid #cfd4dc; border-radius: 6px; background: #fff; }
textarea { width: 100%; max-width: 640px; }
input[type="checkbox"] { width: 18px; height: 18px; }
button, .button { display: inline-block; font: inherit; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; }
button.link { background: none; border: 0; color: #e5e7eb; padding: 0; text-decoration: underline; }
button.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; background: var(--card); border: 1px solid var(--line); padding: 16px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.message { white-space: pre-wrap; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); padding: 12px 16px; overflow-wrap: anywhere; }
.cards { display: flex; flex-wrap: wrap; gap: 16px; }
.card { display: block; min-width: 220px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; }
.card b { display: block; font-size: 28px; }
.danger-zone { margin-top: 32px; }
.danger-zone a { color: var(--bad); }
@media (max-width: 900px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  td { border: 0; padding: 2px 10px; }
  dl { grid-template-columns: 1fr; }
}
