/* Admin page: the site's tokens, a denser layout. */
.adm { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; display: grid; gap: 18px; }
.adm-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); }
.adm-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.adm-head h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.adm-head .btn { margin-left: auto; }
#adm-body { display: grid; gap: 18px; }

.adm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.adm-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.adm-tile .label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.adm-tile .value { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.adm-tile .sub { font-size: 12px; color: var(--muted); }

.adm-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.adm-card h2 { margin: 0 0 12px; font-size: 16px; }
.adm-card .adm-sub { margin-top: 20px; }
.adm-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }

.adm-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.adm-chart { margin: 0; }
.adm-chart figcaption { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.adm-chart figcaption b { color: var(--text); font-variant-numeric: tabular-nums; }
.adm-chart svg { width: 100%; height: 120px; display: block; overflow: visible; }
.adm-chart path { fill: var(--brand); }
.adm-chart .hit { fill: transparent; }
.adm-chart .adm-bar:hover path { fill: var(--brand-strong); opacity: 0.8; }
.adm-chart .grid { stroke: var(--line); stroke-dasharray: 2 3; }
.adm-chart .baseline { stroke: var(--muted); stroke-width: 1; opacity: 0.6; }
.adm-chart .axis { fill: var(--muted); font-size: 9px; }
.adm-chart .axis.end { text-anchor: end; }
.adm-tip { position: absolute; z-index: 50; pointer-events: none; background: var(--text); color: var(--panel); font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }

.adm-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; margin-bottom: 14px; }
.adm-form .wide { grid-column: 1 / -1; }
.adm-form .field span em { font-style: normal; color: var(--muted); font-weight: 400; }
.adm-form input[type="number"], .adm-form input[type="date"] { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.adm-form .row { display: flex; gap: 10px; align-items: center; }
#grant-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table .adm-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-table tr.dim td { opacity: 0.6; }
.adm-table code { font-weight: 700; }
.adm-idea { max-width: 360px; }
.adm-status { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); text-transform: capitalize; }
.adm-status.done { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.adm-status.failed { color: var(--bad); }
.adm-status.off { color: var(--muted); }

.adm-share { display: grid; grid-template-columns: 130px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.adm-share-bar { height: 10px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.adm-share-bar div { height: 100%; background: var(--brand); border-radius: 99px; }
.adm-share b { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .adm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid, .adm-charts { grid-template-columns: 1fr; }
  .adm-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
