/* 字段选择与学生详情复用暖纸配色；只覆盖浅色弹窗，不改变内容与交互。 */
body.theme-light :is(#academicColumnPickerDialog, #studentDetailDialog) {
    --academic-text: #302e29;
    --academic-muted: #706d65;
    --academic-panel: #FAF9F5;
    --academic-panel-raised: #F5F4ED;
    --academic-line: #dfdcd3;
    --academic-hairline: #e9e6de;
    --academic-brand: #C96442;
    --academic-focus: 0 0 0 3px rgb(201 100 66 / 14%);
    color: var(--academic-text);
    background: #FAF9F5;
    border: 1px solid #dfdcd3;
    border-radius: 14px;
    box-shadow: 0 22px 72px rgb(48 46 41 / 18%);
}

body.theme-light :is(#academicColumnPickerDialog, #studentDetailDialog)::backdrop {
    background: rgb(35 32 28 / 28%);
    backdrop-filter: blur(3px);
}

/* 所有动作保留可见轮廓，避免文字链接与正文混淆。 */
body.theme-light :is(#academicColumnPickerDialog, #studentDetailDialog)
:is(.academic-primary, .academic-secondary, .academic-icon-button, .column-picker-link, .student-detail-link) {
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid #cfc8ba;
    border-radius: 6px;
    background: #FAF9F5;
    color: #625f58;
    font-family: var(--academic-font-body);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    box-shadow: none;
    transform: none;
}

body.theme-light :is(#academicColumnPickerDialog, #studentDetailDialog)
:is(.academic-secondary, .academic-icon-button, .column-picker-link, .student-detail-link):hover:not(:disabled) {
    border-color: #bfb5a5;
    background: #F5F4ED;
    color: #302e29;
}

body.theme-light :is(#academicColumnPickerDialog, #studentDetailDialog) .academic-primary {
    min-width: 74px;
    border-color: #C96442;
    background: #C96442;
    color: #fffdf9;
}

body.theme-light :is(#academicColumnPickerDialog, #studentDetailDialog) .academic-primary:hover:not(:disabled) {
    border-color: #b75a3a;
    background: #b75a3a;
}

body.theme-light :is(#academicColumnPickerDialog, #studentDetailDialog) .academic-icon-button {
    width: 34px;
    min-height: 34px;
    padding: 0;
    flex: 0 0 auto;
}

body.theme-light :is(#academicColumnPickerDialog, #studentDetailDialog) button:disabled {
    opacity: 1;
    color: #a09a90;
    border-color: #dfd9ce;
    background: transparent;
}

body.theme-light :is(#academicColumnPickerDialog, #studentDetailDialog) button:focus-visible {
    outline: 2px solid #C96442;
    outline-offset: 2px;
}

body.theme-light #academicColumnPickerDialog {
    width: min(680px, calc(100vw - 32px));
}

body.theme-light #academicColumnPickerDialog .column-picker-header {
    align-items: center;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom-color: #e9e6de;
}

body.theme-light #academicColumnPickerDialog .column-picker-header h2 {
    margin: 0 0 5px;
    font-family: var(--academic-font-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: .02em;
}

body.theme-light #academicColumnPickerDialog .column-picker-header p {
    font-size: 12px;
    line-height: 1.6;
}

body.theme-light #academicColumnPickerDialog .column-picker-header > button {
    font-size: 21px;
}

body.theme-light #academicColumnPickerDialog .column-picker-toolbar {
    padding: 14px 24px 12px;
}

body.theme-light #academicColumnPickerDialog .column-picker-toolbar > div {
    gap: 7px;
}

body.theme-light #academicColumnPickerDialog .column-picker-fields {
    padding: 0 24px 20px;
}

body.theme-light #academicColumnPickerDialog .column-picker-grid {
    gap: 8px;
}

body.theme-light #academicColumnPickerDialog .column-picker-option {
    min-height: 40px;
    gap: 9px;
    padding: 9px 11px;
    border-color: #e1ddd3;
    border-radius: 6px;
    background: #FAF9F5;
    color: #625f58;
}

body.theme-light #academicColumnPickerDialog .column-picker-option:has(input:checked) {
    border-color: #d4c4b5;
    background: #F5F4ED;
    color: #302e29;
    font-weight: 500;
}

body.theme-light #academicColumnPickerDialog .column-picker-option:hover {
    border-color: #bfb5a5;
    background: #F5F4ED;
}

