/* =========================
   PAGE
========================= */

.theory-page{
    width:100%;
    max-width:1700px;
    margin:0 auto;

    height:100vh;

    display:flex;
    align-items:stretch;
    gap:18px;

    padding:16px 20px;

    background:
        linear-gradient(
            180deg,
            #f4f7ff 0%,
            #edf3ff 100%
        );

    overflow:hidden;
}

/* =========================
LEFT VIEWER
========================= */

.viewer{

    flex:1 1 auto;
    width:0;
    min-width:0;

    height:calc(100vh - 16px);

    display:flex;
    flex-direction:column;
    align-items:stretch;

    background:#fff;

    border:1px solid #e5ecff;
    border-radius:20px;

    box-shadow:
        0 10px 40px rgba(0,0,0,.06);

    overflow:hidden;

}

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

.viewer-header{

    height:52px;

    flex-shrink:0;

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:0 14px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f7faff
        );

    border-bottom:
        1px solid #e8eefc;
}

.top-btn{

    height:48px;

    padding:0 22px;

    border:none;

    border-radius:14px;

    font-size:15px;
    font-weight:700;

    color:white;

    cursor:pointer;

    background:
        linear-gradient(
            135deg,
        #3b82f6,
        #2563eb
        );

    box-shadow:
        0 10px 24px rgba(79,140,255,0.25);

    transition:0.2s;
}

.top-btn:hover{

    transform:translateY(-2px);

    background:
        linear-gradient(
            135deg,
        #3b82f6,
         #143e9b
        );

    color:white;

    box-shadow:
        0 8px 18px rgba(91,140,255,0.22);
}

.viewer-title{

    font-size:18px;
    font-weight:900;

    color:#0051ff;

    letter-spacing:-0.5px;
}

/* =========================
   VIEWER CONTENT
========================= */

/* =========================
   VIEWER CONTENT (FIXED HEIGHT)
========================= */

/* =========================
   VIEWER CONTENT (Mở rộng tối đa không gian)
========================= */

.viewer-box {
    position: relative;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
    border-radius: 18px;
    border: 1px solid #e6eeff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: block; 
    padding: 12px; /* Thu nhỏ padding viền một chút để diện tích hiển thị bên trong rộng hơn */
}

/* Các thành phần nội dung bên trong (iframe, placeholder, v.v.) được nới rộng tối đa */
.viewer-box iframe,
.viewer-placeholder {
    min-height: 780px !important; /* 🔥 Tăng chiều cao tối thiểu của vùng chứa tài liệu lên (mặc định cũ thường là 650px - 700px) */
    width: 100%;
    box-sizing: border-box;
}

.material-extra-list-wrapper {
    width: 100%;
    margin-top: 24px;
    margin-bottom: 30px; 
    display: block;
    clear: both;
}
.viewer-placeholder{

    width:100%;
    height:100%;

    display:flex;
    align-items:center;
    justify-content:center;

    text-align:center;

    border-radius:16px;

    background:white;

    border:2px dashed #d9e4ff;

    color:#7d8db3;

    font-size:16px;
    font-weight:700;
}


/* =========================
   RIGHT MENU
========================= */

.menu{

    width:320px;

    flex-shrink:0;

    display:flex;
    flex-direction:column;

    gap:18px;

    padding:22px;

    overflow-y:auto;

    background:white;

    border-radius:26px;

    border:1px solid #e5ecff;

    box-shadow:
        0 12px 40px rgba(0,0,0,0.06);
}

/* =========================
   HERO
========================= */

.hero-mini{

    font-size:18px;
    font-weight:900;

    color:#14213d;

    letter-spacing:-0.6px;
}

/* =========================
   UPLOAD BOX
========================= */

.upload-box,
.lesson-panel{

    padding:16px;

    border-radius:20px;

    background:
        linear-gradient(
            180deg,
            #f8fbff,
            #eef4ff
        );

    border:1px solid #dce7ff;
}

.upload-form{

    display:flex;
    gap:6px;
    flex-direction:column;
}

.file-picker input{

    display:none;
}

.file-ui{

    height:30px;

    border-radius:14px;

    display:flex;
    align-items:center;
    justify-content:center;

    background:white;

    border:2px dashed #c9d9ff;

    cursor:pointer;

    font-size:14px;

    font-weight:700;

    color:#4566b0;
}

.upload-btn{

    height:40px;

    min-width:160px;

    margin:10px auto 0 auto;

    display:flex;

    align-items:center;
    justify-content:center;

    border:none;

    border-radius:14px;

    cursor:pointer;

    font-size:13px;
    font-weight:800;

    color:white;

    background:
        linear-gradient(
            135deg,
        #3b82f6,
        #2563eb
        );

    box-shadow:
        0 10px 24px rgba(79,140,255,0.25);

    transition:0.2s;
}

.upload-btn:hover{

    transform:translateY(-2px);
}

/* =========================
   FORM
========================= */
.file-select-box{

    display:flex;

    flex-direction:column;

    gap:10px;

    margin-bottom:16px;
}

/* =========================
   LABEL
========================= */

.file-select-box label,
.lesson-panel label{

    display:flex;
    align-items:center;

    font-size:14px;
    font-weight:700;

    color:#34415f;

    letter-spacing:0.2px;
}

.material-upload-box{

    display:flex;

    flex-direction:column;

    gap:10px;

    margin-bottom:16px;
}

.material-upload-box label{

    display:flex;
    align-items:center;

    font-size:14px;
    font-weight:700;

    color:#34415f;

    letter-spacing:0.2px;
}

.material-file-input{

    width:100%;

    height:40px;

    padding:0 14px;

    border-radius:16px;

    font-size:14px;
    font-weight:500;

    color:#24324d;

    display:flex;
    align-items:center;

    cursor:pointer;

    outline:none;

}

.material-file-input:hover{

    border-color:#bfd1ff;
}

.material-file-input:focus{

    border-color:#5b8cff;

    box-shadow:
        0 0 0 4px rgba(91,140,255,0.12);

    transform:translateY(-1px);
}

.material-file-input::file-selector-button{

    height:40px;

    padding:0 18px;

    margin-right:14px;

    border:none;

    border-radius:12px;

    background:
        linear-gradient(
            135deg,
        #3b82f6,
        #2563eb
        );

    color:white;

    font-size:13px;
    font-weight:700;

    cursor:pointer;

    transition:0.2s;

    box-shadow:
        0 6px 14px rgba(91,140,255,0.22);
}

.material-file-input::file-selector-button:hover{

    transform:translateY(-1px);

    opacity:0.96;
}

/* =========================
   INPUT + SELECT
========================= */

.file-dropdown,
.file-input{

    width:100%;

    height:40px;

    padding:0 16px;

    border-radius:16px;

    border:1px solid #d7e2ff;

    background:white;

    font-size:14px;
    font-weight:500;

    color:#24324d;

    outline:none;

    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        transform 0.15s;

    box-shadow:
        0 2px 8px rgba(20,33,61,0.03);
}

/* =========================
   SELECT
========================= */

.file-dropdown{

    cursor:pointer;

    appearance:none;

    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%237b8bb7' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5l6 6 6-6' stroke='%237b8bb7' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    background-repeat:no-repeat;

    background-position:right 16px center;

    padding-right:48px;
}

/* =========================
   FILE INPUT
========================= */

.file-input{

    display:flex;

    align-items:center;

    cursor:pointer;

    padding:0 14px;
}

/* BUTTON */

.file-input::file-selector-button{

    height:40px;

    padding:0 18px;

    margin-right:14px;

    border:none;

    border-radius:12px;

    background:
        linear-gradient(
            135deg,
        #3b82f6,
        #2563eb
        );

    color:white;

    font-size:13px;
    font-weight:700;

    cursor:pointer;

    transition:0.2s;

    box-shadow:
        0 6px 14px rgba(91,140,255,0.22);
}

.file-input::file-selector-button:hover{

    transform:translateY(-1px);

    opacity:0.96;
}

/* =========================
   FOCUS
========================= */

.file-dropdown:focus,
.file-input:focus{

    border-color:#5b8cff;

    box-shadow:
        0 0 0 4px rgba(91,140,255,0.12);

    transform:translateY(-1px);
}

/* =========================
   HOVER
========================= */

.file-dropdown:hover,
.file-input:hover{

    border-color:#bfd1ff;
}
/* =========================
   CLASS BAR
========================= */

.class-bar{

    display:flex;
    gap:10px;

    flex-wrap:wrap;
}

.cbtn{

    height:42px;

    padding:0 18px;

    border:none;

    border-radius:12px;

    cursor:pointer;

    font-size:14px;
    font-weight:800;

    background:#edf3ff;

    color:#4c5f8c;

    transition:0.2s;
}

.cbtn.active{

    color:white;

    background:
        linear-gradient(
            135deg,
        #f59e0b,
        #d97706
        );

    box-shadow:
        0 8px 20px rgba(79,140,255,0.22);
}

/* =========================
   CLASS BOX
========================= */

.class-box{

    display:flex;
    flex-direction:column;

    gap:18px;
}

.hidden{

    display:none;
}

/* =========================
   TOPIC
========================= */

.topic{

    padding:18px;

    border-radius:20px;

    background:
        linear-gradient(
            180deg,
            #fbfcff,
            #f4f7ff
        );

    border:1px solid #e4ebff;
}

.topic-title{

    margin-bottom:14px;

    font-size:15px;
    font-weight:900;

    color:#14213d;
}

/* =========================
   LESSON
========================= */

.lesson{

    margin-bottom:10px;

    padding:14px 16px;

    border-radius:14px;

    cursor:pointer;

    transition:0.2s;

    background:white;

    border:1px solid #edf2ff;
}

.lesson:hover{

    transform:translateY(-2px);

    border-color:#bfd1ff;

    box-shadow:
        0 10px 20px rgba(0,0,0,0.05);
}

.lesson .name{

    font-size:14px;
    font-weight:700;

    line-height:1.5;

    color:#2a3655;
}

/* =========================
   IFRAME
========================= */

.lesson-frame{

    width:100%;

    flex:1;

    min-height:700px;

    border:none;

    border-radius:18px;

    background:white;
}

/* =========================
   SCROLLBAR
========================= */

.menu::-webkit-scrollbar{

    width:8px;
}

.menu::-webkit-scrollbar-thumb{

    background:#cfdcff;

    border-radius:20px;
}
/* =========================
   LESSON ITEM
========================= */

.lesson{

    position:relative;

    padding:14px 16px;

    margin-bottom:10px;

    border-radius:16px;

    cursor:pointer;

    background:white;

    border:1px solid #e6ecff;

    transition:
        transform 0.18s,
        box-shadow 0.18s,
        border-color 0.18s,
        background 0.18s;

    box-shadow:
        0 2px 10px rgba(20,33,61,0.03);
}

/* HOVER */

.lesson:hover{

    transform:translateY(-2px);

    border-color:#bfd1ff;

    background:#f7faff;

    box-shadow:
        0 8px 20px rgba(91,140,255,0.08);
}

/* ACTIVE */

.active-lesson{

    background:
        linear-gradient(
            135deg,
            #fffdf8,
            #ffd753
        );

    border-color:transparent;

    box-shadow:
        0 12px 28px rgba(91,140,255,0.22);
}

/* TEXT ACTIVE */

.active-lesson .name{

    color:white;
}

