:root {
  --brand: #1e5f8c;
  --brand-dark: #12405f;
  --ok: #1a8754;
  --warn: #c77700;
  --bad: #c0392b;
  --bg: #f4f6f8;
}

body {
  background: var(--bg);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  position: relative;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  letter-spacing: .3px;
}

.navbar-brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.navbar-qlhv {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}

.navbar-qlhv .nav-link {
  color: rgba(255,255,255,.9) !important;
}

.navbar-qlhv .nav-link.active {
  color: #fff !important;
  font-weight: 600;
}

.card-stat {
  border: none;
  border-radius: .75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.card-stat .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.badge-dat { background: var(--ok); }
.badge-chuadat { background: var(--bad); }
.badge-chuaco { background: #9aa4ad; }

.table-hover tbody tr:hover { background: #eef4f9; cursor: pointer; }

.upload-dropzone {
  border: 2px dashed #9fb7c8;
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
  background: #fff;
}

.upload-dropzone-logo {
  height: 40px;
  width: auto;
  display: inline-block;
}

.upload-dropzone-title {
  font-weight: 700;
  color: var(--brand-dark);
  font-size: .95rem;
}

/* Cân bằng độ rộng giữa nút "Chọn tệp" và phần tên tệp/placeholder của ô
   chọn file (mặc định trình duyệt để nút rất hẹp so với phần chữ còn lại). */
.upload-dropzone input[type="file"]::file-selector-button,
.upload-dropzone input[type="file"]::-webkit-file-upload-button {
  width: 40%;
  min-width: 140px;
  margin-right: 1rem;
  padding: .375rem .75rem;
  border: none;
  border-radius: .375rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.upload-dropzone input[type="file"]::file-selector-button:hover,
.upload-dropzone input[type="file"]::-webkit-file-upload-button:hover {
  background: var(--brand-dark);
}

/* Cùng quy tắc cân bằng độ rộng nút "Chọn tệp" như trên, dùng cho các ô chọn
   file khác ngoài upload-dropzone (vd: 2 ô Import XML Giáo viên/Xe tập lái ở
   trang Dashboard "Xe-Giáo viên") - gắn class="file-input-balanced". */
.file-input-balanced::file-selector-button,
.file-input-balanced::-webkit-file-upload-button {
  width: 40%;
  min-width: 140px;
  margin-right: 1rem;
  padding: .375rem .75rem;
  border: none;
  border-radius: .375rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.file-input-balanced::file-selector-button:hover,
.file-input-balanced::-webkit-file-upload-button:hover {
  background: var(--brand-dark);
}

/* Danh sách Xe / Giáo viên (trang Dashboard "Xe - Giáo viên") chia thành
   nhiều cột theo hạng (B.01/B/C1, hoặc GVLT/B.01/B/C1 cho giáo viên) thay vì
   1 danh sách dài - vẫn giữ nguyên độ rộng khung cũ (.border.rounded.p-2) nên
   cỡ chữ được thu nhỏ lại cho vừa cột hẹp hơn. */
.hang-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: .5rem;
}

.hang-col-grid.hang-col-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Cột hạng Xe (chỉ 3 hạng, tên hạng ngắn) thu hẹp khoảng cách giữa các cột
   lại gần sát nhau hơn - dành bớt độ rộng khung cho phía Giáo viên (4 cột,
   tên dài hơn) - theo yêu cầu 28/09/2026. */
.hang-col-grid.hang-col-grid-3 {
  column-gap: .3rem;
}

.hang-col-header {
  font-weight: 700;
  font-size: .68rem;
  text-transform: uppercase;
  color: var(--brand-dark);
  border-bottom: 1px solid #dee2e6;
  padding-bottom: .15rem;
  margin-bottom: .25rem;
  white-space: nowrap;
}

.hang-col .form-check {
  font-size: .72rem;
  line-height: 1.2;
  margin-bottom: .25rem;
  padding-left: 1.1rem;
}

.hang-col .form-check-input {
  margin-top: .2rem;
}

.hang-col-empty {
  font-size: .68rem;
  font-style: italic;
}

/* Khung Xe (3 cột hạng, .hang-col-grid-3) giữ nguyên độ rộng cột như hiện tại
   nhưng tăng cỡ chữ cho dễ nhìn hơn (theo yêu cầu 28/09/2026) - tiêu đề cột
   cho phép xuống dòng (bỏ nowrap) thay vì giữ 1 dòng để không bị tràn ra
   ngoài cột khi chữ to hơn. */
.hang-col-grid-3 .hang-col-header {
  font-size: .82rem;
  white-space: normal;
  line-height: 1.15;
}

.hang-col-grid-3 .hang-col .form-check {
  font-size: .88rem;
  line-height: 1.3;
  padding-left: 1.3rem;
}

.hang-col-grid-3 .hang-col .form-check-input {
  margin-top: .25rem;
}

.hang-col-grid-3 .hang-col-empty {
  font-size: .8rem;
}

/* Bảng "Xe trong khóa" / "Giáo viên trong khóa" (mục "Danh sách phân công
   hiện tại" tại Dashboard) - thu nhỏ cỡ chữ và không cho xuống dòng để mỗi
   dòng hiển thị gọn trên 01 dòng (theo yêu cầu 28/09/2026); .table-responsive
   bao ngoài vẫn cho phép cuộn ngang nếu màn hình quá hẹp. */
.assignment-table th,
.assignment-table td {
  font-size: .78rem;
  white-space: nowrap;
}

/* Hàng "1. Chọn khóa học..." tại Dashboard: ô chọn khóa 1, ô chọn khóa 2, nút
   "Phân xe-giáo viên vào khóa học" và checkbox "Vẫn thêm dù trùng" luôn nằm
   cùng 1 dòng (theo yêu cầu 28/09/2026). 2 ô chọn khóa rộng vừa đủ theo NỘI
   DUNG (width: max-content, không co lại) để luôn hiển thị đầy đủ thông tin
   khóa đang chọn (mã khóa, hạng, ngày khai giảng/bế giảng) mà không bị cắt
   chữ (theo yêu cầu 29/09/2026). Để cả hàng vừa trên 01 dòng ở độ phân giải
   màn hình thông thường (>=1366px) mà KHÔNG cần kéo thanh cuộn ngang, toàn bộ
   chữ trong hàng này được thu nhỏ cỡ chữ xuống .75rem (theo yêu cầu
   29/09/2026, lần 2); overflow-x bên dưới chỉ còn là phương án dự phòng cho
   các màn hình rất hẹp (<~1310px). */
.phancong-toolbar {
  overflow-x: auto;
  padding-bottom: .2rem;
  font-size: .75rem;
}

.phancong-toolbar .small,
.phancong-toolbar .text-muted,
.phancong-toolbar .form-check-label,
.phancong-toolbar .btn {
  font-size: inherit;
}

.phancong-khoa-select {
  flex: 0 0 auto;
  width: max-content;
  font-size: inherit;
  padding: .25rem 1.2rem .25rem .4rem;
}

.phancong-toolbar .btn {
  padding: .25rem .5rem;
}

.phancong-toolbar .form-check {
  padding-left: 1.1rem;
}

.phancong-toolbar .form-check-input {
  margin-top: .2rem;
}

@media (max-width: 576px) {
  .hang-col-grid,
  .hang-col-grid.hang-col-grid-4 {
    grid-template-columns: 1fr;
  }
}

.credential-box {
  border: 1px solid #f0c14b;
  background: #fff8e5;
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-family: monospace;
  font-size: 1rem;
}

.donut-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: flex-start;
  gap: 1rem;
  row-gap: 1.5rem;
}

.donut-chart {
  text-align: center;
}

.donut-svg {
  max-width: 100%;
  height: auto;
}

.donut-pct {
  font-size: 20px;
  font-weight: 700;
  fill: #0b0b0b;
  dominant-baseline: middle;
}

.donut-frac {
  font-size: 11px;
  fill: #52514e;
  dominant-baseline: middle;
}

.donut-label {
  font-size: .85rem;
  font-weight: 600;
  color: #3d454b;
  margin-top: .35rem;
}

.donut-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  font-size: .8rem;
  color: #52514e;
  margin-top: .25rem;
}

.donut-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: .3rem;
}

.donut-legend .dot-ok { background: var(--ok); }
.donut-legend .dot-track { background: #e1e0d9; }

/* Biểu đồ cột nằm ngang (thay thế donut_chart khi cần xếp nhiều nội dung
   theo thứ tự dọc) */
.hbar-chart {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.hbar-row {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.hbar-label {
  flex: 0 0 108px;
  width: 108px;
  font-size: .85rem;
  font-weight: 600;
  color: #3d454b;
  text-align: right;
}

.hbar-track {
  flex: 1 1 auto;
  height: 16px;
  background: #e1e0d9;
  border-radius: 8px;
  overflow: hidden;
}

.hbar-fill {
  height: 100%;
  min-width: 4px;
  background: var(--ok);
  border-radius: 8px;
}

.hbar-value {
  flex: 0 0 auto;
  min-width: 90px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--brand-dark);
  text-align: right;
}

.hbar-value .hbar-frac {
  display: block;
  font-size: .75rem;
  font-weight: 400;
  color: #7a8894;
}

@media (max-width: 576px) {
  .hbar-label { flex-basis: 76px; width: 76px; font-size: .78rem; }
  .hbar-value { min-width: 66px; font-size: .78rem; }
}

footer.app-footer {
  color: #7a8894;
  font-size: .85rem;
  padding: 2rem 1.5rem 1rem;
  text-align: center;
  line-height: 1.5;
}

footer.app-footer div + div {
  margin-top: .2rem;
}

/* ===================== Trang mua vé tập công khai (/ve-tap) ===================== */

.pv-header {
  background: #fff;
  color: var(--brand-dark);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e3e7ea;
  box-shadow: 0 1px 6px rgba(18,64,95,.06);
}

.pv-header .pv-brand {
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--brand-dark);
  text-decoration: none;
}

.pv-brand-logo {
  height: 32px;
  width: auto;
  margin-right: .6rem;
}

.pv-header a.pv-link {
  color: #52616f;
  text-decoration: none;
  margin-left: 1rem;
  font-size: .92rem;
}

.pv-header a.pv-link:hover {
  color: var(--brand);
  text-decoration: underline;
}

.pv-steps {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.pv-step {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #9aa4ad;
  font-weight: 600;
}

.pv-step .num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e1e0d9;
  color: #52514e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}

.pv-step.active,
.pv-step.done {
  color: var(--brand-dark);
}

.pv-step.active .num,
.pv-step.done .num {
  background: var(--brand);
  color: #fff;
}

.pv-step-sep {
  flex: 0 0 40px;
  height: 2px;
  background: #e1e0d9;
}

/* Ô "Ngày tập": ô chữ hiển thị luôn đúng dd/mm/yyyy trên mọi máy + nút lịch
   bấm được để chọn ngày qua lịch có sẵn của trình duyệt (ô ngày thật được ẩn
   đi, tách khỏi luồng bố cục để không ảnh hưởng input-group). */
.pv-date-group {
  position: relative;
}

.pv-date-native {
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
}

.pv-tagline {
  color: var(--brand-dark);
  font-weight: 600;
  font-size: .95rem;
  text-align: right;
  line-height: 1.4;
}

/* Lưới chọn khung giờ: hàng = xe, cột = giờ tập. */
.pv-slot-grid {
  overflow-x: auto;
}

.pv-slot-grid table {
  border-collapse: separate;
  border-spacing: 4px;
}

.pv-slot-grid th {
  font-size: .8rem;
  color: #52514e;
  text-align: center;
  white-space: nowrap;
  padding: .3rem .4rem;
}

.pv-slot-grid td {
  text-align: center;
  padding: 0;
}

.pv-slot-cell {
  display: block;
  min-width: 96px;
  padding: .5rem .4rem;
  border-radius: .5rem;
  background: #e7f5ec;
  color: var(--ok);
  font-weight: 600;
  font-size: .78rem;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  user-select: none;
  text-decoration: none;
}

.pv-slot-cell:hover {
  border-color: var(--ok);
  color: var(--ok);
  background: #d7ecdf;
}

.pv-slot-empty {
  display: block;
  min-width: 96px;
  padding: .5rem .4rem;
  border-radius: .5rem;
  background: #f1f1ef;
  color: #b3b8bc;
  font-size: .85rem;
}

.pv-slot-selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand-dark);
  cursor: default;
}

.pv-cart-pill {
  background: rgba(18,64,95,.1);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: .25rem .75rem;
  font-weight: 600;
}

.pv-ticket {
  max-width: 460px;
  margin: 0 auto;
  border: 2px dashed var(--brand);
  border-radius: 1rem;
  padding: 1.5rem;
  background: #fff;
}

.pv-ticket .pv-ticket-code {
  font-family: monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--brand-dark);
  text-align: center;
}

