:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #06b6d4;
  --accent-2: #f43f5e;
  --border: #334155;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

nav {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  white-space: nowrap;
  background: transparent;
}
nav a.active, nav a:hover {
  background: var(--accent);
  color: #000;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

h1, h2 { margin-top: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

label { display: block; margin-bottom: 0.3rem; color: var(--muted); font-size: 0.9rem; }
input, select, button, textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
button {
  background: var(--accent);
  color: #000;
  font-weight: bold;
  border: none;
  cursor: pointer;
}
button.secondary {
  background: var(--accent-2);
  color: #fff;
}
button.small, a.small {
  display: inline-block;
  width: auto;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: #000;
  border-radius: 8px;
  margin-left: 0.3rem;
}
a.small { background: var(--accent); }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 500px) {
  .row { grid-template-columns: 1fr; }
  .list-item { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .list-item > div:last-child { width: 100%; display: flex; justify-content: flex-end; }
}

.list { display: flex; flex-direction: column; gap: 0.5rem; }
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
}
.list-item .meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.hidden { display: none; }
.status { color: var(--accent); min-height: 1.2rem; margin-top: 0.3rem; }

.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.checkbox-row input { width: auto; margin: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}
th, td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}
th { color: var(--muted); font-weight: normal; }