/* LEFT GLOW */

.active-lesson::before{

    content:"";

    position:absolute;

    left:0;
    top:10px;
    bottom:10px;

    width:5px;

    border-radius:20px;

    background:white;

    opacity:0.9;
}

/* NAME */

.lesson .name{

    font-size:14px;

    font-weight:700;

    color:#24324d;

    line-height:1.45;

    transition:0.18s;
}

/* =========================
   THEORY HERO
========================= */

.theory-hero{

    width:calc(100% - 48px);

    margin:12px auto 6px auto;

    min-height:56px;

    padding:8px 18px;

    border-radius:28px;

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:14px;

    overflow:hidden;

    background:
        linear-gradient(
            135deg,
            #08122f 0%,
            #19377c 55%,
            #2d63e3 100%
        );
}

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

.theory-hero .hero-left{

    flex:1;

    display:flex;

    justify-content:flex-start;

    min-width:0;

    margin-top:6px;
}

/* =========================
   HERO BADGE
========================= */

.theory-hero .hero-badge{

    display:flex;

    align-items:center;

    gap:8px;

    min-height:50px;

    padding:7px 16px 7px 10px;

    border-radius:999px;

    background:
        rgba(255,255,255,0.10);

    border:
        1px solid rgba(255,255,255,0.08);

    backdrop-filter:blur(8px);

    width:fit-content;

    max-width:760px;
}

/* =========================
   LOGO WRAP
========================= */

.theory-hero .hero-badge-logo{

    width:40px;
    height:40px;

    flex-shrink:0;

    display:flex;

    align-items:center;
    justify-content:center;
}

/* =========================
   LOGO
========================= */

.theory-hero .hero-logo{

    width:100%;
    height:100%;

    object-fit:contain;

    display:block;
}

/* =========================
   TEXT WRAP
========================= */

.theory-hero .hero-badge-text{

    display:flex;

    flex-direction:column;

    justify-content:center;

    min-width:0;
}

/* =========================
   TITLE
========================= */

.theory-hero .hero-badge-title{

    margin: 0 0 4px 0;

    font-size:16px;

    font-weight:900;

    line-height:1.02;

    letter-spacing:-0.2px;

    color:white;

    white-space:nowrap;
}

/* =========================
   SUB TITLE
========================= */

.theory-hero .hero-badge-sub{

    margin-top:1px;

    font-size:12px;

    font-weight:700;

    line-height:1.05;

    letter-spacing:0.3px;

    color:rgba(255,255,255,0.72);

    white-space:nowrap;
}

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

.theory-hero .hero-right-layout{

    display:flex;

    align-items:center;

    flex-shrink:0;
}

/* =========================
   USER CARD
========================= */

.theory-hero .user-card{

    width:auto;

    padding:6px 12px;

    border-radius:16px;

    background:
        rgba(255,255,255,0.10);

    border:
        1px solid rgba(255,255,255,0.08);

    backdrop-filter:blur(8px);
}

/* =========================
   CARD TOP
========================= */

.theory-hero .user-card-top{

    display:flex;

    align-items:center;

    gap:8px;
}

/* =========================
   AVATAR
========================= */

.theory-hero .user-avatar{

    width:32px;
    height:32px;

    border-radius:10px;

    flex-shrink:0;

    display:flex;

    align-items:center;
    justify-content:center;

    font-size:15px;
    font-weight:800;

    color:white;

    background:
        linear-gradient(
            135deg,
            #60a5fa,
            #2563eb
        );
}

/* =========================
   USER INFO
========================= */

.theory-hero .user-card-info{

    display:flex;

    flex-direction:column;

    justify-content:center;

    gap:0;

    line-height:1;
}

/* HELLO */

.theory-hero .user-hello{

    margin:1px;

    font-size:15px;

    color:rgba(255,255,255,0.72);
}

/* NAME */

.theory-hero .user-name{

    margin:1px;

    font-size:14px;

    font-weight:800;

    line-height:1.05;

    color:white;

    white-space:nowrap;
}

/* META */

.theory-hero .user-meta{

    margin:1px;

    font-size:13px;

    line-height:1.05;

    color:rgba(255,255,255,0.78);

    white-space:nowrap;
}

/* =========================
   RIGHT LAYOUT
========================= */

.theory-hero .hero-right-layout{

    display:flex;

    align-items:center;

    gap:10px;

    flex-shrink:0;
}

/* =========================
   EXIT BUTTON
========================= */

.hero-exit-btn{

    height:44px;

    padding:0 16px;

    border:none;

    border-radius:16px;

    display:flex;

    align-items:center;

    gap:8px;

    cursor:pointer;

    background:
        rgba(255,255,255,0.10);

    border:
        1px solid rgba(255,255,255,0.08);

    backdrop-filter:blur(8px);

    color:white;

    font-size:13px;

    font-weight:800;

    transition:
        transform 0.18s,
        background 0.18s,
        border-color 0.18s;
}

/* HOVER */

.hero-exit-btn:hover{

    transform:translateY(-2px);

    background:
        rgba(255,255,255,0.16);

    border-color:
        rgba(255,255,255,0.18);
}

/* ICON */

.hero-exit-btn .exit-icon{

    font-size:16px;

    line-height:1;
}

/* TEXT */

.hero-exit-btn .exit-text{

    white-space:nowrap;
}
/* =========================
   ACTIVE LESSON
========================= */

.lesson{

    position:relative;

    transition:
        all .25s ease;

    border-radius:14px;

    cursor:pointer;
}

/* hover */

.lesson:hover{

    background:rgba(0, 0, 0, 0.06);

    transform:translateX(4px);
}

/* active */

.lesson.active-lesson{

    background:#fff3e6;

    border:1px solid #ffb15e;

    border-left:5px solid #ff8a00;

    transform:translateX(4px);

    box-shadow:
        0 6px 18px rgba(255,138,0,0.12);
}

/* title active */

.lesson.active-lesson .name{

    color:#c66300;

    font-weight:700;
}

.viewer-title{

    display:flex;

    align-items:center;

    gap:10px;

    line-height:1.3;
    
    font-size:18px;

    font-weight:900;

    color:#14213d;

    letter-spacing:-0.6px;
}
.current-lesson-name{

    line-height:1.3;
    
    font-size:18px;
    
    font-weight:900;

    color:#c66300;

    letter-spacing:-0.6px;
     
    margin-right:auto;
}

.doc-dots{
    display:flex;
    align-items:center;
    gap:5px;
    margin-right:9px;
}

.doc-dots span{

    width:12px;
    height:12px;

    border-radius:50%;

    animation:dotFloat 1.8s ease-in-out infinite;

    box-shadow:
        0 0 12px rgba(25,70,160,0.22);
}

/* xanh đậm → nhạt */
.doc-dots span:nth-child(1){
    background:#123a88;
}

.doc-dots span:nth-child(2){
    background:#3f6ed8;
    animation-delay:.2s;
}

.doc-dots span:nth-child(3){
    background:#8fb2ff;
    animation-delay:.4s;
}

/* =========================
   EXTRA FILES
========================= */

.material-extra-list{

    width:260px;

    min-width:260px;

    background:#fff;

    border-radius:20px;

    padding:18px;

    border:1px solid #e5e7eb;

    overflow:auto;
}

.extra-title{

    font-size:18px;

    font-weight:700;

    margin-bottom:16px;
    
}

.extra-file{

    margin-bottom:10px;
}

.extra-file-btn{

    width:100%;

    border:none;

    background:#f3f4f6;

    border-radius:12px;

    padding:12px;

    text-align:left;

    cursor:pointer;

    transition:.2s;
}

.extra-file-btn:hover{

    background:#e5e7eb;
}

.empty-files{

    color:#888;

    font-size:14px;
}
/* =========================
   VIEWER FIX
========================= */


.viewer{

    flex:1;
    display:flex;
    flex-direction:column;

    height:100%;

    overflow:hidden;

    padding-right:0;

}

/* =========================
   EXTRA WRAPPER
========================= */

.material-extra-list-wrapper{

    width:100%;

    margin-top:18px;
}

/* =========================
   EXTRA FILES
========================= */
.material-extra-list {
    width: 100%;
    background: transparent;           /* 🔥 Bỏ nền trắng, chuyển thành trong suốt */
    border: none;                      /* 🔥 Tuyệt đối không có viền ngoài */
    border-radius: 0;                  /* 🔥 Bỏ bo góc */
    box-shadow: none;                  /* 🔥 Bỏ hiệu ứng đổ bóng */
    padding: 10px 15px;                 /* 🔥 Thu gọn khoảng đệm cho sát lề tự nhiên */
    margin-left: 10;
    margin-top: 4px;
    box-sizing: border-box;
}

/* Tinh chỉnh riêng phần tiêu đề bên trong cho đẹp */
.material-extra-list .extra-title {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.3px;
}

/* Tinh chỉnh phần chữ "Không có tài liệu khác" */
.material-extra-list .empty-files {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    font-style: italic;
}
/* =========================
   FILE LIST
========================= */

#extraFiles{

    display:flex;

    flex-wrap:wrap;

    gap:12px;
}

.extra-title{

    display:flex;
    flex-wrap:wrap;
    gap:8px;   /* 🔥 giảm 12 → 8 */
}

/* =========================
   FILE ITEM (GỌN LẠI)
========================= */

.extra-file-btn{
    padding:6px 10px;
    font-size:12px;
    border-radius:999px;
}

.extra-file-btn:hover{

    background:#e5e7eb;
}

.empty-files{

    color:#888;

    font-size:14px;
}

.hero-exit-btn{
    position: relative;
    z-index: 9999;   /* 🔥 luôn nằm trên cùng */
    pointer-events: auto;
}
.hero-glow{
    pointer-events: none; /* 🔥 quan trọng */
}
.hero-section{
    position: relative;
    z-index: 1;
}
.hero-exit-btn *{
    pointer-events: none;
}


.viewer-box{

    position:relative;

    background:
        linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);

    border-radius:18px;

    border:1px solid #e6eeff;

    box-shadow:
        0 8px 24px rgba(0,0,0,0.04);

    flex:1;

    overflow:auto;
}

/* =========================
   PLACEHOLDER CENTER CARD
========================= */

.viewer-placeholder{

    width:100%;

    min-height:700px;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:20px;

    text-align:center;
}

.viewer-placeholder{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;

    color:#6b7aa6;
    font-size:16px;
    font-weight:600;
    line-height:1.6;

    background:rgba(255,255,255,0.6);
    backdrop-filter:blur(6px);

    border:1px solid #dbe7ff;
    border-radius:16px;

    margin:20px;
    padding:10px 20px 30px;
}

.viewer-placeholder::before{
    content:"📖";

    font-size:42px;
    display:block;

    margin-bottom:8px;

    animation:floatIcon 2.5s ease-in-out infinite;
}

.viewer-placeholder .text{
    margin:0;
    padding:0;
}

.file-picker{
    position:relative;
    display:inline-block;
    cursor:pointer;
}

/* tooltip */
.file-picker::after{
    content:attr(data-tooltip);

    position:absolute;
    bottom:calc(100% + 12px);
    left:50%;
    transform:translateX(-50%);

    background:#3f6ed8;
    color:#fff;

    padding:10px 14px;
    border-radius:12px;

    font-size:12px;
    line-height:1.5;
    white-space:nowrap;

    opacity:0;
    visibility:hidden;

    transition:.25s ease;

    box-shadow:0 10px 30px rgba(0,0,0,.25);

    z-index:100;
}

