/* The palette of znipp.ch: black, white, and one red. */
:root {
  --bg: #000;
  --surface: #111;
  --line: #2a2a2a;
  --text: #fff;
  --muted: #9a9a9a;
  --primary: #e31919;
  --primary-dark: #c20a0f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

main.card {
  width: min(26rem, calc(100% - 2rem));
  margin: 12vh auto 2rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

main.wide {
  width: min(64rem, calc(100% - 2rem));
  margin: 2rem auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: block; height: 2rem; width: auto; margin-bottom: 1.5rem; }
header .logo { margin-bottom: 0; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .75rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
p { margin: 0 0 1rem; }
section { margin-top: 2rem; }

label { display: block; margin-bottom: 1rem; font-size: .9rem; color: var(--muted); }

input {
  display: block;
  width: 100%;
  margin-top: .3rem;
  padding: .6rem .7rem;
  font: inherit;
  color: var(--text);
  background: #000;
  border: 1px solid var(--line);
  border-radius: 8px;
}
input:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

button {
  padding: .65rem 1.1rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
button:hover { background: var(--primary-dark); }
button:disabled { opacity: .6; cursor: default; }
main.card form button { width: 100%; }

button.quiet {
  padding: .35rem .7rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--line);
}
button.quiet:hover { background: #1a1a1a; }
button.danger { color: #ff6464; }

.error { color: #ff6464; }
.muted { color: var(--muted); font-size: .9rem; }
main.card .muted:last-child { margin: 1.5rem 0 0; }

.spinner {
  width: 2rem;
  height: 2rem;
  margin: 1.5rem 0 0;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }

form.row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
form.row label { margin-bottom: 0; }
form.row .grow { flex: 1 1 16rem; }

.created {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 12px;
}
dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; min-width: 0; }
code { font: .9em ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .85rem; font-weight: 500; color: var(--muted); }
td:first-child { white-space: normal; }

.actions { display: flex; gap: .5rem; justify-content: flex-end; }
.actions form { display: flex; gap: .4rem; }
.actions input { width: 4.5rem; margin: 0; padding: .3rem .5rem; }

.status { padding: .15rem .55rem; border-radius: 999px; font-size: .85rem; border: 1px solid var(--line); }
.status.running { border-color: #2e7d32; color: #7bd88f; }
.status.expired { color: var(--muted); }