.pv-ticket dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: .4rem .75rem;
  margin: 1rem 0 0;
}

.pv-ticket dt {
  color: #7a8894;
  font-weight: 600;
}

.pv-ticket dd {
  margin: 0;
  font-weight: 600;
  color: #2b2f33;
}

/* Banner dọc treo hai bên trang - hiện từ mức màn hình rộng vừa phải trở lên.
   Từ mốc này, thu hẹp bớt cột nội dung chính (main.container) để luôn có đủ
   khoảng trống hai bên cho banner, không đè lên form/bảng khung giờ.
   Banner kéo dài suốt theo chiều cao trang, xuống tới sát chân trang (footer).
   Cấu trúc flexbox: khối chữ trên (logo/tên) và khối chữ dưới (CTA/hotline)
   luôn giữ nguyên kích thước tự nhiên để chữ không bao giờ bị cắt/co bóp -
   chỉ riêng khối ảnh ở giữa co giãn lấp đầy phần chiều cao còn lại. */
.pv-side-banner {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 110px;
  bottom: 24px;
  min-height: 430px;
  width: 170px;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(18,64,95,.22);
  z-index: 5;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.pv-side-banner-left { left: 16px; }
.pv-side-banner-right { right: 16px; }

.pv-side-banner-top {
  flex: 0 0 auto;
  padding: 12px 8px 10px;
  text-align: center;
  background: #fff;
}

.pv-side-banner-logo {
  width: 62%;
  height: auto;
  display: block;
  margin: 0 auto 6px;
}

.pv-side-banner-title {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--brand-dark);
}

