html, body {
  overflow-x: hidden;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.page-header {
  background: linear-gradient(rgba(24,29,56,0.7), rgba(24,29,56,0.7)), url('../img/banner8.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  overflow: hidden;
  padding-top: 4.25rem;
  padding-bottom: 4.25rem;
}
.page-header::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,12,32,0.12) 0%, rgba(6,12,32,0.18) 100%); pointer-events: none; }
.page-title { position: relative; z-index: 2; font-weight: 800; color: #fff; font-size: clamp(1.8rem, 2.4rem + 1.6vw, 3.6rem); margin-bottom: .5rem; font-family: 'Heebo', 'Nunito', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;}
.page-subtitle { position: relative; z-index: 2; max-width: 840px; margin: 0 auto 1rem; color: rgba(255,255,255,0.92); }

.monitor-container { padding: 30px 0; }
.status-wrap { padding: 18px; box-sizing: border-box; }

.controls-grid {
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px 0;
  margin-bottom: 14px;
}
.update-row { display: flex; justify-content: flex-end; }
.update-time {
  color: #6b7280;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
}
.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.search-box {
  flex: 1 1 320px;
  max-width: 68%;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 12px 18px 12px 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(16,24,40,0.03);
}
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.right-controls { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.filter-select {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  min-width: 180px;
}

.status-table-container {
  overflow-x: auto;
  margin-bottom: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(2,6,23,0.06);
  padding: 8px;
  box-sizing: border-box;
  width: 100%;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  hyphens: auto;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  background: transparent;
  border-radius: 4px;
}

.status-table col.col-logo    { width: 90px; }
.status-table col.col-type    { width: 100px; }
.status-table col.col-desc    { width: 20%; }
.status-table col.col-address { width: 22%; }
.status-table col.col-ap      { width: 60px; }
.status-table col.col-status  { width: 110px; }
.status-table col.col-reason  { width: 20%; }

.status-table thead {
  background-color: #2c3e50;
  color: white;
}
.status-table th {
  padding: 12px 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  vertical-align: middle;
  white-space: normal;
}
.status-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.status-table td.logo-cell img {
  max-height: 72px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.main-acronym { display:flex; gap:8px; align-items:center; justify-content:center; flex-direction:column; }

.status-indicator {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  min-width: 88px;
}
.status-active { background-color: #e7f6ef; color: #0b9564; }
.status-inactive { background-color: #fde8e8; color: #e53e3e; }
.status-warning { background-color: #fef5e7; color: #d69e2e; }
.status-unknown { background-color: #edf2f7; color: #4a5568; }

.hq-row { display: none; background: #fbfdfe; }
.hq-row td { text-align: center; vertical-align: middle; }

.toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  color: #2c3e50;
  font-weight: 800;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.toggle-btn:hover { background: rgba(0,0,0,0.04); }

@media (max-width: 992px) {
  .search-box { max-width: 100%; flex-basis: 100%; }
  .right-controls { min-width: 45%; justify-content: flex-end; }
  .status-table col.col-desc { width: 32%; }
  .status-table col.col-address { width: 24%; }
  .status-table col.col-reason { width: 18%; }
}

@media (max-width: 576px) {
 
  .status-table col.col-status {
    width: 140px !important;
    min-width: 140px !important;
  }

  .status-table th:nth-child(6),
  .status-table td:nth-child(6) {
    white-space: nowrap;
    min-width: 140px;
    text-align: center;
  }

  .status-indicator {
    white-space: nowrap;
    padding-left: 10px !important;
    padding-right: 10px !important;
    min-width: 110px !important;
    box-sizing: border-box;
    font-size: 12px;
  }

  .status-table col.col-logo {
    width: 120px !important;
    min-width: 120px !important;
  }

  .status-table th:nth-child(1),
  .status-table th:nth-child(2),
  .status-table th:nth-child(5) {
    white-space: nowrap;
    min-width: 80px;
  }

  .status-table col.col-type {
    min-width: 100px !important;
    width: 100px !important;
  }
  .status-table col.col-ap {
    min-width: 70px !important;
    width: 70px !important;
  }
  
  .controls-grid { gap: 6px; }
  .update-time { font-size: 0.9rem; padding-top: 4px; }
  .search-box { max-width: 100%; }
  .filter-select { min-width: 44%; }
  .status-table {
    table-layout: auto;
    min-width: 920px;
  }
  .status-table th, .status-table td { padding: 10px; font-size: 13px; }
  .status-indicator { min-width: 72px; padding: 4px 8px; font-size: 12px; }

  .status-table td.logo-cell img { max-height: 72px; height: auto; width: auto;}
}

.back-button { display: inline-block; margin-top: 20px; padding: 10px 20px; background-color: #2c3e50; color: white; border-radius: 4px; text-decoration: none; transition: background-color 0.3s; }
.back-button:hover { background-color: #1a2530; }

.toggle-btn:focus, .filter-select:focus, .search-box input:focus { outline: 3px solid rgba(59,130,246,0.18); outline-offset: 2px; }

.status-table thead th:nth-child(7),
.status-table tbody td:nth-child(7) {
  text-align: center !important;
  vertical-align: middle !important;
}


@media (min-width: 768px) and (max-width: 1440px) {

  .status-table {
    table-layout: fixed !important;
    width: 100%;
  }

  .status-table col.col-logo    { width: 90px  !important; min-width: 90px  !important; }
  .status-table col.col-type    { width: 140px !important; min-width: 120px !important; }
  .status-table col.col-desc    { width: calc(32% - 0px) !important; min-width: 220px !important; }
  .status-table col.col-address { width: calc(20% - 0px) !important; min-width: 180px !important; }
  .status-table col.col-ap      { width: 80px  !important; min-width: 70px  !important; }
  .status-table col.col-status  { width: 160px !important; min-width: 140px !important; }
  .status-table col.col-reason  { width: calc(20% - 0px) !important; min-width: 180px !important; }

  .status-table th:nth-child(2),
  .status-table th:nth-child(5),
  .status-table td:nth-child(2),
  .status-table td:nth-child(5) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
  }

  .status-table td:nth-child(6),
  .status-table th:nth-child(6) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }

  .status-table td:nth-child(6) .status-indicator,
  .status-table th:nth-child(6) .status-indicator {
    display: inline-block;
    white-space: nowrap;
    padding-left: 10px !important;
    padding-right: 10px !important;
    min-width: 130px !important;
    box-sizing: border-box;
  }

  .status-table td, .status-table th {
    overflow: hidden;
  }

}

@media (min-width: 768px) and (max-width: 1024px) {

  .status-table {
    table-layout: fixed !important;
    width: 100%;
  }

  .status-table col.col-logo    { width: 100px !important; min-width: 100px !important; }
  .status-table col.col-type    { width: 130px !important; min-width: 110px !important; }
  .status-table col.col-desc    { width: calc(30% - 0px) !important; min-width: 200px !important; }
  .status-table col.col-address { width: calc(18% - 0px) !important; min-width: 160px !important; }
  .status-table col.col-ap      { width: 70px  !important; min-width: 60px  !important; }
  .status-table col.col-status  { width: 170px !important; min-width: 150px !important; }
  .status-table col.col-reason  { width: calc(22% - 0px) !important; min-width: 180px !important; }

  .status-table td:nth-child(6),
  .status-table th:nth-child(6) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }
  .status-table td:nth-child(6) .status-indicator {
    min-width: 140px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    white-space: nowrap;
  }

  .status-table th:nth-child(2),
  .status-table th:nth-child(5),
  .status-table td:nth-child(2),
  .status-table td:nth-child(5) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

}
