.appearance-dialog{box-sizing:border-box;width:min(720px,calc(100vw - 24px));max-height:90dvh;overflow:auto;border:1px solid #dbe2ec;border-radius:16px;padding:20px;color:#273346;background:white;box-shadow:0 16px 60px #15203930}.appearance-dialog::backdrop{background:#17213299}.appearance-dialog header,.appearance-dialog footer,.appearance-toolbar,.appearance-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px}.appearance-dialog header{margin-bottom:16px}.appearance-dialog h2{font-size:20px;margin:0}.appearance-dialog header button{width:32px;height:32px;padding:0;border:0;background:#f1f4f7;font-size:22px}.appearance-dialog button,.appearance-toolbar button,.appearance-pagination button{font:inherit;min-height:36px;border:1px solid #d6deea;border-radius:8px;padding:7px 12px;background:white;color:#273346;cursor:pointer}.appearance-dialog .primary,.appearance-toolbar button.active{background:#a91e36;color:white;border-color:#a91e36}.appearance-dialog button:disabled{opacity:.5;cursor:default}.appearance-options{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.appearance-options label{display:flex;align-items:center;gap:8px;background:#f4f6f9;padding:10px 14px;border-radius:8px}.appearance-options input{width:18px;height:18px;accent-color:#a91e36}.appearance-field{display:grid;gap:6px;margin:12px 0}.appearance-field input,.appearance-field select{box-sizing:border-box;width:100%;height:40px;border:1px solid #d6deea;border-radius:8px;padding:8px 12px;font:inherit}.appearance-field select{padding-right:32px}.appearance-muted,.appearance-pagination{font-size:13px;color:#65738a}.appearance-photo{max-height:220px;max-width:100%;object-fit:contain;border-radius:10px;margin:10px 0}.appearance-camera video{width:100%;max-height:45dvh;background:#172132;border-radius:10px}.appearance-camera{padding:12px 0}.appearance-evidence{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.appearance-evidence figure{margin:0}.appearance-evidence img{width:100%;height:220px;object-fit:contain;background:#f2f4f7;border-radius:8px}.appearance-evidence figcaption{font-size:12px;color:#65738a;margin:5px 0 12px}.appearance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.appearance-card{display:flex;align-items:center;gap:10px;text-align:left!important;min-width:0;background:#fff;border:1px solid #dbe2ec;border-radius:10px;padding:12px;color:#273346}.appearance-card img{width:58px;height:76px;object-fit:cover;border-radius:6px}.appearance-card>span:nth-child(2){display:grid;gap:5px;flex:1;min-width:0}.appearance-card strong{font-size:16px}.appearance-card b{font-size:13px;font-weight:500}.appearance-card small{font-size:12px;color:#65738a;font-weight:400}.appearance-card em{font-size:12px;font-style:normal;color:#a91e36}.appearance-toolbar>div{display:flex;gap:6px}.appearance-gate{width:min(580px,calc(100vw - 24px))}.appearance-gate-item{padding:8px 0 14px;border-bottom:1px solid #e2e7ef;margin-bottom:12px}.appearance-status{background:#fff3d8;padding:10px;border-radius:8px;font-size:14px}.appearance-blocked> :not(#appearance-gate){visibility:hidden!important}.appearance-blocked #appearance-gate,.appearance-blocked #appearance-gate *{visibility:visible!important}body.appearance-blocked{overflow:hidden}@media(max-width:600px){.appearance-dialog{padding:16px}.appearance-grid{grid-template-columns:1fr}.appearance-evidence img{height:170px}.appearance-dialog h2{font-size:18px}.appearance-dialog footer{flex-wrap:wrap}}

.appearance-deadline{background:#fff3db;border-radius:10px;padding:12px;margin:10px 0;font-size:13px}.appearance-deadline b{color:#a91e36;font-size:17px}.appearance-deadline p{margin:6px 0}

.appearance-dialog,.appearance-dialog h2{font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}

.appearance-field select{appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%2365738a' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center}.appearance-dialog:not(.appearance-gate) .appearance-evidence img{height:180px}.appearance-dialog>p{margin:10px 0}

#discipline .daily-category-tabs.has-appearance{grid-template-columns:repeat(5,minmax(0,1fr))}@media(max-width:1000px){#discipline .daily-category-tabs.has-appearance{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){#discipline .daily-category-tabs.has-appearance{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Compact appearance flows; override shared control minimums only in these dialogs. */
.appearance-dialog:not(.appearance-gate){width:min(620px,calc(100vw - 24px));padding:18px!important}
.appearance-dialog.appearance-create{width:min(480px,calc(100vw - 24px))}
.appearance-dialog>header{gap:10px;margin-bottom:14px;padding:0 0 12px!important;border-bottom:1px solid #e2e7ef}
.appearance-dialog>header h2{flex:1;font-size:18px}
.appearance-dialog button.ui-action{min-height:36px!important;padding:6px 12px!important;font-size:13px!important}
.appearance-dialog>header button[data-close]{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;font-size:22px!important}
.appearance-dialog .appearance-person{font-size:15px;font-weight:650;margin:0 0 12px}
.appearance-dialog .appearance-options{gap:8px;margin:10px 0}
.appearance-dialog .appearance-options label{flex:1;justify-content:flex-start;padding:10px;font-size:14px}
.appearance-dialog .appearance-field{font-size:13px;margin:12px 0}
.appearance-dialog .appearance-muted{line-height:1.6;margin:12px 0}
.appearance-create form>footer{justify-content:flex-end;padding-top:12px!important;margin-top:12px;border-top:1px solid #e2e7ef}
.appearance-dialog [data-result]:empty{display:none}
.appearance-pagination[hidden]{display:none!important}
.appearance-dialog [data-rows]>.appearance-muted{padding:24px 10px;text-align:center;background:#f7f8fa;border-radius:8px}
.student-profile-dialog>header[data-quick]:has([data-appearance-open])>.inplace-quick{grid-template-columns:repeat(5,auto);gap:6px}
.student-profile-dialog>header[data-quick]>.inplace-quick:has([data-appearance-open]) button{min-height:34px!important;height:34px!important;padding:5px 9px!important;font-size:12px!important}
/* Keep each student's avatar and name on the same left edge regardless of badges. */
td:has(>.roster-student-name){text-align:left!important}
.roster-student-name{display:flex!important;justify-content:flex-start!important;align-items:center;gap:8px;width:100%}
table:has([data-teaching-roster-rows]) thead th:nth-child(3),table:has([data-authorized-roster-rows]) thead th:nth-child(3),table:has([data-special-student-rows]) thead th:nth-child(3),table:has([data-homeroom-roster-rows]) thead th:nth-child(2){text-align:left!important}
@media(max-width:900px){.student-profile-dialog>header[data-quick]:has([data-appearance-open])>.inplace-quick{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:520px){.student-profile-dialog>header[data-quick]:has([data-appearance-open])>.inplace-quick{grid-template-columns:repeat(3,minmax(0,1fr))}.appearance-dialog:not(.appearance-gate){padding:14px!important}.appearance-toolbar{gap:6px}.appearance-toolbar>div{gap:4px}}

.appearance-dialog>header button.primary{width:auto!important;height:36px!important;min-width:80px!important;white-space:nowrap;flex-shrink:0}

.appearance-export{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin:12px 0}.appearance-export label{display:grid;gap:4px;font-size:13px}.appearance-export input,.appearance-export button{height:36px;padding:6px 12px}.appearance-export [role=status]{font-size:13px;color:#64748b}