/* mũi tên */
.file-picker::before{
    content:"";

    position:absolute;
    bottom:100%;
    left:50%;
    transform:translateX(-50%);

    border:7px solid transparent;
    border-top-color:#1e293b;

    opacity:0;
    visibility:hidden;

    transition:.25s ease;
}

/* hover hiện tooltip */
.file-picker:hover::after,
.file-picker:hover::before{
    opacity:1;
    visibility:visible;
}

.material-upload-box{
    position:relative;
}

/* tooltip */
.material-upload-box::after{
    content:attr(data-tooltip);

    position:absolute;
    bottom:calc(100% + 14px);
    left:50%;
    transform:translateX(-50%);

    background:#3f6ed8;
    color:#fff;

    padding:11px 15px;
    border-radius:14px;

    font-size:12px;
    line-height:1.5;

    white-space:nowrap;

    opacity:0;
    visibility:hidden;

    transition:.25s ease;

    box-shadow:0 12px 30px rgba(0,0,0,.28);

    z-index:1000;
}

/* mũi tên */
.material-upload-box::before{
    content:"";

    position:absolute;
    bottom:100%;
    left:50%;
    transform:translateX(-50%);

    border:7px solid transparent;
    border-top-color:#0f172a;

    opacity:0;
    visibility:hidden;

    transition:.25s ease;

    z-index:1000;
}

/* hover */
.material-upload-box:hover::after,
.material-upload-box:hover::before{
    opacity:1;
    visibility:visible;
}


/* ==================================================
   MOBILE THEORY PAGE - OPTIMIZED FOR MOBILE SPATIAL DESIGN
================================================== */

@media (max-width: 768px) {

  /* =========================
     GLOBAL & PAGE LAYOUT
  ========================= */
  html {
    font-size: 14px; /* Giảm nhẹ base font để các thành phần co giãn cân đối hơn */
  }

  .theory-page {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 8px;       /* Thu gọn khoảng cách giữa các khối chính */
    padding: 6px;   /* Tiết kiệm diện tích viền màn hình di động */
    overflow: visible;
  }

  /* =========================
     VIEWER & HEADER SECTION
  ========================= */
  .viewer {
    width: 100%;
    min-width: 100%;
    min-height: auto;
    border-radius: 12px;
    order: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  }

  .viewer-header {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid #edf2f7;
    border-radius: 12px 12px 0 0;
  }

  .doc-dots span{

    width:5px;
    height:5px;
}
  .viewer-title {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Giới hạn tối đa 2 dòng tránh chiếm chỗ */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Gom nhóm cụm nút bấm header thành 2 cột gọn gàng */
  .viewer-header > div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
  }

  .top-btn {
    width: 100%;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

/* =========================
     VIEWER CONTENT & IFRAME
  ========================= */
.viewer-box {

    min-height: 0 !important;

    height: auto !important;

    padding: 4px;

    background: #f8fafc;

    border-radius: 0 0 12px 12px;

    display: flex;

    flex-direction: column;

    overflow-x: hidden;

    overflow-y: auto;

}

/* =========================
   PDF VIEWER - MOBILE
========================= */

.lesson-frame {
    width: 100% !important;

    height: calc(100vh - 180px) !important;

    min-height: 500px !important;

    max-height: none !important;

    display: block;

    border: none !important;

    border-radius: 8px;

    background: #fff;

    overflow: auto !important;

    -webkit-overflow-scrolling: touch;
}

  .viewer-placeholder {
    min-height: 280px;
    padding: 20px 12px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
  }

  /* =========================
     SLIDE-OUT MENU & PANELS
  ========================= */
  .mobile-menu-btn {
    position: fixed;
    left: 10px;
    top: 10px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    z-index: 3000;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  }

  .menu {
    position: fixed;
    left: -300px;
    top: 0;
    width: 280px; /* Thu hẹp độ rộng drawer menu vừa vặn màn hình nhỏ */
    height: 100vh;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    z-index: 2500;
    transition: left 0.25s ease-in-out;
    border-radius: 0;
    padding: 12px;
    gap: 10px;
    background: #fff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  }

  .menu.show {
    left: 0;
  }

  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease-in-out;
    z-index: 2400;
  }

  .menu-overlay.show {
    opacity: 1;
    visibility: visible;
  }

  .hero-mini {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
  }

  /* =========================
     CARDS, UPLOAD & FORMS
  ========================= */
  .upload-box,
  .lesson-panel {
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 6px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
  }

  .upload-form {
    gap: 8px;
  }

  .file-select-box,
  .material-upload-box {
    gap: 6px;
    margin-bottom: 8px;
  }

  .file-select-box label,
  .lesson-panel label,
  .material-upload-box label {
    font-size: 12px;
    font-weight: 600;
  }

  .file-ui,
  .file-dropdown,
  .file-input,
  .material-file-input {
    height: 36px;
    font-size: 11.5px;
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .file-input::file-selector-button,
  .material-file-input::file-selector-button {
    height: 28px;
    padding: 0 8px;
    margin-right: 8px;
    border-radius: 6px;
    font-size: 11px;
  }

  .file-dropdown {
    background-position: right 10px center;
    padding-right: 32px;
  }

  .upload-btn {
    width: 100%;
    min-width: 0;
    height: 36px;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
  }

  /* =========================
     CLASS BAR & BUTTONS
  ========================= */
  .class-bar {
    gap: 6px;
  }

  .cbtn {
    flex: 1;
    min-width: 75px;
    height: 34px;
    padding: 0 8px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 8px;
  }

  /* =========================
     TOPICS & LESSONS LIST
  ========================= */
  .class-box {
    gap: 8px;
  }

  .topic {
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 6px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    overflow: hidden;
  }

  .topic-title {
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
    color: #334155;
  }

  .lesson {
    margin-bottom: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: background 0.15s, border-color 0.15s;
  }

  .lesson:active {
    transform: scale(0.98);
    background: #eff6ff;
    border-color: #93c5fd;
  }

  .lesson .name {
    font-size: 11.5px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: #475569;
  }

  /* =========================
     EXTRA MATERIALS LIST
  ========================= */
  .material-extra-list-wrapper {
    margin-top: 8px;
    margin-bottom: 10px;
    padding: 0;
  }

  .material-extra-list {
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 10px;
    margin: 4px 0 0 0;
  }

  .material-extra-list .extra-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    gap: 6px;
  }

  .material-extra-list .empty-files {
    color: #94a3b8;
    font-size: 11.5px;
  }

  /* =========================
     SCROLLBAR & UTILS
  ========================= */
  .menu::-webkit-scrollbar {
    width: 4px;
  }

  .menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
  }

  * {
    -webkit-tap-highlight-color: transparent;
  }
}

/* ==================================================
   EXTRA SMALL PHONES (<= 390px)
================================================== */
@media (max-width: 390px) {
  .theory-page {
    padding: 4px;
    gap: 6px;
  }

  .viewer-title {
    font-size: 13px;
  }

  .top-btn,
  .upload-btn {
    height: 34px;
    font-size: 11px;
  }

  .cbtn {
    min-width: 70px;
    height: 32px;
    font-size: 11px;
  }

  .lesson-frame {
    height: 55vh;
    min-height: 300px;
  }
}

/* ==================================================
   LANDSCAPE PHONE OPTIMIZATION
================================================== */
@media (max-width: 900px) and (orientation: landscape) {
  .viewer {
    min-height: 90vh;
  }
  .lesson-frame {
    height: 80vh;
    min-height: 280px;
  }
}

/* ==================================================
   DESKTOP RESET (>= 769px)
================================================== */
@media (min-width: 769px) {
  .mobile-menu-btn,
  .menu-overlay {
    display: none;
  }
}

/* ==================================================
   FIX GIAO DIỆN VIEWER-TITLE CHO MOBILE
================================================== */

