
      body {
        font-family: 'Segoe UI', Arial, sans-serif;
        padding: 20px;
        max-width: 1400px;
        margin: 0;
        background-color: #f5f7fa;
      }
      table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
      }
      th, td {
        border: 1px solid #e0e4e8;
        padding: 8px;
        text-align: center;
        vertical-align: middle;
        font-size: 14px;
        transition: background-color 0.3s ease, opacity 0.2s ease-out;
      }
      th {
        background-color: #1a73e8;
        color: #ffffff;
        font-weight: 600;
        white-space: nowrap;
        text-transform: uppercase;
      }
      .checkbox-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Hiển thị dòng chữ khi rê chuột vào wrapper, NHƯNG chỉ khi ô checkbox bị disabled */
.checkbox-wrapper:hover input[type="checkbox"]:disabled ~ .warning-text {
  display: block;
}
      .select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.warning-text {
  display: none; /* Ẩn dòng chữ theo mặc định */
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffe6e6;
  color: #e63946;
  border: 1px solid #e63946;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  z-index: 10;
  margin-top: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Hiển thị dòng chữ khi rê chuột vào wrapper, NHƯNG chỉ khi ô select bị disabled */
.select-wrapper:hover select:disabled + .warning-text {
  display: block;
}
      .disabled-controls {
  opacity: 0.5;
  pointer-events: none; /* Ngăn chặn mọi thao tác click */
  user-select: none;
}
      .title-container {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 10px;
        padding: 12px;
        border-radius: 8px;
        background: linear-gradient(135deg, #e8f0fe 0%, #d0e7ff 100%);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        border: 3px double #1a73e8;
        width: fit-content;
      }
      .title-text {
        display: flex;
        flex-direction: column;
        align-items: center;
      }
      .center-title {
        color: #1a73e8;
        font-size: 18px;
        text-transform: uppercase;
        font-weight: 500;
        margin: 0;
      }
      .top-title {
        color: #2d6187;
        font-size: 22px;
        text-transform: uppercase;
        font-weight: 600;
        margin-bottom: 2px;
      }
      .logo {
        width: 50px;
        height: 50px;
        margin-right: 12px;
        animation: spin3D 4s linear infinite;
      }
      @keyframes spin3D {
        0% { transform: perspective(500px) rotateY(0deg); }
        100% { transform: perspective(500px) rotateY(360deg); }
      }
      h2 {
        color: #2d6187;
        text-align: center;
        margin-top: 5px;
        margin-bottom: 10px;
        display: none;
        font-size: 21.6px;
        border: 1px solid #2d6187;
        padding: 5px 10px;
        border-radius: 4px;
        background-color: #e8f0fe;
      }
      a { color: #1a73e8; text-decoration: none; }
      a:hover { color: #1557b0; }
      
      .action-buttons-container {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: center;
      }
      .receive-btn {
        background-color: #007bff;
        color: white;
        border: none;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
        transition: background-color 0.2s;
        width: 100%;
      }
      .receive-btn:hover { background-color: #0056b3; }
      
      .call-again-btn {
        background-color: #6c757d;
        color: white;
        border: none;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
        transition: background-color 0.2s;
        width: 100%;
      }
      .call-again-btn:hover { background-color: #5a6268; }

      .complete-btn {
        background-color: #28a745;
        color: white;
        border: none;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
        transition: background-color 0.2s;
        width: 100%;
      }
/* --- CSS CHO NHÓM NÚT ICON --- */
      .icon-btn-group {
        display: flex;
        gap: 8px; /* Khoảng cách giữa 2 nút */
        justify-content: center;
        width: 100%;
        margin-top: 6px;
      }

.icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 1; /* 📐 Giúp nút tự động giãn đều lấp đầy chiều rộng */
        height: 28px;
        /* Đã xóa dòng width: 28px; để nút có thể tự do giãn ngang */
        border: none;
        border-radius: 5px;
        cursor: pointer;
        color: white;
        font-size: 13px;
        font-weight: bold;
        transition: all 0.2s ease;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      }

      /* Nút Chưa xử lý (Màu đỏ, dấu X) */
      .btn-fail {
        background-color: #e63946;
      }
      .btn-fail:hover {
        background-color: #c1121f;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(230, 57, 70, 0.3);
      }

/* Nút Hoàn thành (Đổi sang màu xanh blue giống nút Tiếp nhận) */
      .btn-success {
        background-color: #007bff; 
      }
      .btn-success:hover {
        background-color: #0056b3; /* Màu xanh đậm hơn khi rê chuột */
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
      }
      .name-column {
        font-weight: bold;
        color: #ff5722; 
      }
      .complete-btn:hover { background-color: #218838; }

      .stt-column { width: 40px; }
      .qrcode-column, .address-column { width: 120px; position: relative; }
      .cccd-column { width: 120px; }
      .truncated {
        display: inline-block; max-width: 110px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      }
      .full-text {
        display: none; position: absolute; background-color: #fff;
        border: 1px solid #e0e4e8; padding: 8px; z-index: 10;
        top: 100%; left: 50%; transform: translateX(-50%) translateY(5px);
        white-space: normal; max-width: 300px; text-align: center;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1); border-radius: 4px; font-size: 13px;
      }
      .qrcode-column:hover .full-text, .address-column:hover .full-text {
        display: block; opacity: 1; transform: translateX(-50%) translateY(0);
      }
      .copy-btn {
        padding: 3px 8px; background-color: #6c757d; color: white;
        border: none; border-radius: 4px; cursor: pointer; font-size: 12px;
        margin-left: 6px; display: inline-block;
      }
      .copy-btn:hover { background-color: #5a6268; }
      
      #counterSelect {
        padding: 6px; font-size: 15px; width: 350px; border-radius: 5px;
        border: 1px solid #ced4da;
      }
      .waiting-count { color: #d9534f; font-weight: bold; margin-left: 10px; }
      
      .active-table, .active-header { display: table; opacity: 1; }
      tr:nth-child(even) { background-color: #f8fafc; }
      tr:nth-child(odd) { background-color: #ffffff; }
      tr:hover { background-color: #e9f1ff; }
      
      .processing-row { background-color: #fff3cd !important; } 
      .processing-by-other-row { background-color: #f1f3f5 !important; color: #6c757d; }
      
      .controls-container {
        position: absolute; top: 65px; right: 20px;
        display: flex; gap: 10px; z-index: 1000;
      }
      .logout-btn {
        background-color: #e63946; color: white; border: none;
        padding: 8px 15px; border-radius: 5px; cursor: pointer; font-weight: bold;
      }
      .report-btn {
        background-color: #17a2b8; color: white; text-decoration: none;
        padding: 8px 15px; border-radius: 5px; font-weight: bold;
      }
      
      #login-container {
        display: flex; align-items: center; justify-content: center;
        height: 100vh; background-color: #f5f7fa;
      }
      .login-box {
        background: white; padding: 40px; border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1); text-align: center; width: 450px;
        border-top: 5px solid #1a73e8;
      }
      .login-box input {
        width: 90%; padding: 12px; margin: 10px 0; border: 1px solid #ccc;
        border-radius: 6px; font-size: 15px;
      }
      .login-box button {
        background-color: #1a73e8; color: white; border: none; padding: 12px 20px;
        border-radius: 6px; cursor: pointer; width: 95%; font-size: 16px; font-weight: bold; margin-top: 15px;
      }
      .password-container { position: relative; width: 90%; margin: 10px auto; }
      .password-container input { width: 100%; margin: 0; box-sizing: border-box; }
      .toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; }
      #main-content { display: none; position: relative; }
      .remember-container { display: flex; align-items: center; width: 90%; margin: 0 auto 15px auto; font-size: 14px; color: #555; }

      #custom-alert-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.4); display: none;
        align-items: center; justify-content: center; z-index: 9999;
        backdrop-filter: blur(3px);
      }
      .custom-alert-box {
        background: #fff; padding: 25px 30px; border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2); text-align: center;
        max-width: 400px; width: 85%; animation: slideDown 0.3s ease-out;
        border-top: 6px solid #e63946;
      }
      .custom-alert-box.info { border-top-color: #1a73e8; }
      .custom-alert-box h3 { margin-top: 0; color: #2d6187; font-size: 20px; }
      .custom-alert-box p { color: #495057; font-size: 16px; margin-bottom: 22px; line-height: 1.5; }
      .custom-alert-btn {
        background-color: #1a73e8; color: white; border: none;
        padding: 10px 24px; border-radius: 6px; cursor: pointer;
        font-weight: bold; font-size: 15px; transition: background 0.2s;
      }
      .custom-alert-btn:hover { background-color: #1557b0; }
      @keyframes slideDown {
        from { transform: translateY(-30px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
      }
      .speaker-controls-container {
        position: absolute; top: 20px; left: 20px;
        display: flex; flex-direction: column; gap: 10px; z-index: 1000;
        background: #ffffff; padding: 12px 15px; border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid #1a73e8;
      }
      .speaker-option { 
        display: flex; align-items: center; gap: 8px; 
        font-size: 14px; font-weight: bold; color: #2d6187; 
      }
      .speaker-select { 
        padding: 5px; border-radius: 4px; border: 1px solid #ccc; outline: none;
      }
      /* --- CSS CHO THÔNG TIN PHẦN MỀM (BẢN ĐẸP) --- */
.software-info-wrapper {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 9999;
  font-family: 'Segoe UI', Arial, sans-serif;
}

/* Nút hiển thị có hiệu ứng nhịp đập thu hút */
.software-info-btn {
  background: linear-gradient(135deg, #ffffff, #f0f4f8);
  color: #1a73e8;
  border: 1.5px solid #1a73e8;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: help;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.15);
  transition: all 0.3s ease;
  animation: pulseBtn 2s infinite; /* Gọi hiệu ứng nhịp đập */
}

/* Hiệu ứng chớp bóng mờ */
@keyframes pulseBtn {
  0% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(26, 115, 232, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0); }
}

.software-info-wrapper:hover .software-info-btn {
  background: #1a73e8;
  color: #ffffff;
  animation: none; /* Dừng đập khi rê chuột vào */
}

/* Thẻ thông tin đổ xuống */
.software-info-card {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 12px;
  width: 320px;
  background: #ffffff;
  border-radius: 16px; 
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  padding: 25px 20px;
  opacity: 0;
  visibility: hidden;
  /* Kết hợp dịch chuyển và phóng to nhẹ */
  transform: translateY(-10px) scale(0.95); 
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-top: 6px solid #1a73e8;
  text-align: center; /* Canh giữa toàn bộ nội dung */
}

.software-info-wrapper:hover .software-info-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Vòng tròn Avatar trang trí */
.author-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e8f0fe, #d0e7ff);
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 15px auto; /* Canh giữa khối avatar */
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.2);
}

.software-info-card h4 {
  margin: 0 0 10px 0;
  color: #2d6187;
  font-size: 18px;
  font-weight: 700;
}

.software-info-card p {
  margin: 0 0 20px 0;
  color: #5f6368;
  font-size: 14px;
  line-height: 1.6;
}

/* Nút Zalo */
.zalo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0068ff, #0056d6);
  color: #ffffff !important;
  padding: 12px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 15px rgba(0, 104, 255, 0.3);
}

.zalo-link:hover {
  transform: translateY(-3px); /* Nổi bật lên khi rê chuột */
  box-shadow: 0 8px 20px rgba(0, 104, 255, 0.4);
}
.software-qrcode {
  display: block; /* Chuyển sang dạng khối để có thể sử dụng margin auto */
  margin: 15px auto 0; /* Khoảng cách trên 15px và tự động canh giữa hai bên */
  width: 140px; /* Điều chỉnh độ rộng hình ảnh cho vừa vặn */
  height: auto;
  border-radius: 12px; /* Bo góc hình ảnh cho đồng bộ với giao diện */
  border: 1px solid #d0e7ff; /* Thêm viền xanh nhạt tạo điểm nhấn */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* Đổ bóng nhẹ để tăng chiều sâu */
  transition: transform 0.3s ease; /* Hiệu ứng mượt khi tương tác */
}

.software-qrcode:hover {
  transform: scale(1.05); /* Phóng to nhẹ khi rê chuột vào để gây chú ý */
}
/* Hiệu ứng nhấp nháy đỏ nhạt cho hàng được tích Checkbox */
.row-selected {
  background-color: #ffe6e6 !important;
  animation: blinkRow 1.5s infinite;
}
@keyframes blinkRow {
  0% { background-color: #ffe6e6; }
  50% { background-color: #ffcccc; }
  100% { background-color: #ffe6e6; }
}

/* Nút xóa hàng loạt */
.checkbox-column { width: 60px; text-align: center; }
.delete-batch-btn {
  background-color: #dc3545; color: white; border: none;
  padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold;
}
.delete-batch-btn:hover { background-color: #c82333; }

/* CSS cho Popup Xác nhận Xóa */
#confirm-delete-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); display: none;
  align-items: center; justify-content: center; z-index: 10000;
  backdrop-filter: blur(3px);
}
/* CSS cho Popup Thông báo Xóa Thành Công */
#success-delete-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); display: none;
  align-items: center; justify-content: center; z-index: 10000;
  backdrop-filter: blur(3px);
}
.success-alert-box {
  background: #fff; padding: 25px 30px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2); text-align: center;
  max-width: 400px; width: 85%; animation: slideDown 0.3s ease-out;
  border-top: 6px solid #28a745; position: relative;
}
.close-btn-x {
  position: absolute; top: 10px; right: 15px; font-size: 22px;
  cursor: pointer; color: #6c757d; border: none; background: none; font-weight: bold;
}
.close-btn-x:hover { color: #dc3545; }
.btn-ok-la {
  background-color: #28a745; color: white; padding: 10px 24px;
  border: none; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 15px; margin-top: 15px;
}
.btn-ok-la:hover { background-color: #218838; }
.confirm-btn-group { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.btn-cancel { background-color: #6c757d; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }
.btn-confirm { background-color: #dc3545; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }
.btn-cancel:hover { background-color: #5a6268; }
.btn-confirm:hover { background-color: #c82333; }

