/* COURSE-3F7 — CANONICAL CONTENT MAP + MATERIAL DELETE UI */

.course-content-map{display:grid;gap:12px}
.course-content-map-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.course-content-map-head h2{margin:0;color:var(--cw-green);font-size:19px}
.course-content-map-head p{margin:3px 0 0;color:var(--cw-muted);font-size:11px}
.course-content-head-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.course-content-legacy-btn{flex:0 0 auto}

.course-content-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.course-content-summary-item{display:flex;align-items:baseline;justify-content:center;gap:6px;min-height:54px;padding:9px;border:1px solid var(--cw-border);border-radius:12px;background:#fffdf9}
.course-content-summary-item b{color:var(--cw-green);font-size:18px}
.course-content-summary-item span{color:var(--cw-muted);font-size:10px;font-weight:800}
.course-content-summary-item.is-loading{opacity:.65}

.course-content-body{display:grid;gap:10px}
.course-content-unit{overflow:hidden;border:1px solid var(--cw-border);border-radius:14px;background:#fff}
.course-content-unit.is-open{border-color:#d7c7a8;box-shadow:0 7px 22px rgba(23,59,44,.05)}

.course-content-unit-head{display:grid;grid-template-columns:28px 34px minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;padding:11px 12px;background:#fff}

.course-content-unit-toggle,
.course-content-icon-btn{display:grid;place-items:center;border:1px solid #e2d8c7;background:#fff;color:var(--cw-green);font:inherit;font-weight:900;cursor:pointer}

.course-content-unit-toggle{width:27px;height:27px;border-radius:8px}
.course-content-icon-btn{width:29px;height:29px;border-radius:8px;font-size:13px}
.course-content-icon-btn:hover{background:#edf4ef;border-color:#c7d8ce}

.course-content-unit-index,
.course-content-lesson-index{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#edf4ef;color:var(--cw-green);font-size:11px;font-weight:900}

.course-content-unit-title,
.course-content-lesson-title{min-width:0}

.course-content-unit-title strong,
.course-content-lesson-title strong{display:block;overflow:hidden;color:var(--cw-green);text-overflow:ellipsis;white-space:nowrap}

.course-content-unit-title strong{font-size:14px}
.course-content-unit-title small,
.course-content-lesson-title small{display:block;margin-top:2px;color:var(--cw-muted);font-size:9px}

.course-content-unit-actions,
.course-content-lesson-actions{display:flex;align-items:center;gap:5px}

.course-content-unit-body{padding:0 11px 11px;border-top:1px solid #f0ebe2;background:#fffdfa}
.course-content-lessons{display:grid;gap:7px;padding-top:9px}

.course-content-lesson{display:grid;grid-template-columns:minmax(180px,1fr) minmax(250px,auto) auto;align-items:center;gap:10px;min-width:0;padding:8px 9px;border:1px solid #ebe6dd;border-radius:11px;background:#fff;cursor:pointer;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}

.course-content-lesson:hover{border-color:#d8e2dc;background:#fcfffd}
.course-content-lesson.is-editing{border-color:#8fae9d;background:#f8fcf9;box-shadow:0 0 0 2px rgba(31,74,56,.05)}

.course-content-lesson-main{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:9px;min-width:0}
.course-content-lesson-title strong{font-size:12px}

.course-content-lesson-parts{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-width:0;flex-wrap:wrap}

.course-content-part{display:inline-flex;align-items:center;gap:4px;min-height:27px;padding:4px 7px;border:1px solid #e6e2db;border-radius:8px;background:#faf9f7;color:#6b746f;white-space:nowrap}
.course-content-part i{display:grid;place-items:center;width:15px;height:15px;font-style:normal;font-size:9px}
.course-content-part b{font-size:8.5px}
.course-content-part.has-content{border-color:#d6e7dc;background:#f3faf5;color:#245b43}
.course-content-part.has-warning{border-color:#e9c882;background:#fff8e9;color:#8b601b}
.course-content-part em{padding:1px 4px;border-radius:999px;background:#f1d59b;font-size:7px;font-style:normal;font-weight:900}

.course-content-status{display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:25px;padding:3px 7px;border-radius:999px;font-size:8px;font-weight:900;white-space:nowrap}
.course-content-status.is-published{background:#eaf6ee;color:#21613f}
.course-content-status.is-draft{background:#f4f1eb;color:#7e7466}

.course-content-unit-exams{display:grid;gap:6px;margin-top:9px;padding-top:9px;border-top:1px dashed #ded7ca}
.course-content-subheading{color:#8d692a;font-size:9px;font-weight:900}

.course-content-unit-exam{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:8px;padding:7px 9px;border:1px solid #eee2cd;border-radius:10px;background:#fffaf1}
.course-content-unit-exam strong{display:block;color:var(--cw-green);font-size:11px}
.course-content-unit-exam small{color:var(--cw-muted);font-size:8px}
.course-content-part-icon{display:grid;place-items:center;width:27px;height:27px;border-radius:8px;background:#f3ead8;color:#936a25}

.course-content-unit-empty,
.course-content-state{padding:18px;border:1px dashed #d8d1c5;border-radius:12px;background:#fbfaf7;color:var(--cw-muted);text-align:center;font-size:11px}

.course-content-unit-empty{display:flex;align-items:center;justify-content:center;gap:10px}
.course-content-state{display:grid;justify-items:center;gap:6px}
.course-content-state strong{color:var(--cw-green)}
.course-content-state p{margin:0}
.course-content-state.is-error{border-color:#efc6c2;background:#fff7f6}

.course-content-loader{width:24px;height:24px;border:3px solid #e5e0d7;border-top-color:var(--cw-green);border-radius:50%;animation:courseContentSpin .8s linear infinite}
@keyframes courseContentSpin{to{transform:rotate(360deg)}}

/* =========================================================
   INLINE VIDEO EDITOR — CANONICAL
   ========================================================= */

.course-inline-video-form{display:grid;gap:8px}
.course-video-warning{display:grid;gap:3px;padding:9px 10px;border:1px solid #ebcf91;border-radius:10px;background:#fff8e8;color:#805b1c}
.course-video-warning strong{font-size:9px}
.course-video-warning span{font-size:8px;line-height:1.6}

.course-video-fields{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(150px,.55fr);gap:7px;align-items:end}
.course-video-url-field{grid-column:1/-1}

.course-video-thumbnail{display:grid;grid-template-columns:145px minmax(0,1fr);gap:8px;align-items:center;padding:7px;border:1px solid #e2e8e4;border-radius:10px;background:#fafcfa}
.course-video-thumbnail-preview{display:grid;place-items:center;width:100%;aspect-ratio:16/9;overflow:hidden;border:1px solid #dfe5e1;border-radius:10px;background:#f2f4f2;color:#8b948e;font-size:8px}
.course-video-thumbnail-preview img{display:block;width:100%;height:100%;object-fit:cover;object-position:center center}
.course-video-thumbnail-main{display:grid;gap:5px;min-width:0}
.course-video-thumbnail-label{display:flex;align-items:center;min-height:22px}
.course-video-thumbnail-label strong{color:#294c3b;font-size:9px}
.course-video-thumbnail-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
/* Shared canonical editor controls */

.course-content-editor-field{display:grid;gap:6px}
.course-content-editor-field>span{color:#294c3b;font-size:10px;font-weight:900}
.course-content-editor-field small{color:#929993;font-size:8px;font-weight:600}

.course-content-editor-field input,
.course-content-editor-field textarea,
.course-content-editor-field select{width:100%;box-sizing:border-box;border:1px solid #ddd7cc;border-radius:10px;background:#fcfbf8;color:#263d32;padding:9px 10px;font:inherit;font-size:12px;outline:0}

.course-content-editor-field input,
.course-content-editor-field select{min-height:42px}

.course-content-editor-field textarea{resize:vertical;min-height:92px}

.course-content-editor-field input:focus,
.course-content-editor-field textarea:focus,
.course-content-editor-field select:focus{border-color:#8eaa9b;background:#fff;box-shadow:0 0 0 3px rgba(31,74,56,.07)}

.course-content-editor-check{display:flex;align-items:center;gap:8px;min-height:42px;padding:8px 10px;border:1px solid #e4ded3;border-radius:10px;background:#faf9f6;color:#294c3b;font-size:10px;font-weight:900;cursor:pointer}
.course-content-editor-check input{flex:0 0 16px;width:16px!important;min-width:16px!important;max-width:16px!important;height:16px;margin:0;padding:0;accent-color:var(--cw-green)}

.course-content-editor-message{margin:0 18px 14px;padding:9px 10px;border-radius:9px;font-size:9px;font-weight:800}
.course-content-editor-message.is-success{background:#eaf6ee;color:#21613f}
.course-content-editor-message.is-error{background:#fff0ee;color:#9a3c32}

/* =========================================================
   INLINE LESSON EDITOR — SINGLE CANONICAL OWNER
   ========================================================= */

.course-inline-lesson-editor{margin:0 0 4px;border:1px solid #bfcfc5;border-radius:13px;background:#f8fcf9;box-shadow:0 8px 26px rgba(23,59,44,.08);overflow:hidden}

.course-inline-lesson-form{display:grid}

.course-inline-lesson-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border-bottom:1px solid #dfe9e3;background:#f0f7f2}

.course-inline-lesson-head small{display:block;color:#769181;font-size:8px;font-weight:900}
.course-inline-lesson-head h3{margin:2px 0 0;color:var(--cw-green);font-size:14px}

.course-inline-close{display:grid;place-items:center;width:30px;height:30px;border:1px solid #d1ddd5;border-radius:9px;background:#fff;color:#315340;font:inherit;font-size:18px;cursor:pointer}

.course-inline-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;border-bottom:1px solid #e2e8e4;background:#fff}

.course-inline-tabs button{min-width:0;min-height:38px;padding:7px 5px;border:0;border-bottom:2px solid transparent;background:#fff;color:#69776f;font:inherit;font-size:9px;font-weight:900;cursor:pointer}

.course-inline-tabs button.is-active{border-bottom-color:var(--cw-green);background:#f6faf7;color:var(--cw-green)}

.course-inline-panels{background:#fff}

.course-inline-panel{padding:12px}
.course-inline-panel[hidden]{display:none!important}

.course-inline-fields{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(150px,.75fr) minmax(95px,.45fr) minmax(150px,.7fr);gap:10px;align-items:end}

.course-inline-title-field{grid-column:auto}
.course-inline-description-field{grid-column:1 / span 2}

.course-inline-publish-check{align-self:end}

.course-inline-placeholder{display:grid;gap:9px;min-height:105px;padding:13px;border:1px dashed #d8e0db;border-radius:11px;background:#fafcfa}
.course-inline-placeholder>strong{color:var(--cw-green);font-size:12px}
.course-inline-placeholder>p{margin:0;color:#7c8580;font-size:9px;line-height:1.7}

.course-inline-existing-list{display:grid;gap:5px}
.course-inline-existing-list>div{display:grid;grid-template-columns:25px minmax(0,1fr);align-items:center;gap:7px;padding:6px 8px;border:1px solid #e3e8e4;border-radius:8px;background:#fff}
.course-inline-existing-list span{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:#edf4ef;color:var(--cw-green);font-size:8px;font-weight:900}
.course-inline-existing-list b{overflow:hidden;color:#315340;font-size:9px;text-overflow:ellipsis;white-space:nowrap}

.course-inline-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-top:1px solid #e5ebe7;background:#fbfdfb}

.course-inline-message{padding:7px 9px;border-radius:8px;font-size:8px;font-weight:900}
.course-inline-message.is-success{background:#eaf6ee;color:#21613f}
.course-inline-message.is-error{background:#fff0ee;color:#9a3c32}

.course-inline-action-buttons{display:flex;align-items:center;gap:7px;margin-inline-start:auto}

/* =========================================================
   MOBILE
   ========================================================= */


/* COURSE-3F3 MATERIALS */
.course-materials-panel{display:grid;gap:8px}
.course-materials-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 0}
.course-materials-head>div{display:grid;gap:1px}
.course-materials-head strong{color:#284c3b;font-size:10px}
.course-materials-head small{color:#89928d;font-size:7px}
.course-material-add{min-height:32px!important;padding:5px 9px!important;font-size:8px!important}
.course-materials-list{display:grid;gap:7px}
.course-materials-empty{padding:14px;border:1px dashed #d9d4ca;border-radius:9px;background:#fbfaf7;color:#7b867f;text-align:center;font-size:9px}
.course-material-row{display:grid;gap:7px;padding:8px;border:1px solid #e4dfd6;border-radius:10px;background:#fff}
.course-material-row-main{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(120px,.45fr);gap:7px}
.course-material-source{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:end}
.course-material-source-actions{display:flex;gap:5px;align-items:center}
.course-material-source-actions .course-workspace-btn{min-height:34px;padding:6px 8px;font-size:8px;white-space:nowrap}
.course-material-row-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
.course-material-delete,
.course-material-remove-new{
    border:0;
    background:transparent;
    color:#a4514a;
    font:inherit;
    font-size:8px;
    font-weight:900;
    cursor:pointer;
    padding:4px;
}
.course-material-delete:hover,
.course-material-remove-new:hover{text-decoration:underline}
.course-material-delete:disabled{
    opacity:.5;
    cursor:wait;
    text-decoration:none;
}

@media (max-width:760px){

    .course-materials-head{align-items:center}
    .course-material-row{padding:7px;gap:6px}
    .course-material-row-main{grid-template-columns:minmax(0,1fr) 98px;gap:5px}
    .course-material-source{grid-template-columns:1fr;gap:5px}
    .course-material-source-actions{display:grid;grid-template-columns:1fr auto}
    .course-material-source-actions .course-workspace-btn{min-height:34px;width:100%}
    .course-material-row-footer{min-height:28px}

    .course-content-map-head{align-items:flex-start}
    .course-content-map-head p{display:none}

    .course-content-head-actions{gap:5px}
    .course-content-head-actions .course-workspace-btn{min-height:35px;height:35px;padding-inline:8px;font-size:8.5px}
    .course-content-legacy-btn{max-width:104px;white-space:normal;line-height:1.15}

    .course-content-summary{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
    .course-content-summary-item{display:grid;justify-items:center;gap:0;min-height:45px;padding:5px 2px}
    .course-content-summary-item b{font-size:14px}
    .course-content-summary-item span{font-size:7px}

    .course-content-unit-head{grid-template-columns:25px 28px minmax(0,1fr);gap:6px;padding:9px 8px}
    .course-content-unit-toggle{width:24px;height:24px}
    .course-content-unit-index,
    .course-content-lesson-index{width:28px;height:28px;font-size:9px}

    .course-content-unit-title strong{font-size:11px}
    .course-content-unit-title small{font-size:7.5px}
    .course-content-unit-actions{grid-column:1/-1;justify-content:flex-end;padding-top:2px}
    .course-content-unit-body{padding:0 7px 7px}

    .course-content-lesson{grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:7px}
    .course-content-lesson-main{grid-template-columns:28px minmax(0,1fr);gap:6px}
    .course-content-lesson-title strong{font-size:10px}
    .course-content-lesson-title small{font-size:7px}

    .course-content-lesson-parts{grid-column:1/-1;justify-content:flex-start;padding-inline-start:34px}
    .course-content-lesson-actions{grid-column:1/-1;justify-content:space-between;padding-inline-start:34px}

    .course-content-part{min-height:24px;padding:3px 6px}
    .course-content-part b{font-size:7.5px}

    .course-content-status{min-width:42px;min-height:23px;font-size:7px}

    .course-inline-panel[data-inline-panel="video"]{padding:8px}
    .course-video-fields{grid-template-columns:minmax(0,1.35fr) minmax(105px,.65fr);gap:6px}
    .course-video-title-field,.course-video-url-field{grid-column:1/-1}
    .course-video-thumbnail{
        grid-template-columns:96px minmax(0,1fr);
        gap:6px;
        padding:6px;
        align-items:start;
    }
    .course-video-thumbnail-preview{aspect-ratio:16/9;min-height:0;border-radius:7px}
    .course-video-thumbnail-main{gap:5px}
    .course-video-thumbnail-actions{display:grid;grid-template-columns:1.3fr .8fr;gap:4px}
    .course-video-thumbnail-actions .course-workspace-btn{
        width:100%;
        min-height:32px;
        height:32px;
        padding-inline:3px;
        font-size:7px;
        white-space:nowrap;
    }

    @media (max-width:380px){
        .course-video-thumbnail{grid-template-columns:1fr}
        .course-video-thumbnail-preview{aspect-ratio:16/9}
    }


    .course-content-editor-message{margin:0 14px 12px}

    /* Lesson remains inline on mobile */
    .course-inline-lesson-editor{margin-top:1px;border-radius:11px}

    .course-inline-lesson-head{padding:9px 10px}
    .course-inline-lesson-head h3{font-size:12px}

    .course-inline-tabs{grid-template-columns:repeat(6,minmax(0,1fr))}
    .course-inline-tabs button{min-height:36px;padding:6px 2px;font-size:7.4px;line-height:1.2;white-space:normal}

    .course-inline-panel{padding:9px}

    .course-inline-fields{grid-template-columns:1fr 1fr;gap:8px}
    .course-inline-title-field{grid-column:1/-1}
    .course-inline-description-field{grid-column:1/-1}

    .course-content-editor-field input,
    .course-content-editor-field select{min-height:39px}

    .course-content-editor-field textarea{min-height:76px}

    .course-inline-publish-check{min-height:39px}

    .course-inline-actions{display:grid;gap:7px;padding:8px 9px}
    .course-inline-message{width:100%;box-sizing:border-box}
    .course-inline-action-buttons{
        width:100%;
        margin:0;
        display:flex;
        align-items:center;
        gap:7px;
    }
    .course-inline-action-buttons .course-workspace-btn{min-width:0}
    .course-inline-action-buttons [data-inline-lesson-save]{
        flex:1.45 1 0;
        white-space:nowrap;
        font-size:9px;
    }
    .course-inline-action-buttons .secondary{
        flex:.65 1 0;
    }

    .course-inline-placeholder{min-height:90px;padding:10px}
}

@media (max-width:390px){
    .course-content-map-head h2{font-size:16px}
    .course-content-summary-item span{font-size:6.5px}
    .course-content-head-actions .course-workspace-btn{font-size:8px;padding-inline:6px}

    .course-inline-tabs button{font-size:6.9px}
}

/* COURSE-3G2 — SIMPLIFIED INLINE HOMEWORK EDITOR */
.course-homework-form{display:grid;gap:10px}
.course-homework-fields{
    display:grid;
    grid-template-columns:minmax(0,1.3fr) minmax(220px,.7fr);
    gap:8px;
    align-items:end
}
.course-homework-title{grid-column:1 / -1}
.course-homework-instructions{grid-column:1 / -1}
.course-homework-late{align-self:center;min-height:38px}
.course-homework-attachments{
    border:1px solid #e4dfd3;
    border-radius:12px;
    padding:10px;
    background:#fffdf8;
    display:grid;
    gap:8px
}
.course-homework-attachments-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px
}
.course-homework-attachments-head>div:first-child{display:grid;gap:2px}
.course-homework-attachments-head strong{font-size:12px;color:#1f4b3c}
.course-homework-attachments-head small{font-size:9px;color:#777}
.course-homework-attachment-actions{display:flex;gap:6px;align-items:center}
.course-homework-attachment-list{display:grid;gap:5px}
.course-homework-attachment-item{
    display:grid;
    grid-template-columns:24px minmax(0,1fr) 26px;
    gap:7px;
    align-items:center;
    padding:7px 8px;
    border:1px solid #ece8df;
    border-radius:9px;
    background:#fff
}
.course-homework-attachment-index{
    display:grid;
    place-items:center;
    width:22px;
    height:22px;
    border-radius:50%;
    background:#f2eee4;
    color:#785f2a;
    font-size:8px;
    font-weight:900
}
.course-homework-attachment-item a{
    color:#285746;
    font-size:9px;
    font-weight:800;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.course-homework-attachment-item button{
    border:0;
    background:transparent;
    color:#a4514a;
    font-size:15px;
    font-weight:900;
    cursor:pointer;
    line-height:1
}
.course-homework-attachments-empty{
    padding:10px;
    text-align:center;
    color:#8a877f;
    font-size:9px
}
.course-homework-safety-note{
    border-radius:10px;
    padding:8px 10px;
    font-size:9px;
    background:#f6f3ea;
    color:#355b4d
}

@media (max-width:760px){
    .course-homework-fields{
        grid-template-columns:1fr;
        gap:7px
    }
    .course-homework-title,
    .course-homework-instructions{grid-column:1}
    .course-homework-attachments-head{
        align-items:flex-start;
        flex-direction:column
    }
    .course-homework-attachment-actions{width:100%}
    .course-homework-attachment-actions .course-workspace-btn{
        flex:1;
        min-width:0;
        padding-inline:6px;
        font-size:8px
    }
}

/* COURSE-3H3 — UNIT SEQUENCE + ASSESSMENT EXAM LINK */
.course-assessment-exam-linker{
    display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.55fr);
    gap:10px;align-items:end
}
.course-assessment-exam-help{
    border:1px solid #e4dfd3;border-radius:12px;background:#fffdf8;
    padding:10px 12px;display:grid;gap:3px;min-height:62px
}
.course-assessment-exam-help strong{color:#1f4b3c;font-size:11px}
.course-assessment-exam-help span{color:#746e62;font-size:9px;line-height:1.55}
.course-content-unit-exams,.course-content-subheading{display:none!important}
.course-content-sequence{display:grid;gap:8px}
.course-content-unit-exam-add{
    border:1px solid #d8cba9;background:#fffaf0;color:#6e5722;
    min-height:32px;border-radius:9px;padding:5px 10px;font:inherit;
    font-size:9px;font-weight:900;cursor:pointer;white-space:nowrap
}
.course-content-sequence-exam{
    display:grid;grid-template-columns:34px 30px minmax(0,1fr) auto;
    align-items:center;gap:8px;min-height:58px;padding:8px 10px;
    border:1px solid #e6dcc3;border-radius:11px;background:#fffaf0
}
.course-content-sequence-order{
    width:28px;height:28px;border-radius:9px;background:#f4ead0;
    display:grid;place-items:center;color:#765d23;font-size:10px;font-weight:900
}
.course-content-sequence-exam-icon{color:#a77c20;font-size:16px;text-align:center}
.course-content-sequence-exam-title{min-width:0;display:grid;gap:2px}
.course-content-sequence-exam-title strong{
    color:#173f32;font-size:11px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis
}
.course-content-sequence-exam-title small{color:#81786a;font-size:8px}
.course-content-sequence-exam-actions{display:flex;align-items:center;gap:5px}
.course-content-sequence-move{
    width:28px;height:28px;border:1px solid #e1d7c2;border-radius:8px;
    background:#fff;color:#425c51;font:inherit;font-size:11px;font-weight:900;cursor:pointer
}
.course-content-sequence-edit-exam{
    border:1px solid #d7dfda;border-radius:8px;background:#f8fbf9;color:#245040;
    min-height:28px;padding:4px 8px;font:inherit;font-size:8px;font-weight:900;
    cursor:pointer;white-space:nowrap
}
.course-content-empty-actions{
    display:flex;align-items:center;gap:7px;justify-content:center;flex-wrap:wrap
}

@media (max-width:760px){
    .course-assessment-exam-linker{grid-template-columns:1fr}
    .course-content-unit-actions{gap:4px}
    .course-content-unit-exam-add{padding-inline:7px;font-size:8px}
    .course-content-sequence-exam{
        grid-template-columns:28px 24px minmax(0,1fr);gap:6px;padding:8px
    }
    .course-content-sequence-order{width:25px;height:25px;font-size:9px}
    .course-content-sequence-exam-actions{
        grid-column:1 / -1;justify-content:flex-end;padding-top:3px
    }
}


/* COURSE-3H5 V2 — MOBILE / UNIT VISUAL POLISH */
.course-content-unit{
    border-color:#b8aa88;
    background:#173f32;
    overflow:hidden;
}
.course-content-unit-head{
    background:linear-gradient(135deg,#173f32 0%,#214f3f 100%);
    color:#fff;
    border-bottom-color:rgba(255,255,255,.12);
}
.course-content-unit-body{background:#fbf8f1}
.course-content-unit-title strong{color:#fff}
.course-content-unit-title small{color:rgba(255,255,255,.72)}
.course-content-unit-index{background:rgba(255,255,255,.12);color:#fff}
.course-content-unit-toggle{
    background:rgba(255,255,255,.10);
    border-color:rgba(255,255,255,.30);
    color:#fff;
}
.course-content-unit-head .course-content-status{
    background:rgba(255,255,255,.12);
    color:#fff;
    border-color:rgba(255,255,255,.18);
}
.course-content-unit-head .course-content-icon-btn{
    background:#fff;
    border-color:rgba(255,255,255,.42);
    color:#173f32;
}
.course-content-unit-lesson-add,
.course-content-unit-exam-add{
    border:1px solid rgba(255,255,255,.32);
    background:rgba(255,255,255,.10);
    color:#fff;
    min-height:32px;
    border-radius:9px;
    padding:5px 9px;
    font:inherit;
    font-size:9px;
    font-weight:900;
    cursor:pointer;
    white-space:nowrap;
}
.course-content-unit-lesson-add:hover,
.course-content-unit-exam-add:hover{background:rgba(255,255,255,.18)}
.course-assessment-exam-linker{grid-template-columns:1fr}
.course-content-lesson-title-row{
    display:flex;
    align-items:center;
    gap:7px;
    min-width:0;
}
.course-content-lesson-title-row strong{min-width:0;flex:1}
.course-content-lesson-title-edit{
    flex:0 0 auto;
    width:28px;
    height:28px;
    display:grid;
    place-items:center;
    border:1px solid #ded5c2;
    border-radius:8px;
    background:#fff;
    color:#173f32;
    font:inherit;
    font-size:11px;
    font-weight:900;
    cursor:pointer;
}
.course-content-lesson-actions:empty{display:none}
.course-inline-action-buttons{
    display:flex;
    align-items:center;
    gap:8px;
}
.course-inline-action-buttons .course-workspace-btn{
    white-space:nowrap;
    word-break:normal;
}

@media (max-width:760px){
    .course-content-unit-head{padding:10px 9px}
    .course-content-unit-actions{
        width:100%;
        display:grid;
        grid-template-columns:auto 1fr 1fr auto;
        gap:5px;
        align-items:center;
    }
    .course-content-unit-actions .course-content-status{justify-self:start}
    .course-content-unit-lesson-add,
    .course-content-unit-exam-add{
        width:100%;
        min-width:0;
        padding-inline:6px;
        font-size:8px;
    }
    .course-content-lesson-title-row{width:100%}
    .course-content-lesson-title-edit{width:30px;height:30px}
    .course-inline-action-buttons{
        width:100%;
        justify-content:flex-start;
        gap:8px;
    }
    .course-inline-action-buttons .course-workspace-btn{
        flex:0 0 auto;
        width:auto;
        max-width:none;
        white-space:nowrap;
        word-break:normal;
        line-height:1.2;
        padding-inline:12px;
    }
    .course-inline-action-buttons [data-inline-lesson-close]{min-width:72px}
    .course-inline-action-buttons [data-inline-lesson-save]{min-width:112px}
}

/* COURSE-3H7 — LESSON MOVE CONTROLS */
.course-content-lesson-title-actions{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:4px;
}

@media (max-width:760px){
    .course-content-lesson-title-actions{gap:3px}
    .course-content-lesson-title-actions .course-content-sequence-move,
    .course-content-lesson-title-actions .course-content-lesson-title-edit{
        width:28px;
        height:28px;
    }
}

/* COURSE-3J2 — CENTER SESSION TAB */
.course-center-session-panel{
  display:grid;
  gap:9px;
}
.course-center-session-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.course-center-session-head strong{
  display:block;
  color:#173f32;
  font-size:17px;
  font-weight:950;
}
.course-center-session-head p{
  margin:4px 0 0;
  color:#667085;
  font-size:13px;
  line-height:1.7;
}
.course-center-session-count{
  flex:none;
  border:1px solid #dfd2b7;
  background:#fff9eb;
  color:#94651c;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
}
.course-center-session-status,
.course-center-session-empty{
  padding:11px 12px;
  border-radius:13px;
  background:#f8faf9;
  border:1px solid #e6ece9;
  color:#53665e;
  font-size:13px;
  font-weight:800;
}
.course-center-session-status[data-type="error"]{
  background:#fff4f3;
  border-color:#fecaca;
  color:#b42318;
}
.course-center-session-status[data-type="success"]{
  background:#ecfdf3;
  border-color:#abefc6;
  color:#067647;
}
.course-center-session-list{
  display:grid;
  gap:6px;
}
.course-center-session-card{
  position:relative;
  display:grid;
  grid-template-columns:20px minmax(0,1fr);
  gap:8px;
  align-items:center;
  padding:8px 10px;
  border:1px solid #e4e8e6;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  transition:
    border-color .15s ease,
    background .15s ease,
    box-shadow .15s ease;
}
.course-center-session-card:hover{
  border-color:#c9b88f;
}
.course-center-session-card.is-linked,
.course-center-session-card:has(input:checked){
  border-color:#c79a45;
  background:#fffcf5;
  box-shadow:0 8px 20px rgba(44,68,57,.06);
}
.course-center-session-card input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.course-center-session-check{
  width:19px;
  height:19px;
  border:2px solid #cbd5d1;
  border-radius:7px;
  background:#fff;
  display:grid;
  place-items:center;
}
.course-center-session-card input:checked +
.course-center-session-check{
  border-color:#1f6b50;
  background:#1f6b50;
}
.course-center-session-card input:checked +
.course-center-session-check::after{
  content:"✓";
  color:#fff;
  font-size:13px;
  font-weight:950;
}
.course-center-session-main{
  display:grid;
  gap:2px;
  min-width:0;
}
.course-center-session-main b{
  color:#173f32;
  font-size:13px;
  font-weight:950;
}
.course-center-session-main small{
  color:#667085;
  font-size:10px;
  line-height:1.55;
}
.course-center-session-tags{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.course-center-session-tags em{
  font-style:normal;
  border-radius:999px;
  padding:3px 7px;
  background:#f2f4f3;
  color:#607069;
  font-size:10px;
  font-weight:900;
}
.course-center-session-tags em.linked{
  background:#eef8f2;
  color:#17633f;
}
.course-center-session-actions{
  display:flex;
  justify-content:flex-end;
}
@media(max-width:680px){
  .course-center-session-head{
    align-items:center;
  }

  .course-center-session-head p{
    font-size:12px;
  }

  .course-center-session-card{
    padding:8px 9px;
    gap:7px;
  }

  .course-center-session-actions
  .course-workspace-btn{
    width:100%;
  }
}

/* COURSE_3L1B_INLINE_UNIT_EDITOR — canonical */
.course-inline-unit-editor{
  margin:0 0 4px;
  border:1px solid #bfcfc5;
  border-radius:13px;
  background:#f8fcf9;
  box-shadow:0 8px 26px rgba(23,59,44,.08);
  overflow:hidden;
}
.course-inline-unit-form{display:grid}
.course-inline-unit-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:11px 12px;
  border-bottom:1px solid #dfe9e3;
  background:#f0f7f2;
}
.course-inline-unit-head small{
  display:block;
  color:#769181;
  font-size:8px;
  font-weight:900;
}
.course-inline-unit-head h3{
  margin:2px 0 0;
  color:var(--cw-green);
  font-size:14px;
}
.course-inline-unit-body{
  padding:12px;
  background:#fff;
}
.course-inline-unit-fields{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(95px,.45fr) minmax(150px,.7fr);
  gap:10px;
  align-items:end;
}
.course-inline-unit-description{
  grid-column:1 / span 2;
}
.course-inline-unit-publish{
  align-self:end;
}
.course-inline-unit-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-top:1px solid #e5ebe7;
  background:#fbfdfb;
}
.course-content-unit.is-unit-editing > .course-content-unit-head{
  box-shadow:inset 0 -2px 0 #c79a45;
}

@media (max-width:760px){
  .course-inline-unit-editor{
    margin-top:1px;
    border-radius:11px;
  }
  .course-inline-unit-head{padding:9px 10px}
  .course-inline-unit-head h3{font-size:12px}
  .course-inline-unit-body{padding:9px}
  .course-inline-unit-fields{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .course-inline-unit-description{grid-column:1 / -1}
  .course-inline-unit-publish{min-height:39px}
  .course-inline-unit-actions{
    display:grid;
    gap:7px;
    padding:8px 9px;
  }
}

/* COURSE_3L1C_SAFE_DELETE — canonical destructive UX */
.course-content-danger-trigger{
  border:1px solid #e1aaa4!important;
  background:#fff7f6!important;
  color:#a1271d!important;
  box-shadow:none!important;
}
.course-content-danger-trigger:hover{
  border-color:#c63b2e!important;
  background:#fff0ee!important;
  color:#8f1d14!important;
}
.course-content-copy-trigger{
  border:1px solid #d8c99e!important;
  background:#fffaf0!important;
  color:#755b20!important;
  box-shadow:none!important;
}
.course-content-destructive-row{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-top:10px;padding:9px 10px;border:1px solid #ead9d5;
  border-radius:11px;background:#fffafa;
}
.course-content-destructive-row>span{
  color:#80635f;font-size:9px;line-height:1.6;font-weight:750;
}
dialog.course-delete-dialog{
  position:fixed;inset:0;width:100vw;height:100vh;max-width:none;max-height:none;
  margin:0;padding:18px;border:0;background:transparent;overflow:auto;
  z-index:2147483000;
}
dialog.course-delete-dialog[open]{display:grid;place-items:center}
dialog.course-delete-dialog::backdrop{
  background:rgba(7,20,15,.76);backdrop-filter:blur(7px);
}
.course-delete-card{
  width:min(600px,96vw);display:grid;gap:15px;padding:24px;
  border:1px solid rgba(255,255,255,.55);border-radius:24px;
  background:radial-gradient(circle at top right,rgba(198,154,75,.12),transparent 34%),#fff;
  box-shadow:0 30px 90px rgba(0,0,0,.34);color:#173b2c;
}
.course-delete-icon{
  width:58px;height:58px;display:grid;place-items:center;border-radius:18px;
  background:#fff0ee;color:#b42318;font-size:32px;font-weight:950;
  box-shadow:inset 0 0 0 1px #ffd2cc;
}
.course-delete-copy{display:grid;gap:6px}
.course-delete-kicker{color:#b42318;font-size:11px;font-weight:950}
.course-delete-copy h3{margin:0;color:#173b2c;font-size:22px;line-height:1.5}
.course-delete-copy p{margin:0;color:#667085;font-size:12px;line-height:1.8;font-weight:700}
.course-delete-impact-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;
}
.course-delete-impact-grid>div{
  display:grid;justify-items:center;gap:2px;min-height:62px;padding:9px 6px;
  border:1px solid #e8e1d5;border-radius:12px;background:#fbfaf7;text-align:center;
}
.course-delete-impact-grid b{color:#173b2c;font-size:17px}
.course-delete-impact-grid span{color:#766c5d;font-size:9px;font-weight:800}
.course-delete-warning{
  padding:12px 14px;border:1px solid #f3c8c2;border-radius:14px;
  background:#fff6f4;color:#8f1d14;font-size:11px;font-weight:850;line-height:1.7;
}
.course-delete-blockers{display:grid;gap:7px}
.course-delete-blockers>div{
  display:grid;grid-template-columns:34px minmax(0,1fr);gap:9px;align-items:center;
  padding:10px 12px;border:1px solid #f3c8c2;border-radius:13px;background:#fff6f4;
}
.course-delete-blockers strong{
  display:grid;place-items:center;width:32px;height:32px;border-radius:9px;
  background:#b42318;color:#fff;font-size:11px;
}
.course-delete-blockers span{color:#8f1d14;font-size:10px;font-weight:850;line-height:1.65}
.course-delete-card footer{display:grid;grid-template-columns:1fr 1.35fr;gap:10px}
.course-delete-card footer button{
  min-height:46px;border-radius:13px;font:900 12px/1 inherit;cursor:pointer;
}
.course-delete-cancel{border:1px solid #d9d3c8;background:#fff;color:#173b2c}
.course-delete-confirm{
  border:1px solid #b42318;background:#b42318;color:#fff;
  box-shadow:0 9px 22px rgba(180,35,24,.22);
}
@media(max-width:760px){
  .course-inline-action-buttons{flex-wrap:wrap}
  .course-content-destructive-row{align-items:stretch;flex-direction:column}
  .course-content-destructive-row .course-workspace-btn{width:100%}
  .course-delete-card{padding:18px;border-radius:20px}
  .course-delete-impact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .course-delete-card footer{grid-template-columns:1fr}
}
