:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f3f6fa;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 32px;
  background: #0f172a;
  color: white;
}

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

.topbar p {
  margin: 4px 0 0;
  opacity: 0.75;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.card {
  background: white;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  margin-bottom: 16px;
}

.summary-card {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.summary-card strong {
  font-size: 30px;
  margin-top: 4px;
}

.label {
  font-size: 13px;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0;
  font-size: 20px;
}

.section-header p {
  margin: 2px 0 0;
  color: #667085;
  font-size: 14px;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #2563eb;
  color: white;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status-pill {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.status-online {
  background: #dcfce7;
  color: #166534;
}

.status-offline {
  background: #fee2e2;
  color: #991b1b;
}

.status-unknown {
  background: #e5e7eb;
  color: #374151;
}

.machine-list {
  display: grid;
  gap: 12px;
}

.machine {
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  padding: 16px;
}

.machine-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.machine-name {
  font-size: 18px;
  font-weight: 700;
}

.machine-meta {
  color: #667085;
  font-size: 14px;
  margin-top: 4px;
}

.provider-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.provider {
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  padding: 14px;
}

.provider-name {
  font-weight: 700;
}

.provider-type {
  color: #667085;
  font-size: 13px;
  margin-top: 2px;
}

.capabilities {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.capability {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.full-width {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: white;
}

textarea {
  resize: vertical;
}

.form-actions {
  margin-top: 16px;
}

.result {
  margin-top: 16px;
  border-radius: 10px;
  padding: 14px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background: #f8fafc;
  border: 1px solid #dbe2ea;
}

.result.error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

.empty-state {
  padding: 24px;
  color: #667085;
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 800px) {
  .summary-grid,
  .provider-list,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 20px;
    align-items: flex-start;
    flex-direction: column;
  }

  .container {
    width: min(100% - 20px, 1200px);
  }

  .full-width {
    grid-column: auto;
  }
}

.login-overlay {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #f3f6fa;
}

.login-card {
  width: min(420px, 100%);
  background: white;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.login-card p {
  margin: 0 0 20px;
  color: #667085;
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.login-card input {
  width: 100%;
}

.login-card button {
  width: 100%;
}

.login-error {
  margin-top: 12px;
  color: #b42318;
  font-size: 14px;
}

.hidden {
  display: none !important;
}