@media (max-width: 768px) {

  /* 1. Đảm bảo khung chứa header sắp xếp linh hoạt theo chiều dọc hoặc ngang hợp lý */
  .viewer-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    gap: 8px;
  }

  /* 2. Ép .viewer-title thành một khối hiển thị ngang (row), sát lề trái, không bị tách đôi */
  .viewer-title {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;                 /* Khoảng cách giữa 3 chấm và tên bài học */
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  /* 3. Thu nhỏ cụm 3 dấu chấm và ép sát lề trái */
  .doc-dots {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;           /* Không cho co giãn hay bị bóp méo */
  }

  .doc-dots span {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
  }

  /* 4. Tên bài học thu nhỏ, tự động co giãn và tràn dòng hợp lý */
  .current-lesson-name {
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    color: #c66300 !important;
    letter-spacing: -0.2px !important;
    
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    
    flex: 1 !important;                  /* Chiếm phần không gian còn lại trên hàng */
    width: auto !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

}

/* Tối ưu riêng cho điện thoại rất nhỏ (<= 390px) */
@media (max-width: 390px) {
  .current-lesson-name {
    font-size: 13px !important;
  }
  .doc-dots span {
    width: 7px !important;
    height: 7px !important;
  }
}


/* ==================================================
   MOBILE OPTIMIZATION: HERO HEADER & BACK BUTTON
================================================== */

@media (max-width: 768px) {

  /* 1. Đổi khung chứa bên phải thành dạng hàng ngang (row) và căn giữa */
  .hero-right-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* 2. Thu gọn thẻ user card để chia sẻ không gian với nút */
  .user-card {
    flex: 1 !important;              /* Tự động co giãn chiếm phần lớn không gian */
    min-width: 0 !important;         /* Tránh bị tràn chữ bên trong flexbox */
    margin-bottom: 0 !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
  }

  /* Tinh chỉnh cỡ chữ bên trong user card cho gọn gàng trên mobile */
  .user-card .user-name {
    font-size: 13.5px !important;
    font-weight: 700 !important;
  }
  
  .user-card .user-hello,
  .user-card .user-meta {
    font-size: 11px !important;
  }

  .user-card .user-avatar {
    width: 34px !important;
    height: 34px !important;
    font-size: 14px !important;
  }

  /* 3. Tối ưu nút "Quay lại" nằm gọn bên cạnh user card */
  .hero-exit-btn {
    flex-shrink: 0 !important;       /* Cố định kích thước, không bị bóp méo */
    width: auto !important;
    height: auto !important;
    min-height: unset !important;
    padding: 0 14px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important; /* Xếp icon lên trên, chữ "Quay lại" xuống dưới cho gọn chiều ngang */
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
  }

  .hero-exit-btn .exit-icon {
    font-size: 14px !important;
    line-height: 1 !important;
  }

}

/* Tối ưu riêng cho điện thoại rất nhỏ (<= 390px) */
@media (max-width: 390px) {
  .hero-right-layout {
    gap: 6px !important;
  }
  
  .hero-exit-btn {
    padding: 0 10px !important;
    font-size: 10.5px !important;
  }
  
  .user-card {
    padding: 8px 10px !important;
  }
}
/* =================================================
   MOBILE - VIEWER HEADER COMPACT
================================================= */

@media (max-width:768px){

    .viewer-header{

        height:42px;

        flex-shrink:0;

        display:flex;
        align-items:center;
        justify-content:space-between;

        padding:12px 10px;

        background:
            linear-gradient(
                135deg,
                #ffffff,
                #f7faff
            );

        border-bottom:
            1px solid #e8eefc;

    }


    .viewer-title{

        font-size:14px;

        font-weight:800;

        letter-spacing:-0.3px;

        white-space:nowrap;

        overflow:hidden;

        text-overflow:ellipsis;

    }


    .viewer-header .top-btn{

        height:34px;

        padding:0 12px;

        border-radius:10px;

        font-size:12px;

    }

}

/* =====================================================
THEORY HERO MOBILE - LOGO BALANCE FIX (BIGGER)
===================================================== */

@media(max-width:768px){

/* =========================
THEORY HERO MOBILE
========================= */

.theory-hero{

    width:calc(100% - 16px);

    margin:8px auto 6px auto;

    min-height:52px;

    padding:7px 12px;

    border-radius:24px;

    gap:12px;

}



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

.theory-hero .hero-badge{

    min-height:46px;

    height:46px;

padding:6px 14px 6px 6px;   

    gap:6px;

    border-radius:999px;

    max-width:100%;

}

.theory-hero .hero-badge-text{

    transform:translateX(-2px);

}

/* =========================
LOGO WRAPPER MOBILE
========================= */

.theory-hero .hero-badge-logo{

    width:38px;

    height:38px;

    display:flex;

    align-items:center;

    justify-content:center;

    flex-shrink:0;

}



/* =========================
LOGO IMAGE MOBILE
========================= */

.theory-hero .hero-logo{

    width:34px;

    height:34px;

    max-width:34px;

    max-height:34px;

    object-fit:contain;

    display:block;

}



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

.theory-hero .hero-badge-text{

    gap:2px;

}



.theory-hero .hero-badge-title{

    font-size:14px;

    line-height:1.12;

    letter-spacing:-0.2px;
    
}



.theory-hero .hero-badge-sub{

    font-size:10px;

    line-height:1.12;

}



/* =========================
RIGHT USER CARD
========================= */

.theory-hero .user-card{

    padding:7px 12px;

    border-radius:16px;

}



.theory-hero .user-avatar{

    width:34px;

    height:34px;

    font-size:14px;

}



.theory-hero .user-name{

    font-size:13px;

}



.theory-hero .user-meta{

    font-size:11px;

}



}



/* =====================================================
IPHONE NHỎ
===================================================== */

@media(max-width:390px){


.theory-hero{

    min-height:48px;

    padding:6px 10px;

}



/* badge */

.theory-hero .hero-badge{

    height:42px;

    min-height:42px;

    padding:5px 12px 5px 8px;

    gap:8px;

}



/* logo */

.theory-hero .hero-badge-logo{

    width:34px;

    height:34px;

}



.theory-hero .hero-logo{

    width:30px;

    height:30px;

    max-width:30px;

    max-height:30px;

}



/* text */

.theory-hero .hero-badge-title{

    font-size:13px;

}



.theory-hero .hero-badge-sub{

    font-size:9px;

}


}


/* =========================================================
   MOBILE PDF VIEWER
========================================================= */

.mobile-pdf-toolbar{

    width:100%;

    min-height:46px;

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:8px;

    padding:6px 8px;

    background:#ffffff;

    border-bottom:1px solid #dbe5f5;

    box-sizing:border-box;

    position:sticky;

    top:0;

    z-index:20;

}


/* Tên bài */

.mobile-pdf-title{

    min-width:0;

    flex:1;

    overflow:hidden;

    white-space:nowrap;

    text-overflow:ellipsis;

    font-size:12px;

    font-weight:700;

    color:#334155;

}


/* Cụm zoom */

.mobile-pdf-controls{

    display:flex;

    align-items:center;

    gap:5px;

    flex-shrink:0;

}


/* =========================================================
   NÚT - / +
========================================================= */

.pdf-zoom-btn{

    width:32px;

    height:32px;

    min-width:32px;

    min-height:32px;

    max-width:32px;

    max-height:32px;

    padding:0;

    margin:0;

    border:none;

    border-radius:8px;

    background:#2563eb;

    color:#fff;

    font-size:21px;

    line-height:32px;

    font-weight:700;

    display:flex;

    align-items:center;

    justify-content:center;

    flex:none;

    box-sizing:border-box;

    cursor:pointer;

    -webkit-tap-highlight-color:transparent;

    appearance:none;

}


/* Khi bị giới hạn zoom */

.pdf-zoom-btn:disabled{

    opacity:.35;

    cursor:not-allowed;

}


/* =========================================================
   HIỂN THỊ %
========================================================= */

.pdf-zoom-value{

    min-width:48px;

    width:48px;

    height:32px;

    min-height:32px;

    max-height:32px;

    padding:0 5px;

    margin:0;

    border-radius:8px;

    background:#eff6ff;

    color:#1d4ed8;

    font-size:11px;

    line-height:32px;

    font-weight:800;

    display:flex;

    align-items:center;

    justify-content:center;

    box-sizing:border-box;

    flex:none;

}


/* =========================================================
   VÙNG CHỨA PDF
========================================================= */

.mobile-pdf-viewer{

    width:100%;

    height:calc(100vh - 180px);

    min-height:500px;

    overflow:auto;

    overflow-x:auto;

    background:#e5e7eb;

    position:relative;

    -webkit-overflow-scrolling:touch;

}


/* =========================================================
   LỚP SCALE
========================================================= */

.mobile-pdf-scale{

    width:100%;

    min-height:100%;

    transform-origin:top center;

    transition:transform .18s ease;

    box-sizing:border-box;

}


/* =========================================================
   PDF IFRAME
========================================================= */

.mobile-pdf-scale .lesson-frame{

    display:block;

    width:100% !important;

    height:calc(100vh - 180px) !important;

    min-height:500px !important;

    max-height:none !important;

    border:none !important;

    border-radius:0 !important;

    background:#fff;

}


/* =========================================================
   MOBILE NHỎ
========================================================= */

@media(max-width:480px){

    .mobile-pdf-toolbar{

        min-height:42px;

        padding:5px 6px;

    }


    .mobile-pdf-title{

        font-size:11px;

    }


    /* Nút vuông cân đối tuyệt đối */

    .pdf-zoom-btn{

        width:30px;

        height:30px;

        min-width:30px;

        min-height:30px;

        max-width:30px;

        max-height:30px;

        padding:0;

        margin:0;

        font-size:19px;

        line-height:30px;

        border-radius:7px;

    }


    /* Ô % cao bằng nút */

    .pdf-zoom-value{

        min-width:44px;

        width:44px;

        height:30px;

        min-height:30px;

        max-height:30px;

        padding:0 4px;

        margin:0;

        font-size:10.5px;

        line-height:30px;

        border-radius:7px;

    }


    .mobile-pdf-viewer{

        height:calc(100vh - 160px);

        min-height:450px;

    }


    .mobile-pdf-scale .lesson-frame{

        height:calc(100vh - 160px) !important;

        min-height:450px !important;

    }

}


/* =========================================================
   FINAL VIEWER FIX
   Mục tiêu:
   - Mở rộng tối đa vùng hiển thị tài liệu trên desktop
   - Không còn bị bó chiều cao bởi min-height 700/780px
   - Giữ nguyên giao diện hiện tại
   - Không ảnh hưởng logic mobile/zoom hiện có
   ========================================================= */

@media (min-width: 769px) {

    /* Khung bên trái chiếm toàn bộ chiều cao khả dụng */
    .viewer {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    /*
       viewer-box là vùng cần được ưu tiên chiều cao.
       Header và "Tài liệu khác" vẫn giữ nguyên,
       phần còn lại dành cho tài liệu.
    */
    .viewer-box {
        flex: 1 1 0 !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: auto !important;
        box-sizing: border-box !important;
        padding: 8px !important;
    }

    /* iframe lấp đầy toàn bộ viewer-box */
    .viewer-box .lesson-frame,
    .viewer-box iframe.lesson-frame {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        flex: 1 1 auto !important;
        border: none !important;
        box-sizing: border-box !important;
    }

    /* Placeholder cũng không ép khung cao 700/780px */
    .viewer-box .viewer-placeholder {
        width: 100% !important;
        min-height: 100% !important;
        height: 100% !important;
        box-sizing: border-box !important;
    }

    /* Không để khu vực tài liệu khác chiếm quá nhiều chiều cao */
    .material-extra-list-wrapper {
        flex: 0 0 auto !important;
    }
}

/* =========================================================
   DESKTOP LARGE SCREEN
   Tận dụng thêm không gian màn hình lớn
   ========================================================= */
@media (min-width: 1200px) {
    .viewer-box {
        padding: 6px !important;
    }
}

/* =========================================================
   MOBILE: giữ nguyên cơ chế PDF/zoom hiện tại
   ========================================================= */
@media (max-width: 768px) {
    .viewer-box {
        min-height: 0 !important;
        height: auto !important;
    }
}

/* =========================================================
   NÚT XÓA BÀI HỌC - CHỈ ADMIN
   ========================================================= */

.lesson {
    position: relative;
}

.lesson-delete-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 8px;

    background: transparent;
    cursor: pointer;

    font-size: 17px;
    line-height: 1;

    padding: 0;
    margin: 0;

    z-index: 50;

    pointer-events: auto;
}

.lesson-delete-btn:hover {
    background: #fee2e2;
    transform: translateY(-50%) scale(1.08);
}

.lesson-delete-btn:active {
    transform: translateY(-50%) scale(.94);
}

/* =========================================================
   DELETE LESSON MODAL
   ========================================================= */

.delete-lesson-modal {
    position: fixed;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(15, 23, 42, .58);

    z-index: 99999;

    backdrop-filter: blur(3px);
}

.delete-lesson-modal.show {
    display: flex;
}

.delete-lesson-dialog {
    width: min(440px, 100%);

    background: #fff;

    border-radius: 18px;

    padding: 24px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .25);

    animation: deleteLessonModalIn .18s ease-out;
}

