/* ============================================================
   edu.hivanthanh.com – Teacher Mode
   Palette watercolor: #F7F7EB · #FAEEDC · #FAE4DF · #DAE7EA · #F9E9D0
   ============================================================ */

:root {
  --t-cream:  #F7F7EB;
  --t-peach:  #FAEEDC;
  --t-blush:  #FAE4DF;
  --t-sky:    #DAE7EA;
  --t-sand:   #F9E9D0;

  --t-text:   #3D2B1F;
  --t-mid:    #7A5C4A;
  --t-soft:   #B5A99A;
  --t-muted:  #D4C9BC;

  --t-dark:   #5C3D2A;
  --t-dark2:  #3D2410;

  --t-bg:     var(--t-cream);
  --t-card:   #FFFFFF;
  --t-border: var(--t-peach);

  /* alias */
  --t-navy:    var(--t-dark);
  --t-navy-d:  var(--t-dark2);
  --t-green:   var(--t-blush);
  --t-green-l: var(--t-peach);
  --t-blue:    var(--t-sky);
  --t-blue-l:  #EDF4F6;
  --t-amber:   var(--t-sand);
  --t-amber-l: var(--t-peach);
  --t-red:     #E8927A;
  --t-purple:  #C4AECF;
  --t-mid-tx:  var(--t-mid);
}

/* ── Topbar ── */
.t-topbar {
  background: var(--t-dark);
  padding: 0 5%; display: flex; align-items: center; height: 56px;
  border-bottom: 3px solid var(--t-sand);
}
.t-topbar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.t-topbar-logo .logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--t-blush), var(--t-sand));
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.t-topbar-logo span  { font-size: 16px; font-weight: 900; color: var(--t-cream); }
.t-topbar-logo small { color: var(--t-sand); font-size: 11px; font-weight: 700; display: block; }

.t-nav { display: flex; gap: 4px; margin-left: 32px; }
.t-nav-link {
  padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 14px;
  color: rgba(247,247,235,.6); text-decoration: none; transition: all .2s;
}
.t-nav-link:hover  { background: rgba(247,247,235,.12); color: var(--t-cream); }
.t-nav-link.active { background: var(--t-blush); color: var(--t-text); }

.t-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.t-badge {
  background: rgba(249,233,208,.2); border: 1px solid rgba(249,233,208,.4);
  color: var(--t-sand); padding: 5px 14px; border-radius: 50px;
  font-size: 12px; font-weight: 800;
}

/* ── Layout ── */
.t-layout  { display: flex; min-height: calc(100vh - 56px); }
.t-sidebar {
  width: 240px; flex-shrink: 0;
  background: white; border-right: 1.5px solid var(--t-peach);
  padding: 20px 12px;
  position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto;
}
.t-main { flex: 1; padding: 32px; background: var(--t-cream); overflow-y: auto; }

/* ── Sidebar ── */
.t-sidebar-title {
  font-size: 11px; font-weight: 900; color: var(--t-soft);
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 0 8px 8px; margin-bottom: 4px;
}
.t-level-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 10px; border: none; background: none;
  font-family: 'Nunito',sans-serif; font-size: 14px; font-weight: 800;
  color: var(--t-mid); cursor: pointer; transition: all .2s; text-align: left;
}
.t-level-btn:hover  { background: var(--t-peach); color: var(--t-text); }
.t-level-btn.active { background: var(--t-blush); color: var(--t-text); }
.t-level-icon { font-size: 18px; }

.t-sidebar-sep { height: 1px; background: var(--t-peach); margin: 12px 8px; }

.t-lesson-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 12px; border-radius: 8px; border: none; background: none;
  font-family: 'Nunito',sans-serif; font-size: 13px; font-weight: 700;
  color: var(--t-mid); cursor: pointer; transition: all .2s; text-align: left;
}
.t-lesson-btn:hover  { background: var(--t-peach); color: var(--t-text); }
.t-lesson-btn.active { background: var(--t-sand); color: var(--t-text); }
.t-lesson-num {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--t-peach); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; flex-shrink: 0; color: var(--t-mid);
}
.t-lesson-btn.active .t-lesson-num { background: rgba(92,61,42,.15); }

