:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2330; --muted: #6b7280; --border: #e3e6eb;
  --accent: #2f6fde; --ok: #157347; --err: #b42318;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12151b; --card: #1b1f27; --text: #e6e8ec; --muted: #9aa3b2; --border: #2c323d;
          --accent: #6a9bf4; --ok: #4cc38a; --err: #f97066; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
.nav { display: flex; gap: 18px; align-items: center; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--border); }
.nav a { color: var(--muted); } .nav a.active, .nav a:hover { color: var(--text); }
.nav .brand { color: var(--text); font-weight: 600; margin-right: 8px; }
main { max-width: 1200px; margin: 0 auto; padding: 28px 16px; }
h1 { font-size: 1.5rem; margin: 0; } h2 { font-size: 1.05rem; margin: 0 0 14px; }
header.page { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; margin-bottom: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.link-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.link-card:hover { border-color: var(--accent); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; align-items: end; }
.fields label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; color: var(--muted); }
.fields label.wide { grid-column: 1 / -1; }
.fields label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.fields .buttons { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; }
textarea { resize: vertical; }
button { font: inherit; border: 0; border-radius: 6px; padding: 8px 16px; background: var(--accent); color: #fff; cursor: pointer; }
button.link { background: none; color: var(--accent); padding: 0; }
.danger { color: var(--err) !important; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
td.actions { white-space: nowrap; text-align: right; }
td { max-width: 320px; overflow-wrap: anywhere; }
td.actions form { display: inline; margin-left: 10px; }
td.empty { text-align: center; padding: 20px; }
.muted { color: var(--muted); } .mono, code { font-family: ui-monospace, Menlo, monospace; font-size: .85em; }
.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; }
.flash.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.flash.err { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }

/* ---- copyable code snippets (e.g. the clone command) */
td.clone { width: 100%; min-width: 14rem; max-width: 1px; }  /* takes the spare width, never pushes other columns */
.snippet {
  display: flex; align-items: center; gap: 7px;
  background: #0d1117; color: #e6edf3; border: 1px solid #30363d; border-radius: 8px;
  padding: 4px 10px 4px 4px; font-family: ui-monospace, "JetBrains Mono", Menlo, monospace; font-size: .74rem;
}
.snippet code {
  flex: 1; white-space: nowrap; overflow-x: auto; user-select: all; cursor: text;
  font-family: inherit; font-size: inherit; scrollbar-width: thin;
}
.snippet code::before { content: "$ "; color: #7d8590; user-select: none; }
.snippet .copy {
  flex: none; padding: 2px 8px; font-size: .7rem; border-radius: 5px;
  background: #21262d; color: #c9d1d9; border: 1px solid #30363d;
}
.snippet .copy:hover { background: #30363d; }
.snippet .copy { min-width: 4.6em; }  /* no jump when it says "Copied ✓" */
.snippet .copy.copied { color: #3fb950; border-color: #3fb950; }
td.nowrap { white-space: nowrap; overflow-wrap: normal; }
