* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #1f2937; /* slate-800 */
  background: #f8fafc; /* slate-50 */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Layout ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 1800px) {
  .container { max-width: 1600px; }
}


.site-header {
  background: #0f172a; /* slate-900 */
  color: #fff;
  padding: 14px 0;
  border-bottom: 1px solid #1e293b; /* slate-800 */
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand a {
  color: #fff;
  text-decoration: none;
}
.nav a, .nav .hello {
  color: #e2e8f0; /* slate-200 */
  margin-left: 16px;
  text-decoration: none;
  font-size: 14px;
}
.nav a:hover { color: #fff; }

.site-main {
  flex: 1 0 auto;           /* Push footer to the bottom */
  padding: 24px 0 40px;
  background: #f8fafc;
}

.site-footer {
  flex-shrink: 0;            /* Sticky footer */
  background: #0b1220;       /* slightly darker */
  color: #cbd5e1;            /* slate-300 */
  border-top: 1px solid #1e293b;
  padding: 16px 0;
  text-align: center;
}

/* ===== Components ===== */
h1, h2, h3 { margin: 0 0 12px; }
p { margin: 0 0 10px; }
code { background: #e2e8f0; padding: 2px 6px; border-radius: 4px; }

.btn, button {
  display: inline-block;
  background: #1d4ed8;      /* blue-700 */
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}
.btn:hover, button:hover { background: #2563eb; } /* blue-600 */

button.danger {
  background: #b91c1c; /* red-700 */
}
button.danger:hover {
  background: #dc2626; /* red-600 */
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  margin-right: 8px;
}
.badge-ok { background: #d1fae5; color: #065f46; }    /* emerald */
.badge-warn { background: #fee2e2; color: #991b1b; }  /* red */

.inline { display: inline; }

.feed-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.feed-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feed-main { display: flex; flex-direction: column; gap: 6px; }
.feed-name { font-weight: 600; color: #1f2937; text-decoration: none; }
.feed-name:hover { text-decoration: underline; }
.feed-id { color: #64748b; font-size: 12px; }


/* ===== Forms for Explorer ===== */
.form-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.form-grid .full { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: 12px;
  color: #475569; /* slate-600 */
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #93c5fd; /* blue-300 */
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* Run button row */
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Output box */
pre#out {
  background: #0b1020;
  color: #c7d2fe; /* indigo-200 */
  padding: 14px;
  border-radius: 12px;
  overflow: auto;
  border: 1px solid #1e293b;
}


/* Force wide content area */
.site-main.container {
  width: 100%;
  max-width: 1400px;   /* adjust to taste */
  padding-left: 20px;
  padding-right: 20px;
}

/* Optional: super wide pages */
.container-wide { max-width: 1600px; }
