/* /courseadm/assets/css/app.css — application styles on top of Bootstrap 5 */
/* Colours follow the main site skin (css/skin-promos.css) */
:root {
    --brand: #ca4e23;
    --brand-dark: #a63f1b;
    --admin: #1f2937;
    --surface: #eef0f4;
}

/* Same body font as /home.php */
body.courseadm {
    font-family: 'Exo', sans-serif;
    background: #fff;
}


/* Sub-navigation of the applicant / administrator areas */
.courseadm-subnav {
    background: var(--surface);
    border-bottom: 1px solid #dde1e8;
    padding: .35rem 0;
}

.courseadm-subnav.subnav-admin {
    background: var(--admin);
}

.courseadm-subnav .subnav-title {
    font-weight: 700;
    color: var(--brand);
}

.courseadm-subnav.subnav-admin .subnav-title {
    color: #ffc078;
}

.courseadm-subnav .nav-link {
    color: #374151;
    font-size: .9rem;
}

.courseadm-subnav .nav-link.active,
.courseadm-subnav .nav-link:hover {
    color: var(--brand);
}

.courseadm-subnav.subnav-admin .nav-link {
    color: #e5e7eb;
}

.courseadm-subnav.subnav-admin .nav-link.active,
.courseadm-subnav.subnav-admin .nav-link:hover {
    color: #ffc078;
}

.courseadm-subnav .navbar-toggler {
    border: 0;
    color: inherit;
}

.courseadm-subnav.subnav-admin .navbar-toggler {
    color: #fff;
}

.courseadm-content {
    min-height: 50vh;
}

.bg-brand {
    background: var(--brand) !important;
}

.bg-admin {
    background: var(--admin) !important;
}

.btn-brand {
    background: var(--brand);
    color: #fff;
}

.btn-brand:hover,
.btn-brand:focus {
    background: var(--brand-dark);
    color: #fff;
}

.text-brand {
    color: var(--brand) !important;
}

.navbar .nav-link.active {
    font-weight: 600;
}

.card {
    border-radius: .6rem;
    border-color: #e3e7ef;
}

.card-header {
    background: #fff;
}

fieldset.card>legend.card-header {
    float: none;
    font-size: 1rem;
    padding: .75rem 1rem;
    border-radius: .6rem .6rem 0 0;
}

/* Public course pages */
.hero {
    background: linear-gradient(135deg, #2c3e50 0%, var(--brand) 100%);
    color: #fff;
    border-radius: .8rem;
}

.hero h1,
.hero .lead {
    color: #fff;
}

.course-card {
    transition: box-shadow .15s ease, transform .15s ease;
}

.course-card:hover {
    box-shadow: 0 .5rem 1.25rem rgba(11, 61, 145, .12) !important;
    transform: translateY(-2px);
}

.course-meta dt {
    font-weight: 600;
    color: #4a5568;
}

.prose {
    white-space: normal;
}

.module-item .accordion-button:not(.collapsed) {
    background: #fbeee9;
    color: var(--brand-dark);
}

/* Dashboard stat tiles */
.stat-tile {
    border-left: 4px solid var(--brand);
}

.stat-tile .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-tile.warn {
    border-left-color: #f59f00;
}

.stat-tile.ok {
    border-left-color: #2f9e44;
}

.stat-tile.bad {
    border-left-color: #e03131;
}

/* Application wizard */
.wizard-nav .nav-link {
    border-radius: .5rem;
    color: #374151;
}

.wizard-nav .nav-link.active {
    background: var(--brand);
    color: #fff;
}

.wizard-nav .step-num {
    display: inline-flex;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #374151;
    font-weight: 700;
    font-size: .8rem;
    margin-right: .4rem;
}

.wizard-nav .nav-link.active .step-num {
    background: #fff;
    color: var(--brand);
}

.checklist li {
    padding: .3rem 0;
}

/* Document manager */
.doc-entry {
    border: 1px solid #dfe3eb;
    border-radius: .6rem;
    background: #fff;
    padding: 1rem;
    transition: border-color .2s;
}

.doc-entry.state-success {
    border-left: 5px solid #2f9e44;
}

.doc-entry.state-missing {
    border-left: 5px solid #f59f00;
}

.doc-entry.state-error {
    border-left: 5px solid #e03131;
}

.doc-entry.state-uploading {
    border-left: 5px solid #1c7ed6;
}

.doc-entry .progress {
    height: 1.1rem;
}

.doc-entry .file-info {
    word-break: break-all;
}

.doc-entry input[type=file] {
    max-width: 100%;
}

.doc-status {
    font-size: .875rem;
}

/* Tables */
.table-responsive {
    border-radius: .6rem;
}

.table> :not(caption)>*>* {
    vertical-align: middle;
}

.snapshot-table th {
    width: 40%;
    font-weight: 600;
    color: #4a5568;
}

.timeline {
    list-style: none;
    padding-left: 0;
}

.timeline li {
    border-left: 2px solid #d0d7e2;
    padding: 0 0 .9rem 1rem;
    position: relative;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -6px;
    top: .3rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand);
}

