/* Scoped curriculum management layout — light and dark themes share existing tokens. */
#admin-curriculum{max-width:1440px;margin:0 auto;min-width:0;color:var(--tx);font-size:14px}
#admin-curriculum h2{font-size:clamp(18px,2vw,23px);line-height:1.35;letter-spacing:-.035em}
#admin-curriculum h3,.cu-dialog h3{font-size:17px;line-height:1.35}
#admin-curriculum h4,.cu-dialog h4{font-size:14px;line-height:1.4}
.cu-muted{font-size:12.5px;color:var(--tx3);line-height:1.5;margin:4px 0 0;overflow-wrap:anywhere}
.cu-row{display:flex;align-items:center;gap:10px;min-width:0}
.cu-page-head{justify-content:space-between;gap:18px;margin:0 0 22px}
.cu-page-head>div{min-width:0}
.cu-btn,.cu-icon,.cu-program,.cu-secondary-tab,.cu-menu-item{font:600 13px Inter,sans-serif;cursor:pointer;color:var(--tx2);border:1px solid var(--bd);background:var(--sf);border-radius:9px;display:inline-flex;justify-content:center;align-items:center;gap:7px;min-height:40px;padding:9px 13px;transition:background .18s,border-color .18s,color .18s;white-space:nowrap;text-decoration:none}
.cu-btn svg,.cu-icon svg,.cu-menu-item svg,.cu-search svg{width:17px;height:17px;flex-shrink:0}
.cu-btn:hover,.cu-icon:hover,.cu-menu-item:hover{background:var(--sf2);border-color:var(--ac);color:var(--ac)}
.cu-primary{background:var(--ac);border-color:var(--ac);color:#fff}
.cu-primary:hover{background:var(--ac-h);border-color:var(--ac-h);color:#fff}
[data-theme=dark] .cu-primary{color:#0e141c}
.cu-btn:disabled,.cu-icon:disabled,.cu-menu-item:disabled{opacity:.45;cursor:not-allowed}
.cu-icon{min-width:36px;min-height:36px;padding:7px;list-style:none}
.cu-programs{display:flex;gap:6px;overflow:auto;padding:5px;background:var(--sf2);border:1px solid var(--bd);border-radius:13px;margin-bottom:16px;scrollbar-width:thin}
.cu-program{flex:1 0 68px;border:0;background:transparent;min-height:42px;color:var(--tx2)}
.cu-program:hover{background:var(--sf)}
.cu-program.selected{background:var(--ac);color:#fff}
[data-theme=dark] .cu-program.selected{color:#0e141c}
.cu-content{display:grid;gap:16px;min-width:0;animation:cu-in .18s ease-out}
@keyframes cu-in{from{opacity:.6;transform:translateY(3px)}to{opacity:1;transform:none}}
.cu-card{background:var(--sf);border:1px solid var(--bd);border-radius:16px;padding:20px;min-width:0}
.cu-overview-head{justify-content:space-between;align-items:flex-start;gap:16px}
.cu-overview-head>div:first-child{min-width:0}
.cu-overview-actions{flex-shrink:0}
.cu-status,.cu-review-tag{display:inline-block;font-size:11px;font-weight:700;padding:4px 9px;border-radius:999px;background:var(--sf2);color:var(--tx2);white-space:nowrap}
.cu-status.cu-active{background:var(--ok-l);color:var(--ok)}
.cu-review-tag{background:var(--wn-l);color:var(--wn);margin:5px 0 0;display:table;white-space:normal}
.cu-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0 12px}
.cu-stat{background:var(--sf2);border-radius:11px;padding:15px;display:grid;gap:3px;min-width:0}
.cu-stat strong{font:700 26px/1.2 Sora,Inter,sans-serif;color:var(--ac);font-variant-numeric:tabular-nums}
.cu-stat span{font-size:12px;color:var(--tx2)}
.cu-overview-foot,.cu-draft{justify-content:space-between;flex-wrap:wrap}
.cu-draft{border-top:1px solid var(--bd);margin-top:12px;padding-top:12px}
.cu-menu{position:relative}
.cu-menu summary::-webkit-details-marker,.cu-term summary::-webkit-details-marker{display:none}
.cu-menu-list{position:absolute;right:0;top:calc(100% + 7px);width:210px;z-index:5;padding:5px;background:var(--sf);border:1px solid var(--bd);border-radius:11px;box-shadow:var(--sh-lg)}
.cu-menu-item{width:100%;justify-content:flex-start;border:0;white-space:normal;text-align:left}
.cu-secondary{gap:22px;border-bottom:1px solid var(--bd);padding:0 2px;min-width:0}
.cu-secondary-tab{border:0;border-radius:0;background:transparent;padding:10px 1px 12px;min-height:44px;position:relative;font-size:14px}
.cu-secondary-tab.selected{color:var(--ac)}
.cu-secondary-tab.selected:after{content:'';height:2px;position:absolute;bottom:-1px;left:0;right:0;background:var(--ac)}
.cu-toolbar{flex-wrap:wrap;align-items:stretch;gap:8px}
.cu-input,.cu-search input{font:inherit;font-size:13px;border:1px solid var(--bd);background:var(--sf);color:var(--tx);border-radius:9px;padding:9px 11px;min-height:40px;max-width:100%;min-width:0}
.cu-input:focus,.cu-search:focus-within{outline:2px solid var(--ac);outline-offset:1px}
.cu-search{flex:1 1 240px;display:flex;align-items:center;gap:8px;border:1px solid var(--bd);border-radius:9px;padding:0 12px;color:var(--tx3);min-width:0;background:var(--sf)}
.cu-search input{border:0;flex:1;width:100%;padding:8px 0;outline:0!important;background:transparent}
.cu-list-info{font-size:11.5px;color:var(--tx3);margin:12px 0;line-height:1.5}
.cu-term-list{display:grid;gap:10px;min-width:0}
.cu-term{border:1px solid var(--bd);border-radius:11px;min-width:0;overflow:hidden}
.cu-term-head{display:flex;align-items:center;gap:12px;padding:13px 15px;cursor:pointer;list-style:none;min-height:62px}
.cu-term-head>svg{width:17px;height:17px;flex-shrink:0;color:var(--tx3);transition:transform .18s}
.cu-term[open]>.cu-term-head{background:var(--sf2)}
.cu-term[open]>.cu-term-head>svg{transform:rotate(90deg)}
.cu-term-head:hover{background:var(--sf2)}
.cu-term-head strong{font-size:14px;font-weight:650;color:var(--tx)}
.cu-term-head .cu-muted{margin:1px 0 0;font-size:12px}
.cu-table{border-collapse:collapse;width:100%;table-layout:fixed;text-align:left;font-size:12.5px;line-height:1.5}
.cu-table th,.cu-table td{padding:11px 12px;border-bottom:1px solid var(--bd);vertical-align:middle;overflow-wrap:anywhere}
.cu-table th{font-size:11px;font-weight:600;color:var(--tx3);background:var(--sf);text-transform:none}
.cu-table th:nth-child(1){width:14%}.cu-table th:nth-child(2){width:31%}.cu-table th:nth-child(3){width:7%}.cu-table th:nth-child(4),.cu-table th:nth-child(5){width:17%}.cu-table th:nth-child(6){width:14%}
.cu-table th:nth-child(3),.cu-units{text-align:center;font-variant-numeric:tabular-nums}
.cu-table tr:last-child td{border-bottom:0}
.cu-table tbody tr:hover{background:var(--sf2)}
.cu-course-code{font-weight:650;color:var(--ac);font-size:12px;font-variant-numeric:tabular-nums}
.cu-course-title{font-weight:600}
.cu-deps{font-size:11.5px;color:var(--tx2)}
.cu-course-actions{white-space:normal}
.cu-course-actions .cu-icon{margin:2px;min-width:30px;min-height:30px;padding:5px;vertical-align:middle}
.cu-course-actions .cu-icon svg{width:15px;height:15px}
.cu-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:36px 14px}
.cu-empty>svg{width:37px;height:37px;color:var(--ac)}
.cu-empty .cu-muted{max-width:410px}
.cu-docs{display:grid;gap:15px}
.cu-doc-list{display:grid;gap:8px;min-width:0}
.cu-doc-item{border:1px solid var(--bd);border-radius:10px;padding:13px;gap:12px}
.cu-doc-item>svg{width:25px;height:25px;color:var(--ac);flex-shrink:0}
.cu-doc-item>div{flex:1;min-width:0;overflow-wrap:anywhere}
.cu-upload{background:var(--sf2);padding:17px;display:grid;gap:10px;justify-items:start}
.cu-upload .cu-muted{margin:0}
.cu-file-picker{display:flex;align-items:center;gap:10px;max-width:100%;min-width:0;flex-wrap:wrap}
.cu-file-input{display:none}
.cu-source-details{border:1px solid var(--bd);border-radius:10px;padding:14px;min-width:0}
.cu-source-details summary{cursor:pointer;font-weight:650;color:var(--tx)}
.cu-source-details[open] summary{margin-bottom:14px}
.cu-source-details ul{padding-left:22px;margin:5px 0 14px;color:var(--tx2);font-size:13px;overflow-wrap:anywhere}
.cu-source-details .cu-file-picker{margin:12px 0}
.cu-dialog{border:1px solid var(--bd);border-radius:16px;max-width:min(540px,calc(100% - 28px));width:100%;max-height:calc(100dvh - 40px);overflow:auto;margin:auto;padding:0;background:var(--sf);color:var(--tx);box-shadow:var(--sh-xl);z-index:5000;font:14px/1.6 Inter,sans-serif}
.cu-dialog::backdrop{background:rgba(10,18,28,.55);backdrop-filter:blur(3px)}
.cu-dialog-head{padding:16px 20px;justify-content:space-between;border-bottom:1px solid var(--bd);background:var(--sf);position:sticky;top:0;z-index:1}
.cu-dialog-body{padding:20px;display:grid;gap:12px;overflow-wrap:anywhere}
.cu-dialog-body .cu-input{width:100%}
.cu-field{display:grid;gap:6px;font-weight:600}
.cu-check{display:flex;align-items:center;gap:9px;color:var(--tx2)}
.cu-check input{accent-color:var(--ac);width:18px;height:18px}
.cu-warning{background:var(--wn-l);color:var(--wn);padding:10px;border-radius:9px}
.cu-import-preview{max-height:32dvh;overflow:auto;padding:10px;background:var(--sf2);border-radius:9px;font-size:12px}
.cu-import-preview p{padding:6px;border-bottom:1px solid var(--bd)}
@media(max-width:1000px){.cu-table th,.cu-table td{padding:9px 8px}.cu-table th:nth-child(2){width:27%}.cu-table th:nth-child(6){width:18%}}
@media(max-width:760px){
 #admin-curriculum{font-size:13px}.cu-page-head{align-items:flex-start;margin-bottom:15px;flex-wrap:wrap;gap:10px}.cu-page-head h2{font-size:21px}.cu-page-head .cu-btn{min-height:44px}.cu-card{padding:13px;border-radius:13px}.cu-content{gap:12px}.cu-programs{margin-bottom:12px}.cu-program{min-height:44px}.cu-overview-head{gap:8px}.cu-overview-head h2{font-size:17px!important}.cu-overview-actions{gap:4px}.cu-overview-actions .cu-status{font-size:10px;padding:4px 6px;white-space:normal;text-align:center}.cu-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:13px}.cu-stat{padding:11px}.cu-stat strong{font-size:23px}.cu-btn,.cu-input,.cu-icon{min-height:44px}.cu-secondary{gap:18px;overflow-x:auto}.cu-secondary-tab{font-size:13px}.cu-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cu-search{grid-column:1/-1;min-height:46px}.cu-search input,.cu-input{font-size:16px}.cu-toolbar select{width:100%;font-size:13px}.cu-toolbar .cu-btn{white-space:normal}.cu-term-head{padding:12px;gap:8px}.cu-term-head strong{font-size:13px}.cu-table,.cu-table tbody{display:block;width:100%}.cu-table thead{display:none}.cu-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:12px;border-bottom:1px solid var(--bd);align-items:center}.cu-table td{border:0;padding:0;min-width:0;display:block}.cu-table td.cu-course-title{grid-column:1/-1;grid-row:2;font-size:14px}.cu-table td.cu-course-code{grid-column:1;grid-row:1}.cu-table td.cu-units{grid-column:2;grid-row:1;text-align:right;font-size:12px}.cu-table td.cu-units:after{content:' units';color:var(--tx3)}.cu-table td.cu-deps{grid-column:1/-1;font-size:12px}.cu-table td.cu-deps:before{content:attr(data-label) ': ';font-weight:600;color:var(--tx2)}.cu-table td.cu-course-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:5px}.cu-course-actions .cu-icon{min-width:44px;min-height:44px;margin:0}.cu-course-actions .cu-icon svg{width:18px;height:18px}.cu-doc-item{flex-wrap:wrap;padding:12px}.cu-doc-item>.cu-btn{margin-left:auto}.cu-dialog{max-width:100%;width:100%;max-height:100dvh;height:auto;margin:auto 0 0;border-radius:16px 16px 0 0;padding-bottom:env(safe-area-inset-bottom)}.cu-dialog-body .cu-input{font-size:16px}#cb-modal{padding:0!important}#cb-modal .modal{max-width:none!important;width:100%;max-height:100dvh;border-radius:0;display:flex;flex-direction:column}#cb-modal .modal-body{overflow:auto;flex:1;min-height:0;padding:16px}#cb-modal .modal-foot{flex-shrink:0;padding-bottom:max(16px,env(safe-area-inset-bottom))!important}#cb-modal input,#cb-modal textarea,#cb-modal select{font-size:16px}#cb-modal .cb-prereq-opt{min-height:36px;display:flex;align-items:center}
}
@media(max-width:360px){.cu-overview-head{flex-wrap:wrap}.cu-page-head .cu-btn{width:100%}.cu-secondary{gap:12px}.cu-stat strong{font-size:20px}}
@media(prefers-reduced-motion:reduce){.cu-content{animation:none}.cu-btn,.cu-term-head>svg{transition:none}}
.cu-mobile-requirements{display:none}
@media(max-width:760px){
 .cu-page-head{gap:8px;align-items:center;flex-wrap:nowrap}.cu-page-head>div{flex:1}.cu-page-head h2{font-size:19px}.cu-page-head .cu-muted{font-size:11.5px;line-height:1.35}.cu-page-head .cu-btn{font-size:12px;white-space:normal;max-width:115px;padding:7px 9px;line-height:1.3}.cu-page-head .cu-btn svg{width:16px;height:16px}.cu-stats{gap:6px;margin:11px 0 8px}.cu-stat{padding:8px 10px}.cu-stat strong{font-size:21px}.cu-overview-foot .cu-muted{font-size:11px}.cu-list-info{margin:9px 0}.cu-table td.cu-deps{display:none}.cu-table tr.cu-expanded td.cu-deps{display:block}.cu-table td.cu-course-actions{justify-content:flex-start;align-items:center}.cu-mobile-requirements{margin-right:auto;display:inline-flex;align-items:center;gap:5px;border:0;background:none;font:600 12px Inter,sans-serif;color:var(--ac);min-height:44px;padding:4px 0;cursor:pointer}.cu-mobile-requirements svg{width:15px;height:15px;transition:transform .18s}.cu-expanded .cu-mobile-requirements svg{transform:rotate(90deg)}
}
