:root {
    --orange: #FF6B00;
    --orange-dark: #E05A00;
    --orange-light: #FFF0E6;
    --blue: #0056B3;
    --blue-dark: #004494;
    --blue-light: #E6F0FF;
    --white: #FFFFFF;
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-600: #6C757D;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 20px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    margin: 0;
    overflow-x: hidden;
}

img, video, iframe, canvas {
    max-width: 100%;
}

/* ===================== LOGIN PAGE ===================== */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(160deg, var(--orange-light) 0%, var(--white) 40%, var(--blue-light) 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.login-page-inner {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 20px 190px;
    min-height: 0;
}

.login-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-logo {
    max-height: 72px;
    max-width: 100%;
    width: auto;
    margin: 0 auto 24px;
    display: block;
}

.brand-title {
    color: var(--orange);
    font-weight: 700;
    text-align: center;
}

.brand-subtitle {
    color: var(--gray-600);
    font-size: 0.9rem;
    text-align: center;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-md);
}

.login-forgot-link {
    font-size: 0.88rem;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
}

.login-forgot-link:hover {
    color: var(--orange);
    text-decoration: underline;
}

.login-support-box {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 300px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 40, 90, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-support-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 40, 90, 0.16);
}

.login-support-box.has-references {
    bottom: 210px;
}

.login-support-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--orange-light);
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.login-support-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
}

.login-support-phone {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--orange);
    text-decoration: none;
    margin-bottom: 4px;
}

.login-support-phone:hover {
    color: var(--orange-dark);
    text-decoration: underline;
}

.login-support-text {
    margin: 0;
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.login-modal {
    border: none;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(0, 40, 90, 0.16);
}

.login-modal-support {
    background: var(--orange-light);
    border-radius: 12px;
}

.login-modal-phone {
    display: inline-flex;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--orange);
    text-decoration: none;
}

.login-modal-phone:hover {
    color: var(--orange-dark);
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .login-support-box.has-references {
        bottom: 180px;
    }
}

@media (max-width: 575.98px) {
    .login-support-box {
        left: 12px;
        right: 12px;
        bottom: 24px;
        max-width: none;
        padding: 12px 14px;
    }

    .login-support-box.has-references {
        bottom: 148px;
    }

    .login-support-phone {
        font-size: 0.95rem;
    }

    .login-support-text {
        font-size: 0.76rem;
    }
}

/* Referans logo slider — sonsuz kayan şerit */
.login-references-section {
    --ref-gap: 24px;
    --ref-card-size: 150px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    width: 100%;
    padding: 14px 0 22px;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.login-references-slider {
    width: 100%;
    overflow: hidden;
    pointer-events: auto;
}

.login-references-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    animation: loginReferencesScroll var(--ref-duration, 36s) linear infinite;
}

.login-references-slider:hover .login-references-track {
    animation-play-state: paused;
}

.login-references-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    flex: 0 0 auto;
    flex-shrink: 0;
    gap: var(--ref-gap);
    padding-right: var(--ref-gap);
}

@keyframes loginReferencesScroll {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(-50%, 0, 0);
    }
}

.reference-card {
    flex: 0 0 var(--ref-card-size);
    width: var(--ref-card-size);
    height: var(--ref-card-size);
    flex-shrink: 0;
    padding: 14px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reference-card img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

@media (max-width: 991.98px) {
    .login-references-section {
        --ref-gap: 20px;
        --ref-card-size: 130px;
    }
}

@media (max-width: 575.98px) {
    .login-references-section {
        --ref-gap: 16px;
        --ref-card-size: 110px;
        padding: 10px 0 18px;
    }

    .login-page-inner {
        padding-bottom: 150px;
    }

    .reference-card {
        border-radius: 12px;
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-references-track {
        animation: none;
        transform: none;
    }
}

.login-copyright {
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 12px;
}

.admin-login-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* ===================== TEACHER LAYOUT ===================== */
.teacher-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    background-color: #ffffff;
    background-attachment: fixed;
}

.teacher-layout.has-default-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%230056B3' stroke-width='1' opacity='0.1'%3E%3Ccircle cx='60' cy='60' r='22'/%3E%3Cpath d='M52 60h16M60 52v16'/%3E%3Crect x='150' y='40' width='36' height='44' rx='4'/%3E%3Crect x='40' y='150' width='44' height='28' rx='4'/%3E%3Ccircle cx='180' cy='180' r='16'/%3E%3Cpath d='M110 50c10 0 18 8 18 18s-8 18-18 18'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-position: top left;
    background-size: 240px 240px;
}

