.home-dashboard {
  max-width: 1480px;
  margin: 0 auto;
}
.welcome-strip {
  display: flex;
  min-height: 142px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 28px;
  border: 1px solid #dce7ec;
  border-left: 5px solid var(--stu-red);
  background: linear-gradient(105deg, #fff 0 64%, #f7e8de 100%);
}
.welcome-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.welcome-brand img {
  width: 100px;
  height: 70px;
  object-fit: contain;
}
.welcome-brand h1 {
  margin: 2px 0 7px;
  color: var(--stu-ink);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 700;
}
.eyebrow {
  margin: 0;
  color: var(--stu-blue);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.welcome-copy {
  margin: 0;
  color: var(--stu-muted);
  font-size: 0.88rem;
}
.welcome-strip .btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  background: var(--stu-blue);
  padding: 10px 14px;
  font-size: 0.82rem;
}
.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px 0 30px;
  border: 1px solid var(--stu-line);
  background: #fff;
}
.metric {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 13px;
  padding: 15px 20px;
}
.metric + .metric {
  border-left: 1px solid var(--stu-line);
}
.metric-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 10px;
  font-size: 1.1rem;
}
.metric-blue {
  background: #e4f0f7;
  color: var(--stu-blue);
}
.metric-coral {
  background: #fbe9e6;
  color: var(--stu-red);
}
.metric-green {
  background: #e4f3ed;
  color: var(--stu-green);
}
.metric div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.metric strong {
  color: var(--stu-ink);
  font-size: 1rem;
}
.metric span:last-child {
  color: var(--stu-muted);
  font-size: 0.74rem;
}
.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 34px;
}
.dashboard-section {
  min-width: 0;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}
.section-heading h2 {
  margin: 3px 0 0;
  color: var(--stu-ink);
  font-size: 1.12rem;
  font-weight: 700;
}
.section-heading > a {
  color: var(--stu-blue);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.course-list,
.exam-list {
  border-top: 1px solid var(--stu-line);
}
.course-row,
.exam-row {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--stu-line);
  color: inherit;
  text-decoration: none;
  transition: background 0.16s ease;
}
.course-row {
  padding: 11px 8px;
}
.course-row:hover,
.exam-row:hover {
  background: rgba(255, 255, 255, 0.75);
}
.course-code {
  display: grid;
  min-width: 74px;
  min-height: 31px;
  place-items: center;
  border-radius: 5px;
  background: #e9f2f7;
  color: var(--stu-blue-deep);
  font-size: 0.68rem;
  font-weight: 700;
}
.course-name {
  flex: 1;
  font-size: 0.84rem;
  font-weight: 600;
}
.course-row > i {
  color: #8b9aa3;
  font-size: 0.8rem;
}
.exam-row {
  padding: 10px 7px;
}
.exam-date {
  display: flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #fbebe8;
  color: var(--stu-red);
}
.exam-date strong {
  font-size: 1.05rem;
  line-height: 1.1;
}
.exam-date small {
  font-size: 0.58rem;
}
.exam-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}
.exam-info strong {
  overflow: hidden;
  color: var(--stu-ink);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exam-info span {
  color: var(--stu-muted);
  font-size: 0.7rem;
}
.exam-action {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid var(--stu-line);
  border-radius: 6px;
  color: var(--stu-blue);
  text-decoration: none;
}
.exam-action:hover {
  border-color: var(--stu-blue);
  background: var(--stu-blue);
  color: #fff;
}
.exam-action-disabled {
  pointer-events: none;
  opacity: 0.58;
}
.exam-upcoming {
  color: #9a6a30;
  font-size: 0.68rem;
  white-space: nowrap;
}
.empty-state {
  margin: 0;
  padding: 19px 8px;
  color: var(--stu-muted);
  font-size: 0.82rem;
}
.public-note {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 28px;
  border-top: 1px solid var(--stu-line);
  border-bottom: 1px solid var(--stu-line);
  padding: 24px 8px;
}
.public-note > i {
  color: var(--stu-orange);
  font-size: 1.9rem;
}
.public-note h2 {
  margin: 0 0 5px;
  font-size: 1.1rem;
}
.public-note p {
  margin: 0;
  color: var(--stu-muted);
  font-size: 0.84rem;
}

@media (max-width: 900px) {
  .dashboard-columns {
    grid-template-columns: 1fr;
    gap: 27px;
  }
}
@media (max-width: 620px) {
  .welcome-strip {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }
  .welcome-brand {
    gap: 12px;
  }
  .welcome-brand img {
    width: 65px;
    height: 56px;
  }
  .welcome-strip .btn {
    align-self: stretch;
    text-align: center;
  }
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }
  .metric {
    min-height: 68px;
    padding: 11px 15px;
  }
  .metric + .metric {
    border-top: 1px solid var(--stu-line);
    border-left: 0;
  }
}



