:root {
  --green: #63b17f; --green-dark: #4f9a6a; --ink: #212529; --muted: #6c757d;
  --side: #2b3035; --side-hover: #383e44; --line: #dee2e6; --bg: #eef0f3;
  --yellow: #f0c230; --blue: #7ec3e0; --red: #e0626a;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-size: 15px; }

/* top bar */
.topbar { height: 56px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  padding: 0 1rem; gap: 1rem; position: fixed; inset: 0 0 auto 0; z-index: 1030; }
.brand { color: var(--green); font-weight: 800; font-size: 1.6rem; letter-spacing: .5px; text-decoration: none; }
.topbar .burger { background: none; border: 0; font-size: 1.6rem; color: var(--muted); line-height: 1; }
.topbar .toplink { color: var(--muted); text-decoration: none; padding: 0 .5rem; }
.topbar .toplink:hover { color: var(--ink); }
.topbar .me { margin-left: auto; color: var(--muted); display: flex; gap: .75rem; align-items: center; }

/* sidebar */
.side { position: fixed; top: 56px; bottom: 0; left: 0; width: 230px; background: var(--side); overflow-y: auto; transition: margin .15s; }
.side a { display: flex; align-items: center; gap: .75rem; color: #d5d9dd; text-decoration: none; padding: .85rem 1.25rem; }
.side a:hover, .side a.active { background: var(--side-hover); color: #fff; }
.side i { width: 1.2rem; text-align: center; color: #8fa5ba; }
.content { margin: 56px 0 0 230px; padding: 1rem; transition: margin .15s; }
body.collapsed .side { margin-left: -230px; }
body.collapsed .content { margin-left: 0; }
@media (max-width: 768px) { .side { margin-left: -230px; } .content { margin-left: 0; } body.collapsed .side { margin-left: 0; } }

/* panel */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.panel-head { background: #eaeef2; padding: .85rem 1.25rem; font-size: 1.25rem; border-bottom: 1px solid var(--line); }
.panel-head .crumb { font-size: .9rem; color: var(--muted); }
.panel-body { padding: 1.25rem; }

/* summary table */
.summary { border: 1px solid var(--line); border-collapse: collapse; margin-bottom: 1rem; max-width: 100%; }
.summary th, .summary td { border: 1px solid var(--line); padding: .45rem .75rem; min-width: 110px; }
.summary th { font-weight: 700; }
.summary td { font-weight: 700; color: #2d6a1f; }

/* generic coloured numbers */
.pos { color: #1b7a34; } .neg { color: #c0392b; } .zero { color: var(--muted); }

/* data table */
.band { background: var(--green); border: 1px solid var(--green-dark); padding: .6rem .8rem; display: flex; gap: .5rem; align-items: center; }
table.grid { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
table.grid th { border: 1px solid var(--line); padding: .75rem; text-align: left; font-weight: 700; white-space: nowrap; }
table.grid td { border: 1px solid var(--line); padding: .55rem .75rem; vertical-align: middle; }
table.grid tbody tr:nth-child(odd) { background: #f8f9fa; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid tr.selfrow { background: #fff8e1 !important; font-style: italic; }
table.grid tfoot td { font-weight: 700; background: #eaeef2; }
.uname { font-weight: 600; text-decoration: none; }
a.uname.master { color: var(--green); }
a.uname.master:hover { color: var(--green-dark); text-decoration: underline; }
.uname.off { color: var(--muted); text-decoration: line-through; }
.tag { font-size: .72rem; padding: .1rem .45rem; border-radius: 10px; background: #e4e7ea; color: #444; }
.tag.master { background: #d8efe0; color: #2d6a45; }
.sub { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; }

/* little square buttons like the reference panel */
.ob { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 .55rem;
  border: 1px solid transparent; border-radius: 4px; font-weight: 700; font-size: .85rem; color: #fff; text-decoration: none; cursor: pointer; line-height: 1; }
.ob:hover { filter: brightness(.93); color: #fff; }
.ob.c { background: var(--yellow); color: #222; } .ob.c:hover { color: #222; }
.ob.e { background: var(--green); } .ob.l { background: var(--blue); }
.ob.s { background: var(--red); }
.ob.d { background: #fff; color: var(--red); border-color: var(--red); } .ob.d:hover { color: var(--red); background: #fdeeee; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; max-width: 220px; }
.legend { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.btn-green { background: var(--green); border-color: var(--green-dark); color: #fff; font-weight: 600; }
.btn-green:hover { background: var(--green-dark); color: #fff; }
.btn-yellow { background: var(--yellow); border-color: #d9ac1c; color: #222; font-weight: 600; }
.search { max-width: 260px; margin-left: auto; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--side); padding: 1rem; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 6px; padding: 2rem; }
