:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #22c55e;
  --danger: #ef4444;
  --radius: 10px;
}

* { box-sizing: border-box; }

a { color: var(--accent); }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.1rem; }
.tagline { color: var(--muted); font-size: 0.9rem; }

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem;
}

#intro h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
#intro p { color: var(--muted); line-height: 1.5; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.card h2 { margin-top: 0; }
.muted { color: var(--muted); font-size: 0.85rem; }

form { display: flex; flex-direction: column; gap: 0.9rem; }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; }
label.checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
label.checkbox input { margin-top: 0.2rem; }

input[type="text"], input[type="email"], input[type="tel"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
  color: var(--text);
  font-size: 0.95rem;
}
input:focus { outline: 2px solid var(--accent); }

button {
  background: var(--accent);
  color: #052e16;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.error { color: var(--danger); font-size: 0.85rem; }

#dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
#dropzone:hover, #dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.06);
}
#dropzone p { margin: 0.25rem 0; }

#result { margin-top: 1.25rem; }
#result-summary {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: 0.8rem;
}
#result-summary.ok { background: rgba(34, 197, 94, 0.15); color: var(--accent); }
#result-summary.fail { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

#result-errors { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
#result-errors li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
}
#result-errors .stage { color: var(--muted); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.03em; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 2rem 1rem;
}

.admin-main { max-width: 1000px; }

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.admin-toolbar h2 { margin: 0; }

.admin-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.admin-actions input[type="search"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  color: var(--text);
  font-size: 0.85rem;
}
.admin-actions a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}
.admin-actions a:hover { text-decoration: underline; }
.admin-actions button {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  background: var(--border);
  color: var(--text);
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