@keyframes deleteLessonModalIn {

    from {
        opacity: 0;
        transform: translateY(10px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

.delete-lesson-icon {
    width: 54px;
    height: 54px;

    margin: 0 auto 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fff7ed;

    font-size: 28px;
}

.delete-lesson-title {
    text-align: center;

    font-size: 20px;
    font-weight: 700;

    color: #1e293b;

    margin-bottom: 18px;
}

.delete-lesson-content {
    text-align: center;

    color: #475569;

    font-size: 14px;

    line-height: 1.55;
}

.delete-lesson-content p {
    margin: 0 0 8px;
}

.delete-lesson-name {
    margin: 12px 0 14px;

    padding: 12px 14px;

    border-radius: 10px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    color: #0f172a;

    font-weight: 700;
}

.delete-lesson-warning {
    color: #b45309;

    font-size: 13px;
}

.delete-lesson-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 22px;
}

.delete-lesson-actions button {
    min-width: 115px;

    height: 40px;

    padding: 0 16px;

    border-radius: 9px;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;
}

.delete-lesson-cancel {
    border: 1px solid #cbd5e1;

    background: #fff;

    color: #475569;
}

.delete-lesson-cancel:hover {
    background: #f8fafc;
}

.delete-lesson-confirm {
    border: none;

    background: #dc2626;

    color: #fff;
}

.delete-lesson-confirm:hover {
    background: #b91c1c;
}

.delete-lesson-confirm:disabled {
    opacity: .6;
    cursor: not-allowed;
}

@media (max-width: 768px) {

    .lesson-delete-btn {
        right: 5px;

        width: 30px;
        height: 30px;

        font-size: 15px;
    }

    .delete-lesson-dialog {
        padding: 20px;

        border-radius: 16px;
    }

    .delete-lesson-actions button {
        flex: 1;

        min-width: 0;
    }

}


/* =========================================================
   HỌC VỚI INFOGRAPHIC
   Chỉ bổ sung CSS, không sửa Theory CSS.
========================================================= */

.infographics-page {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 60px;
}

.infographics-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.infographics-kicker,
.info-admin-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    opacity: .68;
    margin-bottom: 5px;
    margin-left: 10px;
}

.infographics-kicker,
.info-admin-kicker-2 {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    opacity: .68;
    margin-bottom: 5px;
}

.infographics-heading h1 {
    margin: 0 0 0 10px !important;
    font-size: clamp(24px, 4vw, 42px);
    line-height: 1.08;
}

.infographics-heading p {
    margin: 8px 0 0;
    opacity: .72;
    margin-left: 10px;
}

.info-home-btn {
    flex: 0 0 auto;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(100,116,139,.18);
    background: rgba(255,255,255,.78);
    color: inherit;
    font-weight: 700;
    transition: .2s ease;
}

.info-home-btn:hover {
    transform: translateY(-2px);
}

.info-grade-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.info-grade-btn {
    border: 1px solid rgba(100,116,139,.16);
    border-radius: 16px;
    padding: 12px 18px;
    background: rgba(255,255,255,.78);
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 58px;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.info-grade-btn span {
    font-size: 14px;
    opacity: .72;
}

.info-grade-btn strong {
    font-size: 23px;
}

.info-grade-btn:hover,
.info-grade-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15,23,42,.09);
    background: rgba(255,255,255,.98);
}

.info-main-card,
.info-admin-card {
    border: 1px solid rgba(100,116,139,.14);
    border-radius: 22px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 18px 55px rgba(15,23,42,.07);
    overflow: hidden;
}

.info-toolbar {
    padding: 17px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid rgba(100,116,139,.12);
}

.info-current-grade {
    font-weight: 800;
    font-size: 18px;
}

.info-counter {
    font-size: 13px;
    opacity: .62;
    margin-top: 3px;
}

.info-toolbar-actions {
    display: flex;
    gap: 8px;
}

.info-nav-btn,
.info-side-btn {
    border: 1px solid rgba(100,116,139,.18);
    background: rgba(255,255,255,.9);
    color: inherit;
    cursor: pointer;
    font-weight: 700;
    transition: .2s ease;
}

.info-nav-btn {
    padding: 9px 14px;
    border-radius: 11px;
}

.info-nav-btn:hover:not(:disabled),
.info-side-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.info-nav-btn:disabled,
.info-side-btn:disabled {
    opacity: .32;
    cursor: default;
}

.info-viewer-wrap {
    min-height: 720px;
    padding: 28px 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background:
        radial-gradient(circle at 50% 20%, rgba(148,163,184,.10), transparent 42%),
        linear-gradient(180deg, rgba(248,250,252,.8), rgba(241,245,249,.55));
}

.info-book {
    width: min(560px, 100%);
    aspect-ratio: 210 / 297;
    position: relative;
    perspective: 1400px;
}

.info-page {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 4px;
    background: #fff;
    box-shadow:
        0 24px 55px rgba(15,23,42,.18),
        0 3px 10px rgba(15,23,42,.08);
    overflow: hidden;
    transform-origin: left center;
}

.info-page::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,.06);
}

.info-page-flip {
    animation: infoPageFlip .48s ease;
}

@keyframes infoPageFlip {
    0% { transform: rotateY(0deg); }
    45% { transform: rotateY(-7deg); }
    100% { transform: rotateY(0deg); }
}

.info-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    user-select: none;
}

.info-loading,
.info-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

.info-loading {
    gap: 12px;
    opacity: .7;
}

.info-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(100,116,139,.18);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: infoSpin .8s linear infinite;
}

@keyframes infoSpin {
    to { transform: rotate(360deg); }
}

.info-empty {
    gap: 6px;
}

.info-empty-icon {
    font-size: 48px;
    margin-bottom: 5px;
    opacity: .65;
}

.info-empty h3 {
    margin: 0;
    font-size: 20px;
}

.info-empty p {
    margin: 0;
    opacity: .62;
}

.info-page-indicator {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 13px 20px 18px;
}

.info-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(100,116,139,.25);
    cursor: pointer;
    transition: .2s ease;
}

.info-dot.active {
    width: 22px;
    border-radius: 99px;
    background: currentColor;
}

.info-admin-card {
    margin-top: 20px;
    padding: 22px;
}

.info-admin-title h2 {
    margin: 0;
    font-size: 21px;
}

.info-admin-title p {
    margin: 5px 0 0;
    opacity: .65;
}

.info-upload-form {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(241,245,249,.7);
}

.info-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-form-group label {
    font-size: 13px;
    font-weight: 800;
}

.info-form-group select,
.info-form-group input {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    border: 1px solid rgba(100,116,139,.2);
    border-radius: 10px;
    background: #fff;
    padding: 9px 11px;
}

.info-form-group small {
    margin-top: 3px;
    opacity: .62;
    font-size: 11px;
}

.info-upload-btn,
.info-delete-btn {
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.info-upload-btn {
    min-height: 42px;
    padding: 0 17px;
    border-radius: 10px;
    background: currentColor;
    color: #fff;
}

.info-admin-list-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 20px 0 10px;
    font-size: 13px;
    font-weight: 800;
}

.info-admin-list-title span:last-child {
    opacity: .58;
    font-weight: 600;
}

.info-admin-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.info-admin-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(100,116,139,.13);
    border-radius: 13px;
    background: rgba(255,255,255,.75);
}

.info-admin-thumb {
    width: 55px;
    height: 72px;
    border-radius: 7px;
    overflow: hidden;
    background: #f1f5f9;
    flex: 0 0 auto;
}

.info-admin-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-admin-meta {
    flex: 1;
    min-width: 0;
}

.info-admin-meta strong,
.info-admin-meta span {
    display: block;
}

.info-admin-meta strong {
    font-size: 13px;
}

.info-admin-meta span {
    font-size: 11px;
    opacity: .58;
    margin-top: 2px;
}

.info-delete-btn {
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(239,68,68,.08);
    color: #dc2626;
}

.info-admin-empty {
    grid-column: 1 / -1;
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    background: rgba(241,245,249,.7);
    opacity: .65;
}

@media (max-width: 700px) {
    .infographics-page {
        width: min(100% - 18px, 1180px);
        margin-top: 14px;
        margin-bottom: 30px;
    }

    .infographics-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .infographics-heading h1 {
        font-size: 29px;
    }

    .info-home-btn {
        padding: 8px 12px;
    }

    .info-grade-bar {
        gap: 7px;
    }

    .info-grade-btn {
        min-height: 48px;
        padding: 8px 5px;
        border-radius: 12px;
    }

    .info-grade-btn strong {
        font-size: 19px;
    }

    .info-grade-btn span {
        font-size: 12px;
    }

    .info-main-card,
    .info-admin-card {
        border-radius: 16px;
    }

    .info-toolbar {
        padding: 12px;
    }

    .info-toolbar-actions {
        gap: 5px;
    }

    .info-nav-btn {
        padding: 8px 9px;
        font-size: 12px;
    }

    .info-viewer-wrap {
        min-height: 0;
        padding: 15px 7px 8px;
        gap: 5px;
    }

    .info-book {
        width: min(100%, calc(100vw - 74px));
    }

    .info-side-btn {
        width: 31px;
        height: 52px;
        border-radius: 10px;
        font-size: 23px;
        padding: 0;
    }

    .info-page-indicator {
        padding: 8px 10px 13px;
    }

    .info-upload-form {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .info-upload-btn {
        width: 100%;
    }

    .info-admin-card {
        padding: 14px;
    }

    .info-admin-list {
        grid-template-columns: 1fr;
    }

    .info-admin-thumb {
        width: 48px;
        height: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .info-page-flip {
        animation: none;
    }
}

/* =========================================================
   HỌC VỚI INFOGRAPHIC — ĐỒNG BỘ GIAO DIỆN TVO
   Tone chính: xanh dương + trắng + xanh rất nhạt
   Không dùng tím.
   Chỉ override giao diện, không thay đổi logic.
========================================================= */

/* ---------- Khung trang ---------- */

.infographics-page {
    position: relative;
    color: #172b4d;
}

.infographics-page::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    left: -180px;
    top: 80px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(59, 130, 246, .08) 0%,
        rgba(59, 130, 246, 0) 70%
    );
    pointer-events: none;
    z-index: -1;
}

.infographics-page::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -190px;
    top: 520px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(37, 99, 235, .06) 0%,
        rgba(37, 99, 235, 0) 70%
    );
    pointer-events: none;
    z-index: -1;
}


/* ---------- Tiêu đề ---------- */

.infographics-kicker {
    color: #4f8df7;
    font-weight: 900;
    letter-spacing: .14em;
    opacity: 1;
}

.infographics-heading h1 {
    color: #14284b;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.infographics-heading p {
    color: #71819d;
    opacity: 1;
}


/* ---------- Nút Trang chủ ---------- */

.info-home-btn {
    background: #ffffff;
    border: 1px solid #d9e5f7;
    color: #173b78;
    box-shadow: 0 6px 18px rgba(42, 91, 160, .07);
}

.info-home-btn:hover {
    color: #1557c7;
    border-color: #a9c9fa;
    background: #f8fbff;
    box-shadow: 0 9px 22px rgba(37, 99, 235, .10);
}


/* ---------- Thanh chọn khối ---------- */

.info-grade-bar {
    padding: 8px;
    border: 1px solid #dce9fb;
    border-radius: 20px;
    background: #f7faff;
    box-shadow: 0 8px 25px rgba(40, 91, 155, .06);
}

.info-grade-btn {
    position: relative;
    min-height: 62px;
    border: 1px solid #dce5f3;
    border-radius: 15px;
    background: #ffffff;
    color: #53647e;
    box-shadow: none;
    transform: none;
    overflow: hidden;
}

.info-grade-btn::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        #3b82f6,
        #2563eb
    );
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .22s ease;
}

.info-grade-btn span {
    color: #6f7f98;
    opacity: 1;
}

.info-grade-btn strong {
    color: #172b4d;
}

.info-grade-btn:hover {
    transform: translateY(-1px);
    border-color: #9fc4f8;
    background: #f8fbff;
    box-shadow: 0 7px 18px rgba(37, 99, 235, .08);
}

.info-grade-btn:hover::before,
.info-grade-btn.active::before {
    transform: scaleX(1);
}

.info-grade-btn.active {
    transform: none;
    border-color: #75aaf3;
    background: #edf5ff;
    box-shadow: 0 8px 22px rgba(37, 99, 235, .10);
}

.info-grade-btn.active strong {
    color: #1758c7;
}


/* ---------- Quản lý infographic ---------- */

.info-admin-grade-tools {
    margin-top: 14px;
    margin-bottom: 18px;
    padding: 15px;
    border: 1px solid #d7e6fb;
    border-radius: 18px;
    background: #f7faff;
    box-shadow: 0 8px 24px rgba(39, 87, 147, .06);
}

