:root {
  --bg: #0b1220;
  --panel: #111c31;
  --panel2: #17233a;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --danger: #fb7185;
  --border: rgba(255,255,255,.1);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #172554, var(--bg));
  color: var(--text);
  padding-bottom: env(safe-area-inset-bottom);
}
.app-header {
  padding: 18px 16px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(11,18,32,.92);
  backdrop-filter: blur(12px);
  z-index: 5;
  border-bottom: 1px solid var(--border);
}
h1 { margin: 0; font-size: 22px; }
p { margin: 4px 0 0; color: var(--muted); }
main { padding: 14px; max-width: 900px; margin: 0 auto; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.card, button {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}
.card.active, button[type="submit"] { background: linear-gradient(135deg, #0284c7, #0369a1); }
.secondary { background: var(--panel2); font-size: 14px; padding: 10px 12px; }
.view { display: none; }
.active-view { display: block; }
h2 { font-size: 18px; margin: 18px 0 10px; }
.form-grid { display: grid; gap: 10px; background: rgba(17,28,49,.8); border: 1px solid var(--border); border-radius: 18px; padding: 12px; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #07111f;
  color: var(--text);
  font-size: 16px;
}
textarea { min-height: 90px; resize: vertical; }
.list { display: grid; gap: 10px; }
.item {
  background: rgba(17,28,49,.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}
.item-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.item h3 { margin: 0; font-size: 17px; }
.item p { white-space: pre-wrap; }
.badge { color: #bae6fd; font-size: 13px; background: rgba(56,189,248,.15); padding: 4px 8px; border-radius: 999px; }
.row-actions { display: flex; gap: 8px; margin-top: 10px; }
.row-actions button { flex: 1; padding: 9px; font-size: 14px; }
.delete { color: white; background: rgba(251,113,133,.25); }
dialog { border: 1px solid var(--border); border-radius: 18px; background: var(--panel); color: var(--text); max-width: 92vw; }
pre { white-space: pre-wrap; color: var(--text); }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(4, 1fr); } .form-grid { grid-template-columns: repeat(2, 1fr); } textarea, button[type="submit"] { grid-column: 1 / -1; } }
