:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --accent-dark: #374151;
  --border: #d1d5db;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }

.topbar {
  background: var(--accent-dark);
  color: white;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { font-weight: 700; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.nav-links a {
  text-decoration: none;
  color: white;
  background: #4b5563;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #6b7280;
  font-size: 0.9rem;
}

.nav-links a.active,
.nav-links a:hover {
  background: var(--primary);
  border-color: var(--primary-dark);
}

main {
  max-width: 1180px;
  margin: 1.3rem auto;
  padding: 0 1rem 2rem;
}

h1 { margin: 0 0 0.4rem; }
.subtitle { color: var(--muted); margin-top: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.8rem;
}

.panel-link {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem;
  text-decoration: none;
  color: var(--text);
  background: #fff7ed;
}

.panel-link:hover { border-color: var(--primary); }

form { display: grid; gap: 0.65rem; }
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-width { grid-column: 1 / -1; }

input, select, textarea, button {
  font: inherit;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
}
textarea { resize: vertical; min-height: 90px; }

button {
  background: var(--primary);
  color: white;
  border-color: var(--primary-dark);
  cursor: pointer;
  font-weight: 600;
}

button:hover { background: var(--primary-dark); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { border: 1px solid var(--border); padding: 0.45rem 0.55rem; text-align: left; white-space: nowrap; }
th { background: #f9fafb; }

pre {
  background: #111827;
  color: #e5e7eb;
  border-radius: 8px;
  padding: 0.8rem;
  overflow: auto;
}

.hint { color: var(--muted); margin-top: 0; }

@media (max-width: 780px) {
  .grid-two { grid-template-columns: 1fr; }
}
