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;
}
.action-buttons-row {
  display: flex;
  gap: 6px; 
  width: 100%; 
  margin-top: 6px;
}
.icon-btn {
  flex: 1; 
  height: 30px; 
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px; 
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s;
}
.icon-btn:hover { transform: scale(1.05); }
.btn-red { background-color: #dc3545; } 
.btn-red:hover { background-color: #c82333; }
.btn-blue { background-color: #007bff; } 
.btn-blue:hover { background-color: #0056b3; }
.checkbox-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.checkbox-wrapper:hover input[type="checkbox"]:disabled ~ .warning-text {
  display: block;
}
.select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}
.warning-text {
  display: none; 
  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);
}
.select-wrapper:hover select:disabled + .warning-text {
  display: block;
}
.disabled-controls {
  opacity: 0.5;
  pointer-events: none; 
  user-select: none;
}
.title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 8px;
  background-color: #fbf9d3; 
  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%;
}
.complete-btn:hover { background-color: #218838; }
.name-column {
  font-weight: bold;
  color: #ff5722; 
}
.pending-btn {
  background-color: #ffc107; 
  color: #212529;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
  width: 100%;
}
.pending-btn:hover { background-color: #e0a800; }
.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;
}
.delete-selected-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 10px;
  display: none; 
  transition: background-color 0.2s;
}
.delete-selected-btn:hover { background-color: #c82333; }
.checkbox-column { width: 30px; text-align: center; }
.checkbox-column input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #1a73e8; 
}
.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: 20px; 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; }
}
#custom-confirm-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);
}
.custom-confirm-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 #ff9800; 
}
.custom-confirm-box h3 { margin-top: 0; color: #d35400; font-size: 20px; }
.custom-confirm-box p { color: #495057; font-size: 16px; margin-bottom: 22px; line-height: 1.5; }
.confirm-btn-group { display: flex; justify-content: center; gap: 15px; }
.btn-cancel-confirm {
  background-color: #6c757d; color: white; border: none;
  padding: 10px 20px; border-radius: 6px; cursor: pointer;
  font-weight: bold; font-size: 15px; transition: background 0.2s;
}
.btn-cancel-confirm:hover { background-color: #5a6268; }
.btn-agree-confirm {
  background-color: #e63946; color: white; border: none;
  padding: 10px 20px; border-radius: 6px; cursor: pointer;
  font-weight: bold; font-size: 15px; transition: background 0.2s;
}
.btn-agree-confirm:hover { background-color: #c82333; }
@keyframes nhapNhayDoNhat {
  0% { background-color: #ffe6e6; }
  50% { background-color: #ffcccc; }
  100% { background-color: #ffe6e6; }
}
.selected-row-blink {
  animation: nhapNhayDoNhat 2s infinite ease-in-out !important;
  transition: background-color 0.3s;
}   
.speaker-controls-container {
  position: fixed; 
  top: 10px;       
  left: 10px;      
  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;
}
.software-info-wrapper {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 9999;
  font-family: 'Segoe UI', Arial, sans-serif;
}
.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;
}
@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; 
}
.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;
  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;
}
.software-info-wrapper:hover .software-info-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.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; 
  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;
}
.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); 
  box-shadow: 0 8px 20px rgba(0, 104, 255, 0.4);
}
.software-qrcode {
  display: block; 
  margin: 15px auto 0; 
  width: 140px; 
  height: auto;
  border-radius: 12px; 
  border: 1px solid #d0e7ff; 
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); 
  transition: transform 0.3s ease; 
}
.software-qrcode:hover { transform: scale(1.05); }
