.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--clr-focus);
  color: #000;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

.custom-header-container {
  display: block;
}

.custom-header {
  position: relative;
  padding: 25px 35px;
  border-bottom: 1px solid var(--clr-border-soft);
}

.custom-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  gap: 0 15px;
}

.custom-header-inner a,
.custom-header-inner h1,
.custom-header-inner nav {
  padding: 0 15px;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  padding-bottom: 25px;
}

.custom-header h1 {
  margin: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--clr-header-title);
}

.custom-header h1 a,
.custom-header h1 a:visited {
  color: inherit;
  text-decoration: none;
}

.custom-header h1 a:hover {
  text-decoration: none;
}

.custom-header .main-nav {
  justify-self: end;
}

.main-nav {
  display: flex;
  width: auto;
  font-size: 16px;
  text-transform: uppercase;
}

.main-nav > ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 6px 12px;
  color: var(--clr-menu-txt-dk);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 0;
  width: calc(100% - 24px);
  height: 2px;
  background: var(--clr-hdr);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(0.4);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 80px;
  padding: 6px 0;
  background: var(--clr-bg);
  border: 1px solid rgba(125, 125, 125, 0.1);
  border-radius: 4px;
}

.dropdown-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-menu li a {
  position: relative;
  display: block;
  padding: 6px 12px;
  white-space: nowrap;
  color: var(--clr-menu-txt-dk);
  text-decoration: none;
}

.dropdown-menu li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--clr-hdr);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.dropdown-menu li a:hover::after,
.dropdown-menu li a:focus-visible::after {
  transform: scaleX(0.4);
}

.dropdown-menu li a:hover {
  background: var(--clr-hover);
  color: var(--clr-menu-txt-dk);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.main-nav a.nav-button {
  display: inline-block;
  padding: 6px 12px;
  background: #daaa00;
  color: var(--clr-menu-txt-dk);
  border-radius: 3px;
  font-weight: 400;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.main-nav a.nav-button::after {
  display: none;
}

.main-nav a.nav-button:hover {
  background: #eebb00;
  color: var(--clr-menu-txt-dk);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.main-nav a.nav-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.main-nav a.nav-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--clr-header-title);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
}

.timestamp {
  margin-bottom: 12px;
  color: var(--clr-muted);
  font-size: 12px;
}

.button-refresh {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.button-refresh span{
  color: #888;
  font-size: 11px;
  margin: 4px;
}

.refresh-on {
  background: #2e7d32;
  color: #fff;
}

.refresh-off {
  background: #c62828;
  color: #fff;
}

.summary-table {
  width: 100%;
  margin-bottom: 20px;
  border-collapse: collapse;
}

.summary-table caption {
  padding: 6px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.summary-table th,
.summary-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--clr-border);
}

.summary-table th {
  background: #e8e8e0;
  font-size: 13px;
}

.bar-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  height: 18px;
}

.bar {
  height: 14px;
  min-width: 0;
  border-radius: 2px;
}

.bar-up {
  background: var(--clr-up);
}

.bar-down {
  background: var(--clr-down);
}

.bar-sdt {
  background: var(--clr-sdt);
}

.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.badge-up {
  background: var(--clr-up);
}

.badge-down {
  background: var(--clr-down);
}

.badge-sdt {
  background: var(--clr-sdt);
}

.legend {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
  font-size: 13px;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  border-radius: 50%;
  vertical-align: middle;
}

.dot-up { background: var(--clr-up-ada); }
.dot-down { background: var(--clr-down-ada); }
.dot-sdt { background: var(--clr-sdt-ada); }

.overall-panel,
.current-summary,
.chart-wrap,
.sidebar,
.outage-group {
  background: var(--clr-surface);
  border: 1px solid #ccc;
  border-radius: 4px;
}

.overall-panel {
  padding: 14px 18px;
  margin-bottom: 20px;
}

.overall-panel h2 {
  margin-bottom: 8px;
  font-size: 15px;
}

.overall-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-block {
  text-align: center;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--clr-muted);
  text-transform: uppercase;
}

.stat-up .stat-num {
  color: var(--clr-up);
}

.stat-down .stat-num {
  color: var(--clr-down);
}

.stat-sdt .stat-num {
  color: var(--clr-sdt);
}

.host-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 12px;
}

.host-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
}

.dot-up {
  background: var(--clr-up);
}

.dot-down {
  background: var(--clr-down);
  animation: blink 1s step-end infinite;
}

.dot-sdt {
  background: var(--clr-sdt);
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot-down {
    animation: none;
  }
}

a.group-link {
  color: var(--clr-hdr);
  font-weight: 500;
  text-decoration: none;
}

a.group-link:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 13px;
}

.dashboard {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: 1rem;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  padding: 12px;
  position: sticky;
  top: 16px;
}

.sidebar-title {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--clr-hdr);
  color: var(--clr-hdr);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-item {
  margin-bottom: 2px;
}

.sidebar-link {
  display: block;
  padding: 8px 10px;
  color: #333;
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 3px;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar-link:hover {
  background: var(--clr-hover);
  border-left-color: var(--clr-hdr);
}

.sidebar-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.sidebar-desc {
  display: block;
  margin-top: 1px;
  color: #777;
  font-size: 11px;
}

.sidebar-stats {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.sidebar-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.sb-up {
  background: var(--clr-up);
}

.sb-down {
  background: var(--clr-down);
}

.sb-sdt {
  background: var(--clr-sdt);
}

.sidebar-legend {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--clr-border);
  font-size: 11px;
}

.main-panel {
  flex: 1;
  min-width: 0;
}

.main-panel h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  font-size: 13px;
}

.chart-controls select {
  padding: 4px 8px;
  border: 1px solid #bbb;
  border-radius: 3px;
  font-size: 13px;
}

.chart-wrap {
  position: relative;
  height: 340px;
  padding: 16px;
  margin-bottom: 20px;
}

.current-summary {
  padding: 14px 18px;
  margin-bottom: 16px;
}

.current-summary h3 {
  margin-bottom: 8px;
  font-size: 14px;
}

.sidebar-outages {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--clr-border);
}

.sidebar-subtitle {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.outage-link .sidebar-name {
  font-weight: 600;
}

.outage-group {
  margin-top: 1.5rem;
  padding: 1rem;
}

.outage-group h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.outage-device-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.outage-device-item {
  padding: 0.75rem 0;
  border-top: 1px solid #eee;
}

.outage-device-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.outage-device-name {
  font-weight: 600;
}

.outage-device-desc {
  margin-top: 0.25rem;
  color: #555;
}

.outage-device-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.noc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem !important;
  margin-bottom: 0.5rem !important;
  border-radius: 0.2rem !important;
  font-size: 0.875rem;
  line-height: 1.35;
}

.noc-banner__container {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.noc-banner__left {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.noc-banner__right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.noc-banner__right a {
  white-space: nowrap;
}

.noc-banner__right .btn-close {
  margin-left: 0.25rem;
}

.noc-banner__close {
  padding: 0.25rem;
}

.noc-banner__last {
  margin-bottom: 1rem !important;
}

.breadcrumb-container {
  padding: 0.5rem 1rem;
}

.breadcrumb {
  --bs-breadcrumb-divider: ">";
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.breadcrumb-item a {
  text-decoration: none;
}

.breadcrumb-item.active {
  font-weight: 600;
}
