/* V3.7 — CSS riêng nhóm sv-b: 08-sv-ho-so (.pg-08) & 09-sv-nguyen-vong (.pg-09).
   Mọi selector phải bắt đầu bằng lớp trang (.pg-08 hoặc .pg-09).
   Cỡ chữ tối thiểu 12px theo luật V3.7 điều 0.f. */

/* ==========================================================================
   08: HỒ SƠ NĂNG LỰC SINH VIÊN (.pg-08)
   ========================================================================== */
.pg-08 {
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 56px;
  background: var(--at-canvas, #F2F5FB);
  box-sizing: border-box;
}
.pg-08 .at-page-header {
  margin-bottom: 12px;
}
.pg-08 .at-breadcrumb {
  display: none;
}
.pg-08 .at-page-header h1 {
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  color: var(--at-ink, #172B4D);
  margin: 0 0 4px;
}
.pg-08 .profile-meta {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #5E6C84);
  margin-bottom: 2px;
}
.pg-08 .profile-desc {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #5E6C84);
  margin: 0;
}

/* 2 cột chính: 9 / 3 */
.pg-08 .at-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.pg-08 .profile-left {
  grid-column: span 9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pg-08 .profile-right {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Panel styles */
.pg-08 .at-panel {
  background: var(--at-surface, #FFFFFF);
  border: 1px solid var(--at-line, #DDE4EF);
  border-radius: 6px;
  padding: 10px 12px;
  box-sizing: border-box;
}
.pg-08 .at-panel > .at-panel-header {
  height: 36px;
  min-height: 36px;
  margin: -10px -12px 10px -12px;
  padding: 0 12px;
  background: transparent;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pg-08 .at-panel-header h2,
.pg-08 .at-panel-header .h3 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--at-ink, #172B4D);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-08 .at-panel-header h2::before,
.pg-08 .at-panel-header .h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: #176BFF;
  flex-shrink: 0;
}
.pg-08 .at-panel-header p {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #5E6C84);
  margin: 0;
}

/* Thông tin sinh viên: 3 hàng x 2 cột, ngang, mỗi hàng 32px */
.pg-08 .student-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}
.pg-08 .info-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
}
.pg-08 .info-field label,
.pg-08 .info-field .form-label {
  width: 32%;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  color: var(--at-ink-muted, #5E6C84);
  margin: 0;
  padding-right: 8px;
  box-sizing: border-box;
}
.pg-08 .info-input-wrap,
.pg-08 .info-field > .form-control {
  width: 68%;
  flex: 0 0 68%;
  position: relative;
  box-sizing: border-box;
}
.pg-08 .info-input-wrap .form-control {
  width: 100%;
}
.pg-08 .info-field .form-control {
  box-sizing: border-box;
}
.pg-08 .info-field .form-control[readonly] {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  background-color: var(--at-surface-2, #F1F4F8);
  border: 1px solid var(--at-line, #DDE4EF);
  color: var(--at-ink-muted, #344563);
  border-radius: 4px;
}
.pg-08 .info-field .form-control:not([readonly]) {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  background-color: var(--at-surface, #FFFFFF);
  border: 1px solid #AEBED2;
  color: var(--at-ink, #172B4D);
  border-radius: 4px;
}
.pg-08 .info-field .form-control:not([readonly]):focus {
  border-color: var(--at-brand, #2454B8);
  outline: 2px solid #2454B8;
  outline-offset: 1px;
}
.pg-08 .info-input-wrap .at-error {
  font-size: 12px;
  color: var(--at-danger, #B42332);
  margin-top: 1px;
}

/* Giới thiệu bản thân */
.pg-08 .about-textarea-wrap {
  position: relative;
}
.pg-08 .about-textarea-wrap textarea {
  width: 100%;
  height: 78px;
  min-height: 78px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 18px;
  border: 1px solid #AEBED2;
  border-radius: 4px;
  color: var(--at-ink, #172B4D);
  resize: vertical;
  box-sizing: border-box;
}
.pg-08 .about-textarea-wrap textarea:focus {
  border-color: var(--at-brand, #2454B8);
  outline: 2px solid #2454B8;
  outline-offset: 1px;
}
.pg-08 .about-char-count {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #5E6C84);
  text-align: right;
  margin-top: 4px;
}

/* Kỹ năng chuyên môn */
.pg-08 .skill-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 205px;
  overflow-y: auto;
  padding-right: 2px;
}
.pg-08 .skill-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 36px;
  min-height: 36px;
  gap: 8px;
  padding: 0;
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  box-sizing: border-box;
}
.pg-08 .skill-select {
  flex: 0 0 28%;
  width: 28%;
  min-width: 0;
}
.pg-08 .skill-select .form-select {
  height: 32px;
  font-size: 12px;
  padding: 2px 24px 2px 8px;
  border: 1px solid #AEBED2;
  border-radius: 4px;
  width: 100%;
  background-color: var(--at-surface, #FFFFFF);
  box-sizing: border-box;
}
.pg-08 .skill-select .form-select:focus {
  border-color: var(--at-brand, #2454B8);
  outline: 2px solid #2454B8;
  outline-offset: 1px;
}
.pg-08 .skill-levels {
  flex: 0 0 62%;
  width: 62%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.pg-08 .skill-level-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 20%;
  cursor: pointer;
  margin: 0;
  padding: 0;
  user-select: none;
  min-width: 0;
  box-sizing: border-box;
}
.pg-08 .skill-level-opt input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: #2454B8;
  flex-shrink: 0;
}
.pg-08 .skill-level-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  white-space: nowrap;
}
.pg-08 .skill-level-num {
  font-size: 12px;
  line-height: 14px;
  font-weight: 600;
  color: var(--at-ink, #172B4D);
}
.pg-08 .skill-level-desc {
  font-size: 12px;
  line-height: 16px;
  color: var(--at-ink-muted, #5E6C84);
}
.pg-08 .skill-level-opt:hover .skill-level-num,
.pg-08 .skill-level-opt input[type="radio"]:checked ~ .skill-level-text .skill-level-num {
  color: var(--at-brand, #2454B8);
}
.pg-08 .skill-delete-wrap {
  flex: 0 0 6%;
  width: 6%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.pg-08 .btn-delete-skill {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--at-danger, #E04343);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.pg-08 .btn-delete-skill:hover {
  background: var(--at-danger-soft, #FFF1F2);
}
.pg-08 .skill-empty-hint {
  font-size: 12px;
  color: var(--at-ink-muted, #5E6C84);
  padding: 8px 0;
  margin: 0;
}
.pg-08 .btn-add-skill {
  height: 30px;
  width: 125px;
  min-width: 125px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  padding: 0 8px;
  color: var(--at-brand, #2454B8);
  background: var(--at-surface, #FFFFFF);
  border: 1px dashed var(--at-brand, #2454B8);
  border-radius: 4px;
  cursor: pointer;
  box-sizing: border-box;
}
.pg-08 .btn-add-skill:hover {
  background: var(--at-brand-soft, #F0F4FC);
}
.pg-08 .form-select.is-invalid {
  border-color: var(--at-danger, #B42332) !important;
  background-color: var(--at-warning-soft, #FFF5F5) !important;
}

/* Lĩnh vực quan tâm: 3 cột, gap 6px, mỗi ô 32px */
.pg-08 .interests-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pg-08 .panel-interests .at-secondary {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #5E6C84);
  font-weight: 400;
}
.pg-08 .interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.pg-08 .interest-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--at-surface, #FFFFFF);
  border: 1px solid var(--at-line, #DDE4EF);
  border-radius: 4px;
  padding: 0 10px;
  height: 32px;
  min-height: 32px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--at-ink, #172B4D);
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  transition: all 120ms ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-08 .interest-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.pg-08 .interest-chip input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2454B8;
  cursor: pointer;
  flex-shrink: 0;
}
.pg-08 .interest-chip:hover {
  border-color: var(--at-line-strong, #B7C5D8);
}
.pg-08 .interest-chip.is-selected {
  background: var(--at-brand-soft, #EAF2FF);
  border-color: var(--at-line, #DDE4EF);
  color: var(--at-brand, #2454B8);
}
.pg-08 .interest-chip.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cột phải: Mức độ hoàn thiện hồ sơ */
.pg-08 .completeness-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 2px;
  margin-bottom: 0;
}
.pg-08 .completeness-pct {
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
  color: var(--at-ai, #176B60);
}
.pg-08 .completeness-pct small {
  font-size: 18px;
}
.pg-08 .completeness-status {
  font-size: 12px;
  color: var(--at-ink-muted, #5E6C84);
}
.pg-08 .progress-track {
  height: 8px;
  border-radius: 4px;
  background: var(--at-surface-2, #EEF1F6);
  overflow: hidden;
  margin-top: 8px;
  margin-bottom: 12px;
}
.pg-08 .progress-fill {
  height: 100%;
  background: #176BFF;
  border-radius: 4px;
  width: var(--v, 0%);
}
.pg-08 .checklist-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.pg-08 .checklist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 30px;
  min-height: 30px;
  gap: 8px;
}
.pg-08 .checklist-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink, #172B4D);
  min-width: 0;
  white-space: nowrap;
}
.pg-08 .checklist-left span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.pg-08 .checklist-badge {
  font-size: 12px;
  line-height: 22px;
  font-weight: 600;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.pg-08 .checklist-badge.is-done {
  background: var(--at-success-soft, #E7F5ED);
  color: var(--at-success, #176B50);
}
.pg-08 .checklist-badge.is-todo {
  background: var(--at-surface-2, #EEF1F6);
  color: var(--at-ink-muted, #5E6C84);
}
.pg-08 .completeness-note {
  background: var(--at-brand-soft, #EAF2FF);
  border-radius: 4px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink, #172B4D);
}
.pg-08 .completeness-note .at-icon {
  color: var(--at-brand, #2454B8);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Sticky Save Bar Screen 08 */
.pg-08 .save-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  height: 48px;
  background: var(--at-surface, #FFFFFF);
  border-top: 1px solid var(--at-line, #DDE4EF);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  box-sizing: border-box;
}
.pg-08 .unsaved-alert {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--at-warning, #9A5B15);
}
.pg-08 .unsaved-alert.is-dirty {
  display: flex;
}
.pg-08 .save-bar .btn-save {
  height: 34px;
  width: 112px;
  min-width: 112px;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  background: var(--at-brand, #2454B8);
  color: var(--at-on-brand, #FFFFFF);
  border: none;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-sizing: border-box;
}
.pg-08 .save-bar .btn-save:hover {
  background: var(--at-brand-hover, #1D4496);
}
.pg-08 .save-bar .btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive: dưới 992px (bao gồm tablet 768px và mobile) */
@media (max-width: 991.98px) {
  .pg-08 {
    padding: 12px;
    padding-bottom: 72px;
  }
  .pg-08 .at-grid {
    display: flex;
    flex-direction: column;
  }
  .pg-08 .profile-left {
    display: contents;
  }
  .pg-08 .panel-info {
    order: 1;
  }
  .pg-08 .profile-right {
    order: 2;
  }
  .pg-08 .panel-about {
    order: 3;
  }
  .pg-08 .panel-skills {
    order: 4;
  }
  .pg-08 .panel-interests {
    order: 5;
  }
  .pg-08 .student-info-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .pg-08 .info-field {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    min-height: auto;
  }
  .pg-08 .info-field label,
  .pg-08 .info-field .form-label {
    width: 100%;
    padding-bottom: 2px;
  }
  .pg-08 .info-input-wrap,
  .pg-08 .info-field > .form-control {
    width: 100%;
    flex: 1 1 100%;
  }
  .pg-08 .skill-row {
    flex-wrap: wrap;
    height: auto;
    min-height: auto;
    padding: 8px 0;
  }
  .pg-08 .skill-select {
    flex: 1 1 calc(100% - 40px);
    width: auto;
  }
  .pg-08 .skill-delete-wrap {
    flex: 0 0 36px;
    width: 36px;
  }
  .pg-08 .skill-levels {
    flex: 1 1 100%;
    width: 100%;
    margin-top: 6px;
  }
  .pg-08 .skill-level-opt {
    width: 20%;
  }
  .pg-08 .btn-delete-skill {
    min-width: 36px;
    min-height: 36px;
  }
  .pg-08 .interest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  @media (max-width: 420px) {
    .pg-08 .interest-grid {
      grid-template-columns: 1fr;
    }
  }
  .pg-08 .save-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: calc(56px + env(safe-area-inset-bottom));
    padding: 10px 16px;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  }
  .pg-08 .save-bar .btn-save {
    flex: 0 0 auto;
  }
}

/* Dark mode: .pg-08 */
:root[data-theme="dark"] .pg-08,
[data-bs-theme="dark"] .pg-08 {
  --at-surface: #1B2A45;
  --at-surface-2: #243653;
  --at-line: #344564;
  background: #10192A;
}
:root[data-theme="dark"] .pg-08 .at-panel,
[data-bs-theme="dark"] .pg-08 .at-panel {
  background: #1B2A45;
  border-color: #344564;
}
:root[data-theme="dark"] .pg-08 .at-panel > .at-panel-header,
[data-bs-theme="dark"] .pg-08 .at-panel > .at-panel-header {
  background: transparent;
  border-color: transparent;
}
:root[data-theme="dark"] .pg-08 .at-panel-header h2,
:root[data-theme="dark"] .pg-08 .at-panel-header .h3,
[data-bs-theme="dark"] .pg-08 .at-panel-header h2,
[data-bs-theme="dark"] .pg-08 .at-panel-header .h3 {
  color: #EAF1FF;
}
:root[data-theme="dark"] .pg-08 .info-field .form-control[readonly],
[data-bs-theme="dark"] .pg-08 .info-field .form-control[readonly] {
  background-color: #243653;
  border-color: #344564;
  color: #CAD4E4;
}
:root[data-theme="dark"] .pg-08 .info-field .form-control:not([readonly]),
[data-bs-theme="dark"] .pg-08 .info-field .form-control:not([readonly]) {
  background-color: #1B2A45;
  border-color: #4A5D7C;
  color: #EAF1FF;
}
:root[data-theme="dark"] .pg-08 .about-textarea-wrap textarea,
[data-bs-theme="dark"] .pg-08 .about-textarea-wrap textarea {
  background-color: #1B2A45;
  border-color: #4A5D7C;
  color: #EAF1FF;
}
:root[data-theme="dark"] .pg-08 .skill-select .form-select,
[data-bs-theme="dark"] .pg-08 .skill-select .form-select {
  background-color: #1B2A45;
  border-color: #4A5D7C;
  color: #EAF1FF;
}
:root[data-theme="dark"] .pg-08 .skill-level-num,
[data-bs-theme="dark"] .pg-08 .skill-level-num {
  color: #EAF1FF;
}
:root[data-theme="dark"] .pg-08 .btn-add-skill,
[data-bs-theme="dark"] .pg-08 .btn-add-skill {
  background-color: #1B2A45;
  border-color: #5B8BE0;
  color: #8BB2EF;
}
:root[data-theme="dark"] .pg-08 .interest-chip,
[data-bs-theme="dark"] .pg-08 .interest-chip {
  background: #243653;
  border-color: #344564;
  color: #EAF1FF;
}
:root[data-theme="dark"] .pg-08 .interest-chip.is-selected,
[data-bs-theme="dark"] .pg-08 .interest-chip.is-selected {
  background: #2A4878;
  border-color: #5B8BE0;
  color: #BBD3F8;
}
:root[data-theme="dark"] .pg-08 .progress-track,
[data-bs-theme="dark"] .pg-08 .progress-track {
  background: #243653;
}
:root[data-theme="dark"] .pg-08 .checklist-badge.is-todo,
[data-bs-theme="dark"] .pg-08 .checklist-badge.is-todo {
  background: #243653;
  color: #CAD4E4;
}
:root[data-theme="dark"] .pg-08 .completeness-note,
[data-bs-theme="dark"] .pg-08 .completeness-note {
  background: #243653;
  color: #EAF1FF;
}
:root[data-theme="dark"] .pg-08 .save-bar,
[data-bs-theme="dark"] .pg-08 .save-bar {
  background: #1B2A45;
  border-color: #344564;
}
:root[data-theme="dark"] .pg-08 .unsaved-alert,
[data-bs-theme="dark"] .pg-08 .unsaved-alert {
  color: #FBBF24;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 {
    --at-surface: #1B2A45;
    --at-surface-2: #243653;
    --at-line: #344564;
    background: #10192A;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .at-panel {
    background: #1B2A45;
    border-color: #344564;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .at-panel > .at-panel-header {
    background: transparent;
    border-color: transparent;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .at-panel-header h2,
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .at-panel-header .h3 {
    color: #EAF1FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .info-field .form-control[readonly] {
    background-color: #243653;
    border-color: #344564;
    color: #CAD4E4;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .info-field .form-control:not([readonly]) {
    background-color: #1B2A45;
    border-color: #4A5D7C;
    color: #EAF1FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .about-textarea-wrap textarea {
    background-color: #1B2A45;
    border-color: #4A5D7C;
    color: #EAF1FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .skill-select .form-select {
    background-color: #1B2A45;
    border-color: #4A5D7C;
    color: #EAF1FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .skill-level-num {
    color: #EAF1FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .btn-add-skill {
    background-color: #1B2A45;
    border-color: #5B8BE0;
    color: #8BB2EF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .interest-chip {
    background: #243653;
    border-color: #344564;
    color: #EAF1FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .interest-chip.is-selected {
    background: #2A4878;
    border-color: #5B8BE0;
    color: #BBD3F8;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .progress-track {
    background: #243653;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .checklist-badge.is-todo {
    background: #243653;
    color: #CAD4E4;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .completeness-note {
    background: #243653;
    color: #EAF1FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .save-bar {
    background: #1B2A45;
    border-color: #344564;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-08 .unsaved-alert {
    color: #FBBF24;
  }
}


/* ==========================================================================
   09: NGUYỆN VỌNG ĐĂNG KÝ ĐỀ TÀI (.pg-09)
   ========================================================================== */
.pg-09 .at-period-aside {
  padding-right: 16px;
}
.pg-09 {
  max-width: 1600px;
  margin: 0 auto;
  padding-bottom: 56px;
}
.pg-09 .nv-empty-note {
  font-size: 12px;
  padding: 4px 0;
}
.pg-09 .top5-empty-note {
  font-size: 12px;
  padding: 16px;
}
.pg-09 .at-page-header {
  margin-bottom: 8px;
}
.pg-09 .at-breadcrumb {
  max-height: 20px;
  margin-bottom: 2px;
  font-size: 12px;
}
.pg-09 .at-page-header h1 {
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  margin: 0 0 2px;
}
.pg-09 .pref-meta {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted);
  margin-bottom: 2px;
}
.pg-09 .pref-desc {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted);
  margin: 0;
}

/* Thẻ đợt + trạng thái tích hợp: cao 62–68px, chia 55%/45% */
.pg-09 .period-status-card {
  display: grid;
  grid-template-columns: 55% 45%;
  background: var(--at-surface, #FFFFFF);
  border: 1px solid var(--at-line, #DDE4EF);
  border-radius: 6px;
  min-height: 62px;
  height: 64px;
  margin-bottom: 10px;
  overflow: hidden;
  align-items: center;
}
.pg-09 .period-left {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-right: 1px solid var(--at-line, #DDE4EF);
  height: 100%;
}
.pg-09 .period-tile {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--at-brand-soft, #EAF1FF);
  color: var(--at-brand, #2454B8);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pg-09 .period-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pg-09 .period-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.pg-09 .period-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--at-ink);
}
.pg-09 .period-time {
  font-size: 12px;
  line-height: 16px;
  color: var(--at-ink-muted);
}

.pg-09 .period-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  gap: 10px;
  background: var(--at-canvas, #FAFCFF);
  height: 100%;
}
.pg-09 .period-right.is-submitted {
  background: var(--at-surface-2, #F3FAF6);
}
.pg-09 .period-status-content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pg-09 .period-status-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.pg-09 .period-status-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.pg-09 .period-status-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--at-ink);
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-09 .period-status-desc {
  font-size: 12px;
  line-height: 15px;
  color: var(--at-ink-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-09 .btn-withdraw {
  height: 30px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Hai cột chính: 8 / 4 */
.pg-09 .at-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.pg-09 .pref-left {
  grid-column: span 8;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pg-09 .pref-right {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* NV Panel: mỗi khối cao 145–155px, header 32px, padding 8-10px */
.pg-09 .nv-panel {
  background: var(--at-surface, #FFFFFF);
  border: 1px solid var(--at-line, #DDE4EF);
  border-radius: 6px;
  overflow: hidden;
}
.pg-09 .nv-header {
  min-height: 32px;
  height: 32px;
  padding: 4px 10px;
  background: var(--at-brand-soft, #EAF4FF);
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pg-09 .nv-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-09 .nv-badge-num {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #176BFF;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pg-09 .nv-header-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--at-ink);
  margin: 0;
}
.pg-09 .nv-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-09 .nv-status-badge {
  font-size: 12px;
  font-weight: 600;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pg-09 .nv-status-saved {
  background: var(--at-success-soft, #E7F5ED);
  color: var(--at-success, #176B50);
}
.pg-09 .nv-status-pending {
  background: var(--at-warning-soft, #FFF4E5);
  color: var(--at-warning, #925A31);
}
.pg-09 .nv-status-rejected {
  background: var(--at-danger-soft, #FFF1F2);
  color: var(--at-danger, #B42332);
}
.pg-09 .nv-status-accepted {
  background: var(--at-success-soft, #E7F5ED);
  color: var(--at-success, #176B50);
}
.pg-09 .nv-status-draft {
  background: var(--at-surface-2, #EEF1F6);
  color: var(--at-ink-muted);
}
.pg-09 .btn-clear-nv {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--at-danger, #B42332);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.pg-09 .btn-clear-nv:hover {
  background: var(--at-danger-soft, #FFF1F2);
}

/* Panel Body */
.pg-09 .nv-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

/* 2 cột thông tin chi tiết: 58% / 42% */
.pg-09 .nv-content-grid {
  display: grid;
  grid-template-columns: 58% 42%;
  gap: 10px;
  align-items: start;
}
.pg-09 .nv-content-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pg-09 .nv-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  margin-bottom: 2px;
}
.pg-09 .nv-select-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--at-ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
}
.pg-09 .nv-select-wrap {
  flex-grow: 1;
  min-width: 0;
}
.pg-09 .nv-select-wrap .form-select {
  height: 28px;
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid var(--at-line-strong, #B7C5D8);
  border-radius: 4px;
  max-width: 100%;
}

/* Dải thông tin đề tài */
.pg-09 .topic-strip {
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid var(--at-line, #DDE4EF);
  background: var(--at-surface-2, #F8FBFF);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.pg-09 .topic-strip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pg-09 .topic-strip-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--at-ink);
  line-height: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pg-09 .topic-strip-lecturer {
  font-size: 12px;
  color: var(--at-ink-muted);
  line-height: 15px;
}
.pg-09 .topic-strip-score {
  width: 95px;
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.pg-09 .score-number-wrap {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.pg-09 .score-number {
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  color: var(--at-ai, #176B60);
  font-variant-numeric: tabular-nums;
}
.pg-09 .score-unit {
  font-size: 12px;
  color: var(--at-ink-muted);
}
.pg-09 .score-type-label {
  font-size: 12px;
  line-height: 14px;
  color: var(--at-ink-muted);
}

/* AI Note & Giảng viên / Từ chối compact */
.pg-09 .ai-reason-note {
  font-size: 12px;
  line-height: 16px;
  background: var(--at-brand-soft, #F0F5FC);
  padding: 4px 6px;
  border-radius: 3px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--at-ink);
  margin-top: 2px;
}
.pg-09 .ai-reason-note .at-icon {
  color: var(--at-brand, #2454B8);
  flex-shrink: 0;
  margin-top: 1px;
}
.pg-09 .ai-reason-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pg-09 .nv-sub-note {
  font-size: 12px;
  line-height: 16px;
  padding: 4px 6px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.pg-09 .nv-sub-note span {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pg-09 .nv-lecturer-note {
  background: var(--at-surface-2, #F1F4F9);
  color: var(--at-ink);
}
.pg-09 .nv-reject-note {
  background: var(--at-danger-soft, #FFF1F2);
  color: var(--at-danger, #B42332);
}

/* Cột phải: Kiểm tra điều kiện (42%) */
.pg-09 .nv-content-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--at-line, #DDE4EF);
  padding-left: 10px;
  padding-right: 12px;
  min-width: 0;
}
.pg-09 .eligibility-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--at-ink);
  margin-bottom: 2px;
  height: 20px;
  display: flex;
  align-items: center;
}
.pg-09 .eligibility-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pg-09 .eligibility-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 22px;
  font-size: 12px;
  line-height: 16px;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
.pg-09 .eligibility-left {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}
.pg-09 .eligibility-left .at-icon {
  margin-top: 1px;
}
.pg-09 .eligibility-label {
  color: var(--at-ink-muted);
  font-size: 12px;
  line-height: 16px;
  min-width: 0;
  flex: 1 1 auto;
  word-break: break-word;
}
.pg-09 .eligibility-value {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.pg-09 .eligibility-value.is-ok {
  color: var(--at-success, #176B50);
}
.pg-09 .eligibility-value.is-warn {
  color: var(--at-warning, #925A31);
}
.pg-09 .eligibility-value.is-fail {
  color: var(--at-danger, #B42332);
}

/* Panel Gợi ý AI (Top 5): mỗi hàng 48–52px, header 32px */
.pg-09 .top5-panel {
  background: var(--at-surface, #FFFFFF);
  border: 1px solid var(--at-line, #DDE4EF);
  border-radius: 6px;
  overflow: hidden;
}
.pg-09 .top5-header {
  min-height: 32px;
  height: 32px;
  padding: 4px 12px;
  background: var(--at-brand-soft, #EAF4FF);
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pg-09 .top5-header h2,
.pg-09 .top5-header .h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-09 .top5-header h2::before,
.pg-09 .top5-header .h3::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: #176BFF;
}
.pg-09 .btn-more-topics {
  font-size: 12px;
  font-weight: 600;
  color: var(--at-brand, #2454B8);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
}
.pg-09 .btn-more-topics:hover {
  text-decoration: underline;
}

.pg-09 .top5-list {
  display: flex;
  flex-direction: column;
}
.pg-09 .top5-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  min-height: 48px;
  height: 50px;
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  cursor: pointer;
  transition: background-color 120ms ease;
}
.pg-09 .top5-item:last-child {
  border-bottom: none;
}
.pg-09 .top5-item:hover {
  background-color: var(--at-surface-2, #F8FBFF);
}
.pg-09 .top5-rank {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--at-surface-2, #EEF1F6);
  font-size: 12px;
  font-weight: 700;
  color: var(--at-ink);
  display: grid;
  place-items: center;
}
.pg-09 .top5-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.pg-09 .top5-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--at-ink);
  line-height: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pg-09 .top5-lecturer {
  font-size: 12px;
  color: var(--at-ink-muted);
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-09 .top5-chips {
  display: none;
}
.pg-09 .top5-score {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}
.pg-09 .top5-score-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--at-ai, #176B60);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.pg-09 .top5-score-sub {
  font-size: 12px;
  color: var(--at-ink-muted);
}

/* Panel Lưu ý khi nộp: header 32px */
.pg-09 .rules-panel {
  background: var(--at-surface, #FFFFFF);
  border: 1px solid var(--at-line, #DDE4EF);
  border-radius: 6px;
  overflow: hidden;
}
.pg-09 .rules-header {
  min-height: 32px;
  height: 32px;
  padding: 4px 12px;
  background: var(--at-brand-soft, #EAF4FF);
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-09 .rules-header h2,
.pg-09 .rules-header .h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-09 .rules-header h2::before,
.pg-09 .rules-header .h3::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: #176BFF;
}
.pg-09 .rules-body {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pg-09 .rule-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  line-height: 16px;
  color: var(--at-ink);
}
.pg-09 .rule-num {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--at-brand-soft, #EAF1FF);
  color: var(--at-brand, #2454B8);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 0;
}

/* Sticky Save Bar (Cột trái): cao 48px, padding 7px 12px */
.pg-09 .pref-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  height: 48px;
  background: var(--at-surface, #FFFFFF);
  border-top: 1px solid var(--at-line, #DDE4EF);
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0 0 6px 6px;
  margin-top: 4px;
}
.pg-09 .pref-save-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--at-ink-muted);
}
.pg-09 .pref-save-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-09 .btn-draft {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pg-09 .btn-submit-nv {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--at-brand, #2454B8);
  color: var(--at-on-brand, #FFFFFF);
  border: none;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.pg-09 .btn-submit-nv:hover {
  background: var(--at-brand-hover, #1D4496);
}

/* Mobile: dưới 768px */
@media (max-width: 767.98px) {
  .pg-09 .period-status-card {
    grid-template-columns: 1fr;
    height: auto;
  }
  .pg-09 .period-left {
    border-right: none;
    border-bottom: 1px solid var(--at-line, #DDE4EF);
    height: auto;
    padding: 10px 12px;
  }
  .pg-09 .period-right {
    height: auto;
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .pg-09 .period-status-title,
  .pg-09 .period-status-desc {
    white-space: normal;
  }
  .pg-09 .at-grid {
    display: flex;
    flex-direction: column;
  }
  .pg-09 .pref-left {
    order: 1;
    width: 100%;
  }
  .pg-09 .pref-right {
    order: 2;
    width: 100%;
  }
  .pg-09 .nv-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pg-09 .nv-content-grid > * {
    min-width: 0;
  }
  .pg-09 .nv-content-right {
    border-left: none;
    border-top: 1px solid var(--at-line, #DDE4EF);
    padding-left: 0;
    padding-right: 0;
    padding-top: 6px;
  }
  .pg-09 .pref-save-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: calc(72px + env(safe-area-inset-bottom));
    padding: 12px 16px;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 0;
  }
  .pg-09 .pref-save-right {
    flex: 1 1 auto;
  }
  .pg-09 .btn-draft,
  .pg-09 .btn-submit-nv {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Dark mode: .pg-09 */
:root[data-theme="dark"] .pg-09,
[data-bs-theme="dark"] .pg-09 {
  --at-surface: #1B2A45;
  --at-surface-2: #243653;
  --at-line: #344564;
}
:root[data-theme="dark"] .pg-09 .period-status-card,
[data-bs-theme="dark"] .pg-09 .period-status-card {
  background: #1B2A45;
  border-color: #344564;
}
:root[data-theme="dark"] .pg-09 .period-left,
[data-bs-theme="dark"] .pg-09 .period-left {
  border-color: #344564;
}
:root[data-theme="dark"] .pg-09 .period-right,
[data-bs-theme="dark"] .pg-09 .period-right {
  background: #20314F;
}
:root[data-theme="dark"] .pg-09 .period-right.is-submitted,
[data-bs-theme="dark"] .pg-09 .period-right.is-submitted {
  background: #1C3830;
}
:root[data-theme="dark"] .pg-09 .period-tile,
[data-bs-theme="dark"] .pg-09 .period-tile {
  background: #243B61;
  color: #B5D4FF;
}
:root[data-theme="dark"] .pg-09 .nv-panel,
[data-bs-theme="dark"] .pg-09 .nv-panel,
:root[data-theme="dark"] .pg-09 .top5-panel,
[data-bs-theme="dark"] .pg-09 .top5-panel,
:root[data-theme="dark"] .pg-09 .rules-panel,
[data-bs-theme="dark"] .pg-09 .rules-panel {
  background: #1B2A45;
  border-color: #344564;
}
:root[data-theme="dark"] .pg-09 .nv-header,
[data-bs-theme="dark"] .pg-09 .nv-header,
:root[data-theme="dark"] .pg-09 .top5-header,
[data-bs-theme="dark"] .pg-09 .top5-header,
:root[data-theme="dark"] .pg-09 .rules-header,
[data-bs-theme="dark"] .pg-09 .rules-header {
  background: #243653;
  border-color: #344564;
}
:root[data-theme="dark"] .pg-09 .nv-select-wrap .form-select,
[data-bs-theme="dark"] .pg-09 .nv-select-wrap .form-select {
  background-color: #1B2A45;
  border-color: #4A5D7C;
  color: #EAF1FF;
}
:root[data-theme="dark"] .pg-09 .topic-strip,
[data-bs-theme="dark"] .pg-09 .topic-strip {
  background: #20314F;
  border-color: #344564;
}
:root[data-theme="dark"] .pg-09 .ai-reason-note,
[data-bs-theme="dark"] .pg-09 .ai-reason-note {
  background: #243653;
  color: #CAD4E4;
}
:root[data-theme="dark"] .pg-09 .nv-sub-note,
[data-bs-theme="dark"] .pg-09 .nv-sub-note {
  background: #243653;
  color: #CAD4E4;
}
:root[data-theme="dark"] .pg-09 .nv-content-right,
[data-bs-theme="dark"] .pg-09 .nv-content-right {
  border-color: #344564;
}
:root[data-theme="dark"] .pg-09 .top5-item,
[data-bs-theme="dark"] .pg-09 .top5-item {
  border-color: #344564;
}
:root[data-theme="dark"] .pg-09 .top5-item:hover,
[data-bs-theme="dark"] .pg-09 .top5-item:hover {
  background: #243653;
}
:root[data-theme="dark"] .pg-09 .top5-rank,
[data-bs-theme="dark"] .pg-09 .top5-rank {
  background: #243653;
  color: #CAD4E4;
}
:root[data-theme="dark"] .pg-09 .top5-chip,
[data-bs-theme="dark"] .pg-09 .top5-chip {
  background: #243B61;
  color: #B5D4FF;
}
:root[data-theme="dark"] .pg-09 .rule-num,
[data-bs-theme="dark"] .pg-09 .rule-num {
  background: #243B61;
  color: #B5D4FF;
}
:root[data-theme="dark"] .pg-09 .pref-save-bar,
[data-bs-theme="dark"] .pg-09 .pref-save-bar {
  background: #1B2A45;
  border-color: #344564;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 {
    --at-surface: #1B2A45;
    --at-surface-2: #243653;
    --at-line: #344564;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .period-status-card {
    background: #1B2A45;
    border-color: #344564;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .period-left {
    border-color: #344564;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .period-right {
    background: #20314F;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .period-right.is-submitted {
    background: #1C3830;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .period-tile {
    background: #243B61;
    color: #B5D4FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .nv-panel,
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .top5-panel,
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .rules-panel {
    background: #1B2A45;
    border-color: #344564;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .nv-header,
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .top5-header,
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .rules-header {
    background: #243653;
    border-color: #344564;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .nv-select-wrap .form-select {
    background-color: #1B2A45;
    border-color: #4A5D7C;
    color: #EAF1FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .topic-strip {
    background: #20314F;
    border-color: #344564;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .ai-reason-note {
    background: #243653;
    color: #CAD4E4;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .nv-sub-note {
    background: #243653;
    color: #CAD4E4;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .nv-content-right {
    border-color: #344564;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .top5-item {
    border-color: #344564;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .top5-item:hover {
    background: #243653;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .top5-rank {
    background: #243653;
    color: #CAD4E4;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .top5-chip {
    background: #243B61;
    color: #B5D4FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .rule-num {
    background: #243B61;
    color: #B5D4FF;
  }
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) .pg-09 .pref-save-bar {
    background: #1B2A45;
    border-color: #344564;
  }
}

/* Claude: điện thoại — thanh Lưu/Nộp thay thanh điều hướng đáy (không chồng 2 thanh) */
@media (max-width: 767.98px) { body:has(.pg-09 .pref-save-bar) .at-bottomnav { display: none; } }