.pv-side-banner-sub {
  font-size: 9px;
  color: var(--brand);
  margin-top: 5px;
  line-height: 1.3;
}

.pv-side-banner-photo {
  flex: 1 1 auto;
  min-height: 70px;
  background-size: cover;
  background-position: center;
  background-color: #dfe6ea;
  position: relative;
}

.pv-side-banner-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  padding: 0 6px;
  text-shadow: 0 1px 4px rgba(0,0,0,.65);
}

.pv-side-banner-cta {
  flex: 0 0 auto;
  background: var(--brand-dark);
  color: #fff;
  text-align: center;
  padding: 12px 8px 14px;
}

.pv-side-banner-cta-title {
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
}

.pv-side-banner-rule {
  width: 34px;
  height: 2px;
  background: #e0be6e;
  margin: 8px auto;
}

.pv-side-banner-hotline-label {
  font-size: 8px;
  letter-spacing: .5px;
  color: #9ac4e0;
  text-transform: uppercase;
}

.pv-side-banner-hotline {
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}

.pv-side-banner-address {
  font-size: 8.5px;
  color: #dfe8ee;
  margin-top: 8px;
  line-height: 1.35;
}

@media (min-width: 1500px) {
  .pv-side-banner { display: flex; }
  main.container { max-width: 1080px; margin-left: auto; margin-right: auto; }
}

/* ===================== Trang chủ công khai (/) ===================== */

.home-body {
  background: #fff;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: #2b2f33;
}

.home-header {
  background: #fff;
  border-bottom: 1px solid #e3e7ea;
  box-shadow: 0 1px 6px rgba(18,64,95,.06);
  position: sticky;
  top: 0;
  z-index: 20;
}

.home-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--brand-dark);
}

.home-brand-logo {
  height: 40px;
  width: auto;
}

.home-brand-text {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
  white-space: nowrap;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.home-nav a {
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}

.home-nav a:hover { color: var(--brand); }

/* Menu hiển thị trên một dòng (thêm 13/10/2026): không cho tên menu xuống dòng,
   thu nhỏ dần khoảng cách/cỡ chữ khi màn hình hẹp. Từ 768px trở xuống dùng nút ☰. */
.home-header-inner { max-width: 1360px; }
.home-nav { flex-wrap: nowrap; }
.home-nav a { white-space: nowrap; }
.home-brand { flex-shrink: 0; }
@media (min-width: 769px) and (max-width: 1320px) {
  .home-header-inner { padding-left: 1rem; padding-right: 1rem; gap: .75rem; }
  .home-nav { gap: 1.1rem; }
  .home-nav a { font-size: .9rem; }
  .home-brand-text { font-size: 1rem; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .home-nav { gap: .8rem; }
  .home-nav a { font-size: .84rem; }
  .home-brand-logo { height: 34px; }
  .home-brand-text { font-size: .86rem; }
}
@media (min-width: 769px) and (max-width: 1060px) {
  .home-brand-text { display: none; }
}
@media (min-width: 769px) and (max-width: 830px) {
  .home-nav { gap: .5rem; }
  .home-nav a { font-size: .78rem; }
}

.home-nav a.home-nav-cta {
  background: var(--brand);
  color: #fff;
  padding: .5rem 1.1rem;
  border-radius: .5rem;
}

.home-nav a.home-nav-cta:hover { background: var(--brand-dark); color: #fff; }

.home-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.home-nav-toggle span {
  display: block;
  height: 2px;
  background: var(--brand-dark);
  border-radius: 2px;
}

.home-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background: var(--brand-dark);
  overflow: hidden;
}

.home-hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.home-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.home-hero-slide.active {
  opacity: 1;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(18,64,95,.68) 0%, rgba(18,64,95,.5) 45%, rgba(18,64,95,.22) 100%);
}

.home-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  color: #fff;
}

.home-hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.home-hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.home-hero-dot:hover { background: rgba(255,255,255,.75); }

.home-hero-dot.active {
  background: #fff;
  transform: scale(1.25);
}

.home-hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  font-size: .85rem;
  color: #cfe3f1;
  margin-bottom: .9rem;
}

.home-hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  margin: 0 0 .75rem;
  line-height: 1.15;
}

.home-hero-sub {
  font-size: 1.1rem;
  color: #e6eef3;
  max-width: 560px;
  margin: 0 0 1.75rem;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}

