.t3-performance {
  --perf-line: var(--border);
  --perf-surface: var(--panel);
  --perf-raised: var(--panel-2);
  --perf-ink: var(--text);
  --perf-muted: var(--muted);
  min-height: 100%;
  height: 100%;
  overflow: auto;
  background:
    radial-gradient(ellipse at 82% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 34rem),
    var(--app);
  color: var(--perf-ink);
  padding: clamp(18px, 3.2vw, 42px);
  scrollbar-color: var(--border-2) transparent;
}
.t3-performance * { box-sizing: border-box; }
.t3p-shell { width: min(1180px, 100%); margin: 0 auto; }
.t3p-topline { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.t3p-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px;
  color: var(--perf-muted); padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--perf-line); background: var(--perf-surface);
  cursor: pointer; font: inherit; font-size: 13px; transition: color .18s, border-color .18s, transform .18s;
}
.t3p-back:hover { color: var(--perf-ink); border-color: var(--accent); transform: translateX(-2px); }
.t3p-back svg { width: 16px; height: 16px; }
.t3p-crumb { color: var(--perf-muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.t3p-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 0 0 28px; }
.t3p-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 9px; }
.t3p-eyebrow:before { content: ""; width: 20px; height: 2px; background: currentColor; }
.t3p-heading h1 { margin: 0; font-size: clamp(28px, 4.3vw, 44px); line-height: 1.08; letter-spacing: -.045em; font-weight: 750; }
.t3p-heading p { color: var(--perf-muted); margin: 9px 0 0; font-size: 14px; }
.t3p-head-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.t3p-sync-meta { text-align: right; color: var(--perf-muted); font-size: 11px; line-height: 1.5; }
.t3p-sync-meta strong { display: block; color: var(--perf-ink); font-size: 12px; font-weight: 650; }
.t3p-btn {
  border: 1px solid var(--perf-line); border-radius: 10px; min-height: 38px; padding: 0 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--perf-surface); color: var(--perf-ink); cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; transition: background .18s, border-color .18s, transform .18s;
}
.t3p-btn:hover { background: var(--hover); border-color: var(--accent); transform: translateY(-1px); }
.t3p-btn:disabled { opacity: .56; cursor: wait; transform: none; }
.t3p-btn svg { width: 15px; height: 15px; }
.t3p-btn.is-loading svg { animation: t3p-turn 1s linear infinite; }
@keyframes t3p-turn { to { transform: rotate(360deg); } }
.t3p-course { color: var(--accent); text-decoration: none; font-size: 12px; font-weight: 700; }
.t3p-course:hover { text-decoration: underline; }
.t3p-notice {
  display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px; margin: 0 0 20px;
  border: 1px solid color-mix(in srgb, var(--warn) 42%, var(--perf-line)); border-radius: 13px;
  background: color-mix(in srgb, var(--warn) 8%, var(--perf-surface)); color: var(--perf-ink);
}
.t3p-notice svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--warn); margin-top: 1px; }
.t3p-notice strong { display: block; font-size: 13px; margin-bottom: 2px; }
.t3p-notice span { display: block; color: var(--perf-muted); font-size: 12px; line-height: 1.5; }
.t3p-sync-error { color: var(--danger) !important; margin-top: 5px; }
.t3p-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 15px; }
.t3p-card { background: var(--perf-surface); border: 1px solid var(--perf-line); border-radius: 16px; min-width: 0; }
.t3p-card-pad { padding: 20px; }
.t3p-kpi { grid-column: span 3; min-height: 132px; position: relative; overflow: hidden; padding: 18px 20px; }
.t3p-kpi:after { content: ""; position: absolute; width: 92px; height: 92px; border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent); border-radius: 50%; right: -35px; bottom: -48px; box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 4%, transparent), 0 0 0 26px color-mix(in srgb, var(--accent) 3%, transparent); }
.t3p-kpi-label { color: var(--perf-muted); font-size: 12px; font-weight: 650; }
.t3p-kpi-value { display: block; margin-top: 12px; font-size: clamp(26px, 3vw, 36px); line-height: 1; letter-spacing: -.045em; font-weight: 750; font-variant-numeric: tabular-nums; }
.t3p-kpi-note { display: block; margin-top: 9px; color: var(--perf-muted); font-size: 11px; }
.t3p-kpi-accent { border-top: 2px solid var(--accent); }
.t3p-kpi-teal { border-top: 2px solid var(--violet); }
.t3p-kpi-gold { border-top: 2px solid var(--warn); }
.t3p-section { grid-column: span 12; overflow: hidden; }
.t3p-section.half { grid-column: span 6; }
.t3p-sec-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 19px; border-bottom: 1px solid var(--perf-line); }
.t3p-sec-title { margin: 0; font-size: 14px; font-weight: 750; letter-spacing: -.01em; }
.t3p-sec-sub { color: var(--perf-muted); font-size: 11px; margin-top: 3px; }
.t3p-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border: 1px solid var(--perf-line); border-radius: 99px; color: var(--perf-muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.t3p-tag.attendance { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 35%, var(--perf-line)); background: color-mix(in srgb, var(--violet) 8%, transparent); }
.t3p-table-wrap { overflow-x: auto; }
.t3p-table { border-collapse: collapse; width: 100%; font-size: 12px; text-align: left; }
.t3p-table th { padding: 11px 15px; color: var(--perf-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 750; white-space: nowrap; }
.t3p-table td { padding: 13px 15px; border-top: 1px solid var(--perf-line); white-space: nowrap; }
.t3p-table tbody tr { transition: background .15s; }
.t3p-table tbody tr:hover { background: var(--hover); }
.t3p-table .t3p-primary-cell { color: var(--perf-ink); font-weight: 650; white-space: normal; min-width: 185px; }
.t3p-table .t3p-secondary { display: block; color: var(--perf-muted); font-size: 10px; font-weight: 450; margin-top: 3px; }
.t3p-number { font-variant-numeric: tabular-nums; font-weight: 700; }
.t3p-progress { display: inline-flex; align-items: center; gap: 8px; min-width: 108px; }
.t3p-progress-track { width: 58px; height: 5px; border-radius: 8px; overflow: hidden; background: var(--field); }
.t3p-progress-fill { height: 100%; border-radius: inherit; background: var(--accent); }
.t3p-student { display: flex; align-items: center; gap: 10px; }
.t3p-student .avatar { width: 30px; height: 30px; min-width: 30px; font-size: 10px; }
.t3p-student-name { font-weight: 700; }
.t3p-student-email { display: block; color: var(--perf-muted); font-size: 10px; margin-top: 2px; }
.t3p-search { height: 34px; width: min(220px, 40vw); border: 1px solid var(--perf-line); border-radius: 9px; background: var(--field); color: var(--perf-ink); padding: 0 10px; outline: 0; font: inherit; font-size: 12px; }
.t3p-search:focus { border-color: var(--accent); }
.t3p-empty { display: grid; place-items: center; text-align: center; min-height: 155px; padding: 24px; color: var(--perf-muted); font-size: 12px; }
.t3p-empty strong { color: var(--perf-ink); font-size: 13px; display: block; margin-bottom: 5px; }
.t3p-empty-mark { width: 38px; height: 38px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); }
.t3p-empty-mark svg { width: 19px; height: 19px; }
.t3p-assignment-list { display: grid; }
.t3p-assignment { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 14px 19px; border-top: 1px solid var(--perf-line); }
.t3p-assignment:first-child { border-top: 0; }
.t3p-assignment-title { display: block; font-size: 12px; font-weight: 700; }
.t3p-assignment-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--perf-muted); font-size: 10px; margin-top: 4px; }
.t3p-assignment-grade { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.t3p-state { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 99px; background: var(--field); color: var(--perf-muted); font-size: 10px; font-weight: 700; }
.t3p-state.done { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.t3p-state.late { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.t3p-t3-items { display: grid; }
.t3p-t3-item { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px 19px; border-top: 1px solid var(--perf-line); }
.t3p-t3-item:first-child { border-top: 0; }
.t3p-item-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 12%, transparent); }
.t3p-item-title { font-size: 12px; font-weight: 700; }
.t3p-item-meta { color: var(--perf-muted); font-size: 10px; margin-top: 3px; }
.t3p-item-grade { font-weight: 750; font-variant-numeric: tabular-nums; }
.t3p-caption { color: var(--perf-muted); font-size: 11px; line-height: 1.5; padding: 13px 19px; border-top: 1px solid var(--perf-line); }
.t3p-state-screen { max-width: 470px; margin: 8vh auto; padding: 28px; text-align: center; }
.t3p-state-screen h2 { font-size: 18px; margin: 12px 0 6px; }
.t3p-state-screen p { color: var(--perf-muted); font-size: 13px; margin: 0 auto 17px; }
.t3p-skeleton { animation: t3p-pulse 1.3s ease-in-out infinite alternate; background: color-mix(in srgb, var(--perf-muted) 12%, var(--perf-surface)); border-radius: 8px; }
.t3p-skel-row { height: 54px; border-bottom: 1px solid var(--perf-line); }
.t3p-skel-kpi { height: 132px; grid-column: span 3; }
@keyframes t3p-pulse { to { opacity: .48; } }
.t3p-fade { animation: t3p-enter .28s ease-out both; }
@keyframes t3p-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.perf-nav-btn[hidden] { display: none !important; }
.perf-head-pill {
  display: none; align-items: center; gap: 6px; height: 34px; padding: 0 11px;
  margin-right: 6px; border-radius: 99px; color: #05271b;
  background: linear-gradient(135deg, #42d99b, #18a975);
  box-shadow: 0 4px 14px rgba(33,194,126,.24); white-space: nowrap;
  font: 700 13px Inter, sans-serif;
}
.perf-head-pill svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  .t3p-kpi { grid-column: span 6; }
  .t3p-section.half { grid-column: span 12; }
}
@media (max-width: 820px) {
  .perf-head-pill { display: inline-flex; }
  .perf-head-pill span { display: none; }
  .chat-head [data-mygrades] { display: none !important; }
}
@media (max-width: 600px) {
  .t3-performance { padding: 16px 14px 28px; }
  .t3p-topline { margin-bottom: 19px; }
  .t3p-heading { align-items: flex-start; flex-direction: column; gap: 17px; margin-bottom: 21px; }
  .t3p-head-actions { width: 100%; justify-content: space-between; }
  .t3p-sync-meta { text-align: left; }
  .t3p-kpi { grid-column: span 6; min-height: 112px; padding: 15px; }
  .t3p-kpi-value { font-size: 28px; margin-top: 10px; }
  .t3p-card-pad { padding: 16px; }
  .t3p-sec-head { padding: 12px 14px; }
  .t3p-table th, .t3p-table td { padding: 11px 12px; }
  .t3p-assignment, .t3p-t3-item { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .t3-performance *, .t3-performance *:before, .t3-performance *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
