:root {
  --navy: #101b36;
  --primary: #2148f5;
  --paper: #f7f9fc;
  --mint: #eaf1ff;
  --muted: #4a5c78;
  --border: #d8e2f0;
  --ok: #0d7a4f;
  --radius: 12px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--navy);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand strong {
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--muted);
  font-size: 0.85rem;
}

nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-right: 1rem;
}

nav a.active {
  text-decoration: underline;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.92rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

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

.tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  text-align: left;
}

.tile:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(16, 27, 54, 0.08);
}

.tile h2 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  line-height: 1.35;
}

.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.chip {
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--mint);
  color: var(--navy);
}

.chip.ready {
  background: #dff5ea;
  color: var(--ok);
}

.login-card {
  max-width: 380px;
  margin: 4rem auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.login-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.login-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-card input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.err {
  color: #b42318;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.detail h1 {
  margin-top: 0;
  font-size: 1.45rem;
  line-height: 1.35;
}

.section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section pre,
.section textarea {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

.section textarea {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem;
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
}

.empty {
  color: var(--muted);
  padding: 2rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}