
/* =========================================
   TEACHER PAGE - ENGLISH COMMERCE DN
   File: pages/teacher/css/teacher.css
========================================= */

:root {
    --teacher-blue: #0756A5;
    --teacher-blue-dark: #06447F;
    --teacher-orange: #F28C28;
    --teacher-sky: #38A9E8;
    --teacher-bg: #F1F5F9;
    --teacher-white: #FFFFFF;
    --teacher-text: #243447;
    --teacher-muted: #718096;
    --teacher-border: #DCE5EF;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--teacher-text);
    background: var(--teacher-bg);
}

button,
a {
    font: inherit;
}

.teacher-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================
   HEADER
========================================= */

.teacher-header {
    min-height: 82px;
    padding: 12px 24px;
    background: var(--teacher-blue);
    color: var(--teacher-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
}

.teacher-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.teacher-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    font-size: 27px;
}

.teacher-header-title h1 {
    margin: 0;
    color: #FFD84D;
    font-size: 22px;
    letter-spacing: 1.2px;
}

.teacher-header-title p {
    margin: 5px 0 0;
    color: #FFFFFF;
    font-size: 12px;
    letter-spacing: 1.5px;
}

.teacher-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.teacher-btn {
    min-height: 40px;
    padding: 0 15px;
    border: 0;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.profile-btn {
    color: #FFFFFF;
    background: var(--teacher-orange);
}

.profile-btn:hover {
    background: #DD7416;
}

.change-pass-btn {
    color: var(--teacher-blue);
    background: #FFFFFF;
}

.change-pass-btn:hover {
    background: #EAF4FC;
}

.home-btn {
    color: #FFFFFF;
    background: var(--teacher-blue-dark);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.home-btn:hover {
    background: #043765;
}

/* =========================================
   MAIN LAYOUT
========================================= */

.teacher-layout {
    width: 100%;
    flex: 1;
    min-height: 0;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(0, 3fr);
    gap: 16px;
}

/* =========================================
   LEFT SIDEBAR
========================================= */

.teacher-sidebar {
    min-width: 0;
    background: #FFFFFF;
    border: 1px solid var(--teacher-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(22, 47, 75, 0.06);
}

.teacher-sidebar-heading {
    min-height: 52px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FFFFFF;
    background: var(--teacher-blue-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.teacher-menu {
    padding: 9px;
}

.teacher-menu-group {
    margin-bottom: 7px;
    border: 1px solid var(--teacher-border);
    border-radius: 8px;
    overflow: hidden;
    background: #FFFFFF;
}

.teacher-menu-group summary {
    min-height: 45px;
    padding: 10px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    cursor: pointer;
    color: var(--teacher-blue-dark);
    font-size: 12.5px;
    font-weight: 700;
    transition: background 0.2s ease;
}

.teacher-menu-group summary::-webkit-details-marker {
    display: none;
}

.teacher-menu-group summary::after {
    content: "›";
    margin-left: auto;
    color: var(--teacher-muted);
    font-size: 21px;
    transition: transform 0.2s ease;
}

.teacher-menu-group[open] summary::after {
    transform: rotate(90deg);
}

.teacher-menu-group summary:hover {
    background: #EDF6FD;
}

.teacher-group-icon {
    width: 23px;
    flex-shrink: 0;
    text-align: center;
    font-size: 16px;
}

.teacher-group-count {
    margin-left: auto;
    padding: 3px 7px;
    border-radius: 20px;
    color: var(--teacher-blue);
    background: #E8F3FC;
    font-size: 10px;
    flex-shrink: 0;
}

.teacher-submenu {
    padding: 4px 7px 8px 30px;
    border-top: 1px solid #EDF1F5;
    background: #FAFCFE;
}

.teacher-submenu button {
    width: 100%;
    min-height: 36px;
    padding: 7px 8px;
    border: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    color: #45566B;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.teacher-submenu button:hover {
    color: var(--teacher-blue);
    background: #E8F3FC;
}

.teacher-submenu button:focus-visible,
.teacher-menu-group summary:focus-visible,
.teacher-btn:focus-visible {
    outline: 3px solid rgba(56, 169, 232, 0.45);
    outline-offset: 2px;
}

/* =========================================
   RIGHT CONTENT
========================================= */

.teacher-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.teacher-content-topbar {
    min-height: 72px;
    padding: 12px 20px;
    border: 1px solid var(--teacher-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #FFFFFF;
    box-shadow: 0 3px 12px rgba(22, 47, 75, 0.04);
}

.teacher-content-label {
    color: var(--teacher-orange);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.teacher-content-topbar h2 {
    margin: 5px 0 0;
    color: var(--teacher-blue-dark);
    font-size: 19px;
}

.teacher-status {
    padding: 7px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #26764A;
    background: #EAF8F0;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.teacher-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #25A45A;
}

.teacher-tab-container {
    flex: 1;
    min-height: 450px;
    padding: 24px;
    border: 1px solid var(--teacher-border);
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 3px 12px rgba(22, 47, 75, 0.04);
}

/* =========================================
   WELCOME
========================================= */

.teacher-welcome {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.teacher-welcome-icon {
    width: 88px;
    height: 88px;
    margin-bottom: 18px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    color: var(--teacher-blue);
    background: #EAF4FC;
    font-size: 43px;
}

.teacher-welcome h2 {
    margin: 0 0 12px;
    color: var(--teacher-blue);
    font-size: 25px;
    letter-spacing: 1px;
}

.teacher-welcome p {
    max-width: 520px;
    margin: 5px 0;
    color: #526276;
    font-size: 14px;
    line-height: 1.7;
}

.teacher-welcome .teacher-welcome-guide {
    margin-top: 14px;
    color: var(--teacher-orange);
    font-weight: 600;
}

/* =========================================
   FOOTER
========================================= */

.teacher-footer {
    min-height: 38px;
    padding: 10px 18px;
    color: #FFFFFF;
    background: #171717;
    text-align: center;
    font-size: 11px;
    letter-spacing: 1px;
}

.teacher-footer span {
    color: #B8C4D1;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1000px) {
    .teacher-layout {
        grid-template-columns: minmax(200px, 3fr) minmax(0, 7fr);
        gap: 12px;
        padding: 12px;
    }

    .teacher-header {
        padding: 12px 16px;
    }

    .teacher-menu-group summary {
        font-size: 11.5px;
    }

    .teacher-submenu {
        padding-left: 22px;
    }

    .teacher-submenu button {
        font-size: 11.5px;
    }
}

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

@media (max-width: 700px) {
    .teacher-header {
        min-height: auto;
        padding: 12px;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .teacher-header-title h1 {
        font-size: 18px;
    }

    .teacher-header-title p {
        font-size: 10px;
    }

    .teacher-icon {
        width: 42px;
        height: 42px;
        font-size: 23px;
    }

    .teacher-header-actions {
        width: 100%;
        gap: 7px;
    }

    .teacher-btn {
        flex: 1;
        min-height: 42px;
        padding: 0 7px;
        font-size: 11.5px;
        white-space: nowrap;
    }

    .teacher-layout {
        display: flex;
        flex-direction: column;
        padding: 10px;
        gap: 12px;
    }

    .teacher-sidebar,
    .teacher-content {
        width: 100%;
    }

    .teacher-sidebar-heading {
        min-height: 46px;
    }

    .teacher-menu {
        padding: 8px;
    }

    .teacher-menu-group summary {
        min-height: 44px;
        font-size: 13px;
    }

    .teacher-submenu {
        padding-left: 25px;
    }

    .teacher-submenu button {
        min-height: 40px;
        font-size: 13px;
    }

    .teacher-content-topbar {
        min-height: 65px;
        padding: 11px 14px;
    }

    .teacher-content-topbar h2 {
        font-size: 17px;
    }

    .teacher-tab-container {
        min-height: 380px;
        padding: 15px;
    }

    .teacher-welcome {
        min-height: 340px;
    }

    .teacher-welcome-icon {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }

    .teacher-welcome h2 {
        font-size: 20px;
    }

    .teacher-welcome p {
        font-size: 13px;
    }

    .teacher-footer {
        font-size: 10px;
        line-height: 1.6;
    }
}

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

@media (max-width: 380px) {
    .teacher-header-title h1 {
        font-size: 16px;
    }

    .teacher-header-actions {
        gap: 5px;
    }

    .teacher-btn {
        padding: 0 4px;
        font-size: 10.5px;
    }

    .teacher-menu-group summary {
        gap: 6px;
        font-size: 12px;
    }

    .teacher-group-count {
        padding: 2px 6px;
    }
}


/* =====================================
   TEACHER LOGIN & REGISTER
===================================== */

.teacher-auth-page {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #0756A5, #0B3670);
}

.teacher-auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.teacher-auth-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0,0,0,.25);
  text-align: center;
}

.teacher-auth-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #EAF3FC;
  font-size: 36px;
}

.teacher-auth-card h1 {
  margin: 0;
  color: #0756A5;
  font-size: 24px;
  font-weight: 800;
}

.teacher-auth-subtitle {
  margin: 10px 0 27px;
  color: #777;
  font-size: 12px;
  letter-spacing: .8px;
}

.teacher-auth-field {
  margin-bottom: 17px;
  text-align: left;
}

.teacher-auth-field label {
  display: block;
  margin-bottom: 7px;
  color: #333;
  font-size: 14px;
  font-weight: 700;
}

.teacher-auth-field input {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  box-sizing: border-box;
  border: 1px solid #D5DDE7;
  border-radius: 8px;
  outline: none;
  font-size: 15px;
}

.teacher-auth-field input:focus {
  border-color: #0756A5;
  box-shadow: 0 0 0 3px rgba(7,86,165,.10);
}

.teacher-auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  background: #0756A5;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}

.teacher-auth-submit:hover {
  background: #F28C28;
}

.teacher-auth-switch {
  margin-top: 23px;
  color: #555;
  font-size: 14px;
}

.teacher-auth-switch a {
  color: #0756A5;
  font-weight: 700;
  text-decoration: none;
}

.teacher-auth-switch a:hover {
  color: #F28C28;
  text-decoration: underline;
}

.teacher-auth-home {
  display: inline-block;
  margin-top: 20px;
  color: #0756A5;
  font-size: 14px;
  text-decoration: none;
}

.teacher-auth-home:hover {
  color: #F28C28;
}

@media (max-width: 480px) {
  .teacher-auth-container {
    padding: 16px;
  }

  .teacher-auth-card {
    padding: 30px 22px;
  }

  .teacher-auth-card h1 {
    font-size: 21px;
  }
}


/* =====================================
   TEACHER PROFILE
===================================== */

.teacher-profile-page {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #dce6f1;
    border-radius: 12px;
    box-sizing: border-box;
}

.teacher-profile-title {
    text-align: center;
    color: #0756A5;
    font-size: 23px;
    margin: 0 0 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #F28C28;
}

.teacher-profile-avatar {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 15px 0 25px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5eaf0;
}

.teacher-profile-avatar-preview {
    width: 125px;
    height: 125px;
    border: 2px dashed #9bb9d7;
    border-radius: 50%;
    background: #eef5fc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #0756A5;
    font-weight: bold;
}

.teacher-profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.teacher-profile-avatar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.teacher-profile-upload,
.teacher-profile-delete {
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.teacher-profile-upload {
    color: white;
    background: #0756A5;
}

.teacher-profile-delete {
    color: white;
    background: #DC2626;
    border: none;
}

.teacher-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 22px;
}

.teacher-profile-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.teacher-profile-full {
    grid-column: 1 / -1;
}

.teacher-profile-field label,
.teacher-profile-signature label {
    color: #173b61;
    font-weight: 600;
    font-size: 14px;
}

.teacher-profile-field input,
.teacher-profile-field select {
    width: 100%;
    height: 42px;
    padding: 8px 11px;
    border: 1px solid #cbd7e4;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
    font-size: 14px;
    outline: none;
}

.teacher-profile-field input:focus,
.teacher-profile-field select:focus {
    border-color: #0756A5;
    box-shadow: 0 0 0 2px rgba(7, 86, 165, 0.1);
}

.teacher-profile-field input[readonly] {
    background: #edf2f7;
    color: #526477;
    cursor: not-allowed;
}

.teacher-profile-signature {
    margin-top: 22px;
}

.teacher-profile-signature-box {
    margin-top: 8px;
    padding: 18px;
    border: 1px dashed #9bb9d7;
    border-radius: 8px;
    background: #f7faff;
}

.teacher-profile-signature-box p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 13px;
}

.teacher-profile-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5eaf0;
}

.teacher-profile-buttons button,
.teacher-profile-buttons a {
    min-width: 115px;
    padding: 11px 20px;
    border: none;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
}

.teacher-profile-save {
    background: #0756A5;
    color: white;
}

.teacher-profile-home {
    background: #F28C28;
    color: white;
}

.teacher-profile-mypage {
    background: #38A9E8;
    color: white;
}

@media (max-width: 600px) {
    .teacher-profile-page {
        margin: 10px auto;
        padding: 15px;
    }

    .teacher-profile-grid {
        grid-template-columns: 1fr;
    }

    .teacher-profile-full {
        grid-column: auto;
    }

    .teacher-profile-avatar {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .teacher-profile-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .teacher-profile-buttons button,
    .teacher-profile-buttons a {
        width: 100%;
    }
}

.teacher-logout-btn {
    background: #DC2626;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.teacher-logout-btn:hover {
    background: #B91C1C;
    transform: translateY(-1px);
}

.teacher-logout-btn:active {
    transform: scale(0.97);
}




/* =====================================================
   TEACHER - CẬP NHẬT LỊCH DẠY
===================================================== */

.teacher-lichday-page {
    width: 100%;
    color: var(--text-color, #263445);
}

.teacher-lichday-page .teacher-page-heading {
    margin-bottom: 20px;
}

.teacher-lichday-page .teacher-page-heading h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
}

.teacher-lichday-page .teacher-page-heading p,
.teacher-lichday-page .lichday-view-heading p {
    margin: 0;
    color: #718096;
    font-size: 13px;
}

.teacher-lichday-page .lichday-form-card,
.teacher-lichday-page .lichday-view-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 22px;
}

.teacher-lichday-page .lichday-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.teacher-lichday-page .lichday-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.teacher-lichday-page .lichday-field label {
    font-size: 13px;
    font-weight: 600;
    color: #405168;
}

.teacher-lichday-page .lichday-field input,
.teacher-lichday-page .lichday-field select,
.teacher-lichday-page .lichday-day-item input[type="text"] {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #263445;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.teacher-lichday-page .lichday-field input:focus,
.teacher-lichday-page .lichday-field select:focus,
.teacher-lichday-page .lichday-day-item input[type="text"]:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.12);
}

.teacher-lichday-page .lichday-field input[readonly] {
    background: #f1f5f9;
    cursor: not-allowed;
}

.teacher-lichday-page .lichday-schedule-box {
    margin-top: 22px;
    padding: 17px;
    border: 1px solid #dbe5ef;
    border-radius: 10px;
    background: #f8fafc;
}

.teacher-lichday-page .lichday-section-heading {
    margin-bottom: 15px;
}

.teacher-lichday-page .lichday-section-heading h3 {
    margin: 0 0 5px;
    font-size: 15px;
    font-weight: 700;
}

.teacher-lichday-page .lichday-section-heading span {
    color: #718096;
    font-size: 12px;
}

.teacher-lichday-page .lichday-day-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.teacher-lichday-page .lichday-day-item {
    min-width: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.teacher-lichday-page .lichday-day-item > label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.teacher-lichday-page .lichday-day-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.teacher-lichday-page .lichday-day-item input[type="text"] {
    min-height: 36px;
    font-size: 12px;
}

.teacher-lichday-page .lichday-day-item input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.teacher-lichday-page .lichday-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.teacher-lichday-page .lichday-btn {
    min-height: 39px;
    padding: 9px 17px;
    border: 0;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.teacher-lichday-page .lichday-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.teacher-lichday-page .lichday-btn[hidden] {
    display: none !important;
}

.teacher-lichday-page .lichday-btn-primary {
    color: #fff;
    background: #2563eb;
}

.teacher-lichday-page .lichday-btn-success {
    color: #fff;
    background: #168653;
}

.teacher-lichday-page .lichday-btn-danger {
    color: #fff;
    background: #dc3545;
}

.teacher-lichday-page .lichday-btn-secondary {
    color: #334155;
    background: #e2e8f0;
}

.teacher-lichday-page .lichday-view-section {
    margin-top: 24px;
}

.teacher-lichday-page .lichday-view-heading {
    margin-bottom: 16px;
}

.teacher-lichday-page .lichday-view-heading h3 {
    margin: 0 0 5px;
    font-size: 17px;
    font-weight: 700;
}

.teacher-lichday-page .lichday-filter {
    display: flex;
    gap: 16px;
    max-width: 420px;
    margin-bottom: 20px;
}

.teacher-lichday-page .lichday-filter .lichday-field {
    flex: 1;
}

.teacher-lichday-page .lichday-week-block {
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
}

.teacher-lichday-page .lichday-week-block.active-week {
    border-color: #60a5fa;
    background: #f8fbff;
}

.teacher-lichday-page .lichday-week-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.teacher-lichday-page .lichday-week-heading h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.teacher-lichday-page .lichday-week-badge {
    padding: 4px 9px;
    border-radius: 20px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
}

.teacher-lichday-page .lichday-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.teacher-lichday-page .lichday-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 12px;
}

.teacher-lichday-page .lichday-table th,
.teacher-lichday-page .lichday-table td {
    padding: 10px 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}

.teacher-lichday-page .lichday-table th {
    background: #edf2f7;
    color: #334155;
    font-weight: 700;
    white-space: nowrap;
}

.teacher-lichday-page .lichday-table td:nth-child(2),
.teacher-lichday-page .lichday-table td:nth-child(3) {
    text-align: left;
}

.teacher-lichday-page .lichday-data-row {
    cursor: pointer;
    transition: background 0.15s;
}

.teacher-lichday-page .lichday-data-row:hover {
    background: #eff6ff;
}

.teacher-lichday-page .lichday-has-class {
    color: #168653;
    font-weight: 600;
}

.teacher-lichday-page .lichday-empty-row,
.teacher-lichday-page .lichday-empty {
    padding: 18px;
    color: #94a3b8;
    text-align: center;
}

.teacher-lichday-page .lichday-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 18px;
    border-radius: 8px;
    background: #263445;
    color: #fff;
    font-size: 13px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    pointer-events: none;
}

.teacher-lichday-page .lichday-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.teacher-lichday-page .lichday-toast.success {
    background: #168653;
}

.teacher-lichday-page .lichday-toast.error {
    background: #dc3545;
}


/* RESPONSIVE */

@media (max-width: 900px) {

    .teacher-lichday-page .lichday-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-lichday-page .lichday-day-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 520px) {

    .teacher-lichday-page .lichday-form-card,
    .teacher-lichday-page .lichday-view-section {
        padding: 13px;
    }

    .teacher-lichday-page .lichday-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .teacher-lichday-page .lichday-day-grid {
        grid-template-columns: 1fr;
    }

    .teacher-lichday-page .lichday-filter {
        max-width: none;
    }

    .teacher-lichday-page .lichday-form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .teacher-lichday-page .lichday-btn {
        width: 100%;
    }

}
/* =====================================================
   TEACHER - LINK DẠY ONLINE
===================================================== */

.teacher-linkonline-page {
    width: 100%;
    color: var(--text-color, #263445);
}

.teacher-linkonline-page .teacher-page-heading {
    margin-bottom: 20px;
}

.teacher-linkonline-page .teacher-page-heading h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
}

.teacher-linkonline-page .teacher-page-heading p {
    margin: 0;
    color: #718096;
    font-size: 13px;
}

.teacher-linkonline-page .linkonline-form-card,
.teacher-linkonline-page .linkonline-list-card {
    padding: 20px;
    margin-bottom: 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.teacher-linkonline-page .linkonline-form-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 18px;
}

.teacher-linkonline-page .linkonline-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.teacher-linkonline-page .linkonline-field label {
    font-size: 13px;
    font-weight: 600;
    color: #405168;
}

.teacher-linkonline-page .linkonline-field input,
.teacher-linkonline-page .linkonline-field select {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #263445;
    font-size: 14px;
    box-sizing: border-box;
}

.teacher-linkonline-page .linkonline-field input:focus,
.teacher-linkonline-page .linkonline-field select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.12);
}

.teacher-linkonline-page .linkonline-field small {
    color: #718096;
    font-size: 11px;
}

.teacher-linkonline-page .linkonline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.teacher-linkonline-page .linkonline-btn {
    min-height: 39px;
    padding: 9px 17px;
    border: 0;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.teacher-linkonline-page .linkonline-btn[hidden] {
    display: none !important;
}

.teacher-linkonline-page .linkonline-btn.primary {
    background: #2563eb;
    color: #fff;
}

.teacher-linkonline-page .linkonline-btn.success {
    background: #168653;
    color: #fff;
}

.teacher-linkonline-page .linkonline-btn.secondary {
    background: #e2e8f0;
    color: #334155;
}

.teacher-linkonline-page .linkonline-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.teacher-linkonline-page .linkonline-list-heading h3 {
    margin: 0;
    font-size: 16px;
}

.teacher-linkonline-page .linkonline-list-heading span {
    color: #64748b;
    font-size: 12px;
}

.teacher-linkonline-page .linkonline-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.teacher-linkonline-page .linkonline-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    font-size: 13px;
}

.teacher-linkonline-page .linkonline-table th,
.teacher-linkonline-page .linkonline-table td {
    padding: 11px 9px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}

.teacher-linkonline-page .linkonline-table th {
    background: #edf2f7;
    color: #334155;
    white-space: nowrap;
}

.teacher-linkonline-page .linkonline-url {
    max-width: 350px;
    text-align: left !important;
    overflow-wrap: anywhere;
}

.teacher-linkonline-page .linkonline-url a {
    color: #2563eb;
    text-decoration: none;
}

.teacher-linkonline-page .linkonline-url a:hover {
    text-decoration: underline;
}

.teacher-linkonline-page .linkonline-actions-cell {
    white-space: nowrap;
}

.teacher-linkonline-page .linkonline-action {
    padding: 6px 9px;
    margin: 2px;
    border: 0;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}

.teacher-linkonline-page .linkonline-action.edit {
    background: #dbeafe;
    color: #1d4ed8;
}

.teacher-linkonline-page .linkonline-action.preview {
    background: #dcfce7;
    color: #166534;
}

.teacher-linkonline-page .linkonline-action.delete {
    background: #fee2e2;
    color: #b91c1c;
}

.teacher-linkonline-page .linkonline-empty {
    padding: 20px;
    color: #94a3b8;
    text-align: center;
}

.teacher-linkonline-page .linkonline-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 18px;
    border-radius: 8px;
    background: #263445;
    color: #fff;
    font-size: 13px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    pointer-events: none;
}

