/* Okul yönetimi — gri kurumsal tema + yüksek kontrast + hayalet gözlem */

.pr-ghost-bar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 80;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    background: #0284c7;
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.pr-ghost-bar:not(.hidden) { display: flex; }
.pr-ghost-bar strong { font-weight: 800; color: #fff; }
.pr-ghost-back {
    border: 1px solid #fff;
    background: #0f172a;
    color: #fff;
    border-radius: 0.55rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.pr-ghost-back:hover { background: #1e293b; }

.pr-role-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: 0.2rem 0 0;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: #64748b !important;
    color: #ffffff !important;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pr-role-badge.hidden { display: none !important; }
#teacher-panel > header .pr-role-badge {
    margin-left: 0.35rem;
    margin-top: 0;
    background: #64748b !important;
    color: #ffffff !important;
}

#teacher-panel.is-principal-chrome #tdash-sidebar-profile-wrap .tdash-profile-name-row,
#teacher-panel.is-principal-mode #tdash-sidebar-profile-wrap .tdash-profile-name-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.35rem !important;
    min-width: 0 !important;
    width: 100% !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar #teacher-sidebar-name,
#teacher-panel.is-principal-mode #teacher-sidebar #teacher-sidebar-name {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #f8fafc !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar-role-badge,
#teacher-panel.is-principal-mode #teacher-sidebar-role-badge {
    display: inline-flex !important;
    margin: 0.25rem 0 0 !important;
    max-width: 100%;
}
#teacher-panel.is-principal-chrome #teacher-sidebar-role-badge.hidden,
#teacher-panel.is-principal-mode #teacher-sidebar-role-badge.hidden {
    display: none !important;
}

#nav-principal-dashboard-view { display: none; }
#teacher-panel.is-principal-chrome #nav-principal-dashboard-view,
#teacher-panel.is-ghost-mode #nav-principal-dashboard-view,
#teacher-panel.is-principal-mode #nav-principal-dashboard-view { display: flex; }
#teacher-panel.is-principal-chrome:not(.is-ghost-mode) #sa-teacher-tools-drawer,
#teacher-panel.is-principal-mode:not(.is-ghost-mode) #sa-teacher-tools-drawer { display: none; }

/* —— Ana gövde / üst bar —— */
#teacher-panel.is-principal-chrome,
#teacher-panel.is-principal-mode:not(.is-ghost-mode) {
    background: #e2e8f0 !important;
}
#teacher-panel.is-principal-chrome > header.t-teacher-header,
#teacher-panel.is-principal-mode:not(.is-ghost-mode) > header.t-teacher-header,
#teacher-panel.is-ghost-mode > header.t-teacher-header {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}
#teacher-panel.is-principal-chrome > header.t-teacher-header #t-header-title,
#teacher-panel.is-principal-mode > header.t-teacher-header #t-header-title,
#teacher-panel.is-ghost-mode > header.t-teacher-header #t-header-title,
#teacher-panel.is-principal-chrome > header.t-teacher-header .font-extrabold,
#teacher-panel.is-principal-mode > header.t-teacher-header .font-extrabold {
    color: #f8fafc !important;
}
#teacher-panel.is-principal-chrome #academic-week-badge,
#teacher-panel.is-principal-mode #academic-week-badge,
#teacher-panel.is-ghost-mode #academic-week-badge {
    background: #1e293b !important;
    border-color: #475569 !important;
}
#teacher-panel.is-principal-chrome #academic-week-text,
#teacher-panel.is-principal-mode #academic-week-text,
#teacher-panel.is-ghost-mode #academic-week-text,
#teacher-panel.is-principal-chrome #academic-week-badge i,
#teacher-panel.is-principal-mode #academic-week-badge i,
#teacher-panel.is-ghost-mode #academic-week-badge i {
    color: #e2e8f0 !important;
}

