/* ===== Header Logged-in User Menu ===== */
.hp-header-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-darker);
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.hp-header-btn:hover {
  background: var(--color-primary);
  color: #fff;
}
.hp-header-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #ef4444;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-surface);
  line-height: 1;
}

.hp-user-menu {
  position: relative;
}
.hp-user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.hp-user-trigger:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.hp-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.hp-user-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hp-user-chevron {
  font-size: 10px;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
}
.hp-user-menu.open .hp-user-chevron {
  transform: rotate(180deg);
}

.hp-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
}
.hp-user-menu.open .hp-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hp-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.hp-dropdown-header img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.hp-dropdown-header strong {
  display: block;
  font-size: 14px;
  color: var(--color-text-primary);
}
.hp-dropdown-header span {
  font-size: 12px;
  color: var(--color-text-muted);
}
.hp-dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}
.hp-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: background var(--transition-fast);
}
.hp-dropdown-item:hover {
  background: var(--color-bg-darker);
}
.hp-dropdown-item i {
  width: 18px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}
.hp-dropdown-logout {
  color: #ef4444;
}
.hp-dropdown-logout i {
  color: #ef4444;
}
/* ===== Homepage Footer ===== */
.hp-footer {
  background: var(--color-text-primary);
  color: #cbd5e1;
  padding: var(--space-2xl) 0 var(--space-lg);
}

.hp-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.hp-footer-brand h3 {
  color: white;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
}

.hp-footer-brand p {
  font-size: var(--font-size-sm);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.hp-footer-social {
  display: flex;
  gap: var(--space-sm);
}

.hp-footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  transition: all var(--transition-fast);
}

.hp-footer-social a:hover {
  background: var(--color-primary);
  color: white;
}

.hp-footer h4 {
  color: white;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-md);
}

.hp-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hp-footer-links a {
  font-size: var(--font-size-sm);
  color: #94a3b8;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.hp-footer-links a:hover {
  color: var(--color-primary);
}

/* Định nghĩa biến màu dựa trên yêu cầu của bạn */
.dn-body {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #4ade80;
    --secondary: #10b981;
    --bg-light: #f0fdf4; /* Xanh lá cực nhẹ cho dòng xen kẽ */
    
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

/* Style bảng dựa trên cấu trúc thẻ nguyên bản */
.dn-body table {
    width: 100% !important;
    height: auto !important; 
    border-collapse: collapse;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    margin: 1rem 0;
    min-width: 800px; /* Tránh vỡ chữ trên màn hình nhỏ */
}

/* Header bảng sử dụng màu Primary */
.dn-body table thead tr {
    background-color: var(--primary) !important;
    height: auto !important;
}

.dn-body table th {
    color: #ffffff !important;
    padding: 14px 15px !important;
    height: auto !important;
    font-weight: 600;
    text-align: left;
    border: 1px solid var(--primary-dark);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.02em;
}

/* Nội dung các ô */
.dn-body table td {
    padding: 12px 15px !important;
    height: auto !important;
    border: 1px solid #e5e7eb;
    line-height: 1.6;
    color: #374151;
    vertical-align: top;
}

/* Cột Tiêu chí - Sử dụng màu Secondary nhẹ */
.dn-body table td:first-child {
    background-color: var(--bg-light);
    font-weight: 700;
    color: var(--primary-dark);
    width: 110px !important;
    border-right: 2px solid var(--primary-light);
}

/* Dòng xen kẽ để dễ đọc */
.dn-body table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* Hiệu ứng Hover chuyên nghiệp */
.dn-body table tbody tr:hover {
    background-color: #f3f4f6;
    transition: background-color 0.2s ease;
}

/* Làm nổi bật các con số hoặc văn bản quan trọng trong bảng */
.dn-body table strong {
    color: var(--primary-dark);
}

/* Tùy chỉnh thanh cuộn ngang cho mượt hơn */
.dn-body::-webkit-scrollbar {
    height: 6px;
}
.dn-body::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}