/* ── Page header ── */
.t-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.t-page-title { font-size: 1.6rem; font-weight: 900; color: var(--t-text); }
.t-page-sub   { font-size: .9rem; font-weight: 700; color: var(--t-soft); margin-top: 4px; }
.t-actions    { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── Lesson card ── */
.t-lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.t-lesson-card {
  background: white; border-radius: 16px; border: 1.5px solid var(--t-peach);
  overflow: hidden; transition: all .2s;
}
.t-lesson-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(122,92,74,.12);
  border-color: var(--t-blush);
}
.t-lc-top { padding: 18px 20px 14px; border-bottom: 1.5px solid var(--t-peach); }
.t-lc-num { font-size:11px; font-weight:900; color:var(--t-soft); letter-spacing:1px; text-transform:uppercase; margin-bottom:6px; }
.t-lc-title    { font-size: 1rem; font-weight: 900; color: var(--t-text); margin-bottom: 3px; }
.t-lc-title-zh { font-family:'Noto Sans SC',sans-serif; font-size:.9rem; font-weight:500; color:var(--t-mid); }
.t-lc-body  { padding: 14px 20px; }
.t-lc-key   {
  font-size: .82rem; font-weight: 700; color: var(--t-mid);
  background: var(--t-cream); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
  font-family:'Noto Sans SC','Nunito',sans-serif; line-height: 1.6;
}
.t-lc-meta    { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.t-lc-actions { display: flex; gap: 8px; }

/* ── Buttons ── */
.t-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--t-peach);
  font-family:'Nunito',sans-serif; font-weight: 800; font-size: 13px;
  cursor: pointer; transition: all .2s; text-decoration: none;
  color: var(--t-mid); background: white;
}
.t-btn:hover         { border-color: var(--t-blush); background: var(--t-blush); color: var(--t-text); }
.t-btn-primary       { background: var(--t-blush); color: var(--t-text); border-color: #EFCDC7; }
.t-btn-primary:hover { background: #F5D4CE; color: var(--t-text); }
.t-btn-blue          { background: var(--t-sky); color: #2E6070; border-color: #C4D8DC; }
.t-btn-blue:hover    { background: #C8DCE0; color: #2E6070; }
.t-btn-navy          { background: var(--t-dark); color: white; border-color: var(--t-dark); }
.t-btn-navy:hover    { background: var(--t-dark2); color: white; }
.t-btn-sm { padding: 7px 13px; font-size: 12px; }
.t-btn-lg { padding: 13px 24px; font-size: 15px; }

/* ── Section blocks ── */
.t-section { background: white; border-radius: 16px; border: 1.5px solid var(--t-peach); margin-bottom: 20px; overflow: hidden; }
.t-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; cursor: pointer; user-select: none;
  border-bottom: 1.5px solid var(--t-peach); background: var(--t-cream);
}
.t-section-header:hover { background: var(--t-peach); }
.t-section-title { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 900; color: var(--t-text); }
.t-section-icon { width:32px; height:32px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.t-section-time { font-size:12px; font-weight:800; color:var(--t-soft); background:var(--t-peach); padding:4px 10px; border-radius:50px; }
.t-section-body { padding: 20px; }
.t-section.collapsed .t-section-body { display: none; }

/* ── Vocab table ── */
.t-vocab-table { width: 100%; border-collapse: collapse; }
.t-vocab-table th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 900; color: var(--t-soft); letter-spacing: 1px; text-transform: uppercase;
  background: var(--t-cream); border-bottom: 1.5px solid var(--t-peach);
}
.t-vocab-table td   { padding: 12px 14px; border-bottom: 1px solid var(--t-peach); vertical-align: middle; }
.t-vocab-table tr:last-child td { border-bottom: none; }
.t-vocab-table tr:hover td { background: var(--t-cream); }
.t-zh-cell { font-family:'Noto Sans SC',sans-serif; font-size:1.5rem; font-weight:700; color:var(--t-text); }
.t-py-cell { font-size:.9rem; font-weight:800; color:#5A8090; }
.t-vi-cell { font-size:.9rem; font-weight:700; color:var(--t-mid); }
.t-en-cell { font-size:.85rem; color:var(--t-soft); font-style:italic; }
.t-ex-cell { font-family:'Noto Sans SC','Nunito',sans-serif; font-size:.85rem; color:var(--t-mid); line-height:1.5; }
.t-speak-btn {
  width:34px; height:34px; border-radius:50%; border:none;
  background: var(--t-blush); color: var(--t-dark); font-size:16px;
  cursor:pointer; transition:all .2s; display:flex; align-items:center; justify-content:center;
}
.t-speak-btn:hover { background: var(--t-dark); color: white; transform: scale(1.1); }

/* ── Key sentences ── */
.t-sentence-list { display: flex; flex-direction: column; gap: 12px; }
.t-sentence-item {
  background: var(--t-cream); border-radius: 12px; border: 1.5px solid var(--t-peach);
  padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px;
}
.t-sentence-item:hover { border-color: var(--t-blush); background: #FDF0EE; }
.t-sentence-zh { font-family:'Noto Sans SC',sans-serif; font-size:1.1rem; font-weight:700; color:var(--t-text); }
.t-sentence-py { font-size:.82rem; font-weight:700; color:#5A8090; margin-top:3px; }
.t-sentence-vi { font-size:.82rem; font-weight:700; color:var(--t-mid); margin-top:2px; }

/* ── Practice ── */
.t-activity-list { display: flex; flex-direction: column; gap: 10px; }
.t-activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--t-cream); border-radius: 10px; padding: 12px 16px;
}
.t-activity-num {
  width:28px; height:28px; border-radius:8px;
  background: var(--t-dark); color: white;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:900; flex-shrink:0;
}
.t-activity-text { font-size:.9rem; font-weight:700; color:var(--t-mid); line-height:1.5; }
.t-activity-text strong { color: var(--t-text); }

/* ═══════════════════════════════════════════
   CLASSROOM MODE – nền sáng watercolor
   ═══════════════════════════════════════════ */
.teach-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--t-cream);
}
.teach-header {
  background: white;
  border-bottom: 1.5px solid var(--t-peach);
  padding: 12px 24px; display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(122,92,74,.06);
}
.teach-title       { font-size: 1rem; font-weight: 900; color: var(--t-text); }
.teach-lesson-info { font-size: .82rem; font-weight: 700; color: var(--t-soft); }
.teach-mode-toggle { margin-left: auto; display: flex; gap: 6px; }
.teach-mode-btn {
  padding: 8px 16px; border-radius: 8px; border: 1.5px solid var(--t-peach);
  background: none; color: var(--t-mid); font-weight: 800; font-size: 13px;
  cursor: pointer; transition: all .2s; font-family:'Nunito',sans-serif;
}
.teach-mode-btn:hover  { background: var(--t-peach); color: var(--t-text); }
.teach-mode-btn.active { background: var(--t-blush); border-color: #EFCDC7; color: var(--t-text); }
.teach-content { flex: 1; display: flex; flex-direction: column; }

/* ── Section picker ── */
.section-picker { display: flex; gap: 6px; padding: 0 8px; }
.section-tab {
  padding: 7px 14px; border-radius: 8px; border: 1.5px solid var(--t-peach);
  background: none; color: var(--t-mid); font-weight: 800; font-size: 12px;
  cursor: pointer; transition: all .2s; font-family:'Nunito',sans-serif; white-space: nowrap;
}
.section-tab:hover  { background: var(--t-peach); color: var(--t-text); }
.section-tab.active { background: var(--t-blush); border-color: #EFCDC7; color: var(--t-text); }

/* ── Slide view ── */
.slide-view {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 60px; text-align: center;
  background: var(--t-cream);
}
.slide-progress { font-size: 13px; font-weight: 900; color: var(--t-soft); margin-bottom: 32px; }
.slide-zh {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(80px, 14vw, 160px);
  font-weight: 700; color: var(--t-text); line-height: 1;
  text-shadow: 0 4px 24px rgba(122,92,74,.1);
  margin-bottom: 16px;
}
.slide-py {
  font-size: clamp(24px, 4vw, 42px); font-weight: 800;
  color: #5A8090; margin-bottom: 16px; letter-spacing: 2px;
}
.slide-meanings { display: flex; gap: 24px; justify-content: center; margin-bottom: 28px; flex-wrap: wrap; }
.slide-vi {
  font-size: clamp(16px, 2.5vw, 26px); font-weight: 800;
  color: var(--t-text);
  background: var(--t-blush); border: 1.5px solid #EFCDC7;
  border-radius: 50px; padding: 8px 24px;
}
.slide-en { font-size: clamp(14px, 2vw, 20px); font-weight: 700; color: var(--t-soft); font-style: italic; }
.slide-sentence {
  font-family: 'Noto Sans SC','Nunito',sans-serif;
  font-size: clamp(14px, 2vw, 20px); color: var(--t-mid);
  background: var(--t-peach); border-radius: 12px; padding: 14px 28px;
  max-width: 700px; line-height: 1.7; text-align: center;
  border: 1.5px solid #EDD8C4;
}
.slide-sentence-vi { font-size: .85em; color: var(--t-soft); margin-top: 6px; }

/* ── Slide nav ── */
.slide-nav {
  display: flex; align-items: center; gap: 20px; padding: 20px; justify-content: center; flex-shrink: 0;
  background: white; border-top: 1.5px solid var(--t-peach);
}
.slide-nav-btn {
  width: 56px; height: 56px; border-radius: 16px;
  border: 1.5px solid var(--t-peach); background: white;
  color: var(--t-mid); font-size: 22px; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.slide-nav-btn:hover    { background: var(--t-blush); border-color: #EFCDC7; color: var(--t-text); }
.slide-nav-btn:disabled { opacity: .25; cursor: default; }
.slide-speak-btn {
  padding: 14px 32px; border-radius: 14px; border: 1.5px solid #EFCDC7;
  background: var(--t-blush); color: var(--t-text); font-size: 16px; font-weight: 900;
  cursor: pointer; transition: all .2s; font-family:'Nunito',sans-serif;
  display: flex; align-items: center; gap: 8px;
}
.slide-speak-btn:hover { background: #F5D4CE; transform: scale(1.04); }
.slide-dot-nav { display: flex; gap: 6px; }
.slide-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--t-muted); cursor: pointer; transition: all .2s;
}
.slide-dot.active { background: var(--t-blush); transform: scale(1.4); }

/* ── Table view ── */
.table-view { flex: 1; padding: 24px 32px; overflow-y: auto; background: var(--t-cream); }
.table-view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tv-word-card {
  background: white; border: 1.5px solid var(--t-peach);
  border-radius: 16px; padding: 20px 16px; text-align: center; cursor: pointer; transition: all .25s;
  box-shadow: 0 2px 8px rgba(122,92,74,.06);
}
.tv-word-card:hover       { background: var(--t-blush); border-color: #EFCDC7; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(122,92,74,.12); }
.tv-word-card.highlighted { background: var(--t-blush); border-color: #EFCDC7; }
.tv-zh { font-family:'Noto Sans SC',sans-serif; font-size:2rem; font-weight:700; color:var(--t-text); margin-bottom:8px; }
.tv-py { font-size:.85rem; font-weight:800; color:#5A8090; margin-bottom:4px; }
.tv-vi { font-size:.85rem; font-weight:700; color:var(--t-mid); }

/* ── Sentences view ── */
.sentences-view {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 60px; gap: 20px; overflow-y: auto;
  background: var(--t-cream);
}
.sentences-view .s-item {
  background: white; border: 1.5px solid var(--t-peach);
  border-radius: 20px; padding: 24px 32px; width: 100%; max-width: 800px;
  cursor: pointer; transition: all .2s;
  box-shadow: 0 2px 10px rgba(122,92,74,.06);
}
.sentences-view .s-item:hover { background: var(--t-blush); border-color: #EFCDC7; }
.sentences-view .s-zh { font-family:'Noto Sans SC',sans-serif; font-size:clamp(28px,4vw,48px); font-weight:700; color:var(--t-text); margin-bottom:10px; }
.sentences-view .s-py { font-size:clamp(14px,2vw,22px); font-weight:800; color:#5A8090; margin-bottom:6px; }
.sentences-view .s-vi { font-size:clamp(13px,1.8vw,20px); font-weight:700; color:var(--t-peach); }

/* ── Fullscreen btn ── */
.fs-btn {
  width:36px; height:36px; border-radius:8px;
  border: 1.5px solid rgba(249,233,208,.2); background: none;
  color: rgba(247,247,235,.5); font-size:16px; cursor:pointer; transition:all .2s;
  display:flex; align-items:center; justify-content:center;
}
.fs-btn:hover { background: rgba(249,233,208,.12); color: var(--t-cream); }

/* ── Responsive ── */
@media(max-width:900px) { .t-sidebar{display:none} .t-main{padding:20px} }
@media(max-width:600px) {
  .teach-header{padding:10px 16px}
  .slide-view{padding:20px 16px}
  .slide-nav{padding:16px;gap:12px}
  .slide-nav-btn{width:46px;height:46px;font-size:18px}
}