/* LGS / seri — koyu kutu + beyaz rakam (panel.css beyaz kutusunu ezer) */
#teacher-panel.is-principal-chrome > header.t-teacher-header .t-lgs-label,
#teacher-panel.is-principal-mode > header.t-teacher-header .t-lgs-label,
#teacher-panel.is-ghost-mode > header.t-teacher-header .t-lgs-label {
    color: #94a3b8 !important;
}
#teacher-panel.is-principal-chrome > header.t-teacher-header .t-lgs-box,
#teacher-panel.is-principal-mode > header.t-teacher-header .t-lgs-box,
#teacher-panel.is-ghost-mode > header.t-teacher-header .t-lgs-box {
    background: #1e293b !important;
    border-color: #64748b !important;
}
#teacher-panel.is-principal-chrome > header.t-teacher-header .t-lgs-num,
#teacher-panel.is-principal-mode > header.t-teacher-header .t-lgs-num,
#teacher-panel.is-ghost-mode > header.t-teacher-header .t-lgs-num,
#teacher-panel.is-principal-chrome > header.t-teacher-header #t-countdown-days,
#teacher-panel.is-principal-chrome > header.t-teacher-header #t-countdown-hours,
#teacher-panel.is-principal-mode > header.t-teacher-header #t-countdown-days,
#teacher-panel.is-principal-mode > header.t-teacher-header #t-countdown-hours,
#teacher-panel.is-ghost-mode > header.t-teacher-header #t-countdown-days,
#teacher-panel.is-ghost-mode > header.t-teacher-header #t-countdown-hours {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
#teacher-panel.is-principal-chrome > header.t-teacher-header .t-lgs-unit,
#teacher-panel.is-principal-mode > header.t-teacher-header .t-lgs-unit,
#teacher-panel.is-ghost-mode > header.t-teacher-header .t-lgs-unit {
    color: #cbd5e1 !important;
}
#teacher-panel.is-principal-chrome > header.t-teacher-header .daily-streak-btn,
#teacher-panel.is-principal-chrome > header.t-teacher-header .t-header-streak,
#teacher-panel.is-principal-mode > header.t-teacher-header .daily-streak-btn,
#teacher-panel.is-ghost-mode > header.t-teacher-header .daily-streak-btn {
    background: #1e293b !important;
    border-color: #64748b !important;
    color: #f8fafc !important;
}
#teacher-panel.is-principal-chrome > header.t-teacher-header .streak-count,
#teacher-panel.is-principal-chrome > header.t-teacher-header .t-streak-suffix,
#teacher-panel.is-principal-chrome > header.t-teacher-header #t-daily-streak-count,
#teacher-panel.is-principal-mode > header.t-teacher-header .streak-count,
#teacher-panel.is-principal-mode > header.t-teacher-header #t-daily-streak-count,
#teacher-panel.is-ghost-mode > header.t-teacher-header .streak-count,
#teacher-panel.is-ghost-mode > header.t-teacher-header #t-daily-streak-count {
    color: #f8fafc !important;
}

