:root {
  --mau-chinh: #047857;
  --mau-chinh-dam: #065f46;
  --mau-nen: #f0fdf4;
  --mau-vien: #bbf7d0;
  --mau-loi: #dc2626;
  --mau-thanhcong: #16a34a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--mau-nen);
  color: #1f2937;
  line-height: 1.6;
}
.site-header {
  background: var(--mau-chinh);
  color: #fff;
  padding: 1.2rem 1.6rem;
}
.site-header h1 { margin: 0 0 0.25rem; font-size: 1.4rem; }
.site-header p { margin: 0; opacity: 0.92; font-size: 0.95rem; }
.main-nav {
  background: #fff;
  border-bottom: 1px solid var(--mau-vien);
  padding: 0.75rem 1.6rem;
  display: flex;
  gap: 1rem;
}
.main-nav a {
  color: var(--mau-chinh);
  text-decoration: none;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--mau-chinh);
  color: #fff;
}
.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: #6b7280;
  font-size: 0.85rem;
  border-top: 1px solid var(--mau-vien);
  margin-top: 2rem;
  background: #fff;
}
.site-footer a { color: var(--mau-chinh); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

    .khung-quan-ly-muon-thiet-bi {
      max-width: 1140px;
      margin: 1.5rem auto;
      padding: 0 1rem;
      display: flex;
      flex-direction: column;
      gap: 1.4rem;
    }
    .dai-chi-so-kho-may { background: #fff; border: 1px solid var(--mau-vien); border-radius: 0.6rem; padding: 1rem 1.4rem; }
    .dai-chi-so-kho-may h2 { margin-top: 0; color: var(--mau-chinh-dam); font-size: 1.15rem; }
    .danh-sach-kpi-thiet-bi { display: flex; flex-wrap: wrap; gap: 1rem; }
    .the-trang-thai-tb {
      flex: 1 1 200px;
      padding: 0.8rem 1rem;
      background: #f0fdf4;
      border: 1px solid var(--mau-vien);
      border-radius: 0.5rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .khu-vuc-luu-thong-tb { display: flex; flex-wrap: wrap; gap: 1.5rem; }
    .cot-lap-phieu-tb { flex: 1 1 350px; background: #fff; border: 1px solid var(--mau-vien); border-radius: 0.6rem; padding: 1.2rem; }
    .cot-so-theo-doi-tb { flex: 2 1 540px; background: #fff; border: 1px solid var(--mau-vien); border-radius: 0.6rem; padding: 1.2rem; }
    .cot-lap-phieu-tb h2, .cot-so-theo-doi-tb h2 { margin-top: 0; color: var(--mau-chinh-dam); font-size: 1.15rem; }
    .nhom-phieu-muon-tb { border: 1px solid var(--mau-vien); border-radius: 0.5rem; padding: 0.9rem; margin: 0; }
    .nhom-phieu-muon-tb legend { font-weight: bold; color: var(--mau-chinh-dam); padding: 0 0.3rem; }
    .dong-phieu-muon-tb { display: flex; flex-direction: column; margin-bottom: 0.8rem; }
    .nhan-phieu-muon-tb { margin-bottom: 0.25rem; font-weight: 600; font-size: 0.9rem; }
    .o-nhap-muon-tb { padding: 0.5rem 0.65rem; border: 1px solid #94a3b8; border-radius: 0.35rem; font: inherit; }
    .o-nhap-muon-tb:focus { outline: none; border-color: var(--mau-chinh); box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.18); }
    .loi-phieu-muon-tb { color: var(--mau-loi); font-size: 0.82rem; margin-top: 0.25rem; min-height: 1.1rem; }
    .dong-muon-tb-loi .o-nhap-muon-tb { border-color: var(--mau-loi); }
    .nut-xuat-phieu-muon { background: var(--mau-chinh); color: #fff; border: none; padding: 0.65rem 1.2rem; border-radius: 0.4rem; cursor: pointer; font-weight: 600; width: 100%; }
    .nut-xuat-phieu-muon:hover { background: var(--mau-chinh-dam); }
    .nut-xoa-phieu-muon { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; padding: 0.3rem 0.65rem; border-radius: 0.3rem; cursor: pointer; font-weight: 600; font-size: 0.85rem; }
    .nut-xoa-phieu-muon:hover { background: #fecaca; }
    .hop-tin-thiet-bi { border-radius: 0.5rem; padding: 0.8rem 1rem; margin-top: 0.8rem; }
    .hop-bao-thanh-cong { background: #ecfdf5; border: 1px solid var(--mau-thanhcong); color: #065f46; }
    .hop-tin-thiet-bi[hidden] { display: none; }
    .so-luu-thong-thiet-bi { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
    .so-luu-thong-thiet-bi th, .so-luu-thong-thiet-bi td { border: 1px solid var(--mau-vien); padding: 0.55rem 0.75rem; text-align: left; }
    .so-luu-thong-thiet-bi th { background: var(--mau-chinh); color: #fff; }
    .nhan-hien-trang-tb { display: inline-block; padding: 0.2rem 0.55rem; border-radius: 0.3rem; background: #dcfce7; color: #166534; font-size: 0.8rem; font-weight: 600; }
    .so-kpi { font-size: 1.2rem; font-weight: bold; color: var(--mau-chinh-dam); }
