:root {
  --bg: #f4efe4;
  --panel: #fffaf2;
  --ink: #1f1d1a;
  --muted: #6a665d;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --line: #e6dcc8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 20%, #fff8e7 0%, transparent 50%),
    radial-gradient(circle at 85% 10%, #dff8f4 0%, transparent 45%),
    var(--bg);
  min-height: 100vh;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.card {
  width: min(440px, 100%);
  padding: 28px;
}

.card h1 {
  margin-top: 0;
}

label {
  display: block;
  margin-top: 14px;
  font-weight: 600;
}

input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
}

button,
a#exportBtn {
  border: none;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}

button:hover,
a#exportBtn:hover {
  background: var(--accent-strong);
}

button.secondary {
  background: #57534e;
}

form button {
  margin-top: 18px;
}

.error {
  color: #b91c1c;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff8ec;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.container {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.panel {
  padding: 14px;
}

.table-panel {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 8px;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  background: #fff6e3;
}

.muted {
  color: var(--muted);
}

.metric-btn {
  border: 1px solid var(--line);
  background: #f4fff9;
  color: #0f5132;
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 600;
  cursor: pointer;
}

.metric-btn:hover {
  background: #e8fff2;
}

.metric-btn.active {
  background: #c8f2dd;
  border-color: #7dc8a3;
}

.detail-host-row td {
  padding: 0;
  background: #f7f5ef;
}

.case-row-active td {
  background: #eef9f3;
}

.case-row-active td:first-child {
  box-shadow: inset 3px 0 0 #2d8f67;
}

.inline-details {
  padding: 12px;
  border-top: 1px solid var(--line);
}

.inline-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.inline-details-title {
  font-weight: 700;
}

.inline-details-meta {
  color: var(--muted);
  font-size: 13px;
}

.inline-details table {
  min-width: 100%;
  background: #fffdf8;
}

.inline-details .secondary {
  padding: 6px 10px;
  font-size: 12px;
}

.info-list {
  margin: 10px 0;
  padding-left: 18px;
}

.info-list li {
  margin: 6px 0;
}

.info-text {
  line-height: 1.45;
}

.details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.details-header h2 {
  margin: 0;
  font-size: 18px;
}

#detailsMeta {
  margin: 8px 0 12px;
}

@media (max-width: 800px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  table {
    min-width: 720px;
  }
}
