*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --radius: 10px;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 1.5rem 1rem 4rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 { font-size: 1.75rem; font-weight: 700; }
header p  { color: var(--muted); margin-top: .35rem; font-size: .95rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
}

.card-header .icon { font-size: 1.4rem; }
.card-header h2   { font-size: 1rem; font-weight: 600; }

.badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 99px;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge.chromium { background: #1e3a5f; color: #60a5fa; }
.badge.all      { background: #14432a; color: #4ade80; }
.badge.partial  { background: #3d2a00; color: #fbbf24; }

.card p.desc {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.55;
}

button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1rem;
  border: none;
  border-radius: 7px;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
button:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: #475569; }
.btn-danger    { background: var(--danger); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; }

.log {
  margin-top: 1rem;
  background: #0d1526;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: .75rem 1rem;
  font-size: .8rem;
  font-family: monospace;
  max-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.log .entry { color: var(--muted); }
.log .entry.ok   { color: var(--success); }
.log .entry.warn { color: var(--warning); }
.log .entry.err  { color: var(--danger); }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: .35rem;
}
.dot-green  { background: var(--success); }
.dot-yellow { background: var(--warning); }
.dot-red    { background: var(--danger); }

input[type="text"], textarea {
  width: 100%;
  background: #0d1526;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: .875rem;
  padding: .55rem .75rem;
  margin-bottom: .6rem;
  outline: none;
  transition: border-color .15s;
}
input[type="text"]:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 70px; }

.sw-status {
  display: flex;
  align-items: center;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  justify-content: center;
  gap: .4rem;
}