.teacher-linkonline-page .linkonline-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.teacher-linkonline-page .linkonline-toast.success {
    background: #168653;
}

.teacher-linkonline-page .linkonline-toast.error {
    background: #dc3545;
}

@media (max-width: 650px) {
    .teacher-linkonline-page .linkonline-form-card,
    .teacher-linkonline-page .linkonline-list-card {
        padding: 13px;
    }

    .teacher-linkonline-page .linkonline-form-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .teacher-linkonline-page .linkonline-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .teacher-linkonline-page .linkonline-btn {
        width: 100%;
    }

    .teacher-linkonline-page .linkonline-list-heading {
        align-items: flex-start;
    }
}

/* =====================================================
   TEACHER - THÔNG BÁO SINH VIÊN
===================================================== */

.teacher-thongbao-page {
    width: 100%;
    color: var(--text-color, #263445);
}

.teacher-thongbao-page .teacher-page-heading {
    margin-bottom: 20px;
}

.teacher-thongbao-page .teacher-page-heading h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
}

.teacher-thongbao-page .teacher-page-heading p {
    margin: 0;
    color: #718096;
    font-size: 13px;
}

.teacher-thongbao-page .thongbao-form-card,
.teacher-thongbao-page .thongbao-list-card {
    padding: 20px;
    margin-bottom: 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.teacher-thongbao-page .thongbao-form-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 18px;
}

.teacher-thongbao-page .thongbao-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.teacher-thongbao-page .thongbao-field label {
    font-size: 13px;
    font-weight: 600;
    color: #405168;
}

.teacher-thongbao-page .thongbao-field input,
.teacher-thongbao-page .thongbao-field select {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #263445;
    font-size: 14px;
    box-sizing: border-box;
}

.teacher-thongbao-page .thongbao-field input:focus,
.teacher-thongbao-page .thongbao-field select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.12);
}

.teacher-thongbao-page .thongbao-content-field {
    margin-top: 18px;
}

.teacher-thongbao-page .thongbao-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: #f8fafc;
}

.teacher-thongbao-page .thongbao-editor-toolbar button {
    width: 34px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.teacher-thongbao-page .thongbao-editor-toolbar button:hover {
    background: #dbeafe;
}

.teacher-thongbao-page #tbNoiDung {
    min-height: 180px;
    padding: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 7px 7px;
    background: #fff;
    color: #263445;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    overflow-wrap: anywhere;
}

.teacher-thongbao-page #tbNoiDung:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.12);
}

.teacher-thongbao-page #tbNoiDung:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
}

.teacher-thongbao-page .thongbao-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.teacher-thongbao-page .thongbao-btn {
    min-height: 39px;
    padding: 9px 17px;
    border: 0;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.teacher-thongbao-page .thongbao-btn[hidden] {
    display: none !important;
}

.teacher-thongbao-page .thongbao-btn.primary {
    background: #2563eb;
    color: #fff;
}

.teacher-thongbao-page .thongbao-btn.success {
    background: #168653;
    color: #fff;
}

.teacher-thongbao-page .thongbao-btn.secondary {
    background: #e2e8f0;
    color: #334155;
}

.teacher-thongbao-page .thongbao-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.teacher-thongbao-page .thongbao-list-heading h3 {
    margin: 0;
    font-size: 16px;
}

.teacher-thongbao-page .thongbao-list-heading span {
    color: #64748b;
    font-size: 12px;
}

.teacher-thongbao-page .thongbao-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.teacher-thongbao-page .thongbao-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    font-size: 12px;
}

