:root {
  --primary: #2563EB;
  --secondary: #64748B;
  --accent: #0EA5E9;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 4px 12px rgba(15,23,42,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--surface); border-right: 1px solid var(--border);
  padding: 24px 16px; position: sticky; top: 0; height: 100vh; flex-shrink: 0;
}
.brand { font-weight: 600; font-size: 18px; color: var(--text); margin-bottom: 28px;
  display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: var(--secondary); font-weight: 500; margin-bottom: 4px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.active { background: #EFF6FF; color: var(--primary); }
.content { flex: 1; padding: 32px 40px; max-width: 1100px; }

/* Cards / sections */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px;
}
h1 { font-size: 26px; font-weight: 600; margin: 0 0 6px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 16px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
p.sub { color: var(--muted); margin-top: 0; }

/* Forms */
label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: var(--surface); color: var(--text); margin-bottom: 16px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #BFDBFE; border-color: var(--primary); }
.field { margin-bottom: 16px; }
.hint { color: var(--muted); font-size: 13px; margin: -10px 0 14px; }
.checkline { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.checkline input { width: auto; margin: 0; }
.checkline label { margin: 0; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 500; font-size: 14px; cursor: pointer; background: var(--primary); color: #fff;
  transition: background .15s, box-shadow .15s;
}
.btn:hover { background: #1D4ED8; text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--secondary); border-color: var(--border); }
.btn.secondary:hover { background: var(--bg); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #B91C1C; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.stat .value { font-size: 28px; font-weight: 600; color: var(--text); }
.stat .label { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr.hot td { background: #FFFBEB; }
.table-wrap { overflow-x: auto; }

/* Badges */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 600; background: #EFF6FF; color: var(--primary);
}
.badge.hot { background: #FEF3C7; color: var(--warning); }
.badge.score { background: #DCFCE7; color: var(--success); }
.badge.status-Draft { background: #F1F5F9; color: var(--secondary); }
.badge.status-Completed { background: #DCFCE7; color: var(--success); }
.badge.unverified { background: #FEF3C7; color: var(--warning); margin-left: 6px; }

/* Unverified links: visibly distinct from confirmed, working links. */
a.link-unverified { color: var(--muted); text-decoration: none;
  border-bottom: 1px dashed var(--warning); }
a.link-unverified:hover { color: var(--warning); }

/* Flash */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash.danger { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.flash.success { background: #F0FDF4; color: var(--success); border: 1px solid #BBF7D0; }

/* Auth */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.hero { display: flex; flex-direction: column; gap: 16px; }
.detail-row { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border); }
.detail-row .k { width: 260px; color: var(--muted); font-weight: 500; }
.detail-row .v { flex: 1; }
ul.people { list-style: none; padding: 0; margin: 0; }
ul.people li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.query-preview { background: #0F172A; color: #E2E8F0; padding: 12px 14px; border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.note { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; padding: 10px 14px;
  border-radius: 8px; font-size: 13px; }
