/* 学生详情：参考图的五项摘要、双区中栏与五列记录，沿用教务主题。 */
.student-detail-dialog {
    width: min(1440px, calc(100vw - 48px));
    max-width: none;
    max-height: calc(100dvh - 48px);
    padding: 0;
    overflow: auto;
    color: var(--academic-text);
    background: var(--academic-bg);
    border: 1px solid var(--academic-line);
    border-radius: 18px;
    box-shadow: var(--academic-shadow);
}
.student-detail-dialog::backdrop { background: rgba(35, 32, 28, .38); backdrop-filter: blur(5px); }
.student-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 30px 20px;
    background: var(--academic-panel);
}
.student-detail-identity { min-width: 0; }
.student-detail-identity h2 { margin: 5px 0 8px; font-size: 30px; line-height: 1.3; letter-spacing: -.025em; overflow-wrap: anywhere; }
.student-detail-identity p { margin: 0; color: var(--academic-muted); font-size: 13px; overflow-wrap: anywhere; }
.student-detail-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.student-detail-sync { margin: 0; padding: 8px 30px; color: var(--academic-muted); font-size: 12px; }
.student-detail-sync:empty { display: none; }
.student-detail-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 20px 30px; background: var(--academic-active-tint); border-block: 1px solid var(--academic-line); }
.student-detail-stat { padding: 0 22px; border-left: 1px solid var(--academic-line); min-width: 0; }
.student-detail-stat:first-child { border-left: none; padding-left: 0; }
.student-detail-stat dt { font-size: 12px; color: var(--academic-muted); margin-bottom: 8px; }
.student-detail-stat dd { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.student-detail-stat:nth-child(-n+2) dd { font-size: 27px; font-variant-numeric: tabular-nums; }
.student-detail-middle { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 20px 24px 14px; }
.student-detail-learning { grid-column: span 3; }
.student-detail-renewal { grid-column: span 2; }
.student-detail-bottom { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 0 24px 24px; }
.student-detail-panel { --detail-accent: var(--academic-brand); min-width: 0; overflow: hidden; background: var(--academic-panel); border: 1px solid var(--academic-line); border-top: 3px solid var(--detail-accent); border-radius: 10px; }
.student-detail-learning { --detail-accent: #5d927b; }
.student-detail-renewal { --detail-accent: #9472a7; }
.student-detail-attendance { --detail-accent: #b77157; }
[data-detail-panel="payment"] { --detail-accent: #bb9b48; }
[data-detail-panel="gift"] { --detail-accent: #508fa0; }
[data-detail-panel="practice"] { --detail-accent: #a37088; }
[data-detail-panel="competition"] { --detail-accent: #6489b0; }
.student-detail-panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 12px 15px; border-bottom: 1px solid var(--academic-hairline); }
.student-detail-panel-heading h3 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 14px; font-weight: 650; }
.student-detail-panel-heading h3 svg { width: 16px; height: 16px; color: var(--detail-accent); }
.student-detail-link { padding: 3px 0; border: 0; background: transparent; color: var(--academic-brand); font: inherit; font-size: 12px; cursor: pointer; }
.student-detail-link:hover { text-decoration: underline; }
.student-detail-link:disabled { cursor: default; opacity: .4; text-decoration: none; }
.student-detail-link:focus-visible { outline: 2px solid var(--academic-brand); outline-offset: 3px; border-radius: 2px; }
.student-detail-panel-body { padding: 14px 15px; overflow: auto; }
.student-detail-middle .student-detail-panel-body { height: 172px; }
.student-detail-bottom .student-detail-panel-body { height: 320px; }
.student-detail-learning-text { margin: 0; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.student-detail-caption + .student-detail-learning-text { margin-top: 6px; }
.record-table .learning-record-description { display: block; min-width: 220px; max-width: min(70vw, 900px); white-space: pre-wrap; overflow-wrap: anywhere; }
.student-detail-caption { font-size: 11px; color: var(--academic-muted); line-height: 1.7; margin: 0; }
.student-detail-empty { margin: 16px 0; color: var(--academic-muted); font-size: 13px; line-height: 1.8; }
.student-detail-records { list-style: none; margin: 0; padding: 0; }
.student-detail-records li { padding: 12px 0; border-bottom: 1px solid var(--academic-hairline); }
.student-detail-records li:first-child { padding-top: 0; }
.student-detail-records li:last-child { border-bottom: 0; }
.student-detail-record-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.student-detail-record-heading strong { font-size: 13px; line-height: 1.6; font-weight: 600; overflow-wrap: anywhere; }
.student-detail-records time { display: block; margin-top: 3px; color: var(--academic-muted); font-size: 11px; }
.student-detail-records p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 6px 0 0; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.student-detail-badge { flex-shrink: 0; padding: 2px 5px; border: 1px solid var(--academic-line); border-radius: 4px; color: var(--academic-muted); font-size: 10px; line-height: 1.5; }
.student-detail-badge.is-success { color: #41775f; background: rgba(87, 142, 108, .09); border-color: rgba(87, 142, 108, .2); }
.student-detail-error { color: var(--academic-danger); font-size: 12px; overflow-wrap: anywhere; }
.student-detail-more { font-size: 11px; color: var(--academic-muted); margin: 10px 0 0; }
.student-detail-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--academic-hairline); margin-top: 8px; padding-top: 10px; }
.student-detail-pagination span { color: var(--academic-muted); font-size: 10px; }
.student-detail-attendance-total { display: flex; flex-direction: column; gap: 4px; margin: 9px 0 25px; }
.student-detail-attendance-total strong { font-size: 38px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.student-detail-attendance-total span { font-size: 12px; color: var(--academic-muted); }
@media (min-width: 1101px) and (min-height: 640px) {
    .student-detail-dialog[open] { display: flex; flex-direction: column; height: min(920px, calc(100dvh - 48px)); overflow: hidden; }
    .student-detail-header, .student-detail-summary, .student-detail-sync { flex-shrink: 0; }
    .student-detail-middle { flex: 2 1 0; min-height: 150px; }
    .student-detail-bottom { flex: 3 1 0; min-height: 210px; }
    .student-detail-panel { display: flex; flex-direction: column; }
    .student-detail-panel-heading { flex-shrink: 0; }
    .student-detail-middle .student-detail-panel-body,
    .student-detail-bottom .student-detail-panel-body { height: auto; flex: 1; min-height: 0; }
}
@media (max-width: 1100px) {
    .student-detail-middle { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .student-detail-learning, .student-detail-renewal { grid-column: span 3; }
    .student-detail-bottom { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .student-detail-stat { padding-inline: 12px; }
}
@media (max-width: 700px) {
    .student-detail-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
    .student-detail-header { flex-wrap: wrap; gap: 16px; padding: 20px 16px; }
    .student-detail-actions { width: 100%; }
    .student-detail-actions [data-detail-action="close"] { margin-left: auto; }
    .student-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; padding: 18px 16px; }
    .student-detail-stat { padding: 0; border: 0; }
    .student-detail-stat dd { font-size: 17px; }
    .student-detail-middle, .student-detail-bottom { grid-template-columns: 1fr; padding-inline: 12px; }
    .student-detail-learning, .student-detail-renewal { grid-column: auto; }
    .student-detail-bottom .student-detail-panel-body { height: auto; max-height: 320px; min-height: 90px; }
    .student-detail-middle .student-detail-panel-body { height: auto; max-height: 240px; min-height: 130px; }
}