video.course-video {
    width: 100%;
    max-height: 70vh;
    background: #000;
    border-radius: .5rem;
}

@media (max-width: 575.98px) {
    .btn-responsive {
        width: 100%;
    }

    .stat-tile .stat-value {
        font-size: 1.4rem;
    }
}

/* ---- Lessons, videos and progress (adm/course-content.php, admin progress) ---- */
.video-frame {
    background: #000;
    border-radius: .5rem;
    overflow: hidden;
}

.course-video {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
    border-radius: .5rem;
}

.learning-progress {
    min-width: 16rem;
    max-width: 26rem;
    flex: 1 1 16rem;
}

.learning-progress .progress {
    height: .6rem;
    margin: .25rem 0;
}

.progress-thin {
    height: .45rem;
}

.complete-box {
    background: #f8f9fa;
}

.lesson-nav {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

/* "Programma del corso": lesson title → category (Lezione / Conversazione, orange) → indented video list, status marker on the right */
.lesson-nav-body {
    padding: .25rem 1.25rem 1.25rem;
}

.lesson-block {
    border-top: 1px solid var(--bs-border-color);
    padding-bottom: .75rem;
}

.lesson-block:first-child {
    border-top: 0;
}

.lesson-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #212529;
    padding-bottom: .4rem;
}

.lesson-block.is-locked .lesson-title {
    color: var(--bs-secondary-color);
}

.lesson-cat {
    color: var(--brand);
    font-weight: 700;
    font-size: .9rem;
    padding: .5rem 0 .2rem;
}

.lesson-block ul {
    padding-left: 0.4rem;
    margin: 0;
}

.lesson-video {
    display: flex;
    gap: .6rem;
    align-items: baseline;
    padding: .4rem .6rem;
    border-radius: .35rem;
    color: inherit;
    text-decoration: none;
}

.lesson-video-title {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    padding-left: 0.4rem;
}

.lesson-video-title::before {
    content: "\2022";
    position: absolute;
    left: -0.45rem;
    color: #8a8f94;
    font-weight: 400;
    font-size: 2rem;
}

.lesson-video-time {
    white-space: nowrap;
    color: var(--bs-secondary-color);
    font-size: .9em;
}

.lesson-video-marker {
    flex: 0 0 1.1em;
    text-align: center;
}

a.lesson-video:hover,
a.lesson-video:focus-visible {
    background: #fbeee9;
}

.lesson-video.active {
    background: #fbeee9;
    color: var(--brand-dark);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--brand);
}

.lesson-video.is-locked {
    color: var(--bs-secondary-color);
    cursor: not-allowed;
}

.lesson-empty {
    padding: .25rem 0 0 2rem;
}

.lecturer-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 56px;
}

.lecturer-photo-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
}

.reset-form {
    max-width: 28rem;
    text-align: start;
}

@media (max-width: 991.98px) {
    .lesson-nav {
        position: static;
        max-height: none;
    }
}

/* ---- Lesson list (adm/course-content.php) ---- */
.lesson-list {
    margin: 0;
    padding: 0;
}

.lesson-item {
    position: relative;
    border-left: 4px solid var(--bs-border-color);
}

.lesson-item:hover {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .08) !important;
}

.lesson-item.is-completed {
    border-left-color: var(--bs-success);
}

.lesson-item.is-lectures_done {
    border-left-color: var(--bs-info);
}

.lesson-item.is-in_progress {
    border-left-color: var(--bs-warning);
}

.lesson-item.is-locked {
    background: #f8f9fa;
    color: var(--bs-secondary-color);
}

.lesson-item.is-locked:hover {
    box-shadow: none !important;
}

.lesson-number {
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: #fbeee9;
    color: var(--brand-dark);
}

.lesson-item.is-completed .lesson-number {
    background: var(--bs-success);
    color: #fff;
}

.lesson-item.is-locked .lesson-number {
    background: #e9ecef;
    color: #6c757d;
}

.lesson-item-title {
    font-size: 1.05rem;
}

.lesson-item-title a {
    color: inherit;
    text-decoration: none;
}

.lesson-item-title a:hover,
.lesson-item-title a:focus-visible {
    color: var(--brand);
    text-decoration: underline;
}

.lesson-item-progress {
    flex: 0 0 12rem;
    width: 12rem;
}

.lesson-lock-reason {
    font-size: .9em;
}

.min-w-0 {
    min-width: 0;
}

.continue-card {
    border-left: 4px solid var(--brand);
}

@media (max-width: 767.98px) {
    .lesson-item-progress {
        flex-basis: 100%;
        width: 100%;
    }
}