.info-admin-grade-label {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 12px;
}

.info-admin-tools-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #e2efff;
    color: #1760d5;
    font-size: 17px;
    box-shadow: none;
}

.info-admin-grade-label strong {
    color: #193965;
    font-size: 14px;
    font-weight: 900;
}

.info-admin-grade-label small {
    color: #7b8ca5;
    font-size: 11px;
}


/* ---------- Ba nút quản lý khối ---------- */

.info-admin-grade-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.info-manage-grade-btn {
    min-height: 64px;
    padding: 9px 12px;
    border: 1px solid #dce7f6;
    border-radius: 13px;
    background: #ffffff;
    color: #233b5e;
    box-shadow: none;
    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.info-manage-grade-btn > span {
    background: #edf5ff;
    color: #1760d5;
}

.info-manage-grade-btn strong {
    color: #244d86;
}

.info-manage-grade-btn small {
    color: #8292aa;
}

.info-manage-grade-btn:hover {
    transform: translateY(-1px);
    border-color: #9fc4f8;
    background: #f8fbff;
    box-shadow: 0 7px 18px rgba(37, 99, 235, .08);
}

.info-manage-grade-btn.active {
    border-color: #76aaf0;
    background: #edf5ff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .09);
}

.info-manage-grade-btn.active > span {
    background: #d9ebff;
    color: #155bc8;
}


/* ---------- Khung trình xem ---------- */

.info-main-card {
    border: 1px solid #dce7f6;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 38px rgba(37, 74, 123, .07);
}

.info-toolbar {
    background: #ffffff;
    border-bottom: 1px solid #e5edf8;
}

.info-current-grade {
    color: #1b4e97;
}

.info-counter {
    color: #8190a8;
    opacity: 1;
}


/* ---------- Nút trước / sau ---------- */

.info-nav-btn,
.info-side-btn {
    border-color: #d5e2f3;
    background: #ffffff;
    color: #1d4f96;
    box-shadow: none;
}

.info-nav-btn:hover:not(:disabled),
.info-side-btn:hover:not(:disabled) {
    background: #edf5ff;
    border-color: #9fc4f8;
    color: #155bc8;
}

.info-nav-btn:disabled,
.info-side-btn:disabled {
    background: #f8fafc;
    color: #9aa8bb;
}


/* ---------- Vùng hiển thị ảnh ---------- */

.info-viewer-wrap {
    background:
        radial-gradient(
            circle at 50% 22%,
            rgba(76, 143, 235, .09),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #f4f8ff 0%,
            #f8fbff 52%,
            #eef5ff 100%
        );
}

.info-book {
    filter: drop-shadow(
        0 20px 30px rgba(30, 65, 110, .14)
    );
}

.info-page {
    box-shadow:
        0 20px 45px rgba(25, 57, 100, .16),
        0 3px 10px rgba(25, 57, 100, .08);
}

.info-page::before {
    background: linear-gradient(
        90deg,
        rgba(29, 65, 112, .08),
        transparent
    );
}


/* ---------- Chỉ báo trang ---------- */

.info-page-indicator {
    background: #ffffff;
    border-top: 1px solid #e4edf8;
}

.info-dot {
    background: #c8d8ec;
    box-shadow: none;
}

.info-dot.active {
    background: #347ee8;
    box-shadow: 0 2px 7px rgba(52, 126, 232, .25);
}


/* ---------- Khu vực admin ---------- */

.info-admin-card {
    border: 1px solid #d7e5f7;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 38px rgba(37, 74, 123, .07);
}

.info-admin-title {
    padding-left: 12px;
}

.info-admin-title::before {
    width: 4px;
    background: #3b82f6;
}

.info-admin-kicker {
    color: #4d8ff1;
    opacity: 1;
}

.info-admin-title h2 {
    color: #193965;
}

.info-admin-title p {
    color: #7a8ba5;
}


/* ---------- Form upload ---------- */

.info-upload-form {
    background: #f5f9ff;
    border: 1px solid #dce9fa;
    box-shadow: none;
}

.info-form-group label {
    color: #405776;
}

.info-form-group select,
.info-form-group input {
    border-color: #d2dfef;
    background: #ffffff;
    color: #334c6d;
    box-shadow: none;
}

.info-form-group select:focus,
.info-form-group input:focus {
    border-color: #76aaf0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .09);
}


/* ---------- Nút upload ---------- */

.info-upload-btn {
    background: linear-gradient(
        135deg,
        #3b82f6,
        #2563eb
    );
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.info-upload-btn:hover {
    background: linear-gradient(
        135deg,
        #4b8ff4,
        #1f5dcc
    );
    box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}


/* ---------- Danh sách ảnh ---------- */

.info-admin-list-title {
    color: #244d86;
    border-bottom-color: #e3ebf6;
}

.info-admin-list-title span:last-child {
    color: #8190a8;
}

.info-admin-item {
    border-color: #dce7f5;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: none;
}

.info-admin-item:hover {
    transform: translateY(-1px);
    border-color: #a9c8ef;
    background: #f9fbff;
    box-shadow: 0 7px 18px rgba(37, 99, 235, .07);
}


/* ---------- Thumbnail ---------- */

.info-admin-preview {
    background: transparent;
}

.info-admin-thumb {
    background: #edf4fc;
    border-color: transparent;
}

.info-admin-preview:hover .info-admin-thumb {
    transform: scale(1.025);
    border-color: #7fb1f2;
    box-shadow: 0 6px 14px rgba(37, 99, 235, .10);
}

.info-admin-meta strong {
    color: #2a4466;
}

.info-admin-meta span {
    color: #8392a8;
    opacity: 1;
}


/* ---------- Nút xem ảnh ---------- */

.info-show-btn {
    border-color: #c7dcf6;
    background: #eef6ff;
    color: #1e61c7;
}

.info-show-btn:hover {
    background: #dfeeff;
    border-color: #9fc4f8;
}


/* ---------- Nút xóa ---------- */

.info-delete-btn {
    border: 1px solid #f1caca;
    background: #fff5f5;
    color: #d64545;
    box-shadow: none;
}

.info-delete-btn:hover {
    background: #ffeded;
    border-color: #eca7a7;
    color: #c93636;
}


/* ---------- Trạng thái trống ---------- */

.info-admin-empty {
    border-color: #c8dbf2;
    background: #f5f9ff;
    color: #7e8fa8;
    opacity: 1;
}


/* =========================================================
   MOBILE — GIỮ PHONG CÁCH TRANG GỐC
========================================================= */

@media (max-width: 700px) {

    .infographics-page::before,
    .infographics-page::after {
        display: none;
    }

    .info-admin-grade-tools {
        padding: 11px;
        border-radius: 15px;
    }

    .info-admin-grade-buttons {
        gap: 7px;
    }

    .info-manage-grade-btn {
        min-height: 59px;
        padding: 7px 5px;
        border-radius: 11px;
    }

    .info-manage-grade-btn > span {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .info-manage-grade-btn strong {
        font-size: 10px;
    }

    .info-manage-grade-btn small {
        font-size: 9px;
    }

    .info-main-card,
    .info-admin-card {
        border-radius: 15px;
    }
}

@media (max-width: 390px) {

    .info-admin-grade-buttons {
        gap: 5px;
    }

    .info-manage-grade-btn {
        min-height: 55px;
    }

    .info-manage-grade-btn > span {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .info-manage-grade-btn strong {
        font-size: 9px;
    }

    .info-manage-grade-btn small {
        font-size: 8px;
    }
}

/* =========================================================
   INFOGRAPHIC — BỐ CỤC GỌN HƠN, ĐỒNG BỘ TRANG TVO
   Chỉ chỉnh CSS:
   - Bỏ nút Trang chủ bên dưới header
   - Nút Quay lại không gạch chân
   - Tiêu đề + 3 nút khối cùng một hàng
   - Nút khối dạng tròn, gọn
========================================================= */

/* Nút Quay lại là thẻ <a> nên chống gạch chân từ CSS chung */
.hero-exit-btn,
.hero-exit-btn:hover,
.hero-exit-btn:focus,
.hero-exit-btn:active {
    text-decoration: none !important;
}


/* Ẩn nút Trang chủ cũ — không cần sửa HTML */
.info-home-btn {
    display: none !important;
}


/* Khu vực tiêu đề + nút khối */
.infographics-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 30px;
    align-items: end;
}


/* Tiêu đề nằm bên trái */
.infographics-heading {
    grid-column: 1;
    grid-row: 1;
    display: block;
    margin: 0;
    padding: 0 0 2px;
}


/* Thu gọn khoảng cách tiêu đề */
.infographics-heading h1 {
    margin: 0;
    line-height: 1.08;
}

.infographics-heading p {
    margin-top: 7px;
    margin-bottom: 0;
}


/* 3 nút khối nằm bên phải cùng hàng */
.info-grade-bar {
    grid-column: 2;
    grid-row: 1;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    margin: 0;
    padding: 0;

    border: none;
    background: transparent;
    box-shadow: none;
}


/* Nút tròn */
.info-grade-btn {
    width: 62px;
    height: 62px;
    min-height: 62px;

    flex: 0 0 62px;

    padding: 0;
    margin: 0;

    border: 1px solid #d7e5f7;
    border-radius: 50%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 0;

    background: #ffffff;
    color: #53647e;

    box-shadow: 0 5px 16px rgba(37, 74, 123, .07);

    transform: none;

    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}


/* Chữ "Khối" */
.info-grade-btn span {
    font-size: 9px;
    line-height: 1.1;
    color: #71819a;
    opacity: 1;
}


/* Số khối */
.info-grade-btn strong {
    margin-top: 1px;
    font-size: 21px;
    line-height: 1;
    color: #173b78;
}


/* Hover */
.info-grade-btn:hover {
    transform: translateY(-2px);
    border-color: #8fbaf2;
    background: #f5f9ff;
    box-shadow: 0 9px 20px rgba(37, 99, 235, .11);
}


/* Khối đang chọn */
.info-grade-btn.active {
    transform: none;
    border-color: #4f91ee;
    background: #eaf3ff;
    box-shadow:
        0 7px 18px rgba(37, 99, 235, .14),
        inset 0 0 0 3px rgba(79, 145, 238, .10);
}

.info-grade-btn.active span {
    color: #4d82ca;
}

.info-grade-btn.active strong {
    color: #145bc5;
}


/* Không cần khoảng trống lớn trước viewer */
.info-main-card {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-top: 20px;
}


/* Khu vực admin vẫn chiếm toàn bộ chiều ngang */
.info-admin-card {
    grid-column: 1 / -1;
    grid-row: 3;
}


/* Quản lý khối: nếu có thì nằm giữa tiêu đề và viewer */
.info-admin-grade-tools {
    grid-column: 1 / -1;
    grid-row: 4;
}


/* Nếu HTML có admin tools thì đưa viewer xuống đúng thứ tự */
.infographics-page > .info-admin-grade-tools + .info-main-card {
    grid-row: 3;
}

.infographics-page > .info-admin-grade-tools ~ .info-admin-card {
    grid-row: 4;
}


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

@media (max-width: 700px) {

    .infographics-page {
        display: block;
    }

    .infographics-heading {
        margin-bottom: 12px;
    }

    .info-grade-bar {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin: 0 0 15px;
    }

    .info-grade-btn {
        width: 54px;
        height: 54px;
        min-height: 54px;
        flex-basis: 54px;
    }

    .info-grade-btn span {
        font-size: 8px;
    }

    .info-grade-btn strong {
        font-size: 18px;
    }

    .info-main-card,
    .info-admin-grade-tools,
    .info-admin-card {
        margin-top: 15px;
    }
}


/* =========================================================
   INFOGRAPHIC ZOOM VIEWER — DESKTOP + MOBILE
   Bổ sung, không thay đổi các giao diện hiện tại.
========================================================= */

.info-image {
    cursor: zoom-in;
}

/* Lớp phủ */
.info-zoom-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .22s ease,
        visibility .22s ease;
}

.info-zoom-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.info-zoom-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(7, 20, 48, .82);
    backdrop-filter: blur(7px);
}

/* Khung xem */
.info-zoom-panel {
    position: relative;
    z-index: 2;

    width: min(1500px, 100%);
    height: min(96vh, 1100px);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid rgba(147, 190, 255, .28);
    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            #f7fbff 0%,
            #edf4ff 100%
        );

    box-shadow:
        0 30px 90px rgba(0, 20, 60, .35);
}

