/* ===== CƠ BẢN ===== */
body {
  font-family: system-ui, Arial, sans-serif;
  margin: 0;
  background: #f7f9fc;
  color: #1f2937;
}

/* ===== HEADER PORTAL ===== */
.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #0f7b48;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Nút menu (hamburger) – kiểu “viên thuốc” chuyên nghiệp hơn */
/* Nút menu – hình tròn, 3 gạch xếp dọc */
.portal-nav-toggle {
  display: none; /* sẽ bật lại trong @media mobile */
  width: 36px;
  height: 36px;
  padding: 0;
  margin-right: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: transparent;
  cursor: pointer;

  /* Khi ở mobile (display:flex), 3 gạch sẽ xếp dọc & cách đều */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px; /* khoảng cách giữa các gạch */
}

/* Hover nhẹ */
.portal-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* 3 gạch trắng, căn giữa theo chiều ngang */
.portal-nav-toggle .bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

/* Logo / brand */
.brand-box {
  display: flex;
  align-items: center;
}
.brand-box .brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.brand-box .brand-logo {
  height: 34px;
  display: block;
}
.brand-box .brand-fallback {
  margin-right: 6px;
}

/* Ô search giữa */
.search-wrap {
  flex: 1;
  max-width: 680px;
  margin: 0 24px;
}
.searchbar {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  padding: 3px 6px;
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 14px;
}
.search-input::placeholder {
  color: #9ca3af;
}
.search-btn {
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0f7b48;
}
.search-btn svg {
  width: 18px;
  height: 18px;
}

/* Khu vực bên phải */
.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Nút ghost (Đăng nhập / Đăng xuất) */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
}

/* Khối user + dropdown */
.portal-header-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Icon user (nút tròn) */
.portal-user-btn {
  border: none;
  background: rgba(255, 255, 255, 0.18);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
}
.portal-user-icon {
  font-size: 18px;
}

/* Dropdown user */
.portal-user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 210px;
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
  padding: 8px 0;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: all 0.18s ease;
  z-index: 1100;
}
.portal-user-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.portal-user-menu .portal-user-name {
  font-weight: 600;
  padding: 8px 16px;
  border-bottom: 1px solid #e5e7eb;
}
.portal-user-menu a {
  display: block;
  padding: 8px 16px;
  color: #111827;
  text-decoration: none;
}
.portal-user-menu a:hover {
  background: #f3f4f6;
}

/* ===== NỘI DUNG CHÍNH ===== */
.portal-main {
  padding: 16px;
}

/* ===== BẢNG, NÚT, ALERT… GIỮ NGUYÊN ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.table th,
.table td {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
}
.btn {
  display: inline-block;
  padding: 8px 12px;
  background: #198754;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}
.alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin: 10px 0;
}
.alert--error {
  background: #fde7e9;
  color: #b02a37;
  border: 1px solid #f2c7cd;
}
.link {
  background: none;
  border: none;
  color: #0b63ce;
  cursor: pointer;
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 991.98px) {
  .portal-header {
    justify-content: space-between;
  }

  /* hiện nút toggle sidebar */
  .portal-nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  /* logo nằm giữa */
  .portal-header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .portal-header-logo .brand-logo {
    height: 30px;
  }

  /* ẩn ô search dài trên mobile */
  .search-wrap {
    display: none;
  }

  /* ẩn phần text "Xin chào, ..." và nút Đăng xuất trên mobile */
  .portal-header-user-desktop {
    display: none;
  }

  .top-right {
    margin-left: auto;
  }
}
/* Sidebar Portal: cho phép xếp menu + box hỗ trợ theo cột */
.portal-sidebar {
  display: flex;
  flex-direction: column;
}

.portal-sidebar .side-menu {
  flex: 1 1 auto;
}

/* ===== HỖ TRỢ KHÁCH HÀNG – PORTAL SIDEBAR ===== */
.portal-support-box {
  margin: 12px 10px 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #e9f7ef;
  border: 1px solid #c3e6cb;
  font-size: 13px;
}

.portal-support-box .support-title {
  font-weight: 600;
  margin-bottom: 6px;
  color: #155724;
}

.portal-support-box .support-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  text-decoration: none;
  color: #212529;
}
/* SVG điện thoại dùng màu currentColor (trắng) */
/* SVG điện thoại dùng màu currentColor (trắng) – to hơn chút */
.portal-support-box .support-item .icon.phone .phone-svg {
  width: 22px; /* tăng từ 18 → 22 */
  height: 22px;
  fill: currentColor; /* vẫn lấy màu trắng từ .icon.phone */
  display: block; /* tránh bị lệch/bị “ăn” mất góc */
}

.portal-support-box .support-item .icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 16px;
}
/* Icon điện thoại: vòng tròn xanh, icon trắng */
.portal-support-box .support-item .icon.phone {
  background: #0068ff; /* xanh cùng màu header */
  color: #ffffff;
}

/* Icon Zalo: vòng tròn xanh dương, chữ Zalo trắng */
.portal-support-box .support-item .icon.zalo {
  background: #0068ff;
  color: #ffffff;
  font-weight: 700;
  font-size: 11px; /* nhỏ lại để vừa vòng tròn */
}
/* Chữ bên cạnh icon: đậm hơn */
.portal-support-box .support-item .text {
  font-weight: 600;
}

/* Zalo màu xanh – hình tròn to, chữ Zalo nằm trọn bên trong */
.portal-support-box .support-item .icon.zalo {
  background: #0068ff;
  color: #fff;
  font-weight: 700;

  width: 32px; /* to hơn 22px */
  height: 32px;
  border-radius: 50%; /* giữ hình tròn */

  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px; /* chữ nhỏ lại cho vừa hình tròn */
}

.portal-support-box .support-item:hover {
  color: #0c7a43;
}