.teacher-thongbao-page .thongbao-table th,
.teacher-thongbao-page .thongbao-table td {
    padding: 10px 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}

.teacher-thongbao-page .thongbao-table th {
    background: #edf2f7;
    color: #334155;
    font-weight: 700;
    white-space: nowrap;
}

.teacher-thongbao-page .thongbao-title-cell,
.teacher-thongbao-page .thongbao-content-cell {
    max-width: 230px;
    text-align: left !important;
    overflow-wrap: anywhere;
}

.teacher-thongbao-page .thongbao-action-cell {
    white-space: nowrap;
}

.teacher-thongbao-page .thongbao-action {
    padding: 6px 9px;
    margin: 2px;
    border: 0;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}

.teacher-thongbao-page .thongbao-action.edit {
    background: #dbeafe;
    color: #1d4ed8;
}

.teacher-thongbao-page .thongbao-action.delete {
    background: #fee2e2;
    color: #b91c1c;
}

.teacher-thongbao-page .thongbao-empty {
    padding: 20px;
    color: #94a3b8;
    text-align: center;
}

.teacher-thongbao-page .thongbao-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 18px;
    border-radius: 8px;
    background: #263445;
    color: #fff;
    font-size: 13px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    pointer-events: none;
}

.teacher-thongbao-page .thongbao-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.teacher-thongbao-page .thongbao-toast.success {
    background: #168653;
}

.teacher-thongbao-page .thongbao-toast.error {
    background: #dc3545;
}

@media (max-width: 650px) {
    .teacher-thongbao-page .thongbao-form-card,
    .teacher-thongbao-page .thongbao-list-card {
        padding: 13px;
    }

    .teacher-thongbao-page .thongbao-form-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .teacher-thongbao-page .thongbao-form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .teacher-thongbao-page .thongbao-btn {
        width: 100%;
    }

    .teacher-thongbao-page .thongbao-list-heading {
        align-items: flex-start;
    }
}


/* ================================
   TEACHER - BÀI GIẢNG
================================ */

.teacher-baigiang-page {
  --bg-primary: #2563eb;
  --bg-border: #e2e8f0;
  --bg-muted: #64748b;
  color: #1e293b;
  width: 100%;
  padding: 4px 0 28px;
}

.teacher-baigiang-page *,
.bg-preview-modal * {
  box-sizing: border-box;
}

.teacher-baigiang-page .bg-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.teacher-baigiang-page .bg-page-header h2 {
  margin: 0 0 5px;
  font-size: 23px;
  font-weight: 750;
  color: #17365d;
}

.teacher-baigiang-page .bg-page-header p,
.teacher-baigiang-page .bg-panel-heading p {
  margin: 0;
  color: var(--bg-muted);
  font-size: 13px;
}

.teacher-baigiang-page .bg-panel {
  background: #fff;
  border: 1px solid var(--bg-border);
  border-radius: 13px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
  min-width: 0;
}

.teacher-baigiang-page .bg-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.teacher-baigiang-page .bg-panel-heading h3 {
  margin: 0 0 5px;
  color: #1e3a5f;
  font-size: 17px;
  font-weight: 700;
}

.teacher-baigiang-page .bg-id-badge {
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 7px;
  padding: 8px 11px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.teacher-baigiang-page .bg-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.teacher-baigiang-page .bg-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.teacher-baigiang-page .bg-field-full {
  grid-column: 1 / -1;
}

.teacher-baigiang-page .bg-field label,
.teacher-baigiang-page .bg-modal-body label {
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}

.teacher-baigiang-page .bg-field input,
.teacher-baigiang-page .bg-field select,
.teacher-baigiang-page .bg-media-url,
.teacher-baigiang-page .bg-modal-body input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  padding: 9px 12px;
  color: #1e293b;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.teacher-baigiang-page .bg-field input:focus,
.teacher-baigiang-page .bg-field select:focus,
.teacher-baigiang-page .bg-media-url:focus,
.teacher-baigiang-page .bg-modal-body input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.teacher-baigiang-page .bg-media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.teacher-baigiang-page .bg-media-group {
  border: 1px solid #e5eaf1;
  border-radius: 10px;
  padding: 14px;
  background: #fbfdff;
  min-width: 0;
}

.teacher-baigiang-page .bg-media-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.teacher-baigiang-page .bg-media-heading label {
  font-weight: 700;
  font-size: 14px;
}

.teacher-baigiang-page .bg-add-media {
  border: 0;
  border-radius: 7px;
  padding: 7px 11px;
  background: #eaf2ff;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.teacher-baigiang-page .bg-add-media:hover {
  background: #dbeafe;
}

.teacher-baigiang-page .bg-media-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.teacher-baigiang-page .bg-media-row {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px;
  min-width: 0;
}

.teacher-baigiang-page .bg-media-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.teacher-baigiang-page .bg-remove-media {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  color: #dc2626;
  background: #fef2f2;
  cursor: pointer;
  font-size: 20px;
}

.teacher-baigiang-page .bg-media-preview {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
  min-width: 0;
  overflow: hidden;
}

.teacher-baigiang-page .bg-media-preview audio {
  width: 100%;
  max-width: 480px;
}

.teacher-baigiang-page .bg-media-preview video,
.teacher-baigiang-page .bg-media-preview iframe {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #0f172a;
}

.teacher-baigiang-page .bg-media-preview a {
  font-size: 12px;
  color: #2563eb;
  overflow-wrap: anywhere;
}

.teacher-baigiang-page .bg-editor-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 13px;
  margin-bottom: 13px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.6;
}

.teacher-baigiang-page .bg-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
}

.teacher-baigiang-page .bg-editor-toolbar button {
  min-height: 37px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  padding: 8px 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.teacher-baigiang-page .bg-editor-toolbar button:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.teacher-baigiang-page #bgPreview {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.teacher-baigiang-page #bgPreview:hover {
  background: #1d4ed8;
}

.teacher-baigiang-page .bg-editor-content {
  width: 100%;
  min-height: 520px;
  padding: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 0 0 9px 9px;
  outline: none;
  background: #fff;
  color: #1e293b;
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.teacher-baigiang-page .bg-editor-content:focus {
  border-color: #60a5fa;
  box-shadow: inset 0 0 0 1px #60a5fa;
}

.teacher-baigiang-page .bg-editor-content:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.teacher-baigiang-page .bg-editor-content img {
  max-width: 100%;
  height: auto;
}

.teacher-baigiang-page .bg-editor-content table {
  max-width: 100%;
  border-collapse: collapse;
}

.teacher-baigiang-page .bg-editor-content td,
.teacher-baigiang-page .bg-editor-content th {
  border: 1px solid #cbd5e1;
  padding: 6px;
}

.teacher-baigiang-page .bg-lesson-resource {
  width: 100%;
  margin: 18px 0;
  border: 1px solid #dbe3ed;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.teacher-baigiang-page .bg-lesson-resource-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
}

.teacher-baigiang-page .bg-lesson-resource-heading a {
  color: #2563eb;
  white-space: nowrap;
}

.teacher-baigiang-page .bg-lesson-resource-frame {
  width: 100%;
  height: 620px;
  background: #e2e8f0;
}

.teacher-baigiang-page .bg-lesson-resource-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.teacher-baigiang-page .bg-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 22px;
}

.teacher-baigiang-page .bg-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 17px;
  min-height: 41px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.teacher-baigiang-page .bg-btn:disabled {
  opacity: .6;
  cursor: wait;
}

.teacher-baigiang-page .bg-btn-primary {
  background: #2563eb;
  color: #fff;
}

.teacher-baigiang-page .bg-btn-primary:hover {
  background: #1d4ed8;
}

.teacher-baigiang-page .bg-btn-success {
  background: #059669;
  color: #fff;
}

.teacher-baigiang-page .bg-btn-light {
  background: #e2e8f0;
  color: #334155;
}

.teacher-baigiang-page .bg-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.teacher-baigiang-page .bg-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 13px;
}

.teacher-baigiang-page .bg-table th {
  background: #f1f5f9;
  color: #334155;
  text-align: left;
  padding: 12px 10px;
  white-space: nowrap;
}

.teacher-baigiang-page .bg-table td {
  border-top: 1px solid #e2e8f0;
  padding: 11px 10px;
  vertical-align: middle;
}

.teacher-baigiang-page .bg-table tbody tr:hover {
  background: #f8fbff;
}

.teacher-baigiang-page .bg-lesson-title {
  font-weight: 650;
  color: #1e3a5f;
  min-width: 180px;
}

.teacher-baigiang-page .bg-row-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.teacher-baigiang-page .bg-row-actions button {
  border: 0;
  border-radius: 6px;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.teacher-baigiang-page .bg-edit-row {
  background: #eff6ff;
  color: #1d4ed8;
}

.teacher-baigiang-page .bg-delete-row {
  background: #fef2f2;
  color: #dc2626;
}

.teacher-baigiang-page .bg-empty {
  text-align: center;
  color: #94a3b8;
  padding: 25px !important;
}

.teacher-baigiang-page .bg-toast {
  position: fixed;
  z-index: 10020;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 17px;
  border-radius: 9px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: .2s ease;
}

.teacher-baigiang-page .bg-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.teacher-baigiang-page .bg-toast.error {
  background: #b91c1c;
}

/* Link modal */
.teacher-baigiang-page .bg-modal[hidden],
.teacher-baigiang-page .bg-preview-modal[hidden] {
  display: none !important;
}

.teacher-baigiang-page .bg-modal {
  position: fixed;
  inset: 0;
  z-index: 10010;
  display: grid;
  place-items: center;
  padding: 16px;
}

.teacher-baigiang-page .bg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .58);
}

.teacher-baigiang-page .bg-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
  overflow: hidden;
}

.teacher-baigiang-page .bg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 19px;
  border-bottom: 1px solid #e2e8f0;
}

.teacher-baigiang-page .bg-modal-header h3 {
  margin: 0;
  font-size: 17px;
}

.teacher-baigiang-page .bg-modal-close {
  border: 0;
  background: transparent;
  font-size: 25px;
  cursor: pointer;
  color: #64748b;
}

.teacher-baigiang-page .bg-modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 19px;
}

.teacher-baigiang-page .bg-modal-body label:not(:first-child) {
  margin-top: 10px;
}

.teacher-baigiang-page .bg-modal-help {
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  margin: 5px 0 0;
}

.teacher-baigiang-page .bg-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 19px;
  border-top: 1px solid #e2e8f0;
}

/* Preview toàn màn hình */
.bg-preview-open {
  overflow: hidden !important;
}

.bg-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: flex;
  flex-direction: column;
  background: #e9eef5;
}

.bg-preview-topbar {
  min-height: 62px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #102a43;
  color: #fff;
}

.bg-preview-topbar div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bg-preview-topbar b {
  font-size: 13px;
}

.bg-preview-topbar span {
  font-size: 11px;
  color: #cbd5e1;
}

.bg-preview-topbar button {
  border: 1px solid #64748b;
  background: #243f5b;
  color: #fff;
  border-radius: 7px;
  padding: 9px 13px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.bg-preview-scroll {
  flex: 1;
  overflow: auto;
  padding: 28px 16px 50px;
}

.bg-preview-document {
  width: min(100%, 960px);
  min-height: 500px;
  margin: 0 auto;
  padding: 45px 55px;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, .1);
  overflow-wrap: anywhere;
}

.bg-preview-document-header {
  padding-bottom: 22px;
  margin-bottom: 25px;
  border-bottom: 1px solid #e2e8f0;
}

.bg-preview-document-header h1 {
  color: #17365d;
  font-size: 28px;
  line-height: 1.35;
  margin: 0 0 12px;
}

.bg-preview-document-header div {
  color: #64748b;
  font-size: 12px;
}

.bg-preview-document-content {
  color: #1e293b;
  font-size: 15px;
  line-height: 1.7;
}

.bg-preview-document-content img {
  max-width: 100%;
  height: auto;
}

.bg-preview-document-content table {
  max-width: 100%;
  border-collapse: collapse;
}

.bg-preview-document-content td,
.bg-preview-document-content th {
  border: 1px solid #cbd5e1;
  padding: 6px;
}

.bg-preview-document-content iframe {
  max-width: 100%;
}

.bg-preview-document-content .bg-lesson-resource {
  width: 100%;
  margin: 22px 0;
  border: 1px solid #dbe3ed;
  border-radius: 9px;
  overflow: hidden;
}

.bg-preview-document-content .bg-lesson-resource-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.bg-preview-document-content .bg-lesson-resource-heading a {
  color: #2563eb;
}

.bg-preview-document-content .bg-lesson-resource-frame {
  width: 100%;
  height: 650px;
}