/* Thanh công cụ */
.info-zoom-toolbar {
    min-height: 58px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
    padding: 8px 12px 8px 18px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f4f8ff
        );

    border-bottom: 1px solid #dce8fb;
}

.info-zoom-title {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 8px;

    color: #173b78;
}

.info-zoom-title span {
    font-size: 18px;
}

.info-zoom-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 14px;
    font-weight: 800;
}

/* Nhóm nút */
.info-zoom-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.info-zoom-btn,
.info-zoom-level,
.info-zoom-reset,
.info-zoom-close {
    width: 40px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #d4e2f6;
    border-radius: 12px;

    background: #ffffff;
    color: #21467f;

    font-size: 21px;
    font-weight: 800;

    cursor: pointer;

    box-shadow: 0 4px 12px rgba(30, 72, 130, .07);

    transition:
        transform .18s ease,
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.info-zoom-btn:hover,
.info-zoom-level:hover,
.info-zoom-reset:hover {
    transform: translateY(-1px);
    background: #eef5ff;
    border-color: #a9c8f2;
    box-shadow: 0 7px 18px rgba(37, 99, 235, .11);
}

.info-zoom-level {
    min-width: 62px;
    width: auto;

    padding: 0 9px;

    font-size: 12px;
}

.info-zoom-close {
    margin-left: 4px;

    border-color: #d6e1f1;
    background: #edf4ff;
    color: #174b9b;

    font-size: 27px;
    line-height: 1;
}

.info-zoom-close:hover {
    background: #e1edff;
    border-color: #a7c5ef;
}

/* Vùng ảnh */
.info-zoom-stage {
    position: relative;

    flex: 1;
    min-height: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,.96) 0%,
            rgba(232,241,255,.96) 100%
        );

    cursor: grab;

    touch-action: none;
}

.info-zoom-stage.dragging {
    cursor: grabbing;
}

.info-zoom-image-wrap {
    position: relative;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: visible;
}

.info-zoom-image {
    display: block;

    max-width: min(94%, 1000px);
    max-height: 94%;

    width: auto;
    height: auto;

    object-fit: contain;

    transform-origin: center center;

    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;

    will-change: transform;

    box-shadow:
        0 18px 50px rgba(24, 56, 105, .20);

    background: #ffffff;

    cursor: grab;
}

.info-zoom-stage.dragging .info-zoom-image {
    cursor: grabbing;
}

/* Hướng dẫn */
.info-zoom-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;

    transform: translateX(-50%);

    padding: 7px 13px;

    border-radius: 999px;

    background: rgba(17, 45, 87, .78);
    color: rgba(255,255,255,.92);

    font-size: 11px;
    font-weight: 600;

    white-space: nowrap;

    pointer-events: none;

    box-shadow: 0 8px 22px rgba(0,0,0,.14);

    transition: opacity .3s ease;
}

.mobile-hint {
    display: none;
}

/* Khóa cuộn trang khi modal mở */
body.info-zoom-open {
    overflow: hidden;
}

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

@media (max-width: 700px) {

    .info-zoom-modal {
        padding: 0;
    }

    .info-zoom-panel {
        width: 100%;
        height: 100dvh;

        border-radius: 0;
        border: none;
    }

    .info-zoom-toolbar {
        min-height: 54px;

        padding:
            7px
            8px
            7px
            12px;
    }

    .info-zoom-title strong {
        max-width: 130px;
        font-size: 12px;
    }

    .info-zoom-title span {
        font-size: 16px;
    }

    .info-zoom-actions {
        gap: 4px;
    }

    .info-zoom-btn,
    .info-zoom-level,
    .info-zoom-reset,
    .info-zoom-close {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .info-zoom-level {
        min-width: 56px;
        width: auto;
        font-size: 11px;
    }

    .info-zoom-close {
        font-size: 25px;
    }

    .info-zoom-stage {
        min-height: 0;
    }

    .info-zoom-image {
        max-width: 96%;
        max-height: 94%;
    }

    .info-zoom-hint {
        bottom: 12px;

        max-width: calc(100% - 28px);

        padding: 7px 11px;

        font-size: 10px;

        text-align: center;
    }

    .desktop-hint {
        display: none;
    }

    .mobile-hint {
        display: inline;
    }
}

/* Màn hình rất nhỏ */
@media (max-width: 390px) {

    .info-zoom-title {
        gap: 4px;
    }

    .info-zoom-title strong {
        max-width: 90px;
    }

    .info-zoom-actions {
        gap: 3px;
    }

    .info-zoom-btn,
    .info-zoom-level,
    .info-zoom-reset,
    .info-zoom-close {
        width: 34px;
        height: 34px;
    }

    .info-zoom-level {
        min-width: 50px;
    }
}

/* =========================================================
   BỔ SUNG — BỘ LỌC ẢNH TRONG QUẢN TRỊ
   Chỉ bổ sung giao diện, không thay đổi logic.
========================================================= */

.info-admin-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 14px;
    padding: 10px 12px;
    border: 1px solid #dce8f7;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fbff 0%, #f1f7ff 100%);
}

.info-admin-filter-label {
    flex: 0 0 auto;
    color: #31547e;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.info-admin-filter-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.info-admin-filter-btn {
    appearance: none;
    -webkit-appearance: none;
    min-width: 82px;
    height: 36px;
    padding: 0 15px;
    border: 1px solid #cbdcf2;
    border-radius: 10px;
    background: #ffffff;
    color: #49698f;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(37, 99, 235, .05);
    transition: transform .18s ease, background .18s ease,
                border-color .18s ease, color .18s ease,
                box-shadow .18s ease;
}

.info-admin-filter-btn:hover {
    transform: translateY(-1px);
    border-color: #8fb9ec;
    background: #f5f9ff;
    color: #1f5fae;
    box-shadow: 0 5px 12px rgba(37, 99, 235, .09);
}

.info-admin-filter-btn:focus-visible {
    outline: none;
    border-color: #5b94df;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.info-admin-filter-btn.active {
    border-color: #3478dc;
    background: linear-gradient(135deg, #3f8af0 0%, #2563c7 100%);
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(37, 99, 235, .20);
}

.info-admin-filter-btn.active:hover {
    border-color: #286bc9;
    background: linear-gradient(135deg, #438ff3 0%, #205dbd 100%);
    color: #ffffff;
}

/* =========================================================
   BỔ SUNG — NÚT XEM ẢNH
========================================================= */

.info-admin-meta .info-show-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    min-width: 116px;
    margin-top: 6px;
    padding: 0 15px;
    border: 1px solid #b8d4f5;
    border-radius: 10px;
    background: linear-gradient(135deg, #f5faff 0%, #e7f2ff 100%);
    color: #2166bd;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 9px rgba(37, 99, 235, .07);
    transition: transform .18s ease, background .18s ease,
                border-color .18s ease, color .18s ease,
                box-shadow .18s ease;
}

.info-admin-meta .info-show-btn:hover {
    transform: translateY(-2px);
    border-color: #79aeea;
    background: linear-gradient(135deg, #eaf4ff 0%, #d8eaff 100%);
    color: #1558aa;
    box-shadow: 0 7px 16px rgba(37, 99, 235, .14);
}

.info-admin-meta .info-show-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(37, 99, 235, .09);
}

.info-admin-meta .info-show-btn:focus-visible {
    outline: none;
    border-color: #4b8fe8;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14),
                0 5px 12px rgba(37, 99, 235, .10);
}

/* Mobile */
@media (max-width: 700px) {
    .info-admin-filter-bar {
        display: block;
        padding: 10px;
        margin-bottom: 12px;
    }

    .info-admin-filter-label {
        display: block;
        margin-bottom: 8px;
    }

    .info-admin-filter-buttons {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .info-admin-filter-btn {
        width: 100%;
        min-width: 0;
        padding: 0 8px;
        font-size: 12px;
    }

    .info-admin-meta .info-show-btn {
        min-width: 108px;
        height: 34px;
        padding: 0 12px;
        font-size: 12px;
    }
}

/* =========================
   SCROLL TOP BUTTON
========================= */

#scrollTopBtn{

    position:fixed;

    bottom:25px;

    right:25px;

    width:50px;

    height:50px;

    background:
    linear-gradient(
        135deg,
        #2563eb,
        #1d4ed8
    );

    color:white;

    border:none;

    border-radius:50%;

    font-size:20px;

    font-weight:900;

    cursor:pointer;

    box-shadow:
    0 10px 24px rgba(37,99,235,0.28);

    display:none;

    transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;

    z-index:999;

    font-family:inherit;
}

#scrollTopBtn:hover{

    transform:translateY(-2px);

    box-shadow:
    0 14px 28px rgba(37,99,235,0.34);
}


/* =====================================================
   MOBILE - SCROLL TOP BUTTON COMPACT BALANCED
===================================================== */

@media(max-width:768px){

    #scrollTopBtn{

        width:34px !important;

        height:34px !important;

        min-width:34px !important;

        min-height:34px !important;

        padding:0 !important;

        border-radius:50% !important;

        display:flex;

        align-items:center;

        justify-content:center;

        line-height:1;

        font-size:15px;

        right:12px;

        bottom:12px;
    }

}


@media(max-width:430px){

    #scrollTopBtn{

        width:32px !important;

        height:32px !important;

        min-width:32px !important;

        min-height:32px !important;

        padding:0 !important;

        border-radius:50% !important;

        display:flex;

        align-items:center;

        justify-content:center;

        line-height:1;

        font-size:14px;

        right:10px;

        bottom:10px;
    }

}

.info-side-btn {
    width: 36px !important;
    height: 48px !important;

    min-width: 36px !important;
    min-height: 48px !important;

    padding: 0 !important;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px !important;
    font-size: 26px !important;

    flex-shrink: 0;
    touch-action: manipulation;
}

@media (max-width: 768px) {
    .info-side-btn {
        width: 38px !important;
        height: 52px !important;

        min-width: 38px !important;
        min-height: 52px !important;

        font-size: 28px !important;
    }
}

@media (max-width: 430px) {
    .info-side-btn {
        width: 36px !important;
        height: 48px !important;

        min-width: 36px !important;
        min-height: 48px !important;

        font-size: 26px !important;
    }
}