/*Nút khóa học của tôi*/
/* ===== Nút gradient (Uiverse - dexter-st) =====
   Dán vào CUỐI file static/css/home.css
   Dùng cho: <a class="btn-wrapper"> ở trang chủ (Khóa học của tôi) */

.btn-wrapper {
  --rad: 28px;
  --color-wrapper-border: #fff;
  --color-btn-bg: #f00;
  --color-btn-text: #000;
  --color-btn-text-shadow: #fff;
  --color-btn-inset-shadow: #558;
  --color-layer-a: #fff;
  --color-layer-b: #00f;
  --color-overlay-text: #000;
  --color-overlay-glow: #fff;
  --color-overlay-shadow: #0004;
  --color-overlay-highlight: #fff5;

  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: clip;
  overflow-clip-margin: 4px;

  border: 2px solid var(--color-wrapper-border);
  border-radius: var(--rad);

  font-family: "Be Vietnam Pro", "Inter", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;

  filter: saturate(0.65) brightness(1.8);
}

.gradient-btn {
  position: relative;
  z-index: -1;

  padding: 10px 28px;
  border: none;
  border-radius: var(--rad);

  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0.05rem;
  white-space: nowrap;

  color: var(--color-btn-text);
  background-color: var(--color-btn-bg);
  background-size: 200% 200%;
  box-shadow: inset 0 0 10px 9px var(--color-btn-inset-shadow);
  text-shadow: 0 1px 3px var(--color-btn-text-shadow);

  cursor: pointer;
  mix-blend-mode: color-dodge;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.gradient-btn::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--rad);
  background-size: 200% 200%;
  mix-blend-mode: difference;
  z-index: 1;
}

.gradient-layer {
  position: absolute;
  pointer-events: none;
  left: -160px;
  width: 500%;
  aspect-ratio: 1;
  background: radial-gradient(
    ellipse at 65% 180%,
    var(--color-layer-a), var(--color-layer-b),
    var(--color-layer-a), var(--color-layer-b),
    var(--color-layer-a), var(--color-layer-b),
    var(--color-layer-a), var(--color-layer-b),
    var(--color-layer-a), var(--color-layer-b),
    var(--color-layer-a)
  );
  mix-blend-mode: difference;
  animation: gb-rotate 8s linear infinite;
}

.gradient-layer:last-child { mix-blend-mode: color-dodge; }

.text-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 2;

  padding: 10px 28px;
  border-radius: var(--rad);

  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0.05rem;
  white-space: nowrap;

  color: var(--color-overlay-text);
  text-shadow: 0 0 4px var(--color-overlay-glow);
  box-shadow:
    inset 0 -4px 4px 0 var(--color-overlay-shadow),
    inset 0 4px 4px 0 var(--color-overlay-highlight);

  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
  animation: gb-opacityPulse 5s ease infinite;
}

.btn-wrapper:hover .text-overlay { transform: scale(1.1); }
.btn-wrapper:active .text-overlay { transform: scale(0.95); }
.btn-wrapper:hover .gradient-btn,
.btn-wrapper:active .gradient-btn { color: #0000; text-shadow: 0 0 0 #0000; }
.btn-wrapper:focus-visible { outline: 3px solid #38bdf8; outline-offset: 3px; }

.light {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  border-radius: 50px;
  width: 80%;
  height: 1.9rem;
  aspect-ratio: 1;
  background-color: #fff5;
  filter: blur(5px);
  animation: gb-pulse 3s ease-in-out infinite;
}

@keyframes gb-rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes gb-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.1; } }
@keyframes gb-opacityPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

@media (prefers-reduced-motion: reduce) {
  .btn-wrapper *, .btn-wrapper { animation: none !important; transition: none !important; }
}
