:root {
  --accent: #ED3237;
  --bg: #f7f7f8;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e3e3e5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.nav .brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.container.narrow {
  max-width: 380px;
  margin-top: 4rem;
}

h1 { margin: 0 0 0.25rem; }
h2 { margin-top: 2rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
}

.card h2 { margin-top: 0; font-size: 1.1rem; }
.card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0; }

form.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input[type="text"], input[type="password"] {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}

button:hover { opacity: 0.9; }

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  background: var(--card);
}

.table th, .table td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

.table th { color: var(--muted); font-weight: 600; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: #888;
}

.badge-pause { background: #b23b3b; }
.badge-increase_budget { background: #2e8b57; }
.badge-reduce_budget { background: #c07a1e; }

.flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.flash.success { background: #e6f4ea; color: #1e6b3a; }
.flash.error { background: #fdecea; color: #a12622; }
.error { color: #a12622; font-size: 0.9rem; }