/* =========================================================
   ĐỒNG BỘ FONT CHỮ INFOGRAPHIC VỚI INDEX
   Chỉ bổ sung typography, không thay đổi logic/giao diện khác.
   Font gốc của INDEX:
   Inter, system-ui, -apple-system, BlinkMacSystemFont,
   "Segoe UI", Roboto, Arial, sans-serif;
========================================================= */

.infographics-page,
.infographics-page button,
.infographics-page input,
.infographics-page select,
.infographics-page textarea {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Màu chữ chính đồng bộ INDEX */
.infographics-page {
    color: #0f172a;
}

.infographics-page .infographics-heading h1 {
    font-size: 40px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
}

.infographics-page .infographics-heading p {
    font-size: 16px;
    line-height: 1.8;
    color: #64748b;
}

.infographics-page .infographics-kicker,
.infographics-page .info-admin-kicker,
.infographics-page .info-admin-kicker-2 {
    font-size: 12px;
    font-weight: 800;
}

.infographics-page .info-home-btn {
    font-size: 15px;
    font-weight: 800;
    color: #173b78;
}

.infographics-page .info-grade-btn span {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.infographics-page .info-grade-btn strong {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
}

.infographics-page .info-current-grade {
    font-size: 18px;
    font-weight: 900;
    color: #2563eb;
}

.infographics-page .info-counter {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.infographics-page .info-nav-btn,
.infographics-page .info-side-btn {
    font-size: 15px;
    font-weight: 800;
}

.infographics-page .info-empty h3 {
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
}

.infographics-page .info-empty p {
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
}

.infographics-page .info-admin-title h2 {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
}

.infographics-page .info-admin-title p {
    font-size: 14px;
    line-height: 1.8;
    color: #64748b;
}

.infographics-page .info-form-group label {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.infographics-page .info-form-group select,
.infographics-page .info-form-group input {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

.infographics-page .info-form-group small {
    font-size: 11px;
    color: #64748b;
}

.infographics-page .info-upload-btn,
.infographics-page .info-delete-btn,
.infographics-page .info-show-btn {
    font-size: 13px;
    font-weight: 800;
}

.infographics-page .info-admin-list-title {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.infographics-page .info-admin-list-title span:last-child {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.infographics-page .info-admin-meta strong {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.infographics-page .info-admin-meta span {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.infographics-page .info-admin-empty {
    font-size: 14px;
    color: #64748b;
}

/* Zoom viewer — đồng bộ font với INDEX */
.info-zoom-modal,
.info-zoom-modal button {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}

.info-zoom-title {
    color: #0f172a;
}

.info-zoom-title strong {
    font-size: 14px;
    font-weight: 800;
}

.info-zoom-level {
    font-size: 12px;
    font-weight: 700;
}

.info-zoom-hint {
    font-size: 11px;
    font-weight: 600;
}

/* Bộ lọc admin — đồng bộ font */
.infographics-page .info-admin-filter-label {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.infographics-page .info-admin-filter-btn {
    font-size: 13px;
    font-weight: 800;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}

/* Mobile — giữ đúng hệ font, chỉ giảm cỡ chữ theo bố cục mobile INDEX */
@media (max-width: 700px) {
    .infographics-page .infographics-heading h1 {
        font-size: 29px;
    }

    .infographics-page .infographics-heading p {
        font-size: 14px;
    }

    .infographics-page .info-home-btn {
        font-size: 13px;
    }

    .infographics-page .info-current-grade {
        font-size: 16px;
    }

    .infographics-page .info-nav-btn,
    .infographics-page .info-side-btn {
        font-size: 13px;
    }

    .infographics-page .info-admin-title h2 {
        font-size: 17px;
    }

    .infographics-page .info-admin-title p {
        font-size: 13px;
    }

    .infographics-page .info-admin-filter-btn {
        font-size: 12px;
    }
}

/* =========================================================
   MOBILE - HẠ THẤP THÊM CỤM USER
   ========================================================= */

@media (max-width: 768px) {

    .user-card {
        height: 68px !important;
        min-height: 68px !important;
    }

    .hero-exit-btn {
        height: 68px !important;
        min-height: 68px !important;
    }

    .user-avatar {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        border-radius: 10px !important;
        font-size: 19px !important;
    }

    .user-card-top {
        gap: 9px !important;
    }

    .user-card-info {
        gap: 1px !important;
    }

    .user-hello {
        font-size: 13px !important;
        line-height: 1 !important;
    }

    .user-name {
        font-size: 18px !important;
        line-height: 1 !important;
    }

    .user-meta {
        font-size: 13px !important;
        line-height: 1 !important;
    }

    .hero-exit-btn {
        padding: 5px !important;
        gap: 2px !important;
    }

    .hero-exit-btn .exit-icon {
        font-size: 14px !important;
    }

    .hero-exit-btn .exit-text {
        font-size: 13px !important;
    }
}


@media (max-width: 430px) {

    .user-card {
        height: 64px !important;
        min-height: 64px !important;
    }

    .hero-exit-btn {
        height: 64px !important;
        min-height: 64px !important;
    }

    .user-avatar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        border-radius: 9px !important;
        font-size: 18px !important;
    }

    .user-name {
        font-size: 17px !important;
    }

    .user-meta {
        font-size: 12px !important;
    }
}
/* =========================================================
   CHẾ ĐỘ LẬT SÁCH 2 TRANG
   BỔ SUNG ĐỘC LẬP
   KHÔNG THAY ĐỔI VIEWER HIỆN TẠI
========================================================= */

.info-book-mode-btn {
    white-space: nowrap;
}

.info-book-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 20, 45, 0.58);
    backdrop-filter: blur(8px);
}

.info-book-modal.show {
    display: flex;
}

.info-book-modal-panel {
    width: min(1180px, 96vw);
    height: min(900px, 94vh);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(15,23,42,.30);
    overflow: hidden;
}

.info-book-modal-header {
    flex-shrink: 0;
    min-height: 64px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(100,116,139,.14);
    background: rgba(255,255,255,.82);
}

.info-book-modal-kicker {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 900;
    color: #2563eb;
    letter-spacing: .6px;
}

.info-book-modal-header strong {
    display: block;
    font-size: 17px;
    font-weight: 900;
    color: #14213d;
}

.info-book-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #edf3ff;
    color: #31558e;
    font-size: 26px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

.info-book-modal-close:hover {
    transform: translateY(-2px);
    background: #dce9ff;
}

.info-book-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    perspective: 1800px;
    background:
        radial-gradient(circle at 50% 20%, rgba(96,165,250,.10), transparent 45%),
        linear-gradient(180deg, #f7faff, #edf3ff);
}

.info-book-spread {
    width: min(900px, 100%);
    height: min(700px, 100%);
    display: flex;
    position: relative;
    perspective: 1800px;
    transform-style: preserve-3d;
    filter: drop-shadow(0 25px 35px rgba(15,23,42,.16));
}

.info-book-page {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbe6f7;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.8);
    transform-style: preserve-3d;
}

.info-book-left {
    border-radius: 8px 0 0 8px;
    transform-origin: right center;
}

.info-book-right {
    border-radius: 0 8px 8px 0;
    transform-origin: left center;
}

.info-book-spine {
    position: relative;
    width: 8px;
    flex-shrink: 0;
    z-index: 5;
    background: linear-gradient(90deg, #cbd5e1, #ffffff 45%, #cbd5e1);
    box-shadow: 0 0 8px rgba(15,23,42,.15);
}

.info-book-page img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #ffffff;
    user-select: none;
}

.info-book-page-number {
    position: absolute;
    top: 10px;
    z-index: 10;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    color: #52688f;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(15,23,42,.10);
    backdrop-filter: blur(6px);
}

.info-book-left .info-book-page-number {
    left: 10px;
}

.info-book-right .info-book-page-number {
    right: 10px;
}

.info-book-nav {
    width: 48px;
    height: 64px;
    flex-shrink: 0;
    border: 1px solid #d5e2f3;
    border-radius: 14px;
    background: #ffffff;
    color: #1d4f96;
    font-size: 34px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(30,65,110,.10);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.info-book-nav:hover:not(:disabled) {
    transform: translateY(-3px);
    background: #edf5ff;
    box-shadow: 0 14px 28px rgba(30,65,110,.16);
}

.info-book-nav:disabled {
    opacity: .3;
    cursor: default;
}

.info-book-spread.book-next {
    animation: infoBookNextFlip .55s ease;
}

.info-book-spread.book-prev {
    animation: infoBookPrevFlip .55s ease;
}

@keyframes infoBookNextFlip {
    0% { transform: rotateY(0deg) scale(1); }
    45% { transform: rotateY(-7deg) scale(.985); }
    100% { transform: rotateY(0deg) scale(1); }
}

@keyframes infoBookPrevFlip {
    0% { transform: rotateY(0deg) scale(1); }
    45% { transform: rotateY(7deg) scale(.985); }
    100% { transform: rotateY(0deg) scale(1); }
}

.info-book-footer {
    flex-shrink: 0;
    min-height: 58px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: #ffffff;
    border-top: 1px solid rgba(100,116,139,.14);
}

#infoBookCounter {
    min-width: 70px;
    font-size: 13px;
    font-weight: 800;
    color: #40577f;
    text-align: center;
}

.info-book-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-book-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: transform .2s ease, background .2s ease;
}

.info-book-dots span.active {
    width: 20px;
    border-radius: 10px;
    background: #2563eb;
}

.info-book-close-bottom {
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    background: #edf3ff;
    color: #31558e;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 768px) {
    .info-book-modal {
        padding: 8px;
    }

    .info-book-modal-panel {
        width: 100%;
        height: 96vh;
        border-radius: 18px;
    }

    .info-book-modal-header {
        min-height: 54px;
        padding: 8px 12px;
    }

    .info-book-modal-header strong {
        font-size: 14px;
    }

    .info-book-stage {
        gap: 6px;
        padding: 10px 5px;
    }

    .info-book-spread {
        width: 100%;
    }

    .info-book-nav {
        width: 34px;
        height: 52px;
        font-size: 28px;
        border-radius: 10px;
    }

    .info-book-spine {
        width: 5px;
    }

    .info-book-page-number {
        top: 6px;
        padding: 3px 6px;
        font-size: 9px;
    }

    .info-book-footer {
        min-height: 50px;
        padding: 6px 10px;
        gap: 10px;
    }

    .info-book-close-bottom {
        padding: 7px 10px;
        font-size: 12px;
    }
}

@media (max-width: 430px) {
    .info-book-stage {
        gap: 4px;
        padding: 8px 2px;
    }

    .info-book-nav {
        width: 30px;
        height: 46px;
        min-width: 30px;
        font-size: 25px;
    }

    .info-book-spine {
        width: 3px;
    }

    .info-book-page-number {
        display: none;
    }
}

/* =========================================================
   ẨN CHẾ ĐỘ LẬT SÁCH TRÊN ĐIỆN THOẠI
   ========================================================= */
@media (max-width: 768px) {
    .info-book-mode-btn {
        display: none !important;
    }
}

/* ==========================================================
   HEADER INFOGRAPHIC - CĂN ĐỒNG CHIỀU RỘNG VỚI NỘI DUNG
   ========================================================== */

.theory-hero {
    width: min(1180px, calc(100% - 32px)) !important;
    box-sizing: border-box !important;
    margin: 24px auto 6px auto !important;
}