/* —— Yan panel —— */
#teacher-panel.is-principal-chrome #teacher-sidebar,
#teacher-panel.is-principal-mode #teacher-sidebar,
#teacher-panel.is-ghost-mode #teacher-sidebar {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #e2e8f0 !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-sidebar-logo,
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-sidebar-profile-hero,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-sidebar-logo,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-sidebar-profile-hero {
    background: transparent !important;
    border-color: #1e293b !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-sidebar-brand-text p,
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-teacher-name,
#teacher-panel.is-principal-chrome #teacher-sidebar #teacher-sidebar-branch,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-sidebar-brand-text p,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-teacher-name,
#teacher-panel.is-principal-mode #teacher-sidebar #teacher-sidebar-branch {
    color: #f8fafc !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar #teacher-sidebar-branch,
#teacher-panel.is-principal-mode #teacher-sidebar #teacher-sidebar-branch {
    color: #cbd5e1 !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .sa-inst-badge,
#teacher-panel.is-principal-mode #teacher-sidebar .sa-inst-badge {
    color: #67e8f9 !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-nav-item,
#teacher-panel.is-principal-chrome #teacher-sidebar #sidebar-nav,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-nav-item,
#teacher-panel.is-principal-mode #teacher-sidebar #sidebar-nav,
#teacher-panel.is-ghost-mode #teacher-sidebar .tdash-nav-item,
#teacher-panel.is-ghost-mode #teacher-sidebar #sidebar-nav {
    color: #f8fafc !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-nav-item:hover,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-nav-item:hover,
#teacher-panel.is-ghost-mode #teacher-sidebar .tdash-nav-item:hover {
    background: #1e293b !important;
    color: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-nav-item i,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-nav-item i,
#teacher-panel.is-ghost-mode #teacher-sidebar .tdash-nav-item i {
    color: inherit !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-nav-item > i:first-child,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-nav-item > i:first-child,
#teacher-panel.is-ghost-mode #teacher-sidebar .tdash-nav-item > i:first-child {
    background: #334155 !important;
    color: #f8fafc !important;
    border: 1px solid #64748b !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-nav-group-label,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-nav-group-label,
#teacher-panel.is-ghost-mode #teacher-sidebar .tdash-nav-group-label,
#teacher-panel.is-principal-chrome #teacher-sidebar summary.tdash-nav-group-label,
#teacher-panel.is-principal-mode #teacher-sidebar summary.tdash-nav-group-label,
#teacher-panel.is-ghost-mode #teacher-sidebar summary.tdash-nav-group-label {
    color: #e2e8f0 !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-nav-item.is-active,
#teacher-panel.is-principal-chrome #nav-principal-dashboard-view.is-active,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-nav-item.is-active,
#teacher-panel.is-principal-mode #nav-principal-dashboard-view.is-active,
#teacher-panel.is-ghost-mode #teacher-sidebar .tdash-nav-item.is-active {
    background: #475569 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-nav-item.is-active > i:first-child,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-nav-item.is-active > i:first-child,
#teacher-panel.is-ghost-mode #teacher-sidebar .tdash-nav-item.is-active > i:first-child,
#teacher-panel.is-principal-chrome #nav-principal-dashboard-view.is-active > i:first-child {
    background: #0ea5e9 !important;
    color: #fff !important;
    border-color: #38bdf8 !important;
}
#teacher-panel.is-principal-chrome #nav-principal-dashboard-view,
#teacher-panel.is-principal-mode #nav-principal-dashboard-view,
#teacher-panel.is-ghost-mode #nav-principal-dashboard-view {
    font-weight: 800 !important;
    margin-bottom: 0.35rem;
    border: 1px solid #64748b !important;
}
#teacher-panel.is-ghost-mode #nav-principal-dashboard-view {
    background: #0ea5e9 !important;
    color: #fff !important;
    border-color: #38bdf8 !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-sidebar-footer,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-sidebar-footer,
#teacher-panel.is-ghost-mode #teacher-sidebar .tdash-sidebar-footer {
    background: #0f172a !important;
    border-color: #1e293b !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-footer-action,
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-footer-action-label,
#teacher-panel.is-principal-chrome #teacher-sidebar #nav-settings-view,
#teacher-panel.is-principal-chrome #teacher-sidebar #nav-settings-view span,
#teacher-panel.is-principal-chrome #teacher-sidebar #nav-settings-view i,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-footer-action,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-footer-action-label,
#teacher-panel.is-principal-mode #teacher-sidebar #nav-settings-view,
#teacher-panel.is-principal-mode #teacher-sidebar #nav-settings-view span,
#teacher-panel.is-principal-mode #teacher-sidebar #nav-settings-view i {
    color: #e2e8f0 !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .tdash-profile-bell,
