*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    width: 1150px;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid #f2f4f6;
}

#logo {
    display: flex;
    flex-direction: row;
    justify-content:center;
    align-items:center;
    border-bottom: 3px double #0c0c0c;
    margin-top:10px;
    margin-bottom: 10px;
}

#logo-left {
    width: 10%;
}

.img-logo {
    width: 80px;
    height: 80px;
}
#logo-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#uce-name {
    font-size: 24px;
    font-weight: 700;
}

#uce-address {
    font-size: 1rem;
    line-height: 1.5;
}

.uce-blue {
    color:#007DC5;
}

.uce-left {
    text-align: left;
}

.uce-right {
    text-align: right;
}

h1 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 5px;
}


.table-wrapper {
  max-height: 600px;   /* Chiều cao giới hạn để bật scroll */
  overflow-y: auto;    /* Bật scroll dọc */
  border: 0.5px solid #e2e2e2;
  max-width:fit-content;
  margin: 10px auto;
}

table {
  border-collapse: separate;
  border-spacing:0;
  width: 100%;
  font-size: 0.8rem;;
}

#table-sensors thead tr {
  background: #fff;
}


#table-sensors thead th {
  position: sticky;
  background: #fff;  /* để che nội dung body khi scroll */
  z-index: 0;
  color:#0c0c0c;
  border: 0.5px solid #e2e2e2;
}



th, td {
  padding: 4px;
  border: 0.5px solid #e2e2e2;
}

tr td {
  
  text-align: center;
}

.table-stripping{
  background-color: #ececec;
}

.info-icon {
  cursor: pointer;
}

/* nền tròn xanh */
.info-icon .icon-bg {
  fill: #007DC5;
}

/* chữ i trắng */
.info-icon .icon-text {
  fill: #fff;
  font-size: 12px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  pointer-events: none; /* tránh bị hover nhầm */
}

/* hover: đổi chữ thành vàng */
.info-icon:hover .icon-text {
  fill: #FFD700;
}

tbody tr:hover {
  background-color: #FFFF99; /* màu nền khi hover */
  cursor: pointer; /* hiện con trỏ dạng tay */
  transition: background-color 0.2s ease-in-out; /* hiệu ứng mượt */
}

#footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    border-top: 2px solid #cdcaca;
    border-bottom: 2px solid #cdcaca;
    padding: 15px 0;
    gap: 5px;
}

/* OVERLAY */
.ds-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
}
.ds-modal.hidden { display: none; }

/* WIDER MODAL */
.ds-modal-content {
  width: 900px;       /* rộng hơn để có chỗ cho nút */
  max-width: 95%;
  max-height: 85vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* HEADER */
.ds-modal-header {
  background: #017dc5;
  padding: 7px 25px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

/* CLOSE BUTTON */
.ds-modal-close {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  background: #ffffffdd;
  border: none;
  font-size: 22px;
  cursor: pointer;
  transition: 0.2s;
}
.ds-modal-close:hover {
  background: #fff;
  transform: scale(1.1);
}

/* NAVIGATION WRAPPER */
.ds-modal-nav {
  position: relative;
  width: 100%;
  height: 0;
}

/* PREV / NEXT BUTTONS (inside modal) */
.ds-nav-btn {
  position: absolute;
  top: 50%;                       /* giữa chiều cao modal */
  transform: translateY(-50%);    /* chỉnh lại tâm */
  background: #017dc5;
  color: #fff;
  border: none;
  width: 48px;
  height: 55px;
  cursor: pointer;
  font-size: 22px;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  transition: 0.15s ease;
  z-index: 15;   /* phải cao hơn nội dung */
}

#modal-prev { left: 20px; }    /* bên trái trong modal */
#modal-next { right: 20px; }   /* bên phải trong modal */

/* Hover mượt */
.ds-nav-btn:hover {
  background: #fff;
  color:#0c0c0c;
  transform: translateY(-50%) scale(1.08);
}

/* BODY */
.ds-modal-body {
  padding: 40px 35px 25px;  /* chừa chỗ cho nút hai bên */
  overflow-y: auto;
  max-height: calc(85vh - 70px);
  position: relative;
}

/* TABLE center */
#row-modal-table {
  width: 560px;
  margin: auto;
  border-collapse: collapse;
}

/* FIELD CELL */
#row-modal-table td.field {
  width: 40%;
  text-transform: uppercase;
  background: #cdf2ff;
  border: 1px solid #9acade;
  font-weight: 600;
  padding: 8px 10px;
  font-size: 0.9rem;
}

/* VALUE CELL */
#row-modal-table td.value {
  border: 1px solid #ccc;
  font-size:0.9rem;
  padding: 8px 10px;
  color: #0a3d62;
  white-space: pre-line;
}

/* Transition mượt khi đổi dữ liệu */
#row-modal-table td.value,
#row-modal-table td.field {
  opacity: 1;
  transition: opacity 0.25s ease-in-out;
}

#row-modal-table td.value.fading,
#row-modal-table td.field.fading {
  opacity: 0;
}