.bg-preview-document-content .bg-lesson-resource-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.bg-preview-media-item {
  margin: 18px 0;
}

.bg-preview-media-item audio {
  width: 100%;
}

.bg-preview-media-item video,
.bg-preview-media-item iframe {
  display: block;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #0f172a;
}

/* Responsive */
@media (max-width: 700px) {
  .teacher-baigiang-page .bg-panel {
    padding: 14px;
  }

  .teacher-baigiang-page .bg-form-grid {
    grid-template-columns: 1fr;
  }

  .teacher-baigiang-page .bg-field-full {
    grid-column: auto;
  }

  .teacher-baigiang-page .bg-page-header h2 {
    font-size: 19px;
  }

  .teacher-baigiang-page .bg-editor-content {
    min-height: 420px;
    padding: 14px;
  }

  .teacher-baigiang-page .bg-media-heading {
    align-items: flex-start;
  }

  .bg-preview-topbar {
    padding: 9px 12px;
  }

  .bg-preview-document {
    padding: 25px 18px;
  }

  .bg-preview-document-header h1 {
    font-size: 22px;
  }

  .bg-preview-document-content .bg-lesson-resource-frame {
    height: 430px;
  }
}


/* FIX KICH THUOC TAI LIEU NHUNG TRONG BAI GIANG VA BAI TAP */
.teacher-baigiang-page .bg-lesson-resource,
.teacher-baigiang-page .bg-baitap-resource {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin: 18px 0 !important;
}

.teacher-baigiang-page .bg-lesson-resource-frame,
.teacher-baigiang-page .bg-baitap-resource-frame {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 620px !important;
  box-sizing: border-box !important;
}

.teacher-baigiang-page .bg-lesson-resource-frame iframe,
.teacher-baigiang-page .bg-baitap-resource-frame iframe {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  box-sizing: border-box !important;
}

/* =====================================================
   KIỂM TRA - BỔ SUNG NHẬN DIỆN CLASS GỐC
   ===================================================== */

.teacher-baigiang-page[data-teacher-kiemtra] {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 18px;
    box-sizing: border-box;
}

.teacher-baigiang-page[data-teacher-kiemtra] *,
.teacher-baigiang-page[data-teacher-kiemtra] *::before,
.teacher-baigiang-page[data-teacher-kiemtra] *::after {
    box-sizing: border-box;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-field span {
    font-size: 13px;
    font-weight: 650;
    color: #475569;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-field input,
.teacher-baigiang-page[data-teacher-kiemtra] .bg-field select,
.teacher-baigiang-page[data-teacher-kiemtra] .bg-field textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-field textarea {
    resize: vertical;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-editor-panel {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    background: #f1f5f9;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-editor-content {
    min-height: 300px;
    padding: 18px;
    line-height: 1.75;
    outline: none;
    overflow-wrap: anywhere;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-editor-content img {
    max-width: 100%;
    height: auto;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-editor-content table {
    width: 100%;
    border-collapse: collapse;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-editor-content td,
.teacher-baigiang-page[data-teacher-kiemtra] .bg-editor-content th {
    border: 1px solid #cbd5e1;
    padding: 8px;
}

.teacher-baigiang-page[data-teacher-kiemtra] #ktTuLuanPanel {
    margin-top: 18px;
}

.teacher-baigiang-page[data-teacher-kiemtra] .kt-essay-content {
    min-height: 150px;
    padding: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
    line-height: 1.7;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-table th,
.teacher-baigiang-page[data-teacher-kiemtra] .bg-table td {
    padding: 11px;
    border-bottom: 1px solid #e2e8f0;
}

.teacher-baigiang-page[data-teacher-kiemtra] .bg-form-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.teacher-baigiang-page[data-teacher-kiemtra] [hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .teacher-baigiang-page[data-teacher-kiemtra] .bg-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .teacher-baigiang-page[data-teacher-kiemtra] {
        padding: 10px;
    }

    .teacher-baigiang-page[data-teacher-kiemtra] .bg-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .teacher-baigiang-page[data-teacher-kiemtra] .bg-editor-content {
        min-height: 220px;
        padding: 12px;
    }

    .teacher-baigiang-page[data-teacher-kiemtra] .bg-form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .teacher-baigiang-page[data-teacher-kiemtra] .bg-form-actions button {
        width: 100%;
    }
}

/* =========================================================
   TAB ĐIỂM THƯỜNG XUYÊN - chỉ áp dụng trong .teacher-diemtx
   ========================================================= */

.teacher-diemtx {
  --dtx-blue: #0756A5;
  --dtx-blue-deep: #123B61;
  --dtx-sky: #38A9E8;
  --dtx-orange: #E97819;
  --dtx-text: #26384A;
  --dtx-muted: #718096;
  --dtx-line: #E5ECF2;
  --dtx-soft: #F6FAFD;
  color: var(--dtx-text);
  width: 100%;
}

.teacher-diemtx * { box-sizing: border-box; }

.teacher-diemtx .dtx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.teacher-diemtx .dtx-eyebrow {
  margin: 0 0 5px;
  color: var(--dtx-sky);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}

.teacher-diemtx .dtx-header h2 {
  margin: 0;
  color: var(--dtx-blue-deep);
  font-size: clamp(20px, 2.5vw, 27px);
  line-height: 1.25;
}

.teacher-diemtx .dtx-subtitle {
  margin: 6px 0 0;
  color: var(--dtx-muted);
  font-size: 13px;
}

.teacher-diemtx .dtx-teacher-line {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  margin-bottom: 16px;
  border: 1px solid #DDECF7;
  border-radius: 11px;
  background: linear-gradient(100deg, #F4FAFF, #FFFFFF);
}

.teacher-diemtx .dtx-teacher-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #4DB8E9, #0756A5);
  font-size: 11px;
  font-weight: 800;
}

.teacher-diemtx .dtx-teacher-line small {
  display: block;
  margin-bottom: 3px;
  color: var(--dtx-muted);
  font-size: 11px;
}

.teacher-diemtx .dtx-teacher-line strong {
  color: var(--dtx-blue-deep);
  font-size: 14px;
}

.teacher-diemtx .dtx-panel {
  padding: 19px;
  margin-bottom: 17px;
  border: 1px solid var(--dtx-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(24, 65, 101, .045);
}

.teacher-diemtx .dtx-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 17px;
}

.teacher-diemtx .dtx-panel-heading h3 {
  margin: 0;
  color: var(--dtx-blue-deep);
  font-size: 17px;
}

.teacher-diemtx .dtx-panel-heading p {
  margin: 5px 0 0;
  color: var(--dtx-muted);
  font-size: 12px;
}

.teacher-diemtx .dtx-required-note {
  color: #8B98A7;
  font-size: 11px;
  white-space: nowrap;
}

.teacher-diemtx .dtx-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px 14px;
}

.teacher-diemtx .dtx-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
}

.teacher-diemtx .dtx-field > span {
  color: #506579;
  font-size: 12px;
  font-weight: 700;
}

.teacher-diemtx .dtx-field > span b { color: #D94C45; }

.teacher-diemtx .dtx-field input,
.teacher-diemtx .dtx-field select {
  width: 100%;
  min-width: 0;
  min-height: 41px;
  padding: 9px 11px;
  border: 1px solid #DCE5ED;
  border-radius: 8px;
  outline: none;
  background: #FBFDFF;
  color: #2B4054;
  font: inherit;
  font-size: 13px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

.teacher-diemtx .dtx-field input:focus,
.teacher-diemtx .dtx-field select:focus {
  border-color: var(--dtx-sky);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(56, 169, 232, .12);
}

.teacher-diemtx .dtx-field input:disabled {
  cursor: not-allowed;
  background: #F0F3F6;
  color: #9AA6B2;
}

.teacher-diemtx .dtx-field-hint {
  color: #8A98A7;
  font-size: 10px;
  line-height: 1.4;
}

.teacher-diemtx .dtx-student-field { position: relative; }

.teacher-diemtx .dtx-search-wrap { position: relative; }

.teacher-diemtx .dtx-search-wrap input { padding-right: 38px; }

.teacher-diemtx .dtx-clear-search {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  color: #6C7D8E;
  background: transparent;
  font-size: 21px;
  cursor: pointer;
}

.teacher-diemtx .dtx-clear-search:hover { background: #EDF4F9; }

.teacher-diemtx .dtx-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #DCE7F0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(21, 55, 83, .15);
}

.teacher-diemtx .dtx-suggestion {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid #F0F3F6;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.teacher-diemtx .dtx-suggestion:last-child { border-bottom: 0; }
.teacher-diemtx .dtx-suggestion:hover { background: #F2F8FC; }

.teacher-diemtx .dtx-student-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: #0756A5;
  background: #E8F4FC;
  font-size: 12px;
  font-weight: 800;
}

.teacher-diemtx .dtx-suggestion-name {
  flex: 1;
  color: #30485E;
  font-size: 12px;
  font-weight: 650;
}

.teacher-diemtx .dtx-suggestion small {
  color: #8A98A7;
  font-size: 10px;
}

.teacher-diemtx .dtx-suggestion-note {
  padding: 13px;
  color: #7C8B99;
  font-size: 12px;
  text-align: center;
}

.teacher-diemtx .dtx-selected-student {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 9px;
  padding: 8px 10px;
  border: 1px solid #CDE9D8;
  border-radius: 8px;
  background: #F2FBF5;
}

.teacher-diemtx .dtx-selected-student strong {
  color: #216B43;
  font-size: 12px;
}

.teacher-diemtx .dtx-selected-student span {
  color: #6B8B78;
  font-size: 10px;
}

.teacher-diemtx .dtx-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 19px;
}

.teacher-diemtx .dtx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}

.teacher-diemtx .dtx-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(18, 59, 97, .12);
}

.teacher-diemtx .dtx-btn:disabled {
  opacity: .6;
  cursor: wait;
}

.teacher-diemtx .dtx-btn-primary {
  color: #fff;
  background: var(--dtx-blue);
}

.teacher-diemtx .dtx-btn-light {
  color: #456078;
  border-color: #DCE6EE;
  background: #fff;
}

.teacher-diemtx .dtx-btn-danger {
  color: #fff;
  background: #D94848;
}

.teacher-diemtx .dtx-edit-hint {
  color: #B36A1D;
  font-size: 11px;
}

.teacher-diemtx .dtx-message {
  display: none;
  padding: 10px 13px;
  margin: 0 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
}

.teacher-diemtx .dtx-message.show { display: block; }
.teacher-diemtx .dtx-message.success {
  color: #216B43;
  border-color: #CDE9D8;
  background: #F2FBF5;
}
.teacher-diemtx .dtx-message.error {
  color: #A33434;
  border-color: #F1CCCC;
  background: #FFF5F5;
}

.teacher-diemtx .dtx-list-heading { align-items: center; }

.teacher-diemtx .dtx-total {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 8px;
  color: #547087;
  background: #F1F7FB;
  white-space: nowrap;
}

.teacher-diemtx .dtx-total strong {
  color: var(--dtx-blue);
  font-size: 19px;
}

.teacher-diemtx .dtx-total span { font-size: 10px; }

.teacher-diemtx .dtx-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  padding: 13px;
  margin-bottom: 14px;
  border: 1px solid #E8EEF3;
  border-radius: 9px;
  background: #FAFCFE;
}

.teacher-diemtx .dtx-filter-grid .dtx-field { gap: 5px; }
.teacher-diemtx .dtx-filter-grid .dtx-field > span { font-size: 10px; }
.teacher-diemtx .dtx-filter-grid .dtx-field input,
.teacher-diemtx .dtx-filter-grid .dtx-field select {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 11px;
}

.teacher-diemtx .dtx-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #E8EEF3;
  border-radius: 9px;
}

.teacher-diemtx .dtx-table {
  width: 100%;
  min-width: 940px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
}

.teacher-diemtx .dtx-table th {
  padding: 12px 10px;
  color: #526B80;
  background: #F4F8FB;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.teacher-diemtx .dtx-table td {
  padding: 11px 10px;
  border-top: 1px solid #EDF1F4;
  color: #53677A;
  vertical-align: middle;
}

.teacher-diemtx .dtx-table tbody tr:hover { background: #FBFDFF; }
.teacher-diemtx .dtx-stt { color: #93A0AC !important; }
.teacher-diemtx .dtx-student-name { color: #294760; font-size: 11px; }
.teacher-diemtx .dtx-term-pill {
  display: inline-block;
  padding: 5px 7px;
  border-radius: 6px;
  color: #526C82;
  background: #F1F6FA;
  white-space: nowrap;
}
.teacher-diemtx .dtx-type-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 5px;
  color: #8A5718;
  background: #FFF3DF;
  font-size: 10px;
  font-weight: 800;
}
.teacher-diemtx .dtx-score {
  color: #16804B;
  font-size: 14px;
}

.teacher-diemtx .dtx-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.teacher-diemtx .dtx-row-actions button {
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.teacher-diemtx .dtx-action-edit {
  color: #0756A5;
  border-color: #D4E6F4 !important;
  background: #F1F8FD;
}

.teacher-diemtx .dtx-action-delete {
  color: #C13E3E;
  border-color: #F1DADA !important;
  background: #FFF6F6;
}

.teacher-diemtx .dtx-empty {
  padding: 27px 15px !important;
  color: #8997A4 !important;
  text-align: center;
}

.teacher-diemtx .dtx-confirm {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 35, 52, .42);
}

.teacher-diemtx .dtx-confirm[hidden] { display: none; }

.teacher-diemtx .dtx-confirm-card {
  width: min(100%, 390px);
  padding: 21px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .2);
}

.teacher-diemtx .dtx-confirm-card h3 {
  margin: 0 0 8px;
  color: #243F56;
  font-size: 17px;
}

.teacher-diemtx .dtx-confirm-card p {
  margin: 0;
  color: #6D7D8C;
  font-size: 12px;
  line-height: 1.6;
}

.teacher-diemtx .dtx-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .teacher-diemtx .dtx-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-diemtx .dtx-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .teacher-diemtx .dtx-header { align-items: flex-start; }
  .teacher-diemtx .dtx-header .dtx-btn { min-height: 35px; padding: 7px 10px; }
  .teacher-diemtx .dtx-subtitle { font-size: 11px; }
  .teacher-diemtx .dtx-panel { padding: 14px; }
  .teacher-diemtx .dtx-form-grid,
  .teacher-diemtx .dtx-filter-grid { grid-template-columns: 1fr; }
  .teacher-diemtx .dtx-panel-heading h3 { font-size: 15px; }
  .teacher-diemtx .dtx-required-note { font-size: 9px; }
}


/* Dropdown control for the searchable student picker */
.teacher-diemtx .dtx-search-wrap input {
  padding-right: 76px;
}
.teacher-diemtx .dtx-dropdown-toggle {
  position: absolute;
  top: 50%;
  right: 38px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #526579;
  cursor: pointer;
  font-size: 17px;
}
.teacher-diemtx .dtx-dropdown-toggle:hover:not(:disabled) {
  background: #edf4f9;
}
.teacher-diemtx .dtx-dropdown-toggle:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.teacher-diemtx .dtx-search-wrap input:disabled {
  background: #f4f6f8;
  cursor: not-allowed;
}

/* =========================================
   TEACHER PAGE - ENGLISH COMMERCE DN
   XEM ĐIỂM
========================================= */

.teacher-xemdiem {
  --xd-blue: #0756A5;
  --xd-deep: #123B61;
  --xd-sky: #38A9E8;
  --xd-text: #26384A;
  --xd-muted: #718096;
  --xd-line: #E5ECF2;
  width: 100%;
  color: var(--xd-text);
}

.teacher-xemdiem * { box-sizing: border-box; }

.teacher-xemdiem .xd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.teacher-xemdiem .xd-eyebrow {
  margin: 0 0 5px;
  color: var(--xd-sky);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}

.teacher-xemdiem .xd-header h2 {
  margin: 0;
  color: var(--xd-deep);
  font-size: clamp(20px, 2.5vw, 27px);
  line-height: 1.25;
}

.teacher-xemdiem .xd-subtitle {
  margin: 6px 0 0;
  color: var(--xd-muted);
  font-size: 13px;
}

.teacher-xemdiem .xd-panel {
  padding: 18px;
  margin-bottom: 17px;
  border: 1px solid var(--xd-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(24, 65, 101, .045);
}

.teacher-xemdiem .xd-filter-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 13px;
}

.teacher-xemdiem .xd-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
}

.teacher-xemdiem .xd-field > span {
  color: #506579;
  font-size: 12px;
  font-weight: 700;
}

.teacher-xemdiem .xd-field select {
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  border: 1px solid #DCE5ED;
  border-radius: 8px;
  outline: none;
  background: #FBFDFF;
  color: #2B4054;
  font: inherit;
  font-size: 13px;
}

.teacher-xemdiem .xd-field select:focus {
  border-color: var(--xd-sky);
  box-shadow: 0 0 0 3px rgba(56, 169, 232, .12);
}

.teacher-xemdiem .xd-export-wrap {
  display: flex;
  justify-content: flex-end;
}

.teacher-xemdiem .xd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}

