/* ===========================
   Secret Santa – CSS global
   =========================== */

:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --border-soft: #f0f2f5;

  --ok: #0a7a0a;
  --err: #b00020;
  --warn: #a05a00;

  --card-bg: #fff;
  --card-radius: 12px;

  --btn-bg: #111827;
  --btn-text: #ffffff;
  --btn-bg-hover: #0b1220;

  --btn-soft-bg: #f3f4f6;
  --btn-soft-text: #111827;
  --btn-soft-hover: #e7e9ee;

  --input-bg: #ffffff;
  --input-border: #d1d5db;
  --input-focus: #111827;

  --shadow: 0 6px 20px rgba(17, 24, 39, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 32px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.container {
  max-width: 860px;
  margin: 0 auto;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 12px 0;
}

h1 { font-size: 28px; }
h2 { font-size: 20px; color: var(--text); }
h3 { font-size: 16px; color: var(--muted); }

p { margin: 10px 0; }

/* Messages */
.msg {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  margin: 10px 0 14px;
  border: 1px solid transparent;
}
.msg.ok {
  color: var(--ok);
  background: #ecfdf3;
  border-color: #c7f0d1;
}
.msg.err {
  color: var(--err);
  background: #fff1f3;
  border-color: #ffd1d8;
}
.msg.warn {
  color: var(--warn);
  background: #fff7ed;
  border-color: #ffe1bd;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

/* Form */
label {
  display: block;
  font-weight: 700;
  margin: 14px 0 6px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

textarea { min-height: 120px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(17,24,39,0.08);
}

/* Rows for dynamic participants */
.rows {
  margin-top: 6px;
}
.row {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}
.row > * { flex: 1; }
.row .btn-soft { flex: 0 0 auto; }

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .04s ease, background .12s ease, opacity .12s ease;
  user-select: none;
}

.btn:active, button:active { transform: translateY(1px); }

.btn-primary, button.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
}
.btn-primary:hover { background: var(--btn-bg-hover); }

.btn-soft, button.btn-soft {
  background: var(--btn-soft-bg);
  color: var(--btn-soft-text);
}
.btn-soft:hover { background: var(--btn-soft-hover); }

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
}
.btn-danger:hover { background: #fecaca; }

.actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}

th {
  background: #fafafa;
  font-weight: 800;
}

tr:last-child td { border-bottom: 0; }

code {
  background: #f6f6f6;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.95em;
}

/* Small separators */
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

/* Responsive */
@media (max-width: 640px) {
  body { padding: 18px; }
  .card { padding: 16px; }
  .row { flex-direction: column; }
  button, .btn { width: 100%; }
}