.teacher-layout.has-custom-bg {
    background-image: var(--teacher-bg-url);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.teacher-bg-preview {
    height: 160px;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.teacher-layout > .teacher-navbar-wrap,
.teacher-layout > main,
.teacher-layout > footer {
    position: relative;
}

.teacher-layout > main,
.teacher-layout > footer {
    z-index: 1;
}

/* Navbar — beyaz yuvarlak bar, logo sol, menü orta, kullanıcı+çıkış sağ */
.teacher-navbar-wrap {
    padding: 14px 16px 0;
    position: sticky;
    top: 0;
    z-index: 99999;
    overflow: visible;
}

.teacher-navbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand center right";
    align-items: center;
    gap: 12px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 14px 22px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 40, 90, 0.1);
    overflow: visible;
    position: relative;
    z-index: 1;
}

.teacher-brand {
    grid-area: brand;
    flex-shrink: 0;
    text-decoration: none;
}

.teacher-brand img {
    height: 48px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.teacher-brand-text {
    color: var(--orange);
    font-weight: 800;
    font-size: 1.1rem;
}

.teacher-nav-center {
    grid-area: center;
    display: flex;
    justify-content: center;
    overflow: visible;
}

.teacher-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: visible;
}

.teacher-nav-link {
    display: inline-block;
    padding: 10px 22px;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 10px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.teacher-nav-link:hover,
.teacher-nav-link.is-active {
    color: var(--orange);
    background: var(--orange-light);
}

.teacher-nav-right {
    grid-area: right;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.teacher-user-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.teacher-logout-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.15rem;
    transition: color 0.2s, border-color 0.2s;
}

.teacher-logout-icon:hover {
    color: #c0392b;
    border-color: #c0392b;
}

.teacher-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    grid-area: right;
}

.teacher-nav-toggle span {
    display: block;
    height: 2px;
    background: #333;
    border-radius: 1px;
}

.teacher-nav-dropdown {
    position: relative;
    overflow: visible;
}

.teacher-nav-dropdown .classes-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    padding: 10px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.teacher-nav-dropdown .classes-toggle-label,
.teacher-nav-dropdown .classes-toggle-arrow {
    flex-shrink: 0;
}

.teacher-nav-dropdown .classes-toggle-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.25s ease;
}

.teacher-nav-dropdown.is-open .classes-toggle,
.teacher-nav-dropdown .classes-toggle.is-open {
    color: var(--orange);
    background: var(--orange-light);
}

.teacher-nav-dropdown.is-open .classes-toggle-arrow,
.teacher-nav-dropdown .classes-toggle.is-open .classes-toggle-arrow {
    transform: rotate(180deg);
}

.classes-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    max-width: min(320px, calc(100vw - 32px));
    max-height: 360px;
    overflow: visible;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 40, 90, 0.16), 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, -6px, 0);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.classes-dropdown-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
}

.classes-dropdown-panel.is-portaled {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100000;
}

.classes-dropdown-panel.is-portaled::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.classes-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    max-height: 344px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 16px;
}

.classes-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.92rem;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.35;
    transition: background 0.18s ease, color 0.18s ease;
}

.classes-dropdown-item:hover,
.classes-dropdown-item:focus {
    background: var(--orange);
    color: #fff;
    outline: none;
}

.classes-dropdown-item.disabled {
    color: var(--gray-600);
    cursor: default;
    pointer-events: none;
}

.teacher-main {
    flex: 1;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 28px 20px 32px;
}

.teacher-alert {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-sm);
}

