:root { color-scheme: light; --bg:#f5f7fb; --panel:#fff; --text:#17212f; --muted:#65758b; --line:#dbe3ee; --accent:#2563eb; --bad:#b42318; --ok:#087443; --warn:#a15c07; }
* { box-sizing: border-box; }
body { margin:0; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background:var(--bg); color:var(--text); }
button, input, select { font: inherit; }
button { border:0; border-radius:8px; background:var(--accent); color:#fff; padding:10px 14px; cursor:pointer; white-space:nowrap; }
button.secondary { background:#eef3fb; color:var(--text); border:1px solid var(--line); }
button.danger { background:#fff1f1; color:var(--bad); border:1px solid #fecaca; }
button:disabled { opacity:.55; cursor:not-allowed; }
.hidden { display:none !important; }
.auth { min-height:100vh; display:grid; place-items:center; padding:24px; }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:18px; box-shadow:0 8px 24px rgba(19,35,61,.06); }
.auth-panel { width:min(380px, 100%); display:grid; gap:12px; }
.auth-panel h1 { margin:0; }
input, select { width:100%; border:1px solid var(--line); border-radius:8px; padding:10px 12px; background:#fff; }
.app { display:grid; grid-template-columns:220px 1fr; min-height:100vh; }
.sidebar { background:#111827; color:#e5e7eb; padding:16px 12px; display:flex; flex-direction:column; gap:6px; }
.brand { font-weight:800; font-size:18px; padding:8px 10px 16px; }
.nav { background:transparent; color:#d1d5db; text-align:left; padding:10px 12px; }
.nav.active, .nav:hover { background:#243244; color:#fff; }
.content { padding:20px; min-width:0; }
.topbar { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:14px; }
.topbar h1 { margin:0; font-size:28px; }
.topbar p { margin:4px 0 0; color:var(--muted); }
.notice { margin-bottom:14px; border-radius:8px; padding:12px 14px; background:#eff6ff; border:1px solid #bfdbfe; }
.notice.error { background:#fff1f1; border-color:#fecaca; color:var(--bad); }
.grid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:14px; min-width:0; }
.card.compact { padding:12px; }
.card.mini { padding:10px; }
.card h3 { margin:0 0 8px; font-size:15px; color:var(--muted); }
.metric { font-size:28px; font-weight:800; }
.mini .metric, .compact .metric { font-size:22px; }
.meta { color:var(--muted); font-size:13px; margin-top:6px; }
.hero-actions { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.actions { display:flex; gap:8px; flex-wrap:wrap; margin:12px 0; }
.steps { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; color:var(--muted); font-size:13px; }
.steps span { background:#f8fafc; border:1px solid var(--line); border-radius:999px; padding:5px 8px; }
.tabs { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.tab { background:#eef3fb; color:var(--text); border:1px solid var(--line); }
.tab.active { background:var(--accent); color:#fff; }
.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:10px; background:#fff; }
table { width:100%; border-collapse:collapse; min-width:760px; }
th, td { padding:10px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { background:#f8fafc; font-size:13px; color:var(--muted); position:sticky; top:0; }
.status { display:inline-flex; border-radius:999px; padding:4px 8px; font-size:12px; font-weight:700; background:#eef3fb; }
.status.ok { background:#dcfce7; color:var(--ok); }
.status.bad { background:#fee2e2; color:var(--bad); }
.status.warn { background:#fef3c7; color:var(--warn); }
.toolbar { display:grid; grid-template-columns:1fr auto; gap:10px; margin-bottom:12px; align-items:center; }
.error { color:var(--bad); font-size:14px; }
.empty { padding:20px; color:var(--muted); text-align:center; }
.split { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.connections-grid { grid-template-columns:repeat(3, minmax(260px,1fr)); }
.connection-card { display:grid; gap:10px; }
.connection-card label { display:grid; gap:5px; color:var(--muted); font-size:13px; }
.connection-status { margin:2px 0; }
.connection-checks { margin:0; padding-left:18px; color:var(--muted); font-size:12px; display:grid; gap:4px; }
.mini-grid { grid-template-columns:repeat(5, minmax(120px,1fr)); }
.file-row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.clip { max-width:360px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.reason { max-width:260px; color:var(--muted); }
pre { margin:0; white-space:pre-wrap; word-break:break-word; font-size:12px; color:#334155; }
@media (max-width: 900px) {
  .app { grid-template-columns:1fr; }
  .sidebar { position:sticky; top:0; z-index:2; flex-direction:row; overflow:auto; }
  .brand { display:none; }
  .content { padding:12px; }
  .topbar { align-items:flex-start; flex-direction:column; }
  .grid, .split, .connections-grid, .mini-grid { grid-template-columns:1fr; }
  table { min-width:680px; }
}
