/* Principal / teacher reports (/dashboard) – design handoff "Principal Dashboard". Layout pieces are in portal.css. */
@keyframes gk-grow{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes gk-growx{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.small{font-size:15px}
.strong{font-weight:700}
.measure{max-width:760px}
.align-start{align-self:flex-start}
.small-link{font-weight:700;font-size:15px}
.lone-card{max-width:560px;margin:12vh auto;padding:0 16px}
.panel-stack{display:flex;flex-direction:column;gap:20px}
.card-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.teacher-note{font-weight:700;color:var(--violet);flex-direction:row}

/* date filter in the page head */
.range-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.range-bar select{width:auto;min-width:130px;font-weight:600}
.range{display:flex;background:#fff;border:1.5px solid var(--input);border-radius:12px;padding:3px}
.range button{font-weight:700;font-size:15px;border-radius:9px;padding:4px 12px;min-height:36px;background:transparent;color:var(--ink)}
.range button:hover{background:var(--lav);color:var(--ink)}
.range button[aria-pressed=true]{background:var(--ink);color:#fff}
.range-bar .button-ghost{font-size:15px;padding:6px 12px}
.range-bar .button-ghost .icon{width:17px;height:17px}
.range-bar .filter-error{flex-basis:100%}

/* KPI cards */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:14px}
.kpi{background:#fff;border-radius:20px;padding:18px 20px;display:flex;flex-direction:column;gap:4px;animation:gk-in .5s ease both}
.kpi-head{display:flex;justify-content:space-between;align-items:center;font-size:15px;font-weight:700;color:var(--muted)}
.kpi-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center}
.kpi-icon .icon{width:18px;height:18px}
.t-pink{background:var(--pink-pale);color:var(--pink-dark)}
.t-green{background:var(--ok-pale);color:var(--ok-dark)}
.t-violet{background:var(--chip);color:var(--violet)}
.t-orange{background:var(--warn-pale);color:var(--warn-text)}
.kpi b{font-size:34px;line-height:1.1;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kpi-note{font-size:14px;font-weight:700;color:var(--muted);min-height:20px}
.kpi-note.up{color:var(--ok-dark)}
.kpi-note.down{color:var(--bad)}

/* matches per day */
.day-chart{display:flex;align-items:flex-end;gap:4px;height:180px;border-bottom:1.5px solid var(--line);padding-top:10px}
.day{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}
.day-bar{width:100%;max-width:26px;border-radius:6px 6px 2px 2px;background:var(--violet);transform-origin:bottom;animation:gk-grow .7s cubic-bezier(.2,.7,.2,1) both}
.day-bar.today{background:var(--pink)}
.day:hover .day-bar{background:var(--ink)}
.chart-ends{display:flex;justify-content:space-between;font-size:13px;color:var(--muted)}

/* accuracy bars */
.two-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:20px}
.two-columns.align-start{align-items:start}
.bar-list{display:flex;flex-direction:column;gap:12px}
.bar-row{display:grid;grid-template-columns:110px 1fr 48px;align-items:center;gap:10px;font-size:15px}
.bar-label{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-row b{text-align:right}
.bar-track{height:12px;border-radius:6px;background:var(--lav);overflow:hidden}
.bar-fill,.bar-track>div{height:100%;border-radius:6px;transform-origin:left;animation:gk-growx .8s cubic-bezier(.2,.7,.2,1) both}

/* tables */
.min-520{min-width:520px}
.min-760{min-width:760px}
.missed-count{font-weight:800;color:var(--pink-dark)}
.game-cell{display:inline-flex;align-items:center;gap:6px}
.game-cell .icon{width:16px;height:16px;color:var(--violet)}
.load-more{align-self:center}
.row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.split-panels{display:flex;flex-wrap:wrap;gap:20px;align-items:flex-start}
.split-panels .wide{flex:2 1 520px;min-width:0}
.split-panels .narrow{flex:1 1 300px}
.inline-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}
.inline-form label input{width:160px}
.inline-form .form-error{align-self:center}

/* monthly report */
.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
label.inline{flex-direction:row;align-items:center;gap:8px}
label.inline input{width:auto}
.toolbar .button,.toolbar button{font-size:15px;font-weight:700;padding:6px 14px}
.toolbar .icon{width:17px;height:17px}
.monthly-report{background:#fff;border-radius:24px;overflow:hidden;max-width:860px}
.monthly-report:empty{display:none}
.month-head{background:var(--night);color:#fff;padding:24px 28px;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.month-head>div{display:flex;flex-direction:column}
.month-head span{color:var(--on-dark-2);font-weight:700;font-size:15px}
.month-head h2{font-size:30px}
.month-head img{width:110px;height:36px}
.month-body{padding:24px 28px;display:flex;flex-direction:column;gap:20px}
.month-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.month-card{background:var(--lav);border-radius:16px;padding:14px 16px;display:flex;flex-direction:column}
.month-card>span:first-child{font-size:14px;color:var(--muted);font-weight:700}
.month-card b{font-size:30px;line-height:1.1}
.month-card>span:last-child{font-size:13px}
.change-up{color:var(--ok-dark);font-weight:700}
.change-down{color:var(--bad);font-weight:700}
.month-section{display:flex;flex-direction:column;gap:8px}
.class-row{display:grid;grid-template-columns:70px 1fr 48px 90px 110px;align-items:center;gap:10px;font-size:15px;padding:4px 0;border-bottom:1px solid var(--row)}
.class-row .bar-track{height:10px;border-radius:5px}
.class-row .number{text-align:right}
.month-section ol{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:4px;font-size:15px}
.house-line{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:10px;font-size:15px;padding:4px 0;border-bottom:1px solid var(--row)}
.house-dot{display:inline-block;width:14px;height:14px;border-radius:50%}

/* houses */
.standings{display:flex;flex-direction:column;gap:6px}
.standing{display:grid;grid-template-columns:36px 1fr auto;align-items:center;gap:12px;padding:10px 12px;border-radius:14px}
.standing.top{background:var(--warn-pale)}
.standing .rank{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;font-weight:800;color:#fff}
.standing>div{display:flex;flex-direction:column;line-height:1.2}
.standing>div b{font-size:17px}
.standing>div span{font-size:13px;color:var(--muted)}
.standing .pts{font-size:22px}
.standing .pts span{font-size:13px;color:var(--muted);font-weight:600}
.house-rows{display:flex;flex-direction:column;gap:8px}
.house-row{display:flex;align-items:center;gap:10px}
.house-row input.colour-dot{flex:none;width:22px;height:22px;min-height:0;padding:0;border:none;border-radius:50%;overflow:hidden;background:none;cursor:pointer}
.house-row input.colour-dot::-webkit-color-swatch-wrapper{padding:0}
.house-row input.colour-dot::-webkit-color-swatch{border:none;border-radius:50%}
.house-row input.colour-dot::-moz-color-swatch{border:none;border-radius:50%}
.form-grid.two{grid-template-columns:1fr 1fr}

/* shared question sets */
.set-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:12px}
.set-card{border:1.5px solid var(--line);border-radius:16px;padding:14px 16px;display:flex;flex-direction:column;gap:8px}
.set-top{display:flex;gap:10px;align-items:flex-start}
.set-icon{flex:none;width:36px;height:36px;border-radius:11px;background:var(--chip);color:var(--violet);display:grid;place-items:center}
.set-icon .icon{width:19px;height:19px}
.set-top>div{display:flex;flex-direction:column;line-height:1.25}
.set-top b{font-size:17px}
.set-top span{font-size:14px;color:var(--muted)}
.set-foot{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:var(--muted)}

@media (max-width:700px){
  .class-row{grid-template-columns:56px 1fr 44px}
  .class-row>span{display:none}
  .page-head{align-items:stretch}
}
@media print{
  body{background:#fff}
  .no-print,.side,.page-head,#overview-panel,#houses-panel,#library-panel,#teachers-panel,#parents-panel,.portal-footer{display:none !important}
  .app{display:block}
  .content>main{padding:0;max-width:none}
  #monthly-panel{display:block !important}
  .monthly-report{border-radius:0;max-width:none}
  .month-head{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