.teacher-footer {
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid rgba(0, 86, 179, 0.1);
    text-align: center;
    padding: 16px 20px;
    font-size: 0.84rem;
    color: var(--gray-600);
    margin-top: auto;
    flex-shrink: 0;
}

/* Teacher home video */
.home-video-wrap {
    width: 100%;
    padding: 12px 0 24px;
}

.home-video-card {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 40, 90, 0.12);
    overflow: hidden;
    padding: 10px;
}

.home-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.home-video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.home-empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--gray-600);
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 480px;
}

/* ===================== CLASS DETAIL — referans ===================== */
.class-detail-page {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

.package-header-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.package-title {
    margin: 0;
    font-size: clamp(1rem, 2.8vw, 1.25rem);
    font-weight: 700;
    color: #222;
    letter-spacing: 0.01em;
    line-height: 1.4;
    word-break: break-word;
}

.btn-program-list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px 20px;
    background: #fff;
    color: #28a745;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border: 2px solid #28a745;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.btn-program-list:hover {
    background: #28a745;
    color: #fff;
}

.program-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.program-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    min-height: 90px;
    padding: 16px 22px;
    background: var(--orange);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.25);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.program-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.3);
    color: #fff;
}

.program-number {
    flex-shrink: 0;
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    min-width: 48px;
}

.program-text {
    flex: 1;
    color: #fff;
    font-weight: 600;
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    line-height: 1.35;
    word-break: break-word;
}

.class-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    color: #666;
}

@media (min-width: 576px) {
    .program-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .program-card {
        min-height: 100px;
    }
}

@media (min-width: 992px) {
    .program-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .program-card {
        min-height: 110px;
    }
}

/* ===================== EXPERIMENT DETAIL — referans ===================== */
.experiment-page {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 0;
}

.experiment-hero-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 32px 28px 28px;
    text-align: center;
    margin-bottom: 20px;
}

.experiment-slogan {
    color: #28a745;
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    font-weight: 600;
    margin: 0 0 14px;
    line-height: 1.5;
}

.experiment-title {
    color: var(--orange);
    font-size: clamp(1.75rem, 5.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 10px;
    word-break: break-word;
}

.experiment-brand {
    color: var(--orange);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    margin: 0;
    font-weight: 500;
    opacity: 0.85;
}

.exp-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.exp-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    color: #fff;
}

.exp-action-btn:hover:not(:disabled) {
    opacity: 0.92;
}

.exp-action-btn.btn-yonerge {
    background: #0056B3;
}

.exp-action-btn.btn-video {
    background: #dc3545;
}

.exp-action-btn.btn-feedback {
    background: #28a745;
}

.exp-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.panel-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-600);
}

.panel-empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    color: var(--gray-300);
}

.experiment-panel {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 40, 90, 0.1);
    padding: 24px;
    margin-top: 4px;
    overflow: hidden;
}

