/* The admin panel's new pages (home, lessons). Plain and dense: a tool. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #0d1117; background: #f7f9fc; }
a { color: #2563eb; text-decoration: none; } a:hover { text-decoration: underline; }
header.bar { display: flex; align-items: center; gap: 1.2rem; padding: 0.7rem 1.2rem; background: #0d1117; color: #fff; }
header.bar a { color: #c9d1d9; } header.bar .brand { font-weight: 700; color: #fff; margin-right: auto; }
header.bar button { font: inherit; background: none; border: 1px solid #57606a; color: #c9d1d9; border-radius: 6px; padding: 0.3rem 0.7rem; cursor: pointer; }
main { max-width: 1400px; margin: 0 auto; padding: 1.2rem; }
h1 { font-size: 1.4rem; margin: 0 0 1rem; } h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { display: block; background: #fff; border: 1px solid #e3e8ee; border-radius: 10px; padding: 1rem 1.1rem; color: inherit; }
a.card:hover { text-decoration: none; border-color: #2563eb; }
.card p { margin: 0.3rem 0 0; color: #57606a; font-size: 0.92rem; }
.muted { color: #57606a; } .small { font-size: 0.88rem; }
.cols { display: grid; gap: 1rem; grid-template-columns: 320px minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
.pane { background: #fff; border: 1px solid #e3e8ee; border-radius: 10px; padding: 1rem; }
label { display: block; font-weight: 600; font-size: 0.88rem; margin: 0.7rem 0 0.25rem; }
select, input[type=text], input[type=number], textarea { width: 100%; font: inherit; padding: 0.45rem 0.6rem; border: 1px solid #d0d7de; border-radius: 6px; background: #fff; color: inherit; }
textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9rem; line-height: 1.5; min-height: 55vh; resize: vertical; tab-size: 2; }
select:focus, input:focus, textarea:focus { outline: 3px solid rgba(37, 99, 235, 0.28); border-color: #2563eb; }
.row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-top: 0.8rem; }
.row > .grow { flex: 1; min-width: 8rem; }
button.btn { font: inherit; font-weight: 600; padding: 0.45rem 0.9rem; border-radius: 6px; border: 1px solid #d0d7de; background: #fff; color: #0d1117; cursor: pointer; }
button.btn:hover { background: #f0f3f7; } button.btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
button.btn.danger { color: #b3261e; border-color: #e7b4b0; } button.btn[disabled] { opacity: 0.55; cursor: default; }
ul.lessons { list-style: none; margin: 0.6rem 0 0; padding: 0; }
ul.lessons li button { display: flex; width: 100%; justify-content: space-between; gap: 0.6rem; text-align: left; font: inherit; padding: 0.5rem 0.6rem;
  border: 1px solid #e3e8ee; border-radius: 6px; background: #fff; cursor: pointer; margin-bottom: 0.35rem; }
ul.lessons li button[aria-current=true] { border-color: #2563eb; background: #eff6ff; }
.badge { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.1rem 0.45rem; border-radius: 999px; background: #f0fdf4; color: #15803d; white-space: nowrap; }
.badge.draft { background: #fffbeb; color: #b45309; }
.note { margin-top: 0.8rem; padding: 0.6rem 0.8rem; border-radius: 6px; border-left: 4px solid #2563eb; background: #eff6ff; }
.note.good { border-left-color: #15803d; background: #f0fdf4; } .note.bad { border-left-color: #b3261e; background: #fef2f2; }
.note ul { margin: 0.3rem 0 0 1.1rem; padding: 0; }
.preview { font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; min-height: 10rem; }
.preview .apc-table { border-collapse: collapse; margin: 1rem 0; display: block; overflow-x: auto; }
.preview .apc-table th, .preview .apc-table td { border: 1px solid #d0d7de; padding: 0.4rem 0.7rem; text-align: left; }
.preview .apc-callout { border-left: 4px solid #2563eb; background: #f7f9fc; padding: 0.7rem 1rem; margin: 1rem 0; border-radius: 0 8px 8px 0; }
.preview .apc-callout-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: #1d4ed8; margin-bottom: 0.3rem; }
.preview .apc-question { border: 1px solid #e3e8ee; border-radius: 8px; padding: 0.9rem 1rem; margin: 1rem 0; }
.preview svg, .preview canvas { max-width: 100%; height: auto; }
.preview .asc-graph canvas { max-height: 480px; width: auto; }

/* lists that can be changed (Admin.grid) */
.scroll { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 0.6rem; }
table.grid th, table.grid td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid #e3e8ee; vertical-align: top; max-width: 28rem; overflow-wrap: anywhere; }
table.grid th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: #57606a; white-space: nowrap; }
table.grid tr.pick { cursor: pointer; } table.grid tr.pick:hover { background: #f7f9fc; }
table.grid tr[aria-selected=true] { background: #eff6ff; }
table.grid td.acts { white-space: nowrap; text-align: right; } table.grid td.acts .btn { padding: 0.2rem 0.6rem; font-size: 0.85rem; margin-left: 0.3rem; }
.fields { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.fields input[type=checkbox] { width: auto; }
.stack-panes > .pane + .pane { margin-top: 1rem; }
.two { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); align-items: start; }
