/* Style The Dropdown Button */
.dropbtn {
  background: linear-gradient(45deg, #49008b, #06cdeb);
  color: white;
  padding: 10px;
  font-size: 16px;
  border: 1px solid black;
  cursor: pointer;
  border-radius: 10px;
}

/* The container <div> - needed to position the dropdown content */
.dropdown {
  position: relative;
  display: inline-block;
  margin-left: 20px;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

/* Links inside the dropdown */
.dropdown-content button {
  color: black;
  padding: 12px 16px;
  min-width: 160px;
  text-decoration: none;
  display: flex;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
  background-color: #f1f1f1
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {
  background-color: gray;
}

.w3-bar-item {
  display: flex;
  width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  padding: 8px;
}

table,
th,
td {
  border: 1px solid;
  border-width: thin !important;
}

table a:link {
  text-decoration: none;
  color: black;
}

table a:visited {
  text-decoration: none;
  color: black;
}

tr:nth-child(even) {
  background-color: #bdbdbd;
}

tbody tr:hover td {
  background-color: rgb(125, 125, 125) !important;
}

.page-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.tab {
  display: flex;
  border: 1px solid black;
}

.af_infor {
  width: 33, 33%;
}

input[type=text]:hover {
  background-color: #e4c9c9;
}

.form-control:disabled {
  background-color: white !important;
}

.device-inf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  /* responsive */
  gap: 1.2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #e6f0f3, #cfdde2);
  margin: 2rem auto;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  border: none;
  max-width: 1200px;
}

.device-inf span.input-group-text,
.device-inf label {
  grid-column: 1 / -1;
  /* span full width */
  font-weight: 700 !important;
  font-size: 1.3rem !important;
  margin: 1rem 0 0.5rem;
  padding: 0.5rem 0;
  color: #2c3e50;
  border-bottom: 2px solid #7f8c8d;
  background: transparent;
}

.inf-box {
  display: flex;
  flex-direction: column;
}

/* Đồng bộ label và span */
.inf-box>span,
.inf-box>label {
  /* display: block; */
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c3e50;
}

.inf-box>input,
.inf-box>select,
.inf-box>textarea {
  border: 1.8px solid #bdc3c7;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  background: #fff;
}

.inf-box>input:focus,
.inf-box>select:focus,
.inf-box>textarea:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 6px rgba(52, 152, 219, 0.4);
}

.inf-box>textarea {
  min-height: 100px;
  resize: vertical;
}

/* Căn giữa nút Thêm mới */
.device-inf button.btn {
  grid-column: 1 / -1;
  justify-self: center;
  width: 200px;
  /* cố định chiều rộng */
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}

.device-inf button.btn:hover {
  background: linear-gradient(135deg, #2980b9, #1c5981);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(41, 128, 185, 0.3);
}

/* Responsive chỉnh lại padding nhỏ hơn trên mobile */
@media (max-width: 600px) {
  .device-inf {
    padding: 1rem;
    margin: 1rem;
  }

  .device-inf span.input-group-text {
    font-size: 1.1rem;
  }

  .device-inf button.btn {
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
  }
}


.add-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #e6f0f3, #cfdde2);
  margin: 2rem auto;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  border: none;
  max-width: 1000px;
}

.form-section-title {
  grid-column: 1 / -1;
  font-weight: 700;
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem;
  padding: 0.5rem 0;
  color: #2c3e50;
  border-bottom: 2px solid #7f8c8d;
  background: transparent;
}

.inf-box {
  display: flex;
  flex-direction: column;
}

.inf-box>label {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c3e50;
}

.inf-box>input,
.inf-box>select,
.inf-box>textarea {
  border: 1.8px solid #bdc3c7;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  background: #fff;
}

.inf-box>input:focus,
.inf-box>select:focus,
.inf-box>textarea:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 6px rgba(52, 152, 219, 0.4);
}

.device-inf button.btn {
  grid-column: 1 / -1;
  justify-self: center;
  width: 200px;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}

.device-inf button.btn:hover {
  background: linear-gradient(135deg, #2980b9, #1c5981);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(41, 128, 185, 0.3);
}

@media (max-width: 600px) {
  .add-forms {
    padding: 1rem;
    margin: 1rem;
  }

  .form-section-title {
    font-size: 1.1rem;
  }

  .device-inf button.btn {
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
  }
}