:root {
  color-scheme: light;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #cbd5e1;
  background: #ffffff;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
}

.topbar p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #334155;
}

.workspace {
  display: grid;
  grid-template-columns: 290px 1fr 320px;
  height: calc(100vh - 72px);
}

.sidebar {
  border-right: 1px solid #cbd5e1;
  background: #fff;
  padding: 12px;
  overflow: auto;
}

.sidebar.right {
  border-right: none;
  border-left: 1px solid #cbd5e1;
}

.sidebar h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.sidebar h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.sidebar button {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  background: #f1f5f9;
  cursor: pointer;
}

.sidebar button:hover {
  background: #e2e8f0;
}

.meta-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  line-height: 1.5;
}

.canvas-wrap {
  height: 100%;
  min-width: 0;
}

.status-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid #64748b;
}

.pill.healthy {
  background: #dcfce7;
  border-color: #16a34a;
}

.pill.down {
  background: #fee2e2;
  border-color: #dc2626;
}

.pill.unknown {
  background: #fef9c3;
  border-color: #ca8a04;
}

.form label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  color: #334155;
}

.form input,
.form select,
.form textarea {
  margin-top: 4px;
  width: 100%;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  padding: 7px;
}

.task-list {
  margin-top: 14px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

.task-item {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  background: #f8fafc;
}

.panel-note {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px;
}

@media (max-width: 1100px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .status-group {
    width: 100%;
    justify-content: space-between;
  }

  .workspace {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 72px);
  }

  .canvas-wrap {
    order: 1;
    height: 68vh;
    min-height: 380px;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
  }

  .sidebar {
    order: 2;
    border-right: none;
    border-top: 1px solid #cbd5e1;
  }

  .sidebar.right {
    order: 3;
    border-left: none;
  }
}
