    body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#f6f7f9;color:#1f2933;font-size:14px;line-height:1.45}
    .page{max-width:430px;margin:0 auto;padding:8px}
    .card{background:transparent;border:0;border-radius:0;padding:0;box-shadow:none}
    .student-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
    .student-name{font-size:18px;font-weight:750;line-height:1.2}
    .student-code{font-size:12px;color:#94a3b8}
    .section-title{font-size:16px;font-weight:700;margin:4px 0 6px}
    .box,.info-item{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:10px;margin-top:8px}
    .info-item-clickable{position:relative;cursor:pointer;padding-right:28px;transition:border-color .12s ease,background-color .12s ease}
    .info-item-clickable:hover{border-color:#93c5fd;background:#f5f9ff}
    .info-item-clickable:active{background:#eaf2ff}
    .info-item-enter-chevron{position:absolute;top:50%;right:10px;transform:translateY(-50%);font-size:20px;line-height:1;color:#cbd5e1}
    .info-item-clickable:hover .info-item-enter-chevron{color:#2563eb}
    /* 已退费学员：整行灰底灰字，悬停时仍是可点击的蓝色边框 / 箭头 */
    .info-item-refunded:not(:hover){background:#f1f5f9}
    .info-item-refunded,.info-item-refunded .search-result-meta{color:#94a3b8}
    .section-divider{border:0;border-top:1px solid #e2e8f0;margin:14px 0 10px}
    .create-form-box{background:#eef4ff;border-color:#bfdbfe;padding-top:16px}
    /* 新建学员表单底色跟卡类型走：年卡沿用上面的蓝，周卡绿，单期课黄 */
    .create-form-box[data-card-type='ZK']{background:#f1fbf4;border-color:#b8e3c6}
    .create-form-box[data-card-type='TERM']{background:#fffbeb;border-color:#fde68a}
    .row{display:grid;grid-template-columns:72px 1fr;gap:6px;padding:5px 0;border-bottom:1px solid #f1f5f9}
    .row:last-child{border-bottom:0}
    .label{font-size:13px;color:#7b8794;font-weight:400}.value{font-size:14px;font-weight:400;line-height:1.45;word-break:break-word;color:#1f2937}.value b,.value strong,.basic-info-value b,.basic-info-value strong,.profile-value b,.profile-value strong{font-weight:400}
    .field{display:flex;flex-direction:column;gap:2px;margin-bottom:8px}
    .field>label{font-size:13px;font-weight:700;color:#475569}
    .field-hint-inline{font-weight:400;color:#94a3b8;font-size:12px;margin-left:6px}
    /* 问号悬浮提示：文案取自 data-tooltip，浮层相对整行 label 定位（.has-help-tip），避免在窄侧边栏里溢出右边 */
    .has-help-tip{position:relative}
    .help-tip{display:inline-block;width:14px;height:14px;line-height:14px;margin-left:4px;border-radius:50%;background:#e2e8f0;color:#64748b;font-size:11px;font-weight:700;text-align:center;cursor:help;vertical-align:1px}
    .help-tip:hover,.help-tip:focus{background:#2563eb;color:#fff;outline:0}
    .help-tip::after{content:attr(data-tooltip);display:none;position:absolute;left:0;top:100%;margin-top:4px;width:max-content;max-width:240px;background:#1f2933;color:#fff;font-size:12px;font-weight:400;line-height:1.5;text-align:left;padding:6px 10px;border-radius:6px;box-shadow:0 4px 10px rgba(0,0,0,.18);z-index:20}
    .help-tip:hover::after,.help-tip:focus::after{display:block}
    .field-section-label{font-size:13px;font-weight:700;color:#475569;margin:0 0 2px}
    .field-section-label-with-add{display:flex;align-items:center;gap:6px;margin-bottom:4px}
    .btn-add-circle{width:20px;height:20px;padding:0;border-radius:50%;font-size:15px;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
    #new_weekly_fields{margin-bottom:8px}
    .field input:not([type="checkbox"]):not([type="radio"]),.field textarea{font:inherit;font-size:14px;border:1px solid #cbd5e1;border-radius:10px;padding:8px 12px;background:#fff;box-sizing:border-box;width:100%}
    .field input:not([type="checkbox"]):not([type="radio"]){min-height:42px}
    .field input::placeholder{color:#94a3b8}
    .input-with-prefix{display:flex;align-items:center;border:1px solid #cbd5e1;border-radius:10px;background:#fff;box-sizing:border-box;padding:0 0 0 12px}
    .input-with-prefix:focus-within{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
    .code-prefix-badge{font-weight:700}
    .input-with-prefix .code-prefix-badge{flex:0 0 auto;color:#475569;font-weight:700;user-select:none}
    .field .input-with-prefix input:not([type="checkbox"]):not([type="radio"]){flex:1;min-width:0;border:0;border-radius:0;padding:8px 12px 8px 6px;background:transparent;outline:none}
    .field-error{font-size:12px;color:#dc2626;line-height:1.35}
    .field-error:not(:empty){min-height:16px;margin-top:2px}
    .field-error-inline{font-size:12px;font-weight:700;color:#dc2626}
    .field input.input-error{border-color:#ef4444;box-shadow:0 0 0 2px rgba(239,68,68,.1)}
    .field input:not([type="checkbox"]):not([type="radio"]):focus,.field textarea:focus,.field select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
    .field input.input-error:focus{border-color:#ef4444;box-shadow:0 0 0 3px rgba(239,68,68,.15)}
    select,.select-field{font:inherit;width:100%;min-height:42px;border:1px solid #cbd5e1;border-radius:10px;background-color:#fff;color:#111827;font-size:14px;padding:8px 34px 8px 12px;line-height:1.3;box-sizing:border-box;appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,#94a3b8 50%),linear-gradient(135deg,#94a3b8 50%,transparent 50%);background-position:calc(100% - 16px) 52%,calc(100% - 11px) 52%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}
    textarea{min-height:64px;resize:vertical}
    button{border:0;border-radius:6px;padding:6px 9px;font-size:13px;font-weight:700;cursor:pointer;box-sizing:border-box}
    .btn-primary{background:#2563eb;color:#fff;border:1px solid #2563eb}.btn-light{background:#eaf1ff;color:#1d4ed8;border:1px solid #b6cdfa}.btn-secondary{background:#e2e8f0}.btn-mini{padding:5px 8px;font-size:13px}
    .quick-actions,.info-actions,.footer-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
    .search-actions-row{flex-wrap:nowrap}
    .search-actions-row button{flex:1;text-align:center}
    .hint,.tiny{font-size:12px;color:#64748b}
    .search-result-meta{display:flex;flex-wrap:wrap;gap:6px;font-size:13px;color:#475569;margin-top:2px}
    .search-result-meta span{position:relative;padding-right:8px}
    .search-result-meta span:not(:last-child)::after{content:'·';position:absolute;right:0;color:#cbd5e1}
    .search-result-profile-excerpt{font-size:12px;color:#94a3b8;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .loading,.error,.empty,.success-msg,.toast{border-radius:6px;padding:7px;font-size:12px;margin-top:5px}
    .loading{background:#f8fafc}.error{background:#fee2e2}.empty{background:#fff7ed}.success-msg{background:#dcfce7}.toast{background:#f1f5f9;color:#475569}
    .toast-emphasis{background:#dbeafe;color:#1d4ed8;font-weight:700;border:1px solid #93c5fd;padding:9px 7px}
    .warn{font-size:12px;color:#b45309}
    .section-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 4px}
    .section-header h3{margin:0;font-size:16px;font-weight:700;line-height:1.2}
    .basic-info-header{display:flex;flex-direction:column;align-items:stretch;gap:10px}
    .basic-info-header.basic-info-header-collapsed{flex-direction:row;align-items:center;justify-content:space-between;gap:8px;margin-bottom:0}
    .profile-secondary-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}
    .btn-history{background:#eef2ff;color:#4c5a76}
    .collapse-toggle-btn,.collapse-btn{display:inline-flex;align-items:center;justify-content:center;height:24px;padding:0 9px;border-radius:999px;border:1px solid #cbd5e1;background:#fff;color:#64748b;font-size:11px;font-weight:600;line-height:1;white-space:nowrap}
    .auto-match-tag{display:inline-flex;align-items:center;justify-content:center;min-height:20px;padding:1px 8px;border-radius:999px;font-size:11px;font-weight:700;line-height:1;background:#dcfce7;color:#15803d;border:0;transition:opacity .3s ease;white-space:nowrap}
    .inline-controls select{width:100px;max-width:110px;min-width:84px}
    .inline-controls .recent-toggle{display:flex;align-items:center;gap:4px;font-size:12px;color:#64748b;white-space:nowrap;flex-shrink:0;justify-self:end;margin-right:0}
    .info-filter-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:nowrap;overflow:visible;margin:0;padding:14px 0 6px}
    .info-filter-tools{display:inline-flex;align-items:center;gap:8px;justify-content:flex-end}
    .info-filter-row .section-title{flex:0 0 auto;margin:0}
    .info-filter-row .filter-select-compact{flex:0 0 auto;width:auto;min-width:66px;max-width:84px;min-height:26px;height:26px;padding:2px 18px 2px 8px;font-size:12px;line-height:1.2;border-radius:8px;border-color:#d7deea;background-color:#f8fafd;color:#4b5a72;background-position:calc(100% - 10px) 52%,calc(100% - 6px) 52%;background-size:4px 4px,4px 4px}
    .info-filter-row .recent-toggle-inline{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;width:auto;flex:0 0 auto;margin-left:2px;overflow:visible;font-size:12px;color:#64748b;line-height:1}
    .info-filter-row .recent-toggle-inline input[type="checkbox"]{width:16px;height:16px;min-width:16px;max-width:16px;flex:0 0 16px;margin:0;padding:0;box-sizing:border-box}
    .info-filter-row .recent-toggle-inline span{display:inline-block;white-space:nowrap}
    #info-list-toast{margin-top:4px}
    #infoSection{padding:0}
    #infoSection>.box{margin-top:8px}
    .sidebar-shell .box{border-radius:12px;margin-top:10px;padding:10px;border-color:#dfe7f3}
    .info-box{padding:10px;overflow:hidden}
    .info-box>.section-title{padding:0}
    .quick-inline{padding:2px 0 10px;margin-top:0}
    .sub-panel-title,.toolbar-label{display:flex;align-items:center;gap:7px;color:#4a5b73;font-weight:700}
    .sub-panel-title::before,.toolbar-label::before{content:"";width:3px;height:14px;border-radius:999px;background:#9bb2f5;display:inline-block}
    .compose-card{border:1px solid #dfe7f3;border-radius:12px;background:#fff;overflow:hidden;padding:0;transition:border-color .15s ease,box-shadow .15s ease}
    .compose-card:focus-within{border-color:#b8c8ea;box-shadow:0 0 0 2px rgba(37,99,235,.06)}
    .compose-title-input,.compose-body-textarea{box-sizing:border-box;display:block;width:100%;margin:0;border:0;outline:none;background:transparent;font:inherit;font-size:14px;line-height:1.45;color:#1f2933}
    .compose-title-input{min-height:38px;padding:0 11px;font-weight:500;color:#5d6e86}
    .compose-divider{height:1px;background:#edf1f7;margin:0 10px}
    .compose-body-textarea{min-height:62px;padding:8px 11px;resize:vertical;overflow-x:hidden;overflow-y:auto;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word}
    .save-row{margin-top:7px;display:flex;justify-content:flex-end}
    .save-row .btn-mini{padding:4px 10px;font-size:12px}
    .info-record+.info-record{border-top:1px solid #e5e7eb}
    .info-record{position:relative}
    .info-record-main{min-width:0;padding-left:0;margin-left:0}
    .info-head{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap;padding-left:0}
    .info-key{font-size:14px;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;min-width:0}
    .info-title-main{font-weight:700;color:#0f172a}
    .info-title-editor{color:#8b99af;font-weight:500;font-size:12px}
    .info-meta{font-size:12px;color:#94a3b8}
.info-value{font-size:14px;margin-top:3px;line-height:1.4;white-space:pre-wrap;word-break:break-word}
.value-linkify,.info-linkify{overflow-wrap:anywhere;word-break:break-word}
.auto-link{color:#2563eb;text-decoration:underline;overflow-wrap:anywhere;word-break:break-word}
    .info-entry-row{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:8px;align-items:end;padding:6px 0}
    .primary-editor-tag{font-size:11px;color:#64748b;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:999px;padding:1px 5px;font-weight:500}
    .info-entry-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px;width:92px;flex:0 0 92px;position:relative}
    .info-record-actions{position:relative;display:flex;flex-direction:column;align-items:flex-end;gap:6px;z-index:6;width:92px}
    .more-btn{width:92px;height:31px;display:inline-flex;align-items:center;justify-content:center;padding:0;background:#fff;color:#334155;border:1px solid #e2e8f0;border-radius:9px;line-height:1;font-size:13px;font-weight:500}
    .more-btn.is-active,.more-btn:hover{background:#f8fafc;color:#1f2937;border-color:#cbd5e1}
    .more-menu-panel{position:fixed;z-index:1200;width:80px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 8px 16px rgba(15,23,42,.10);padding:4px}
    .menu-item{display:block;width:100%;height:33px;text-align:left;background:#fff;color:#334155;border:0;border-radius:7px;padding:0 11px;font-size:13px;font-weight:500}
    .menu-item:hover{background:#f1f5f9}
    .menu-item.danger{color:#dc2626}
    .menu-item.danger:hover{background:#fef2f2}
    .info-entry-time{font-size:12px;color:#93a0b5;white-space:nowrap;text-align:right;line-height:1.2;width:92px;font-weight:500}
    .info-entry-time .edited-flag{color:#64748b}
    .staff-action-tag{font-size:11px;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:1px 5px;white-space:nowrap}
    .info-summary-card{padding:9px 10px}
    .info-summary-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
    .info-summary-title-wrap{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;background:none;border:0;padding:0;margin:0;color:inherit;text-align:left;min-width:0}
    .info-summary-title-wrap-button{cursor:pointer}
    .info-summary-title-wrap-static{cursor:default}
    .info-summary-title{font-size:14px;font-weight:700;color:#0f172a}
    .info-summary-author{font-size:12px;color:#8b99af;font-weight:500}
    .info-summary-badge{height:22px;padding:0 8px;border-radius:999px;border:1px solid #dbe4f2;background:#f8fbff;color:#5b6b85;font-size:11px;font-weight:500;cursor:pointer}
    .info-summary-body{display:block;width:100%;text-align:left;padding:0;margin-top:6px;background:none;border:0}
    .info-summary-body.is-expandable{cursor:pointer}
    .info-summary-body.is-static{cursor:default}
    .info-summary-body .info-value{margin-top:0;font-weight:400}
    .info-summary-body-collapsed .info-value{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5;color:#334155}
    .info-summary-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
    .info-summary-time{font-size:12px;color:#9aa7bc}
    .info-summary-actions{display:flex;align-items:center;gap:10px}
    .info-entry+.info-entry{border-top:1px solid #eef2f7;margin-top:8px;padding-top:8px}
    .text-link-action{background:none;border:0;padding:0;font-size:12px;color:#64748b;cursor:pointer}
    .text-link-danger{color:#c35d5d}
    .info-entry-actions-inline{display:flex;flex-direction:row;gap:10px;width:auto;align-items:center}
    .footer-links{margin:10px 2px 0}
    .footer-actions{font-size:11px;color:#94a3b8}
    .token-identity{font-size:11px;color:#94a3b8}
    .footer-workload-link{margin-left:auto}
    .token-hint-muted{font-size:11px;color:#94a3b8}
    .teacher-badge{display:inline-flex;align-items:center;justify-content:center;min-height:20px;padding:1px 8px;border-radius:999px;font-size:11px;font-weight:700;line-height:1;background:#FFF3CD;color:#8A6D1D;border:0}
    .head-left{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
    .head-back-link{display:inline-flex;align-items:center;justify-content:center;height:24px;padding:0 8px;border:1px solid #dbe4f2;border-radius:999px;background:#f8fbff;color:#607089;font-size:12px;font-weight:600;line-height:1;text-decoration:none}
    .head-back-link:hover{background:#f1f5ff;color:#4f5f79}
    .head-right{flex-shrink:0}
    .weak-note{font-size:11px;color:#94a3b8}
    .head-right .btn-secondary{background:#f8fafc;color:#7b8794;border:1px solid #e2e8f0}
    .head-right .btn-mini{padding:3px 6px;font-size:11px}
    .new-student-section{margin-top:0;padding:0;border:0;background:transparent;box-shadow:none}
    .new-student-form{padding:0;border:0;background:transparent;box-shadow:none}
    .new-student-info-list{margin-top:2px}
    .new-student-info-item{padding:8px 0;border-top:1px solid #edf1f7;border-radius:0;background:transparent}
    .new-student-info-item:first-child{border-top:0}
    .new-info-row{display:flex;flex-direction:column;gap:6px}
    .field-hint-sub{margin-top:6px;margin-bottom:20px}
    .dual-field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
    .new-info-card{border:1px solid #cbd7e8;border-radius:12px;background:#fff;overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}
    .new-info-card:focus-within{border-color:#9eb7f7;box-shadow:0 0 0 3px rgba(37,99,235,.08)}
    .new-info-input,.new-info-textarea{box-sizing:border-box;display:block;width:100%;margin:0;border:0 !important;outline:none;background:transparent;font:inherit;font-size:14px;line-height:1.45;color:#1f2933}
    .new-info-header{display:flex;align-items:center}
    .new-info-header .new-info-input{flex:1;min-width:0}
    .new-info-input{min-height:44px;padding:0 12px;font-weight:400;color:#516174}
    .new-info-delete-btn{flex:0 0 auto;background:transparent;border:0;border-left:1px solid #edf1f7;color:#94a3b8;font-size:12px;padding:0 10px;min-height:44px;cursor:pointer}
    .new-info-delete-btn:hover{color:#dc2626}
    .new-info-divider{height:1px;background:#edf1f7;margin:0 10px}
    .new-info-textarea{min-height:82px;padding:10px 12px;resize:vertical;overflow-x:hidden;overflow-y:auto;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word}
    .info-form-actions{margin-top:4px}
    .info-edit-actions{width:72px}
    .new-info-row .btn-mini{padding:3px 7px;font-size:12px}
    .tiny-link{font-size:11px;color:#64748b;text-decoration:none}
    .is-hidden{display:none}
    .value-prewrap{white-space:pre-wrap}
    .section-title-sub{font-size:14px;margin:6px 0}

    .history-box{background:#eef4fb;border:1px solid #d7e3f2;border-radius:18px;padding:16px 14px}
    .history-box .hint{font-weight:500;color:#697790}
    .section-title-compact{font-size:14px;margin:0 0 4px}
    .field-top-gap{margin-top:6px}
    .duplicate-hint{display:flex;gap:10px;align-items:flex-start;background:#f8fafc;border:1px solid #d8e7ff;border-radius:15px;padding:15px 16px;margin:4px 0 8px}
    .duplicate-hint-icon{width:22px;height:22px;min-width:22px;color:#4f78b8}
    .duplicate-hint-title{font-size:14px;font-weight:700;margin:0;color:#1e3a5f}
    .duplicate-hint-body{font-size:13px;color:#52627a;margin:4px 0 10px;line-height:1.45}
    .duplicate-hint-actions{display:flex;flex-wrap:wrap;gap:8px}
    .duplicate-hint-actions .btn-mini{height:38px;padding:0 14px;border-radius:11px;font-size:14px}
    .btn-outline{background:#fff;color:#334155;border:1px solid #cbd5e1;box-shadow:0 1px 2px rgba(15,23,42,.05)}
    .btn-ghost{background:transparent;color:#64748b;border:1px solid transparent}

.history-item{background:#fff;border:1px solid #dce5ef;border-radius:13px;padding:13px 12px 14px;box-shadow:0 2px 6px rgba(23,32,51,.04)}
.history-meta{margin-bottom:12px;font-size:12.5px;line-height:1.45;font-weight:400;color:#8a96a8;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.history-main{margin-top:6px;font-size:14px;line-height:1.5;color:#0f172a;font-weight:400;white-space:pre-wrap;word-break:break-word}
.history-changes{margin-top:7px;display:flex;flex-direction:column;gap:5px}
.value-block{display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:8px;align-items:start;margin-top:8px}
.value-block:first-child{margin-top:0}
.value-badge{display:inline-flex;align-items:center;justify-content:center;height:20px;padding:0 8px;border-radius:999px;font-size:11.5px;font-weight:700;line-height:1}
.history-content{color:#172033;font-size:15.5px;line-height:1.6;font-weight:400;white-space:pre-wrap;word-break:break-word}
.history-old{color:#94a3b8;font-weight:400;text-decoration:line-through}
.history-new{color:#0f172a;font-weight:400;text-decoration:none}
.history-content-text,.history-content-after{color:#172033;font-size:15.5px;font-weight:400;text-decoration:none}
.history-content-deleted,.history-content-before,.inline-old{color:#9aa6b6;font-size:15.5px;font-weight:400;text-decoration:line-through}
.history-content-separator{color:#3b6fe3;font-weight:600;margin:0 6px}
.history-inline-diff,.inline-edit{display:inline-flex;align-items:baseline;flex-wrap:wrap}
.history-inline-diff .history-content-separator{margin:0 6px}
.history-inline-tag{display:inline-flex;align-items:center;height:20px;padding:0 6px;border-radius:999px;font-size:11.5px;font-weight:700;margin-left:6px;white-space:nowrap;flex:0 0 auto;background:#ecfdf3;color:#3e8c5b}
.history-focus{animation:historyFlash 1s ease}
@keyframes historyFlash{
  0%{box-shadow:0 0 0 0 rgba(59,130,246,.45);background:#eaf3ff}
  100%{box-shadow:0 0 0 0 rgba(59,130,246,0);background:#eef2fa}
}

.history-box .section-title{font-size:22px;font-weight:700;color:#172033;margin:0}
@media (max-width:420px){.dual-field-row{gap:8px}}
.history-header-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.history-header-row.history-header-row-collapsed{margin:0;align-items:center}
.info-box.info-box-collapsed{padding-top:10px;padding-bottom:10px}
.history-main{margin-top:0;color:#172033;font-size:15.5px}
.history-inline-diff,.inline-edit{display:inline-flex;align-items:baseline;flex-wrap:wrap}

.history-inline-tag-delete{background:#fef2f2;color:#d66363}
.value-badge-add{background:#ecfdf3;color:#3e8c5b}
.value-badge-neutral{background:#f1f5f9;color:#8a96a8}

.history-row{display:grid;grid-template-columns:72px 1fr;column-gap:10px;align-items:baseline;margin-top:8px;font-size:15.5px;line-height:1.55}
.history-row:first-child{margin-top:0}
.history-row-long{align-items:start}
.history-row-long .row-label{padding-top:0}
.row-label{color:#8a96a8;font-size:13.5px;font-weight:500;white-space:nowrap}
.history-value{color:#172033;font-size:15.5px;font-weight:400;word-break:break-word}
.tag{display:inline-flex;align-items:center;justify-content:center;height:20px;min-width:auto;width:auto;padding:0 6px;border-radius:999px;font-size:11.5px;line-height:1;font-weight:700;white-space:nowrap;flex:0 0 auto}
.inline-tag{margin-left:6px;vertical-align:baseline}
.tag-add{background:#ecfdf3;color:#3e8c5b}
.tag-delete{background:#fef2f2;color:#d66363}

.history-meta *{font-weight:400}
.history-action-tag,.tag{display:inline-flex;align-items:center;justify-content:center;height:20px;width:auto;min-width:auto;padding:0 6px;border-radius:999px;font-size:11.5px;line-height:1;font-weight:700;white-space:nowrap;flex:0 0 auto}
.history-action-tag.is-add,.tag-add{background:#ecfdf3;color:#3e8c5b}
.history-action-tag.is-delete,.tag-delete{background:#fef2f2;color:#d66363}
.history-action-tag.is-edit,.tag-edit,.tag-neutral{background:#f1f5f9;color:#8a96a8}
.inline-edit{color:#172033;font-size:15.5px;line-height:1.6;font-weight:400;white-space:pre-wrap;word-break:break-word}
.inline-old{color:#9aa6b6;text-decoration:line-through;text-decoration-thickness:1.35px;text-decoration-color:#9aa6b6;font-weight:400}
.inline-arrow{display:inline-block;margin:0 6px;color:#3b6fe3;font-weight:600}
.inline-new{color:#172033;font-weight:400}

.card-period-tag{margin-left:8px;font-size:12px;font-weight:600;}
.card-period-focus{color:#dc2626;}
.card-period-stable{color:#2563eb;}

.card-period-expired{color:#6b7280;}
.tag-list{display:flex;flex-wrap:wrap;gap:6px}
.type-tag{display:inline-flex;padding:2px 8px;border-radius:999px;background:#eef5ff;color:#1f3a66;font-size:12px;line-height:1.4;border:1px solid #cfe0ff}
.profile-student-types-section{padding:8px 0;border-bottom:1px solid #f1f5f9}
.profile-student-types-title{font-size:13px;color:#7b8794;font-weight:400;margin-bottom:6px}
.profile-student-types-body{display:block}
.student-type-block{display:flex;flex-direction:column;gap:8px}
.student-type-group{display:grid;grid-template-columns:72px minmax(0,1fr);gap:4px;align-items:start}
.student-type-group-label{font-size:13px;font-weight:400;color:#64748b;line-height:1.4;word-break:break-word}
.student-type-group-chips{display:flex;flex-wrap:wrap;gap:6px}
.student-chip{display:inline-flex;align-items:center;padding:1px 8px;border-radius:999px;font-size:12px;font-weight:400;line-height:1.35;border:1px solid transparent}
.student-chip-ability{background:#eff6ff;border-color:#dbeafe;color:#30507f}
.student-chip-risk{background:#fff7ed;border-color:#fed7aa;color:#8a4b16}
.student-chip-service{background:#f5f3ff;border-color:#ddd6fe;color:#5b4ca6}
.student-chip-red{background:#fee2e2;border-color:#fecaca;color:#991b1b}
.student-chip-yellow{background:#fef9c3;border-color:#fde68a;color:#854d0e}
.student-chip-green{background:#dcfce7;border-color:#bbf7d0;color:#166534}
#profileBox .basic-info-row{display:grid;grid-template-columns:96px minmax(0,1fr);column-gap:12px;align-items:start}
#profileBox .basic-info-row>.value{min-width:0;justify-self:stretch;text-align:left}
#profileBox .student-type-group{display:grid;grid-template-columns:96px minmax(0,1fr);column-gap:12px;align-items:start}
#profileBox .student-type-group-chips{justify-content:flex-start;align-items:flex-start}
#profileBox .student-chip{white-space:nowrap;word-break:keep-all}
#profileBox .student-chip-risk{white-space:normal;overflow-wrap:break-word;word-break:normal;max-width:100%}
@media (max-width:260px){
  #profileBox .basic-info-row-profile,#profileBox .basic-info-row-note{grid-template-columns:1fr}
  #profileBox .student-type-group{grid-template-columns:1fr}
  #profileBox .profile-student-types-title,#profileBox .student-type-group-label{margin-bottom:4px}
  .info-filter-row{align-items:flex-start}
  .info-filter-tools{width:100%;justify-content:flex-start}
}
@media (max-width:220px){
  #profileBox .basic-info-row{grid-template-columns:1fr}
  #profileBox .student-type-group{grid-template-columns:1fr}
  #profileBox .student-type-group-chips{justify-content:flex-start}
}
.card-type-chip{display:inline-flex;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:400;background:#f1f5f9;color:#475569;border:1px solid #e2e8f0}
.student-type-segment,.student-type-checks{display:flex;flex-wrap:wrap;gap:6px}
.segment-option,.chip-check{display:inline-flex;align-items:center;gap:4px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:3px 8px;font-size:13px;color:#475569}
.segment-option input,.chip-check input{margin:0}
.chip-segment-row{display:flex;flex-wrap:nowrap;align-items:center;gap:0;max-width:100%;width:100%}
.chip-segment-btn{position:relative;display:flex;flex:1;align-items:center;justify-content:center;background:transparent;border:0;color:#94a3b8;font-weight:400;border-radius:0;padding:6px 4px;font-size:14px;line-height:1.2;white-space:nowrap;min-width:0}
.chip-segment-btn:first-child{padding-left:4px}
.chip-segment-btn:not(:last-child)::after{content:'·';position:absolute;right:-1px;top:50%;transform:translate(50%,-50%);color:#c3cddc;font-size:14px;pointer-events:none}
.chip-segment-btn.is-active{background:transparent;color:#1d4ed8;font-weight:600}
.search-study-stage-field .chip-segment-row{margin-top:2px}
.student-scale-row{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:8px;margin:4px 0}
.student-scale-label{font-size:13px;color:#475569;font-weight:400;line-height:1.35}
.student-type-subtitle{font-size:13px;color:#475569;font-weight:500;margin:8px 0 6px}
@media (max-width:390px){.student-type-group{grid-template-columns:64px minmax(0,1fr)}}

.profile-preview-dot-sep{display:inline-block;width:23px;text-align:center;color:#b0b7c3;font-weight:500}
.profile-value{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.profile-body{display:block;background:transparent;border:0;padding:0;margin:0}
.ellipsis-hint{color:#c0c8d6;font-size:12px;line-height:1.3;font-weight:400}
.profile-main-line{font-size:14px;line-height:1.55;color:#1f2937;white-space:pre-wrap;word-break:break-word}
.line-no{display:inline-block;min-width:16px;margin-right:6px;color:#8fa0b5;font-weight:400}
.profile-preview-toggle{padding:0;margin-top:2px}

.profile-preview-bullet-line{position:relative;display:block;padding-left:0;margin:1px 0}
.profile-preview-bullet{position:absolute;left:-12px;top:0;color:#98a2b3;line-height:1.55}
.profile-preview-text{display:block;color:#1f2937;white-space:pre-wrap;word-break:break-word;line-height:1.55}

.profile-full-line{line-height:1.55;margin:1px 0;word-break:break-word}
.profile-full-label{color:#3730a3;font-weight:600;margin-right:0px;white-space:nowrap}
.profile-full-text{color:#1f2937}

.info-filter-row{
  flex-wrap:wrap;
  gap:8px;
}

.info-filter-tools{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
}

.recent-toggle-inline{
  flex:0 0 auto;
  white-space:nowrap;
}


/* Sidebar responsive UI polish: header, long labels, compact card toolbars */

/* 1) 顶部学员 header：让姓名 / 学号 / 老师标签更紧凑，刷新按钮靠右 */
.student-head{
  align-items:flex-start;
  gap:8px 10px;
}

.student-head .head-left{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px 8px;
}

.student-head .student-name{
  flex:0 1 auto;
  min-width:0;
}

.student-head .student-code{
  flex:0 0 auto;
}

.student-head .teacher-pill{
  flex:0 0 auto;
}

.student-head .head-right{
  margin-left:auto;
  flex:0 0 auto;
}

/* 2) 基础信息里的长 label：风险点和服务预期在窄宽度下更自然断行 */
#profileBox .basic-info-row .label,
#profileBox .student-type-group-label{
  line-height:1.28;
  word-break:keep-all;
  overflow-wrap:normal;
}

@media (max-width:320px){
  #profileBox .student-type-group-label{
    max-width:72px;
  }
}

/* Structured student header: [back] [student meta] [refresh] */
.student-head.student-head-structured{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  column-gap:8px;
  row-gap:6px;
}

.student-head.student-head-structured .head-nav{
  grid-column:1;
  min-width:0;
}

.student-head.student-head-structured .head-main{
  grid-column:2;
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  gap:4px 8px;
}

.student-head.student-head-structured .head-actions{
  grid-column:3;
  justify-self:end;
  margin-left:0;
  min-width:0;
}

.student-head.student-head-structured .student-name{
  flex:0 1 auto;
  min-width:0;
}

.student-head.student-head-structured .student-code,
.student-head.student-head-structured .student-code-previous,
.student-head.student-head-structured .teacher-badge,
.student-head.student-head-structured .auto-match-tag{
  flex:0 0 auto;
}

.student-head.student-head-structured .student-code-previous{
  color:#8a94a6;
  font-size:12px;
  flex-basis:100%;
}

/* When the middle group cannot comfortably fit, keep back/refresh on row 1 and move student meta to row 2 */
@media (max-width:280px){
  .student-head.student-head-structured{
    grid-template-columns:1fr auto;
  }

  .student-head.student-head-structured .head-nav{
    grid-column:1;
    grid-row:1;
    justify-self:start;
  }

  .student-head.student-head-structured .head-actions{
    grid-column:2;
    grid-row:1;
    justify-self:end;
  }

  .student-head.student-head-structured .head-main{
    grid-column:1 / -1;
    grid-row:2;
    justify-self:start;
  }
}

#profileBox .basic-info-code-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 8px;
  margin:6px 0 10px;
}

#profileBox .basic-info-code-row-with-collapse{
  justify-content:space-between;
}

#profileBox .basic-info-code-collapse{
  margin-left:auto;
  display:flex;
  align-items:center;
}

#profileBox .basic-info-code-value{
  font-weight:700;
  font-size:15px;
  color:#1f2933;
}

#profileBox .code-previous-pill{
  display:inline-flex;
  align-items:center;
  padding:2px 10px;
  border-radius:999px;
  background:#eef2ee;
  border:none;
  color:#5f7d68;
  font-weight:400;
  font-size:12px;
  white-space:nowrap;
}

/* Keep short basic info rows in two columns until extremely narrow widths */
@media (max-width:220px){
  #profileBox .basic-info-row.basic-info-row-normal{
    grid-template-columns:64px minmax(0,1fr);
    column-gap:8px;
  }

  #profileBox .basic-info-row.basic-info-row-normal > .label{
    white-space:nowrap;
  }

  #profileBox .basic-info-row.basic-info-row-normal > .value{
    min-width:0;
  }
}

/* Only at ultra-narrow widths do short normal rows fall back to vertical flow */
@media (max-width:170px){
  #profileBox .basic-info-row.basic-info-row-normal{
    grid-template-columns:1fr;
  }

  #profileBox .basic-info-row.basic-info-row-normal > .label,
  #profileBox .basic-info-row.basic-info-row-normal > .value{
    justify-self:start;
  }
}

/* Refine basic info value width and annual date alignment */

/* 基础信息：压缩 label 列，让右侧展示区更宽 */
#profileBox .basic-info-row{
  grid-template-columns:78px minmax(0,1fr);
  column-gap:10px;
}

#profileBox .student-type-group{
  grid-template-columns:78px minmax(0,1fr);
  column-gap:10px;
}

/* 中等窄屏仍保持更宽 value 区 */
@media (max-width:420px){
  #profileBox .basic-info-row{
    grid-template-columns:72px minmax(0,1fr);
    column-gap:8px;
  }

  #profileBox .student-type-group{
    grid-template-columns:72px minmax(0,1fr);
    column-gap:8px;
  }
}

/* Student type chips: use vertical group flow in narrow profile cards */
@media (max-width:280px){
  #profileBox .profile-student-types-section{
    padding-top:10px;
  }

  #profileBox .student-type-block{
    display:flex;
    flex-direction:column;
    gap:12px;
  }

  #profileBox .student-type-group,
  #profileBox .student-type-risk-row,
  #profileBox .student-type-secondary-inline{
    display:grid;
    grid-template-columns:1fr !important;
    row-gap:6px;
  }

  #profileBox .student-type-group-label,
  #profileBox .student-type-secondary-inline .student-type-group-label{
    display:block !important;
    visibility:visible !important;
    max-width:none;
    line-height:1.35;
  }

  #profileBox .student-type-secondary-inline .student-type-group-label{
    display:none !important;
  }

  #profileBox .student-type-group-chips{
    display:flex;
    flex-wrap:wrap;
    align-items:flex-start;
    justify-content:flex-start;
    gap:6px;
    min-width:0;
    width:100%;
  }

  #profileBox .student-chip{
    max-width:100%;
    white-space:nowrap;
    word-break:keep-all;
  }

  #profileBox .student-chip-risk{
    max-width:100%;
    white-space:normal;
    overflow-wrap:break-word;
    word-break:normal;
    line-height:1.45;
    border-radius:12px;
    padding:5px 10px;
  }
}

/* Very narrow: make long risk chips consume full readable width */
@media (max-width:220px){
  #profileBox .student-type-risk-row .student-chip-risk{
    width:100%;
    justify-content:flex-start;
  }

  #profileBox .student-type-risk-row .student-chip-risk:not(:has(+ .student-chip-risk)){
    width:auto;
  }
}

/* In vertical student-type layout, risk label should be a single full-width title */
@media (max-width:280px){
  #profileBox .student-type-risk-row .student-type-group-label br{
    display:none;
  }

  #profileBox .student-type-risk-row .student-type-group-label{
    white-space:nowrap;
  }
}

/* Info section: collapse button lives on add-info title row */
.info-add-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.info-add-title-row .collapse-toggle-btn{
  flex:0 0 auto;
  margin-left:auto;
}

/* Info card expand/collapse badge should never split into two lines */
.info-summary-badge{
  white-space:nowrap;
  word-break:keep-all;
  min-width:max-content;
  flex:0 0 auto;
}

.info-summary-header{
  display:flex;
  align-items:flex-start;
  gap:8px;
}

.info-summary-title-wrap{
  min-width:0;
  flex:1 1 auto;
}

/* Profile preview should use the same full-width flow as student type sections on narrow cards */
@media (max-width:280px){
  #profileBox .basic-info-row:has(.profile-value),
  #profileBox .row:has(.profile-value){
    grid-template-columns:1fr !important;
    row-gap:6px;
  }

  #profileBox .basic-info-row:has(.profile-value) > .label,
  #profileBox .row:has(.profile-value) > .label{
    justify-self:start;
    width:100%;
    white-space:nowrap;
  }

  #profileBox .profile-value{
    width:100%;
    max-width:100%;
    justify-self:stretch;
    text-align:left;
  }

  #profileBox .profile-body,
  #profileBox .profile-main-line,
  #profileBox .profile-preview-toggle{
    text-align:left;
  }
}

/* Profile preview/full text cleanup */
#profileBox .ellipsis-hint{
  display:none !important;
}

#profileBox .profile-full-label{
  display:none !important;
}

#profileBox .profile-full-text{
  color:#1f2937;
  font-weight:500;
}

#profileBox .profile-full-line{
  color:#1f2937;
  line-height:1.55;
}

/* Profile body/full profile should visually match normal basic info values */
#profileBox .profile-body,
#profileBox .profile-body *,
#profileBox .profile-main-line,
#profileBox .profile-main-line *,
#profileBox .profile-full-line,
#profileBox .profile-full-line *,
#profileBox .profile-full-text{
  font-size:14px !important;
  font-weight:400 !important;
  line-height:1.45;
  color:#1f2937;
}

/* Hide generated separator dots inside profile preview after DB separator normalization */
#profileBox .profile-separator-dot{
  display:none !important;
}

/* === FINAL SIDEBAR RESPONSIVE OVERRIDE START === */

/* 1) 顶部学员 header
   宽度足够：
   [返回] [姓名 编号 老师] [刷新]

   宽度不足：
   [返回]              [刷新]
   [姓名 编号 老师]
*/
@media (max-width:420px){
  .student-head.student-head-structured{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    grid-template-areas:"nav main actions";
    align-items:center;
    column-gap:8px;
    row-gap:6px;
    margin-bottom:8px;
  }

  .student-head.student-head-structured .head-nav{
    grid-area:nav;
    justify-self:start;
  }

  .student-head.student-head-structured .head-main{
    grid-area:main;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex-wrap:nowrap;
    gap:8px;
    min-width:0;
    max-width:100%;
    overflow:hidden;
    padding-left:0;
  }

  .student-head.student-head-structured .head-actions,
  .student-head.student-head-structured .head-right{
    grid-area:actions;
    justify-self:end;
    position:relative;
    z-index:2;
  }

  .student-head.student-head-structured .student-name,
  .student-head.student-head-structured .student-code,
  .student-head.student-head-structured .teacher-badge,
  .student-head.student-head-structured .auto-match-tag{
    flex:0 0 auto;
    white-space:nowrap;
  }
}

/* ≤330px：身份 header 下移 */
@media (max-width:330px){
  .student-head.student-head-structured{
    grid-template-columns:auto 1fr auto;
    grid-template-areas:
      "nav spacer actions"
      "main main main";
  }

  .student-head.student-head-structured .head-main{
    overflow:visible;
    flex-wrap:wrap;
    row-gap:4px;
  }
}

/* 2) 基础信息 header：左组（编辑操作）/ 右组（历史 + 收起）
   宽：[编辑资料][升级年卡]          [查看历史][收起]
   窄（≤330px）：
        [编辑资料][升级年卡]
                      [查看历史][收起]
*/
#profileBox .basic-info-header:not(.basic-info-header-collapsed){
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

#profileBox .basic-head-left{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex:1 1 auto;
}

#profileBox .basic-head-right{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex:0 0 auto;
}

#profileBox .basic-head-left:empty,
#profileBox .basic-head-right:empty{
  display:none;
}

/* ≤330px：右组换行 → 独占一行并右对齐 */
@media (max-width:330px){
  #profileBox .basic-info-header:not(.basic-info-header-collapsed){
    flex-wrap:wrap;
  }
  #profileBox .basic-head-right{
    flex:1 1 100%;
    justify-content:flex-end;
  }
}

/* 3) 基础信息字段：短字段双列，可选模块由 lowerBlocks 统一分隔
   结构原则：
   - 普通字段直接连续展示；
   - 学员档案 / 学员标签 / 产品建议 / 备注 属于 lowerBlocks；
   - lowerBlocks 使用 column flex + gap 控制垂直节奏；
   - .basic-info-divider 只负责画线，不再自带 margin，避免模块省略后出现双线/跳位。
*/
#profileBox .basic-info-row{
  grid-template-columns:58px minmax(0,1fr);
  column-gap:6px;
}

#profileBox .basic-info-row > .label,
#profileBox .student-type-group-label,
#profileBox .profile-student-types-title{
  color:#64748b;
  font-weight:600;
}

#profileBox .basic-info-row > .value{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

/* lowerBlocks 是唯一负责可选模块垂直节奏的容器 */
#profileBox .basic-info-lower-blocks{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:0;
  padding:0;
  border:0;
}

/* 可选模块本身不画线、不自带上下 margin，避免和 divider 叠加 */
#profileBox .basic-info-block,
#profileBox .basic-info-row-profile,
#profileBox .basic-info-row-note,
#profileBox .profile-student-types-section{
  border-top:0;
  border-bottom:0;
}

#profileBox .basic-info-block{
  margin:0;
  padding:0;
}

/* divider 只画线；上下留白交给 lowerBlocks gap */
#profileBox .basic-info-divider{
  flex:0 0 1px;
  height:1px;
  min-height:1px;
  background:#eef2f7;
  margin:0;
  padding:0;
  border:0;
}

/* 备注正文保持正常换行 */
#profileBox .basic-info-row-note > .value{
  white-space:pre-wrap;
  overflow-wrap:break-word;
  word-break:normal;
}

/* ≤330px：长文本字段堆叠（置于基准规则之后，确保级联顺序正确） */
@media (max-width:330px){
  #profileBox .basic-info-row-note,
  #profileBox .basic-info-row-stackable{
    grid-template-columns:1fr;
    row-gap:6px;
  }

  #profileBox .basic-info-row-note > .label,
  #profileBox .basic-info-row-note > .value,
  #profileBox .basic-info-row-stackable > .label,
  #profileBox .basic-info-row-stackable > .value{
    grid-column:1;
  }

  #profileBox .basic-info-row-note > .value,
  #profileBox .basic-info-row-stackable > .value{
    width:100%;
    max-width:100%;
  }
}

/* 极窄时普通短字段再退回单列 */
@media (max-width:190px){
  #profileBox .basic-info-row.basic-info-row-normal{
    grid-template-columns:1fr;
  }
}

/* 4) 学员档案：正文与展开/收起操作左对齐，不加装饰竖线
   规则：
   - 横向分割线仍由 .basic-info-divider 统一管理。
*/
#profileBox .basic-info-row-profile > .value,
#profileBox .profile-value{
  min-width:0;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding-left:0;
  border-left:0;
}

#profileBox .profile-body{
  margin:0;
  padding-left:0;
  border-left:0;
  box-sizing:border-box;
  min-width:0;
  width:100%;
  max-width:100%;
}

/* 防止展开态内部再叠第二条线 */
#profileBox .profile-value,
#profileBox .basic-info-row-profile > .value{
  border-left:0;
}

#profileBox .profile-main-line,
#profileBox .profile-full-line,
#profileBox .profile-full-text{
  font-size:14px;
  font-weight:400;
  line-height:1.55;
  color:#1f2937;
  max-width:100%;
  overflow-wrap:break-word;
  word-break:normal;
}

#profileBox .profile-main-line *,
#profileBox .profile-full-line *,
#profileBox .profile-full-text *{
  font-size:inherit;
  font-weight:inherit;
  line-height:inherit;
  color:inherit;
}

#profileBox .profile-main-line + .profile-main-line,
#profileBox .profile-full-line + .profile-full-line{
  margin-top:3px;
}

/* 展开/收起档案：独立操作，放在 rail 外 */
#profileBox .profile-preview-toggle{
  display:inline-flex;
  align-items:center;
  margin-top:8px;
  margin-left:0;
  padding:0;
  font-size:12.5px;
  font-weight:400;
  line-height:1.4;
  color:#94a3b8;
  background:transparent;
  border:0;
  text-decoration:none;
  cursor:pointer;
}

#profileBox .profile-preview-toggle:hover{
  color:#64748b;
}

/* 5) 学员情况 / 风险点：父级统一 grid，所有 chips 共用同一内容列
   结构原则：
   - 学员情况第一组、第二组、风险点都进入同一个父级 grid；
   - 普通 chip 和短风险 chip 使用同一套高度；
   - 长风险 chip 使用圆角矩形，不出框；
   - 风险点为空时由渲染层不输出整项。
*/
#profileBox .profile-student-types-section,
#profileBox .profile-student-types-body{
  min-width:0;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
#profileBox .profile-student-types-section,
#profileBox .profile-student-types-body{
  margin:0;
  padding:0;
}

#profileBox .student-type-block{
  display:grid;
  grid-template-columns:58px minmax(0,1fr);
  column-gap:6px;
  row-gap:10px;
  align-items:start;
  min-width:0;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}

#profileBox .student-type-group,
#profileBox .student-type-secondary-inline,
#profileBox .student-type-risk-row{
  display:contents;
}

#profileBox .student-type-group-label{
  grid-column:1;
  min-width:0;
  max-width:58px;
  color:#64748b;
  font-weight:600;
  line-height:1.35;
  box-sizing:border-box;
}

#profileBox .student-type-secondary-inline .student-type-group-label{
  display:block;
  visibility:hidden;
  width:58px;
  min-width:58px;
  max-width:58px;
  margin:0;
  padding:0;
}

#profileBox .student-type-group-chips{
  grid-column:2;
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:flex-start;
  align-content:flex-start;
  column-gap:6px;
  row-gap:10px;
  min-width:0;
  width:100%;
  max-width:100%;
  padding:0;
  margin:0;
  box-sizing:border-box;
}

/* 统一 chip 基础规格：学员情况 chip 和短风险 chip 高度一致 */
#profileBox .student-chip,
#profileBox .student-type-risk-row .student-chip-risk-short{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  max-width:100%;
  box-sizing:border-box;
  padding:3px 10px;
  line-height:1.25;
  border-radius:999px;
  white-space:nowrap;
  word-break:keep-all;
}

/* status-dot 和普通 chip 使用同一高度，只额外保留圆点间距 */
#profileBox .student-chip-status-dot{
  min-height:28px;
  padding-top:3px;
  padding-bottom:3px;
  line-height:1.25;
}

/* 风险点基础色彩仍走风险体系 */
#profileBox .student-type-risk-row .student-chip-risk{
  box-sizing:border-box;
  max-width:100%;
  color:#8a531f;
}

/* 长风险点：圆角矩形，允许多行，不撑出右边框 */
#profileBox .student-type-risk-row .student-chip-risk-long{
  display:inline-flex;
  align-items:flex-start;
  justify-content:flex-start;
  width:100%;
  max-width:100%;
  min-height:0;
  padding:7px 10px;
  line-height:1.45;
  border-radius:12px;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* 280 以下：label 和内容改为纵向，充分利用宽度 */
@media (max-width:280px){
  #profileBox .student-type-block{
    grid-template-columns:1fr;
    row-gap:6px;
  }

  #profileBox .student-type-group,
  #profileBox .student-type-secondary-inline,
  #profileBox .student-type-risk-row{
    display:grid;
    grid-template-columns:1fr;
    row-gap:6px;
  }

  #profileBox .student-type-group-label{
    grid-column:1;
    display:block;
    visibility:visible;
    width:auto;
    min-width:0;
    max-width:none;
    line-height:1.35;
  }

  #profileBox .student-type-secondary-inline .student-type-group-label{
    display:none;
  }

  #profileBox .student-type-group-chips{
    grid-column:1;
    width:100%;
    max-width:100%;
    padding:0;
    margin:0;
  }

  #profileBox .student-type-risk-row .student-type-group-label br{
    display:none;
  }

  #profileBox .student-type-risk-row .student-type-group-label{
    white-space:nowrap;
  }
}

/* 220 以下：长风险点仍占满整行，短风险点保持胶囊 */
@media (max-width:220px){
  #profileBox .student-type-risk-row .student-chip-risk-long{
    width:100%;
  }
}

/* 8) 信息点：新增信息点和收起按钮同一行 */
.info-add-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.info-add-title-row .collapse-toggle-btn{
  flex:0 0 auto;
  margin-left:auto;
}

/* 9) 信息点卡片按钮不拆行 */
.info-summary-badge,
.info-summary-card [data-action="toggle-info-summary"],
.info-summary-card .collapse-toggle-btn{
  white-space:nowrap;
  min-width:max-content;
}

/* === FINAL SIDEBAR RESPONSIVE OVERRIDE END === */

/* ── 宽屏布局（≥900px）─────────────────────────────────────────────
   sidebar 原本只为企微侧边栏那种窄容器设计：.page 上有一条 max-width:430px
   的硬上限，1440px 视口下内容只占 31% 屏宽，两侧各留白 497px。现在要让同一套
   编辑界面同时承接宽屏录入（取代 admin.html），所以在宽屏下放开上限并改双列。

   为什么门槛定在 900px：student-list.html 用的就是 900px 断点，保持一致；
   而且 900px 以下双列会把每列压到 400px 出头，比单列更难填。

   窄屏（<900px）完全不受影响——这一整段都在 min-width 里，企微侧边栏那条
   路径的渲染结果和改动前逐像素一致。 */
@media (min-width:900px){
  .page{max-width:1080px}

  /* 资料编辑区改双列。#profileBox 里除了字段还有标题、编号块、脏数据提示、
     操作按钮，这些都必须整行——所以规则是「默认整行，只有 .field 进两列」，
     而不是反过来枚举要整行的元素（那样以后新增元素会默默错位）。 */
  #profileBox{display:grid;grid-template-columns:1fr 1fr;gap:0 20px;align-items:start}
  #profileBox>*{grid-column:1/-1}
  #profileBox>.field{grid-column:auto}
  /* 长文本（学员档案、备注、产品建议）和标签多选整行，短字段才双列 */
  #profileBox>.field-longtext{grid-column:1/-1}

  /* 新增表单同样处理：它的字段直接挂在 .new-student-form 下 */
  .new-student-form{display:grid;grid-template-columns:1fr 1fr;gap:0 20px;align-items:start}
  .new-student-form>*{grid-column:1/-1}
  .new-student-form>.field{grid-column:auto}
  .new-student-form>.field-longtext{grid-column:1/-1}

  /* 单个输入框不要被拉到整行那么宽——1000px 宽的电话号码框没有意义 */
  .field input:not([type="checkbox"]):not([type="radio"]),
  .field select{max-width:520px}
}
.browser-open-bar{padding:0 0 8px}
.browser-open-link{display:block;text-align:center;padding:9px 16px;background:#eff6ff;border:1.5px solid #bfdbfe;border-radius:10px;color:#1d4ed8;font-size:13px;font-weight:600;text-decoration:none;line-height:1.4}
.browser-open-link:hover{background:#dbeafe;border-color:#93c5fd}
.browser-open-link:active{background:#bfdbfe}

/* 认证错误重试按钮 */
.auth-retry-btn{margin-top:8px}

/* 升级年卡表单 */
.upgrade-card-form{margin-top:8px;background:#fff8ec;border:1px solid #f0dca8}
.upgrade-card-hint{margin-bottom:8px}
.upgrade-serial-input{max-width:200px}
.upgrade-card-error{margin:0}

/* 新增学员表单：编号输入框宽度 */
.new-code-wrap{max-width:180px}
/* 学员编号一行：和下面的两列对齐——卡类型占左半、编号输入框占右半 */
.new-student-form>.new-code-field{grid-column:1/-1}
.new-code-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:center}
.new-code-row .new-code-wrap{max-width:none}
.new-card-type-options{display:flex;justify-content:space-between;align-items:center;padding:0 6px 0 2px;font-size:14px;white-space:nowrap}
@media (max-width:420px){.new-code-row{gap:8px}}
/* 输入框的预设下拉（可手填，也可点选） */
.preset-combo{position:relative}
.preset-menu{display:none;position:absolute;left:0;right:0;top:100%;margin-top:4px;z-index:20;padding:4px;background:#fff;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 4px 10px rgba(0,0,0,.12)}
.preset-combo:focus-within .preset-menu{display:block}
.preset-menu button{display:block;width:100%;padding:6px 8px;border-radius:6px;background:transparent;color:#1f2937;font-size:14px;font-weight:400;text-align:left}
.preset-menu button:hover{background:#eaf1ff}


/* 年卡操作错误提示 */
.annual-card-action-error{margin-top:6px}
.weekly-rev-card{background:#f1fbf4;border:1px solid #b8e3c6;margin-top:8px}
.weekly-rev-form{margin-top:8px;background:#fff;border:1px solid #d5e8dc}
.weekly-rev-event.is-voided{color:#94a3b8;text-decoration:line-through}
/* 升级表单里「已记过周卡营收」的只读金额框：灰底，和可填的输入框区分开。
   只限这一栏——别的页面有「加载中临时禁用」的输入框，不能跟着一起变灰。 */
.field.weekly-rev-fields input:disabled{background:#f1f5f9;color:#64748b;-webkit-text-fill-color:#64748b;opacity:1;cursor:not-allowed}