.experiment-panel-video {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.panel-back-btn {
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 0.9rem;
    padding: 0 0 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.panel-back-btn:hover {
    color: var(--orange);
}

/* PDF Viewer */
.pdf-viewer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    overflow: hidden;
}

.pdf-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.pdf-toolbar button {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pdf-toolbar button:hover:not(:disabled) {
    border-color: var(--orange);
    color: var(--orange);
}

.pdf-toolbar button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pdf-page-info {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin: 0 4px;
}

.pdf-body {
    display: flex;
    gap: 12px;
    min-height: 400px;
    max-height: 70vh;
    overflow: hidden;
}

.pdf-thumbnails {
    width: 90px;
    flex-shrink: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.pdf-thumb {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.pdf-thumb.active {
    border-color: var(--orange);
}

.pdf-thumb canvas {
    display: block;
    width: 100%;
    height: auto;
}

.pdf-canvas-wrap {
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #525659;
    border-radius: var(--radius-sm);
    padding: 12px;
    min-width: 0;
}

.pdf-canvas-wrap canvas {
    box-shadow: var(--shadow-md);
    max-width: 100%;
    height: auto !important;
}

.video-panel-wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 4px;
}

.video-embed-card {
    background: #fff;
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 16px 48px rgba(0, 40, 90, 0.14);
    overflow: hidden;
}

.video-panel-wrap .ratio,
.video-embed-card .ratio {
    border-radius: 14px;
    overflow: hidden;
}

@media (min-width: 992px) {
    .video-panel-wrap .ratio {
        --bs-aspect-ratio: 52%;
    }
}

/* Feedback form */
.feedback-form-modern .feedback-question {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
}

.feedback-form-modern .feedback-question label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
    line-height: 1.5;
}

.feedback-form-modern .form-select,
.feedback-form-modern .form-control {
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-300);
}

.feedback-form-modern .btn-submit {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    border: none;
    color: var(--white);
    padding: 12px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    width: 100%;
    max-width: 280px;
    display: block;
    margin: 8px auto 0;
}

.feedback-form-modern .btn-submit:hover {
    opacity: 0.95;
    color: var(--white);
}

/* Class cards */
.class-card,
.experiment-card {
    border-radius: 16px !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid rgba(0, 86, 179, 0.1) !important;
    background: #fff !important;
    box-shadow: 0 4px 20px rgba(0, 40, 90, 0.07) !important;
}

.class-card .card-body,
.experiment-card .card-body {
    padding: 20px 22px !important;
}

.class-card:hover,
.experiment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 40, 90, 0.12) !important;
}

.experiment-card {
    border-left: 5px solid var(--orange) !important;
}

.page-heading {
    color: var(--blue);
    font-weight: 700;
    font-size: clamp(1.15rem, 3vw, 1.4rem);
}

/* ===================== BUTTONS ===================== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    border: none;
    color: var(--white);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--orange-dark), var(--orange));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
    color: var(--white);
}

.btn-primary {
    background: var(--orange);
    border-color: var(--orange);
    border-radius: var(--radius-sm);
}

.btn-primary:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
}

.btn-info {
    background: var(--blue);
    border-color: var(--blue);
    border-radius: var(--radius-sm);
}

.btn-info:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
}

/* ===================== ADMIN PANEL ===================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: var(--white);
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header img {
    max-height: 42px;
    max-width: 140px;
    object-fit: contain;
}

.sidebar-header .sidebar-brand-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--orange);
    line-height: 1.2;
}

.sidebar-nav {
    list-style: none;
    padding: 16px 12px;
    margin: 0;
}

.sidebar-nav > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-nav > li > a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 12px;
    line-height: 1.3;
}

.sidebar-nav > li > a i,
.sidebar-nav > li > a .nav-svg-icon {
    width: 22px;
    min-width: 22px;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.sidebar-nav > li > a .nav-svg-icon {
    height: 22px;
    display: block;
}

.sidebar-nav > li > a span {
    flex: 1;
}

.sidebar-nav > li > a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(3px);
}

.sidebar-nav > li > a.active {
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.28) 0%, rgba(255, 107, 0, 0.08) 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.2);
    border-left: 3px solid var(--orange);
    padding-left: 13px;
}

.sidebar-nav > li > a.active i,
.sidebar-nav > li > a.active .nav-svg-icon {
    color: var(--orange);
    opacity: 1;
}

.sidebar-nav > li.sidebar-nav-logout > a {
    margin-top: 12px;
    color: rgba(255, 180, 170, 0.9);
}

.sidebar-nav > li.sidebar-nav-logout > a:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ff8a8a;
    transform: translateX(3px);
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    background: var(--gray-100);
}

.admin-topbar {
    background: var(--white);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--gray-200);
}

.admin-content {
    padding: 24px;
    flex: 1;
    overflow-x: hidden;
}

.sidebar-toggle {
    background: var(--orange-light);
    border: none;
    font-size: 1.4rem;
    color: var(--orange);
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    line-height: 1;
}

.admin-content .card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-content .card-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    padding: 14px 18px;
}

.admin-content .card-body {
    padding: 18px;
}

.admin-content .table {
    margin-bottom: 0;
}

.admin-content .table thead th {
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.admin-content .btn {
    border-radius: var(--radius-sm);
}

.admin-content .btn-sm {
    border-radius: 8px;
}

/* ===================== SHARED ===================== */
.card {
    border-radius: var(--radius);
    transition: box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 0, 0.15);
}