.teacher-xemdiem .xd-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(18, 59, 97, .12);
}

.teacher-xemdiem .xd-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.teacher-xemdiem .xd-btn-primary {
  color: #fff;
  background: var(--xd-blue);
}

.teacher-xemdiem .xd-btn-light {
  color: #456078;
  border-color: #DCE6EE;
  background: #fff;
}

.teacher-xemdiem .xd-message {
  display: none;
  padding: 10px 13px;
  margin-top: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
}

.teacher-xemdiem .xd-message.show { display: block; }

.teacher-xemdiem .xd-message.success {
  color: #216B43;
  border-color: #CDE9D8;
  background: #F2FBF5;
}

.teacher-xemdiem .xd-message.error {
  color: #A33434;
  border-color: #F1CCCC;
  background: #FFF5F5;
}

.teacher-xemdiem .xd-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.teacher-xemdiem .xd-results-heading h3 {
  margin: 0;
  color: var(--xd-deep);
  font-size: 17px;
}

.teacher-xemdiem .xd-results-heading p {
  margin: 5px 0 0;
  color: var(--xd-muted);
  font-size: 12px;
}

.teacher-xemdiem .xd-count {
  padding: 7px 11px;
  border-radius: 8px;
  color: #547087;
  background: #F1F7FB;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.teacher-xemdiem .xd-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #E8EEF3;
  border-radius: 9px;
}

.teacher-xemdiem .xd-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
}

.teacher-xemdiem .xd-table th {
  padding: 11px 10px;
  border-right: 1px solid #E5ECF2;
  color: #526B80;
  background: #F4F8FB;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.teacher-xemdiem .xd-table .xd-group-row th {
  color: #fff;
  background: #245B86;
  text-align: center;
}

.teacher-xemdiem .xd-table .xd-group-row th[rowspan="2"] {
  background: #17486F;
}

.teacher-xemdiem .xd-table td {
  min-width: 70px;
  padding: 10px 11px;
  border-top: 1px solid #EDF1F4;
  border-right: 1px solid #F0F3F6;
  color: #53677A;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.teacher-xemdiem .xd-table tbody tr:hover {
  background: #FBFDFF;
}

.teacher-xemdiem .xd-table .xd-stt {
  min-width: 48px;
  color: #93A0AC;
}

.teacher-xemdiem .xd-table .xd-name {
  min-width: 190px;
  color: #294760;
  font-weight: 700;
  text-align: left;
}

.teacher-xemdiem .xd-table .xd-score {
  color: #3E596F;
}

.teacher-xemdiem .xd-table .xd-average {
  color: #0756A5;
  background: #F4F9FD;
  font-weight: 800;
}

.teacher-xemdiem .xd-table .xd-annual {
  color: #167348;
  background: #F0FAF4;
  font-weight: 850;
}

.teacher-xemdiem .xd-table .xd-empty {
  padding: 28px 15px;
  color: #8997A4;
  text-align: center;
}