body.theme-light #academicColumnPickerDialog .column-picker-option:focus-within {
    outline: 2px solid #C96442;
    outline-offset: 1px;
}

body.theme-light #academicColumnPickerDialog .column-picker-option input {
    accent-color: #C96442;
}

body.theme-light #academicColumnPickerDialog .column-picker-error {
    padding-inline: 24px;
}

body.theme-light #academicColumnPickerDialog .column-picker-footer {
    gap: 8px;
    padding: 14px 24px;
    border-top-color: #e4e0d7;
    background: #F5F4ED;
}

body.theme-light #studentDetailDialog {
    width: min(1360px, calc(100vw - 40px));
    max-height: calc(100dvh - 40px);
}

body.theme-light #studentDetailDialog .student-detail-header {
    gap: 18px;
    padding: 20px 24px 16px;
    background: #FAF9F5;
}

body.theme-light #studentDetailDialog [data-detail-action="refresh"] { display: none; }
body.theme-light #studentDetailDialog .student-detail-actions [data-detail-action="close"] {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
}

body.theme-light #studentDetailDialog .academic-kicker {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .12em;
}

body.theme-light #studentDetailDialog .student-detail-identity h2 {
    margin: 4px 0 2px;
    font-family: var(--academic-font-display);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: .015em;
}

body.theme-light #studentDetailDialog .student-detail-sync {
    padding: 6px 24px;
}

/* 六项摘要在宽屏同一行；窄屏按三列/两列收拢，不再单独挤出授课老师。 */
body.theme-light #studentDetailDialog .student-detail-summary {
    grid-template-columns: 1fr 1fr 1fr 1.5fr 1.2fr 1fr;
    gap: 0;
    padding: 16px 24px;
    border-block-color: #e4e0d7;
    background: #F5F4ED;
}

body.theme-light #studentDetailDialog .student-detail-stat {
    padding: 0 16px;
    border-left-color: #ddd8cd;
}

body.theme-light #studentDetailDialog .student-detail-stat:first-child {
    padding-left: 0;
    border-left: 0;
}

body.theme-light #studentDetailDialog .student-detail-stat:last-child {
    padding-right: 0;
}

body.theme-light #studentDetailDialog .student-detail-stat dt {
    margin-bottom: 6px;
    font-size: 11px;
}

body.theme-light #studentDetailDialog .student-detail-stat dd {
    font-size: 16px;
    line-height: 1.45;
    font-weight: 600;
}

body.theme-light #studentDetailDialog .student-detail-stat:nth-child(-n+2) dd {
    font-size: 25px;
    line-height: 1.2;
}

body.theme-light #studentDetailDialog .student-detail-middle {
    gap: 12px;
    padding: 16px 20px 12px;
}

body.theme-light #studentDetailDialog .student-detail-bottom {
    gap: 12px;
    padding: 0 20px 20px;
}

body.theme-light #studentDetailDialog .student-detail-panel {
    --detail-accent: #8d7864;
    --detail-heading-bg: #F5F4ED;
    --detail-heading-line: #e9e6de;
    border: 1px solid #dfdcd3;
    border-radius: 8px;
    background: #FAF9F5;
}

/* 整条标题栏采用柔和浅色区分类型，内容区保持暖白。 */
body.theme-light #studentDetailDialog [data-detail-panel="learning"] {
    --detail-accent: #678167;
    --detail-heading-bg: #E8F0E6;
    --detail-heading-line: #D9E5D5;
}
body.theme-light #studentDetailDialog [data-detail-panel="renewal-note"] {
    --detail-accent: #877095;
    --detail-heading-bg: #ECE7F4;
    --detail-heading-line: #E1DAEC;
}
body.theme-light #studentDetailDialog [data-detail-panel="lesson"] {
    --detail-accent: #A46C4E;
    --detail-heading-bg: #F6E8DD;
    --detail-heading-line: #EBD8C9;
}
body.theme-light #studentDetailDialog [data-detail-panel="payment"] {
    --detail-accent: #8F7A39;
    --detail-heading-bg: #F3EDD4;
    --detail-heading-line: #E7DDB7;
}
body.theme-light #studentDetailDialog [data-detail-panel="gift"] {
    --detail-accent: #5D8B83;
    --detail-heading-bg: #E0EFEC;
    --detail-heading-line: #CFE3DE;
}
body.theme-light #studentDetailDialog [data-detail-panel="practice"] {
    --detail-accent: #6681A4;
    --detail-heading-bg: #E5ECF6;
    --detail-heading-line: #D5DFED;
}
body.theme-light #studentDetailDialog [data-detail-panel="competition"] {
    --detail-accent: #9B6D80;
    --detail-heading-bg: #F4E4EA;
    --detail-heading-line: #E9D2DC;
}

