:root {
  --bg: #f4f4f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --border: #e2e8f0;
  --success: #059669;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 18px 56px;
}

header { text-align: center; margin-bottom: 28px; }

header h1 {
  font-size: 1.45rem;
  color: var(--primary);
  margin: 0 0 8px;
}

header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.card h2 {
  font-size: 1rem;
  margin: 0 0 14px;
  color: var(--primary);
}

.proyectos { display: grid; gap: 10px; }

.proyecto-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
}

.proyecto-btn:hover { border-color: #94a3b8; }

.proyecto-btn.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.modalidad-icon {
  background: transparent !important;
  font-size: 1.25rem;
  width: auto;
  height: auto;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.slots {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.slot-btn {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 0.92rem;
}

.slot-btn:hover { background: #f8fafc; }

.slot-btn.selected {
  border-color: var(--primary);
  background: #eef2ff;
  font-weight: 600;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
}

input, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  margin-bottom: 14px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

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

.btn-primary:hover { background: var(--primary-hover); }

.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  width: auto;
  text-decoration: none;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}

.muted { color: var(--muted); font-size: 0.88rem; }

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: var(--success); border: 1px solid #a7f3d0; }

.hidden { display: none !important; }

.step-nav { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.step-pill {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.step-pill.active { background: var(--primary); color: #fff; }

footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--muted);
}

.spinner { text-align: center; padding: 24px; color: var(--muted); }

.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }

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

.badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; background: #e2e8f0; }
.badge.confirmed { background: #d1fae5; color: #065f46; }
.badge.cancelled { background: #fee2e2; color: #991b1b; }
