/* The management pages (plan 7). Plain CSS, no build step. */
:root {
  --ink: #1d232a;
  --muted: #5b6570;
  --line: #d7dce1;
  --surface: #ffffff;
  --page: #f4f6f8;
  --accent: #1f5f99;
  --danger: #a4262c;
  --ok: #1e6b3a;
  color: var(--ink);
  background: var(--page);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Alpine removes x-cloak when a component starts. */
[x-cloak] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.page-header nav {
  display: flex;
  gap: 1rem;
}

.who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  color: var(--muted);
}

main,
.message-area {
  max-width: 72rem;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

.error,
.notice {
  padding: 0.75rem 1rem;
  border: 1px solid var(--danger);
  border-left-width: 4px;
  background: #fdf3f3;
}

.notice {
  border-color: var(--ok);
  background: #f1f8f3;
}

.error p,
.notice p {
  margin: 0.25rem 0;
}

.panel {
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.narrow {
  max-width: 28rem;
}

label {
  display: block;
  margin: 0.75rem 0 0.25rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
}

.inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.inline > * {
  flex: 1 1 10rem;
}

button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

button.secondary {
  background: var(--surface);
  color: var(--accent);
}

button.danger {
  border-color: var(--danger);
  background: var(--danger);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

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

th {
  color: var(--muted);
  font-weight: 500;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.pager {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
}
