:root {
  color-scheme: light;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f5f7;
  color: #1f2733;
}

a {
  color: inherit;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #1f2c39;
  color: #cfd8e3;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid #2d3d4d;
}

.sidebar-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 6px;
  background: #3f6fd1;
  color: #fff;
  font-weight: 700;
}

.sidebar-logo-text {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.sidebar-section {
  padding: 1rem 0;
}

.sidebar-section-title {
  padding: 0 1.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7c8ba0;
}

.sidebar-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 1.2rem;
  border: none;
  background: none;
  border-left: 3px solid transparent;
  color: #cfd8e3;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.sidebar-count:hover {
  background: #26374a;
}

.sidebar-count.active {
  background: #16212c;
  color: #fff;
  border-left-color: #3f6fd1;
}

.sidebar-count-value {
  font-weight: 700;
  color: #fff;
}

.sidebar-count.status-problem .sidebar-count-value {
  color: #ff8a8a;
}

.sidebar-count.status-warning .sidebar-count-value {
  color: #ffcf7d;
}

.sidebar-count.status-ok .sidebar-count-value {
  color: #7fd99a;
}

.sidebar-count.status-unknown .sidebar-count-value {
  color: #9aa7b8;
}

/* --- Main content --- */
.content {
  flex: 1;
  padding: 1.5rem 2rem;
  min-width: 0;
}

.content-header {
  margin-bottom: 1.2rem;
}

.content-header h1 {
  margin: 0;
  font-size: 1.4rem;
}

.breadcrumb {
  margin: 0.2rem 0 0;
  color: #6b7684;
  font-size: 0.85rem;
}

.breadcrumb a {
  color: #3f6fd1;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* --- Search bar (host list filter) --- */
.search-bar {
  margin-bottom: 1rem;
}

.search-bar input[type="text"] {
  width: 100%;
  max-width: 24rem;
  border: 1px solid #c7ccd3;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  background: #fff;
}

/* --- Host list --- */
.host-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #dfe2e6;
  border-radius: 4px;
  overflow: hidden;
}

.host-list li + li {
  border-top: 1px solid #ecedf0;
}

.host-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: inherit;
}

.host-row:hover {
  background: #f8f9fb;
}

.host-row-name {
  font-weight: 600;
  min-width: 8rem;
}

.host-row-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.host-row-counts {
  color: #6b7684;
  font-size: 0.85rem;
}

.host-row-chevron {
  color: #9aa7b8;
  font-size: 1.1rem;
}

/* --- Host detail --- */
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: #3f6fd1;
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* --- Table (host detail) --- */
.table-wrap {
  background: #fff;
  border: 1px solid #dfe2e6;
  border-radius: 4px;
  overflow-x: auto;
}

.status-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

.status-table th,
.status-table td {
  border-bottom: 1px solid #ecedf0;
  padding: 0.55rem 0.9rem;
  text-align: left;
}

.status-table thead th {
  background: #f7f8fa;
  color: #384252;
  font-weight: 600;
  border-bottom: 1px solid #dfe2e6;
}

.status-table tbody tr:hover {
  background: #f8f9fb;
}

.status-table tbody th[scope="row"] {
  font-weight: 500;
  white-space: normal;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-ok {
  background: #e6f4ea;
  color: #1a7f37;
}

.badge-warning {
  background: #fdf1db;
  color: #9a6700;
}

.badge-problem {
  background: #fbe4e4;
  color: #cf222e;
}

.badge-unknown {
  background: #eceff1;
  color: #6e7681;
}

.error {
  color: #cf222e;
}

.updated-at {
  color: #6b7684;
  font-size: 0.82rem;
  margin: 1rem 0 0;
}

.empty-state {
  background: #fff;
  border: 1px solid #dfe2e6;
  border-radius: 4px;
  padding: 1.5rem;
  color: #6b7684;
  text-align: center;
}

.empty-state a {
  color: #3f6fd1;
}