body.theme-light #studentDetailDialog .student-detail-panel-heading {
    min-height: 44px;
    gap: 6px;
    padding: 9px 12px;
    border-bottom-color: var(--detail-heading-line);
    background: var(--detail-heading-bg);
}

body.theme-light #studentDetailDialog .student-detail-panel-heading h3 {
    gap: 6px;
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Heiti SC', sans-serif;
    font-size: 13px;
    font-weight: 700;
}

body.theme-light #studentDetailDialog .student-detail-panel-heading h3 svg {
    width: 15px;
    height: 15px;
    color: var(--detail-accent);
}

body.theme-light #studentDetailDialog .student-detail-panel-heading .student-detail-link {
    min-height: 28px;
    padding: 3px 7px;
    font-size: 11px;
}

body.theme-light #studentDetailDialog .student-detail-panel-body {
    padding: 12px;
    scrollbar-color: #d6d1c5 transparent;
    scrollbar-width: thin;
}

body.theme-light #studentDetailDialog .student-detail-learning-text {
    font-size: 13px;
    line-height: 1.75;
}

body.theme-light #studentDetailDialog .student-detail-empty {
    margin: 12px 0;
    color: #777269;
    font-size: 12px;
}

body.theme-light #studentDetailDialog .student-detail-records li {
    padding-block: 10px;
    border-bottom-color: #e9e6de;
}

body.theme-light #studentDetailDialog .student-detail-records li:first-child {
    padding-top: 0;
}

body.theme-light #studentDetailDialog .student-detail-record-heading strong {
    font-size: 12px;
}

body.theme-light #studentDetailDialog .student-detail-records time {
    font-variant-numeric: tabular-nums;
}

@media (min-width: 1101px) and (min-height: 640px) {
    body.theme-light #studentDetailDialog[open] {
        height: min(840px, calc(100dvh - 40px));
    }
    body.theme-light #studentDetailDialog .student-detail-middle {
        flex: 1 1 0;
        min-height: 160px;
    }
    body.theme-light #studentDetailDialog .student-detail-bottom {
        flex: 1.55 1 0;
        min-height: 220px;
    }
}

@media (max-width: 1100px) {
    body.theme-light #studentDetailDialog .student-detail-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px 0;
    }
    body.theme-light #studentDetailDialog .student-detail-stat:nth-child(3n+1) {
        padding-left: 0;
        border-left: 0;
    }
    body.theme-light #studentDetailDialog .student-detail-stat:nth-child(3n) {
        padding-right: 0;
    }
}

@media (max-width: 700px) {
    body.theme-light #studentDetailDialog {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 10px;
    }
    body.theme-light #studentDetailDialog .student-detail-header {
        gap: 12px;
        padding: 16px;
    }
    body.theme-light #studentDetailDialog .student-detail-identity h2 { font-size: 25px; }
    body.theme-light #studentDetailDialog .student-detail-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
        padding: 16px;
    }
    body.theme-light #studentDetailDialog .student-detail-stat {
        padding: 0;
        border-left: 0;
    }
    body.theme-light #studentDetailDialog .student-detail-middle,
    body.theme-light #studentDetailDialog .student-detail-bottom {
        gap: 10px;
        padding-inline: 12px;
    }
    body.theme-light #studentDetailDialog .student-detail-sync { padding-inline: 16px; }
}

@media (max-width: 580px) {
    body.theme-light #academicColumnPickerDialog { border-radius: 10px; }
    body.theme-light #academicColumnPickerDialog .column-picker-header { padding: 18px 16px 14px; }
    body.theme-light #academicColumnPickerDialog .column-picker-header h2 { font-size: 24px; }
    body.theme-light #academicColumnPickerDialog .column-picker-toolbar { padding: 12px 16px; }
    body.theme-light #academicColumnPickerDialog .column-picker-fields { padding: 0 16px 16px; }
    body.theme-light #academicColumnPickerDialog .column-picker-option { padding: 9px; }
    body.theme-light #academicColumnPickerDialog .column-picker-error { padding-inline: 16px; }
    body.theme-light #academicColumnPickerDialog .column-picker-footer { padding: 12px 16px; }
}
