:root {
  --bt-charcoal: #2d3436;
  --bt-mint: #7fc9b8;
  --bt-orange: #f5a623;
  --bt-blue: #6fa8dc;
  --bg: #f6f7f9;
  --card: #fff;
  --border: #e1e4e8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--bt-charcoal);
}
.login { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.card {
  background: var(--card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  width: min(400px, 92vw);
  border-top: 4px solid var(--bt-mint);
}
.card h1 { margin-top: 0; font-size: 1.35rem; }
.muted { color: #666; font-size: .9rem; }
.small { font-size: .85rem; }
.error { color: #c0392b; }
label { display: block; margin: .75rem 0 .25rem; font-weight: 600; }
input, select, button, textarea {
  width: 100%; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem;
}
button {
  background: linear-gradient(90deg, var(--bt-mint), var(--bt-blue));
  color: #fff; border: none; font-weight: 600; cursor: pointer; margin-top: 1rem;
}
button.secondary { background: #eee; color: #333; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; background: var(--card); border-bottom: 3px solid var(--bt-orange);
  flex-wrap: wrap; gap: .5rem;
}
.topbar nav a { margin-left: .75rem; color: var(--bt-charcoal); text-decoration: none; }
.topbar nav a:hover { text-decoration: underline; }
.container { padding: 1rem; max-width: 1100px; margin: 0 auto; }
.kpis { display: flex; gap: 1rem; flex-wrap: wrap; }
.kpi {
  background: var(--card); padding: 1rem 1.25rem; border-radius: 10px;
  border-left: 4px solid var(--bt-blue); min-width: 180px;
}
.kpi .num { font-size: 2rem; font-weight: 700; display: block; }
.kpi .lbl { color: #666; font-size: .85rem; }
table.data { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 8px; overflow: hidden; }
table.data th, table.data td { padding: .6rem .75rem; border-bottom: 1px solid var(--border); text-align: left; }
table.data th { background: #fafafa; font-size: .85rem; }
table.data.compact input { width: 100%; margin: 0; padding: .4rem; }
table.data.compact td.center { text-align: center; }
.topbar nav a.active { font-weight: 700; text-decoration: underline; }
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem;
  background: var(--card); padding: .75rem; border-radius: 8px; border: 1px solid var(--border);
}
.toolbar input[type="search"], .toolbar select { width: auto; min-width: 140px; flex: 1 1 160px; margin: 0; }
.toolbar button { width: auto; margin: 0; padding: .55rem 1rem; }
a.btn, .toolbar a.btn {
  display: inline-block; padding: .55rem 1rem; border-radius: 8px; text-decoration: none;
  background: linear-gradient(90deg, var(--bt-mint), var(--bt-blue)); color: #fff; font-weight: 600;
}
a.btn.secondary, .toolbar a.btn.secondary { background: #eee; color: #333; }
.container.narrow { max-width: 640px; }
.form-card label { margin-top: .5rem; }
.form-card button { margin-top: 1.25rem; }
label.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
label.checkbox input { width: auto; margin: 0; }
.success { color: #1e7e34; font-weight: 600; }
.inline-form { display: inline; }
.inline-form button.btn-small, button.btn-small {
  width: auto; margin: 0; padding: .35rem .65rem; font-size: .85rem;
}
.actions-cell { white-space: nowrap; }
.actions-cell .btn-small-link {
  display: inline-block; margin-right: .5rem; font-size: .85rem; font-weight: 600;
  color: var(--bt-charcoal);
}
button.secondary {
  background: #eee; color: #333; width: auto; margin: .5rem 0 0;
}
.danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
button.btn-danger, .btn-danger {
  background: #c0392b; color: #fff; width: auto; margin: 0;
}
button.btn-danger:hover { filter: brightness(1.05); }
.links-card ul { margin: .5rem 0 0 1.1rem; }
.links-card li { margin: .35rem 0; }