.home-btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: .6rem;
  font-weight: 700;
  text-decoration: none;
  font-size: .95rem;
}

.home-btn-primary {
  background: var(--ok);
  color: #fff;
}

.home-btn-primary:hover { background: #156b44; color: #fff; }

.home-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.7);
}

.home-btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

.home-section {
  padding: 4rem 1.5rem;
}

.home-section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.home-section-head {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.home-section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  font-size: .8rem;
  color: var(--brand);
  margin-bottom: .5rem;
}

.home-section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin: 0 0 .6rem;
}

.home-section-sub {
  color: #5b6670;
  margin: 0;
  line-height: 1.55;
}

.home-services-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: .5rem;
}

.home-services-grid .home-service-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
}

@media (min-width: 900px) {
  .home-services-grid {
    overflow-x: visible;
    padding-bottom: 0;
  }
  .home-services-grid .home-service-card {
    flex: 1 1 0;
  }
}

.home-service-card {
  background: var(--bg);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.home-service-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  margin: 0 auto .9rem;
}

.home-service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 .5rem;
}

.home-service-card p {
  color: #5b6670;
  font-size: .92rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}

.home-service-card a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  font-size: .92rem;
}

.home-service-card a:hover { color: var(--brand-dark); }

.home-features-section .home-section-head {
  max-width: 900px;
}

.home-about {
  background: var(--bg);
}

.home-about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.home-about-photo img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  border-radius: 1rem;
  display: block;
  box-shadow: 0 8px 24px rgba(18,64,95,.16);
}

.home-about-text p {
  color: #495057;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.home-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.home-feature { text-align: center; }

.home-feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  color: var(--brand);
}

.home-feature-icon svg { width: 100%; height: 100%; }

.home-feature h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 .4rem;
}

.home-feature p {
  color: #5b6670;
  font-size: .9rem;
  line-height: 1.55;
  margin: 0;
}

.home-cta-band {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  padding: 3rem 1.5rem;
}

.home-cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: #fff;
}

.home-cta-band-inner h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 .3rem;
}

.home-cta-band-inner p {
  margin: 0;
  color: #dcebf3;
}

@media (max-width: 860px) {
  .home-about-inner { grid-template-columns: 1fr; }
  .home-about-photo img { min-height: 220px; }
}

@media (max-width: 768px) {
  .home-hero-title { font-size: 2rem; }
  .home-nav-toggle { display: flex; }
  .home-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid #e3e7ea;
    box-shadow: 0 8px 16px rgba(18,64,95,.1);
  }
  .home-nav.open { display: flex; }
  .home-nav a {
    padding: .9rem 1.5rem;
    border-top: 1px solid #eef1f3;
  }
  .home-nav a.home-nav-cta {
    border-radius: 0;
    text-align: center;
  }
  .home-header-inner { position: relative; }
  .home-brand-logo { height: 32px; }
  .home-brand-text { font-size: .82rem; }
  .home-section { padding: 2.75rem 1.25rem; }
  .home-cta-band-inner { text-align: center; justify-content: center; }
}

/* ===================== Trang ghi danh công khai (/ghi-danh) ===================== */

.enroll-section {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  background: var(--bg);
}

.enroll-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 6px 24px rgba(18,64,95,.1);
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
}

.enroll-card-done {
  text-align: center;
}

.enroll-done-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  color: var(--ok);
}

.enroll-eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  font-size: .8rem;
  color: var(--brand);
  margin-bottom: .5rem;
}

.enroll-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin: 0 0 .6rem;
}

.enroll-sub {
  color: #5b6670;
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

.enroll-alert {
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-size: .92rem;
  margin-bottom: 1.25rem;
}

.enroll-alert-error {
  background: #fdecea;
  color: #b3261e;
}

.enroll-alert-success {
  background: #e6f4ea;
  color: #1a8754;
}

.enroll-field {
  margin-bottom: 1.1rem;
}

.enroll-label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  color: var(--brand-dark);
  margin-bottom: .4rem;
}

.enroll-input {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid #d7dee3;
  border-radius: .5rem;
  font-size: .95rem;
  font-family: inherit;
  box-sizing: border-box;
}

.enroll-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30,95,140,.15);
}

.enroll-radios {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.enroll-radio {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin: 0;
  padding: .6rem .3rem;
  border: 1px solid #d7dee3;
  border-radius: .5rem;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  color: var(--brand-dark);
  transition: border-color .15s, background .15s;
}

.enroll-radio input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.enroll-radio:has(input:checked) {
  border-color: var(--brand);
  background: rgba(30,95,140,.08);
}

.enroll-radio:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(30,95,140,.25);
}

.enroll-submit {
  width: 100%;
  border: none;
  margin-top: .5rem;
}

.enroll-hint {
  margin-top: 1.25rem;
  text-align: center;
  font-size: .85rem;
  color: #5b6670;
}

@media (max-width: 480px) {
  .enroll-card { padding: 2rem 1.5rem; }
}

/* ================= Trang tự phục vụ của học viên (/hoc-vien) ================= */

.enroll-card-wide {
  max-width: 640px;
}

.student-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid #eef1f3;
  font-size: .92rem;
}

.student-info-row:last-of-type {
  border-bottom: none;
}

.student-info-label {
  color: #5b6670;
}

.student-info-value {
  font-weight: 600;
  color: var(--brand-dark);
  text-align: right;
}

.student-progress-head {
  margin-top: 1.5rem;
  margin-bottom: .25rem;
  font-weight: 700;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-size: .78rem;
}

.student-pill {
  display: inline-block;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
}