.teacher-xemdiem .xd-note {
  margin: 11px 0 0;
  color: #82909D;
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .teacher-xemdiem .xd-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .teacher-xemdiem .xd-export-wrap {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .teacher-xemdiem .xd-export-wrap .xd-btn {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .teacher-xemdiem .xd-header {
    align-items: flex-start;
  }

  .teacher-xemdiem .xd-header .xd-btn {
    min-height: 35px;
    padding: 7px 10px;
  }

  .teacher-xemdiem .xd-subtitle {
    font-size: 11px;
  }

  .teacher-xemdiem .xd-panel {
    padding: 13px;
  }

  .teacher-xemdiem .xd-filter-grid {
    grid-template-columns: 1fr;
  }

  .teacher-xemdiem .xd-export-wrap {
    grid-column: auto;
  }

  .teacher-xemdiem .xd-results-heading h3 {
    font-size: 15px;
  }
}

/* ===== BỔ SUNG TAB VĂN BẢN HỘI THẢO ===== */
/* CSS bổ sung cho tab Văn bản hội thảo. Có thể chuyển nguyên khối vào cuối /css/teacher.css. */
.teacher-vanban { --vb-blue:#0756a5; --vb-deep:#123b61; --vb-sky:#38a9e8; --vb-text:#26384a; --vb-muted:#718096; --vb-line:#e3ebf2; --vb-soft:#f6faff; width:100%; color:var(--vb-text); }
.teacher-vanban, .teacher-vanban * { box-sizing:border-box; }
.teacher-vanban [hidden] { display:none !important; }
.teacher-vanban .vb-header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin:0 0 17px; }
.teacher-vanban .vb-eyebrow { margin:0 0 5px; color:var(--vb-sky); font-size:10px; font-weight:800; letter-spacing:.14em; }
.teacher-vanban .vb-header h2 { margin:0; color:var(--vb-deep); font-size:clamp(20px,2.5vw,27px); line-height:1.25; }
.teacher-vanban .vb-subtitle { margin:6px 0 0; color:var(--vb-muted); font-size:13px; }
.teacher-vanban .vb-header-actions { display:flex; align-items:center; gap:10px; }
.teacher-vanban .vb-role-pill { padding:7px 10px; border:1px solid #d9e9f5; border-radius:999px; color:#175b89; background:#f2f9ff; font-size:10px; font-weight:800; white-space:nowrap; }
.teacher-vanban .vb-panel { padding:19px; margin:0 0 17px; border:1px solid var(--vb-line); border-radius:13px; background:#fff; box-shadow:0 5px 20px rgba(24,65,101,.045); }
.teacher-vanban .vb-panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin:0 0 17px; }
.teacher-vanban .vb-panel-heading h3 { margin:0; color:var(--vb-deep); font-size:17px; }
.teacher-vanban .vb-panel-heading p { margin:5px 0 0; color:var(--vb-muted); font-size:12px; }
.teacher-vanban .vb-btn { display:inline-flex; align-items:center; justify-content:center; min-height:38px; gap:6px; padding:8px 13px; border:1px solid transparent; border-radius:8px; font:inherit; font-size:12px; font-weight:700; cursor:pointer; transition:background .15s,border-color .15s,transform .15s; }
.teacher-vanban .vb-btn:disabled { opacity:.55; cursor:not-allowed; }
.teacher-vanban .vb-btn-primary { color:#fff; border-color:var(--vb-blue); background:var(--vb-blue); }
.teacher-vanban .vb-btn-primary:hover:not(:disabled) { background:#064783; }
.teacher-vanban .vb-btn-light { color:#36536b; border-color:#dce6ee; background:#f8fbfd; }
.teacher-vanban .vb-btn-light:hover { border-color:#9fc5e0; background:#eef7fd; }
.teacher-vanban .vb-icon-btn { display:grid; place-items:center; width:32px; height:32px; border:1px solid #e0e8ef; border-radius:7px; color:#5d7183; background:#fff; cursor:pointer; }
.teacher-vanban .vb-alert { padding:10px 13px; margin:0 0 14px; border:1px solid #d8e8f5; border-radius:8px; color:#245579; background:#f2f9ff; font-size:12px; }
.teacher-vanban .vb-alert-success { border-color:#cdebd9; color:#17623b; background:#f0fbf4; }
.teacher-vanban .vb-alert-error { border-color:#f1d2d2; color:#a52d2d; background:#fff5f5; }
.teacher-vanban .vb-form-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.teacher-vanban .vb-field { display:flex; flex-direction:column; min-width:0; gap:7px; }
.teacher-vanban .vb-field > span { color:#506579; font-size:12px; font-weight:700; }
.teacher-vanban .vb-field > span b { color:#d94c45; }
.teacher-vanban .vb-field input, .teacher-vanban .vb-field select { width:100%; min-width:0; min-height:40px; padding:9px 11px; border:1px solid #dce5ed; border-radius:8px; outline:none; color:#2b4054; background:#fbfdff; font:inherit; font-size:13px; }
.teacher-vanban .vb-field input:focus, .teacher-vanban .vb-field select:focus { border-color:var(--vb-sky); background:#fff; box-shadow:0 0 0 3px rgba(56,169,232,.12); }
.teacher-vanban .vb-field input[readonly] { color:#7b8996; background:#f1f4f7; }
.teacher-vanban .vb-field-wide { grid-column:span 2; }
.teacher-vanban .vb-media-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:17px 0; }
.teacher-vanban .vb-media-group { min-width:0; padding:12px; border:1px solid #e5edf4; border-radius:10px; background:#fbfdff; }
.teacher-vanban .vb-media-group-wide { grid-column:1/-1; }
.teacher-vanban .vb-media-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:9px; color:#38546b; font-size:12px; }
.teacher-vanban .vb-media-heading .vb-btn { min-height:30px; padding:5px 9px; font-size:11px; }
.teacher-vanban .vb-link-list { display:grid; gap:7px; }
.teacher-vanban .vb-link-row { display:flex; gap:7px; min-width:0; }
.teacher-vanban .vb-link-row input { width:100%; min-width:0; height:35px; padding:7px 9px; border:1px solid #dce5ed; border-radius:7px; outline:none; font:inherit; font-size:12px; }
.teacher-vanban .vb-link-row input:focus { border-color:var(--vb-sky); }
.teacher-vanban .vb-remove-link { flex:0 0 34px; border:1px solid #f0dada; border-radius:7px; color:#b43d3d; background:#fff7f7; font-size:19px; cursor:pointer; }
.teacher-vanban .vb-editor-section { margin-top:17px; }
.teacher-vanban .vb-editor-instruction { padding:10px 12px; margin-bottom:9px; border-left:3px solid #38a9e8; border-radius:5px; color:#47657d; background:#f2f9ff; font-size:12px; }
.teacher-vanban .vb-insert-row { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:9px; }
.teacher-vanban .vb-insert-row .vb-btn { min-height:34px; padding:7px 10px; font-size:11px; }
.teacher-vanban .vb-editor-shell { overflow:hidden; border:1px solid #cbd8e3; border-radius:9px; }
.teacher-vanban .vb-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:5px; padding:8px; border-bottom:1px solid #dce5ed; background:#f5f8fb; }
.teacher-vanban .vb-toolbar button { min-height:30px; padding:5px 8px; border:1px solid #dce5ed; border-radius:5px; color:#344f65; background:#fff; font:inherit; font-size:11px; cursor:pointer; }
.teacher-vanban .vb-toolbar button:hover { border-color:#91bbd9; background:#edf7fd; }
.teacher-vanban .vb-toolbar select { max-width:150px; min-height:30px; padding:4px 6px; border:1px solid #dce5ed; border-radius:5px; color:#344f65; background:#fff; font:inherit; font-size:11px; }
.teacher-vanban .vb-toolbar-sep { width:1px; height:22px; margin:0 3px; background:#d7e1e9; }
.teacher-vanban .vb-color-control { display:flex; align-items:center; gap:3px; height:30px; padding:3px 6px; border:1px solid #dce5ed; border-radius:5px; color:#344f65; background:#fff; font-size:12px; font-weight:800; cursor:pointer; }
.teacher-vanban .vb-color-control input { width:20px; height:20px; padding:0; border:0; background:transparent; cursor:pointer; }
.teacher-vanban .vb-editor { min-height:470px; padding:22px; outline:none; color:#222; background:#fff; font-family:Arial,sans-serif; font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
.teacher-vanban .vb-editor:empty::before { content:attr(data-placeholder); color:#9aa8b5; pointer-events:none; }
.teacher-vanban .vb-editor img, .teacher-vanban .vb-preview-content img { max-width:100%; height:auto; }
.teacher-vanban .vb-editor table, .teacher-vanban .vb-preview-content table { max-width:100%; border-collapse:collapse; }
.teacher-vanban .vb-editor td, .teacher-vanban .vb-editor th, .teacher-vanban .vb-preview-content td, .teacher-vanban .vb-preview-content th { padding:6px; border:1px solid #cbd5e1; }
.teacher-vanban .vb-editor iframe, .teacher-vanban .vb-preview-content iframe { display:block; width:min(100%,900px); max-width:100%; min-height:300px; margin:12px auto; border:0; }
.teacher-vanban .vb-editor-note { margin:8px 0 0; color:#8493a1; font-size:11px; line-height:1.5; }
.teacher-vanban .vb-form-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:17px; }
.teacher-vanban .vb-list-heading { align-items:center; }
.teacher-vanban .vb-search { width:min(100%,320px); min-height:37px; padding:8px 11px; border:1px solid #dce5ed; border-radius:8px; outline:none; font:inherit; font-size:12px; }
.teacher-vanban .vb-search:focus { border-color:var(--vb-sky); box-shadow:0 0 0 3px rgba(56,169,232,.1); }
.teacher-vanban .vb-table-wrap { width:100%; overflow-x:auto; }
.teacher-vanban .vb-table { width:100%; min-width:690px; border-collapse:collapse; }
.teacher-vanban .vb-table th { padding:11px 10px; border-bottom:1px solid #dce6ee; color:#62788b; background:#f7fafc; text-align:left; font-size:10px; letter-spacing:.035em; white-space:nowrap; }
.teacher-vanban .vb-table td { padding:12px 10px; border-bottom:1px solid #edf1f5; color:#42596d; font-size:12px; vertical-align:middle; }
.teacher-vanban .vb-type-tag { display:inline-block; padding:5px 8px; border-radius:999px; color:#1b6394; background:#edf7ff; font-size:10px; font-weight:700; white-space:nowrap; }
.teacher-vanban .vb-title-cell { display:block; max-width:390px; color:#29465e; line-height:1.45; }
.teacher-vanban .vb-table td small { display:block; margin-top:4px; color:#8b99a6; font-size:10px; }
.teacher-vanban .vb-row-actions { display:flex; flex-wrap:wrap; gap:5px; }
.teacher-vanban .vb-row-actions button { padding:6px 8px; border:1px solid #dce6ee; border-radius:6px; color:#315b79; background:#fff; font:inherit; font-size:10px; font-weight:700; cursor:pointer; }
.teacher-vanban .vb-row-actions button[data-vb-action="delete"] { border-color:#f0dada; color:#b13d3d; background:#fff8f8; }
.teacher-vanban .vb-empty { padding:28px 12px !important; color:#8b99a6 !important; text-align:center; }
.teacher-vanban .vb-modal { position:fixed; z-index:10050; inset:0; display:flex; justify-content:center; align-items:flex-start; overflow:auto; padding:24px 14px; background:rgba(16,35,52,.55); }
.teacher-vanban .vb-modal-card { width:min(100%,960px); padding:19px; border-radius:13px; background:#fff; box-shadow:0 18px 60px rgba(0,0,0,.24); }
.teacher-vanban .vb-modal-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-bottom:12px; border-bottom:1px solid #e8eef3; }
.teacher-vanban .vb-modal-heading h3 { margin:0; color:var(--vb-deep); font-size:18px; }
.teacher-vanban .vb-preview-meta { padding:12px 0; color:#77899a; font-size:12px; }
.teacher-vanban .vb-preview-content { padding:14px 0; color:#222; font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
.teacher-vanban .vb-preview-media { display:grid; gap:12px; margin-top:12px; }
.teacher-vanban .vb-preview-media h4 { margin:0; color:#38546b; }
.teacher-vanban .vb-preview-media audio, .teacher-vanban .vb-preview-media video { width:100%; max-width:720px; }
.teacher-vanban .vb-preview-media iframe { width:100%; max-width:720px; min-height:360px; border:0; }
.teacher-vanban .vb-url-card { width:min(100%,460px); margin:auto; }
.teacher-vanban .vb-url-card .vb-field { margin-top:14px; }
@media (max-width:850px) { .teacher-vanban .vb-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) {
  .teacher-vanban .vb-header { align-items:flex-start; flex-direction:column; }
  .teacher-vanban .vb-header-actions { width:100%; justify-content:space-between; }
  .teacher-vanban .vb-panel { padding:14px; }
  .teacher-vanban .vb-form-grid, .teacher-vanban .vb-media-grid { grid-template-columns:1fr; }
  .teacher-vanban .vb-field-wide, .teacher-vanban .vb-media-group-wide { grid-column:auto; }
  .teacher-vanban .vb-list-heading { align-items:stretch; flex-direction:column; }
  .teacher-vanban .vb-search { width:100%; }
  .teacher-vanban .vb-editor { min-height:320px; padding:13px; }
  .teacher-vanban .vb-modal { padding:10px; }
  .teacher-vanban .vb-modal-card { padding:13px; }
}

/* Nút X nổi trên góc ảnh Google Drive trong trình soạn thảo */
.teacher-vanban .vb-editor .vb-drive-image {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
  line-height: 0;
  margin: 3px;
}
.teacher-vanban .vb-editor .vb-drive-image img {
  display: block;
  max-width: 100%;
  height: auto;
}
.teacher-vanban .vb-editor .vb-image-delete {
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 5;
  width: 25px;
  height: 25px;
  min-width: 25px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font: 700 19px/20px Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0,0,0,.28);
}
.teacher-vanban .vb-editor .vb-image-delete:hover { background: #b91c1c; }
.teacher-vanban .vb-editor .vb-image-delete:disabled { opacity: .65; cursor: wait; }

/* Anh trong noi dung: rong 50% khung va can giua trang */
.teacher-vanban .vb-editor .vb-drive-image,
.teacher-vanban .vb-preview-content .vb-drive-image {
  position: relative;
  display: block;
  width: 50%;
  max-width: 50%;
  margin: 14px auto;
  vertical-align: middle;
  line-height: 0;
  text-align: center;
}
.teacher-vanban .vb-editor .vb-drive-image img,
.teacher-vanban .vb-preview-content .vb-drive-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
/* Ảnh cũ chưa có wrapper Google Drive vẫn hiển thị 50% và căn giữa */
.teacher-vanban .vb-editor > img,
.teacher-vanban .vb-editor p > img,
.teacher-vanban .vb-preview-content > img,
.teacher-vanban .vb-preview-content p > img {
  display: block;
  width: 50%;
  max-width: 50%;
  height: auto;
  margin: 14px auto;
}

/* =====================================================
   XEM BÀI KIỂM TRA
===================================================== */

.xbt-container {
    width: 100%;
    color: #263238;
}

.xbt-header {
    margin-bottom: 20px;
}

.xbt-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
}

.xbt-header p {
    margin: 0;
    color: #687780;
}

.xbt-filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
    align-items: end;
    padding: 18px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e2e8ed;
    border-radius: 10px;
}

.xbt-filter-item {
    min-width: 0;
}

.xbt-filter-item label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.xbt-filter-item select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #ccd5dc;
    border-radius: 6px;
    background: #fff;
}

.xbt-filter-action {
    grid-column: 1 / -1;
}

.xbt-filter-action button {
    min-height: 40px;
    padding: 9px 20px;
    border: 0;
    border-radius: 6px;
    background: #1769aa;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.xbt-filter-action button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.xbt-message {
    display: none;
    margin: 12px 0;
    padding: 10px 13px;
    border-radius: 6px;
    background: #eef5fb;
    color: #24577d;
}

.xbt-message.show {
    display: block;
}

.xbt-message.error {
    background: #fff0f0;
    color: #a52828;
}

.xbt-review {
    margin-top: 18px;
}

.xbt-empty {
    padding: 24px;
    text-align: center;
    color: #75818a;
    background: #f7f9fb;
    border: 1px dashed #cbd5dc;
    border-radius: 8px;
}

.xbt-error {
    color: #a52828;
}

.xbt-review-header,
.xbt-section {
    padding: 18px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e2e8ed;
    border-radius: 9px;
}

.xbt-review-header h3 {
    margin: 0 0 14px;
}

.xbt-student-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 20px;
}

.xbt-score-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.xbt-score-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: #f5f8fb;
    border: 1px solid #e3eaf0;
    border-radius: 8px;
}

.xbt-score-item span {
    color: #667680;
    font-size: 13px;
}

.xbt-score-item strong {
    font-size: 20px;
}

.xbt-section h3 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e7edf1;
    font-size: 17px;
}

.xbt-exam-content,
.xbt-question-content {
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.xbt-exam-content img,
.xbt-question-content img {
    max-width: 100%;
    height: auto;
}

.xbt-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.xbt-table {
    width: 100%;
    border-collapse: collapse;
}

.xbt-table th,
.xbt-table td {
    padding: 10px 12px;
    border: 1px solid #e0e6eb;
    text-align: left;
}

.xbt-table th {
    background: #f4f7f9;
}

.xbt-result {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.xbt-result.correct {
    background: #e8f6ed;
    color: #237a42;
}

.xbt-result.incorrect {
    background: #fff0f0;
    color: #b02a37;
}

.xbt-result.pending {
    background: #f0f2f4;
    color: #64717a;
}

.xbt-essay {
    padding: 16px 0;
    border-bottom: 1px solid #e5eaee;
}

.xbt-essay:last-child {
    border-bottom: 0;
}

.xbt-essay-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.xbt-question-content {
    margin-bottom: 14px;
}

.xbt-answer-label {
    margin-bottom: 7px;
    font-weight: 700;
}

.xbt-student-answer {
    min-height: 55px;
    padding: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #f7f9fb;
    border: 1px solid #e2e8ed;
    border-radius: 6px;
}

.xbt-grade-info {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.xbt-comment {
    margin-top: 5px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.xbt-note {
    padding: 12px 14px;
    margin-bottom: 16px;
    background: #fff8e8;
    border: 1px solid #f0dfb5;
    border-radius: 7px;
    color: #765719;
}

@media (max-width: 900px) {
    .xbt-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xbt-score-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .xbt-filter,
    .xbt-student-info,
    .xbt-score-summary {
        grid-template-columns: 1fr;
    }

    .xbt-essay-heading {
        flex-direction: column;
    }
}
/* BÀI THI TRẮC NGHIỆM - XEM LẠI SAU KHI NỘP */

.xbt-exam-introduction {
    margin-bottom: 14px;
    line-height: 1.7;
}

.xbt-question {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #e2e8ed;
    border-radius: 9px;
    background: #fff;
}

.xbt-question-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #9ca3af;
    border-radius: 6px;
    background: #f3f4f6;
}

.xbt-question.correct .xbt-question-heading {
    border-left-color: #16a34a;
    background: #ecfdf3;
}

.xbt-question.incorrect .xbt-question-heading {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.xbt-question-title {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    line-height: 1.6;
}

.xbt-question-status {
    flex-shrink: 0;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    background: #e5e7eb;
    color: #4b5563;
}

.xbt-question.correct .xbt-question-status {
    color: #15803d;
    background: #dcfce7;
}

.xbt-question.incorrect .xbt-question-status {
    color: #b91c1c;
    background: #fee2e2;
}

.xbt-question-extra {
    margin: 8px 0;
    line-height: 1.6;
}

.xbt-options {
    display: grid;
    gap: 7px;
}

.xbt-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 6px;
    line-height: 1.55;
    background: #fff;
}

.xbt-option-letter {
    flex-shrink: 0;
    font-weight: 600;
}

.xbt-option-content {
    flex: 1;
    min-width: 0;
}

.xbt-option-content p {
    margin: 0;
}

.xbt-option.selected-correct {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
}

.xbt-option.selected-wrong {
    border-color: #fca5a5;
    background: #fee2e2;
    color: #991b1b;
}

.xbt-option.correct-answer {
    border-color: #86efac;
    background: #ecfdf3;
    color: #166534;
}

.xbt-option-mark {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.xbt-exam-introduction img,
.xbt-question-title img,
.xbt-option-content img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    .xbt-question-heading {
        flex-direction: column;
    }

    .xbt-option {
        flex-wrap: wrap;
    }

    .xbt-option-mark {
        width: 100%;
        padding-left: 22px;
    }
}

[data-teacher-kiemtra] .kt-ai-invalid {
  border: 2px solid #dc2626 !important;
  background: #fff1f2 !important;
  color: #991b1b !important;
}

[data-teacher-kiemtra] .kt-ai-invalid:focus {
  outline: 2px solid rgba(220, 38, 38, .2) !important;
  border-color: #b91c1c !important;
}

/* Đảm bảo thông báo ẩn/hiện đúng theo thuộc tính hidden */
.teacher-vanban [data-vb-message][hidden] {
  display: none !important;
}

.teacher-vanban [data-vb-message]:not([hidden]) {
  display: block;
}

/* Englishcommercedn · Oral examination teacher interface */
#teacher-oral-exam {
  --oral-ink: #17243b;
  --oral-muted: #718096;
  --oral-line: #e5ebf3;
  --oral-blue: #2463eb;
  --oral-blue-dark: #1747b8;
  --oral-cyan: #20a4d8;
  --oral-orange: #f59a23;
  --oral-green: #15966a;
  --oral-red: #d94b55;
  --oral-surface: #ffffff;
  --oral-soft: #f5f8fd;
  color: var(--oral-ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  width: 100%;
  min-height: 100%;
  padding: clamp(16px, 2.6vw, 34px);
  background: radial-gradient(circle at 92% 0%, rgba(36,99,235,.09), transparent 28%), linear-gradient(180deg,#f4f7fc 0%,#f8faff 100%);
  box-sizing: border-box;
}
#teacher-oral-exam *, #teacher-oral-exam *::before, #teacher-oral-exam *::after { box-sizing: border-box; }
#teacher-oral-exam [hidden] { display: none !important; }
#teacher-oral-exam .oral-page-content { width: min(1440px,100%); margin: 0 auto; display: grid; gap: 22px; }
#teacher-oral-exam .oral-hero { width: min(1440px,100%); margin: 0 auto 24px; display:flex; align-items:center; justify-content:space-between; gap:20px; color:#fff; padding:clamp(22px,3vw,34px); border-radius:24px; background:linear-gradient(118deg,#10264b 0%,#174b91 58%,#197db3 100%); box-shadow:0 18px 42px rgba(18,55,105,.18); position:relative; overflow:hidden; }
#teacher-oral-exam .oral-hero::after { content:""; position:absolute; width:340px;height:340px;border:1px solid rgba(255,255,255,.12);border-radius:50%;right:7%;top:-230px;box-shadow:0 0 0 34px rgba(255,255,255,.035),0 0 0 70px rgba(255,255,255,.025);pointer-events:none; }
#teacher-oral-exam .oral-brand-lockup { display:flex;align-items:center;gap:18px;position:relative;z-index:1; }
#teacher-oral-exam .oral-brand-mark { width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,#ffbd55,#f28b20);color:#17345c;font-size:20px;font-weight:900;letter-spacing:-1px;box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 8px 20px rgba(0,0,0,.16); }
#teacher-oral-exam .oral-eyebrow,#teacher-oral-exam .oral-step-label { display:block;font-size:10px;font-weight:800;letter-spacing:1.7px; }
#teacher-oral-exam .oral-eyebrow { color:#b9d9ff;margin-bottom:7px; }
#teacher-oral-exam .oral-hero h1 { margin:0;color:#fff;font-size:clamp(25px,3vw,36px);line-height:1.12;font-weight:800;letter-spacing:-.8px; }
#teacher-oral-exam .oral-hero p { margin:8px 0 0;color:#d7e7fa;font-size:14px; }
#teacher-oral-exam .oral-btn { min-height:44px;border:0;border-radius:12px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-family:inherit;font-size:13px;font-weight:700;line-height:1.2;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,background .18s ease,border-color .18s ease; }
#teacher-oral-exam .oral-btn:hover:not(:disabled) { transform:translateY(-1px); }
#teacher-oral-exam .oral-btn:focus-visible,#teacher-oral-exam select:focus-visible,#teacher-oral-exam input:focus-visible { outline:3px solid rgba(36,99,235,.24);outline-offset:2px; }
#teacher-oral-exam .oral-btn:disabled { opacity:.48;cursor:not-allowed;transform:none; }
#teacher-oral-exam .oral-btn-ghost { position:relative;z-index:1;color:#fff;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.24);backdrop-filter:blur(8px); }
#teacher-oral-exam .oral-btn-ghost:hover { background:rgba(255,255,255,.18); }
#teacher-oral-exam .oral-panel { background:var(--oral-surface);border:1px solid rgba(221,230,242,.9);border-radius:21px;padding:clamp(20px,2.5vw,30px);box-shadow:0 10px 30px rgba(25,55,99,.055);min-width:0; }
#teacher-oral-exam .oral-panel-heading,#teacher-oral-exam .oral-live-header { display:flex;align-items:flex-start;justify-content:space-between;gap:16px; }
#teacher-oral-exam .oral-step-label { color:#6480a5;margin-bottom:8px; }
#teacher-oral-exam .oral-panel h2,#teacher-oral-exam .oral-live-header h2 { margin:0;color:var(--oral-ink);font-size:21px;letter-spacing:-.35px; }
#teacher-oral-exam .oral-panel-heading p { margin:7px 0 0;color:var(--oral-muted);font-size:13px;line-height:1.6; }
#teacher-oral-exam .oral-heading-icon { flex:0 0 44px;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;color:var(--oral-blue);background:#edf3ff;font-size:21px;font-weight:800; }
#teacher-oral-exam .oral-selection-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:25px 0 26px; }
#teacher-oral-exam .oral-field label,#teacher-oral-exam .oral-score-form label { display:block;margin-bottom:8px;font-size:12px;font-weight:750;color:#435574; }
#teacher-oral-exam select,#teacher-oral-exam input { width:100%;height:48px;padding:0 14px;border:1px solid #dce5f0;border-radius:11px;background:#fbfcff;color:#253653;font-family:inherit;font-size:13px;font-weight:500; }
#teacher-oral-exam select:disabled { color:#9aa8ba;background:#f5f7fa; }
#teacher-oral-exam .oral-exam-browser { display:grid;grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr);gap:18px;align-items:stretch; }
#teacher-oral-exam .oral-exam-list-column,#teacher-oral-exam .oral-selected-exam { min-width:0;border:1px solid var(--oral-line);border-radius:15px;background:#fbfcff;padding:17px; }
#teacher-oral-exam .oral-subheading-row { display:flex;align-items:center;justify-content:space-between;gap:12px; }
#teacher-oral-exam .oral-subheading-row h3,#teacher-oral-exam .oral-control-panel h3 { margin:0;color:#233653;font-size:15px;font-weight:800; }
#teacher-oral-exam .oral-subheading-row p { margin:5px 0 0;color:#8290a4;font-size:11px; }
#teacher-oral-exam .oral-count-pill { white-space:nowrap;padding:6px 10px;border-radius:20px;background:#eaf1ff;color:#285ac0;font-size:11px;font-weight:800; }
#teacher-oral-exam .oral-exam-list { display:grid;gap:8px;margin-top:14px;max-height:270px;overflow:auto;padding-right:3px; }
#teacher-oral-exam .oral-list-placeholder { padding:24px 12px;text-align:center;color:#8997aa;font-size:12px;border:1px dashed #d7e0ec;border-radius:11px; }
#teacher-oral-exam .oral-exam-option { width:100%;display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #e5ebf4;border-radius:11px;background:#fff;text-align:left;cursor:pointer;transition:.18s ease; }
#teacher-oral-exam .oral-exam-option:hover { border-color:#a9c2f5;background:#f7faff; }
#teacher-oral-exam .oral-exam-option.is-selected { border-color:#5c8cf0;background:#eef4ff;box-shadow:0 0 0 2px rgba(36,99,235,.08); }
#teacher-oral-exam .oral-exam-option-mark { flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#edf3ff;color:#2861d5;font-size:11px;font-weight:900; }
#teacher-oral-exam .oral-exam-option-copy { min-width:0;flex:1; }
#teacher-oral-exam .oral-exam-option-copy strong { display:block;color:#253653;font-size:12px; }
#teacher-oral-exam .oral-exam-option-copy small { display:block;margin-top:4px;color:#8491a5;font-size:10px; }
#teacher-oral-exam .oral-exam-option-check { color:var(--oral-blue);font-size:17px; }
#teacher-oral-exam .oral-selected-exam { background:linear-gradient(155deg,#f7faff,#fff); }
#teacher-oral-exam .oral-selected-kicker { color:#2c65d5;font-size:10px;font-weight:900;letter-spacing:1.3px; }
#teacher-oral-exam .oral-selected-exam h3 { margin:8px 0;color:#1e3150;font-size:16px; }
#teacher-oral-exam .oral-selected-meta { display:flex;flex-wrap:wrap;gap:6px;margin-bottom:13px; }
#teacher-oral-exam .oral-meta-tag { padding:5px 8px;border-radius:7px;background:#edf2fa;color:#5d6e87;font-size:10px;font-weight:650; }
#teacher-oral-exam .oral-exam-content { max-height:260px;overflow:auto;color:#475873;font-size:12px;line-height:1.7; }
#teacher-oral-exam .oral-exam-content h4 { margin:12px 0 6px;color:#263b5d;font-size:12px; }
#teacher-oral-exam .oral-question-item { padding:10px;margin:8px 0;border:1px solid #e6edf7;border-radius:9px;background:#fff; }
#teacher-oral-exam .oral-question-item strong { display:block;margin-bottom:5px;color:#2d5db5; }
#teacher-oral-exam .oral-setup-footer { display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:20px;padding-top:18px;border-top:1px solid #edf1f6; }
#teacher-oral-exam .oral-message { min-height:18px;margin:0;color:#718096;font-size:12px;line-height:1.5; }
#teacher-oral-exam .oral-message.is-error { color:#c33d49; }
#teacher-oral-exam .oral-message.is-success { color:#16845f; }
#teacher-oral-exam .oral-action-group { display:flex;gap:9px;flex-wrap:wrap; }
#teacher-oral-exam .oral-btn-primary { color:#fff;background:linear-gradient(110deg,#2867e9,#1c55c6);box-shadow:0 7px 16px rgba(36,99,235,.2); }
#teacher-oral-exam .oral-btn-primary:hover:not(:disabled) { background:linear-gradient(110deg,#1f5bd7,#1648b1);box-shadow:0 9px 20px rgba(36,99,235,.27); }
#teacher-oral-exam .oral-btn-danger-outline { color:#b83b48;background:#fff;border:1px solid #f0cbd0; }
#teacher-oral-exam .oral-btn-danger-outline:hover:not(:disabled) { background:#fff5f6;border-color:#e5aeb5; }
#teacher-oral-exam .oral-waiting-panel { overflow:hidden;position:relative; }
#teacher-oral-exam .oral-waiting-topline { display:flex;align-items:center;justify-content:space-between;gap:16px; }
#teacher-oral-exam .oral-status-heading { display:flex;align-items:center;gap:12px; }
#teacher-oral-exam .oral-status-heading h2 { font-size:18px; }
#teacher-oral-exam .oral-status-indicator { width:11px;height:11px;flex:0 0 11px;border-radius:50%;background:#a8b3c2;box-shadow:0 0 0 5px #f0f3f7; }
#teacher-oral-exam .oral-status-indicator.is-waiting { background:#e9a23b;box-shadow:0 0 0 5px #fff5e7; }
#teacher-oral-exam .oral-status-indicator.is-live { background:#1aa779;box-shadow:0 0 0 5px #e6f8f1; }
#teacher-oral-exam .oral-status-chip { display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border-radius:30px;background:#f0f3f7;color:#77869b;font-size:10px;font-weight:850;letter-spacing:.4px;white-space:nowrap; }
#teacher-oral-exam .oral-status-chip.is-waiting { background:#fff5e6;color:#a66b16; }
#teacher-oral-exam .oral-status-chip.is-live { background:#e8f8f1;color:#13845e; }
#teacher-oral-exam .oral-waiting-content { min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px 12px 18px; }
#teacher-oral-exam .oral-waiting-illustration { width:86px;height:86px;position:relative;display:grid;place-items:center;margin-bottom:13px; }
#teacher-oral-exam .oral-waiting-hourglass { z-index:1;width:58px;height:58px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(145deg,#fff6e7,#ffebc9);font-size:29px;box-shadow:0 7px 20px rgba(220,155,55,.14); }
#teacher-oral-exam .oral-waiting-orbit { position:absolute;inset:0;border:1px solid #e5edf8;border-radius:50%; }
#teacher-oral-exam .oral-waiting-orbit.orbit-two { inset:9px;border-style:dashed;border-color:#cbdcf6; }
#teacher-oral-exam .oral-waiting-content h3 { margin:0;color:#263b5b;font-size:17px; }
#teacher-oral-exam .oral-waiting-content p { max-width:590px;margin:8px 0 0;color:#8290a3;font-size:12px;line-height:1.7; }
#teacher-oral-exam .oral-room-facts { display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #edf1f6;padding-top:16px;gap:16px; }
#teacher-oral-exam .oral-room-fact span,#teacher-oral-exam .oral-student-summary span { display:block;margin-bottom:6px;color:#8794a7;font-size:10px;font-weight:700;letter-spacing:.4px; }
#teacher-oral-exam .oral-room-fact strong { color:#263b5b;font-size:13px;overflow-wrap:anywhere; }
#teacher-oral-exam .oral-live-panel { border-top:3px solid #1ba779; }
#teacher-oral-exam .oral-live-header { align-items:center;margin-bottom:20px; }
#teacher-oral-exam .oral-live-pulse { width:7px;height:7px;border-radius:50%;background:#1ba779;box-shadow:0 0 0 4px rgba(27,167,121,.12); }
#teacher-oral-exam .oral-student-summary { display:grid;grid-template-columns:1.5fr repeat(4,1fr) .8fr;align-items:center;gap:12px;padding:15px;border:1px solid #e5edf6;border-radius:13px;background:#f8faff;margin-bottom:18px; }
#teacher-oral-exam .oral-student-avatar { width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:#e8efff;color:#285cc5;font-size:11px;font-weight:900; }
#teacher-oral-exam .oral-student-summary strong { display:block;color:#293d5b;font-size:12px;overflow-wrap:anywhere; }
#teacher-oral-exam .oral-video-grid { display:grid;grid-template-columns:1.55fr 1fr;gap:15px; }
#teacher-oral-exam .oral-video-card { min-width:0;position:relative;overflow:hidden;border-radius:15px;background:#101c2e;min-height:230px; }
#teacher-oral-exam .oral-video-card video { width:100%;height:100%;min-height:230px;display:block;object-fit:cover;background:linear-gradient(145deg,#172943,#0d1727); }
#teacher-oral-exam .oral-video-self video { transform:scaleX(-1); }
#teacher-oral-exam .oral-video-heading { position:absolute;z-index:2;left:12px;right:12px;top:12px;display:flex;justify-content:space-between;gap:10px;color:#fff;font-size:11px; }
#teacher-oral-exam .oral-video-heading span { color:#c4d1e2;font-size:10px; }
#teacher-oral-exam .oral-video-caption { position:absolute;left:13px;bottom:12px;color:#fff;font-size:10px;font-weight:700;text-shadow:0 1px 5px #000; }
#teacher-oral-exam .oral-live-bottom-grid { display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:15px;margin-top:16px; }
#teacher-oral-exam .oral-question-panel,#teacher-oral-exam .oral-control-panel { padding:17px;border:1px solid var(--oral-line);border-radius:14px;background:#fbfcff;min-width:0; }
#teacher-oral-exam .oral-question-content { margin-top:12px;color:#435574;font-size:13px;line-height:1.75; }
#teacher-oral-exam .oral-btn-control { width:100%;margin-top:10px;background:#fff;color:#405572;border:1px solid #dce5f0; }
#teacher-oral-exam .oral-control-note { margin:13px 0 0;color:#8492a5;font-size:10px;line-height:1.6; }
#teacher-oral-exam .oral-recording-card { margin:22px 0;padding:16px;border:1px solid #e5ebf3;border-radius:14px;background:#f8faff; }
#teacher-oral-exam .oral-recording-card strong,#teacher-oral-exam .oral-recording-card span { display:block; }
#teacher-oral-exam .oral-recording-card strong { color:#263b5b;font-size:13px; }
#teacher-oral-exam .oral-recording-card span { margin-top:5px;color:#8190a4;font-size:11px; }
#teacher-oral-exam .oral-recording-card video { width:100%;max-height:380px;margin-top:14px;border-radius:10px;background:#111d30; }
#teacher-oral-exam .oral-score-form { max-width:420px; }
#teacher-oral-exam .oral-score-input { display:flex;align-items:center;gap:10px;margin-bottom:13px; }
#teacher-oral-exam .oral-score-input input { max-width:180px;font-size:17px;font-weight:800; }
#teacher-oral-exam .oral-score-input span { color:#718096;font-weight:800;font-size:13px; }
#teacher-oral-exam .oral-toast { position:sticky;bottom:16px;z-index:20;width:fit-content;max-width:min(520px,100%);margin:0 auto;padding:12px 17px;border-radius:12px;background:#172b49;color:#fff;font-size:12px;box-shadow:0 10px 30px rgba(10,30,60,.2); }
@media (max-width: 900px) {
  #teacher-oral-exam .oral-student-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #teacher-oral-exam .oral-student-avatar { display:none; }
}
@media (max-width: 700px) {
  #teacher-oral-exam { padding:12px; }
  #teacher-oral-exam .oral-hero { padding:20px;border-radius:18px;align-items:flex-start; }
  #teacher-oral-exam .oral-brand-mark { width:46px;height:46px;border-radius:14px;font-size:16px; }
  #teacher-oral-exam .oral-brand-lockup { gap:12px; }
  #teacher-oral-exam .oral-eyebrow { font-size:8px;letter-spacing:1px; }
  #teacher-oral-exam .oral-hero h1 { font-size:23px; }
  #teacher-oral-exam .oral-hero p { font-size:11px; }
  #teacher-oral-exam .oral-btn-ghost { min-height:37px;padding:0 10px;font-size:10px; }
  #teacher-oral-exam .oral-selection-grid,#teacher-oral-exam .oral-exam-browser,#teacher-oral-exam .oral-video-grid,#teacher-oral-exam .oral-live-bottom-grid { grid-template-columns:1fr; }
  #teacher-oral-exam .oral-setup-footer { align-items:stretch;flex-direction:column; }
  #teacher-oral-exam .oral-action-group { display:grid;grid-template-columns:1fr 1fr; }
  #teacher-oral-exam .oral-action-group .oral-btn { padding:0 10px;font-size:11px; }
  #teacher-oral-exam .oral-room-facts { grid-template-columns:1fr; }
  #teacher-oral-exam .oral-student-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #teacher-oral-exam .oral-live-header { align-items:flex-start; }
}
@media (max-width: 420px) {
  #teacher-oral-exam .oral-hero { flex-direction:column; }
  #teacher-oral-exam .oral-selection-grid { gap:11px;margin:19px 0; }
  #teacher-oral-exam .oral-panel { padding:17px; }
  #teacher-oral-exam .oral-action-group { grid-template-columns:1fr; }
  #teacher-oral-exam .oral-student-summary { grid-template-columns:1fr 1fr; }
}

/* =========================================
   TAB ĐỔI THÔNG TIN TIÊU ĐỀ WEB
========================================= */
.teacher-doihead {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}


.teacher-doihead-title {
margin: 0 0 8px;
color: #174a7e;
}

.teacher-doihead-note {
margin: 0 0 20px;
color: #666;
}

.teacher-doihead-preview {
margin-bottom: 22px;
padding: 18px;
border: 1px solid #d5dce5;
border-radius: 10px;
background: #fff;
}

.teacher-doihead-preview h3 {
margin: 0 0 14px;
color: #174a7e;
}

.teacher-doihead-preview-content {
padding: 18px 12px;
border-radius: 8px;
background: #fff8dc;
text-align: center;
overflow-wrap: anywhere;
}

.teacher-doihead-preview-content [data-dh-preview-title] {
margin-bottom: 8px;
color: #174a7e;
font-size: 22px;
font-weight: 800;
}

.teacher-doihead-preview-content [data-dh-preview-name] {
margin-bottom: 8px;
color: #d66b16;
font-size: 18px;
font-weight: 700;
}

.teacher-doihead-preview-content [data-dh-preview-slogan] {
color: #222;
font-size: 15px;
font-weight: 600;
}

.teacher-doihead-form {
display: grid;
gap: 16px;
}

.teacher-doihead-form label {
display: grid;
gap: 7px;
color: #26384a;
font-weight: 600;
}

.teacher-doihead-form input,
.teacher-doihead-form textarea {
width: 100%;
padding: 11px 12px;
box-sizing: border-box;
border: 1px solid #cbd3dd;
border-radius: 7px;
font: inherit;
}

.teacher-doihead-form input:disabled,
.teacher-doihead-form textarea:disabled {
background: #f1f3f5;
color: #555;
cursor: not-allowed;
}

.teacher-doihead-actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 18px;
}

.teacher-doihead-actions button {
padding: 10px 18px;
border: 0;
border-radius: 7px;
background: #1769aa;
color: #fff;
font-weight: 700;
cursor: pointer;
}

.teacher-doihead-actions button[data-dh-default] {
background: #626b75;
}

.teacher-doihead-actions button:disabled {
opacity: .5;
cursor: not-allowed;
}

.teacher-doihead-message {
margin-top: 15px;
padding: 10px 12px;
border-radius: 7px;
background: #eef3f8;
color: #24445f;
}

.teacher-doihead-success {
background: #e8f5e9;
color: #246b35;
}

.teacher-doihead-error {
background: #fdecea;
color: #a12622;
}

@media (max-width: 600px) {
.teacher-doihead {
padding: 12px;
}

.teacher-doihead-preview-content [data-dh-preview-title] {
font-size: 18px;
}

.teacher-doihead-preview-content [data-dh-preview-name] {
font-size: 16px;
}
}

/* Mobile usability pass 1: responsive header and content containment */

@media (max-width: 700px) {
  .teacher-page,
  .teacher-header,
  .teacher-layout,
  .teacher-sidebar,
  .teacher-content,
  .teacher-tab-container {
    min-width: 0;
    max-width: 100%;
  }

  .teacher-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .teacher-header-actions > a,
  .teacher-header-actions > button,
  .teacher-btn,
  .teacher-logout-btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
    justify-content: center;
  }

  .teacher-content,
  .teacher-tab-container {
    overflow-x: hidden;
  }

  .teacher-tab-container img,
  .teacher-tab-container video,
  .teacher-tab-container iframe {
    max-width: 100%;
  }

  .teacher-tab-container input,
  .teacher-tab-container select,
  .teacher-tab-container textarea {
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .teacher-header-actions {
    gap: 6px;
  }

  .teacher-header-actions > a,
  .teacher-header-actions > button {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 11px;
  }

  .teacher-tab-container {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Mobile usability pass 2: internal teacher tabs */
@media (max-width: 700px) {
  #teacherTabContent {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  #teacherTabContent :where(.bg-form-grid, .form-grid, .profile-grid, .filter-grid, .kt-form-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #teacherTabContent :where(table) {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #teacherTabContent :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  #teacherTabContent :where(button, .bg-btn, .teacher-btn) {
    min-height: 40px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #teacherTabContent :where(.bg-editor-toolbar, .bg-toolbar, .toolbar, .action-row, .filter-row, .bg-actions) {
    flex-wrap: wrap;
    gap: 7px;
  }

  #teacherTabContent :where(.bg-panel, .bg-editor-panel, .bg-form-grid, .bg-field) {
    min-width: 0;
    max-width: 100%;
  }

  #teacherTabContent :where(.table-wrap, .table-responsive, .bg-table-wrap) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #teacherTabContent :where(img, video, iframe, canvas) {
    max-width: 100%;
  }

  #teacherTabContent :where([contenteditable="true"]) {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  #teacherTabContent :where(.modal, [role="dialog"], .overlay) {
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    overflow: auto;
  }
}
@media (max-width: 380px) {
  #teacherTabContent :where(.bg-panel, .bg-editor-panel) {
    padding: 10px;
  }

  #teacherTabContent :where(.bg-editor-toolbar button) {
    padding: 7px 9px;
  }
}
