/* GainLume dashboard — Graphite + Fresh Green
   #212830 graphite · #00854A primary green · #45B649 highlight ·
   #B5B0AC neutral gray · #D9D9D6 light surface · #91B3A6 verified ·
   #C43D30 alert · #F4E1A1 caution · white canvas */
:root {
  --graphite: #212830;
  --green: #00854A;
  --green-hi: #45B649;
  --gray: #B5B0AC;
  --surface: #D9D9D6;
  --verified: #91B3A6;
  --alert: #C43D30;
  --caution: #F4E1A1;
  --ink: #23272e;
  --muted: #78716c;
  --sidebar-w: 218px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #fafaf9;
  color: var(--ink);
  font-size: 14px;
}
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-hi); }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--graphite); color: #e7e5e4;
  display: flex; flex-direction: column; padding: 18px 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-size: 19px; font-weight: 600; letter-spacing: .3px;
  padding: 4px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 14px;
}
.brand:hover { color: #fff; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a {
  color: #c9c6c2; padding: 9px 12px; border-radius: 8px; font-weight: 500;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: var(--green); color: #fff; }
.sidebar-foot {
  display: flex; gap: 10px; align-items: center;
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px;
}
.user-dot {
  width: 32px; height: 32px; border-radius: 50%; background: var(--green);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.user-name { font-size: 13px; color: #fff; }
.user-out { font-size: 12px; color: var(--gray); }

/* ---------- layout ---------- */
.content { margin-left: var(--sidebar-w); padding: 26px 32px 60px; }
.topbar {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 22px;
}
.topbar h1 { font-size: 22px; font-weight: 650; color: var(--graphite); }
.topbar-meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }

.panel {
  background: #fff; border: 1px solid #e7e5e4; border-radius: 12px;
  padding: 18px 20px; box-shadow: 0 1px 2px rgba(33,40,48,.04);
}
.panel h2 { font-size: 14px; font-weight: 600; color: var(--graphite); margin-bottom: 12px; }
.panel-link { font-size: 12px; font-weight: 500; float: right; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: #fff; border: 1px solid #e7e5e4; border-radius: 12px;
  padding: 16px 18px; box-shadow: 0 1px 2px rgba(33,40,48,.04);
}
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 30px; font-weight: 700; color: var(--graphite); margin: 4px 0 2px; }
.stat-value.green { color: var(--green); }
.stat-value.amber { color: #b0821c; }
.stat-sub { font-size: 12px; color: var(--muted); }

/* ---------- tables ---------- */
table.plain { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.plain th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 6px 8px; border-bottom: 1px solid #e7e5e4;
}
table.plain td { padding: 8px; border-bottom: 1px solid #f0efed; vertical-align: top; }
table.plain tr:last-child td { border-bottom: none; }
table.plain.kv td:first-child { color: var(--muted); width: 34%; }

table.display { width: 100% !important; font-size: 13.5px; }
table.dataTable tbody td { padding: 9px 10px; }
table.dataTable thead th { color: var(--muted); font-size: 12px; }

/* ---------- badges & chips ---------- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}
.badge-green { background: #e6f2ec; color: var(--green); border: 1px solid #cfe4d9; }
.badge-yellow { background: #fbf3d9; color: #8a6a14; border: 1px solid #f0e2b0; }
.badge-red { background: #f9e5e2; color: var(--alert); border: 1px solid #f0cdc8; }
.badge-gray { background: #f0efed; color: #57534e; border: 1px solid #e2e0dd; }
.chip {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: #f0efed; color: #57534e; font-size: 11.5px; font-weight: 500;
}
.chip-active { background: var(--green); color: #fff; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.notes { font-size: 13px; line-height: 1.55; color: #44403c; white-space: pre-wrap; }

/* category bar */
.bar { background: #f0efed; border-radius: 5px; height: 10px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-hi)); border-radius: 5px; }

/* news list */
.news-list { list-style: none; }
.news-list li { padding: 7px 0; border-bottom: 1px solid #f0efed; line-height: 1.45; }
.news-list li:last-child { border-bottom: none; }

/* ---------- buttons & forms ---------- */
.btn-small {
  padding: 5px 13px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #006e3d; }
.btn-ghost { background: #fff; color: #57534e; border-color: #d6d3d1; }
.btn-ghost:hover { border-color: var(--alert); color: var(--alert); }
.actions { display: flex; gap: 6px; }
.actions form { display: inline; }
.filter-row { display: flex; gap: 10px; margin-bottom: 14px; }
.filter-row select {
  padding: 7px 12px; border: 1px solid #d6d3d1; border-radius: 8px;
  background: #fff; font-size: 13px; color: var(--ink);
}

/* ---------- login ---------- */
.login-body {
  background: var(--graphite); min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff; border-radius: 14px; padding: 38px 40px; width: 360px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.login-brand {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  font-size: 24px; font-weight: 650; color: var(--graphite); margin-bottom: 26px;
}
.login-card label { display: block; font-size: 12.5px; font-weight: 600; color: #57534e; margin-bottom: 14px; }
.login-card input {
  width: 100%; margin-top: 5px; padding: 9px 12px; font-size: 14px;
  border: 1px solid #d6d3d1; border-radius: 8px;
}
.login-card input:focus { outline: 2px solid var(--green-hi); border-color: var(--green); }
.login-card button {
  width: 100%; padding: 10px; margin-top: 6px; background: var(--green);
  color: #fff; font-size: 14px; font-weight: 600; border: none;
  border-radius: 8px; cursor: pointer;
}
.login-card button:hover { background: #006e3d; }
.login-error {
  background: #f9e5e2; color: var(--alert); border: 1px solid #f0cdc8;
  border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 16px;
}
