
:root {
  color-scheme:light;
  --bg:#f5f6f8;
  --ink:#212a39;
  --muted:#85909e;
  --line:#e9edf1;
  --green:#16876e;
  --red:#c34d4d
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:14px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif
}
button,input,select,textarea {
  font:inherit;
  color:var(--ink);
  -webkit-text-fill-color:currentColor
}
button {
  color:var(--ink)
}
input,select {
  color-scheme:light
}
input::placeholder {
  color:#85909e;
  opacity:1
}
button {
  cursor:pointer
}
aside {
  width:220px;
  position:fixed;
  inset:0 auto 0 0;
  background:#fff;
  border-right:1px solid var(--line);
  padding:32px 20px;
  display:flex;
  flex-direction:column
}
.brand {
  font-weight:850;
  font-size:21px;
  letter-spacing:-.8px
}
.brand i {
  display:inline-block;
  width:25px;
  height:25px;
  background:#1c8c73;
  border-radius:8px;
  margin-right:8px;
  vertical-align:middle
}
.small {
  font-size:12px;
  color:var(--muted);
  line-height:1.6
}
.brand+.small {
  margin:8px 0 38px 34px
}
nav button {
  width:100%;
  border:0;
  background:none;
  text-align:left;
  padding:13px 14px;
  margin:3px 0;
  border-radius:8px;
  color:#738090
}
nav button.active {
  background:#e9f5f1;
  color:var(--green);
  font-weight:650
}
.sidefoot {
  margin-top:auto;
  padding:20px 10px;
  border-top:1px solid var(--line)
}
main {
  margin-left:220px;
  padding:28px 38px;
  max-width:1600px
}
.top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:32px
}
.crumb {
  color:var(--muted);
  font-size:12px
}

.demo {
  background:#fff3db;
  color:#916722;
  padding:7px 10px;
  border-radius:6px;
  font-size:11px
}
.heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:24px
}
h1 {
  font-size:30px;
  letter-spacing:-.8px;
  margin:0 0 9px
}
h2 {
  font-size:17px;
  margin:0
}
p {
  line-height:1.6
}
.sub {
  margin:0;
  color:#768393
}
select,input {
  color:var(--ink);
  -webkit-text-fill-color:var(--ink);
  border:1px solid #dfe5ea;
  background:white;
  padding:10px 13px;
  border-radius:7px;
  color:var(--ink)
}
.button {
  color:var(--ink);
  -webkit-text-fill-color:currentColor;
  border:1px solid #dfe5ea;
  background:#fff;
  border-radius:7px;
  padding:10px 15px
}
.button.primary {
  background:var(--green);
  border-color:var(--green);
  color:#fff;
  -webkit-text-fill-color:#fff
}
.stats {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:15px;
  margin:22px 0
}
.stat {
  padding:21px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px
}
.stat label {
  font-size:12px;
  color:#788493
}
.stat strong {
  display:block;
  font-size:29px;
  margin:13px 0 7px;
  letter-spacing:-.8px
}

.badge {
  display:inline-flex;
  border-radius:5px;
  padding:5px 8px;
  font-size:10px;
  font-weight:650;
  white-space:nowrap
}
.badge.red {
  background:#fcecec;
  color:#b34f4f
}
.badge.orange {
  background:#fff1d9;
  color:#b08136
}
.badge.green {
  background:#e8f5ef;
  color:#25816a
}
.panel {
  background:white;
  border:1px solid var(--line);
  border-radius:11px;
  overflow:hidden;
  margin-bottom:24px
}
.panelhead {
  padding:21px 23px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px
}
.filters {
  display:flex;
  gap:9px;
  flex-wrap:wrap
}
.filters input {
  max-width:190px
}
.tablewrap {
  overflow:auto
}
table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  white-space:nowrap
}
th {
  font-size:10px;
  font-weight:600;
  color:#88929d;
  letter-spacing:.4px;
  text-transform:uppercase;
  background:#fafbfc;
  padding:14px 18px
}
td {
  padding:18px;
  border-top:1px solid var(--line);
  font-size:12px
}
tbody tr[data-client] {
  cursor:pointer
}
tbody tr[data-client]:hover {
  background:#f7fbfa
}
.clientcell {
  display:flex;
  gap:11px;
  align-items:center
}
.logo {
  height:34px;
  width:34px;
  border-radius:9px;
  background:#edf1f4;
  display:grid;
  place-items:center;
  font-size:11px;
  font-weight:750
}
.clientcell b {
  display:block;
  font-size:13px
}
.clientcell small {
  color:#94a0ac;
  display:block;
  margin-top:4px;
  font-size:10px
}
.cpl {
  font-weight:650
}
.bad {
  color:var(--red)
}
.good {
  color:var(--green)
}
.bar {
  height:4px;
  background:#edf0f3;
  border-radius:5px;
  width:92px;
  margin-top:6px;
  overflow:hidden
}
.bar i {
  display:block;
  height:100%;
  background:#419f88
}
.task {
  padding:18px 23px;
  border-bottom:1px solid var(--line);
  display:flex;
  gap:12px;
  align-items:flex-start
}
.task:last-child {
  border:0
}
.task input {
  margin-top:3px;
  accent-color:var(--green)
}
.task b {
  font-size:12px;
  display:block;
  line-height:1.5
}
.task small {
  display:block;
  font-size:11px;
  color:#91a0aa;
  margin-top:6px
}
.task.done b {
  text-decoration:line-through;
  color:#91a0aa
}
.footer {
  font-size:11px;
  color:#94a0ad;
  margin:20px 0
}
.empty {
  padding:35px;
  text-align:center;
  color:#8995a2
}
.drawer {
  position:fixed;
  right:0;
  top:0;
  bottom:0;
  width:min(660px,100%);
  background:#fff;
  box-shadow:-12px 0 70px #18283d25;
  z-index:5;
  padding:30px;
  overflow:auto
}
.overlay {
  position:fixed;
  inset:0;
  background:#1c293643;
  z-index:4
}
dialog {
  border:0;
  border-radius:12px;
  max-width:470px;
  width:90%;
  padding:27px;
  color:var(--ink)
}
dialog::backdrop {
  background:#17263750
}
.field {
  margin:18px 0
}
.field label {
  display:block;
  font-size:12px;
  margin-bottom:7px
}
.field input,.field select {
  width:100%
}
.funnel {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin:20px 0
}
.funnel div {
  padding:17px 9px;
  background:#f4f8f6;
  border-radius:7px;
  text-align:center
}
.funnel strong {
  display:block;
  font-size:23px;
  margin-bottom:8px
}
.funnel small {
  font-size:10px;
  color:#84948e
}

