/* Public schema styling - clean, professional, information-dense */
:root {
  --color-primary: #333;
  --color-primary-light: #555;
  --color-accent: #0066cc;
  --color-accent-hover: #0052a3;
  --color-bg: #fff;
  --color-bg-alt: #f5f5f5;
  --color-text: #222;
  --color-text-muted: #666;
  --color-border: #ddd;
  --color-highlight: #e8e8e8;
  --font-sans: system-ui, -apple-system, sans-serif;
  --transition-fast: 0.15s ease;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  color: var(--color-text);
  background: var(--color-bg);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
}

.header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.nav {
  margin-top: 0;
}

.nav a {
  color: #ddd;
  margin-right: 1rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav a:hover {
  color: #fff;
}

.nav a.active {
  color: #fff;
  font-weight: 600;
}

.main {
  padding: 0.75rem 1rem;
  max-width: 960px;
  margin: 0 auto;
}

h1, h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.4rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 600;
  background: var(--color-bg-alt);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
}

input, button, select {
  font-family: inherit;
  font-size: inherit;
}

input[type="text"],
input[type="url"],
input[type="email"],
textarea {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

button, input[type="submit"] {
  padding: 0.35rem 0.75rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

button:hover, input[type="submit"]:hover {
  background: var(--color-primary-light);
}

/* Dashboard sidebar */
.dashboard-layout {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.dashboard-sidebar {
  min-width: 160px;
  flex-shrink: 0;
}

.dashboard-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dashboard-sidebar a {
  padding: 0.4rem 0.5rem;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 4px;
  transition: background var(--transition-fast);
}

.dashboard-sidebar a:hover {
  background: var(--color-highlight);
}

.dashboard-sidebar a.active {
  background: var(--color-highlight);
  font-weight: 600;
}

.dashboard-content {
  flex: 1;
  min-width: 0;
}

/* Messagelist (Django messages) */
.messagelist {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.messagelist li {
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: 4px;
}

.messagelist li.success {
  background: #e6f4ea;
  color: #137333;
}

.messagelist li.error {
  background: #fce8e6;
  color: #c5221f;
}

.messagelist li.info {
  background: #e8f0fe;
  color: #1967d2;
}

.muted {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
}

.form-row {
  margin-bottom: 0.5rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.15rem;
}

.form-row input[type="text"],
.form-row select {
  max-width: 400px;
}

.form-error {
  display: block;
  color: #c5221f;
  font-size: 0.85em;
  margin-top: 0.15rem;
}

/* Sidebar section labels */
.sidebar-section {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  padding: 0.6rem 0.5rem 0.1rem;
  margin-top: 0.15rem;
}

/* Mobile: sidebar collapses to horizontal strip above content */
@media (max-width: 680px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .dashboard-sidebar {
    min-width: unset;
  }

  .dashboard-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .sidebar-section {
    display: none;
  }
}