#teacher-panel.is-principal-mode #teacher-sidebar .tdash-profile-bell {
    background: #f8fafc !important;
    color: #0f172a !important;
}
#teacher-panel.is-principal-chrome #teacher-sidebar .text-slate-600,
#teacher-panel.is-principal-chrome #teacher-sidebar .text-slate-500,
#teacher-panel.is-principal-chrome #teacher-sidebar .text-slate-400,
#teacher-panel.is-principal-mode #teacher-sidebar .text-slate-600,
#teacher-panel.is-principal-mode #teacher-sidebar .text-slate-500,
#teacher-panel.is-principal-mode #teacher-sidebar .text-slate-400 {
    color: #cbd5e1 !important;
}

.pr-home { padding: 1rem 0.75rem 2rem; }
.pr-roster-sync-warn {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.8rem;
    line-height: 1.45;
}
.pr-roster-sync-warn.hidden { display: none; }
.pr-roster-sync-warn i { margin-top: 0.15rem; color: #d97706; }
.pr-home-head { margin-bottom: 1rem; }
.pr-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #475569;
}
.pr-home-head h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}
.pr-home-head p:last-child {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #334155;
}
.pr-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0 0 0.85rem;
    padding: 0.7rem 0.85rem;
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 0.75rem;
}
.pr-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
}
.pr-grade-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.pr-grade-chip {
    border: 1px solid #94a3b8;
    background: #f8fafc;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
}
.pr-grade-chip.is-active {
    background: #64748b;
    border-color: #64748b;
    color: #fff;
}
.pr-filter-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
}
.pr-filter-select {
    min-width: 14rem;
    max-width: 100%;
    padding: 0.4rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid #94a3b8;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
}
.pr-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.pr-kpi-loading {
    grid-column: 1 / -1;
    margin: 0;
    padding: 1.25rem;
    text-align: center;
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
}
.pr-kpi-loading i { margin-right: 0.4rem; color: #0f766e; }
.pr-nav-block {
    margin-bottom: 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #334155;
}
.pr-nav-block.hidden { display: none !important; }
#nav-principal-dashboard-view,
#nav-principal-teachers-view,
#nav-principal-students-view { display: flex; }
.pr-kpi {
    position: relative;
    background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
    border: 1px solid #cbd5e1;
    border-radius: 0.95rem;
    padding: 0.85rem 0.95rem 0.95rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.pr-kpi::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--pr-tone, #64748b);
    border-radius: 0.95rem 0 0 0.95rem;
}
.pr-kpi--sky { --pr-tone: #0ea5e9; }
.pr-kpi--violet { --pr-tone: #8b5cf6; }
.pr-kpi--amber { --pr-tone: #f59e0b; }
.pr-kpi--teal { --pr-tone: #14b8a6; }
.pr-kpi--indigo { --pr-tone: #6366f1; }
.pr-kpi--emerald { --pr-tone: #10b981; }
.pr-kpi--rose { --pr-tone: #f43f5e; }
.pr-kpi--slate { --pr-tone: #64748b; }
.pr-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}
.pr-kpi-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--pr-tone) 14%, white);
    color: var(--pr-tone);
    font-size: 0.85rem;
    line-height: 1;
}
.pr-kpi-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
    margin: 0;
}
.pr-kpi-modal-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}
.pr-kpi-tap {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--pr-tone);
    opacity: 0.85;
}
.pr-kpi em {
    display: block;
    font-style: normal;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #475569;
}
.pr-kpi strong {
    display: block;
    margin-top: 0.3rem;
    font-size: 1.55rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
}
.pr-kpi span {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.68rem;
    color: #475569;
    font-weight: 600;
    line-height: 1.35;
}
.pr-kpi.is-clickable {
    cursor: pointer;
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.pr-kpi.is-clickable:hover {
    border-color: var(--pr-tone);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--pr-tone) 18%, transparent);
    transform: translateY(-2px);
}
.pr-kpi.is-clickable.is-drill-open {
    border-color: var(--pr-tone);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--pr-tone) 35%, white);
}
@media (max-width: 900px) {
    .pr-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .pr-kpi-grid { grid-template-columns: 1fr; }
}