.drawer .stat {
  padding:15px
}
.drawer .stat strong {
  font-size:23px
}
.spark {
  height:115px;
  display:flex;
  align-items:end;
  gap:7px;
  padding:10px 5px;
  border-bottom:1px solid var(--line)
}
.spark div {
  flex:1;
  background:#a3cdbd;
  border-radius:4px 4px 0 0;
  min-height:8px
}
.row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px
}
.drawer h2 {
  margin:25px 0 10px
}
.note {
  padding:13px;
  background:#f7f8fa;
  border-radius:7px;
  font-size:12px;
  color:#7c8997
}
.mobilebrand {
  display:none
}
@media(max-width:1100px) {
  aside {
  width:180px
}
main {
  margin-left:180px;
  padding:25px
}
.panelhead {
  flex-wrap:wrap
}

}
@media(max-width:750px) {
  aside {
  display:none
}
main {
  margin:0;
  padding:20px 15px
}
.mobilebrand {
  display:block;
  font-weight:800
}
.crumb {
  display:none
}
.heading {
  align-items:flex-start;
  flex-direction:column
}
h1 {
  font-size:26px
}
.stats {
  grid-template-columns:1fr 1fr
}
.stat {
  padding:17px
}
.panelhead {
  padding:17px
}
.filters input {
  max-width:100%
}
.topright 
.drawer {
  padding:20px
}

.funnel {
  grid-template-columns:1fr 1fr
}

}

.periodbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:16px 20px;
  margin-bottom:18px
}
.periodbar b {
  font-size:12px
}
.datefield {
  display:flex;
  align-items:center;
  gap:7px;
  color:#84909d;
  font-size:12px
}
.datefield input {
  padding:8px;
  max-width:155px
}
.periodbar #dateError:empty {
  display:none
}
.periodbar #dateError {
  width:100%
}

.periodbar .button {
  color:#212a39;
  -webkit-text-fill-color:#212a39;
  background:#fff
}
.periodbar .button.primary {
  color:#fff;
  -webkit-text-fill-color:#fff;
  background:#16876e
}
.filters select option {
  color:#212a39;
  background:#fff
}
.datefield input::-webkit-datetime-edit {
  color:#212a39;
  -webkit-text-fill-color:#212a39
}

textarea {
  font:inherit;
  color:#212a39;
  -webkit-text-fill-color:#212a39;
  background:#fff;
  border:1px solid #dfe5ea;
  border-radius:7px;
  padding:12px;
  width:100%;
  resize:vertical;
  line-height:1.6
}
textarea::placeholder {
  color:#85909e;
  -webkit-text-fill-color:#85909e
}
.journalform {
  padding:18px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fafbfc;
  margin:15px 0
}
.journalform .field {
  margin:12px 0
}
.journalfields {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.journalentry {
  padding:18px 0;
  border-bottom:1px solid var(--line)
}
.journalentry p {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  margin:12px 0;
  font-size:13px
}
.journalentry .lesson {
  background:#edf6f2;
  border-radius:7px;
  padding:12px;
  color:#376655;
  font-size:12px;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.journalfilters {
  display:flex;
  gap:8px;
  margin:16px 0
}
.journalfilters input {
  min-width:0;
  flex:1
}
.journaltime {
  font-size:11px;
  color:#8c99a4;
  margin-top:8px
}
.journalauthor {
  font-size:12px;
  font-weight:650
}

.journalnotice {
  font-size:11px;
  color:#85909e
}
@media(max-width:500px) {
  .journalfields {
  grid-template-columns:1fr
}
.journalfilters {
  flex-wrap:wrap
}

}

.backup-actions { display:flex; gap:10px; flex-wrap:wrap; margin:18px 0; }
.note.good { color:#16876e; }
.notice { margin:16px 0; padding:12px; border-radius:8px; background:#fff3db; color:#916722; line-height:1.6; }
:focus-visible { outline:2px solid #16876e; outline-offset:3px; }
.mobilenav { display:none; }
@media(max-width:750px) { .mobilenav { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; } }
.sidefoot > b { display:block; margin-top:8px; }

.journalform .button.primary { color:#fff; -webkit-text-fill-color:#fff; }
