﻿.studio-heading,.studio-toolbar,.lesson-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.studio-heading h1{margin:4px 0}.studio-tabs{display:flex;gap:10px;margin:24px 0}.studio-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.studio-card,.studio-editor,.studio-preview{background:white;border:1px solid var(--pm-color-border);border-radius:16px;padding:24px}.studio-card{border-top:5px solid var(--course-color,var(--pm-color-primary))}.studio-logo{width:64px;height:64px;object-fit:contain;border-radius:12px;background:var(--pm-color-primary-soft)}.studio-monogram{display:grid;place-items:center;font-size:24px;font-weight:bold;color:var(--pm-color-primary)}.studio-card h2{margin:16px 0 4px}.studio-card .actions{margin-top:20px;flex-wrap:wrap}.studio-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);gap:24px;align-items:start}.fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.studio-editor label{display:block;margin:12px 0}.studio-editor input,.studio-editor textarea,.studio-editor select{width:100%}.studio-editor input[type=color]{height:46px;padding:4px}.lesson{padding:20px 0;border-top:1px solid var(--pm-color-border)}.lesson h3{margin:0}.lesson small{display:block}.studio-toolbar{margin-bottom:24px}.studio-preview{position:sticky;top:20px}.studio-preview h3{margin-top:0}.preview-lesson{padding:14px 0;border-top:1px solid var(--pm-color-border)}.file-list{list-style:none;padding:0}.file-list li{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:6px 0;overflow-wrap:anywhere}.file-list button{padding:3px 8px}.studio-empty{text-align:center;padding:48px}.studio-subtle{font-size:13px;color:var(--pm-color-muted)}.studio-schedule{width:100%;border-collapse:collapse}.studio-schedule td,.studio-schedule th{padding:12px;text-align:left;border-bottom:1px solid var(--pm-color-border)}dialog{border:1px solid var(--pm-color-border);border-radius:16px;max-width:560px;width:calc(100% - 32px);padding:28px}dialog::backdrop{background:#112b6755}dialog label{display:block;margin:12px 0}dialog input{width:100%}#studio-notice:not(:empty){padding:12px;background:var(--pm-color-primary-soft);border-radius:8px}button:disabled{opacity:.5;cursor:wait}@media(max-width:850px){.studio-grid{grid-template-columns:1fr 1fr}.studio-layout{grid-template-columns:1fr}.studio-preview{position:static}}@media(max-width:540px){.studio-grid,.fields{grid-template-columns:1fr}.studio-heading,.studio-toolbar{align-items:flex-start;flex-direction:column}main{padding:0 16px}.studio-tabs{flex-wrap:wrap}.studio-editor{padding:18px}.studio-schedule{font-size:13px}}

/* Course Studio uses the existing PromptMind brand and Admin shell. */
.template-compact{padding:18px 20px;border-radius:12px}
.template-compact .template-meta{display:grid;grid-template-columns:minmax(180px,1.3fr) minmax(100px,.6fr) minmax(220px,1fr);gap:16px;align-items:start}
.template-compact label{margin:0;font-size:13px}
.template-compact input{min-height:38px;padding:7px 10px;font-size:14px;margin-top:5px}
.template-logo-field{display:flex;gap:10px;align-items:center;min-width:0}
.template-logo-field>label{min-width:0;flex:1}
.template-logo-field .studio-logo{width:44px;height:44px;border-radius:7px;font-size:17px}
.template-logo-field input[type=file]{padding:5px;max-width:100%;font-size:11px}
.template-logo-field small{display:block;font-size:11px;margin-top:3px}
.template-access{margin:16px 0;border:1px solid var(--pm-color-border);border-radius:8px;padding:10px 12px;font-size:13px}
.template-access summary{cursor:pointer;color:var(--pm-color-heading);font-weight:600}
.template-editors{display:flex;flex-wrap:wrap;gap:8px 20px;padding-top:10px}
.template-compact .template-editors .auth-check{display:flex;align-items:center;gap:8px;width:auto;margin:0;min-height:28px;font-size:13px}
.template-compact .template-editors input{width:16px;height:16px;min-height:0;margin:0;flex:0 0 16px}
.template-structure{margin:20px 0 12px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.template-structure h2{font-size:19px;margin:0}
.template-count-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.template-count-controls>label{display:flex;gap:8px;align-items:center;white-space:nowrap}
.template-count-controls input{width:74px;margin:0}
.template-count-controls button{padding:8px 12px;font-size:13px;min-height:38px}
.template-count-controls [data-total]{font-size:12px;white-space:nowrap}
.template-table-scroll{overflow-x:auto;border:1px solid var(--pm-color-border);border-radius:8px}
.template-lesson-table{width:100%;min-width:740px;table-layout:fixed;margin:0;font-size:13px}
.template-lesson-table th,.template-lesson-table td{padding:8px 7px;border-bottom:1px solid var(--pm-color-border);vertical-align:top}
.template-lesson-table thead{background:var(--pm-color-surface-soft)}
.template-lesson-table thead th{font-size:12px;font-weight:600;color:var(--pm-color-heading);white-space:normal}
.template-lesson-table th:nth-child(1){width:44px;text-align:center}
.template-lesson-table th:nth-child(2){width:26%}
.template-lesson-table th:nth-child(3){width:80px}
.template-lesson-table th:nth-child(4){width:25%}
.template-lesson-table th:nth-child(5){width:85px}
.template-lesson-table th:nth-child(6){width:155px}
.template-lesson-table tbody th{padding-top:17px;color:var(--pm-color-muted)}
.template-lesson-table input{width:100%;min-width:0;margin:0;background:#fff}
.template-lesson-table tr:last-child>*{border-bottom:0}
.template-files{font-size:12px;min-width:0}
.template-files summary{cursor:pointer;color:var(--pm-color-primary);padding:9px 6px;background:var(--pm-color-primary-soft);border-radius:5px}
.template-files input[type=file]{margin-top:8px;padding:4px;font-size:11px;min-height:0}
.template-files .file-list{margin:6px 0 0}
.template-files .file-list a{min-width:0;overflow-wrap:anywhere;font-size:11px}
.template-files .file-list button{flex-shrink:0;min-width:26px;min-height:28px;padding:2px 5px}
.template-table-help{margin:10px 0;font-size:11px;line-height:1.7}
.template-compact [data-save-error]:empty{display:none}
.studio-card{border-top:1px solid var(--pm-color-border)}
@media(max-width:1100px){.template-compact .template-meta{grid-template-columns:1.5fr 1fr}.template-logo-field{grid-column:1/-1;max-width:400px}}
@media(max-width:540px){.template-compact{padding:14px}.template-compact .template-meta{grid-template-columns:1fr}.template-logo-field{grid-column:auto}.template-count-controls{gap:8px}.template-structure{margin-top:16px}}
.course-studio-page .studio-heading{padding-bottom:20px;border-bottom:1px solid var(--pm-color-border)}
.course-studio-page h1{color:var(--pm-color-heading);font-size:28px}
.course-studio-page .eyebrow{color:var(--pm-color-primary)}
.course-studio-page .studio-tabs{padding:6px;background:var(--pm-color-surface-soft);border:1px solid var(--pm-color-border);border-radius:10px;width:fit-content}
.course-studio-page .studio-tabs button{margin:0;font-size:14px}
.course-studio-page .studio-card,.course-studio-page .studio-editor,.course-studio-page .studio-preview{border-radius:12px}
.course-studio-page .studio-preview{background:var(--pm-color-surface-soft)}
.course-studio-page .studio-card h2{font-size:22px}
.course-studio-page .studio-card button{font-size:13px;padding:10px 12px}
.course-studio-page .studio-grid{grid-template-columns:repeat(auto-fit,minmax(min(255px,100%),1fr))}
.studio-nav-link{display:block;padding:12px;color:var(--pm-color-heading);border-radius:9px;text-decoration:none;font-size:14px}
.studio-nav-link small{display:block;margin-top:4px;font-size:11px}
.studio-nav-link[aria-current=page]{background:var(--pm-color-primary);color:#fff}
.studio-nav-link:hover{background:var(--pm-color-primary-soft);color:var(--pm-color-primary)}
.course-studio-page dialog{max-height:85vh;overflow-y:auto}
@media(max-width:800px){.course-studio-page .admin-sidebar{display:block;position:static}.course-studio-page .admin-sidebar nav{display:flex;flex-wrap:wrap}.course-studio-page .admin-sidebar>.eyebrow{display:none}.course-studio-page .studio-layout{grid-template-columns:1fr}}
.template-sheet-cell{display:flex;align-items:flex-start;gap:6px}
.template-sheet-add{flex-shrink:0;width:32px;min-height:32px;padding:2px!important;font-size:23px!important;line-height:1}
.template-sheet-cell .file-list{margin:0;min-width:0;flex:1}
.template-sheet-cell .file-list li{padding:3px 0;gap:4px;font-size:11px}
.template-sheet-cell .file-list a{min-width:0;overflow-wrap:anywhere}
.template-sheet-cell .file-list button{flex:0 0 24px;width:24px;min-height:26px;padding:2px 4px}
.template-sheet-picker{width:min(740px,94vw);max-width:740px;max-height:85vh;overflow:auto;padding:22px;color:var(--pm-color-heading)}
.template-sheet-picker .toolbar{margin-bottom:14px;gap:12px}
.template-sheet-picker h2{font-size:21px;margin:4px 0 0}
.template-sheet-picker>input{width:100%;margin:0;min-height:40px}
.template-picker-path,.template-picker-folders{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0}
.template-picker-path button,.template-picker-folders button{font-size:12px;padding:6px 10px}
.template-picker-list{max-height:42vh;overflow:auto;border:1px solid var(--pm-color-border);border-radius:8px}
.template-picker-file{display:flex;align-items:center;gap:10px;margin:0;padding:10px 12px;border-bottom:1px solid var(--pm-color-border);cursor:pointer;font-weight:400}
.template-picker-file:last-child{border-bottom:0}
.template-picker-file>input{width:17px;height:17px;min-height:0;flex:0 0 17px;margin:0;padding:0}
.template-picker-file>span{min-width:0;flex:1;font-size:13px;overflow-wrap:anywhere}
.template-picker-file small{display:block;font-size:11px;color:var(--pm-color-muted);margin-top:3px}
.template-picker-file>a{font-size:12px;white-space:nowrap}
.template-picker-list>.muted{padding:12px}
.template-picker-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;font-size:13px}
.template-sheet-picker [data-picker-error]:empty{display:none}
.template-sheet-cell .file-list{display:grid;gap:6px}
.template-lesson-table .template-sheet-cell .file-list li{position:relative;display:flex;align-items:center;gap:6px;padding:8px;border:1px solid var(--pm-color-border);border-radius:8px;background:var(--pm-color-surface-soft);min-width:0}
.template-lesson-table .template-sheet-cell .file-list a{flex:1;font-size:11px;line-height:1.5;text-decoration:none;overflow-wrap:anywhere}
.template-sheet-cell .file-list a:hover{text-decoration:underline}
.template-lesson-table .template-sheet-cell .file-list button{background:white;border:1px solid var(--pm-color-border);border-radius:5px;min-height:24px}
.studio-grid.template-course-grid{grid-template-columns:repeat(auto-fill,minmax(min(270px,100%),1fr));gap:16px}
.studio-card.template-course-card{display:flex;flex-direction:column;min-width:0;padding:18px;border:1px solid var(--pm-color-border);border-radius:14px;background:#fff;box-shadow:0 3px 12px #112b6705;transition:border-color .15s,box-shadow .15s}
.template-course-card:hover{border-color:#bacbed;box-shadow:0 5px 18px #112b670c}
.template-course-head{display:flex;align-items:center;gap:12px;min-width:0}
.template-course-head .studio-logo{width:52px;height:52px;flex:0 0 52px;border-radius:10px;padding:3px;background:var(--pm-color-surface-soft)}
.template-course-head>div{min-width:0}
.template-course-card .template-course-head h2{font-size:18px;line-height:1.4;margin:3px 0 0;overflow-wrap:anywhere}
.template-course-code{font-size:10px;font-weight:700;letter-spacing:1px;color:var(--pm-color-primary);background:var(--pm-color-primary-soft);padding:2px 7px;border-radius:5px}
.template-course-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0 10px;padding:10px 12px;background:var(--pm-color-surface-soft);border-radius:8px;font-size:12px;color:var(--pm-color-muted)}
.template-course-stats>span+span{border-left:1px solid var(--pm-color-border);padding-left:12px}
.template-course-stats strong{font-size:20px;font-weight:700;color:var(--pm-color-heading);margin-right:4px}
.template-course-meta{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;font-size:11px;color:var(--pm-color-muted);margin-bottom:14px}
.studio-card.template-course-card .template-course-manage{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:36px;padding:8px 12px;border-radius:7px;font-size:12px;margin-top:auto;text-align:left}
.template-lesson-cards{display:grid;gap:16px}
.template-lesson-card{border:1px solid var(--pm-color-border);border-radius:12px;padding:18px;background:#fff;min-width:0}
.template-lesson-card>header{display:flex;align-items:center;gap:18px;margin-bottom:16px}
.template-lesson-card>header{padding:0;border:0;background:transparent}
.template-lesson-card h3{margin:0;font-size:16px;white-space:nowrap;color:var(--pm-color-primary)}
.template-lesson-fields{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:12px;flex:1;min-width:0}
.template-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 8px}
.template-section-head h4{margin:0;font-size:13px}
.template-section-head button{font-size:12px;padding:6px 10px;min-height:32px}
.template-card-sheets,.template-card-work{border-top:1px solid var(--pm-color-border);padding-bottom:6px}
.template-lesson-card .file-list,.template-work-list{list-style:none;padding:0;margin:0;display:grid;gap:6px}
.template-lesson-card .file-list li,.template-work-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--pm-color-border);border-radius:7px;padding:9px 12px;background:var(--pm-color-surface-soft);font-size:12px;min-width:0}
.template-lesson-card .file-list a{flex:1;min-width:0;font-size:13px;text-decoration:none;overflow-wrap:anywhere}
.template-lesson-card .file-list button,.template-work-list button{flex-shrink:0;padding:3px 8px;min-height:28px;font-size:12px}
.template-work-list li>span{display:flex;align-items:center;gap:10px;min-width:0;flex:1;flex-wrap:wrap}
.template-work-list img{width:28px;height:28px;object-fit:contain}
.template-work-list strong{font-size:13px;overflow-wrap:anywhere}
.template-work-list small{font-size:11px;color:var(--pm-color-muted)}
.template-work-picker{max-width:950px;max-height:88vh;overflow:auto}
.template-work-close{display:block;margin-left:auto;width:38px;height:38px;padding:0;font-size:22px}
@media(max-width:650px){.template-lesson-card{padding:12px}.template-lesson-card>header{display:block}.template-lesson-card h3{margin-bottom:12px}.template-lesson-fields{grid-template-columns:1fr 1fr}.template-lesson-fields>label:first-child{grid-column:1/-1}.template-section-head{gap:8px}.template-work-list li>span{gap:6px}}
.template-lesson-cards{gap:12px}
.template-lesson-card{padding:0 14px 10px;overflow:hidden}
.template-lesson-card>header{background:#fff8df;margin:0 -14px 0;padding:10px 14px;gap:14px;border-bottom:1px solid var(--pm-color-border)}
.template-lesson-card .template-lesson-fields{gap:10px}
.template-lesson-card .template-lesson-fields label{font-size:12px;line-height:1.4}
.template-lesson-card .template-lesson-fields input{min-height:34px;margin-top:3px;padding:5px 9px;font-size:13px}
.template-lesson-card .template-card-sheets{border-top:0}
.template-lesson-card .template-card-sheets,.template-lesson-card .template-card-work{padding-bottom:6px}
.template-lesson-card .template-section-head{margin:7px 0 5px}
.template-lesson-card .template-section-head button{padding:4px 9px;min-height:28px;line-height:1.4}
.template-lesson-card .file-list,.template-lesson-card .template-work-list{gap:4px}
.template-lesson-card .file-list li,.template-lesson-card .template-work-list li{padding:6px 10px;line-height:1.4}
@media(max-width:650px){.template-lesson-card>header{padding:9px 14px}.template-lesson-card h3{margin-bottom:7px}.template-lesson-card .template-lesson-fields{gap:8px}}