.form-check-input:checked {
    background-color: var(--orange);
    border-color: var(--orange);
}

.input-group-text {
    background: var(--gray-100);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.page-link {
    color: var(--orange);
    border-radius: 8px !important;
    margin: 0 2px;
}

.page-item.active .page-link {
    background: var(--orange);
    border-color: var(--orange);
}

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

.table-hover > tbody > tr:hover {
    background: var(--orange-light);
}

.alert {
    border: none;
    border-radius: var(--radius-sm);
}

.modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
}

.progress {
    height: 10px;
    border-radius: 5px;
}

.progress-bar {
    background: var(--orange);
}

.sortable-ghost { opacity: 0.4; }
.sortable-drag { opacity: 0.8; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-content {
        padding: 16px;
    }

    .pdf-body {
        flex-direction: column;
        max-height: none;
    }

    .pdf-thumbnails {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: 100px;
    }

    .pdf-thumb {
        flex-shrink: 0;
        width: 60px;
    }
}

@media (min-width: 992px) {
    .teacher-nav-center {
        display: flex !important;
    }

    .teacher-nav-toggle {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .teacher-navbar {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand right"
            "center center";
        padding: 12px 16px;
    }

    .teacher-nav-toggle {
        display: flex;
    }

    .teacher-nav-right {
        justify-self: end;
    }

    .teacher-nav-center {
        grid-column: 1 / -1;
        width: 100%;
        overflow: visible;
    }

    .teacher-nav-center:not(.show) {
        display: none;
    }

    .teacher-nav-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding-top: 8px;
    }

    .teacher-nav-link {
        display: block;
        width: 100%;
        text-align: left;
        padding: 12px 14px;
    }

    .teacher-nav-dropdown .classes-toggle {
        width: 100%;
        justify-content: space-between;
        text-align: left;
    }

    .classes-dropdown-panel {
        position: static;
        top: auto;
        left: auto;
        min-width: 0;
        max-width: none;
        max-height: 0;
        margin-top: 0;
        padding: 0;
        border-radius: 12px;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.6);
        opacity: 1;
        visibility: visible;
        transform: none;
        overflow: hidden;
        transition: max-height 0.3s ease, margin-top 0.3s ease, padding 0.3s ease;
    }

    .classes-dropdown-panel.is-portaled {
        position: static;
        top: auto;
        left: auto;
        min-width: 0;
    }

    .classes-dropdown-panel.is-portaled::before {
        display: none;
    }

    .classes-dropdown-panel.is-open {
        max-height: 480px;
        margin-top: 6px;
        padding: 4px 0;
    }

    .classes-dropdown-list {
        padding: 4px 8px 8px;
    }

    .classes-dropdown-item {
        padding: 12px 14px;
    }

    .teacher-brand img {
        height: 40px;
    }

    .package-header-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-program-list {
        width: 100%;
        text-align: center;
    }

    .teacher-navbar-wrap {
        padding: 10px 12px 0;
    }
}

@media (min-width: 576px) {
    .login-page-inner {
        padding-bottom: 190px;
    }
}

@media (min-width: 768px) {
    .login-page-inner {
        max-width: 420px;
        padding-top: 40px;
        padding-bottom: 190px;
    }

    .ref-card {
        padding: 12px;
    }
}

@media (min-width: 1200px) {
    .login-page-inner {
        padding-bottom: 190px;
    }

    .teacher-main {
        padding: 32px 28px 40px;
    }

    .teacher-brand img {
        height: 52px;
    }
}

@media (max-width: 575.98px) {
    .login-card {
        padding: 22px 18px;
    }

    .experiment-hero-card {
        padding: 28px 20px 24px;
    }

    .exp-action-btn {
        min-height: 58px;
        font-size: 1.05rem;
    }

    .experiment-panel {
        padding: 16px;
    }

    .pdf-canvas-wrap {
        padding: 8px;
    }
}