.student-pill-dat { background: var(--ok); }
.student-pill-chuadat { background: var(--bad); }
.student-pill-chuaco { background: #9aa4ad; }

/* Mục tiến độ bấm để xem chi tiết (dashboard học viên) */
.student-hint { margin: 0 0 .25rem; font-size: .8rem; color: #8a949d; }
.student-acc { border-bottom: 1px solid #eef1f3; }
.student-acc > summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .7rem 0; cursor: pointer; list-style: none; font-size: .92rem;
}
.student-acc > summary::-webkit-details-marker { display: none; }
.student-acc > summary .student-info-value::after {
  content: "\25BE"; display: inline-block; margin-left: .6rem; color: #8a949d;
  font-size: .9rem; transition: transform .15s;
}
.student-acc[open] > summary .student-info-value::after { transform: rotate(180deg); }
.student-acc > summary:hover .student-info-label { color: var(--brand-dark); }
.student-acc-body { padding: .2rem 0 .9rem; }
.student-detail-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.student-detail-table th, .student-detail-table td {
  padding: .4rem .5rem; border-bottom: 1px solid #f1f3f5; text-align: left; vertical-align: top;
}
.student-detail-table th { color: #5b6670; font-weight: 600; white-space: nowrap; }
.student-detail-table thead th { background: #f6f8f9; }
.student-acc-meta { margin-top: .5rem; font-size: .76rem; color: #8a949d; }
.student-acc-sub { margin: .9rem 0 .3rem; font-weight: 700; font-size: .8rem; color: var(--brand-dark); }
.student-acc-empty { font-size: .86rem; color: #8a949d; }
.student-text-bad { color: var(--bad); font-weight: 600; }
.student-text-ok { color: var(--ok); font-weight: 600; }

.student-note {
  margin-top: 1.5rem;
  font-size: .82rem;
  color: #5b6670;
  line-height: 1.5;
}

.student-date-form {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin-bottom: .5rem;
}

.student-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: .85rem;
}

.student-table th, .student-table td {
  padding: .55rem .5rem;
  border-bottom: 1px solid #eef1f3;
  text-align: center;
}

.student-table th {
  background: #f4f6f8;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: .78rem;
}

.student-table td:first-child, .student-table th:first-child {
  text-align: left;
}

.student-slot-btn {
  border: none;
  border-radius: .4rem;
  padding: .35rem .7rem;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}

.student-slot-free {
  background: var(--ok);
  color: #fff;
}

.student-slot-free:hover {
  opacity: .88;
}

.student-slot-taken {
  background: #e5e8eb;
  color: #5b6670;
}

.student-slot-taken:hover {
  background: #d7dee3;
}

a.student-slot-btn {
  text-decoration: none;
  display: inline-block;
}

.student-slot-expired {
  font-size: .72rem;
  color: #5b6670;
  display: block;
  margin-top: .3rem;
}

/* Màn hình điện thoại (thêm 02/10/2026): nút bấm to hơn cho dễ chạm, và ghim
   cố định cột đầu (cột "Khung giờ") khi cuộn ngang bảng lịch Cabin/xe tập -
   để luôn biết đang xem hàng giờ nào dù đã cuộn sang các cột xe/cabin bên
   phải. */
@media (max-width: 576px) {
  .student-slot-btn {
    padding: .5rem .85rem;
    font-size: .82rem;
  }
  .student-table th, .student-table td {
    padding: .65rem .55rem;
  }
  .student-table th:first-child, .student-table td:first-child {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
  }
  .student-table thead th:first-child {
    background: #f4f6f8;
    z-index: 2;
  }
  .pv-slot-cell, .pv-slot-empty {
    min-width: 84px;
    padding: .6rem .4rem;
  }
}

/* ===================== Trang /admin/hoc-vien - cỡ chữ co giãn theo màn hình
   thiết bị (điện thoại/máy tính bảng/PC), giữ tỷ lệ dễ đọc như trang đăng
   nhập thay vì giữ nguyên 1 cỡ chữ cố định trên mọi màn hình. ===================== */
.students-table {
  font-size: 1rem;
}

.students-table th,
.students-table td {
  white-space: nowrap;
  padding: .35rem .5rem;
  line-height: 1.3;
}

.students-table .form-select-sm {
  padding-top: .15rem;
  padding-bottom: .15rem;
}

@media (max-width: 991.98px) {
  .students-table { font-size: .9rem; }
  .students-table .form-select-sm { font-size: .85rem; }
}

@media (max-width: 767.98px) {
  .students-table { font-size: .82rem; }
  .students-table th, .students-table td { padding: .3rem .45rem; }
  .students-table .form-select-sm { font-size: .8rem; min-width: 140px !important; }
  .students-table .badge { font-size: .72em; }
}

@media (max-width: 575.98px) {
  .students-table { font-size: .74rem; }
  .students-table th, .students-table td { padding: .25rem .35rem; }
  .students-table .form-select-sm { font-size: .74rem; min-width: 120px !important; }
  .students-table .badge { font-size: .68em; padding: .3em .45em; }
}

@media print {
  .pv-header, .no-print, .pv-side-banner { display: none !important; }
  .pv-ticket { border-style: solid; }
  .home-header, .home-hero-actions { display: none !important; }
}

/* Cột "Thông tin học viên" ở trang chi tiết học viên (_student_progress.html,
   dùng chung cho admin/course_detail và teacher/student_detail) - giữ chiều
   rộng thoải mái trên PC/tablet, nhưng không ép min-width trên điện thoại
   nhỏ để tránh tràn ngang trang (thêm 02/10/2026). */
.student-progress-info-col {
  min-width: 300px;
  max-width: 400px;
}

@media (max-width: 420px) {
  .student-progress-info-col {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
}

/* ===== Ôn tập Mô phỏng (học viên) - thêm 13/10/2026 ===== */
.enroll-card.mp-card { max-width: 880px; text-align: left; }
.mp-card .enroll-title { font-size: 1.45rem; }
.mp-crumb { margin-bottom: .6rem; font-size: .85rem; }
.mp-crumb a { color: var(--brand); text-decoration: none; }
.mp-crumb a:hover { text-decoration: underline; }

.mp-rule { background: #f2f7fb; border-left: 4px solid var(--brand); border-radius: .5rem; padding: .8rem 1rem; margin: 1rem 0; font-size: .9rem; color: #33424d; }
.mp-rule-title { font-weight: 700; color: var(--brand-dark); margin-bottom: .3rem; }
.mp-rule ul { margin: 0; padding-left: 1.1rem; }
.mp-rule li { margin: .2rem 0; }
.mp-rule p { margin: 0; }
.mp-guide { border-left-color: var(--warn); background: #fff8ec; }
.mp-guide .mp-rule-title { color: var(--warn); }

.mp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .7rem; margin: 1rem 0; }
.mp-stat { background: #fff; border: 1px solid #e3e8ec; border-radius: .6rem; padding: .7rem .5rem; text-align: center; }
.mp-stat-n { font-size: 1.4rem; font-weight: 700; color: var(--brand-dark); line-height: 1.2; }
.mp-stat-l { font-size: .76rem; color: #6b7780; margin-top: .15rem; }

.mp-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 1.4rem; }
.mp-actions form { margin: 0; }
.mp-btn { display: inline-block; padding: .55rem 1.1rem; border-radius: .5rem; border: 1px solid var(--brand); background: #fff; color: var(--brand); font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; line-height: 1.3; }
.mp-btn:hover { background: #eaf3f9; color: var(--brand-dark); }
.mp-btn-primary { background: var(--brand); color: #fff; }
.mp-btn-primary:hover { background: var(--brand-dark); color: #fff; }
.mp-link { background: none; border: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font-size: .85rem; padding: .2rem; }

.mp-chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.mp-chapter { display: block; border: 1px solid #e3e8ec; border-radius: .7rem; padding: .85rem 1rem; text-decoration: none; color: #2b3640; background: #fff; transition: box-shadow .15s, border-color .15s; }
.mp-chapter:hover { border-color: var(--brand); box-shadow: 0 3px 12px rgba(18,64,95,.12); color: #2b3640; }
.mp-chapter-top { display: flex; justify-content: space-between; align-items: baseline; font-size: .76rem; }
.mp-chapter-no { font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .03em; }
.mp-chapter-cnt { color: #8a949d; }
.mp-chapter-name { font-weight: 600; margin: .3rem 0 .6rem; min-height: 2.5em; }
.mp-chapter-sub { font-size: .76rem; color: #6b7780; margin-top: .35rem; }
.mp-bar { height: 6px; background: #e7edf1; border-radius: 3px; overflow: hidden; }
.mp-bar > span { display: block; height: 100%; background: var(--ok); }

.mp-list td, .mp-list th { vertical-align: middle; }
.mp-row-actions { white-space: nowrap; }
.mp-row-actions a { margin-left: .3rem; }

/* Video: che dòng chú thích tên tình huống (nằm sát mép trên khung hình) khi làm bài */
.mp-video { width: 100%; background: #000; border-radius: .6rem; overflow: hidden; margin: .8rem 0 1rem; }
.mp-video video { display: block; width: 100%; height: auto; background: #000; }
.mp-video:not(.mp-crop) video { max-height: 70vh; }
.mp-video.mp-crop { position: relative; }
.mp-video.mp-crop video { margin-top: -7%; }
.mp-novideo { background: #f4f6f8; border: 1px dashed #c9d1d7; border-radius: .6rem; padding: 1.5rem; text-align: center; color: #8a949d; margin: .8rem 0 1rem; }

.mp-form { margin: 0; }
.mp-q { border: 1px solid #e3e8ec; border-radius: .6rem; padding: .7rem 1rem .8rem; margin: 0 0 .9rem; min-width: 0; }
.mp-q legend { float: none; width: auto; font-size: .95rem; font-weight: 700; color: var(--brand-dark); padding: 0 .4rem; margin-bottom: .2rem; }
.mp-q-pt { font-weight: 400; color: #8a949d; font-size: .78rem; }
.mp-opt { display: flex; gap: .55rem; align-items: flex-start; padding: .45rem .55rem; border-radius: .45rem; cursor: pointer; font-size: .92rem; line-height: 1.45; }
.mp-opt:hover { background: #f2f7fb; }
.mp-opt input { margin-top: .3rem; flex: 0 0 auto; }
.mp-opt:has(input:checked) { background: #e6f1f9; outline: 1px solid var(--brand); }

.mp-nav { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.mp-nav-dot { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 1px solid #c9d1d7; background: #fff; color: #5a6670; font-weight: 600; font-size: .82rem; cursor: pointer; padding: 0; }
.mp-nav-dot.mp-nav-done { background: #e3f4ea; border-color: var(--ok); color: var(--ok); }
.mp-nav-dot.mp-nav-cur { background: var(--brand); border-color: var(--brand); color: #fff; }

.mp-pager { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.mp-pager form { margin: 0; }

.mp-answer { margin: .8rem 0; }
.mp-answer-row { border-left: 4px solid #c9d1d7; background: #f8fafb; border-radius: .4rem; padding: .55rem .8rem; margin-bottom: .55rem; }
.mp-answer-row.mp-ok { border-left-color: var(--ok); background: #f0faf4; }
.mp-answer-row.mp-bad { border-left-color: var(--bad); background: #fdf3f2; }
.mp-answer-label { font-size: .78rem; font-weight: 700; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .02em; display: flex; justify-content: space-between; gap: .5rem; }
.mp-ok .mp-mark { color: var(--ok); }
.mp-bad .mp-mark { color: var(--bad); }
.mp-your { font-size: .86rem; color: var(--bad); margin-top: .25rem; }
.mp-answer-text { font-size: .92rem; margin-top: .2rem; color: #2b3640; line-height: 1.5; }

.mp-score { text-align: center; border-radius: .8rem; padding: 1rem; margin: 1rem 0; border: 2px solid #c9d1d7; }
.mp-score-ok { border-color: var(--ok); background: #f0faf4; }
.mp-score-mid { border-color: var(--warn); background: #fff8ec; }
.mp-score-bad { border-color: var(--bad); background: #fdf3f2; }
.mp-score-n { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.mp-score-ok .mp-score-n { color: var(--ok); }
.mp-score-mid .mp-score-n { color: var(--warn); }
.mp-score-bad .mp-score-n { color: var(--bad); }
.mp-score-d { font-size: 1rem; color: #6b7780; margin-left: .35rem; }
.mp-score-sub { font-size: .82rem; color: #6b7780; margin-top: .4rem; }

@media (max-width: 575px) {
  .enroll-card.mp-card { padding: 1.4rem 1rem; }
  .mp-opt { font-size: .9rem; }
  .mp-btn { width: 100%; text-align: center; }
  .mp-pager .mp-btn { width: auto; flex: 1 1 auto; }
}

/* Giao diện học viên trên điện thoại: hiện sẵn các menu (không ẩn sau nút ☰) - thêm 14/10/2026 */
@media (max-width: 768px) {
  .student-nav-visible .home-header { position: static; }
  .student-nav-visible .home-header-inner { flex-wrap: wrap; row-gap: .5rem; padding: .6rem 1rem .7rem; }
  .student-nav-visible .home-nav-toggle { display: none; }
  .student-nav-visible .home-nav {
    display: flex; position: static; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: .4rem; width: 100%; background: none; border: 0; box-shadow: none;
  }
  .student-nav-visible .home-nav a {
    padding: .4rem .75rem; border: 1px solid #cfdde8; border-radius: 999px; background: #f4f8fb;
    font-size: .82rem; line-height: 1.2; white-space: nowrap;
  }
  .student-nav-visible .home-nav a:last-child { border-color: #e6c3be; background: #fdf3f2; color: var(--bad); }
}

/* Trang Đăng ký thi của học viên (14/10/2026) */
.exam-h { font-size: 1rem; font-weight: 700; color: var(--brand-dark); margin: 1.2rem 0 0; }

/* Trang học viên có thêm menu "Đăng ký thi" (8 mục): thu gọn menu sớm hơn để luôn vừa một dòng, không tràn ngang. */
@media (min-width: 769px) and (max-width: 1500px) {
  .student-nav-visible .home-header-inner { padding-left: 1rem; padding-right: 1rem; gap: .75rem; }
  .student-nav-visible .home-nav { gap: 1.1rem; }
  .student-nav-visible .home-nav a { font-size: .9rem; }
  .student-nav-visible .home-brand-text { font-size: 1rem; }
}
@media (min-width: 769px) and (max-width: 1300px) {
  .student-nav-visible .home-nav { gap: .8rem; }
  .student-nav-visible .home-nav a { font-size: .84rem; }
  .student-nav-visible .home-brand-logo { height: 34px; }
  .student-nav-visible .home-brand-text { display: none; }
}
@media (min-width: 769px) and (max-width: 900px) {
  .student-nav-visible .home-nav { gap: .45rem; }
  .student-nav-visible .home-nav a { font-size: .76rem; }
}
@media (min-width: 769px) and (max-width: 820px) {
  .student-nav-visible .home-header-inner { padding-left: .6rem; padding-right: .6rem; gap: .5rem; }
  .student-nav-visible .home-nav { gap: .35rem; }
  .student-nav-visible .home-nav a { font-size: .72rem; }
}

/* Bảng Đăng ký thi trên điện thoại: mỗi đợt thi là một thẻ, nút Đăng ký/Hủy luôn nhìn thấy không cần cuộn ngang */
@media (max-width: 576px) {
  .exam-table thead { display: none; }
  .exam-table, .exam-table tbody, .exam-table tr, .exam-table td { display: block; width: 100%; box-sizing: border-box; }
  .exam-table tr { border: 1px solid #e3e7ea; border-radius: .6rem; padding: .5rem .7rem; margin-bottom: .7rem; background: #fff; }
  .exam-table td, .exam-table td:first-child { text-align: left; border: 0; padding: .3rem 0; display: flex; justify-content: space-between; gap: .8rem; align-items: center; }
  .exam-table td::before { content: attr(data-label); color: #5b6670; font-size: .76rem; font-weight: 600; flex: 0 0 38%; }
  .exam-table td:first-child { display: block; font-weight: 700; font-size: .95rem; }
  .exam-table td:first-child::before { display: none; }
  .exam-table td:first-child .student-slot-expired { font-weight: 400; }
  .exam-act { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; text-align: right; }
}

.exam-act form { margin: 0; }

/* Câu khẩu hiệu đầu trang chủ: cỡ chữ bằng dòng tiêu đề "Học lái xe cùng VTG" (15/10/2026) */
.home-hero-eyebrow { font-size: 2.6rem; line-height: 1.15; letter-spacing: normal; text-transform: none; font-weight: 800; color: #cfe3f1; }
@media (max-width: 768px) { .home-hero-eyebrow { font-size: 2rem; } }

/* ===== Học viên: Đặt lịch học thực hành + Phản ánh (19/10/2026) ===== */
.enroll-card.hotro-card { max-width: 760px; }
.hotro-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 1.1rem; border-bottom: 1px solid #e3e7ea; }
.hotro-tabs a {
  padding: .55rem .95rem; font-size: .9rem; font-weight: 600; color: #5b6670; text-decoration: none;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.hotro-tabs a:hover { color: var(--brand-dark); }
.hotro-tabs a.on { color: var(--brand-dark); border-bottom-color: var(--brand); }
.hotro-gv { background: #f4f8fb; border: 1px solid #d9e6ef; border-radius: .5rem; padding: .6rem .85rem; font-size: .92rem; margin-bottom: 1rem; }
.hotro-muted { color: #8a949d; font-size: .82rem; }
.hotro-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: .8rem; }
.hotro-form textarea.enroll-input { resize: vertical; min-height: 6rem; }
.hotro-disabled { opacity: .55; cursor: not-allowed; }
.hotro-item { border: 1px solid #e3e7ea; border-radius: .6rem; padding: .7rem .9rem; margin-top: .7rem; background: #fff; }
.hotro-item-old { background: #fafbfc; }
.hotro-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.hotro-when { font-weight: 700; color: var(--brand-dark); font-size: .95rem; overflow-wrap: anywhere; }
.hotro-meta { font-size: .8rem; color: #5b6670; margin-top: .25rem; }
.hotro-text { font-size: .9rem; margin-top: .4rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.hotro-reply { margin-top: .5rem; padding: .5rem .7rem; background: #f4f8fb; border-left: 3px solid var(--brand); border-radius: .3rem; font-size: .86rem; }
.hotro-propose { background: #fff8e6; border-left-color: #e0a100; }
.hotro-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.hotro-actions form { margin: 0; }
.hotro-badge { flex: 0 0 auto; border-radius: 999px; padding: .15rem .6rem; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.hotro-b-wait { background: #fff3cd; color: #8a6100; }
.hotro-b-ok { background: #e6f4ea; color: #1a7a4a; }
.hotro-b-info { background: #e3f0fa; color: #14608f; }
.hotro-b-bad { background: #fdecea; color: #b3261e; }
.hotro-b-mute { background: #eceff1; color: #5b6670; }
@media (max-width: 576px) {
  .hotro-grid { grid-template-columns: 1fr; gap: 0; }
  .hotro-item-head { flex-direction: column; gap: .3rem; }
  .hotro-tabs a { flex: 1 1 auto; text-align: center; padding: .5rem .5rem; font-size: .84rem; }
}
.hotro-doi { margin-top: .6rem; }
.hotro-doi > summary { list-style: none; display: inline-block; cursor: pointer; }
.hotro-doi > summary::-webkit-details-marker { display: none; }
.hotro-doi[open] > summary { margin-bottom: .4rem; }

/* Trợ lý (20/10/2026): thông báo mới trong hộp thư học viên */
.hotro-item-new { border-color: #f0b429; background: #fffaf0; }

/* Đăng ký thi ngay trong thông báo (21/10/2026) */
.hotro-dot { margin-top: .7rem; border-top: 1px dashed #cfd8dc; padding-top: .6rem; }
.hotro-dot-title { font-weight: 700; font-size: .88rem; color: var(--brand); margin-bottom: .3rem; }
.hotro-dot-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .45rem 0; }
.hotro-dot-row + .hotro-dot-row { border-top: 1px solid #eef1f3; }
.hotro-dot-act { text-align: right; flex-shrink: 0; max-width: 45%; }
@media (max-width: 640px) { .hotro-dot-row { flex-direction: column; align-items: flex-start; } .hotro-dot-act { text-align: left; max-width: 100%; } }

/* ===== Menu dọc bên trái (sidebar) cho trang quản trị / giáo viên - thêm 03/12/2026 =====
   Màu lấy từ biến CSS; mục Cấu hình đơn vị (nhóm "Thanh menu trang quản trị") ghi đè các biến này. */
:root {
  --sb-w: 250px;
  --sb-bg: #12405f;          /* nền cột menu (= màu xanh VTG đậm) */
  --sb-accent: #1e5f8c;      /* nền mục đang chọn / điểm nhấn */
  --sb-text: #ffffff;        /* chữ menu */
  --sb-text-active: #ffffff; /* chữ mục đang chọn */
}
body.has-sb { background: #f4f6f8; }
.sb { position: fixed; top: 0; bottom: 0; left: 0; width: var(--sb-w); background: var(--sb-bg); color: var(--sb-text);
  display: flex; flex-direction: column; z-index: 1030; }
.sb-brand { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.1); text-decoration: none; color: inherit; }
.sb-brand img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: .6rem; padding: 4px; flex-shrink: 0; }
.sb-brand > span, .sb-user-txt { display: flex; flex-direction: column; min-width: 0; }
.sb-t1 { font-weight: 700; color: var(--sb-text-active); font-size: 1rem; line-height: 1.2; }
.sb-t2 { font-size: .76rem; color: var(--sb-text); opacity: .7; }
.sb-nav { flex: 1; overflow-y: auto; padding: .7rem .65rem; scrollbar-width: thin; }
.sb-item { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .58rem .8rem; margin-bottom: 2px; border: 0; border-radius: .55rem;
  background: transparent; color: var(--sb-text); opacity: .92; text-decoration: none; font-size: .94rem; text-align: left; line-height: 1.25; }
.sb-item > span { flex: 1; min-width: 0; }
.sb-item:hover { background: rgba(255,255,255,.08); color: var(--sb-text-active); opacity: 1; }
.sb-item.active { background: var(--sb-accent); color: var(--sb-text-active); opacity: 1; font-weight: 600; box-shadow: inset 3px 0 0 rgba(255,255,255,.85); }
.sb-ic { flex-shrink: 0; }
.sb-chev { flex-shrink: 0; width: 15px; height: 15px; opacity: .65; transition: transform .2s; }
.sb-grp.open > .sb-grp-btn .sb-chev { transform: rotate(90deg); }
.sb-grp-btn.sb-cur { color: var(--sb-text-active); opacity: 1; font-weight: 600; }
.sb-sub { display: none; margin: .1rem 0 .45rem 2.3rem; padding-left: .45rem; border-left: 1px solid rgba(255,255,255,.18); }
.sb-grp.open > .sb-sub { display: block; }
.sb-sub a { display: block; padding: .4rem .7rem; border-radius: .4rem; color: var(--sb-text); opacity: .8; text-decoration: none; font-size: .88rem; }
.sb-sub a:hover { opacity: 1; background: rgba(255,255,255,.07); }
.sb-sub a.active { opacity: 1; color: var(--sb-text-active); background: var(--sb-accent); font-weight: 600; }
.sb-badge { display: inline-block; min-width: 1.3rem; padding: .05rem .4rem; border-radius: 999px; background: #dc3545; color: #fff; font-size: .72rem; font-weight: 700; text-align: center; }
.sb-user { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.1rem; border-top: 1px solid rgba(255,255,255,.1); }
.sb-ava { width: 34px; height: 34px; border-radius: 50%; background: var(--sb-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.sb-un { color: var(--sb-text-active); font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-content { margin-left: var(--sb-w); min-height: 100vh; display: flex; flex-direction: column; }
.sb-content > main { flex: 1; }
.tb { position: sticky; top: 0; z-index: 1020; background: #fff; border-bottom: 1px solid #e5e9ec; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.5rem; }
.tb-title { font-size: 1.35rem; font-weight: 600; color: #1d2b33; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-act { display: flex; gap: .55rem; align-items: center; flex-shrink: 0; }
.tb-ic { position: relative; width: 42px; height: 42px; border: 1px solid #dfe5e9; background: #fff; border-radius: .55rem; display: inline-flex; align-items: center; justify-content: center; color: #2d3c44; }
.tb-ic:hover { background: #f3f6f8; }
.tb-dot { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 999px; background: #dc3545; color: #fff; font-size: .68rem; font-style: normal; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tb-pri { height: 42px; border-radius: .55rem; background: var(--sb-accent); color: #fff; padding: 0 1rem; display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none; }
.tb-pri:hover { background: var(--sb-bg); color: #fff; }
.tb-search { width: 320px; }
.tb-noti { min-width: 270px; }
.tb-menu { display: none; }
.sb-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sb { transform: translateX(-100%); transition: transform .25s; box-shadow: 4px 0 20px rgba(0,0,0,.25); }
  body.sb-open .sb { transform: none; }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1025; }
  .sb-content { margin-left: 0; }
  .tb { padding: .6rem 1rem; }
  .tb-menu { display: inline-flex; }
  .tb-pri span { display: none; }
  .tb-pri { padding: 0 .75rem; }
  .tb-title { font-size: 1.1rem; }
}
@media print {
  .sb, .tb, .sb-backdrop { display: none !important; }
  .sb-content { margin-left: 0 !important; }
}
