/* SdSchool teacher portal: on top of the parent portal's look (portal/portal.css) */
.wrap.wide { max-width: 1080px; }
.tnav { display: flex; gap: 4px; overflow-x: auto; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 58px; z-index: 4; scrollbar-width: none; }
.tnav a { white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 13px; padding: 7px 12px; border-radius: 8px; }
.tnav a.on { background: var(--soft); color: var(--blue2); font-weight: 600; }
.tnav a:hover { color: var(--blue2); }
h1.page { font-size: 19px; margin: 4px 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.tile span { display: block; font-size: 12px; color: var(--muted); }
.tile b { font-size: 22px; }
.tile small { color: var(--muted); }
a.tile:hover { border-color: var(--blue); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1.5px solid var(--line); }
table.t td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t .r { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--soft); color: var(--blue2); }
.pill.warn { background: #fff4e0; color: #9a5b00; }
.pill.ok { background: #eaf8dc; color: var(--green-ink); }
.pill.lock { background: #eef0f5; color: #4b5068; }
.photo { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: #eaf1fb; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 4px; }
.filters > div { flex: 1 1 170px; }
.filters label { margin-top: 0; }
select, input[type=date], input[type=number], textarea { width: 100%; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; background: #fafbff; }
textarea { resize: vertical; min-height: 54px; }
.btn.inline { width: auto; margin-top: 12px; padding: 10px 18px; }
/* register: Present / Late / Absent */
.opts { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.opts label { margin: 0; padding: 7px 12px; font-size: 13px; cursor: pointer; border-right: 1px solid var(--line); }
.opts label:last-child { border-right: 0; }
.opts input { position: absolute; opacity: 0; pointer-events: none; }
.opts label:has(input[value=Present]:checked) { background: #2fa84f; color: #fff; }
.opts label:has(input[value=Late]:checked) { background: #f5a524; color: #fff; }
.opts label:has(input[value=Absent]:checked) { background: var(--red); color: #fff; }
/* marks */
.mk { width: 76px; text-align: center; font-weight: 600; padding: 8px 4px; }
.mk.missing { background: #fff7e6; border-color: #f59e0b; }
.mk.missing::placeholder { color: #b45309; font-size: 11px; font-weight: 500; }
tr.incomplete td:first-child { box-shadow: inset 4px 0 0 #f59e0b; }
tr.complete td:first-child { box-shadow: inset 4px 0 0 #22c55e; }
.state { font-size: 11.5px; font-weight: 600; color: #b45309; }
.saved { font-size: 11.5px; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 10px; background: #fff7e6; border: 1px solid #fcd34d; font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.bar.done { background: #ecfdf5; border-color: #86efac; }
.bar button { font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 8px; border: 1px solid #f59e0b; background: #fff; color: #9a5b00; cursor: pointer; }
.bar.done button { display: none; }
.dist { display: flex; height: 22px; border-radius: 6px; overflow: hidden; gap: 2px; background: #fff; }
.dist i { display: block; height: 100%; min-width: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend b { color: var(--ink); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; background: var(--c); }
@media (max-width: 640px) {
    .tnav { top: 54px; }
    table.t th, table.t td { padding: 6px; }
}
.tile .pill { display: inline-block; }          /* a label, not a full-width block */
.tile.link b { display: block; font-size: 15px; color: var(--blue2); }
.tile.link small { display: block; margin-top: 2px; }