body.pr-kpi-modal-open { overflow: hidden; }
#pr-kpi-modal {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
#pr-kpi-modal.hidden { display: none; }
#pr-kpi-modal[data-tone="sky"] { --pr-tone: #0ea5e9; }
#pr-kpi-modal[data-tone="violet"] { --pr-tone: #8b5cf6; }
#pr-kpi-modal[data-tone="amber"] { --pr-tone: #f59e0b; }
#pr-kpi-modal[data-tone="teal"] { --pr-tone: #14b8a6; }
#pr-kpi-modal[data-tone="indigo"] { --pr-tone: #6366f1; }
#pr-kpi-modal[data-tone="emerald"] { --pr-tone: #10b981; }
#pr-kpi-modal[data-tone="rose"] { --pr-tone: #f43f5e; }
.pr-kpi-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}
.pr-kpi-modal-sheet {
    position: relative;
    z-index: 1;
    width: min(820px, 100%);
    max-height: min(90vh, 780px);
    background: #fff;
    border-radius: 1.1rem;
    border: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}
.pr-kpi-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid color-mix(in srgb, var(--pr-tone) 25%, #e2e8f0);
    background: linear-gradient(135deg, color-mix(in srgb, var(--pr-tone) 12%, #fff) 0%, #fff 55%);
}
.pr-kpi-modal-head-main {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}
.pr-kpi-modal-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--pr-tone) 16%, white);
    color: var(--pr-tone);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.pr-kpi-modal-head h2 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 900;
    color: #0f172a;
}
.pr-kpi-modal-head p {
    margin: 0.25rem 0 0;
    font-size: 0.74rem;
    color: #64748b;
    font-weight: 600;
}
.pr-kpi-modal-close {
    border: none;
    background: #fff;
    color: #475569;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.55rem;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.pr-kpi-modal-close:hover { background: #f1f5f9; }
.pr-kpi-modal-summary {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc;
}
.pr-kpi-modal-explain {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--pr-tone) 8%, #fff);
    border-left: 3px solid var(--pr-tone);
    font-size: 0.74rem;
    color: #334155;
    line-height: 1.45;
}
.pr-kpi-modal-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}
.pr-kpi-mini {
    border-radius: 0.75rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #e2e8f0;
    background: #fff;
}
.pr-kpi-mini.is-scope.is-sky { border-color: #7dd3fc; background: #f0f9ff; }
.pr-kpi-mini.is-scope.is-violet { border-color: #c4b5fd; background: #f5f3ff; }
.pr-kpi-mini.is-scope.is-amber { border-color: #fcd34d; background: #fffbeb; }
.pr-kpi-mini.is-scope.is-teal { border-color: #5eead4; background: #f0fdfa; }
.pr-kpi-mini.is-scope.is-indigo { border-color: #a5b4fc; background: #eef2ff; }
.pr-kpi-mini.is-scope.is-emerald { border-color: #6ee7b7; background: #ecfdf5; }
.pr-kpi-mini.is-scope.is-rose { border-color: #fda4af; background: #fff1f2; }
.pr-kpi-mini.is-school { border-color: #cbd5e1; background: #f8fafc; }
.pr-kpi-mini.is-delta.is-up { border-color: #6ee7b7; background: #ecfdf5; }
.pr-kpi-mini.is-delta.is-down { border-color: #fca5a5; background: #fef2f2; }
.pr-kpi-mini.is-delta.is-flat,
.pr-kpi-mini.is-delta.is-muted { border-color: #e2e8f0; background: #fff; }
.pr-kpi-mini em {
    display: block;
    font-style: normal;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
}
.pr-kpi-mini strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 1.25rem;
    font-weight: 900;
    color: #0f172a;
}
.pr-kpi-mini span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.62rem;
    color: #64748b;
    line-height: 1.3;
}
.pr-kpi-chart { display: grid; gap: 0.45rem; }
.pr-kpi-chart-row {
    display: grid;
    grid-template-columns: 3.2rem 1fr auto;
    gap: 0.5rem;
    align-items: center;
}
.pr-kpi-chart-row label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
}
.pr-kpi-chart-track {
    height: 0.55rem;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.pr-kpi-chart-track span {
    display: block;
    height: 100%;
    border-radius: 999px;
    min-width: 2%;
}
.pr-kpi-chart-track span.is-sky { background: #0ea5e9; }
.pr-kpi-chart-track span.is-violet { background: #8b5cf6; }
.pr-kpi-chart-track span.is-amber { background: #f59e0b; }
.pr-kpi-chart-track span.is-teal { background: #14b8a6; }
.pr-kpi-chart-track span.is-indigo { background: #6366f1; }
.pr-kpi-chart-track span.is-emerald { background: #10b981; }
.pr-kpi-chart-track span.is-rose { background: #f43f5e; }
.pr-kpi-chart-track span.is-school { background: #94a3b8; }
.pr-kpi-chart-row b {
    font-size: 0.78rem;
    font-weight: 900;
    color: #0f172a;
    min-width: 2.5rem;
    text-align: right;
}
.pr-kpi-modal-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.68rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
}
.pr-kpi-modal-legend i {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    margin: 0 0.15rem;
    vertical-align: middle;
}
.pr-kpi-modal-legend i.is-up { background: #10b981; }
.pr-kpi-modal-legend i.is-down { background: #ef4444; }
.pr-kpi-modal-table-wrap {
    flex: 1;
    overflow: auto;
    background: #fff;
}
.pr-kpi-modal-table {
    width: 100%;
    border-collapse: collapse;
}
.pr-kpi-modal-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #334155;
    text-align: left;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.55rem 0.85rem;
    color: #f8fafc;
    letter-spacing: 0.04em;
}
.pr-kpi-modal-tr td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #eef2f7;
    font-size: 0.76rem;
    vertical-align: top;
}
.pr-kpi-modal-tr.is-alt td { background: #f8fafc; }
.pr-kpi-modal-student strong {
    display: block;
    color: #0f172a;
    font-weight: 800;
}
.pr-kpi-modal-student em {
    display: block;
    font-style: normal;
    font-size: 0.64rem;
    color: #64748b;
    margin-top: 0.1rem;
}
.pr-kpi-modal-val strong { font-weight: 900; color: #0f172a; }
.pr-kpi-modal-val small { font-weight: 700; color: #64748b; }
.pr-kpi-modal-val.is-school { color: #475569; font-weight: 800; }
.pr-kpi-row-bar {
    display: block;
    margin-top: 0.35rem;
    height: 0.35rem;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.pr-kpi-row-bar i {
    display: block;
    height: 100%;
    width: var(--w, 0%);
    border-radius: 999px;
    background: var(--pr-tone, #64748b);
}
.pr-kpi-row-bar.is-sky i { background: #0ea5e9; }
.pr-kpi-row-bar.is-violet i { background: #8b5cf6; }
.pr-kpi-row-bar.is-amber i { background: #f59e0b; }
.pr-kpi-row-bar.is-teal i { background: #14b8a6; }
.pr-kpi-row-bar.is-indigo i { background: #6366f1; }
.pr-kpi-row-bar.is-emerald i { background: #10b981; }
.pr-kpi-row-bar.is-rose i { background: #f43f5e; }
.pr-kpi-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    white-space: nowrap;
}
.pr-kpi-pill.is-up { background: #d1fae5; color: #047857; }
.pr-kpi-pill.is-down { background: #fee2e2; color: #b91c1c; }
.pr-kpi-pill.is-flat { background: #e0f2fe; color: #0369a1; }
.pr-kpi-pill.is-muted { background: #f1f5f9; color: #64748b; }
.pr-kpi-delta-num {
    display: block;
    font-weight: 900;
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
}
.pr-kpi-delta-num.is-up { color: #059669; }
.pr-kpi-delta-num.is-down { color: #dc2626; }
.pr-kpi-delta-num.is-flat { color: #0284c7; }
.pr-kpi-delta-num.is-muted { color: #94a3b8; }
.pr-kpi-cell-muted {
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.72rem;
}
.pr-kpi-cell-muted em {
    display: block;
    font-style: normal;
    font-size: 0.62rem;
    color: #cbd5e1;
}
.pr-kpi-modal-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
}
.pr-kpi-modal-empty.hidden { display: none; }
@media (max-width: 640px) {
    .pr-kpi-modal-cards { grid-template-columns: 1fr; }
    .pr-kpi-modal-table-head .pr-kpi-modal-legend { display: none; }
}
.pr-table-card {
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 0.85rem;
    overflow: hidden;
}
.pr-table-head { padding: 0.85rem 1rem 0.4rem; }
.pr-table-head h2 { margin: 0; font-size: 0.92rem; font-weight: 800; color: #0f172a; }
.pr-table-head p { margin: 0.2rem 0 0; font-size: 0.72rem; color: #334155; font-weight: 600; }
.pr-table-wrap { overflow-x: auto; }
.pr-table { width: 100%; border-collapse: collapse; }
.pr-table th {
    text-align: left;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f172a;
    background: #e2e8f0;
    border-bottom: 1px solid #94a3b8;
    padding: 0.55rem 1rem;
}
.pr-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.82rem;
    color: #0f172a;
    font-weight: 650;
    vertical-align: middle;
}
.pr-table tbody tr.pr-teacher-row { cursor: pointer; }
.pr-table tbody tr.pr-teacher-row:hover { background: #e0f2fe; }
.pr-table tbody tr.is-empty { cursor: default; color: #64748b; font-style: italic; font-weight: 500; }

.pr-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}
.pr-mini-stat {
    background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
    border: 1px solid #cbd5e1;
    border-radius: 0.85rem;
    padding: 0.7rem 0.85rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.pr-mini-stat--sky { border-left: 4px solid #0ea5e9; }
.pr-mini-stat--amber { border-left: 4px solid #f59e0b; }
.pr-mini-stat--rose { border-left: 4px solid #f43f5e; }
.pr-mini-stat--teal { border-left: 4px solid #14b8a6; }
.pr-mini-stat--slate { border-left: 4px solid #64748b; }
.pr-mini-stat em {
    display: block;
    font-style: normal;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}
.pr-mini-stat strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.35rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
}
.pr-mini-stat span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 600;
}
.pr-td-person {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}
.pr-row-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #64748b;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.pr-row-avatar.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pr-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}
.pr-badge i { font-size: 0.45rem; }
.pr-badge.is-active {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.pr-badge.is-idle {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.pr-table--rich td { vertical-align: middle; }
.pr-num { font-weight: 900; color: #0f172a; }
@media (max-width: 900px) {
    .pr-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .pr-mini-grid { grid-template-columns: 1fr; }
}
.pr-t-name { display: block; font-size: 0.88rem; font-weight: 800; color: #0f172a; }
.pr-t-mail { display: block; font-size: 0.65rem; color: #475569; font-weight: 600; margin-top: 0.1rem; }
.pr-t-meta { font-size: 0.65rem; color: #64748b; font-weight: 600; }
.pr-t-go { text-align: right; white-space: nowrap; }
.pr-t-go span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.55rem;
    background: #0f172a;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
}
.pr-teacher-row:hover .pr-t-go span { background: #0284c7; }

#teacher-panel.is-ghost-mode .tdash-create-btn,
#teacher-panel.is-ghost-mode .principal-write-hide,
#teacher-panel.is-ghost-mode [onclick*="openAddStudent"],
#teacher-panel.is-ghost-mode [onclick*="openAdd"],
#teacher-panel.is-ghost-mode [onclick*="saveNew"],
#teacher-panel.is-ghost-mode [onclick*="deleteHomework"],
#teacher-panel.is-ghost-mode [onclick*="deleteExam"],
#teacher-panel.is-ghost-mode [onclick*="removeStudent"] {
    display: none !important;
}

@media (max-width: 1100px) {
    .pr-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .pr-kpi-grid { grid-template-columns: 1fr; }
    .pr-ghost-bar { flex-wrap: wrap; }
}
