/* ----------------------- Trang Dashboard (Trang chủ) ----------------------- */
.hm-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.hm-muted {
  font-size: 13px;
  color: #888;
}

.hm-muted-light {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

/* ----------------------- Lời chào + gói ----------------------- */
.hm-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4a5cf0, #7b5cf0);
  color: #fff;
}

.hm-hello {
  margin: 0 0 4px;
  font-size: 22px;
}

.hm-sub {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.hm-plan {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.hm-plan strong {
  font-size: 22px;
}

.hm-plan-btn {
  margin-top: 8px;
  padding: 7px 16px;
  border-radius: 6px;
  background-color: #fff;
  color: #4a5cf0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.hm-plan-btn:hover {
  background-color: #eef0fe;
}

/* ----------------------- Số liệu ----------------------- */
.hm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.hm-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}

.hm-stat:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.hm-stat-icon {
  font-size: 22px;
}

.hm-stat strong {
  font-size: 24px;
  color: #222;
}

.hm-stat small.warn {
  color: #b26a00;
}

.hm-stat small.live {
  color: #d32f2f;
  font-weight: 600;
}

.hm-bar {
  height: 6px;
  margin-top: 4px;
  border-radius: 3px;
  background-color: #eceef8;
  overflow: hidden;
}

.hm-bar > div {
  width: 0;
  height: 100%;
  border-radius: 3px;
  background-color: #4a5cf0;
  transition: width 0.3s;
}

.hm-bar > div.full {
  background-color: #d32f2f;
}

/* ----------------------- Hai cột nội dung ----------------------- */
.hm-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.hm-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hm-card {
  padding: 20px 24px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.hm-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #222;
}

.hm-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.hm-card-head h3 {
  margin: 0;
}

.hm-link {
  color: #4a5cf0;
  font-size: 13px;
  text-decoration: none;
}

.hm-link:hover {
  text-decoration: underline;
}

.hm-empty {
  margin: 8px 0;
  font-size: 14px;
  color: #999;
}

/* Các bước bắt đầu */
.hm-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hm-steps a {
  display: flex;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.hm-steps a:hover {
  background-color: #f7f8ff;
}

.hm-steps strong {
  display: block;
  font-size: 14px;
  color: #222;
}

.hm-steps small {
  font-size: 13px;
  color: #888;
}

.hm-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #c5cae9;
  border-radius: 50%;
  box-sizing: border-box;
}

.hm-steps li.done .hm-check {
  border-color: #2e7d32;
  background: #2e7d32 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='white' stroke-width='2' fill='none'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.hm-steps li.done strong {
  color: #888;
  text-decoration: line-through;
}

/* Livestream gần đây */
.hm-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hm-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f2;
  font-size: 14px;
}

.hm-list li:last-child {
  border-bottom: none;
}

.hm-list-title {
  min-width: 0;
}

.hm-list-title strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #222;
}

.hm-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.hm-badge.ok   { background-color: #e8f5e9; color: #2e7d32; }
.hm-badge.none { background-color: #f5f5f5; color: #777; }
.hm-badge.live { background-color: #fdecea; color: #d32f2f; }
.hm-badge.wait { background-color: #fff4e5; color: #b26a00; }
a.hm-list-title { color: inherit; text-decoration: none; }
a.hm-list-title:hover strong { color: #4a5cf0; }

/* Thao tác nhanh */
.hm-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hm-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid #eceef8;
  border-radius: 8px;
  color: #333;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}

.hm-action span {
  font-size: 22px;
}

.hm-action:hover {
  border-color: #c5cae9;
  background-color: #f7f8ff;
}

/* Video mới */
.hm-videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hm-video {
  color: inherit;
  text-decoration: none;
}

.hm-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background-color: #1e1e1e;
  overflow: hidden;
}

.hm-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-video-thumb span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
}

.hm-video p {
  margin: 6px 0 0;
  overflow: hidden;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #333;
}

/* ----------------------- Màn hình nhỏ ----------------------- */
@media (max-width: 1100px) {
  .hm-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hm-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hm-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hm-plan {
    align-items: flex-start;
    text-align: left;
  }

  .hm-stats {
    grid-template-columns: 1fr;
  }

  .hm-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
