.sp-dashboard .sp-home-layout { display:block; }
.sp-dashboard .sp-home-main { width:100%; }
.sp-view-banner {
 display:flex; align-items:center; gap:18px; margin:0 0 12px; min-height:105px; padding:16px 23px;
 border:1px solid #fff; border-radius:18px; color:#fff;
 background:url('/static/assets/teacher247x/pencils.png') right 7% center / auto 90% no-repeat,
   linear-gradient(130deg,#0666d4,#073e94 57%,#188aec 78%,#6146d8);
 box-shadow:0 4px 12px #1b5ca52a;
}
.sp-view-banner h2 { color:inherit; font-size:clamp(1.55rem,3.4vw,2.55rem); line-height:1.08; margin:0; }
.sp-view-banner p { margin:5px 0 0; color:inherit; }
.sp-view-banner img { width:clamp(38px,6vw,64px); height:auto; object-fit:contain; filter:brightness(0) invert(1); }
.sp-view-card,.sp-view-metric {
 min-width:0; padding:14px; border:1px solid #e0eaff; border-radius:15px;
 background:#f9fbff; box-shadow:0 4px 12px #1b5ca51f;
}
.sp-view-card h2 { margin:0 0 9px; font-size:clamp(1.05rem,1.6vw,1.35rem); }
.sp-view-card p { margin:5px 0; }
.sp-view-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.sp-view-heading h2 { margin:0; }
.sp-view-heading + .sp-home-subjects { margin-top:10px; }
.sp-view-metrics { display:flex; gap:10px; margin-bottom:12px; }
.sp-view-metrics > * { flex:1 1 0; min-width:0; }
.sp-view-metric { display:flex; align-items:center; gap:10px; padding:10px; min-height:68px; }
.sp-view-metric > span,.sp-home-subjects img {
 display:grid; place-items:center; width:42px; height:42px; padding:7px; flex:none; border-radius:11px; background:var(--tone,#e3efff); object-fit:contain;
}
.sp-view-metric img { width:100%; height:100%; object-fit:contain; }
.sp-view-metric small,.sp-view-metric strong { display:block; }
.sp-view-metric strong { font-size:clamp(1.1rem,2.2vw,1.65rem); overflow-wrap:anywhere; line-height:1.18; }
.sp-overview-home,.sp-subject-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:start; }
.sp-overview-stack { display:grid; gap:12px; min-width:0; }
.sp-home-subjects { display:grid; gap:7px; }
.sp-home-subjects button,.sp-overview-item {
 display:flex; align-items:center; gap:9px; width:100%; min-width:0; text-align:left; padding:8px;
 border:1px solid #dce7fa; border-radius:12px; color:inherit; background:var(--tone,#f4f8ff); font:inherit;
}
.sp-home-subjects button { cursor:pointer; }
.sp-home-subjects button:hover { border-color:#80acff; }
.sp-home-subjects b { margin-left:auto; }
.sp-home-subjects small,.sp-overview-item small,.sp-overview-item strong { display:block; overflow-wrap:anywhere; }
.sp-overview-item + .sp-overview-item { margin-top:6px; }
.sp-overview-item img { width:29px; height:29px; object-fit:contain; }
.sp-overview-item time { margin-left:auto; white-space:nowrap; font-size:.8rem; }
.sp-text-action { border:0; background:none; padding:4px; color:#0845ac; font:inherit; font-weight:720; cursor:pointer; }
.sp-overview-ring { display:flex; align-items:center; gap:12px; }
.sp-overview-ring ul { padding:0; margin:0; list-style:none; font-size:.86rem; }
.sp-overview-ring li + li { margin-top:4px; }
.sp-agenda-promo { color:white; background:linear-gradient(130deg,#3d92eb,#6346c9); }
.sp-agenda-promo h2 { color:inherit; }
.sp-agenda-promo img { float:right; margin-left:8px; width:48px; height:48px; object-fit:contain; }
.sp-agenda-promo .sp-text-action { background:#fff; padding:6px 12px; border-radius:20px; }
.sp-subject-cards { margin-top:12px; }
.sp-subject-card { overflow:hidden; padding:0; }
.sp-subject-card header { display:flex; align-items:center; gap:10px; padding:13px; background:linear-gradient(135deg,white,var(--tone,#e5efff) 33%); }
.sp-subject-card h3 { margin:0; font-size:1.15rem; }
.sp-subject-card img { width:42px; height:42px; object-fit:contain; }
.sp-subject-body { padding:11px; }
.sp-subject-body button { width:100%; }
.sp-subject-grade { display:flex; align-items:center; justify-content:space-between; gap:6px; margin:8px 0; padding:7px; border-radius:8px; background:var(--tone,#e5efff); }
.sp-subject-grade strong { font-size:1.12rem; }
.sp-dashboard .blue { --tone:#dcedff; }
.sp-dashboard .purple { --tone:#ede4ff; }
.sp-dashboard .green { --tone:#daf7eb; }
.sp-dashboard .amber { --tone:#fff1d8; }
.sp-dashboard .pink { --tone:#fbe1ee; }
.sp-overview-table { width:100%; border-collapse:collapse; }
.sp-overview-table thead { color:white; background:#074fa9; }
.sp-overview-table th,.sp-overview-table td { text-align:left; padding:8px 10px; border-bottom:1px solid #dce8fb; }
.sp-overview-table td:first-child { font-weight:700; }
.sp-overview-table tr:nth-child(even) { background:#edf4ff; }
.sp-overview-table a { color:#074fa9; font-weight:700; }
.sp-overview-table progress { width:clamp(55px,9vw,125px); accent-color:#0867e3; }
.sp-attendance-strip { display:flex; align-items:center; gap:10px; margin:10px 0; }
.sp-attendance-strip .sp-view-metrics { flex:1; margin:0; }
.sp-finance-profile { display:flex; flex-wrap:wrap; gap:7px 12px; margin-bottom:12px; }
.sp-view-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:12px; }
.sp-view-grid .sp-view-metrics { margin:0; }
.sp-view-tabs { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:8px; }
.sp-view-tabs [aria-pressed=true],.sp-agenda-calendar [aria-pressed=true] { color:white; background:linear-gradient(130deg,#0096f8,#0645d3); }
.sp-agenda-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; margin-top:10px; }
.sp-agenda-calendar b,.sp-agenda-calendar button,.sp-agenda-calendar span { display:grid; place-items:center; min-height:34px; border:1px solid #dae6fa; border-radius:6px; font:inherit; font-size:.8rem; color:inherit; background:#f0f5ff; }
.sp-agenda-calendar button { cursor:pointer; }
.sp-agenda-calendar [aria-pressed=true] { color:white; }
.sp-agenda-calendar i { width:5px; height:5px; border-radius:50%; background:#0ca876; }
.sp-agenda-event time { margin:0; padding:5px; border-radius:6px; background:#dcecff; }
.sp-agenda-event b { margin-left:auto; font-size:.75rem; }
@media(max-width:1190px){ .sp-overview-home,.sp-subject-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px){ .sp-overview-home,.sp-view-grid { grid-template-columns:1fr; } .sp-view-metrics { flex-wrap:wrap; } .sp-view-metrics > * { flex-basis:calc(50% - 10px); } .sp-view-banner { background-image:linear-gradient(130deg,#0666d4,#073e94 57%,#6146d8); } .sp-attendance-strip { flex-wrap:wrap; } .sp-attendance-strip .sp-view-metrics { flex-basis:100%; } }
@media(max-width:420px){ .sp-subject-cards { grid-template-columns:1fr; } }

.sp-account-layout,.sp-inbox-layout,.sp-kardex-layout { display:grid; grid-template-columns:minmax(0, .85fr) minmax(0,1.2fr); gap:12px; align-items:start; }
.sp-kardex-layout { grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); }
.sp-account-profile { overflow:hidden; text-align:center; }
.sp-account-portrait {
 display:grid; place-items:center; min-height:125px; padding:13px; margin-bottom:10px;
 border-radius:13px; background:radial-gradient(ellipse at 92% -25%,#c3bbf9 52%,transparent 53%),linear-gradient(120deg,#b6ddff,#eef0ff);
}
.sp-account-portrait img { width:105px; height:105px; object-fit:cover; border-radius:50%; border:4px solid #fff; box-shadow:0 4px 12px #244b8f45; }
.sp-account-profile h2 { font-size:clamp(1.25rem,2.3vw,1.75rem); margin:0; }
.sp-account-profile h3 { margin:10px 0 7px; text-align:left; }
.sp-account-profile dl { margin:12px 0 0; text-align:left; }
.sp-account-profile dl div { display:grid; grid-template-columns:minmax(85px,1fr) 1.4fr; gap:8px; align-items:center; padding:7px 0; border-top:1px solid #dfe8f9; }
.sp-account-profile dt { display:flex; align-items:center; gap:6px; }
.sp-account-profile dt img { width:23px; height:23px; object-fit:contain; }
.sp-account-profile dd { margin:0; font-weight:750; }
.sp-state-chip { display:inline-block; border-radius:999px; padding:3px 9px; font-size:.78rem; font-weight:750; white-space:nowrap; }
.sp-state-chip.good { background:#d4f5df; color:#086d32; }
.sp-state-chip.neutral { background:#eee5ff; color:#50229a; }
.sp-option-list { border:1px solid #dce7fa; border-radius:12px; overflow:hidden; }
.sp-option-row,.sp-inbox-list button {
 display:flex; gap:9px; align-items:center; width:100%; padding:8px 10px; border:0; background:#f7f9ff; color:inherit; text-align:left; font:inherit; cursor:pointer;
}
.sp-option-row + .sp-option-row { border-top:1px solid #dce7fa; }
.sp-option-row:hover,.sp-inbox-list button:hover { background:#e9f2ff; }
.sp-option-row small,.sp-inbox-list small { display:block; color:#405579; }
.sp-option-row > b,.sp-inbox-list button > b { margin-left:auto; color:#0845ac; font-size:1.25rem; }
.sp-option-icon { display:grid; place-items:center; width:44px; height:44px; flex:none; border-radius:11px; background:#e0efff; }
.sp-option-icon img { width:28px; height:28px; object-fit:contain; }
.sp-option-row:nth-child(2) .sp-option-icon { background:#eee3ff; }
.sp-option-row:nth-child(3) .sp-option-icon { background:#ddf6e9; }
.sp-account-logout { width:100%; margin-top:13px; border:1px solid #f3afc7; color:#a71738; background:#fee8ef; }
.sp-inbox-tabs { align-items:center; padding:6px; border-radius:15px; border:1px solid #edf4ff; background:#f9fbff; box-shadow:0 4px 12px #1b5ca51f; }
.sp-inbox-tabs button { display:flex; gap:6px; align-items:center; justify-content:center; flex:1 1 auto; }
.sp-inbox-tabs button img { width:20px; height:20px; object-fit:contain; }
.sp-inbox-tabs button[aria-pressed="true"] img { filter:brightness(0) invert(1); }
.sp-inbox-list { display:grid; gap:7px; margin-top:9px; max-height:440px; overflow:auto; }
.sp-inbox-list button { border:1px solid #dce7fa; border-radius:11px; overflow-wrap:anywhere; }
.sp-inbox-list button[aria-pressed="true"] { border-color:#3983e7; background:#e6f0ff; }
.sp-inbox-reading { min-height:260px; }
.sp-inbox-reading header { display:flex; align-items:center; gap:10px; padding-bottom:12px; border-bottom:1px solid #dce7fa; overflow-wrap:anywhere; }
.sp-inbox-reading header h2 { margin:0 0 4px; }
.sp-inbox-body { padding:15px 0; min-height:100px; }
.sp-kardex-chart { display:block; width:100%; max-height:320px; }
.sp-kardex-details { margin-top:12px; }
.sp-kardex-details summary { cursor:pointer; font-weight:700; }
.sp-documents .sp-overview-table th { background:#ecf3ff; color:#344d72; }
.sp-documents .sp-overview-table tbody tr { background:transparent; }
.sp-document-type { display:inline-block; border-radius:7px; padding:4px 6px; color:#a52f56; background:#ffe6ed; font-size:.75rem; }
.sp-subject-card header { position:relative; isolation:isolate; min-height:61px; overflow:hidden; }
.sp-subject-card header > div { z-index:1; }
.sp-subject-card .sp-option-icon { background:#ffffff78; }
.sp-subject-card .sp-option-icon img,.sp-subject-body p img { width:25px; height:25px; }
.sp-subject-body p { display:flex; align-items:center; gap:6px; }
.sp-subject-body p img { flex:none; object-fit:contain; }
.sp-subject-art { position:absolute; right:1px; bottom:-14px; transform:rotate(-12deg); opacity:.40; }
.sp-subject-art img { width:77px; height:77px; }
.sp-calculator { display:grid; justify-items:center; gap:3px; width:25px; height:33px; padding:4px; border-radius:5px; background:linear-gradient(145deg,#077fec,#063788); }
.sp-calculator i { width:100%; height:6px; background:#a3defb; border-radius:2px; }
.sp-calculator b { width:3px; height:3px; background:white; box-shadow:5px 0 white,-5px 0 white,0 5px white,5px 5px white,-5px 5px white,0 10px white,5px 10px white,-5px 10px white; margin-bottom:11px; }
.sp-calculator-art { position:absolute; right:14px; bottom:17px; z-index:-1; transform:rotate(28deg) scale(2.5); opacity:.43; }
.sp-enter-classroom { display:flex; align-items:center; justify-content:center; gap:6px; background:linear-gradient(#0789f2,#0649c3); border-radius:10px; }
.sp-enter-classroom b { margin-left:auto; }
.sp-enter-classroom > span { border:1px solid currentColor; border-radius:5px; line-height:1; padding:1px 3px; }
@media(max-width:740px){ .sp-account-layout,.sp-inbox-layout,.sp-kardex-layout { grid-template-columns:minmax(0,1fr); } }
